aws-sdk-efs 1.49.0 → 1.67.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -33,6 +33,7 @@ module Aws::EFS
33
33
  CreateAccessPointRequest = Shapes::StructureShape.new(name: 'CreateAccessPointRequest')
34
34
  CreateFileSystemRequest = Shapes::StructureShape.new(name: 'CreateFileSystemRequest')
35
35
  CreateMountTargetRequest = Shapes::StructureShape.new(name: 'CreateMountTargetRequest')
36
+ CreateReplicationConfigurationRequest = Shapes::StructureShape.new(name: 'CreateReplicationConfigurationRequest')
36
37
  CreateTagsRequest = Shapes::StructureShape.new(name: 'CreateTagsRequest')
37
38
  CreationInfo = Shapes::StructureShape.new(name: 'CreationInfo')
38
39
  CreationToken = Shapes::StringShape.new(name: 'CreationToken')
@@ -40,6 +41,7 @@ module Aws::EFS
40
41
  DeleteFileSystemPolicyRequest = Shapes::StructureShape.new(name: 'DeleteFileSystemPolicyRequest')
41
42
  DeleteFileSystemRequest = Shapes::StructureShape.new(name: 'DeleteFileSystemRequest')
42
43
  DeleteMountTargetRequest = Shapes::StructureShape.new(name: 'DeleteMountTargetRequest')
44
+ DeleteReplicationConfigurationRequest = Shapes::StructureShape.new(name: 'DeleteReplicationConfigurationRequest')
43
45
  DeleteTagsRequest = Shapes::StructureShape.new(name: 'DeleteTagsRequest')
44
46
  DependencyTimeout = Shapes::StructureShape.new(name: 'DependencyTimeout')
45
47
  DescribeAccessPointsRequest = Shapes::StructureShape.new(name: 'DescribeAccessPointsRequest')
@@ -55,8 +57,14 @@ module Aws::EFS
55
57
  DescribeMountTargetSecurityGroupsResponse = Shapes::StructureShape.new(name: 'DescribeMountTargetSecurityGroupsResponse')
56
58
  DescribeMountTargetsRequest = Shapes::StructureShape.new(name: 'DescribeMountTargetsRequest')
57
59
  DescribeMountTargetsResponse = Shapes::StructureShape.new(name: 'DescribeMountTargetsResponse')
60
+ DescribeReplicationConfigurationsRequest = Shapes::StructureShape.new(name: 'DescribeReplicationConfigurationsRequest')
61
+ DescribeReplicationConfigurationsResponse = Shapes::StructureShape.new(name: 'DescribeReplicationConfigurationsResponse')
58
62
  DescribeTagsRequest = Shapes::StructureShape.new(name: 'DescribeTagsRequest')
59
63
  DescribeTagsResponse = Shapes::StructureShape.new(name: 'DescribeTagsResponse')
64
+ Destination = Shapes::StructureShape.new(name: 'Destination')
65
+ DestinationToCreate = Shapes::StructureShape.new(name: 'DestinationToCreate')
66
+ Destinations = Shapes::ListShape.new(name: 'Destinations')
67
+ DestinationsToCreate = Shapes::ListShape.new(name: 'DestinationsToCreate')
60
68
  Encrypted = Shapes::BooleanShape.new(name: 'Encrypted')
61
69
  ErrorCode = Shapes::StringShape.new(name: 'ErrorCode')
62
70
  ErrorMessage = Shapes::StringShape.new(name: 'ErrorMessage')
@@ -115,6 +123,11 @@ module Aws::EFS
115
123
  PutBackupPolicyRequest = Shapes::StructureShape.new(name: 'PutBackupPolicyRequest')
116
124
  PutFileSystemPolicyRequest = Shapes::StructureShape.new(name: 'PutFileSystemPolicyRequest')
117
125
  PutLifecycleConfigurationRequest = Shapes::StructureShape.new(name: 'PutLifecycleConfigurationRequest')
126
+ RegionName = Shapes::StringShape.new(name: 'RegionName')
127
+ ReplicationConfigurationDescription = Shapes::StructureShape.new(name: 'ReplicationConfigurationDescription')
128
+ ReplicationConfigurationDescriptions = Shapes::ListShape.new(name: 'ReplicationConfigurationDescriptions')
129
+ ReplicationNotFound = Shapes::StructureShape.new(name: 'ReplicationNotFound')
130
+ ReplicationStatus = Shapes::StringShape.new(name: 'ReplicationStatus')
118
131
  Resource = Shapes::StringShape.new(name: 'Resource')
119
132
  ResourceId = Shapes::StringShape.new(name: 'ResourceId')
120
133
  ResourceIdPreference = Shapes::StructureShape.new(name: 'ResourceIdPreference')
@@ -135,6 +148,7 @@ module Aws::EFS
135
148
  TagResourceRequest = Shapes::StructureShape.new(name: 'TagResourceRequest')
136
149
  TagValue = Shapes::StringShape.new(name: 'TagValue')
137
150
  Tags = Shapes::ListShape.new(name: 'Tags')
151
+ ThrottlingException = Shapes::StructureShape.new(name: 'ThrottlingException')
138
152
  ThroughputLimitExceeded = Shapes::StructureShape.new(name: 'ThroughputLimitExceeded')
139
153
  ThroughputMode = Shapes::StringShape.new(name: 'ThroughputMode')
140
154
  Timestamp = Shapes::TimestampShape.new(name: 'Timestamp')
@@ -214,6 +228,10 @@ module Aws::EFS
214
228
  CreateMountTargetRequest.add_member(:security_groups, Shapes::ShapeRef.new(shape: SecurityGroups, location_name: "SecurityGroups"))
215
229
  CreateMountTargetRequest.struct_class = Types::CreateMountTargetRequest
216
230
 
231
+ CreateReplicationConfigurationRequest.add_member(:source_file_system_id, Shapes::ShapeRef.new(shape: FileSystemId, required: true, location: "uri", location_name: "SourceFileSystemId"))
232
+ CreateReplicationConfigurationRequest.add_member(:destinations, Shapes::ShapeRef.new(shape: DestinationsToCreate, required: true, location_name: "Destinations"))
233
+ CreateReplicationConfigurationRequest.struct_class = Types::CreateReplicationConfigurationRequest
234
+
217
235
  CreateTagsRequest.add_member(:file_system_id, Shapes::ShapeRef.new(shape: FileSystemId, required: true, location: "uri", location_name: "FileSystemId"))
218
236
  CreateTagsRequest.add_member(:tags, Shapes::ShapeRef.new(shape: Tags, required: true, location_name: "Tags"))
219
237
  CreateTagsRequest.struct_class = Types::CreateTagsRequest
@@ -235,6 +253,9 @@ module Aws::EFS
235
253
  DeleteMountTargetRequest.add_member(:mount_target_id, Shapes::ShapeRef.new(shape: MountTargetId, required: true, location: "uri", location_name: "MountTargetId"))
236
254
  DeleteMountTargetRequest.struct_class = Types::DeleteMountTargetRequest
237
255
 
256
+ DeleteReplicationConfigurationRequest.add_member(:source_file_system_id, Shapes::ShapeRef.new(shape: FileSystemId, required: true, location: "uri", location_name: "SourceFileSystemId"))
257
+ DeleteReplicationConfigurationRequest.struct_class = Types::DeleteReplicationConfigurationRequest
258
+
238
259
  DeleteTagsRequest.add_member(:file_system_id, Shapes::ShapeRef.new(shape: FileSystemId, required: true, location: "uri", location_name: "FileSystemId"))
239
260
  DeleteTagsRequest.add_member(:tag_keys, Shapes::ShapeRef.new(shape: TagKeys, required: true, location_name: "TagKeys"))
240
261
  DeleteTagsRequest.struct_class = Types::DeleteTagsRequest
@@ -299,6 +320,15 @@ module Aws::EFS
299
320
  DescribeMountTargetsResponse.add_member(:next_marker, Shapes::ShapeRef.new(shape: Marker, location_name: "NextMarker"))
300
321
  DescribeMountTargetsResponse.struct_class = Types::DescribeMountTargetsResponse
301
322
 
323
+ DescribeReplicationConfigurationsRequest.add_member(:file_system_id, Shapes::ShapeRef.new(shape: FileSystemId, location: "querystring", location_name: "FileSystemId"))
324
+ DescribeReplicationConfigurationsRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: Token, location: "querystring", location_name: "NextToken"))
325
+ DescribeReplicationConfigurationsRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResults, location: "querystring", location_name: "MaxResults"))
326
+ DescribeReplicationConfigurationsRequest.struct_class = Types::DescribeReplicationConfigurationsRequest
327
+
328
+ DescribeReplicationConfigurationsResponse.add_member(:replications, Shapes::ShapeRef.new(shape: ReplicationConfigurationDescriptions, location_name: "Replications"))
329
+ DescribeReplicationConfigurationsResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: Token, location_name: "NextToken"))
330
+ DescribeReplicationConfigurationsResponse.struct_class = Types::DescribeReplicationConfigurationsResponse
331
+
302
332
  DescribeTagsRequest.add_member(:max_items, Shapes::ShapeRef.new(shape: MaxItems, location: "querystring", location_name: "MaxItems"))
303
333
  DescribeTagsRequest.add_member(:marker, Shapes::ShapeRef.new(shape: Marker, location: "querystring", location_name: "Marker"))
304
334
  DescribeTagsRequest.add_member(:file_system_id, Shapes::ShapeRef.new(shape: FileSystemId, required: true, location: "uri", location_name: "FileSystemId"))
@@ -309,6 +339,21 @@ module Aws::EFS
309
339
  DescribeTagsResponse.add_member(:next_marker, Shapes::ShapeRef.new(shape: Marker, location_name: "NextMarker"))
310
340
  DescribeTagsResponse.struct_class = Types::DescribeTagsResponse
311
341
 
342
+ Destination.add_member(:status, Shapes::ShapeRef.new(shape: ReplicationStatus, required: true, location_name: "Status"))
343
+ Destination.add_member(:file_system_id, Shapes::ShapeRef.new(shape: FileSystemId, required: true, location_name: "FileSystemId"))
344
+ Destination.add_member(:region, Shapes::ShapeRef.new(shape: RegionName, required: true, location_name: "Region"))
345
+ Destination.add_member(:last_replicated_timestamp, Shapes::ShapeRef.new(shape: Timestamp, location_name: "LastReplicatedTimestamp"))
346
+ Destination.struct_class = Types::Destination
347
+
348
+ DestinationToCreate.add_member(:region, Shapes::ShapeRef.new(shape: RegionName, location_name: "Region"))
349
+ DestinationToCreate.add_member(:availability_zone_name, Shapes::ShapeRef.new(shape: AvailabilityZoneName, location_name: "AvailabilityZoneName"))
350
+ DestinationToCreate.add_member(:kms_key_id, Shapes::ShapeRef.new(shape: KmsKeyId, location_name: "KmsKeyId"))
351
+ DestinationToCreate.struct_class = Types::DestinationToCreate
352
+
353
+ Destinations.member = Shapes::ShapeRef.new(shape: Destination)
354
+
355
+ DestinationsToCreate.member = Shapes::ShapeRef.new(shape: DestinationToCreate)
356
+
312
357
  FileSystemAlreadyExists.add_member(:error_code, Shapes::ShapeRef.new(shape: ErrorCode, required: true, location_name: "ErrorCode"))
313
358
  FileSystemAlreadyExists.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "Message"))
314
359
  FileSystemAlreadyExists.add_member(:file_system_id, Shapes::ShapeRef.new(shape: FileSystemId, required: true, location_name: "FileSystemId"))
@@ -461,6 +506,20 @@ module Aws::EFS
461
506
  PutLifecycleConfigurationRequest.add_member(:lifecycle_policies, Shapes::ShapeRef.new(shape: LifecyclePolicies, required: true, location_name: "LifecyclePolicies"))
462
507
  PutLifecycleConfigurationRequest.struct_class = Types::PutLifecycleConfigurationRequest
463
508
 
509
+ ReplicationConfigurationDescription.add_member(:source_file_system_id, Shapes::ShapeRef.new(shape: FileSystemId, required: true, location_name: "SourceFileSystemId"))
510
+ ReplicationConfigurationDescription.add_member(:source_file_system_region, Shapes::ShapeRef.new(shape: RegionName, required: true, location_name: "SourceFileSystemRegion"))
511
+ ReplicationConfigurationDescription.add_member(:source_file_system_arn, Shapes::ShapeRef.new(shape: FileSystemArn, required: true, location_name: "SourceFileSystemArn"))
512
+ ReplicationConfigurationDescription.add_member(:original_source_file_system_arn, Shapes::ShapeRef.new(shape: FileSystemArn, required: true, location_name: "OriginalSourceFileSystemArn"))
513
+ ReplicationConfigurationDescription.add_member(:creation_time, Shapes::ShapeRef.new(shape: Timestamp, required: true, location_name: "CreationTime"))
514
+ ReplicationConfigurationDescription.add_member(:destinations, Shapes::ShapeRef.new(shape: Destinations, required: true, location_name: "Destinations"))
515
+ ReplicationConfigurationDescription.struct_class = Types::ReplicationConfigurationDescription
516
+
517
+ ReplicationConfigurationDescriptions.member = Shapes::ShapeRef.new(shape: ReplicationConfigurationDescription)
518
+
519
+ ReplicationNotFound.add_member(:error_code, Shapes::ShapeRef.new(shape: ErrorCode, location_name: "ErrorCode"))
520
+ ReplicationNotFound.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "Message"))
521
+ ReplicationNotFound.struct_class = Types::ReplicationNotFound
522
+
464
523
  ResourceIdPreference.add_member(:resource_id_type, Shapes::ShapeRef.new(shape: ResourceIdType, location_name: "ResourceIdType"))
465
524
  ResourceIdPreference.add_member(:resources, Shapes::ShapeRef.new(shape: Resources, location_name: "Resources"))
466
525
  ResourceIdPreference.struct_class = Types::ResourceIdPreference
@@ -499,6 +558,10 @@ module Aws::EFS
499
558
 
500
559
  Tags.member = Shapes::ShapeRef.new(shape: Tag)
501
560
 
561
+ ThrottlingException.add_member(:error_code, Shapes::ShapeRef.new(shape: ErrorCode, location_name: "ErrorCode"))
562
+ ThrottlingException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "Message"))
563
+ ThrottlingException.struct_class = Types::ThrottlingException
564
+
502
565
  ThroughputLimitExceeded.add_member(:error_code, Shapes::ShapeRef.new(shape: ErrorCode, required: true, location_name: "ErrorCode"))
503
566
  ThroughputLimitExceeded.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "Message"))
504
567
  ThroughputLimitExceeded.struct_class = Types::ThroughputLimitExceeded
@@ -553,6 +616,7 @@ module Aws::EFS
553
616
  o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
554
617
  o.errors << Shapes::ShapeRef.new(shape: FileSystemNotFound)
555
618
  o.errors << Shapes::ShapeRef.new(shape: AccessPointLimitExceeded)
619
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
556
620
  end)
557
621
 
558
622
  api.add_operation(:create_file_system, Seahorse::Model::Operation.new.tap do |o|
@@ -591,6 +655,24 @@ module Aws::EFS
591
655
  o.errors << Shapes::ShapeRef.new(shape: AvailabilityZonesMismatch)
592
656
  end)
593
657
 
658
+ api.add_operation(:create_replication_configuration, Seahorse::Model::Operation.new.tap do |o|
659
+ o.name = "CreateReplicationConfiguration"
660
+ o.http_method = "POST"
661
+ o.http_request_uri = "/2015-02-01/file-systems/{SourceFileSystemId}/replication-configuration"
662
+ o.input = Shapes::ShapeRef.new(shape: CreateReplicationConfigurationRequest)
663
+ o.output = Shapes::ShapeRef.new(shape: ReplicationConfigurationDescription)
664
+ o.errors << Shapes::ShapeRef.new(shape: BadRequest)
665
+ o.errors << Shapes::ShapeRef.new(shape: IncorrectFileSystemLifeCycleState)
666
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
667
+ o.errors << Shapes::ShapeRef.new(shape: ReplicationNotFound)
668
+ o.errors << Shapes::ShapeRef.new(shape: FileSystemNotFound)
669
+ o.errors << Shapes::ShapeRef.new(shape: UnsupportedAvailabilityZone)
670
+ o.errors << Shapes::ShapeRef.new(shape: FileSystemLimitExceeded)
671
+ o.errors << Shapes::ShapeRef.new(shape: InsufficientThroughputCapacity)
672
+ o.errors << Shapes::ShapeRef.new(shape: ThroughputLimitExceeded)
673
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
674
+ end)
675
+
594
676
  api.add_operation(:create_tags, Seahorse::Model::Operation.new.tap do |o|
595
677
  o.name = "CreateTags"
596
678
  o.http_method = "POST"
@@ -632,6 +714,7 @@ module Aws::EFS
632
714
  o.http_request_uri = "/2015-02-01/file-systems/{FileSystemId}/policy"
633
715
  o.input = Shapes::ShapeRef.new(shape: DeleteFileSystemPolicyRequest)
634
716
  o.output = Shapes::ShapeRef.new(shape: Shapes::StructureShape.new(struct_class: Aws::EmptyStructure))
717
+ o.errors << Shapes::ShapeRef.new(shape: BadRequest)
635
718
  o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
636
719
  o.errors << Shapes::ShapeRef.new(shape: FileSystemNotFound)
637
720
  o.errors << Shapes::ShapeRef.new(shape: IncorrectFileSystemLifeCycleState)
@@ -649,6 +732,18 @@ module Aws::EFS
649
732
  o.errors << Shapes::ShapeRef.new(shape: MountTargetNotFound)
650
733
  end)
651
734
 
735
+ api.add_operation(:delete_replication_configuration, Seahorse::Model::Operation.new.tap do |o|
736
+ o.name = "DeleteReplicationConfiguration"
737
+ o.http_method = "DELETE"
738
+ o.http_request_uri = "/2015-02-01/file-systems/{SourceFileSystemId}/replication-configuration"
739
+ o.input = Shapes::ShapeRef.new(shape: DeleteReplicationConfigurationRequest)
740
+ o.output = Shapes::ShapeRef.new(shape: Shapes::StructureShape.new(struct_class: Aws::EmptyStructure))
741
+ o.errors << Shapes::ShapeRef.new(shape: BadRequest)
742
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
743
+ o.errors << Shapes::ShapeRef.new(shape: FileSystemNotFound)
744
+ o.errors << Shapes::ShapeRef.new(shape: ReplicationNotFound)
745
+ end)
746
+
652
747
  api.add_operation(:delete_tags, Seahorse::Model::Operation.new.tap do |o|
653
748
  o.name = "DeleteTags"
654
749
  o.http_method = "POST"
@@ -707,6 +802,7 @@ module Aws::EFS
707
802
  o.http_request_uri = "/2015-02-01/file-systems/{FileSystemId}/policy"
708
803
  o.input = Shapes::ShapeRef.new(shape: DescribeFileSystemPolicyRequest)
709
804
  o.output = Shapes::ShapeRef.new(shape: FileSystemPolicyDescription)
805
+ o.errors << Shapes::ShapeRef.new(shape: BadRequest)
710
806
  o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
711
807
  o.errors << Shapes::ShapeRef.new(shape: FileSystemNotFound)
712
808
  o.errors << Shapes::ShapeRef.new(shape: PolicyNotFound)
@@ -765,6 +861,19 @@ module Aws::EFS
765
861
  o.errors << Shapes::ShapeRef.new(shape: AccessPointNotFound)
766
862
  end)
767
863
 
864
+ api.add_operation(:describe_replication_configurations, Seahorse::Model::Operation.new.tap do |o|
865
+ o.name = "DescribeReplicationConfigurations"
866
+ o.http_method = "GET"
867
+ o.http_request_uri = "/2015-02-01/file-systems/replication-configurations"
868
+ o.input = Shapes::ShapeRef.new(shape: DescribeReplicationConfigurationsRequest)
869
+ o.output = Shapes::ShapeRef.new(shape: DescribeReplicationConfigurationsResponse)
870
+ o.errors << Shapes::ShapeRef.new(shape: BadRequest)
871
+ o.errors << Shapes::ShapeRef.new(shape: FileSystemNotFound)
872
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
873
+ o.errors << Shapes::ShapeRef.new(shape: ReplicationNotFound)
874
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
875
+ end)
876
+
768
877
  api.add_operation(:describe_tags, Seahorse::Model::Operation.new.tap do |o|
769
878
  o.name = "DescribeTags"
770
879
  o.http_method = "GET"
@@ -844,6 +953,7 @@ module Aws::EFS
844
953
  o.http_request_uri = "/2015-02-01/file-systems/{FileSystemId}/policy"
845
954
  o.input = Shapes::ShapeRef.new(shape: PutFileSystemPolicyRequest)
846
955
  o.output = Shapes::ShapeRef.new(shape: FileSystemPolicyDescription)
956
+ o.errors << Shapes::ShapeRef.new(shape: BadRequest)
847
957
  o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
848
958
  o.errors << Shapes::ShapeRef.new(shape: FileSystemNotFound)
849
959
  o.errors << Shapes::ShapeRef.new(shape: InvalidPolicyException)
@@ -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::EFS
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::EFS
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://elasticfilesystem-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?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
36
+ return Aws::Endpoints::Endpoint.new(url: "https://elasticfilesystem-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://elasticfilesystem.#{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://elasticfilesystem.#{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