def _list(): client = CfnClient() columns = ['StackName', 'CreationTime', 'LastUpdatedTime', 'StackStatus'] with HandleBotoError(): echo_table( client.list_stacks(status_filter=client.STACK_STATUS_ACTIVE), columns=columns, filters={ 'CreationTime': human_date, 'LastUpdatedTime': human_date })
def resources(stack): client = CfnClient() stack = Stack(client, stack) columns = [ 'ResourceType', 'PhysicalResourceId', 'LastUpdatedTimestamp', 'ResourceStatus', 'LogicalResourceId', ] with HandleBotoError(): echo_table( stack.resources, columns=columns, pager=True, )
def events(stack): client = CfnClient() stack = Stack(client, stack) columns = [ 'LogicalResourceId', 'ResourceStatus', 'ResourceStatusReason', 'Timestamp', ] with HandleBotoError(): echo_table( stack.events, columns=columns, filters={'Timestamp': human_date}, pager=True, )
def delete(stack, retain): client = CfnClient() stack = Stack(client, stack) stack.delete(retain_resources=retain)
def validate(template_file): client = CfnClient() template = Template(client, template_file) with HandleBotoError(): response = template.validate() echo_response(response)
def show(stack): client = CfnClient() stack = Stack(client, stack) echo_response(stack.status)
def update(stack): client = CfnClient() stack = Stack(client, stack) with HandleBotoError(): response = stack.update() echo_response(response)