Пример #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)