aws-sdk-simpledbv2 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,184 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+
11
+ module Aws::SimpleDBv2
12
+ # @api private
13
+ module ClientApi
14
+
15
+ include Seahorse::Model
16
+
17
+ AwsAccountId = Shapes::StringShape.new(name: 'AwsAccountId')
18
+ ConflictException = Shapes::StructureShape.new(name: 'ConflictException')
19
+ DomainName = Shapes::StringShape.new(name: 'DomainName')
20
+ ExportArn = Shapes::StringShape.new(name: 'ExportArn')
21
+ ExportDataCutoffTime = Shapes::TimestampShape.new(name: 'ExportDataCutoffTime')
22
+ ExportManifestSummary = Shapes::StringShape.new(name: 'ExportManifestSummary')
23
+ ExportStatus = Shapes::StringShape.new(name: 'ExportStatus')
24
+ ExportSummaries = Shapes::ListShape.new(name: 'ExportSummaries')
25
+ ExportSummary = Shapes::StructureShape.new(name: 'ExportSummary')
26
+ FailureCode = Shapes::StringShape.new(name: 'FailureCode')
27
+ FailureMessage = Shapes::StringShape.new(name: 'FailureMessage')
28
+ GetExportRequest = Shapes::StructureShape.new(name: 'GetExportRequest')
29
+ GetExportResponse = Shapes::StructureShape.new(name: 'GetExportResponse')
30
+ IdempotencyToken = Shapes::StringShape.new(name: 'IdempotencyToken')
31
+ InvalidNextTokenException = Shapes::StructureShape.new(name: 'InvalidNextTokenException')
32
+ InvalidParameterCombinationException = Shapes::StructureShape.new(name: 'InvalidParameterCombinationException')
33
+ InvalidParameterValueException = Shapes::StructureShape.new(name: 'InvalidParameterValueException')
34
+ ItemsCount = Shapes::IntegerShape.new(name: 'ItemsCount')
35
+ ListExportsRequest = Shapes::StructureShape.new(name: 'ListExportsRequest')
36
+ ListExportsResponse = Shapes::StructureShape.new(name: 'ListExportsResponse')
37
+ MaxResults = Shapes::IntegerShape.new(name: 'MaxResults')
38
+ NextToken = Shapes::StringShape.new(name: 'NextToken')
39
+ NoSuchDomainException = Shapes::StructureShape.new(name: 'NoSuchDomainException')
40
+ NoSuchExportException = Shapes::StructureShape.new(name: 'NoSuchExportException')
41
+ NumberExportsLimitExceeded = Shapes::StructureShape.new(name: 'NumberExportsLimitExceeded')
42
+ RequestedAt = Shapes::TimestampShape.new(name: 'RequestedAt')
43
+ S3BucketName = Shapes::StringShape.new(name: 'S3BucketName')
44
+ S3KeyPrefix = Shapes::StringShape.new(name: 'S3KeyPrefix')
45
+ S3SseAlgorithm = Shapes::StringShape.new(name: 'S3SseAlgorithm')
46
+ S3SseKmsKeyId = Shapes::StringShape.new(name: 'S3SseKmsKeyId')
47
+ StartDomainExportRequest = Shapes::StructureShape.new(name: 'StartDomainExportRequest')
48
+ StartDomainExportResponse = Shapes::StructureShape.new(name: 'StartDomainExportResponse')
49
+ String = Shapes::StringShape.new(name: 'String')
50
+
51
+ ConflictException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
52
+ ConflictException.struct_class = Types::ConflictException
53
+
54
+ ExportSummaries.member = Shapes::ShapeRef.new(shape: ExportSummary)
55
+
56
+ ExportSummary.add_member(:export_arn, Shapes::ShapeRef.new(shape: ExportArn, required: true, location_name: "exportArn"))
57
+ ExportSummary.add_member(:export_status, Shapes::ShapeRef.new(shape: ExportStatus, required: true, location_name: "exportStatus"))
58
+ ExportSummary.add_member(:requested_at, Shapes::ShapeRef.new(shape: RequestedAt, required: true, location_name: "requestedAt"))
59
+ ExportSummary.add_member(:domain_name, Shapes::ShapeRef.new(shape: DomainName, required: true, location_name: "domainName"))
60
+ ExportSummary.struct_class = Types::ExportSummary
61
+
62
+ GetExportRequest.add_member(:export_arn, Shapes::ShapeRef.new(shape: ExportArn, required: true, location_name: "exportArn"))
63
+ GetExportRequest.struct_class = Types::GetExportRequest
64
+
65
+ GetExportResponse.add_member(:export_arn, Shapes::ShapeRef.new(shape: ExportArn, required: true, location_name: "exportArn"))
66
+ GetExportResponse.add_member(:client_token, Shapes::ShapeRef.new(shape: IdempotencyToken, required: true, location_name: "clientToken"))
67
+ GetExportResponse.add_member(:export_status, Shapes::ShapeRef.new(shape: ExportStatus, required: true, location_name: "exportStatus"))
68
+ GetExportResponse.add_member(:domain_name, Shapes::ShapeRef.new(shape: DomainName, required: true, location_name: "domainName"))
69
+ GetExportResponse.add_member(:requested_at, Shapes::ShapeRef.new(shape: RequestedAt, required: true, location_name: "requestedAt"))
70
+ GetExportResponse.add_member(:s3_bucket, Shapes::ShapeRef.new(shape: S3BucketName, required: true, location_name: "s3Bucket"))
71
+ GetExportResponse.add_member(:s3_key_prefix, Shapes::ShapeRef.new(shape: S3KeyPrefix, location_name: "s3KeyPrefix"))
72
+ GetExportResponse.add_member(:s3_sse_algorithm, Shapes::ShapeRef.new(shape: S3SseAlgorithm, location_name: "s3SseAlgorithm"))
73
+ GetExportResponse.add_member(:s3_sse_kms_key_id, Shapes::ShapeRef.new(shape: S3SseKmsKeyId, location_name: "s3SseKmsKeyId"))
74
+ GetExportResponse.add_member(:s3_bucket_owner, Shapes::ShapeRef.new(shape: AwsAccountId, location_name: "s3BucketOwner"))
75
+ GetExportResponse.add_member(:failure_code, Shapes::ShapeRef.new(shape: FailureCode, location_name: "failureCode"))
76
+ GetExportResponse.add_member(:failure_message, Shapes::ShapeRef.new(shape: FailureMessage, location_name: "failureMessage"))
77
+ GetExportResponse.add_member(:export_manifest, Shapes::ShapeRef.new(shape: ExportManifestSummary, location_name: "exportManifest"))
78
+ GetExportResponse.add_member(:items_count, Shapes::ShapeRef.new(shape: ItemsCount, location_name: "itemsCount"))
79
+ GetExportResponse.add_member(:export_data_cutoff_time, Shapes::ShapeRef.new(shape: ExportDataCutoffTime, location_name: "exportDataCutoffTime"))
80
+ GetExportResponse.struct_class = Types::GetExportResponse
81
+
82
+ InvalidNextTokenException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
83
+ InvalidNextTokenException.struct_class = Types::InvalidNextTokenException
84
+
85
+ InvalidParameterCombinationException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
86
+ InvalidParameterCombinationException.struct_class = Types::InvalidParameterCombinationException
87
+
88
+ InvalidParameterValueException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
89
+ InvalidParameterValueException.struct_class = Types::InvalidParameterValueException
90
+
91
+ ListExportsRequest.add_member(:domain_name, Shapes::ShapeRef.new(shape: DomainName, location_name: "domainName"))
92
+ ListExportsRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResults, location_name: "maxResults"))
93
+ ListExportsRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "nextToken"))
94
+ ListExportsRequest.struct_class = Types::ListExportsRequest
95
+
96
+ ListExportsResponse.add_member(:export_summaries, Shapes::ShapeRef.new(shape: ExportSummaries, required: true, location_name: "exportSummaries"))
97
+ ListExportsResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "nextToken"))
98
+ ListExportsResponse.struct_class = Types::ListExportsResponse
99
+
100
+ NoSuchDomainException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
101
+ NoSuchDomainException.struct_class = Types::NoSuchDomainException
102
+
103
+ NoSuchExportException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
104
+ NoSuchExportException.struct_class = Types::NoSuchExportException
105
+
106
+ NumberExportsLimitExceeded.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
107
+ NumberExportsLimitExceeded.struct_class = Types::NumberExportsLimitExceeded
108
+
109
+ StartDomainExportRequest.add_member(:client_token, Shapes::ShapeRef.new(shape: IdempotencyToken, location_name: "clientToken", metadata: {"idempotencyToken" => true}))
110
+ StartDomainExportRequest.add_member(:domain_name, Shapes::ShapeRef.new(shape: DomainName, required: true, location_name: "domainName"))
111
+ StartDomainExportRequest.add_member(:s3_bucket, Shapes::ShapeRef.new(shape: S3BucketName, required: true, location_name: "s3Bucket"))
112
+ StartDomainExportRequest.add_member(:s3_key_prefix, Shapes::ShapeRef.new(shape: S3KeyPrefix, location_name: "s3KeyPrefix"))
113
+ StartDomainExportRequest.add_member(:s3_sse_algorithm, Shapes::ShapeRef.new(shape: S3SseAlgorithm, location_name: "s3SseAlgorithm"))
114
+ StartDomainExportRequest.add_member(:s3_sse_kms_key_id, Shapes::ShapeRef.new(shape: S3SseKmsKeyId, location_name: "s3SseKmsKeyId"))
115
+ StartDomainExportRequest.add_member(:s3_bucket_owner, Shapes::ShapeRef.new(shape: AwsAccountId, location_name: "s3BucketOwner"))
116
+ StartDomainExportRequest.struct_class = Types::StartDomainExportRequest
117
+
118
+ StartDomainExportResponse.add_member(:client_token, Shapes::ShapeRef.new(shape: IdempotencyToken, required: true, location_name: "clientToken"))
119
+ StartDomainExportResponse.add_member(:export_arn, Shapes::ShapeRef.new(shape: ExportArn, required: true, location_name: "exportArn"))
120
+ StartDomainExportResponse.add_member(:requested_at, Shapes::ShapeRef.new(shape: RequestedAt, required: true, location_name: "requestedAt"))
121
+ StartDomainExportResponse.struct_class = Types::StartDomainExportResponse
122
+
123
+
124
+ # @api private
125
+ API = Seahorse::Model::Api.new.tap do |api|
126
+
127
+ api.version = "2025-09-26"
128
+
129
+ api.metadata = {
130
+ "apiVersion" => "2025-09-26",
131
+ "auth" => ["aws.auth#sigv4"],
132
+ "endpointPrefix" => "sdb",
133
+ "protocol" => "rest-json",
134
+ "protocols" => ["rest-json"],
135
+ "serviceFullName" => "Amazon SimpleDB v2",
136
+ "serviceId" => "SimpleDBv2",
137
+ "signatureVersion" => "v4",
138
+ "signingName" => "sdb",
139
+ "uid" => "simpledbv2-2025-09-26",
140
+ }
141
+
142
+ api.add_operation(:get_export, Seahorse::Model::Operation.new.tap do |o|
143
+ o.name = "GetExport"
144
+ o.http_method = "POST"
145
+ o.http_request_uri = "/v2/GetExport"
146
+ o.input = Shapes::ShapeRef.new(shape: GetExportRequest)
147
+ o.output = Shapes::ShapeRef.new(shape: GetExportResponse)
148
+ o.errors << Shapes::ShapeRef.new(shape: NoSuchExportException)
149
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterValueException)
150
+ end)
151
+
152
+ api.add_operation(:list_exports, Seahorse::Model::Operation.new.tap do |o|
153
+ o.name = "ListExports"
154
+ o.http_method = "POST"
155
+ o.http_request_uri = "/v2/ListExports"
156
+ o.input = Shapes::ShapeRef.new(shape: ListExportsRequest)
157
+ o.output = Shapes::ShapeRef.new(shape: ListExportsResponse)
158
+ o.errors << Shapes::ShapeRef.new(shape: InvalidNextTokenException)
159
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterValueException)
160
+ o.errors << Shapes::ShapeRef.new(shape: NoSuchDomainException)
161
+ o[:pager] = Aws::Pager.new(
162
+ limit_key: "max_results",
163
+ tokens: {
164
+ "next_token" => "next_token"
165
+ }
166
+ )
167
+ end)
168
+
169
+ api.add_operation(:start_domain_export, Seahorse::Model::Operation.new.tap do |o|
170
+ o.name = "StartDomainExport"
171
+ o.http_method = "POST"
172
+ o.http_request_uri = "/v2/StartDomainExport"
173
+ o.input = Shapes::ShapeRef.new(shape: StartDomainExportRequest)
174
+ o.output = Shapes::ShapeRef.new(shape: StartDomainExportResponse)
175
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterCombinationException)
176
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterValueException)
177
+ o.errors << Shapes::ShapeRef.new(shape: ConflictException)
178
+ o.errors << Shapes::ShapeRef.new(shape: NumberExportsLimitExceeded)
179
+ o.errors << Shapes::ShapeRef.new(shape: NoSuchDomainException)
180
+ end)
181
+ end
182
+
183
+ end
184
+ end
File without changes
@@ -0,0 +1,69 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ module Aws::SimpleDBv2
11
+ # Endpoint parameters used to influence endpoints per request.
12
+ #
13
+ # @!attribute use_dual_stack
14
+ # When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
15
+ #
16
+ # @return [boolean]
17
+ #
18
+ # @!attribute use_fips
19
+ # When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
20
+ #
21
+ # @return [boolean]
22
+ #
23
+ # @!attribute endpoint
24
+ # Override the endpoint used to send this request
25
+ #
26
+ # @return [string]
27
+ #
28
+ # @!attribute region
29
+ # The AWS region used to dispatch the request.
30
+ #
31
+ # @return [string]
32
+ #
33
+ EndpointParameters = Struct.new(
34
+ :use_dual_stack,
35
+ :use_fips,
36
+ :endpoint,
37
+ :region,
38
+ ) do
39
+ include Aws::Structure
40
+
41
+ # @api private
42
+ class << self
43
+ PARAM_MAP = {
44
+ 'UseDualStack' => :use_dual_stack,
45
+ 'UseFIPS' => :use_fips,
46
+ 'Endpoint' => :endpoint,
47
+ 'Region' => :region,
48
+ }.freeze
49
+ end
50
+
51
+ def initialize(options = {})
52
+ self[:use_dual_stack] = options[:use_dual_stack]
53
+ self[:use_dual_stack] = false if self[:use_dual_stack].nil?
54
+ self[:use_fips] = options[:use_fips]
55
+ self[:use_fips] = false if self[:use_fips].nil?
56
+ self[:endpoint] = options[:endpoint]
57
+ self[:region] = options[:region]
58
+ end
59
+
60
+ def self.create(config, options={})
61
+ new({
62
+ use_dual_stack: config.use_dualstack_endpoint,
63
+ use_fips: config.use_fips_endpoint,
64
+ endpoint: (config.endpoint.to_s unless config.regional_endpoint),
65
+ region: config.region,
66
+ }.merge(options))
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ module Aws::SimpleDBv2
11
+ class EndpointProvider
12
+ def resolve_endpoint(parameters)
13
+ if Aws::Endpoints::Matchers.set?(parameters.endpoint)
14
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
15
+ raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
16
+ end
17
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
18
+ raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
19
+ end
20
+ return Aws::Endpoints::Endpoint.new(url: parameters.endpoint, headers: {}, properties: {})
21
+ end
22
+ if Aws::Endpoints::Matchers.set?(parameters.region)
23
+ if (partition_result = Aws::Endpoints::Matchers.aws_partition(parameters.region))
24
+ if Aws::Endpoints::Matchers.string_equals?(parameters.region, "us-east-1") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, false)
25
+ return Aws::Endpoints::Endpoint.new(url: "https://sdb.amazonaws.com", headers: {}, properties: {})
26
+ end
27
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
28
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
29
+ return Aws::Endpoints::Endpoint.new(url: "https://sdb-fips.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
30
+ end
31
+ raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
32
+ end
33
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, false)
34
+ if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"), true)
35
+ return Aws::Endpoints::Endpoint.new(url: "https://sdb-fips.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
36
+ end
37
+ raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
38
+ end
39
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
40
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
41
+ return Aws::Endpoints::Endpoint.new(url: "https://sdb.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
42
+ end
43
+ raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
44
+ end
45
+ return Aws::Endpoints::Endpoint.new(url: "https://sdb.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
46
+ end
47
+ end
48
+ raise ArgumentError, "Invalid Configuration: Missing Region"
49
+ raise ArgumentError, 'No endpoint could be resolved'
50
+
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+
11
+ module Aws::SimpleDBv2
12
+ # @api private
13
+ module Endpoints
14
+
15
+
16
+ def self.parameters_for_operation(context)
17
+ Aws::SimpleDBv2::EndpointParameters.create(context.config)
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,150 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ module Aws::SimpleDBv2
11
+
12
+ # When SimpleDBv2 returns an error response, the Ruby SDK constructs and raises an error.
13
+ # These errors all extend Aws::SimpleDBv2::Errors::ServiceError < {Aws::Errors::ServiceError}
14
+ #
15
+ # You can rescue all SimpleDBv2 errors using ServiceError:
16
+ #
17
+ # begin
18
+ # # do stuff
19
+ # rescue Aws::SimpleDBv2::Errors::ServiceError
20
+ # # rescues all SimpleDBv2 API errors
21
+ # end
22
+ #
23
+ #
24
+ # ## Request Context
25
+ # ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns
26
+ # information about the request that generated the error.
27
+ # See {Seahorse::Client::RequestContext} for more information.
28
+ #
29
+ # ## Error Classes
30
+ # * {ConflictException}
31
+ # * {InvalidNextTokenException}
32
+ # * {InvalidParameterCombinationException}
33
+ # * {InvalidParameterValueException}
34
+ # * {NoSuchDomainException}
35
+ # * {NoSuchExportException}
36
+ # * {NumberExportsLimitExceeded}
37
+ #
38
+ # Additionally, error classes are dynamically generated for service errors based on the error code
39
+ # if they are not defined above.
40
+ module Errors
41
+
42
+ extend Aws::Errors::DynamicErrors
43
+
44
+ class ConflictException < ServiceError
45
+
46
+ # @param [Seahorse::Client::RequestContext] context
47
+ # @param [String] message
48
+ # @param [Aws::SimpleDBv2::Types::ConflictException] data
49
+ def initialize(context, message, data = Aws::EmptyStructure.new)
50
+ super(context, message, data)
51
+ end
52
+
53
+ # @return [String]
54
+ def message
55
+ @message || @data[:message]
56
+ end
57
+ end
58
+
59
+ class InvalidNextTokenException < ServiceError
60
+
61
+ # @param [Seahorse::Client::RequestContext] context
62
+ # @param [String] message
63
+ # @param [Aws::SimpleDBv2::Types::InvalidNextTokenException] data
64
+ def initialize(context, message, data = Aws::EmptyStructure.new)
65
+ super(context, message, data)
66
+ end
67
+
68
+ # @return [String]
69
+ def message
70
+ @message || @data[:message]
71
+ end
72
+ end
73
+
74
+ class InvalidParameterCombinationException < ServiceError
75
+
76
+ # @param [Seahorse::Client::RequestContext] context
77
+ # @param [String] message
78
+ # @param [Aws::SimpleDBv2::Types::InvalidParameterCombinationException] data
79
+ def initialize(context, message, data = Aws::EmptyStructure.new)
80
+ super(context, message, data)
81
+ end
82
+
83
+ # @return [String]
84
+ def message
85
+ @message || @data[:message]
86
+ end
87
+ end
88
+
89
+ class InvalidParameterValueException < ServiceError
90
+
91
+ # @param [Seahorse::Client::RequestContext] context
92
+ # @param [String] message
93
+ # @param [Aws::SimpleDBv2::Types::InvalidParameterValueException] data
94
+ def initialize(context, message, data = Aws::EmptyStructure.new)
95
+ super(context, message, data)
96
+ end
97
+
98
+ # @return [String]
99
+ def message
100
+ @message || @data[:message]
101
+ end
102
+ end
103
+
104
+ class NoSuchDomainException < ServiceError
105
+
106
+ # @param [Seahorse::Client::RequestContext] context
107
+ # @param [String] message
108
+ # @param [Aws::SimpleDBv2::Types::NoSuchDomainException] data
109
+ def initialize(context, message, data = Aws::EmptyStructure.new)
110
+ super(context, message, data)
111
+ end
112
+
113
+ # @return [String]
114
+ def message
115
+ @message || @data[:message]
116
+ end
117
+ end
118
+
119
+ class NoSuchExportException < ServiceError
120
+
121
+ # @param [Seahorse::Client::RequestContext] context
122
+ # @param [String] message
123
+ # @param [Aws::SimpleDBv2::Types::NoSuchExportException] data
124
+ def initialize(context, message, data = Aws::EmptyStructure.new)
125
+ super(context, message, data)
126
+ end
127
+
128
+ # @return [String]
129
+ def message
130
+ @message || @data[:message]
131
+ end
132
+ end
133
+
134
+ class NumberExportsLimitExceeded < ServiceError
135
+
136
+ # @param [Seahorse::Client::RequestContext] context
137
+ # @param [String] message
138
+ # @param [Aws::SimpleDBv2::Types::NumberExportsLimitExceeded] data
139
+ def initialize(context, message, data = Aws::EmptyStructure.new)
140
+ super(context, message, data)
141
+ end
142
+
143
+ # @return [String]
144
+ def message
145
+ @message || @data[:message]
146
+ end
147
+ end
148
+
149
+ end
150
+ end
@@ -0,0 +1,77 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+
11
+ module Aws::SimpleDBv2
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::SimpleDBv2::EndpointProvider',
17
+ rbs_type: 'untyped',
18
+ docstring: <<~DOCS) do |_cfg|
19
+ The endpoint provider used to resolve endpoints. Any object that responds to
20
+ `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
21
+ `Aws::SimpleDBv2::EndpointParameters`.
22
+ DOCS
23
+ Aws::SimpleDBv2::EndpointProvider.new
24
+ end
25
+
26
+ # @api private
27
+ class Handler < Seahorse::Client::Handler
28
+ def call(context)
29
+ unless context[:discovered_endpoint]
30
+ params = Aws::SimpleDBv2::Endpoints.parameters_for_operation(context)
31
+ endpoint = context.config.endpoint_provider.resolve_endpoint(params)
32
+
33
+ context.http_request.endpoint = endpoint.url
34
+ apply_endpoint_headers(context, endpoint.headers)
35
+
36
+ context[:endpoint_params] = params
37
+ context[:endpoint_properties] = endpoint.properties
38
+ end
39
+
40
+ context[:auth_scheme] =
41
+ Aws::Endpoints.resolve_auth_scheme(context, endpoint)
42
+
43
+ with_metrics(context) { @handler.call(context) }
44
+ end
45
+
46
+ private
47
+
48
+ def with_metrics(context, &block)
49
+ metrics = []
50
+ metrics << 'ENDPOINT_OVERRIDE' unless context.config.regional_endpoint
51
+ if context[:auth_scheme] && context[:auth_scheme]['name'] == 'sigv4a'
52
+ metrics << 'SIGV4A_SIGNING'
53
+ end
54
+ if context.config.credentials&.credentials&.account_id
55
+ metrics << 'RESOLVED_ACCOUNT_ID'
56
+ end
57
+ Aws::Plugins::UserAgent.metric(*metrics, &block)
58
+ end
59
+
60
+ def apply_endpoint_headers(context, headers)
61
+ headers.each do |key, values|
62
+ value = values
63
+ .compact
64
+ .map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
65
+ .join(',')
66
+
67
+ context.http_request.headers[key] = value
68
+ end
69
+ end
70
+ end
71
+
72
+ def add_handlers(handlers, _config)
73
+ handlers.add(Handler, step: :build, priority: 75)
74
+ end
75
+ end
76
+ end
77
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ module Aws::SimpleDBv2
11
+
12
+ class Resource
13
+
14
+ # @param options ({})
15
+ # @option options [Client] :client
16
+ def initialize(options = {})
17
+ @client = options[:client] || Client.new(options)
18
+ end
19
+
20
+ # @return [Client]
21
+ def client
22
+ @client
23
+ end
24
+
25
+ end
26
+ end