moduleAwsmoduleApimoduleCustomizations@apis={}@docs={}@plugins={}class<<selfdefapi(prefix,&block)@apis[prefix]=blockenddefdoc(prefix,&block)@docs[prefix]=blockenddefplugins(prefix,options)@plugins[prefix]={add: options[:add]||[],remove: options[:remove]||[],}enddefapply_api_customizations(api)metadata=api['metadata']||{}prefix=metadata['serviceFullName']# event stream is not supported at V2api=exclude_eventstream(api)ifapi['operations']@apis[prefix].call(api)if@apis[prefix]enddefapply_doc_customizations(api,docs)prefix=api.metadata['serviceFullName']@docs[prefix].call(docs)if@docs[prefix]enddefapply_plugins(client_class)prefix=client_class.api.metadata['serviceFullName']if@plugins[prefix]@plugins[prefix][:add].each{|p|client_class.add_plugin(p)}@plugins[prefix][:remove].each{|p|client_class.remove_plugin(p)}endendprivatedefexclude_eventstream(api)api['operations'].eachdo|name,ref|inbound=ref['input']&&is_eventstream?(api,ref['input']['shape'])outbound=ref['output']&&is_eventstream?(api,ref['output']['shape'])api['operations'].delete(name)if!!inbound||!!outboundendapienddefis_eventstream?(api,shape_name)shape=api['shapes'][shape_name]ifshape['type']=='structure'eventstream=falseshape['members'].eachdo|_,m_ref|eventstream||=api['shapes'][m_ref['shape']]['eventstream']endeventstreamelse# non structure request/response shape# check if it's eventstream itselfshape['eventstream']endendendplugins('Amazon API Gateway',add: %w(Aws::Plugins::APIGatewayHeader),)api('Amazon CloudFront')do|api|api['shapes'].eachdo|_,shape|ifshape['members']&&shape['members']['MaxItems']shape['members']['MaxItems']['shape']='integer'endendapi['operations'].keys.eachdo|name|symbolized=name.sub(/\d{4}_\d{2}_\d{2}$/,'')api['operations'][symbolized]=api['operations'].delete(name)endendplugins('Amazon CloudSearch Domain',add: %w(Aws::Plugins::CSDConditionalSigning
Aws::Plugins::CSDSwitchToPost),remove: %w(Aws::Plugins::RegionalEndpoint
Aws::Plugins::EndpointPattern
Aws::Plugins::EndpointDiscovery),)plugins('Amazon DynamoDB',add: %w(
Aws::Plugins::DynamoDBExtendedRetries
Aws::Plugins::DynamoDBSimpleAttributes
Aws::Plugins::DynamoDBCRC32Validation
))api('Amazon Elastic Compute Cloud')do|api|ifENV['DOCSTRINGS']members=api['shapes']['CopySnapshotRequest']['members']members.delete('DestinationRegion')members.delete('PresignedUrl')endendplugins('Amazon Elastic Compute Cloud',add: %w(
Aws::Plugins::EC2CopyEncryptedSnapshot
Aws::Plugins::EC2RegionValidation
))api('Amazon Glacier')do|api|api['shapes']['Timestamp']={'type'=>'timestamp','timestampFormat'=>'iso8601',}api['shapes'].eachdo|_,shape|ifshape['members']shape['members'].eachdo|name,ref|casenamewhen/date/ithenref['shape']='Timestamp'when'limit'thenref['shape']='Size'when'partSize'thenref['shape']='Size'when'archiveSize'thenref['shape']='Size'endendendendendplugins('Amazon Glacier',add: %w(
Aws::Plugins::GlacierAccountId
Aws::Plugins::GlacierApiVersion
Aws::Plugins::GlacierChecksums
))api('AWS Import/Export')do|api|api['operations'].eachdo|_,operation|operation['http']['requestUri']='/'endendapi('AWS IoT Data Plane')do|api|api['metadata'].delete('endpointPrefix')endapi('AWS Lambda')do|api|api['shapes']['Timestamp']['type']='timestamp'enddoc('AWS Lambda')do|docs|docs['shapes']['Blob']['refs']['UpdateFunctionCodeRequest$ZipFile']="<p>.zip file containing your packaged source code.</p>"endplugins('Amazon Machine Learning',add: %w(
Aws::Plugins::MachineLearningPredictEndpoint
))api('Amazon Route 53')do|api|api['shapes']['PageMaxItems']['type']='integer'endplugins('Amazon Route 53',add: %w(
Aws::Plugins::Route53IdFix
))plugins('Amazon Relational Database Service',add: %w(
Aws::Plugins::RDSCrossRegionCopying
))api('Amazon Relational Database Service')do|api|api['shapes']['CopyDBSnapshotMessage']['members']['DestinationRegion']={"shape"=>"String"}api['shapes']['CreateDBInstanceReadReplicaMessage']['members']['DestinationRegion']={"shape"=>"String"}api['shapes']['CopyDBClusterSnapshotMessage']['members']['DestinationRegion']={"shape"=>"String"}api['shapes']['CreateDBClusterMessage']['members']['DestinationRegion']={"shape"=>"String"}api['shapes']['CopyDBSnapshotMessage']['members']['SourceRegion']={"shape"=>"String"}api['shapes']['CreateDBInstanceReadReplicaMessage']['members']['SourceRegion']={"shape"=>"String"}api['shapes']['CopyDBClusterSnapshotMessage']['members']['SourceRegion']={"shape"=>"String"}api['shapes']['CreateDBClusterMessage']['members']['SourceRegion']={"shape"=>"String"}enddoc('Amazon Relational Database Service')do|docs|docs['shapes']['String']['refs']['CopyDBSnapshotMessage$SourceRegion']="<p>The region which you are copying an encrypted snapshot from.</p>"+"<p>This is a required paramter that allows SDK to compute a pre-signed Url and"+" populate <code>PreSignedURL</code> parameter on your behalf.</p>"docs['shapes']['String']['refs']['CreateDBInstanceReadReplicaMessage$SourceRegion']="<p>The region which you are copying an encrypted snapshot from.</p>"+"<p>This is a required paramter that allows SDK to compute a pre-signed Url and"+" populate <code>PreSignedURL</code> parameter on your behalf.</p>"docs['shapes']['String']['refs']['CopyDBClusterSnapshotMessage$SourceRegion']="<p>The region which you are copying an encrypted snapshot from.</p>"+"<p>This is a required paramter that allows SDK to compute a pre-signed Url and"+" populate <code>PreSignedURL</code> parameter on your behalf.</p>"docs['shapes']['String']['refs']['CreateDBClusterMessage$SourceRegion']="<p>The region which you are copying an encrypted snapshot from.</p>"+"<p>This is a required paramter that allows SDK to compute a pre-signed Url and"+" populate <code>PreSignedURL</code> parameter on your behalf.</p>"endapi('Amazon Simple Storage Service')do|api|api['metadata'].delete('signatureVersion')ifENV['DOCSTRINGS']api['shapes']['AccelerateBoolean']={'type'=>'boolean'}api['operations'].eachdo|operation_name,operation|nextif%w(CreateBucket ListBuckets DeleteBucket).include?(operation_name)ifinput_ref=operation['input']input_shape=api['shapes'][input_ref['shape']]input_shape['members']['UseAccelerateEndpoint']={'shape'=>'AccelerateBoolean'}endendendapi['shapes']['ExpiresString']={'type'=>'string'}%w(HeadObjectOutput GetObjectOutput).eachdo|shape|members=api['shapes'][shape]['members']# inject ExpiresString directly after Expiresapi['shapes'][shape]['members']=members.inject({})do|h,(k,v)|h[k]=vifk=='Expires'h['ExpiresString']={'shape'=>'ExpiresString','location'=>'header','locationName'=>'Expires',}endhendendenddoc('Amazon Simple Storage Service')do|docs|ifENV['DOCSTRINGS']docs['shapes']['AccelerateBoolean']={}docs['shapes']['AccelerateBoolean']['refs']={}docs['shapes']['AccelerateBoolean']['base']='When <tt>true</tt>, the "https://BUCKETNAME.s3-accelerate.amazonaws.com" endpoint will be used.'endendplugins('Amazon Simple Storage Service',add: %w(
Aws::Plugins::S3Accelerate
Aws::Plugins::S3Dualstack
Aws::Plugins::S3BucketDns
Aws::Plugins::S3BucketNameRestrictions
Aws::Plugins::S3Expect100Continue
Aws::Plugins::S3HostId
Aws::Plugins::S3Http200Errors
Aws::Plugins::S3GetBucketLocationFix
Aws::Plugins::S3LocationConstraint
Aws::Plugins::S3Md5s
Aws::Plugins::S3Redirects
Aws::Plugins::S3SseCpk
Aws::Plugins::S3UrlEncodedKeys
Aws::Plugins::S3RequestSigner
))plugins('AWS S3 Control',add: %w(
Aws::Plugins::S3HostId
Aws::Plugins::S3ControlDns
Aws::Plugins::S3ControlDualstack
Aws::Plugins::S3ControlSigner
))api('Amazon Simple Queue Service')do|api|api['metadata']['errorPrefix']='AWS.SimpleQueueService.'endplugins('Amazon Simple Queue Service',add: %w(
Aws::Plugins::SQSQueueUrls
Aws::Plugins::SQSMd5s
))plugins('Amazon Simple Workflow Service',add: %w(
Aws::Plugins::SWFReadTimeouts
))endendend