aws-sdk-marketplacedeployment 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +8 -0
- data/LICENSE.txt +202 -0
- data/VERSION +1 -0
- data/lib/aws-sdk-marketplacedeployment/client.rb +588 -0
- data/lib/aws-sdk-marketplacedeployment/client_api.rb +191 -0
- data/lib/aws-sdk-marketplacedeployment/customizations.rb +0 -0
- data/lib/aws-sdk-marketplacedeployment/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-marketplacedeployment/endpoint_provider.rb +54 -0
- data/lib/aws-sdk-marketplacedeployment/endpoints.rb +72 -0
- data/lib/aws-sdk-marketplacedeployment/errors.rb +172 -0
- data/lib/aws-sdk-marketplacedeployment/plugins/endpoints.rb +77 -0
- data/lib/aws-sdk-marketplacedeployment/resource.rb +26 -0
- data/lib/aws-sdk-marketplacedeployment/types.rb +291 -0
- data/lib/aws-sdk-marketplacedeployment.rb +57 -0
- metadata +94 -0
@@ -0,0 +1,191 @@
|
|
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::MarketplaceDeployment
|
11
|
+
# @api private
|
12
|
+
module ClientApi
|
13
|
+
|
14
|
+
include Seahorse::Model
|
15
|
+
|
16
|
+
AccessDeniedException = Shapes::StructureShape.new(name: 'AccessDeniedException')
|
17
|
+
Catalog = Shapes::StringShape.new(name: 'Catalog')
|
18
|
+
ClientToken = Shapes::StringShape.new(name: 'ClientToken')
|
19
|
+
ConflictException = Shapes::StructureShape.new(name: 'ConflictException')
|
20
|
+
DeploymentParameterInput = Shapes::StructureShape.new(name: 'DeploymentParameterInput')
|
21
|
+
DeploymentParameterName = Shapes::StringShape.new(name: 'DeploymentParameterName')
|
22
|
+
DeploymentParameterResourceIdentifier = Shapes::StringShape.new(name: 'DeploymentParameterResourceIdentifier')
|
23
|
+
InternalServerException = Shapes::StructureShape.new(name: 'InternalServerException')
|
24
|
+
ListTagsForResourceRequest = Shapes::StructureShape.new(name: 'ListTagsForResourceRequest')
|
25
|
+
ListTagsForResourceResponse = Shapes::StructureShape.new(name: 'ListTagsForResourceResponse')
|
26
|
+
PutDeploymentParameterRequest = Shapes::StructureShape.new(name: 'PutDeploymentParameterRequest')
|
27
|
+
PutDeploymentParameterResponse = Shapes::StructureShape.new(name: 'PutDeploymentParameterResponse')
|
28
|
+
ResourceArn = Shapes::StringShape.new(name: 'ResourceArn')
|
29
|
+
ResourceId = Shapes::StringShape.new(name: 'ResourceId')
|
30
|
+
ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
|
31
|
+
SecretString = Shapes::StringShape.new(name: 'SecretString')
|
32
|
+
ServiceQuotaExceededException = Shapes::StructureShape.new(name: 'ServiceQuotaExceededException')
|
33
|
+
String = Shapes::StringShape.new(name: 'String')
|
34
|
+
StringList = Shapes::ListShape.new(name: 'StringList')
|
35
|
+
SyntheticTimestamp_date_time = Shapes::TimestampShape.new(name: 'SyntheticTimestamp_date_time', timestampFormat: "iso8601")
|
36
|
+
TagKey = Shapes::StringShape.new(name: 'TagKey')
|
37
|
+
TagResourceRequest = Shapes::StructureShape.new(name: 'TagResourceRequest')
|
38
|
+
TagResourceResponse = Shapes::StructureShape.new(name: 'TagResourceResponse')
|
39
|
+
TagValue = Shapes::StringShape.new(name: 'TagValue')
|
40
|
+
Tags = Shapes::MapShape.new(name: 'Tags')
|
41
|
+
TagsMap = Shapes::MapShape.new(name: 'TagsMap')
|
42
|
+
ThrottlingException = Shapes::StructureShape.new(name: 'ThrottlingException')
|
43
|
+
UntagResourceRequest = Shapes::StructureShape.new(name: 'UntagResourceRequest')
|
44
|
+
UntagResourceResponse = Shapes::StructureShape.new(name: 'UntagResourceResponse')
|
45
|
+
ValidationException = Shapes::StructureShape.new(name: 'ValidationException')
|
46
|
+
|
47
|
+
AccessDeniedException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
|
48
|
+
AccessDeniedException.struct_class = Types::AccessDeniedException
|
49
|
+
|
50
|
+
ConflictException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
|
51
|
+
ConflictException.add_member(:resource_id, Shapes::ShapeRef.new(shape: ResourceId, required: true, location_name: "resourceId"))
|
52
|
+
ConflictException.struct_class = Types::ConflictException
|
53
|
+
|
54
|
+
DeploymentParameterInput.add_member(:name, Shapes::ShapeRef.new(shape: DeploymentParameterName, required: true, location_name: "name"))
|
55
|
+
DeploymentParameterInput.add_member(:secret_string, Shapes::ShapeRef.new(shape: SecretString, required: true, location_name: "secretString"))
|
56
|
+
DeploymentParameterInput.struct_class = Types::DeploymentParameterInput
|
57
|
+
|
58
|
+
InternalServerException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
|
59
|
+
InternalServerException.struct_class = Types::InternalServerException
|
60
|
+
|
61
|
+
ListTagsForResourceRequest.add_member(:resource_arn, Shapes::ShapeRef.new(shape: String, required: true, location: "uri", location_name: "resourceArn"))
|
62
|
+
ListTagsForResourceRequest.struct_class = Types::ListTagsForResourceRequest
|
63
|
+
|
64
|
+
ListTagsForResourceResponse.add_member(:tags, Shapes::ShapeRef.new(shape: Tags, location_name: "tags"))
|
65
|
+
ListTagsForResourceResponse.struct_class = Types::ListTagsForResourceResponse
|
66
|
+
|
67
|
+
PutDeploymentParameterRequest.add_member(:agreement_id, Shapes::ShapeRef.new(shape: ResourceId, required: true, location_name: "agreementId"))
|
68
|
+
PutDeploymentParameterRequest.add_member(:catalog, Shapes::ShapeRef.new(shape: Catalog, required: true, location: "uri", location_name: "catalog"))
|
69
|
+
PutDeploymentParameterRequest.add_member(:client_token, Shapes::ShapeRef.new(shape: ClientToken, location_name: "clientToken", metadata: {"idempotencyToken"=>true}))
|
70
|
+
PutDeploymentParameterRequest.add_member(:deployment_parameter, Shapes::ShapeRef.new(shape: DeploymentParameterInput, required: true, location_name: "deploymentParameter"))
|
71
|
+
PutDeploymentParameterRequest.add_member(:expiration_date, Shapes::ShapeRef.new(shape: SyntheticTimestamp_date_time, location_name: "expirationDate"))
|
72
|
+
PutDeploymentParameterRequest.add_member(:product_id, Shapes::ShapeRef.new(shape: ResourceId, required: true, location: "uri", location_name: "productId"))
|
73
|
+
PutDeploymentParameterRequest.add_member(:tags, Shapes::ShapeRef.new(shape: TagsMap, location_name: "tags"))
|
74
|
+
PutDeploymentParameterRequest.struct_class = Types::PutDeploymentParameterRequest
|
75
|
+
|
76
|
+
PutDeploymentParameterResponse.add_member(:agreement_id, Shapes::ShapeRef.new(shape: ResourceId, required: true, location_name: "agreementId"))
|
77
|
+
PutDeploymentParameterResponse.add_member(:deployment_parameter_id, Shapes::ShapeRef.new(shape: DeploymentParameterResourceIdentifier, required: true, location_name: "deploymentParameterId"))
|
78
|
+
PutDeploymentParameterResponse.add_member(:resource_arn, Shapes::ShapeRef.new(shape: ResourceArn, required: true, location_name: "resourceArn"))
|
79
|
+
PutDeploymentParameterResponse.add_member(:tags, Shapes::ShapeRef.new(shape: TagsMap, location_name: "tags"))
|
80
|
+
PutDeploymentParameterResponse.struct_class = Types::PutDeploymentParameterResponse
|
81
|
+
|
82
|
+
ResourceNotFoundException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
|
83
|
+
ResourceNotFoundException.struct_class = Types::ResourceNotFoundException
|
84
|
+
|
85
|
+
ServiceQuotaExceededException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
|
86
|
+
ServiceQuotaExceededException.struct_class = Types::ServiceQuotaExceededException
|
87
|
+
|
88
|
+
StringList.member = Shapes::ShapeRef.new(shape: String)
|
89
|
+
|
90
|
+
TagResourceRequest.add_member(:resource_arn, Shapes::ShapeRef.new(shape: String, required: true, location: "uri", location_name: "resourceArn"))
|
91
|
+
TagResourceRequest.add_member(:tags, Shapes::ShapeRef.new(shape: Tags, location_name: "tags"))
|
92
|
+
TagResourceRequest.struct_class = Types::TagResourceRequest
|
93
|
+
|
94
|
+
TagResourceResponse.struct_class = Types::TagResourceResponse
|
95
|
+
|
96
|
+
Tags.key = Shapes::ShapeRef.new(shape: String)
|
97
|
+
Tags.value = Shapes::ShapeRef.new(shape: String)
|
98
|
+
|
99
|
+
TagsMap.key = Shapes::ShapeRef.new(shape: TagKey)
|
100
|
+
TagsMap.value = Shapes::ShapeRef.new(shape: TagValue)
|
101
|
+
|
102
|
+
ThrottlingException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
|
103
|
+
ThrottlingException.struct_class = Types::ThrottlingException
|
104
|
+
|
105
|
+
UntagResourceRequest.add_member(:resource_arn, Shapes::ShapeRef.new(shape: String, required: true, location: "uri", location_name: "resourceArn"))
|
106
|
+
UntagResourceRequest.add_member(:tag_keys, Shapes::ShapeRef.new(shape: StringList, required: true, location: "querystring", location_name: "tagKeys"))
|
107
|
+
UntagResourceRequest.struct_class = Types::UntagResourceRequest
|
108
|
+
|
109
|
+
UntagResourceResponse.struct_class = Types::UntagResourceResponse
|
110
|
+
|
111
|
+
ValidationException.add_member(:field_name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "fieldName"))
|
112
|
+
ValidationException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
|
113
|
+
ValidationException.struct_class = Types::ValidationException
|
114
|
+
|
115
|
+
|
116
|
+
# @api private
|
117
|
+
API = Seahorse::Model::Api.new.tap do |api|
|
118
|
+
|
119
|
+
api.version = "2023-01-25"
|
120
|
+
|
121
|
+
api.metadata = {
|
122
|
+
"apiVersion" => "2023-01-25",
|
123
|
+
"endpointPrefix" => "deployment-marketplace",
|
124
|
+
"jsonVersion" => "1.1",
|
125
|
+
"protocol" => "rest-json",
|
126
|
+
"serviceFullName" => "AWS Marketplace Deployment Service",
|
127
|
+
"serviceId" => "Marketplace Deployment",
|
128
|
+
"signatureVersion" => "v4",
|
129
|
+
"signingName" => "aws-marketplace",
|
130
|
+
"uid" => "marketplace-deployment-2023-01-25",
|
131
|
+
}
|
132
|
+
|
133
|
+
api.add_operation(:list_tags_for_resource, Seahorse::Model::Operation.new.tap do |o|
|
134
|
+
o.name = "ListTagsForResource"
|
135
|
+
o.http_method = "GET"
|
136
|
+
o.http_request_uri = "/tags/{resourceArn}"
|
137
|
+
o.input = Shapes::ShapeRef.new(shape: ListTagsForResourceRequest)
|
138
|
+
o.output = Shapes::ShapeRef.new(shape: ListTagsForResourceResponse)
|
139
|
+
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
140
|
+
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
|
141
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
142
|
+
o.errors << Shapes::ShapeRef.new(shape: ValidationException)
|
143
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
144
|
+
end)
|
145
|
+
|
146
|
+
api.add_operation(:put_deployment_parameter, Seahorse::Model::Operation.new.tap do |o|
|
147
|
+
o.name = "PutDeploymentParameter"
|
148
|
+
o.http_method = "POST"
|
149
|
+
o.http_request_uri = "/catalogs/{catalog}/products/{productId}/deployment-parameters"
|
150
|
+
o.input = Shapes::ShapeRef.new(shape: PutDeploymentParameterRequest)
|
151
|
+
o.output = Shapes::ShapeRef.new(shape: PutDeploymentParameterResponse)
|
152
|
+
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
153
|
+
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
|
154
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
155
|
+
o.errors << Shapes::ShapeRef.new(shape: ServiceQuotaExceededException)
|
156
|
+
o.errors << Shapes::ShapeRef.new(shape: ConflictException)
|
157
|
+
o.errors << Shapes::ShapeRef.new(shape: ValidationException)
|
158
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
159
|
+
end)
|
160
|
+
|
161
|
+
api.add_operation(:tag_resource, Seahorse::Model::Operation.new.tap do |o|
|
162
|
+
o.name = "TagResource"
|
163
|
+
o.http_method = "POST"
|
164
|
+
o.http_request_uri = "/tags/{resourceArn}"
|
165
|
+
o.input = Shapes::ShapeRef.new(shape: TagResourceRequest)
|
166
|
+
o.output = Shapes::ShapeRef.new(shape: TagResourceResponse)
|
167
|
+
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
168
|
+
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
|
169
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
170
|
+
o.errors << Shapes::ShapeRef.new(shape: ConflictException)
|
171
|
+
o.errors << Shapes::ShapeRef.new(shape: ValidationException)
|
172
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
173
|
+
end)
|
174
|
+
|
175
|
+
api.add_operation(:untag_resource, Seahorse::Model::Operation.new.tap do |o|
|
176
|
+
o.name = "UntagResource"
|
177
|
+
o.http_method = "DELETE"
|
178
|
+
o.http_request_uri = "/tags/{resourceArn}"
|
179
|
+
o.input = Shapes::ShapeRef.new(shape: UntagResourceRequest)
|
180
|
+
o.output = Shapes::ShapeRef.new(shape: UntagResourceResponse)
|
181
|
+
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
182
|
+
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
|
183
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
184
|
+
o.errors << Shapes::ShapeRef.new(shape: ConflictException)
|
185
|
+
o.errors << Shapes::ShapeRef.new(shape: ValidationException)
|
186
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
187
|
+
end)
|
188
|
+
end
|
189
|
+
|
190
|
+
end
|
191
|
+
end
|
File without changes
|
@@ -0,0 +1,66 @@
|
|
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::MarketplaceDeployment
|
11
|
+
# Endpoint parameters used to influence endpoints per request.
|
12
|
+
#
|
13
|
+
# @!attribute region
|
14
|
+
# The AWS region used to dispatch the request.
|
15
|
+
#
|
16
|
+
# @return [String]
|
17
|
+
#
|
18
|
+
# @!attribute use_dual_stack
|
19
|
+
# When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
|
20
|
+
#
|
21
|
+
# @return [Boolean]
|
22
|
+
#
|
23
|
+
# @!attribute use_fips
|
24
|
+
# 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.
|
25
|
+
#
|
26
|
+
# @return [Boolean]
|
27
|
+
#
|
28
|
+
# @!attribute endpoint
|
29
|
+
# Override the endpoint used to send this request
|
30
|
+
#
|
31
|
+
# @return [String]
|
32
|
+
#
|
33
|
+
EndpointParameters = Struct.new(
|
34
|
+
:region,
|
35
|
+
:use_dual_stack,
|
36
|
+
:use_fips,
|
37
|
+
:endpoint,
|
38
|
+
) do
|
39
|
+
include Aws::Structure
|
40
|
+
|
41
|
+
# @api private
|
42
|
+
class << self
|
43
|
+
PARAM_MAP = {
|
44
|
+
'Region' => :region,
|
45
|
+
'UseDualStack' => :use_dual_stack,
|
46
|
+
'UseFIPS' => :use_fips,
|
47
|
+
'Endpoint' => :endpoint,
|
48
|
+
}.freeze
|
49
|
+
end
|
50
|
+
|
51
|
+
def initialize(options = {})
|
52
|
+
self[:region] = options[:region]
|
53
|
+
self[:use_dual_stack] = options[:use_dual_stack]
|
54
|
+
self[:use_dual_stack] = false if self[:use_dual_stack].nil?
|
55
|
+
if self[:use_dual_stack].nil?
|
56
|
+
raise ArgumentError, "Missing required EndpointParameter: :use_dual_stack"
|
57
|
+
end
|
58
|
+
self[:use_fips] = options[:use_fips]
|
59
|
+
self[:use_fips] = false if self[:use_fips].nil?
|
60
|
+
if self[:use_fips].nil?
|
61
|
+
raise ArgumentError, "Missing required EndpointParameter: :use_fips"
|
62
|
+
end
|
63
|
+
self[:endpoint] = options[:endpoint]
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,54 @@
|
|
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::MarketplaceDeployment
|
11
|
+
class EndpointProvider
|
12
|
+
def resolve_endpoint(parameters)
|
13
|
+
region = parameters.region
|
14
|
+
use_dual_stack = parameters.use_dual_stack
|
15
|
+
use_fips = parameters.use_fips
|
16
|
+
endpoint = parameters.endpoint
|
17
|
+
if Aws::Endpoints::Matchers.set?(endpoint)
|
18
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
19
|
+
raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
|
20
|
+
end
|
21
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
22
|
+
raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
|
23
|
+
end
|
24
|
+
return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
|
25
|
+
end
|
26
|
+
if Aws::Endpoints::Matchers.set?(region)
|
27
|
+
if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
|
28
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
29
|
+
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"))
|
30
|
+
return Aws::Endpoints::Endpoint.new(url: "https://deployment-marketplace-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
31
|
+
end
|
32
|
+
raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
|
33
|
+
end
|
34
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
35
|
+
if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"), true)
|
36
|
+
return Aws::Endpoints::Endpoint.new(url: "https://deployment-marketplace-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
37
|
+
end
|
38
|
+
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
39
|
+
end
|
40
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
41
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
42
|
+
return Aws::Endpoints::Endpoint.new(url: "https://deployment-marketplace.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
43
|
+
end
|
44
|
+
raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
|
45
|
+
end
|
46
|
+
return Aws::Endpoints::Endpoint.new(url: "https://deployment-marketplace.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
47
|
+
end
|
48
|
+
end
|
49
|
+
raise ArgumentError, "Invalid Configuration: Missing Region"
|
50
|
+
raise ArgumentError, 'No endpoint could be resolved'
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,72 @@
|
|
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::MarketplaceDeployment
|
12
|
+
# @api private
|
13
|
+
module Endpoints
|
14
|
+
|
15
|
+
class ListTagsForResource
|
16
|
+
def self.build(context)
|
17
|
+
unless context.config.regional_endpoint
|
18
|
+
endpoint = context.config.endpoint.to_s
|
19
|
+
end
|
20
|
+
Aws::MarketplaceDeployment::EndpointParameters.new(
|
21
|
+
region: context.config.region,
|
22
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
23
|
+
use_fips: context.config.use_fips_endpoint,
|
24
|
+
endpoint: endpoint,
|
25
|
+
)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
class PutDeploymentParameter
|
30
|
+
def self.build(context)
|
31
|
+
unless context.config.regional_endpoint
|
32
|
+
endpoint = context.config.endpoint.to_s
|
33
|
+
end
|
34
|
+
Aws::MarketplaceDeployment::EndpointParameters.new(
|
35
|
+
region: context.config.region,
|
36
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
37
|
+
use_fips: context.config.use_fips_endpoint,
|
38
|
+
endpoint: endpoint,
|
39
|
+
)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
class TagResource
|
44
|
+
def self.build(context)
|
45
|
+
unless context.config.regional_endpoint
|
46
|
+
endpoint = context.config.endpoint.to_s
|
47
|
+
end
|
48
|
+
Aws::MarketplaceDeployment::EndpointParameters.new(
|
49
|
+
region: context.config.region,
|
50
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
51
|
+
use_fips: context.config.use_fips_endpoint,
|
52
|
+
endpoint: endpoint,
|
53
|
+
)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
class UntagResource
|
58
|
+
def self.build(context)
|
59
|
+
unless context.config.regional_endpoint
|
60
|
+
endpoint = context.config.endpoint.to_s
|
61
|
+
end
|
62
|
+
Aws::MarketplaceDeployment::EndpointParameters.new(
|
63
|
+
region: context.config.region,
|
64
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
65
|
+
use_fips: context.config.use_fips_endpoint,
|
66
|
+
endpoint: endpoint,
|
67
|
+
)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,172 @@
|
|
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::MarketplaceDeployment
|
11
|
+
|
12
|
+
# When MarketplaceDeployment returns an error response, the Ruby SDK constructs and raises an error.
|
13
|
+
# These errors all extend Aws::MarketplaceDeployment::Errors::ServiceError < {Aws::Errors::ServiceError}
|
14
|
+
#
|
15
|
+
# You can rescue all MarketplaceDeployment errors using ServiceError:
|
16
|
+
#
|
17
|
+
# begin
|
18
|
+
# # do stuff
|
19
|
+
# rescue Aws::MarketplaceDeployment::Errors::ServiceError
|
20
|
+
# # rescues all MarketplaceDeployment 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
|
+
# * {AccessDeniedException}
|
31
|
+
# * {ConflictException}
|
32
|
+
# * {InternalServerException}
|
33
|
+
# * {ResourceNotFoundException}
|
34
|
+
# * {ServiceQuotaExceededException}
|
35
|
+
# * {ThrottlingException}
|
36
|
+
# * {ValidationException}
|
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 AccessDeniedException < ServiceError
|
45
|
+
|
46
|
+
# @param [Seahorse::Client::RequestContext] context
|
47
|
+
# @param [String] message
|
48
|
+
# @param [Aws::MarketplaceDeployment::Types::AccessDeniedException] 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 ConflictException < ServiceError
|
60
|
+
|
61
|
+
# @param [Seahorse::Client::RequestContext] context
|
62
|
+
# @param [String] message
|
63
|
+
# @param [Aws::MarketplaceDeployment::Types::ConflictException] 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
|
+
|
73
|
+
# @return [String]
|
74
|
+
def resource_id
|
75
|
+
@data[:resource_id]
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
class InternalServerException < ServiceError
|
80
|
+
|
81
|
+
# @param [Seahorse::Client::RequestContext] context
|
82
|
+
# @param [String] message
|
83
|
+
# @param [Aws::MarketplaceDeployment::Types::InternalServerException] data
|
84
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
85
|
+
super(context, message, data)
|
86
|
+
end
|
87
|
+
|
88
|
+
# @return [String]
|
89
|
+
def message
|
90
|
+
@message || @data[:message]
|
91
|
+
end
|
92
|
+
|
93
|
+
def retryable?
|
94
|
+
true
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
class ResourceNotFoundException < ServiceError
|
99
|
+
|
100
|
+
# @param [Seahorse::Client::RequestContext] context
|
101
|
+
# @param [String] message
|
102
|
+
# @param [Aws::MarketplaceDeployment::Types::ResourceNotFoundException] data
|
103
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
104
|
+
super(context, message, data)
|
105
|
+
end
|
106
|
+
|
107
|
+
# @return [String]
|
108
|
+
def message
|
109
|
+
@message || @data[:message]
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
class ServiceQuotaExceededException < ServiceError
|
114
|
+
|
115
|
+
# @param [Seahorse::Client::RequestContext] context
|
116
|
+
# @param [String] message
|
117
|
+
# @param [Aws::MarketplaceDeployment::Types::ServiceQuotaExceededException] data
|
118
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
119
|
+
super(context, message, data)
|
120
|
+
end
|
121
|
+
|
122
|
+
# @return [String]
|
123
|
+
def message
|
124
|
+
@message || @data[:message]
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
class ThrottlingException < ServiceError
|
129
|
+
|
130
|
+
# @param [Seahorse::Client::RequestContext] context
|
131
|
+
# @param [String] message
|
132
|
+
# @param [Aws::MarketplaceDeployment::Types::ThrottlingException] data
|
133
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
134
|
+
super(context, message, data)
|
135
|
+
end
|
136
|
+
|
137
|
+
# @return [String]
|
138
|
+
def message
|
139
|
+
@message || @data[:message]
|
140
|
+
end
|
141
|
+
|
142
|
+
def retryable?
|
143
|
+
true
|
144
|
+
end
|
145
|
+
|
146
|
+
def throttling?
|
147
|
+
true
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
151
|
+
class ValidationException < ServiceError
|
152
|
+
|
153
|
+
# @param [Seahorse::Client::RequestContext] context
|
154
|
+
# @param [String] message
|
155
|
+
# @param [Aws::MarketplaceDeployment::Types::ValidationException] data
|
156
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
157
|
+
super(context, message, data)
|
158
|
+
end
|
159
|
+
|
160
|
+
# @return [String]
|
161
|
+
def field_name
|
162
|
+
@data[:field_name]
|
163
|
+
end
|
164
|
+
|
165
|
+
# @return [String]
|
166
|
+
def message
|
167
|
+
@message || @data[:message]
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
end
|
172
|
+
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::MarketplaceDeployment
|
12
|
+
module Plugins
|
13
|
+
class Endpoints < Seahorse::Client::Plugin
|
14
|
+
option(
|
15
|
+
:endpoint_provider,
|
16
|
+
doc_type: 'Aws::MarketplaceDeployment::EndpointProvider',
|
17
|
+
docstring: 'The endpoint provider used to resolve endpoints. Any '\
|
18
|
+
'object that responds to `#resolve_endpoint(parameters)` '\
|
19
|
+
'where `parameters` is a Struct similar to '\
|
20
|
+
'`Aws::MarketplaceDeployment::EndpointParameters`'
|
21
|
+
) do |cfg|
|
22
|
+
Aws::MarketplaceDeployment::EndpointProvider.new
|
23
|
+
end
|
24
|
+
|
25
|
+
# @api private
|
26
|
+
class Handler < Seahorse::Client::Handler
|
27
|
+
def call(context)
|
28
|
+
unless context[:discovered_endpoint]
|
29
|
+
params = parameters_for_operation(context)
|
30
|
+
endpoint = context.config.endpoint_provider.resolve_endpoint(params)
|
31
|
+
|
32
|
+
context.http_request.endpoint = endpoint.url
|
33
|
+
apply_endpoint_headers(context, endpoint.headers)
|
34
|
+
|
35
|
+
context[:endpoint_params] = params
|
36
|
+
context[:endpoint_properties] = endpoint.properties
|
37
|
+
end
|
38
|
+
|
39
|
+
context[:auth_scheme] =
|
40
|
+
Aws::Endpoints.resolve_auth_scheme(context, endpoint)
|
41
|
+
|
42
|
+
@handler.call(context)
|
43
|
+
end
|
44
|
+
|
45
|
+
private
|
46
|
+
|
47
|
+
def apply_endpoint_headers(context, headers)
|
48
|
+
headers.each do |key, values|
|
49
|
+
value = values
|
50
|
+
.compact
|
51
|
+
.map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
|
52
|
+
.join(',')
|
53
|
+
|
54
|
+
context.http_request.headers[key] = value
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
def parameters_for_operation(context)
|
59
|
+
case context.operation_name
|
60
|
+
when :list_tags_for_resource
|
61
|
+
Aws::MarketplaceDeployment::Endpoints::ListTagsForResource.build(context)
|
62
|
+
when :put_deployment_parameter
|
63
|
+
Aws::MarketplaceDeployment::Endpoints::PutDeploymentParameter.build(context)
|
64
|
+
when :tag_resource
|
65
|
+
Aws::MarketplaceDeployment::Endpoints::TagResource.build(context)
|
66
|
+
when :untag_resource
|
67
|
+
Aws::MarketplaceDeployment::Endpoints::UntagResource.build(context)
|
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::MarketplaceDeployment
|
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
|