o ckF[@sddlmZmZddlmZmZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZ ddlmZddlmZdZeZejdddee e e fZeZe d Ze d Ze d Ze d Ze j !e j "e#d Z$ddZ%Gddde j&Z'e (da)e (dZ*t)+e'e*+e'e%e j,dfddZ-e j.dfddZ/dddZ0dddZ1dddZ2dddZ3dd d!Z4dd"d#Z5dd$d%Z6dd&d'Z7dd(d)Z8dd*d+Z9dd,d-Z:dd.d/Z;dd0d1Zdd6d7Z?dd8d9Z@dd:d;ZAdd.+)#(?P[0-9]+)$z/(?P.+)#(?P.+)$zendpoints.jsoncCs0tD]}z tjtj|WqYqdSN)rloggingconfig fileConfigospath expanduser)filer//usr/lib/python3/dist-packages/boto/__init__.py init_loggingAs rc@seZdZddZdS) NullHandlercCsdSr r)selfrecordrrremitJszNullHandler.emitN)__name__ __module__ __qualname__rrrrrrIs rbotoz boto.perfcCsV|sd}t|}||t|}||t|}|||||adSNz0%(asctime)s %(name)s [%(levelname)s]:%(message)s)r getLoggersetLevel FileHandler Formatter setFormatter addHandlerlog)namefilepathlevel format_stringloggerfh formatterrrrset_file_loggerVs       r+cCsT|sd}t|}||t}||t|}|||||adSr)r rr StreamHandlerr r!r"r#)r$r&r'r(r)r*rrrset_stream_loggerds      r-cKddlm}|||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_idaws_secret_access_keykwargsr/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_s3r5r9cKr.)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} @return: A connection to Google's Storage service r) GSConnection)boto.gs.connectionr:)gs_access_key_idgs_secret_access_keyr3r:rrr connect_gsr5r>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_ec2r5rBcKr.)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_elbr5rEcKr.)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)r1r2r3rFrrrconnect_autoscales  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)r1r2r3rIrrrconnect_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_sdbr5rOcKr.) :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_fpsr5rScKr.)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)r1r2r3rWrrrconnect_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)r1r2r3rorrrconnect_route53rLrqcKr.)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)r1r2r3rrrrrconnect_cloudformationrLrtE"/services/EucalyptusFc Ksvddlm}ddlm}|stddd}|stddd}|s'tdd 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 Credentialseuca_access_key_idNeuca_secret_access_keyBotoeucalyptus_host eucalyptusr$endpoint)regionportr is_secure)boto.ec2r@boto.ec2.regioninforxr get) hostr1r2rrrr3r@rxregrrr connect_eucas*   rcKr.)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 rLayer2)boto.glacier.layer2rr1r2r3rrrrconnect_glacierrLrcKszddlm}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 rrwrrrrhttpsrrr1r2Nr)rrxrrhostnamerschemerB)urlr1r2r3rxpurlrrrconnect_ec2_endpoints     r/services/Walrusc Ksnddlm}ddlm}|stddd}|stddd}|s'tdd 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 rr6OrdinaryCallingFormatryrzNr{r| walrus_host)rrrcalling_formatrr8r7rr r) rr1r2rrrr3r7rrrrconnect_walruss*  rcKr.)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)r1r2r3rrrr connect_ses'r5rcKr.)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)r1r2r3rrrr connect_sts6r5rcKsPddlm}ddlm}tdd|}tdd|}|||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 rr6rryia_access_key_idia_secret_access_keyzs3.us.archive.org)rrrr)rrrr3r7r access_key secret_keyrrr connect_iaEs  rcKr.)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.layer2rrrrrconnect_dynamodbe rcKr.)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. rLayer1)boto.swf.layer1rr1r2r3rrrr connect_swfvrrcKr.)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.layer2rrrrrconnect_cloudsearchs rcKs"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)r1r2rr3rrrrconnect_cloudsearch2s  rcKr.)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)r1r2r3rrrrconnect_cloudsearchdomains rcKr.)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.layer1rrrrrconnect_beanstalkrrcKrb)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)r1r2r3rrrrconnect_elastictranscoder rcKs ddlm}|d||d|S)Nr)OpsWorksConnectionrcr)boto.opsworks.layer1r)r1r2r3rrrrconnect_opsworkss rcKrb)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)r1r2r3rrrrconnect_redshiftrrcKrb)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)r1r2r3rrrrconnect_supportrrcKrb)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)r1r2r3rrrrconnect_cloudtrail rcKrb)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)r1r2r3rrrrconnect_directconnect3rrcKrb)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)r1r2r3rrrrconnect_kinesisIrrcKrb)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)r1r2r3rrrr connect_logs_rrcKrb)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)r1r2r3rrrrconnect_route53domainsvrrcKrb)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)r1r2r3rrrrconnect_cognito_identityrrcKrb)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)r1r2r3rrrrconnect_cognito_syncrrcKrb)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)r1r2r3rrrr connect_kmsrrcKrb)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)r1r2r3rrrrconnect_awslambdarrcKrb)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)r1r2r3rrrrconnect_codedeployrrcKrb)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)r1r2r3rrrrconnect_configservicerrcKrb)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)r1r2r3rrrrconnect_cloudhsmrrcKrb)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)r1r2r3rrrrconnect_ec2containerservice. rcKrb)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)r1r2r3rrrrconnect_machinelearning>rrrTc 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|| dkrt | }|r| }|d}|d d } t |d}n$| dkrt | }|r| }|d}|d d } |d}ntd| t | d kr| d }|| |||||||dS)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)rs3gszUnrecognized scheme "%s"rF-T/rzInvalid bucket name in URI "%s"rversionless_uri_str generationr version_id)suppress_consec_slashesrr is_latest)findlowerrrsplitBUCKET_NAME_REmatchTOO_LONG_DNS_NAME_COMPsearch GENERATION_RE groupdictint VERSION_RElen)uri_strdefault_schemedebugvalidatebucket_storage_uri_classrrrrend_scheme_idxrr is_stream path_parts bucket_name object_namermdrrrr storage_uriNs`)            rcCsNt|tjjjstdtt||jj j }d||jj |j f}t |S)zReturns 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) isinstancerrkeyKeyrstrtypebucket connectionproviderget_provider_namer$r)r prov_namer rrrstorage_uri_for_keys r )NN)NNNrurvF)NNNrurF)NNF)fboto.pyami.configrrboto.storage_urirr boto.pluginrdatetimer platformresysr logging.config boto.compatrboto.exceptionr __version__Versionstrptimepython_versionsystemrelease UserAgentr compilerrrrrjoindirname__file__ENDPOINTS_PATHrHandlerrrr#perflogr"INFOr+DEBUGr-r4r9r>rBrErHrKrOrSrVrYr\rarerhrkrnrqrtrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr plugin load_pluginsrrrrs,                              ' $ (                             e