aws-sdk-ram 1.42.0 → 1.44.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-ram/client.rb +1025 -87
- data/lib/aws-sdk-ram/client_api.rb +338 -2
- data/lib/aws-sdk-ram/endpoint_parameters.rb +0 -3
- data/lib/aws-sdk-ram/endpoint_provider.rb +29 -32
- data/lib/aws-sdk-ram/endpoints.rb +126 -0
- data/lib/aws-sdk-ram/errors.rb +96 -0
- data/lib/aws-sdk-ram/plugins/endpoints.rb +18 -0
- data/lib/aws-sdk-ram/types.rb +1428 -173
- data/lib/aws-sdk-ram.rb +1 -1
- metadata +4 -4
@@ -14,45 +14,42 @@ module Aws::RAM
|
|
14
14
|
use_dual_stack = parameters.use_dual_stack
|
15
15
|
use_fips = parameters.use_fips
|
16
16
|
endpoint = parameters.endpoint
|
17
|
-
if
|
18
|
-
if Aws::Endpoints::Matchers.
|
19
|
-
|
20
|
-
raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
|
21
|
-
end
|
22
|
-
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
23
|
-
raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
|
24
|
-
end
|
25
|
-
return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
|
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"
|
26
20
|
end
|
27
|
-
if Aws::Endpoints::Matchers.boolean_equals?(
|
28
|
-
|
29
|
-
return Aws::Endpoints::Endpoint.new(url: "https://ram-fips.#{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"
|
21
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
22
|
+
raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
|
32
23
|
end
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
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://ram-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
37
31
|
end
|
38
|
-
|
32
|
+
raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
|
39
33
|
end
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
34
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
35
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
|
36
|
+
if Aws::Endpoints::Matchers.string_equals?("aws-us-gov", Aws::Endpoints::Matchers.attr(partition_result, "name"))
|
37
|
+
return Aws::Endpoints::Endpoint.new(url: "https://ram.#{region}.amazonaws.com", headers: {}, properties: {})
|
38
|
+
end
|
39
|
+
return Aws::Endpoints::Endpoint.new(url: "https://ram-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
40
|
+
end
|
41
|
+
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
45
42
|
end
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
return Aws::Endpoints::Endpoint.new(url: "https://ram
|
43
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
44
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
45
|
+
return Aws::Endpoints::Endpoint.new(url: "https://ram.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
46
|
+
end
|
47
|
+
raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
|
48
|
+
end
|
49
|
+
return Aws::Endpoints::Endpoint.new(url: "https://ram.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
53
50
|
end
|
54
|
-
return Aws::Endpoints::Endpoint.new(url: "https://ram.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
55
51
|
end
|
52
|
+
raise ArgumentError, "Invalid Configuration: Missing Region"
|
56
53
|
raise ArgumentError, 'No endpoint could be resolved'
|
57
54
|
|
58
55
|
end
|
@@ -53,6 +53,34 @@ module Aws::RAM
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
+
class CreatePermission
|
57
|
+
def self.build(context)
|
58
|
+
unless context.config.regional_endpoint
|
59
|
+
endpoint = context.config.endpoint.to_s
|
60
|
+
end
|
61
|
+
Aws::RAM::EndpointParameters.new(
|
62
|
+
region: context.config.region,
|
63
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
64
|
+
use_fips: context.config.use_fips_endpoint,
|
65
|
+
endpoint: endpoint,
|
66
|
+
)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
class CreatePermissionVersion
|
71
|
+
def self.build(context)
|
72
|
+
unless context.config.regional_endpoint
|
73
|
+
endpoint = context.config.endpoint.to_s
|
74
|
+
end
|
75
|
+
Aws::RAM::EndpointParameters.new(
|
76
|
+
region: context.config.region,
|
77
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
78
|
+
use_fips: context.config.use_fips_endpoint,
|
79
|
+
endpoint: endpoint,
|
80
|
+
)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
56
84
|
class CreateResourceShare
|
57
85
|
def self.build(context)
|
58
86
|
unless context.config.regional_endpoint
|
@@ -67,6 +95,34 @@ module Aws::RAM
|
|
67
95
|
end
|
68
96
|
end
|
69
97
|
|
98
|
+
class DeletePermission
|
99
|
+
def self.build(context)
|
100
|
+
unless context.config.regional_endpoint
|
101
|
+
endpoint = context.config.endpoint.to_s
|
102
|
+
end
|
103
|
+
Aws::RAM::EndpointParameters.new(
|
104
|
+
region: context.config.region,
|
105
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
106
|
+
use_fips: context.config.use_fips_endpoint,
|
107
|
+
endpoint: endpoint,
|
108
|
+
)
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
class DeletePermissionVersion
|
113
|
+
def self.build(context)
|
114
|
+
unless context.config.regional_endpoint
|
115
|
+
endpoint = context.config.endpoint.to_s
|
116
|
+
end
|
117
|
+
Aws::RAM::EndpointParameters.new(
|
118
|
+
region: context.config.region,
|
119
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
120
|
+
use_fips: context.config.use_fips_endpoint,
|
121
|
+
endpoint: endpoint,
|
122
|
+
)
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
70
126
|
class DeleteResourceShare
|
71
127
|
def self.build(context)
|
72
128
|
unless context.config.regional_endpoint
|
@@ -207,6 +263,20 @@ module Aws::RAM
|
|
207
263
|
end
|
208
264
|
end
|
209
265
|
|
266
|
+
class ListPermissionAssociations
|
267
|
+
def self.build(context)
|
268
|
+
unless context.config.regional_endpoint
|
269
|
+
endpoint = context.config.endpoint.to_s
|
270
|
+
end
|
271
|
+
Aws::RAM::EndpointParameters.new(
|
272
|
+
region: context.config.region,
|
273
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
274
|
+
use_fips: context.config.use_fips_endpoint,
|
275
|
+
endpoint: endpoint,
|
276
|
+
)
|
277
|
+
end
|
278
|
+
end
|
279
|
+
|
210
280
|
class ListPermissionVersions
|
211
281
|
def self.build(context)
|
212
282
|
unless context.config.regional_endpoint
|
@@ -249,6 +319,20 @@ module Aws::RAM
|
|
249
319
|
end
|
250
320
|
end
|
251
321
|
|
322
|
+
class ListReplacePermissionAssociationsWork
|
323
|
+
def self.build(context)
|
324
|
+
unless context.config.regional_endpoint
|
325
|
+
endpoint = context.config.endpoint.to_s
|
326
|
+
end
|
327
|
+
Aws::RAM::EndpointParameters.new(
|
328
|
+
region: context.config.region,
|
329
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
330
|
+
use_fips: context.config.use_fips_endpoint,
|
331
|
+
endpoint: endpoint,
|
332
|
+
)
|
333
|
+
end
|
334
|
+
end
|
335
|
+
|
252
336
|
class ListResourceSharePermissions
|
253
337
|
def self.build(context)
|
254
338
|
unless context.config.regional_endpoint
|
@@ -291,6 +375,20 @@ module Aws::RAM
|
|
291
375
|
end
|
292
376
|
end
|
293
377
|
|
378
|
+
class PromotePermissionCreatedFromPolicy
|
379
|
+
def self.build(context)
|
380
|
+
unless context.config.regional_endpoint
|
381
|
+
endpoint = context.config.endpoint.to_s
|
382
|
+
end
|
383
|
+
Aws::RAM::EndpointParameters.new(
|
384
|
+
region: context.config.region,
|
385
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
386
|
+
use_fips: context.config.use_fips_endpoint,
|
387
|
+
endpoint: endpoint,
|
388
|
+
)
|
389
|
+
end
|
390
|
+
end
|
391
|
+
|
294
392
|
class PromoteResourceShareCreatedFromPolicy
|
295
393
|
def self.build(context)
|
296
394
|
unless context.config.regional_endpoint
|
@@ -319,6 +417,34 @@ module Aws::RAM
|
|
319
417
|
end
|
320
418
|
end
|
321
419
|
|
420
|
+
class ReplacePermissionAssociations
|
421
|
+
def self.build(context)
|
422
|
+
unless context.config.regional_endpoint
|
423
|
+
endpoint = context.config.endpoint.to_s
|
424
|
+
end
|
425
|
+
Aws::RAM::EndpointParameters.new(
|
426
|
+
region: context.config.region,
|
427
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
428
|
+
use_fips: context.config.use_fips_endpoint,
|
429
|
+
endpoint: endpoint,
|
430
|
+
)
|
431
|
+
end
|
432
|
+
end
|
433
|
+
|
434
|
+
class SetDefaultPermissionVersion
|
435
|
+
def self.build(context)
|
436
|
+
unless context.config.regional_endpoint
|
437
|
+
endpoint = context.config.endpoint.to_s
|
438
|
+
end
|
439
|
+
Aws::RAM::EndpointParameters.new(
|
440
|
+
region: context.config.region,
|
441
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
442
|
+
use_fips: context.config.use_fips_endpoint,
|
443
|
+
endpoint: endpoint,
|
444
|
+
)
|
445
|
+
end
|
446
|
+
end
|
447
|
+
|
322
448
|
class TagResource
|
323
449
|
def self.build(context)
|
324
450
|
unless context.config.regional_endpoint
|
data/lib/aws-sdk-ram/errors.rb
CHANGED
@@ -32,11 +32,16 @@ module Aws::RAM
|
|
32
32
|
# * {InvalidMaxResultsException}
|
33
33
|
# * {InvalidNextTokenException}
|
34
34
|
# * {InvalidParameterException}
|
35
|
+
# * {InvalidPolicyException}
|
35
36
|
# * {InvalidResourceTypeException}
|
36
37
|
# * {InvalidStateTransitionException}
|
37
38
|
# * {MalformedArnException}
|
39
|
+
# * {MalformedPolicyTemplateException}
|
38
40
|
# * {MissingRequiredParameterException}
|
39
41
|
# * {OperationNotPermittedException}
|
42
|
+
# * {PermissionAlreadyExistsException}
|
43
|
+
# * {PermissionLimitExceededException}
|
44
|
+
# * {PermissionVersionsLimitExceededException}
|
40
45
|
# * {ResourceArnNotFoundException}
|
41
46
|
# * {ResourceShareInvitationAlreadyAcceptedException}
|
42
47
|
# * {ResourceShareInvitationAlreadyRejectedException}
|
@@ -49,6 +54,7 @@ module Aws::RAM
|
|
49
54
|
# * {TagPolicyViolationException}
|
50
55
|
# * {ThrottlingException}
|
51
56
|
# * {UnknownResourceException}
|
57
|
+
# * {UnmatchedPolicyPermissionException}
|
52
58
|
#
|
53
59
|
# Additionally, error classes are dynamically generated for service errors based on the error code
|
54
60
|
# if they are not defined above.
|
@@ -131,6 +137,21 @@ module Aws::RAM
|
|
131
137
|
end
|
132
138
|
end
|
133
139
|
|
140
|
+
class InvalidPolicyException < ServiceError
|
141
|
+
|
142
|
+
# @param [Seahorse::Client::RequestContext] context
|
143
|
+
# @param [String] message
|
144
|
+
# @param [Aws::RAM::Types::InvalidPolicyException] data
|
145
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
146
|
+
super(context, message, data)
|
147
|
+
end
|
148
|
+
|
149
|
+
# @return [String]
|
150
|
+
def message
|
151
|
+
@message || @data[:message]
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
134
155
|
class InvalidResourceTypeException < ServiceError
|
135
156
|
|
136
157
|
# @param [Seahorse::Client::RequestContext] context
|
@@ -176,6 +197,21 @@ module Aws::RAM
|
|
176
197
|
end
|
177
198
|
end
|
178
199
|
|
200
|
+
class MalformedPolicyTemplateException < ServiceError
|
201
|
+
|
202
|
+
# @param [Seahorse::Client::RequestContext] context
|
203
|
+
# @param [String] message
|
204
|
+
# @param [Aws::RAM::Types::MalformedPolicyTemplateException] data
|
205
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
206
|
+
super(context, message, data)
|
207
|
+
end
|
208
|
+
|
209
|
+
# @return [String]
|
210
|
+
def message
|
211
|
+
@message || @data[:message]
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
179
215
|
class MissingRequiredParameterException < ServiceError
|
180
216
|
|
181
217
|
# @param [Seahorse::Client::RequestContext] context
|
@@ -206,6 +242,51 @@ module Aws::RAM
|
|
206
242
|
end
|
207
243
|
end
|
208
244
|
|
245
|
+
class PermissionAlreadyExistsException < ServiceError
|
246
|
+
|
247
|
+
# @param [Seahorse::Client::RequestContext] context
|
248
|
+
# @param [String] message
|
249
|
+
# @param [Aws::RAM::Types::PermissionAlreadyExistsException] data
|
250
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
251
|
+
super(context, message, data)
|
252
|
+
end
|
253
|
+
|
254
|
+
# @return [String]
|
255
|
+
def message
|
256
|
+
@message || @data[:message]
|
257
|
+
end
|
258
|
+
end
|
259
|
+
|
260
|
+
class PermissionLimitExceededException < ServiceError
|
261
|
+
|
262
|
+
# @param [Seahorse::Client::RequestContext] context
|
263
|
+
# @param [String] message
|
264
|
+
# @param [Aws::RAM::Types::PermissionLimitExceededException] data
|
265
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
266
|
+
super(context, message, data)
|
267
|
+
end
|
268
|
+
|
269
|
+
# @return [String]
|
270
|
+
def message
|
271
|
+
@message || @data[:message]
|
272
|
+
end
|
273
|
+
end
|
274
|
+
|
275
|
+
class PermissionVersionsLimitExceededException < ServiceError
|
276
|
+
|
277
|
+
# @param [Seahorse::Client::RequestContext] context
|
278
|
+
# @param [String] message
|
279
|
+
# @param [Aws::RAM::Types::PermissionVersionsLimitExceededException] data
|
280
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
281
|
+
super(context, message, data)
|
282
|
+
end
|
283
|
+
|
284
|
+
# @return [String]
|
285
|
+
def message
|
286
|
+
@message || @data[:message]
|
287
|
+
end
|
288
|
+
end
|
289
|
+
|
209
290
|
class ResourceArnNotFoundException < ServiceError
|
210
291
|
|
211
292
|
# @param [Seahorse::Client::RequestContext] context
|
@@ -386,5 +467,20 @@ module Aws::RAM
|
|
386
467
|
end
|
387
468
|
end
|
388
469
|
|
470
|
+
class UnmatchedPolicyPermissionException < ServiceError
|
471
|
+
|
472
|
+
# @param [Seahorse::Client::RequestContext] context
|
473
|
+
# @param [String] message
|
474
|
+
# @param [Aws::RAM::Types::UnmatchedPolicyPermissionException] data
|
475
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
476
|
+
super(context, message, data)
|
477
|
+
end
|
478
|
+
|
479
|
+
# @return [String]
|
480
|
+
def message
|
481
|
+
@message || @data[:message]
|
482
|
+
end
|
483
|
+
end
|
484
|
+
|
389
485
|
end
|
390
486
|
end
|
@@ -62,8 +62,16 @@ module Aws::RAM
|
|
62
62
|
Aws::RAM::Endpoints::AssociateResourceShare.build(context)
|
63
63
|
when :associate_resource_share_permission
|
64
64
|
Aws::RAM::Endpoints::AssociateResourceSharePermission.build(context)
|
65
|
+
when :create_permission
|
66
|
+
Aws::RAM::Endpoints::CreatePermission.build(context)
|
67
|
+
when :create_permission_version
|
68
|
+
Aws::RAM::Endpoints::CreatePermissionVersion.build(context)
|
65
69
|
when :create_resource_share
|
66
70
|
Aws::RAM::Endpoints::CreateResourceShare.build(context)
|
71
|
+
when :delete_permission
|
72
|
+
Aws::RAM::Endpoints::DeletePermission.build(context)
|
73
|
+
when :delete_permission_version
|
74
|
+
Aws::RAM::Endpoints::DeletePermissionVersion.build(context)
|
67
75
|
when :delete_resource_share
|
68
76
|
Aws::RAM::Endpoints::DeleteResourceShare.build(context)
|
69
77
|
when :disassociate_resource_share
|
@@ -84,22 +92,32 @@ module Aws::RAM
|
|
84
92
|
Aws::RAM::Endpoints::GetResourceShares.build(context)
|
85
93
|
when :list_pending_invitation_resources
|
86
94
|
Aws::RAM::Endpoints::ListPendingInvitationResources.build(context)
|
95
|
+
when :list_permission_associations
|
96
|
+
Aws::RAM::Endpoints::ListPermissionAssociations.build(context)
|
87
97
|
when :list_permission_versions
|
88
98
|
Aws::RAM::Endpoints::ListPermissionVersions.build(context)
|
89
99
|
when :list_permissions
|
90
100
|
Aws::RAM::Endpoints::ListPermissions.build(context)
|
91
101
|
when :list_principals
|
92
102
|
Aws::RAM::Endpoints::ListPrincipals.build(context)
|
103
|
+
when :list_replace_permission_associations_work
|
104
|
+
Aws::RAM::Endpoints::ListReplacePermissionAssociationsWork.build(context)
|
93
105
|
when :list_resource_share_permissions
|
94
106
|
Aws::RAM::Endpoints::ListResourceSharePermissions.build(context)
|
95
107
|
when :list_resource_types
|
96
108
|
Aws::RAM::Endpoints::ListResourceTypes.build(context)
|
97
109
|
when :list_resources
|
98
110
|
Aws::RAM::Endpoints::ListResources.build(context)
|
111
|
+
when :promote_permission_created_from_policy
|
112
|
+
Aws::RAM::Endpoints::PromotePermissionCreatedFromPolicy.build(context)
|
99
113
|
when :promote_resource_share_created_from_policy
|
100
114
|
Aws::RAM::Endpoints::PromoteResourceShareCreatedFromPolicy.build(context)
|
101
115
|
when :reject_resource_share_invitation
|
102
116
|
Aws::RAM::Endpoints::RejectResourceShareInvitation.build(context)
|
117
|
+
when :replace_permission_associations
|
118
|
+
Aws::RAM::Endpoints::ReplacePermissionAssociations.build(context)
|
119
|
+
when :set_default_permission_version
|
120
|
+
Aws::RAM::Endpoints::SetDefaultPermissionVersion.build(context)
|
103
121
|
when :tag_resource
|
104
122
|
Aws::RAM::Endpoints::TagResource.build(context)
|
105
123
|
when :untag_resource
|