aws-sdk-controlcatalog 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-controlcatalog/client.rb +592 -0
- data/lib/aws-sdk-controlcatalog/client_api.rb +216 -0
- data/lib/aws-sdk-controlcatalog/customizations.rb +0 -0
- data/lib/aws-sdk-controlcatalog/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-controlcatalog/endpoint_provider.rb +54 -0
- data/lib/aws-sdk-controlcatalog/endpoints.rb +58 -0
- data/lib/aws-sdk-controlcatalog/errors.rb +114 -0
- data/lib/aws-sdk-controlcatalog/plugins/endpoints.rb +76 -0
- data/lib/aws-sdk-controlcatalog/resource.rb +26 -0
- data/lib/aws-sdk-controlcatalog/types.rb +408 -0
- data/lib/aws-sdk-controlcatalog.rb +57 -0
- data/sig/client.rbs +127 -0
- data/sig/errors.rbs +28 -0
- data/sig/resource.rbs +79 -0
- data/sig/types.rbs +131 -0
- data/sig/waiters.rbs +13 -0
- metadata +99 -0
@@ -0,0 +1,216 @@
|
|
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::ControlCatalog
|
11
|
+
# @api private
|
12
|
+
module ClientApi
|
13
|
+
|
14
|
+
include Seahorse::Model
|
15
|
+
|
16
|
+
AccessDeniedException = Shapes::StructureShape.new(name: 'AccessDeniedException')
|
17
|
+
AssociatedDomainSummary = Shapes::StructureShape.new(name: 'AssociatedDomainSummary')
|
18
|
+
AssociatedObjectiveSummary = Shapes::StructureShape.new(name: 'AssociatedObjectiveSummary')
|
19
|
+
CommonControlArn = Shapes::StringShape.new(name: 'CommonControlArn')
|
20
|
+
CommonControlFilter = Shapes::StructureShape.new(name: 'CommonControlFilter')
|
21
|
+
CommonControlSummary = Shapes::StructureShape.new(name: 'CommonControlSummary')
|
22
|
+
CommonControlSummaryList = Shapes::ListShape.new(name: 'CommonControlSummaryList')
|
23
|
+
DomainArn = Shapes::StringShape.new(name: 'DomainArn')
|
24
|
+
DomainResourceFilter = Shapes::StructureShape.new(name: 'DomainResourceFilter')
|
25
|
+
DomainResourceFilterList = Shapes::ListShape.new(name: 'DomainResourceFilterList')
|
26
|
+
DomainSummary = Shapes::StructureShape.new(name: 'DomainSummary')
|
27
|
+
DomainSummaryList = Shapes::ListShape.new(name: 'DomainSummaryList')
|
28
|
+
InternalServerException = Shapes::StructureShape.new(name: 'InternalServerException')
|
29
|
+
ListCommonControlsRequest = Shapes::StructureShape.new(name: 'ListCommonControlsRequest')
|
30
|
+
ListCommonControlsResponse = Shapes::StructureShape.new(name: 'ListCommonControlsResponse')
|
31
|
+
ListDomainsRequest = Shapes::StructureShape.new(name: 'ListDomainsRequest')
|
32
|
+
ListDomainsResponse = Shapes::StructureShape.new(name: 'ListDomainsResponse')
|
33
|
+
ListObjectivesRequest = Shapes::StructureShape.new(name: 'ListObjectivesRequest')
|
34
|
+
ListObjectivesResponse = Shapes::StructureShape.new(name: 'ListObjectivesResponse')
|
35
|
+
MaxListCommonControlsResults = Shapes::IntegerShape.new(name: 'MaxListCommonControlsResults')
|
36
|
+
MaxListDomainsResults = Shapes::IntegerShape.new(name: 'MaxListDomainsResults')
|
37
|
+
MaxListObjectivesResults = Shapes::IntegerShape.new(name: 'MaxListObjectivesResults')
|
38
|
+
ObjectiveArn = Shapes::StringShape.new(name: 'ObjectiveArn')
|
39
|
+
ObjectiveFilter = Shapes::StructureShape.new(name: 'ObjectiveFilter')
|
40
|
+
ObjectiveResourceFilter = Shapes::StructureShape.new(name: 'ObjectiveResourceFilter')
|
41
|
+
ObjectiveResourceFilterList = Shapes::ListShape.new(name: 'ObjectiveResourceFilterList')
|
42
|
+
ObjectiveSummary = Shapes::StructureShape.new(name: 'ObjectiveSummary')
|
43
|
+
ObjectiveSummaryList = Shapes::ListShape.new(name: 'ObjectiveSummaryList')
|
44
|
+
PaginationToken = Shapes::StringShape.new(name: 'PaginationToken')
|
45
|
+
String = Shapes::StringShape.new(name: 'String')
|
46
|
+
ThrottlingException = Shapes::StructureShape.new(name: 'ThrottlingException')
|
47
|
+
Timestamp = Shapes::TimestampShape.new(name: 'Timestamp')
|
48
|
+
ValidationException = Shapes::StructureShape.new(name: 'ValidationException')
|
49
|
+
|
50
|
+
AccessDeniedException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
51
|
+
AccessDeniedException.struct_class = Types::AccessDeniedException
|
52
|
+
|
53
|
+
AssociatedDomainSummary.add_member(:arn, Shapes::ShapeRef.new(shape: DomainArn, location_name: "Arn"))
|
54
|
+
AssociatedDomainSummary.add_member(:name, Shapes::ShapeRef.new(shape: String, location_name: "Name"))
|
55
|
+
AssociatedDomainSummary.struct_class = Types::AssociatedDomainSummary
|
56
|
+
|
57
|
+
AssociatedObjectiveSummary.add_member(:arn, Shapes::ShapeRef.new(shape: ObjectiveArn, location_name: "Arn"))
|
58
|
+
AssociatedObjectiveSummary.add_member(:name, Shapes::ShapeRef.new(shape: String, location_name: "Name"))
|
59
|
+
AssociatedObjectiveSummary.struct_class = Types::AssociatedObjectiveSummary
|
60
|
+
|
61
|
+
CommonControlFilter.add_member(:objectives, Shapes::ShapeRef.new(shape: ObjectiveResourceFilterList, location_name: "Objectives"))
|
62
|
+
CommonControlFilter.struct_class = Types::CommonControlFilter
|
63
|
+
|
64
|
+
CommonControlSummary.add_member(:arn, Shapes::ShapeRef.new(shape: CommonControlArn, required: true, location_name: "Arn"))
|
65
|
+
CommonControlSummary.add_member(:create_time, Shapes::ShapeRef.new(shape: Timestamp, required: true, location_name: "CreateTime"))
|
66
|
+
CommonControlSummary.add_member(:description, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Description"))
|
67
|
+
CommonControlSummary.add_member(:domain, Shapes::ShapeRef.new(shape: AssociatedDomainSummary, required: true, location_name: "Domain"))
|
68
|
+
CommonControlSummary.add_member(:last_update_time, Shapes::ShapeRef.new(shape: Timestamp, required: true, location_name: "LastUpdateTime"))
|
69
|
+
CommonControlSummary.add_member(:name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Name"))
|
70
|
+
CommonControlSummary.add_member(:objective, Shapes::ShapeRef.new(shape: AssociatedObjectiveSummary, required: true, location_name: "Objective"))
|
71
|
+
CommonControlSummary.struct_class = Types::CommonControlSummary
|
72
|
+
|
73
|
+
CommonControlSummaryList.member = Shapes::ShapeRef.new(shape: CommonControlSummary)
|
74
|
+
|
75
|
+
DomainResourceFilter.add_member(:arn, Shapes::ShapeRef.new(shape: DomainArn, location_name: "Arn"))
|
76
|
+
DomainResourceFilter.struct_class = Types::DomainResourceFilter
|
77
|
+
|
78
|
+
DomainResourceFilterList.member = Shapes::ShapeRef.new(shape: DomainResourceFilter)
|
79
|
+
|
80
|
+
DomainSummary.add_member(:arn, Shapes::ShapeRef.new(shape: DomainArn, required: true, location_name: "Arn"))
|
81
|
+
DomainSummary.add_member(:create_time, Shapes::ShapeRef.new(shape: Timestamp, required: true, location_name: "CreateTime"))
|
82
|
+
DomainSummary.add_member(:description, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Description"))
|
83
|
+
DomainSummary.add_member(:last_update_time, Shapes::ShapeRef.new(shape: Timestamp, required: true, location_name: "LastUpdateTime"))
|
84
|
+
DomainSummary.add_member(:name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Name"))
|
85
|
+
DomainSummary.struct_class = Types::DomainSummary
|
86
|
+
|
87
|
+
DomainSummaryList.member = Shapes::ShapeRef.new(shape: DomainSummary)
|
88
|
+
|
89
|
+
InternalServerException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
90
|
+
InternalServerException.struct_class = Types::InternalServerException
|
91
|
+
|
92
|
+
ListCommonControlsRequest.add_member(:common_control_filter, Shapes::ShapeRef.new(shape: CommonControlFilter, location_name: "CommonControlFilter"))
|
93
|
+
ListCommonControlsRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxListCommonControlsResults, location: "querystring", location_name: "maxResults"))
|
94
|
+
ListCommonControlsRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: PaginationToken, location: "querystring", location_name: "nextToken"))
|
95
|
+
ListCommonControlsRequest.struct_class = Types::ListCommonControlsRequest
|
96
|
+
|
97
|
+
ListCommonControlsResponse.add_member(:common_controls, Shapes::ShapeRef.new(shape: CommonControlSummaryList, required: true, location_name: "CommonControls"))
|
98
|
+
ListCommonControlsResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: PaginationToken, location_name: "NextToken"))
|
99
|
+
ListCommonControlsResponse.struct_class = Types::ListCommonControlsResponse
|
100
|
+
|
101
|
+
ListDomainsRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxListDomainsResults, location: "querystring", location_name: "maxResults"))
|
102
|
+
ListDomainsRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: PaginationToken, location: "querystring", location_name: "nextToken"))
|
103
|
+
ListDomainsRequest.struct_class = Types::ListDomainsRequest
|
104
|
+
|
105
|
+
ListDomainsResponse.add_member(:domains, Shapes::ShapeRef.new(shape: DomainSummaryList, required: true, location_name: "Domains"))
|
106
|
+
ListDomainsResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: PaginationToken, location_name: "NextToken"))
|
107
|
+
ListDomainsResponse.struct_class = Types::ListDomainsResponse
|
108
|
+
|
109
|
+
ListObjectivesRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxListObjectivesResults, location: "querystring", location_name: "maxResults"))
|
110
|
+
ListObjectivesRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: PaginationToken, location: "querystring", location_name: "nextToken"))
|
111
|
+
ListObjectivesRequest.add_member(:objective_filter, Shapes::ShapeRef.new(shape: ObjectiveFilter, location_name: "ObjectiveFilter"))
|
112
|
+
ListObjectivesRequest.struct_class = Types::ListObjectivesRequest
|
113
|
+
|
114
|
+
ListObjectivesResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: PaginationToken, location_name: "NextToken"))
|
115
|
+
ListObjectivesResponse.add_member(:objectives, Shapes::ShapeRef.new(shape: ObjectiveSummaryList, required: true, location_name: "Objectives"))
|
116
|
+
ListObjectivesResponse.struct_class = Types::ListObjectivesResponse
|
117
|
+
|
118
|
+
ObjectiveFilter.add_member(:domains, Shapes::ShapeRef.new(shape: DomainResourceFilterList, location_name: "Domains"))
|
119
|
+
ObjectiveFilter.struct_class = Types::ObjectiveFilter
|
120
|
+
|
121
|
+
ObjectiveResourceFilter.add_member(:arn, Shapes::ShapeRef.new(shape: ObjectiveArn, location_name: "Arn"))
|
122
|
+
ObjectiveResourceFilter.struct_class = Types::ObjectiveResourceFilter
|
123
|
+
|
124
|
+
ObjectiveResourceFilterList.member = Shapes::ShapeRef.new(shape: ObjectiveResourceFilter)
|
125
|
+
|
126
|
+
ObjectiveSummary.add_member(:arn, Shapes::ShapeRef.new(shape: ObjectiveArn, required: true, location_name: "Arn"))
|
127
|
+
ObjectiveSummary.add_member(:create_time, Shapes::ShapeRef.new(shape: Timestamp, required: true, location_name: "CreateTime"))
|
128
|
+
ObjectiveSummary.add_member(:description, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Description"))
|
129
|
+
ObjectiveSummary.add_member(:domain, Shapes::ShapeRef.new(shape: AssociatedDomainSummary, required: true, location_name: "Domain"))
|
130
|
+
ObjectiveSummary.add_member(:last_update_time, Shapes::ShapeRef.new(shape: Timestamp, required: true, location_name: "LastUpdateTime"))
|
131
|
+
ObjectiveSummary.add_member(:name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Name"))
|
132
|
+
ObjectiveSummary.struct_class = Types::ObjectiveSummary
|
133
|
+
|
134
|
+
ObjectiveSummaryList.member = Shapes::ShapeRef.new(shape: ObjectiveSummary)
|
135
|
+
|
136
|
+
ThrottlingException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
137
|
+
ThrottlingException.struct_class = Types::ThrottlingException
|
138
|
+
|
139
|
+
ValidationException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
140
|
+
ValidationException.struct_class = Types::ValidationException
|
141
|
+
|
142
|
+
|
143
|
+
# @api private
|
144
|
+
API = Seahorse::Model::Api.new.tap do |api|
|
145
|
+
|
146
|
+
api.version = "2018-05-10"
|
147
|
+
|
148
|
+
api.metadata = {
|
149
|
+
"apiVersion" => "2018-05-10",
|
150
|
+
"endpointPrefix" => "controlcatalog",
|
151
|
+
"jsonVersion" => "1.1",
|
152
|
+
"protocol" => "rest-json",
|
153
|
+
"serviceFullName" => "AWS Control Catalog",
|
154
|
+
"serviceId" => "ControlCatalog",
|
155
|
+
"signatureVersion" => "v4",
|
156
|
+
"signingName" => "controlcatalog",
|
157
|
+
"uid" => "controlcatalog-2018-05-10",
|
158
|
+
}
|
159
|
+
|
160
|
+
api.add_operation(:list_common_controls, Seahorse::Model::Operation.new.tap do |o|
|
161
|
+
o.name = "ListCommonControls"
|
162
|
+
o.http_method = "POST"
|
163
|
+
o.http_request_uri = "/common-controls"
|
164
|
+
o.input = Shapes::ShapeRef.new(shape: ListCommonControlsRequest)
|
165
|
+
o.output = Shapes::ShapeRef.new(shape: ListCommonControlsResponse)
|
166
|
+
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
|
167
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
168
|
+
o.errors << Shapes::ShapeRef.new(shape: ValidationException)
|
169
|
+
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
170
|
+
o[:pager] = Aws::Pager.new(
|
171
|
+
limit_key: "max_results",
|
172
|
+
tokens: {
|
173
|
+
"next_token" => "next_token"
|
174
|
+
}
|
175
|
+
)
|
176
|
+
end)
|
177
|
+
|
178
|
+
api.add_operation(:list_domains, Seahorse::Model::Operation.new.tap do |o|
|
179
|
+
o.name = "ListDomains"
|
180
|
+
o.http_method = "POST"
|
181
|
+
o.http_request_uri = "/domains"
|
182
|
+
o.input = Shapes::ShapeRef.new(shape: ListDomainsRequest)
|
183
|
+
o.output = Shapes::ShapeRef.new(shape: ListDomainsResponse)
|
184
|
+
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
|
185
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
186
|
+
o.errors << Shapes::ShapeRef.new(shape: ValidationException)
|
187
|
+
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
188
|
+
o[:pager] = Aws::Pager.new(
|
189
|
+
limit_key: "max_results",
|
190
|
+
tokens: {
|
191
|
+
"next_token" => "next_token"
|
192
|
+
}
|
193
|
+
)
|
194
|
+
end)
|
195
|
+
|
196
|
+
api.add_operation(:list_objectives, Seahorse::Model::Operation.new.tap do |o|
|
197
|
+
o.name = "ListObjectives"
|
198
|
+
o.http_method = "POST"
|
199
|
+
o.http_request_uri = "/objectives"
|
200
|
+
o.input = Shapes::ShapeRef.new(shape: ListObjectivesRequest)
|
201
|
+
o.output = Shapes::ShapeRef.new(shape: ListObjectivesResponse)
|
202
|
+
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
|
203
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
204
|
+
o.errors << Shapes::ShapeRef.new(shape: ValidationException)
|
205
|
+
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
206
|
+
o[:pager] = Aws::Pager.new(
|
207
|
+
limit_key: "max_results",
|
208
|
+
tokens: {
|
209
|
+
"next_token" => "next_token"
|
210
|
+
}
|
211
|
+
)
|
212
|
+
end)
|
213
|
+
end
|
214
|
+
|
215
|
+
end
|
216
|
+
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::ControlCatalog
|
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::ControlCatalog
|
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://controlcatalog-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://controlcatalog-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://controlcatalog.#{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://controlcatalog.#{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,58 @@
|
|
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::ControlCatalog
|
12
|
+
# @api private
|
13
|
+
module Endpoints
|
14
|
+
|
15
|
+
class ListCommonControls
|
16
|
+
def self.build(context)
|
17
|
+
unless context.config.regional_endpoint
|
18
|
+
endpoint = context.config.endpoint.to_s
|
19
|
+
end
|
20
|
+
Aws::ControlCatalog::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 ListDomains
|
30
|
+
def self.build(context)
|
31
|
+
unless context.config.regional_endpoint
|
32
|
+
endpoint = context.config.endpoint.to_s
|
33
|
+
end
|
34
|
+
Aws::ControlCatalog::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 ListObjectives
|
44
|
+
def self.build(context)
|
45
|
+
unless context.config.regional_endpoint
|
46
|
+
endpoint = context.config.endpoint.to_s
|
47
|
+
end
|
48
|
+
Aws::ControlCatalog::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
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,114 @@
|
|
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::ControlCatalog
|
11
|
+
|
12
|
+
# When ControlCatalog returns an error response, the Ruby SDK constructs and raises an error.
|
13
|
+
# These errors all extend Aws::ControlCatalog::Errors::ServiceError < {Aws::Errors::ServiceError}
|
14
|
+
#
|
15
|
+
# You can rescue all ControlCatalog errors using ServiceError:
|
16
|
+
#
|
17
|
+
# begin
|
18
|
+
# # do stuff
|
19
|
+
# rescue Aws::ControlCatalog::Errors::ServiceError
|
20
|
+
# # rescues all ControlCatalog 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
|
+
# * {InternalServerException}
|
32
|
+
# * {ThrottlingException}
|
33
|
+
# * {ValidationException}
|
34
|
+
#
|
35
|
+
# Additionally, error classes are dynamically generated for service errors based on the error code
|
36
|
+
# if they are not defined above.
|
37
|
+
module Errors
|
38
|
+
|
39
|
+
extend Aws::Errors::DynamicErrors
|
40
|
+
|
41
|
+
class AccessDeniedException < ServiceError
|
42
|
+
|
43
|
+
# @param [Seahorse::Client::RequestContext] context
|
44
|
+
# @param [String] message
|
45
|
+
# @param [Aws::ControlCatalog::Types::AccessDeniedException] data
|
46
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
47
|
+
super(context, message, data)
|
48
|
+
end
|
49
|
+
|
50
|
+
# @return [String]
|
51
|
+
def message
|
52
|
+
@message || @data[:message]
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
class InternalServerException < ServiceError
|
57
|
+
|
58
|
+
# @param [Seahorse::Client::RequestContext] context
|
59
|
+
# @param [String] message
|
60
|
+
# @param [Aws::ControlCatalog::Types::InternalServerException] data
|
61
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
62
|
+
super(context, message, data)
|
63
|
+
end
|
64
|
+
|
65
|
+
# @return [String]
|
66
|
+
def message
|
67
|
+
@message || @data[:message]
|
68
|
+
end
|
69
|
+
|
70
|
+
def retryable?
|
71
|
+
true
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
class ThrottlingException < ServiceError
|
76
|
+
|
77
|
+
# @param [Seahorse::Client::RequestContext] context
|
78
|
+
# @param [String] message
|
79
|
+
# @param [Aws::ControlCatalog::Types::ThrottlingException] data
|
80
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
81
|
+
super(context, message, data)
|
82
|
+
end
|
83
|
+
|
84
|
+
# @return [String]
|
85
|
+
def message
|
86
|
+
@message || @data[:message]
|
87
|
+
end
|
88
|
+
|
89
|
+
def retryable?
|
90
|
+
true
|
91
|
+
end
|
92
|
+
|
93
|
+
def throttling?
|
94
|
+
true
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
class ValidationException < ServiceError
|
99
|
+
|
100
|
+
# @param [Seahorse::Client::RequestContext] context
|
101
|
+
# @param [String] message
|
102
|
+
# @param [Aws::ControlCatalog::Types::ValidationException] 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
|
+
end
|
114
|
+
end
|
@@ -0,0 +1,76 @@
|
|
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::ControlCatalog
|
12
|
+
module Plugins
|
13
|
+
class Endpoints < Seahorse::Client::Plugin
|
14
|
+
option(
|
15
|
+
:endpoint_provider,
|
16
|
+
doc_type: 'Aws::ControlCatalog::EndpointProvider',
|
17
|
+
rbs_type: 'untyped',
|
18
|
+
docstring: 'The endpoint provider used to resolve endpoints. Any '\
|
19
|
+
'object that responds to `#resolve_endpoint(parameters)` '\
|
20
|
+
'where `parameters` is a Struct similar to '\
|
21
|
+
'`Aws::ControlCatalog::EndpointParameters`'
|
22
|
+
) do |cfg|
|
23
|
+
Aws::ControlCatalog::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 = 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
|
+
@handler.call(context)
|
44
|
+
end
|
45
|
+
|
46
|
+
private
|
47
|
+
|
48
|
+
def apply_endpoint_headers(context, headers)
|
49
|
+
headers.each do |key, values|
|
50
|
+
value = values
|
51
|
+
.compact
|
52
|
+
.map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
|
53
|
+
.join(',')
|
54
|
+
|
55
|
+
context.http_request.headers[key] = value
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
def parameters_for_operation(context)
|
60
|
+
case context.operation_name
|
61
|
+
when :list_common_controls
|
62
|
+
Aws::ControlCatalog::Endpoints::ListCommonControls.build(context)
|
63
|
+
when :list_domains
|
64
|
+
Aws::ControlCatalog::Endpoints::ListDomains.build(context)
|
65
|
+
when :list_objectives
|
66
|
+
Aws::ControlCatalog::Endpoints::ListObjectives.build(context)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
def add_handlers(handlers, _config)
|
72
|
+
handlers.add(Handler, step: :build, priority: 75)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
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::ControlCatalog
|
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
|