Submit
Path:
~
/
/
lib
/
python2.7
/
site-packages
/
awscli
/
customizations
/
ec2
/
File Content:
bundleinstance.pyc
� =��Xc @ s d d l Z d d l m Z d d l Z d d l Z d d l Z d d l m Z d d l m Z e j d � Z d Z d Z d Z d Z d Z d � Z d � Z d Z d � Z d � Z d � Z d e f d e f d e f g Z d � Z d e f d � � YZ d S( i����N( t sha1( t six( t CustomArgumentt ec2bundleinstances� The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.sC The prefix for the image component names being stored in Amazon S3.s7 The access key ID of the owner of the Amazon S3 bucket.sc An Amazon S3 upload policy that gives Amazon EC2 permission to upload items into Amazon S3 on the user's behalf. If you provide this parameter, you must also provide your secret access key, so we can create a policy signature for you (the secret access key is not passed to Amazon EC2). If you do not provide this parameter, we generate an upload policy for you automatically. For more information about upload policies see the sections about policy construction and signatures in the <a href="http://docs.aws.amazon.com/AmazonS3/latest/dev/HTTPPOSTForms.html">Amazon Simple Storage Service Developer Guide</a>.s� The AWS secret access key for the owner of the Amazon S3 bucket specified in the --bucket parameter. This parameter is required so that a signature can be computed for the policy.c K s� | d } t | _ t d d d d d t � } | | d <t d d d d d t � } | | d <t d d d d d t � } | | d <t d d d d d t � } | | d <t d d d d d t � } | | d <d S( Nt storaget storage_paramt Buckett namet buckett help_textt Prefixt prefixt AWSAccessKeyIds owner-akidt _SAKs owner-sakt UploadPolicyt policy( t Falset requiredt BundleArgumentt BUCKET_DOCSt PREFIX_DOCSt OWNER_AKID_DOCSt OWNER_SAK_DOCSt POLICY_DOCS( t argument_tablet kwargst storage_argt arg( ( sH /tmp/pip-build-uEGWVr/awscli/awscli/customizations/ec2/bundleinstance.pyt _add_paramsB s, c K sZ t j | � t | � } | d rV x0 d D]% } | | r* d } t | � � q* q* Wn d S( NR R R s owner-akids owner-sakR sO Mixing the --storage option with the simple, scalar options is not recommended.( s buckets prefixs owner-akids owner-saks policy( t loggert debugt varst ValueError( t parsed_argsR t arg_dictt keyt msg( ( sH /tmp/pip-build-uEGWVr/awscli/awscli/customizations/ec2/bundleinstance.pyt _check_args^ s s� {{"expiration": "{expires}","conditions": [{{"bucket": "{bucket}"}},{{"acl": "ec2-bundle-read"}},["starts-with", "$key", "{prefix}"]]}}c C sh t j d d � } t j j � | } | j d � } t j d | d | d d | d � } | | d <d S( Nt hoursi s %Y-%m-%dT%H:%M:%S.%fZt expiresR R R R R ( t datetimet timedeltat utcnowt strftimet POLICYt format( t paramst deltaR'