HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/env/lib64/python3.10/site-packages/boto/__pycache__/__init__.cpython-310.pyc
o

we���@s�ddlmZmZddlmZmZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZ
ddlmZddlmZdZeZej�dd�dee
��e
��e
��fZe�Ze�d	�Ze�d
�Ze�d�Ze�d�Ze	j �!e	j �"e#�d
�Z$dd�Z%Gdd�de
j&�Z'e
�(d�a)e
�(d�Z*t)�+e'��e*�+e'��e%�e
j,dfdd�Z-e
j.dfdd�Z/d�dd�Z0d�dd�Z1d�dd�Z2d�dd�Z3d�d d!�Z4d�d"d#�Z5d�d$d%�Z6d�d&d'�Z7d�d(d)�Z8d�d*d+�Z9d�d,d-�Z:d�d.d/�Z;d�d0d1�Z<d�d2d3�Z=d�d4d5�Z>d�d6d7�Z?d�d8d9�Z@d�d:d;�ZAd�d<d=�ZB		@d�dAdB�ZCd�dCdD�ZD		d�dEdF�ZE			@d�dHdI�ZFd�dJdK�ZGd�dLdM�ZH		@d�dNdO�ZI		d�dPdQ�ZJ		d�dRdS�ZK		d�dTdU�ZL			@d�dVdW�ZM		d�dXdY�ZN		d�dZd[�ZO		d�d\d]�ZP		d�d^d_�ZQ		d�d`da�ZR		d�dbdc�ZS		d�ddde�ZT		d�dfdg�ZU		d�dhdi�ZV		d�djdk�ZW		d�dldm�ZX		d�dndo�ZY		d�dpdq�ZZ		d�drds�Z[		d�dtdu�Z\		d�dvdw�Z]		d�dxdy�Z^		d�dzd{�Z_		d�d|d}�Z`		d�d~d�Zad�dd�ed�d@fd�d��Zbd�d��Zcejd�ee�dS)��)�Config�BotoConfigLocations)�BucketStorageUri�FileStorageUriN)�urlparse)�InvalidUriErrorz2.49.0�zBoto/%s Python/%s %s/%sz.^[a-zA-Z0-9][a-zA-Z0-9\._-]{1,253}[a-zA-Z0-9]$z[-_a-z0-9]{64}z3(?P<versionless_uri_str>.+)#(?P<generation>[0-9]+)$z/(?P<versionless_uri_str>.+)#(?P<version_id>.+)$zendpoints.jsoncCs0tD]}ztj�tj�|��WqYqdS�N)r�logging�config�
fileConfig�os�path�
expanduser)�file�r�F/home/arjun/projects/env/lib/python3.10/site-packages/boto/__init__.py�init_loggingAs�rc@seZdZdd�ZdS)�NullHandlercCsdSr	r)�self�recordrrr�emitJszNullHandler.emitN)�__name__�
__module__�__qualname__rrrrrrIsr�botoz	boto.perfcCsV|sd}t�|�}|�|�t�|�}|�|�t�|�}|�|�|�|�|adS�Nz0%(asctime)s %(name)s [%(levelname)s]:%(message)s)r
�	getLogger�setLevel�FileHandler�	Formatter�setFormatter�
addHandler�log)�name�filepath�level�
format_string�logger�fh�	formatterrrr�set_file_loggerVs






r+cCsT|sd}t�|�}|�|�t��}|�|�t�|�}|�|�|�|�|adSr)r
rr�
StreamHandlerr r!r"r#)r$r&r'r(r)r*rrr�set_stream_loggerds





r-cK�ddlm}|||fi|��S)a&
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.sqs.connection.SQSConnection`
    :return: A connection to Amazon's SQS
    r)�
SQSConnection)�boto.sqs.connectionr/)�aws_access_key_id�aws_secret_access_key�kwargsr/rrr�connect_sqsr�r4cKr.)a#
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.s3.connection.S3Connection`
    :return: A connection to Amazon's S3
    r��S3Connection)�boto.s3.connectionr7)r1r2r3r7rrr�
connect_s3�r5r9cKr.)aV
    @type gs_access_key_id: string
    @param gs_access_key_id: Your Google Cloud Storage Access Key ID

    @type gs_secret_access_key: string
    @param gs_secret_access_key: Your Google Cloud Storage Secret Access Key

    @rtype: L{GSConnection<boto.gs.connection.GSConnection>}
    @return: A connection to Google's Storage service
    r)�GSConnection)�boto.gs.connectionr:)�gs_access_key_id�gs_secret_access_keyr3r:rrr�
connect_gs�r5r>cKr.)a&
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.ec2.connection.EC2Connection`
    :return: A connection to Amazon's EC2
    r��
EC2Connection)�boto.ec2.connectionr@)r1r2r3r@rrr�connect_ec2�r5rBcKr.)a2
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.ec2.elb.ELBConnection`
    :return: A connection to Amazon's Load Balancing Service
    r)�
ELBConnection)�boto.ec2.elbrC)r1r2r3rCrrr�connect_elb�r5rEcKr.)a�
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.ec2.autoscale.AutoScaleConnection`
    :return: A connection to Amazon's Auto Scaling Service

    :type use_block_device_types bool
    :param use_block_device_types: Specifies whether to return described Launch Configs with block device mappings containing
        block device types, or a list of old style block device mappings (deprecated).  This defaults to false for compatability
        with the old incorrect style.
    r)�AutoScaleConnection)�boto.ec2.autoscalerF)r1r2r3rFrrr�connect_autoscale�s
�rHcKr.)a@
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.ec2.cloudwatch.CloudWatchConnection`
    :return: A connection to Amazon's EC2 Monitoring service
    r)�CloudWatchConnection)�boto.ec2.cloudwatchrI)r1r2r3rIrrr�connect_cloudwatch��
�rKcKr.)a&
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.sdb.connection.SDBConnection`
    :return: A connection to Amazon's SDB
    r)�
SDBConnection)�boto.sdb.connectionrM)r1r2r3rMrrr�connect_sdb�r5rOcKr.)�
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.fps.connection.FPSConnection`
    :return: A connection to FPS
    r)�
FPSConnection)�boto.fps.connectionrQ)r1r2r3rQrrr�connect_fps�r5rScKr.)a#
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.mturk.connection.MTurkConnection`
    :return: A connection to MTurk
    r)�MTurkConnection)�boto.mturk.connectionrT)r1r2r3rTrrr�
connect_mturksrVcKr.)rPr)�CloudFrontConnection)�boto.cloudfrontrW)r1r2r3rWrrr�connect_cloudfrontrLrYcKr.)a
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.vpc.VPCConnection`
    :return: A connection to VPC
    r)�
VPCConnection)�boto.vpcrZ)r1r2r3rZrrr�connect_vpc#r5r\cKr.)a
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.rds.RDSConnection`
    :return: A connection to RDS
    r��
RDSConnection)�boto.rdsr^�r1r2r3r^rrr�connect_rds2r5racK� ddlm}|d||d�|��S)a
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.rds2.layer1.RDSConnection`
    :return: A connection to RDS
    rr]�r1r2Nr)�boto.rds2.layer1r^r`rrr�connect_rds2As��recKr.)a 
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.emr.EmrConnection`
    :return: A connection to Elastic mapreduce
    r)�
EmrConnection)�boto.emrrf)r1r2r3rfrrr�connect_emrTr5rhcKr.)a
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.sns.SNSConnection`
    :return: A connection to Amazon's SNS
    r)�
SNSConnection)�boto.snsri)r1r2r3rirrr�connect_snscr5rkcKr.)a
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.iam.IAMConnection`
    :return: A connection to Amazon's IAM
    r)�
IAMConnection)�boto.iamrl)r1r2r3rlrrr�connect_iamrr5rncKr.)a/
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.dns.Route53Connection`
    :return: A connection to Amazon's Route53 DNS Service
    r)�Route53Connection)�boto.route53ro)r1r2r3rorrr�connect_route53�rLrqcKr.)aD
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.cloudformation.CloudFormationConnection`
    :return: A connection to Amazon's CloudFormation Service
    r)�CloudFormationConnection)�boto.cloudformationrr)r1r2r3rrrrr�connect_cloudformation�rLrt�E"�/services/EucalyptusFc
Ksvddlm}ddlm}|st�ddd�}|st�ddd�}|s't�dd	d�}|d
|d�}	|||f|	|||d�|��S)
a�
    Connect to a Eucalyptus service.

    :type host: string
    :param host: the host name or ip address of the Eucalyptus server

    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.ec2.connection.EC2Connection`
    :return: A connection to Eucalyptus server
    rr?��
RegionInfo�Credentials�euca_access_key_idN�euca_secret_access_key�Boto�eucalyptus_host�
eucalyptus�r$�endpoint)�region�portr�	is_secure)�boto.ec2r@�boto.ec2.regioninforxr�get)
�hostr1r2r�rr�r3r@rx�regrrr�connect_euca�s*����r�cKr.)a+
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.glacier.layer2.Layer2`
    :return: A connection to Amazon's Glacier Service
    r��Layer2)�boto.glacier.layer2r��r1r2r3r�rrr�connect_glacier�rLr�cKszddlm}t|�}|j|d<|j|d<|j|d<d|vr$|jdk|d<||j|jd�|d	<||d
<||d<td
i|��S)a�
    Connect to an EC2 Api endpoint.  Additional arguments are passed
    through to connect_ec2.

    :type url: string
    :param url: A url for the ec2 api endpoint to connect to

    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.ec2.connection.EC2Connection`
    :return: A connection to Eucalyptus server
    rrwr�r�rr��httpsrr�r1r2Nr)r�rxrr��hostnamer�schemerB)�urlr1r2r3rx�purlrrr�connect_ec2_endpoint�s



�r��/services/Walrusc	Ksnddlm}ddlm}|st�ddd�}|st�ddd�}|s't�dd	d�}|||f||||�|d
�|��S)a�
    Connect to a Walrus service.

    :type host: string
    :param host: the host name or ip address of the Walrus server

    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.s3.connection.S3Connection`
    :return: A connection to Walrus
    rr6��OrdinaryCallingFormatryrzNr{r|�walrus_host)r�r�r�calling_formatr��r8r7r�rr�)	r�r1r2r�rr�r3r7r�rrr�connect_walrus�s*����r�cKr.)a
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.ses.SESConnection`
    :return: A connection to Amazon's SES
    r)�
SESConnection)�boto.sesr�)r1r2r3r�rrr�connect_ses'r5r�cKr.)a
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.sts.STSConnection`
    :return: A connection to Amazon's STS
    r)�
STSConnection)�boto.stsr�)r1r2r3r�rrr�connect_sts6r5r�cKsPddlm}ddlm}t�dd|�}t�dd|�}|||fd|�|d�|��S)	ah
    Connect to the Internet Archive via their S3-like API.

    :type ia_access_key_id: string
    :param ia_access_key_id: Your IA Access Key ID.  This will also look
        in your boto config file for an entry in the Credentials
        section called "ia_access_key_id"

    :type ia_secret_access_key: string
    :param ia_secret_access_key: Your IA Secret Access Key.  This will also
        look in your boto config file for an entry in the Credentials
        section called "ia_secret_access_key"

    :rtype: :class:`boto.s3.connection.S3Connection`
    :return: A connection to the Internet Archive
    rr6r�ry�ia_access_key_id�ia_secret_access_keyzs3.us.archive.org)r�r�r�r�)r�r�r�r3r7r��
access_key�
secret_keyrrr�
connect_iaEs����r�cKr.)a6
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.dynamodb.layer2.Layer2`
    :return: A connection to the Layer2 interface for DynamoDB.
    rr�)�boto.dynamodb.layer2r�r�rrr�connect_dynamodbe�
r�cKr.)a,
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.swf.layer1.Layer1`
    :return: A connection to the Layer1 interface for SWF.
    r��Layer1)�boto.swf.layer1r��r1r2r3r�rrr�connect_swfvr�r�cKr.)a3
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.cloudsearch.layer2.Layer2`
    :return: A connection to Amazon's CloudSearch service
    rr�)�boto.cloudsearch.layer2r�r�rrr�connect_cloudsearch�s
�r�cKs"ddlm}|||fd|i|��S)a�
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :type sign_request: bool
    :param sign_request: whether or not to sign search and
        upload requests

    :rtype: :class:`boto.cloudsearch2.layer2.Layer2`
    :return: A connection to Amazon's CloudSearch2 service
    rr��sign_request)�boto.cloudsearch2.layer2r�)r1r2r�r3r�rrr�connect_cloudsearch2�s
��r�cKr.)aU
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.cloudsearchdomain.layer1.CloudSearchDomainConnection`
    :return: A connection to Amazon's CloudSearch Domain service
    r)�CloudSearchDomainConnection)�boto.cloudsearchdomain.layer1r�)r1r2r3r�rrr�connect_cloudsearchdomain�s
��r�cKr.)a7
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.beanstalk.layer1.Layer1`
    :return: A connection to Amazon's Elastic Beanstalk service
    rr�)�boto.beanstalk.layer1r�r�rrr�connect_beanstalk�r�r�cKrb)aG
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.ets.layer1.ElasticTranscoderConnection`
    :return: A connection to Amazon's Elastic Transcoder service
    r)�ElasticTranscoderConnectionrcNr)�boto.elastictranscoder.layer1r�)r1r2r3r�rrr�connect_elastictranscoder��
��r�cKs ddlm}|d||d�|��S)Nr)�OpsWorksConnectionrcr)�boto.opsworks.layer1r�)r1r2r3r�rrr�connect_opsworks�s��r�cKrb)a9
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.redshift.layer1.RedshiftConnection`
    :return: A connection to Amazon's Redshift service
    r)�RedshiftConnectionrcNr)�boto.redshift.layer1r�)r1r2r3r�rrr�connect_redshift�r�r�cKrb)a6
    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.support.layer1.SupportConnection`
    :return: A connection to Amazon's Support service
    r)�SupportConnectionrcNr)�boto.support.layer1r�)r1r2r3r�rrr�connect_supportr�r�cKrb)a]
    Connect to AWS CloudTrail

    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.cloudtrail.layer1.CloudtrailConnection`
    :return: A connection to the AWS Cloudtrail service
    r)�CloudTrailConnectionrcNr)�boto.cloudtrail.layer1r�)r1r2r3r�rrr�connect_cloudtrail���r�cKrb)ai
    Connect to AWS DirectConnect

    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    :rtype: :class:`boto.directconnect.layer1.DirectConnectConnection`
    :return: A connection to the AWS DirectConnect service
    r)�DirectConnectConnectionrcNr)�boto.directconnect.layer1r�)r1r2r3r�rrr�connect_directconnect3r�r�cKrb)aV
    Connect to Amazon Kinesis

    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    rtype: :class:`boto.kinesis.layer1.KinesisConnection`
    :return: A connection to the Amazon Kinesis service
    r)�KinesisConnectionrcNr)�boto.kinesis.layer1r�)r1r2r3r�rrr�connect_kinesisIr�r�cKrb)am
    Connect to Amazon CloudWatch Logs

    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    rtype: :class:`boto.kinesis.layer1.CloudWatchLogsConnection`
    :return: A connection to the Amazon CloudWatch Logs service
    r)�CloudWatchLogsConnectionrcNr)�boto.logs.layer1r�)r1r2r3r�rrr�connect_logs_r�r�cKrb)aw
    Connect to Amazon Route 53 Domains

    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    rtype: :class:`boto.route53.domains.layer1.Route53DomainsConnection`
    :return: A connection to the Amazon Route 53 Domains service
    r)�Route53DomainsConnectionrcNr)�boto.route53.domains.layer1r�)r1r2r3r�rrr�connect_route53domainsvr�r�cKrb)ay
    Connect to Amazon Cognito Identity

    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    rtype: :class:`boto.cognito.identity.layer1.CognitoIdentityConnection`
    :return: A connection to the Amazon Cognito Identity service
    r)�CognitoIdentityConnectionrcNr)�boto.cognito.identity.layer1r�)r1r2r3r�rrr�connect_cognito_identity�r�r�cKrb)ai
    Connect to Amazon Cognito Sync

    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    rtype: :class:`boto.cognito.sync.layer1.CognitoSyncConnection`
    :return: A connection to the Amazon Cognito Sync service
    r)�CognitoSyncConnectionrcNr)�boto.cognito.sync.layer1r�)r1r2r3r�rrr�connect_cognito_sync�r�r�cKrb)a^
    Connect to AWS Key Management Service

    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    rtype: :class:`boto.kms.layer1.KMSConnection`
    :return: A connection to the AWS Key Management Service
    r)�
KMSConnectionrcNr)�boto.kms.layer1r�)r1r2r3r�rrr�connect_kms�r�r�cKrb)aR
    Connect to AWS Lambda

    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    rtype: :class:`boto.awslambda.layer1.AWSLambdaConnection`
    :return: A connection to the AWS Lambda service
    r)�AWSLambdaConnectionrcNr)�boto.awslambda.layer1r�)r1r2r3r�rrr�connect_awslambda�r�r�cKrb)a^
    Connect to AWS CodeDeploy

    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    rtype: :class:`boto.cognito.sync.layer1.CodeDeployConnection`
    :return: A connection to the AWS CodeDeploy service
    r)�CodeDeployConnectionrcNr)�boto.codedeploy.layer1r�)r1r2r3r�rrr�connect_codedeploy�r�r�cKrb)aP
    Connect to AWS Config

    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    rtype: :class:`boto.kms.layer1.ConfigServiceConnection`
    :return: A connection to the AWS Config service
    r)�ConfigServiceConnectionrcNr)�boto.configservice.layer1r�)r1r2r3r�rrr�connect_configservicer�r�cKrb)aT
    Connect to AWS CloudHSM

    :type aws_access_key_id: string
    :param aws_access_key_id: Your AWS Access Key ID

    :type aws_secret_access_key: string
    :param aws_secret_access_key: Your AWS Secret Access Key

    rtype: :class:`boto.cloudhsm.layer1.CloudHSMConnection`
    :return: A connection to the AWS CloudHSM service
    r)�CloudHSMConnectionrcNr)�boto.cloudhsm.layer1r�)r1r2r3r�rrr�connect_cloudhsmr�r�cKrb)z�
    Connect to Amazon EC2 Container Service
    rtype: :class:`boto.ec2containerservice.layer1.EC2ContainerServiceConnection`
    :return: A connection to the Amazon EC2 Container Service
    r)�EC2ContainerServiceConnectionrcNr)�boto.ec2containerservice.layer1r�)r1r2r3r�rrr�connect_ec2containerservice.���r�cKrb)z�
    Connect to Amazon Machine Learning service
    rtype: :class:`boto.machinelearning.layer1.MachineLearningConnection`
    :return: A connection to the Amazon Machine Learning service
    r)�MachineLearningConnectionrcNr)�boto.machinelearning.layer1r�)r1r2r3r�rrr�connect_machinelearning>r�r�rTc
Cstd}d}|�d�}	|	dkr|��}
|}n|d|	���}
||	dd�}|
dvr.td|
��|
dkr@d	}|d
kr:d}t|||�S|�dd
�}
|
d}d}|r`|r`t�|�rZt�|�r`td|��|
dkr�t	�|�}|r|�
�}|d}|�dd
�}
t|d�}n$|
dkr�t�|�}|r�|�
�}|d}|�dd
�}
|d}ntd|
��t
|
�d
kr�|
d
}||
|||||||d�S)aR
    Instantiate a StorageUri from a URI string.

    :type uri_str: string
    :param uri_str: URI naming bucket + optional object.
    :type default_scheme: string
    :param default_scheme: default scheme for scheme-less URIs.
    :type debug: int
    :param debug: debug level to pass in to boto connection (range 0..2).
    :type validate: bool
    :param validate: whether to check for bucket name validity.
    :type bucket_storage_uri_class: BucketStorageUri interface.
    :param bucket_storage_uri_class: Allows mocking for unit tests.
    :param suppress_consec_slashes: If provided, controls whether
        consecutive slashes will be suppressed in key paths.
    :type is_latest: bool
    :param is_latest: whether this versioned object represents the
        current version.

    We allow validate to be disabled to allow caller
    to implement bucket-level wildcarding (outside the boto library;
    see gsutil).

    :rtype: :class:`boto.StorageUri` subclass
    :return: StorageUri subclass for given URI.

    ``uri_str`` must be one of the following formats:

    * gs://bucket/name
    * gs://bucket/name#ver
    * s3://bucket/name
    * gs://bucket
    * s3://bucket
    * filename (which could be a Unix path like /a/b/c or a Windows path like
      C:\c)

    The last example uses the default scheme ('file', unless overridden).
    Nz://���r�)r�s3�gszUnrecognized scheme "%s"rF�-T�/�rzInvalid bucket name in URI "%s"r��versionless_uri_str�
generationr��
version_id)�suppress_consec_slashesr�r��	is_latest)�find�lowerrr�split�BUCKET_NAME_RE�match�TOO_LONG_DNS_NAME_COMP�search�
GENERATION_RE�	groupdict�int�
VERSION_RE�len)�uri_str�default_scheme�debug�validate�bucket_storage_uri_classr�r�r�r��end_scheme_idxr�r�	is_stream�
path_parts�bucket_name�object_namer�mdr�rrr�storage_uriNs`)
��
�
��rcCsNt|tjjj�stdtt|����|jj	j
��}d||jj|jf}t
|�S)z�Returns a StorageUri for the given key.

    :type key: :class:`boto.s3.key.Key` or subclass
    :param key: URI naming bucket + optional object.
    z7Requested key (%s) is not a subclass of boto.s3.key.Keyz
%s://%s/%s)�
isinstancerr��key�Keyr�str�type�bucket�
connection�provider�get_provider_namer$r)r�	prov_namer
rrr�storage_uri_for_key�s
�r )NN)NNNrurvF)NNNrur�F)NNF)f�boto.pyami.configrr�boto.storage_urirr�boto.pluginr�datetimer
�platform�re�sysr
�logging.config�boto.compatr�boto.exceptionr�__version__�Version�strptime�python_version�system�release�	UserAgentr�compilerrrrr�join�dirname�__file__�ENDPOINTS_PATHr�Handlerrrr#�perflogr"�INFOr+�DEBUGr-r4r9r>rBrErHrKrOrSrVrYr\rarerhrkrnrqrtr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr �plugin�load_pluginsrrrr�<module>s,�

























�
'
�$
�
(

� 
�
�
�
�
�
�
�
�

�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�e