File: //lib/python3/dist-packages/awscli/customizations/cloudtrail/__pycache__/subscribe.cpython-310.pyc
o
.&�aa5 � @ s� d dl Z d dlZd dlZddlmZ d dlmZ d dlmZ d dl m
Z
e�e�Z
dZdZG d d
� d
e�ZG dd� de�ZG d
d� de�ZdS )� N� )�get_account_id)�BasicCommand)�s3_bucket_exists)�ClientErrorz6policy/S3/AWSCloudTrail-S3BucketPolicy-2014-12-17.jsonz7policy/SNS/AWSCloudTrail-SnsTopicPolicy-2014-12-17.jsonc @ s e Zd ZdS )�CloudTrailErrorN)�__name__�
__module__�__qualname__� r r �L/usr/lib/python3/dist-packages/awscli/customizations/cloudtrail/subscribe.pyr s r c
@ s� e Zd ZdZdZdZdZdddd�d d
d�dd
d�ddd�ddd�ddd�ddd�ddd�gZdZdZ dd� Z
dd� Zdd� Zdd � Z
d,d"d#�Zd,d$d%�Zd&d'� Zd(d)� Zd*d+� Zd!S )-�CloudTrailSubscribez�
Subscribe/update a user account to CloudTrail, creating the required S3 bucket,
the optional SNS topic, and starting the CloudTrail monitoring and logging.
zcreate-subscriptionz�Creates and configures the AWS resources necessary to use CloudTrail, creates a trail using those resources, and turns on logging.znaws cloudtrail create-subscription (--s3-use-bucket|--s3-new-bucket) bucket-name [--sns-new-topic topic-name]
�nameTzCloudtrail name)r �required� help_textz
s3-new-bucketz%Create a new S3 bucket with this name)r r z
s3-use-bucketz(Use an existing S3 bucket with this namez s3-prefixzS3 object prefixz
sns-new-topicz%Create a new SNS topic with this namezinclude-global-service-eventsz(Whether to include global service eventszs3-custom-policyz Custom S3 policy template or URLzsns-custom-policyz!Custom SNS policy template or URLFc C s | � ||� | �||� dS )Nr )�setup_services�_call)�self�args�parsed_globalsr r r � _run_main@ s zCloudTrailSubscribe._run_mainc C s� d d d�}|j d ur|j |d<