示例#1
0
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
            })
示例#2
0
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,
        )
示例#3
0
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,
        )
示例#4
0
def delete(stack, retain):
    client = CfnClient()
    stack = Stack(client, stack)
    stack.delete(retain_resources=retain)
示例#5
0
def validate(template_file):
    client = CfnClient()
    template = Template(client, template_file)
    with HandleBotoError():
        response = template.validate()
    echo_response(response)
示例#6
0
def show(stack):
    client = CfnClient()
    stack = Stack(client, stack)
    echo_response(stack.status)
示例#7
0
def update(stack):
    client = CfnClient()
    stack = Stack(client, stack)
    with HandleBotoError():
        response = stack.update()
    echo_response(response)