admin.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:cloud-custodian 作者: capitalone 项目源码 文件源码
def config_status():
    """ Check config status in an account.
    """
    s = boto3.Session()
    client = s.client('config')
    channels = client.describe_delivery_channel_status()[
        'DeliveryChannelsStatus']
    for c in channels:
        print(yaml.safe_dump({
            c['name']: dict(
                snapshot=str(
                    c['configSnapshotDeliveryInfo'].get('lastSuccessfulTime')),
                history=str(
                    c['configHistoryDeliveryInfo'].get('lastSuccessfulTime')),
                stream=str(
                    c['configStreamDeliveryInfo'].get('lastStatusChangeTime'))
            ),
        }, default_flow_style=False))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号