+
     Ii׆  c                   s$   ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHtHt ^ RI	H
t
Ht ^ RIHtHtHtHt ^ RIHt ^ RIHtHtHt  ! R R4      t ! R	 R
4      tR tR tRR ltRR ltRR ltRR lt ! R R4      tR t RR lt!R t"RR lt#R t$R# )i    N)create_request_objectprepare_request_dict)OrderedDictget_current_datetime)ParamValidationErrorUnknownClientMethodErrorUnknownSignatureVersionError UnsupportedSignatureVersionError)FrozenAuthToken)	ArnParserdatetime2timestampfix_s3_hostc                   s   a  ] tR t^$t o RtRR lt]R 4       t]R 4       t]R 4       t	RR lt
RR ltR	 tR
 tRR lt]tRR ltRtV tR# )RequestSignera  
An object to sign requests before they go out over the wire using
one of the authentication mechanisms defined in ``auth.py``. This
class fires two events scoped to a service and operation name:

* choose-signer: Allows overriding the auth signer name.
* before-sign: Allows mutating the request before signing.

Together these events allow for customization of the request
signing pipeline, including overrides, request path manipulation,
and disabling signing per operation.


:type service_id: botocore.model.ServiceId
:param service_id: The service id for the service, e.g. ``S3``

:type region_name: string
:param region_name: Name of the service region, e.g. ``us-east-1``

:type signing_name: string
:param signing_name: Service signing name. This is usually the
                     same as the service name, but can differ. E.g.
                     ``emr`` vs. ``elasticmapreduce``.

:type signature_version: string
:param signature_version: Signature name like ``v4``.

:type credentials: :py:class:`~botocore.credentials.Credentials`
:param credentials: User credentials with which to sign requests.

:type event_emitter: :py:class:`~botocore.hooks.BaseEventHooks`
:param event_emitter: Extension mechanism to fire events.
Nc                s    W n         W0n        W@n        WPn        Wpn        Wn        \        P                  ! V4      V n        R # N)	_region_name_signing_name_signature_version_credentials_auth_token_service_idweakrefZproxy_event_emitter)selfZ
service_idregion_namesigning_namesignature_versioncredentialsZevent_emitterZ
auth_tokens   &&&&&&&&5/usr/lib/python3.14/site-packages/botocore/signers.py__init__ZRequestSigner.__init__G   s;     ()"3'%% &mmM:    c                    V P                   # r   )r   r      &r   r   ZRequestSigner.region_name[   s       r   c                r   r   )r   r   r    r   r   ZRequestSigner.signature_version_   s    &&&r   c                r   r   )r   r   r    r   r   ZRequestSigner.signing_namec   s    !!!r   c                s$    V P                  W4      # r   )sign)r   operation_namerequestkwargss   &&&,r   handlerZRequestSigner.handlerg   s    
 yy11r   c           
     s~   TpVf   V P                   pVf   V P                  pV P                  WVP                  4      pV P                  P                  RV P                  P                  4        RV 2VVV P                   VV VR7       V\        P                  8w  d   RVRVRV/p	Ve   WYR&   VP                  P                  R	/ 4      p
V'       g$   V
P                  R
4      '       d   V
R
,          V	R&   V
P                  R4      '       d   V
R,          V	R&   V
P                  R4      '       d   V
R,          V	R&   V
P                  R4      e"   V P                  V	V
R,          V
R,          4        V P                  ! R/ V	B pTP                  T4       R# R#   \         d   pTR8w  d   \        TR7      hThRp?ii ; i)a  Sign a request before it goes out over the wire.

:type operation_name: string
:param operation_name: The name of the current operation, e.g.
                       ``ListBuckets``.
:type request: AWSRequest
:param request: The request object to be sent over the wire.

:type region_name: str
:param region_name: The region to sign the request for.

:type signing_type: str
:param signing_type: The type of signing to perform. This can be one of
    three possible values:

    * 'standard'     - This should be used for most requests.
    * 'presign-url'  - This should be used when pre-signing a request.
    * 'presign-post' - This should be used when pre-signing an S3 post.

:type expires_in: int
:param expires_in: The number of seconds the presigned url is valid
    for. This parameter is only valid for signing type 'presign-url'.

:type signing_name: str
:param signing_name: The name to use for the service when signing.
Nzbefore-sign..)r#   r   r   r   request_signerr"   r   r   r   Zexpiressigningregionrequest_credentialsidentity_cache	cache_keystandardr    )r   r   _choose_signercontextr   Zemitr   	hyphenizebotocoreUNSIGNEDget_resolve_identity_cacheget_auth_instancer   r   Zadd_auth)r   r"   r#   r   signing_type
expires_inr   Zexplicit_region_namer   r$   Zsigning_contextauthes   &&&&&&&      r   r!   ZRequestSigner.signn   s   F  +++K--L //'//

 	  4++5578.9IJ%))/) 	! 	
  1 11{#%6F
 %$.y!%oo11)R@O'O,?,?,I,I(7(A}%"">22)8)H~&""#8990?)1,- ""#34@,,#$45#K0
--77 MM'"C 22 0 :-:*;  Gs   0F F<"F77F<c                s    W!R &   W1R&   R# )r+   r,   Nr/   )r   r$   cacher,      &&&&r   r6   Z%RequestSigner._resolve_identity_cache   s    #( '{r   c                sl   RRRR/pVP                  VR4      pVP                  R4      ;'       g    V P                  pVP                  R/ 4      pVP                  RV P                  4      pVP                  R	V P                  4      p	V\        P
                  Jd    VP                  V4      '       g	   We,          pV P                  P                  R
V P                  P                  4        RV 2VV	VVR7      w  rVe6   TpV\        P
                  Jd    VP                  V4      '       g	   We,          pV# )a1  
Allow setting the signature version via the choose-signer event.
A value of `botocore.UNSIGNED` means no signing will be performed.

:param operation_name: The operation to sign.
:param signing_type: The type of signing that the signer is to be used
    for.
:return: The signature version to sign with.
presign-postz-presign-postpresign-urlz-query Z	auth_typer(   r   r)   zchoose-signer.r&   )r   r   r   r1   )r5   r   r   r   r3   r4   endswithr   Zemit_until_responser   r2   )r   r"   r8   r1   Zsigning_type_suffix_mapZsuffixr   r(   r   r   r%   Zresponses   &&&&        r   r0   ZRequestSigner._choose_signer   s7    O8#
 ),,\2> $KK4OO8O8O++i,{{>43E3EFkk(D,=,=>X%6%66%..v66' //CCT--779:!N;KL%#/ D 
  ( "):)::)226::!+!  r   c                s   Vf   V P                   p\        P                  P                  P	                  V4      pVf   \        VR7      hVP                  RJ dd   V P                  '       d<   \        V P                  \        4      '       g   V P                  P                  4       pMV P                  pV! V4      pV# T;'       g    V P                  p	\        VRR4      RJ d'   VR,          p
VR,          pV
P                  V4      p	VR RpV	e   V	P                  4       pWR&   VP                  '       d5   V P                   f   \        P"                  P%                  4       hW%R&   WR	&   V! R
/ VB pV# )aA  
Get an auth instance which can be used to sign a request
using the given signature version.

:type signing_name: string
:param signing_name: Service signing name. This is usually the
                     same as the service name, but can differ. E.g.
                     ``emr`` vs. ``elasticmapreduce``.

:type region_name: string
:param region_name: Name of the service region, e.g. ``us-east-1``

:type signature_version: string
:param signature_version: Signature name like ``v4``.

:rtype: :py:class:`~botocore.auth.BaseSigner`
:return: Auth instance to sign a request.
Nr.   TZREQUIRES_IDENTITY_CACHEr+   r,   r   r   Zservice_namer/   )r   r3   r:   ZAUTH_TYPE_MAPSr5   r   ZREQUIRES_TOKENr   
isinstancer   Zget_frozen_tokenr   ZgetattrZget_credentialsZget_frozen_credentialsZREQUIRES_REGIONr   Z
exceptionsZNoRegionError)r   r   r   r   r*   r$   ZclsZfrozen_tokenr:   r   r<   keyZfrozen_credentialss   &&&&&,       r   r7   ZRequestSigner.get_auth_instance   sm   4 $ $ 7 7mm**../@A;."3  %
  /) )  $//@@B#//|$DK)>>T->->3148D@+,E%C//4K{# ""!,!C!C!E 2}  ())7799$/=!%1>"}V}r   c                s|    \        V4      pV P                  VVVRVV4       VP                  4        VP                  # )a]  Generates a presigned url

:type request_dict: dict
:param request_dict: The prepared request dictionary returned by
    ``botocore.awsrequest.prepare_request_dict()``

:type operation_name: str
:param operation_name: The operation being signed.

:type expires_in: int
:param expires_in: The number of seconds the presigned url is valid
    for. By default it expires in an hour (3600 seconds)

:type region_name: string
:param region_name: The region name to sign the presigned url.

:type signing_name: str
:param signing_name: The name to use for the service when signing.

:returns: The presigned url
r?   )r    r!   Zprepareurl)r   request_dictr"   r9   r   r   r#   s   &&&&&& r   generate_presigned_urlZ$RequestSigner.generate_presigned_urlE  sB    : (5			
 	{{r   )r   r   r   r   r   r   r   r   NN)Nr-   NN)  NN)__name__
__module____qualname____firstlineno____doc__r   Zpropertyr   r   r   r%   r!   r6   r0   r7   Zget_authrF   __static_attributes____classdictcell__Z__classdict__   @r   r   r   $   s{      D;( ! ! ' ' " "2Z#x(.!`BJ !H( (r   r   c                   sJ   a  ] tR tRt o RtR tR
R ltR tR
R ltR t	R	t
V tR# )CloudFrontSignerip  a  A signer to create a signed CloudFront URL.

First you create a cloudfront signer based on a normalized RSA signer::

    import rsa
    def rsa_signer(message):
        private_key = open('private_key.pem', 'r').read()
        return rsa.sign(
            message,
            rsa.PrivateKey.load_pkcs1(private_key.encode('utf8')),
            'SHA-1')  # CloudFront requires SHA-1 hash
    cf_signer = CloudFrontSigner(key_id, rsa_signer)

To sign with a canned policy::

    signed_url = cf_signer.generate_signed_url(
        url, date_less_than=datetime(2015, 12, 1))

To sign with a custom policy::

    signed_url = cf_signer.generate_signed_url(url, policy=my_policy)
c                s    Wn         W n        R# )aV  Create a CloudFrontSigner.

:type key_id: str
:param key_id: The CloudFront Key Pair ID

:type rsa_signer: callable
:param rsa_signer: An RSA signer.
       Its only input parameter will be the message to be signed,
       and its output will be the signed content as a binary string.
       The hash algorithm needed by CloudFront is SHA-1.
Nkey_id
rsa_signer)r   rT   rU   s   &&&r   r   ZCloudFrontSigner.__init__  s     $r   Nc                s<   VRJ;'       d    VRJpVRJ ;'       d    VRJ pV'       g	   V'       d   Rp\        V4      hVe   V P                  W4      p\        V\        4      '       d   VP	                  R4      pVe   R\        \        V4      4       2.pM$RV P                  V4      P                  R4       2.pV P                  V4      pVP                  RV P                  V4      P                  R4       2RV P                   2.4       V P                  W4      # )a\  Creates a signed CloudFront URL based on given parameters.

:type url: str
:param url: The URL of the protected object

:type date_less_than: datetime
:param date_less_than: The URL will expire after that date and time

:type policy: str
:param policy: The custom policy, possibly built by self.build_policy()

:rtype: str
:return: The signed URL.
Nz=Need to provide either date_less_than or policy, but not bothZutf8zExpires=zPolicy=z
Signature=zKey-Pair-Id=)Z
ValueErrorbuild_policyrB   ZstrZencodeintr
   _url_b64encodeZdecoderU   ZextendrT   
_build_url)	r   rD   date_less_thanpolicyZboth_args_suppliedZneither_arg_suppliedr;   paramsZ	signatures	   &&&&     r   rF   Z'CloudFrontSigner.generate_presigned_url  s    ,47NNF$<N-5HH&D.!5OAQ-%&&s;Ffc""]]6*F% %7%G!H IJKF 3 3F ; B B6 JKLMFOOF+	T00;BB6JKLt{{m,	
 s++r   c                sT    R V9   d   RMR pW,           RP                  V4      ,           # )Z?Z&)join)r   Zbase_urlZextra_paramsZ	separators   &&& r   rY   ZCloudFrontSigner._build_url  s&    (?C	#chh|&<<<r   c                s(   \        \        V4      4      p\        RRV//4      pV'       d   RV9  d
   VR,          pRV/VR&   V'       d   \        \        V4      4      pRV/VR&   RV3R	V3.pR
\        V4      ./p\        P                  ! VRR7      # )a  A helper to build policy.

:type resource: str
:param resource: The URL or the stream filename of the protected object

:type date_less_than: datetime
:param date_less_than: The URL will expire after the time has passed

:type date_greater_than: datetime
:param date_greater_than: The URL will not be valid until this time

:type ip_address: str
:param ip_address: Use 'x.x.x.x' for an IP, or 'x.x.x.x/x' for a subnet

:rtype: str
:return: The policy in a compact string.
ZDateLessThanzAWS:EpochTime/z/32zAWS:SourceIpZ	IpAddressZDateGreaterThanZResourceZ	ConditionZ	Statement)Z
separators)Z,:)rW   r
   r   jsonZdumps)	r   ZresourcerZ   Zdate_greater_thanZ
ip_addressZmoment	conditionZordered_payloadZcustom_policys	   &&&&&    r   rV   ZCloudFrontSigner.build_policy  s    : '78/61J KL	*$e#
&4j%AIk"+,=>?F,;V+DI'(&1K3KL${?'C&DEzz-J??r   c                s    \         P                  ! V4      P                  R R4      P                  RR4      P                  RR4      # )s   +s   -s   =s   _s   /s   ~)base64Z	b64encodeZreplace)r   Zdata   &&r   rX   ZCloudFrontSigner._url_b64encode  s;     T"WT4 WT4 WT4 		
r   rS   rG   )rI   rJ   rK   rL   rM   r   rF   rY   rV   rX   rN   rO   rP   rQ   r   rR   rR   p  s+     .%$,L=(@T
 
r   rR   c                     \         V R &   R# )generate_db_auth_tokenN)re   Zclass_attributesr$      &,r   add_generate_db_auth_tokenrh         1G-.r   c                 s*    \         V R &   \        V R&   R# )Zgenerate_db_connect_auth_tokenZ$generate_db_connect_admin_auth_tokenN)#dsql_generate_db_connect_auth_token)dsql_generate_db_connect_admin_auth_tokenrf   rg   r   'add_dsql_generate_db_auth_token_methodsrl     s     + 56 	2 ;<r   c           
     s    TpVf   V P                   P                  pRRRV/pRRRRR	/ R
VRR/pRpV V RV 2p	\        Wy4       V P                  P	                  RVVRRR7      p
V
\        V4      R # )a  Generates an auth token used to connect to a db with IAM credentials.

:type DBHostname: str
:param DBHostname: The hostname of the database to connect to.

:type Port: int
:param Port: The port number the database is listening on.

:type DBUsername: str
:param DBUsername: The username to log in as.

:type Region: str
:param Region: The region the database is in. If None, the client
    region will be used.

:return: A presigned url which can be used as an auth token.
NActionZconnectZDBUserurl_pathr^   query_stringr@   headersbodymethodGEThttps://r_     zrds-dbr"   rE   r   r9   r   )metar   r   _request_signerrF   len)r   Z
DBHostnameZPortZ
DBUsernameRegionr)   r\   rE   schemeendpoint_urlpresigned_urls   &&&&&      r   re   re     s    $ F~&& 	)*F 	C2%L FXj\4&1L4((?? ! @ M V''r   c           
     s&   RpW%9  d"   \        RV RRP                  V4       2R7      hVf   V P                  P                  pRRRR	R
/ RRV/RR/pRpV V 2p\	        Wh4       V P
                  P                  VVVVRR7      p	V	\        V4      R # )a  Generate a DSQL database token for an arbitrary action.

:type Hostname: str
:param Hostname: The DSQL endpoint host name.

:type Action: str
:param Action: Action to perform on the cluster (DbConnectAdmin or DbConnect).

:type Region: str
:param Region: The AWS region where the DSQL Cluster is hosted. If None, the client region will be used.

:type ExpiresIn: int
:param ExpiresIn: The token expiry duration in seconds (default is 900 seconds).

:return: A presigned url which can be used as an auth token.
z	Received z! for action but expected one of: z, )ZreportNrn   r^   ro   r@   rp   rq   rm   rr   rs   rt   Zdsqlrv   )	DbConnectDbConnectAdmin)r   r]   rw   r   r   rx   rF   ry   )
r   Hostnamerm   rz   	ExpiresInZpossible_actionsrE   r{   r|   r}   s
   &&&&&     r   _dsql_generate_db_auth_tokenr   9  s    & 7%"vh&G		RbHcGde
 	
 ~&& 	C2f
 	%L FXhZ(L4((??! @ M V''r   c                    \        WRW#4      # )a  Generate a DSQL database token for the "DbConnect" action.

:type Hostname: str
:param Hostname: The DSQL endpoint host name.

:type Region: str
:param Region: The AWS region where the DSQL Cluster is hosted. If None, the client region will be used.

:type ExpiresIn: int
:param ExpiresIn: The token expiry duration in seconds (default is 900 seconds).

:return: A presigned url which can be used as an auth token.
r~   r   r   r   rz   r   r=   r   rj   rj   l  s      (V r   c                r   )a  Generate a DSQL database token for the "DbConnectAdmin" action.

:type Hostname: str
:param Hostname: The DSQL endpoint host name.

:type Region: str
:param Region: The AWS region where the DSQL Cluster is hosted. If None, the client region will be used.

:type ExpiresIn: int
:param ExpiresIn: The token expiry duration in seconds (default is 900 seconds).

:return: A presigned url which can be used as an auth token.
r   r   r   r=   r   rk   rk     s      ((& r   c                   s0   a  ] tR tRt o R tRR ltRtV tR# )S3PostPresigneri  c                s    Wn         R # r   rx   )r   r'   rc   r   r   ZS3PostPresigner.__init__  s    -r   Nc                s   Vf   / pVf   . p/ p\        4       pV\        P                  ! VR7      ,           pVP                  \        P
                  P                  4      VR&   . VR&   V F  p	VR,          P                  V	4       K  	  \        V4      p
W*P                  R&   WjP                  R&   V P                  P                  RWR4       RV
P                  R	V/# )
ae  Generates the url and the form fields used for a presigned s3 post

:type request_dict: dict
:param request_dict: The prepared request dictionary returned by
    ``botocore.awsrequest.prepare_request_dict()``

:type fields: dict
:param fields: A dictionary of prefilled form fields to build on top
    of.

:type conditions: list
:param conditions: A list of conditions to include in the policy. Each
    element can be either a list or a structure. For example:

    .. code:: python

        [
            {"acl": "public-read"},
            {"bucket": "amzn-s3-demo-bucket"},
            ["starts-with", "$key", "mykey"]
        ]

:type expires_in: int
:param expires_in: The number of seconds the presigned post is valid
    for.

:type region_name: string
:param region_name: The region name to sign the presigned post to.

:rtype: dict
:returns: A dictionary with two elements: ``url`` and ``fields``.
    Url is the url to post to. Fields is a dictionary filled with
    the form fields and respective values to use when submitting the
    post. For example:

    .. code:: python

        {
            'url': 'https://amzn-s3-demo-bucket.s3.amazonaws.com',
            'fields': {
                'acl': 'public-read',
                'key': 'mykey',
                'signature': 'mysignature',
                'policy': 'mybase64 encoded policy'
            }
        }
)ZsecondsZ
expiration
conditionszs3-presign-post-fieldszs3-presign-post-policyZ	PutObjectr>   rD   fields)r   datetimeZ	timedeltaZstrftimer3   r:   ZISO8601appendr    r1   rx   r!   rD   )r   rE   r   r   r9   r   r[   Zdatetime_nowZexpire_datera   r#   s   &&&&&&     r   generate_presigned_postZ'S3PostPresigner.generate_presigned_post  s    n >FJ  ,-"X%7%7
%KK*33HMM4I4IJ|  "|#I< ''	2 $ (54:014:01!!~	
 w{{Hf55r   r   )NNrH   N)rI   rJ   rK   rL   r   r   rN   rO   rP   rQ   r   r   r     s     .S6 S6r   r   c                 rd   )rF   N)rF   rf   rg   r   add_generate_presigned_urlr     ri   r   c           	     s   TpTpVf   / pTpTpRRR\        V 4      /p	V P                  p
 V P                  V,          pT P
                  P                  P                  T4      pT P                  TTT	R7      p\        P                  ! TP                  RR4      4      pT P                  TTT	T'       * R7      w  pppT P                  TTTT	TR	R
7      pTe   TTR&   T
P                  TTTR7      #   \         d    \	        TR7      hi ; i)aD  Generate a presigned url given a client, its method, and arguments

:type ClientMethod: string
:param ClientMethod: The client method to presign for

:type Params: dict
:param Params: The parameters normally passed to
    ``ClientMethod``.

:type ExpiresIn: int
:param ExpiresIn: The number of seconds the presigned url is valid
    for. By default it expires in an hour (3600 seconds)

:type HttpMethod: string
:param HttpMethod: The http method to use on the generated url. By
    default, the http method is whatever is used in the method's model.

:returns: The presigned url
is_presign_requestTuse_global_endpoint)Zmethod_name
api_paramsoperation_modelr1   Bucketr@   Zignore_signing_regionFr   r   r|   r1   rp   Zset_user_agent_headerrr   )rE   r9   r"   )_should_use_global_endpointrx   Z_PY_TO_OP_NAMEZKeyErrorr   rw   service_modelr   _emit_api_paramsr	   is_arnr5   _resolve_endpoint_ruleset_convert_to_request_dictrF   )r   ZClientMethodZParamsr   Z
HttpMethodZclient_methodr\   r9   Zhttp_methodr1   r'   r"   r   bucket_is_arnr|   additional_headers
propertiesrE   s   &&&&&             r   rF   rF     sb   , !MF~JKd:4@G
 ))NB,,]; ii--==nMO""' # F
 $$VZZ"%=>M
 	&&#00	 	' 		 00'!"# 1 L !,X 00!% 1  G  B&=AABs   C/ /Dc                 rd   )r   N)r   rf   rg   r   add_generate_presigned_postr   C  s    2I./r   c           	     s   TpTpTpTp	Tp
Vf   / pMVP                  4       pV	f   . p	RRR\        V 4      /p\        V P                  4      pV P                  P
                  P                  R4      pV P                  RV/VVR7      p\        P                  ! VP                  RR4      4      pV P                  VVVV'       * R	7      w  pppV P                  VVVVVR
R7      pV	P                  RV/4       VP                  R4      '       d#   V	P                  RRVR\        R4      )  .4       MV	P                  RV/4       WxR&   VP!                  VVV	V
R7      # )a	  Builds the url and the form fields used for a presigned s3 post

:type Bucket: string
:param Bucket: The name of the bucket to presign the post to. Note that
    bucket related conditions should not be included in the
    ``conditions`` parameter.

:type Key: string
:param Key: Key name, optionally add ${filename} to the end to
    attach the submitted filename. Note that key related conditions and
    fields are filled out for you and should not be included in the
    ``Fields`` or ``Conditions`` parameter.

:type Fields: dict
:param Fields: A dictionary of prefilled form fields to build on top
    of. Elements that may be included are acl, Cache-Control,
    Content-Type, Content-Disposition, Content-Encoding, Expires,
    success_action_redirect, redirect, success_action_status,
    and x-amz-meta-.

    Note that if a particular element is included in the fields
    dictionary it will not be automatically added to the conditions
    list. You must specify a condition for the element as well.

:type Conditions: list
:param Conditions: A list of conditions to include in the policy. Each
    element can be either a list or a structure. For example:

    .. code:: python

        [
            {"acl": "public-read"},
            ["content-length-range", 2, 5],
            ["starts-with", "$success_action_redirect", ""]
        ]

    Conditions that are included may pertain to acl,
    content-length-range, Cache-Control, Content-Type,
    Content-Disposition, Content-Encoding, Expires,
    success_action_redirect, redirect, success_action_status,
    and/or x-amz-meta-.

    Note that if you include a condition, you must specify
    a valid value in the fields dictionary as well. A value will
    not be added automatically to the fields dictionary based on the
    conditions.

:type ExpiresIn: int
:param ExpiresIn: The number of seconds the presigned post
    is valid for.

:rtype: dict
:returns: A dictionary with two elements: ``url`` and ``fields``.
    Url is the url to post to. Fields is a dictionary filled with
    the form fields and respective values to use when submitting the
    post. For example:

    .. code:: python

        {
            'url': 'https://amzn-s3-demo-bucket.s3.amazonaws.com',
            'fields': {
                'acl': 'public-read',
                'key': 'mykey',
                'signature': 'mysignature',
                'policy': 'mybase64 encoded policy'
            }
        }
Nr   Tr   ZCreateBucketr   r   r@   r   Fr   bucketz${filename}zstarts-withz$keyrC   )rE   r   r   r9   )Zcopyr   r   rx   rw   r   r   r   r	   r   r5   r   r   r   rA   ry   r   )r   r   ZKeyZFieldsZ
Conditionsr   r   rC   r   r   r9   r1   Zpost_presignerr   r\   r   r|   r   r   rE   s   &&&&&&              r   r   r   G  s   P F
CFJJ~
 	d:4@G
 %T%9%9:N ii--==nMO""f%' # F
 $$VZZ"%=>M
 	&&#00	 	' 		 00'!"# 1 L x() ||M""=&#6K]9K8K2LMN5#,' 5M11!	 2  r   c                 sn   V P                   P                  R 8w  d   R# V P                   P                  P                  pV'       dp   VP	                  RR4      '       d   R# VP	                  R4      R8X  d(   V P                   P                  P
                  R8X  d   R# VP	                  R4      R8X  d   R# R# )	ZawsFZuse_dualstack_endpointZus_east_1_regional_endpointZregionalz	us-east-1Zaddressing_styleZvirtualT)rw   Z	partitionZconfigZs3r5   r   )ZclientZ	s3_configs   & r   r   r     s    {{%""%%I==1599MM78JF""..+===+,	9r   r   )Nru   )NrH   N)NNrH   )%rb   r   r`   r   r3   Zbotocore.authZbotocore.awsrequestr    r   Zbotocore.compatr   r   Zbotocore.exceptionsr   r   r   r   Zbotocore.tokensr   Zbotocore.utilsr	   r
   r   r   rR   rh   rl   re   r   rj   rk   r   r   rF   r   r   r   r/   r   r   <module>r      s          K =  , I IX
C
 C
LH3(l0(f**W6 W6tHL^JL^r   