aws-sdk-account 1.9.0 → 1.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c083159738d1001296cf4aa027117e9b8cdac5bc2bfc35539ee9acaaed62cbcd
4
- data.tar.gz: 5df284ca0817b9338b25c1d4b5f30eed3cb09b9663dd68b2f589b54ece34e639
3
+ metadata.gz: 6041fc756851ba88508aeaf19f7efc268ed29a0b69cf1fb3085fc038c5de15c5
4
+ data.tar.gz: 6a71f2a74a4adab2677e6e2776af4f36602f7400af80c95f621fb6c4160d86e4
5
5
  SHA512:
6
- metadata.gz: 85504118999237e9bf102aab5141c5b83526165cbcad1337e4a21e913ab7ede2c1ceacfb19d61ec39466c05f0b3ed76cbbb8be5d89cad694e8697276dfb5bab6
7
- data.tar.gz: ddd05059d5c76696efc8f381940449c4e569ec2937800507ec5f205d3465f1e8814ea9f486322cf6bbd72373a34aa183b1015049a68f3554e2eb591d07485cb1
6
+ metadata.gz: 7106bac8e49cc9a278f3071f5ec3e5fbd3716603e4b9d5d66790ce5bda1d3629235ad27b312333c967fee48bfce12fb4182162affd4e0d216f8801740c8c0158
7
+ data.tar.gz: 9dc9f712ee757b1dc211c0e6755409f06fa0587788ca3cdf7ba324da0d972502d65d495d2a536b644d95a0103f067350e623a0734d7451b236c82e3319bb1128
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.11.0 (2023-03-06)
5
+ ------------------
6
+
7
+ * Feature - AWS Account alternate contact email addresses can now have a length of 254 characters and contain the character "|".
8
+
9
+ 1.10.0 (2023-02-13)
10
+ ------------------
11
+
12
+ * Feature - This release of the Account Management API enables customers to view and manage whether AWS Opt-In Regions are enabled or disabled for their Account. For more information, see https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-regions.html
13
+
4
14
  1.9.0 (2023-01-18)
5
15
  ------------------
6
16
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.9.0
1
+ 1.11.0
@@ -441,6 +441,125 @@ module Aws::Account
441
441
  req.send_request(options)
442
442
  end
443
443
 
444
+ # Disables (opts-out) a particular Region for an account.
445
+ #
446
+ # @option params [String] :account_id
447
+ # Specifies the 12-digit account ID number of the Amazon Web Services
448
+ # account that you want to access or modify with this operation. If you
449
+ # don't specify this parameter, it defaults to the Amazon Web Services
450
+ # account of the identity used to call the operation. To use this
451
+ # parameter, the caller must be an identity in the [organization's
452
+ # management account][1] or a delegated administrator account. The
453
+ # specified account ID must also be a member account in the same
454
+ # organization. The organization must have [all features enabled][2],
455
+ # and the organization must have [trusted access][3] enabled for the
456
+ # Account Management service, and optionally a [delegated admin][4]
457
+ # account assigned.
458
+ #
459
+ # <note markdown="1"> The management account can't specify its own `AccountId`. It must
460
+ # call the operation in standalone context by not including the
461
+ # `AccountId` parameter.
462
+ #
463
+ # </note>
464
+ #
465
+ # To call this operation on an account that is not a member of an
466
+ # organization, don't specify this parameter. Instead, call the
467
+ # operation using an identity belonging to the account whose contacts
468
+ # you wish to retrieve or modify.
469
+ #
470
+ #
471
+ #
472
+ # [1]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account
473
+ # [2]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html
474
+ # [3]: https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-trusted-access.html
475
+ # [4]: https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-delegated-admin.html
476
+ #
477
+ # @option params [required, String] :region_name
478
+ # Specifies the Region-code for a given Region name (for example,
479
+ # `af-south-1`). When you disable a Region, Amazon Web Services performs
480
+ # actions to deactivate that Region in your account, such as destroying
481
+ # IAM resources in the Region. This process takes a few minutes for most
482
+ # accounts, but this can take several hours. You cannot enable the
483
+ # Region until the disabling process is fully completed.
484
+ #
485
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
486
+ #
487
+ # @example Request syntax with placeholder values
488
+ #
489
+ # resp = client.disable_region({
490
+ # account_id: "AccountId",
491
+ # region_name: "RegionName", # required
492
+ # })
493
+ #
494
+ # @see http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/DisableRegion AWS API Documentation
495
+ #
496
+ # @overload disable_region(params = {})
497
+ # @param [Hash] params ({})
498
+ def disable_region(params = {}, options = {})
499
+ req = build_request(:disable_region, params)
500
+ req.send_request(options)
501
+ end
502
+
503
+ # Enables (opts-in) a particular Region for an account.
504
+ #
505
+ # @option params [String] :account_id
506
+ # Specifies the 12-digit account ID number of the Amazon Web Services
507
+ # account that you want to access or modify with this operation. If you
508
+ # don't specify this parameter, it defaults to the Amazon Web Services
509
+ # account of the identity used to call the operation. To use this
510
+ # parameter, the caller must be an identity in the [organization's
511
+ # management account][1] or a delegated administrator account. The
512
+ # specified account ID must also be a member account in the same
513
+ # organization. The organization must have [all features enabled][2],
514
+ # and the organization must have [trusted access][3] enabled for the
515
+ # Account Management service, and optionally a [delegated admin][4]
516
+ # account assigned.
517
+ #
518
+ # <note markdown="1"> The management account can't specify its own `AccountId`. It must
519
+ # call the operation in standalone context by not including the
520
+ # `AccountId` parameter.
521
+ #
522
+ # </note>
523
+ #
524
+ # To call this operation on an account that is not a member of an
525
+ # organization, don't specify this parameter. Instead, call the
526
+ # operation using an identity belonging to the account whose contacts
527
+ # you wish to retrieve or modify.
528
+ #
529
+ #
530
+ #
531
+ # [1]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account
532
+ # [2]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html
533
+ # [3]: https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-trusted-access.html
534
+ # [4]: https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-delegated-admin.html
535
+ #
536
+ # @option params [required, String] :region_name
537
+ # Specifies the Region-code for a given Region name (for example,
538
+ # `af-south-1`). When you enable a Region, Amazon Web Services performs
539
+ # actions to prepare your account in that Region, such as distributing
540
+ # your IAM resources to the Region. This process takes a few minutes for
541
+ # most accounts, but it can take several hours. You cannot use the
542
+ # Region until this process is complete. Furthermore, you cannot disable
543
+ # the Region until the enabling process is fully completed.
544
+ #
545
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
546
+ #
547
+ # @example Request syntax with placeholder values
548
+ #
549
+ # resp = client.enable_region({
550
+ # account_id: "AccountId",
551
+ # region_name: "RegionName", # required
552
+ # })
553
+ #
554
+ # @see http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/EnableRegion AWS API Documentation
555
+ #
556
+ # @overload enable_region(params = {})
557
+ # @param [Hash] params ({})
558
+ def enable_region(params = {}, options = {})
559
+ req = build_request(:enable_region, params)
560
+ req.send_request(options)
561
+ end
562
+
444
563
  # Retrieves the specified alternate contact attached to an Amazon Web
445
564
  # Services account.
446
565
  #
@@ -599,6 +718,167 @@ module Aws::Account
599
718
  req.send_request(options)
600
719
  end
601
720
 
721
+ # Retrieves the opt-in status of a particular Region.
722
+ #
723
+ # @option params [String] :account_id
724
+ # Specifies the 12-digit account ID number of the Amazon Web Services
725
+ # account that you want to access or modify with this operation. If you
726
+ # don't specify this parameter, it defaults to the Amazon Web Services
727
+ # account of the identity used to call the operation. To use this
728
+ # parameter, the caller must be an identity in the [organization's
729
+ # management account][1] or a delegated administrator account. The
730
+ # specified account ID must also be a member account in the same
731
+ # organization. The organization must have [all features enabled][2],
732
+ # and the organization must have [trusted access][3] enabled for the
733
+ # Account Management service, and optionally a [delegated admin][4]
734
+ # account assigned.
735
+ #
736
+ # <note markdown="1"> The management account can't specify its own `AccountId`. It must
737
+ # call the operation in standalone context by not including the
738
+ # `AccountId` parameter.
739
+ #
740
+ # </note>
741
+ #
742
+ # To call this operation on an account that is not a member of an
743
+ # organization, don't specify this parameter. Instead, call the
744
+ # operation using an identity belonging to the account whose contacts
745
+ # you wish to retrieve or modify.
746
+ #
747
+ #
748
+ #
749
+ # [1]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account
750
+ # [2]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html
751
+ # [3]: https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-trusted-access.html
752
+ # [4]: https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-delegated-admin.html
753
+ #
754
+ # @option params [required, String] :region_name
755
+ # Specifies the Region-code for a given Region name (for example,
756
+ # `af-south-1`). This function will return the status of whatever Region
757
+ # you pass into this parameter.
758
+ #
759
+ # @return [Types::GetRegionOptStatusResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
760
+ #
761
+ # * {Types::GetRegionOptStatusResponse#region_name #region_name} => String
762
+ # * {Types::GetRegionOptStatusResponse#region_opt_status #region_opt_status} => String
763
+ #
764
+ # @example Request syntax with placeholder values
765
+ #
766
+ # resp = client.get_region_opt_status({
767
+ # account_id: "AccountId",
768
+ # region_name: "RegionName", # required
769
+ # })
770
+ #
771
+ # @example Response structure
772
+ #
773
+ # resp.region_name #=> String
774
+ # resp.region_opt_status #=> String, one of "ENABLED", "ENABLING", "DISABLING", "DISABLED", "ENABLED_BY_DEFAULT"
775
+ #
776
+ # @see http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/GetRegionOptStatus AWS API Documentation
777
+ #
778
+ # @overload get_region_opt_status(params = {})
779
+ # @param [Hash] params ({})
780
+ def get_region_opt_status(params = {}, options = {})
781
+ req = build_request(:get_region_opt_status, params)
782
+ req.send_request(options)
783
+ end
784
+
785
+ # Lists all the Regions for a given account and their respective opt-in
786
+ # statuses. Optionally, this list can be filtered by the
787
+ # `region-opt-status-contains` parameter.
788
+ #
789
+ # @option params [String] :account_id
790
+ # Specifies the 12-digit account ID number of the Amazon Web Services
791
+ # account that you want to access or modify with this operation. If you
792
+ # don't specify this parameter, it defaults to the Amazon Web Services
793
+ # account of the identity used to call the operation. To use this
794
+ # parameter, the caller must be an identity in the [organization's
795
+ # management account][1] or a delegated administrator account. The
796
+ # specified account ID must also be a member account in the same
797
+ # organization. The organization must have [all features enabled][2],
798
+ # and the organization must have [trusted access][3] enabled for the
799
+ # Account Management service, and optionally a [delegated admin][4]
800
+ # account assigned.
801
+ #
802
+ # <note markdown="1"> The management account can't specify its own `AccountId`. It must
803
+ # call the operation in standalone context by not including the
804
+ # `AccountId` parameter.
805
+ #
806
+ # </note>
807
+ #
808
+ # To call this operation on an account that is not a member of an
809
+ # organization, don't specify this parameter. Instead, call the
810
+ # operation using an identity belonging to the account whose contacts
811
+ # you wish to retrieve or modify.
812
+ #
813
+ #
814
+ #
815
+ # [1]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account
816
+ # [2]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html
817
+ # [3]: https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-trusted-access.html
818
+ # [4]: https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-delegated-admin.html
819
+ #
820
+ # @option params [Integer] :max_results
821
+ # The total number of items to return in the command’s output. If the
822
+ # total number of items available is more than the value specified, a
823
+ # `NextToken` is provided in the command’s output. To resume pagination,
824
+ # provide the `NextToken` value in the `starting-token` argument of a
825
+ # subsequent command. Do not use the `NextToken` response element
826
+ # directly outside of the Amazon Web Services CLI. For usage examples,
827
+ # see [Pagination][1] in the *Amazon Web Services Command Line Interface
828
+ # User Guide*.
829
+ #
830
+ #
831
+ #
832
+ # [1]: http://docs.aws.amazon.com/cli/latest/userguide/pagination.html
833
+ #
834
+ # @option params [String] :next_token
835
+ # A token used to specify where to start paginating. This is the
836
+ # `NextToken` from a previously truncated response. For usage examples,
837
+ # see [Pagination][1] in the *Amazon Web Services Command Line Interface
838
+ # User Guide*.
839
+ #
840
+ #
841
+ #
842
+ # [1]: http://docs.aws.amazon.com/cli/latest/userguide/pagination.html
843
+ #
844
+ # @option params [Array<String>] :region_opt_status_contains
845
+ # A list of Region statuses (Enabling, Enabled, Disabling, Disabled,
846
+ # Enabled\_by\_default) to use to filter the list of Regions for a given
847
+ # account. For example, passing in a value of ENABLING will only return
848
+ # a list of Regions with a Region status of ENABLING.
849
+ #
850
+ # @return [Types::ListRegionsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
851
+ #
852
+ # * {Types::ListRegionsResponse#next_token #next_token} => String
853
+ # * {Types::ListRegionsResponse#regions #regions} => Array&lt;Types::Region&gt;
854
+ #
855
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
856
+ #
857
+ # @example Request syntax with placeholder values
858
+ #
859
+ # resp = client.list_regions({
860
+ # account_id: "AccountId",
861
+ # max_results: 1,
862
+ # next_token: "ListRegionsRequestNextTokenString",
863
+ # region_opt_status_contains: ["ENABLED"], # accepts ENABLED, ENABLING, DISABLING, DISABLED, ENABLED_BY_DEFAULT
864
+ # })
865
+ #
866
+ # @example Response structure
867
+ #
868
+ # resp.next_token #=> String
869
+ # resp.regions #=> Array
870
+ # resp.regions[0].region_name #=> String
871
+ # resp.regions[0].region_opt_status #=> String, one of "ENABLED", "ENABLING", "DISABLING", "DISABLED", "ENABLED_BY_DEFAULT"
872
+ #
873
+ # @see http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/ListRegions AWS API Documentation
874
+ #
875
+ # @overload list_regions(params = {})
876
+ # @param [Hash] params ({})
877
+ def list_regions(params = {}, options = {})
878
+ req = build_request(:list_regions, params)
879
+ req.send_request(options)
880
+ end
881
+
602
882
  # Modifies the specified alternate contact attached to an Amazon Web
603
883
  # Services account.
604
884
  #
@@ -777,7 +1057,7 @@ module Aws::Account
777
1057
  params: params,
778
1058
  config: config)
779
1059
  context[:gem_name] = 'aws-sdk-account'
780
- context[:gem_version] = '1.9.0'
1060
+ context[:gem_version] = '1.11.0'
781
1061
  Seahorse::Client::Request.new(handlers, context)
782
1062
  end
783
1063
 
@@ -20,29 +20,47 @@ module Aws::Account
20
20
  AlternateContactType = Shapes::StringShape.new(name: 'AlternateContactType')
21
21
  City = Shapes::StringShape.new(name: 'City')
22
22
  CompanyName = Shapes::StringShape.new(name: 'CompanyName')
23
+ ConflictException = Shapes::StructureShape.new(name: 'ConflictException')
23
24
  ContactInformation = Shapes::StructureShape.new(name: 'ContactInformation')
24
25
  ContactInformationPhoneNumber = Shapes::StringShape.new(name: 'ContactInformationPhoneNumber')
25
26
  CountryCode = Shapes::StringShape.new(name: 'CountryCode')
26
27
  DeleteAlternateContactRequest = Shapes::StructureShape.new(name: 'DeleteAlternateContactRequest')
28
+ DisableRegionRequest = Shapes::StructureShape.new(name: 'DisableRegionRequest')
27
29
  DistrictOrCounty = Shapes::StringShape.new(name: 'DistrictOrCounty')
28
30
  EmailAddress = Shapes::StringShape.new(name: 'EmailAddress')
31
+ EnableRegionRequest = Shapes::StructureShape.new(name: 'EnableRegionRequest')
29
32
  FullName = Shapes::StringShape.new(name: 'FullName')
30
33
  GetAlternateContactRequest = Shapes::StructureShape.new(name: 'GetAlternateContactRequest')
31
34
  GetAlternateContactResponse = Shapes::StructureShape.new(name: 'GetAlternateContactResponse')
32
35
  GetContactInformationRequest = Shapes::StructureShape.new(name: 'GetContactInformationRequest')
33
36
  GetContactInformationResponse = Shapes::StructureShape.new(name: 'GetContactInformationResponse')
37
+ GetRegionOptStatusRequest = Shapes::StructureShape.new(name: 'GetRegionOptStatusRequest')
38
+ GetRegionOptStatusResponse = Shapes::StructureShape.new(name: 'GetRegionOptStatusResponse')
34
39
  InternalServerException = Shapes::StructureShape.new(name: 'InternalServerException')
40
+ ListRegionsRequest = Shapes::StructureShape.new(name: 'ListRegionsRequest')
41
+ ListRegionsRequestMaxResultsInteger = Shapes::IntegerShape.new(name: 'ListRegionsRequestMaxResultsInteger')
42
+ ListRegionsRequestNextTokenString = Shapes::StringShape.new(name: 'ListRegionsRequestNextTokenString')
43
+ ListRegionsResponse = Shapes::StructureShape.new(name: 'ListRegionsResponse')
35
44
  Name = Shapes::StringShape.new(name: 'Name')
36
45
  PhoneNumber = Shapes::StringShape.new(name: 'PhoneNumber')
37
46
  PostalCode = Shapes::StringShape.new(name: 'PostalCode')
38
47
  PutAlternateContactRequest = Shapes::StructureShape.new(name: 'PutAlternateContactRequest')
39
48
  PutContactInformationRequest = Shapes::StructureShape.new(name: 'PutContactInformationRequest')
49
+ Region = Shapes::StructureShape.new(name: 'Region')
50
+ RegionName = Shapes::StringShape.new(name: 'RegionName')
51
+ RegionOptList = Shapes::ListShape.new(name: 'RegionOptList')
52
+ RegionOptStatus = Shapes::StringShape.new(name: 'RegionOptStatus')
53
+ RegionOptStatusList = Shapes::ListShape.new(name: 'RegionOptStatusList')
40
54
  ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
55
+ SensitiveString = Shapes::StringShape.new(name: 'SensitiveString')
41
56
  StateOrRegion = Shapes::StringShape.new(name: 'StateOrRegion')
42
57
  String = Shapes::StringShape.new(name: 'String')
43
58
  Title = Shapes::StringShape.new(name: 'Title')
44
59
  TooManyRequestsException = Shapes::StructureShape.new(name: 'TooManyRequestsException')
45
60
  ValidationException = Shapes::StructureShape.new(name: 'ValidationException')
61
+ ValidationExceptionField = Shapes::StructureShape.new(name: 'ValidationExceptionField')
62
+ ValidationExceptionFieldList = Shapes::ListShape.new(name: 'ValidationExceptionFieldList')
63
+ ValidationExceptionReason = Shapes::StringShape.new(name: 'ValidationExceptionReason')
46
64
  WebsiteUrl = Shapes::StringShape.new(name: 'WebsiteUrl')
47
65
 
48
66
  AccessDeniedException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
@@ -55,6 +73,9 @@ module Aws::Account
55
73
  AlternateContact.add_member(:title, Shapes::ShapeRef.new(shape: Title, location_name: "Title"))
56
74
  AlternateContact.struct_class = Types::AlternateContact
57
75
 
76
+ ConflictException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
77
+ ConflictException.struct_class = Types::ConflictException
78
+
58
79
  ContactInformation.add_member(:address_line_1, Shapes::ShapeRef.new(shape: AddressLine, required: true, location_name: "AddressLine1"))
59
80
  ContactInformation.add_member(:address_line_2, Shapes::ShapeRef.new(shape: AddressLine, location_name: "AddressLine2"))
60
81
  ContactInformation.add_member(:address_line_3, Shapes::ShapeRef.new(shape: AddressLine, location_name: "AddressLine3"))
@@ -73,6 +94,14 @@ module Aws::Account
73
94
  DeleteAlternateContactRequest.add_member(:alternate_contact_type, Shapes::ShapeRef.new(shape: AlternateContactType, required: true, location_name: "AlternateContactType"))
74
95
  DeleteAlternateContactRequest.struct_class = Types::DeleteAlternateContactRequest
75
96
 
97
+ DisableRegionRequest.add_member(:account_id, Shapes::ShapeRef.new(shape: AccountId, location_name: "AccountId"))
98
+ DisableRegionRequest.add_member(:region_name, Shapes::ShapeRef.new(shape: RegionName, required: true, location_name: "RegionName"))
99
+ DisableRegionRequest.struct_class = Types::DisableRegionRequest
100
+
101
+ EnableRegionRequest.add_member(:account_id, Shapes::ShapeRef.new(shape: AccountId, location_name: "AccountId"))
102
+ EnableRegionRequest.add_member(:region_name, Shapes::ShapeRef.new(shape: RegionName, required: true, location_name: "RegionName"))
103
+ EnableRegionRequest.struct_class = Types::EnableRegionRequest
104
+
76
105
  GetAlternateContactRequest.add_member(:account_id, Shapes::ShapeRef.new(shape: AccountId, location_name: "AccountId"))
77
106
  GetAlternateContactRequest.add_member(:alternate_contact_type, Shapes::ShapeRef.new(shape: AlternateContactType, required: true, location_name: "AlternateContactType"))
78
107
  GetAlternateContactRequest.struct_class = Types::GetAlternateContactRequest
@@ -86,9 +115,27 @@ module Aws::Account
86
115
  GetContactInformationResponse.add_member(:contact_information, Shapes::ShapeRef.new(shape: ContactInformation, location_name: "ContactInformation"))
87
116
  GetContactInformationResponse.struct_class = Types::GetContactInformationResponse
88
117
 
118
+ GetRegionOptStatusRequest.add_member(:account_id, Shapes::ShapeRef.new(shape: AccountId, location_name: "AccountId"))
119
+ GetRegionOptStatusRequest.add_member(:region_name, Shapes::ShapeRef.new(shape: RegionName, required: true, location_name: "RegionName"))
120
+ GetRegionOptStatusRequest.struct_class = Types::GetRegionOptStatusRequest
121
+
122
+ GetRegionOptStatusResponse.add_member(:region_name, Shapes::ShapeRef.new(shape: RegionName, location_name: "RegionName"))
123
+ GetRegionOptStatusResponse.add_member(:region_opt_status, Shapes::ShapeRef.new(shape: RegionOptStatus, location_name: "RegionOptStatus"))
124
+ GetRegionOptStatusResponse.struct_class = Types::GetRegionOptStatusResponse
125
+
89
126
  InternalServerException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
90
127
  InternalServerException.struct_class = Types::InternalServerException
91
128
 
129
+ ListRegionsRequest.add_member(:account_id, Shapes::ShapeRef.new(shape: AccountId, location_name: "AccountId"))
130
+ ListRegionsRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: ListRegionsRequestMaxResultsInteger, location_name: "MaxResults"))
131
+ ListRegionsRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: ListRegionsRequestNextTokenString, location_name: "NextToken"))
132
+ ListRegionsRequest.add_member(:region_opt_status_contains, Shapes::ShapeRef.new(shape: RegionOptStatusList, location_name: "RegionOptStatusContains"))
133
+ ListRegionsRequest.struct_class = Types::ListRegionsRequest
134
+
135
+ ListRegionsResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
136
+ ListRegionsResponse.add_member(:regions, Shapes::ShapeRef.new(shape: RegionOptList, location_name: "Regions"))
137
+ ListRegionsResponse.struct_class = Types::ListRegionsResponse
138
+
92
139
  PutAlternateContactRequest.add_member(:account_id, Shapes::ShapeRef.new(shape: AccountId, location_name: "AccountId"))
93
140
  PutAlternateContactRequest.add_member(:alternate_contact_type, Shapes::ShapeRef.new(shape: AlternateContactType, required: true, location_name: "AlternateContactType"))
94
141
  PutAlternateContactRequest.add_member(:email_address, Shapes::ShapeRef.new(shape: EmailAddress, required: true, location_name: "EmailAddress"))
@@ -101,15 +148,31 @@ module Aws::Account
101
148
  PutContactInformationRequest.add_member(:contact_information, Shapes::ShapeRef.new(shape: ContactInformation, required: true, location_name: "ContactInformation"))
102
149
  PutContactInformationRequest.struct_class = Types::PutContactInformationRequest
103
150
 
151
+ Region.add_member(:region_name, Shapes::ShapeRef.new(shape: RegionName, location_name: "RegionName"))
152
+ Region.add_member(:region_opt_status, Shapes::ShapeRef.new(shape: RegionOptStatus, location_name: "RegionOptStatus"))
153
+ Region.struct_class = Types::Region
154
+
155
+ RegionOptList.member = Shapes::ShapeRef.new(shape: Region)
156
+
157
+ RegionOptStatusList.member = Shapes::ShapeRef.new(shape: RegionOptStatus)
158
+
104
159
  ResourceNotFoundException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
105
160
  ResourceNotFoundException.struct_class = Types::ResourceNotFoundException
106
161
 
107
162
  TooManyRequestsException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
108
163
  TooManyRequestsException.struct_class = Types::TooManyRequestsException
109
164
 
110
- ValidationException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
165
+ ValidationException.add_member(:field_list, Shapes::ShapeRef.new(shape: ValidationExceptionFieldList, location_name: "fieldList"))
166
+ ValidationException.add_member(:message, Shapes::ShapeRef.new(shape: SensitiveString, required: true, location_name: "message"))
167
+ ValidationException.add_member(:reason, Shapes::ShapeRef.new(shape: ValidationExceptionReason, location_name: "reason"))
111
168
  ValidationException.struct_class = Types::ValidationException
112
169
 
170
+ ValidationExceptionField.add_member(:message, Shapes::ShapeRef.new(shape: SensitiveString, required: true, location_name: "message"))
171
+ ValidationExceptionField.add_member(:name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "name"))
172
+ ValidationExceptionField.struct_class = Types::ValidationExceptionField
173
+
174
+ ValidationExceptionFieldList.member = Shapes::ShapeRef.new(shape: ValidationExceptionField)
175
+
113
176
 
114
177
  # @api private
115
178
  API = Seahorse::Model::Api.new.tap do |api|
@@ -141,6 +204,32 @@ module Aws::Account
141
204
  o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
142
205
  end)
143
206
 
207
+ api.add_operation(:disable_region, Seahorse::Model::Operation.new.tap do |o|
208
+ o.name = "DisableRegion"
209
+ o.http_method = "POST"
210
+ o.http_request_uri = "/disableRegion"
211
+ o.input = Shapes::ShapeRef.new(shape: DisableRegionRequest)
212
+ o.output = Shapes::ShapeRef.new(shape: Shapes::StructureShape.new(struct_class: Aws::EmptyStructure))
213
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
214
+ o.errors << Shapes::ShapeRef.new(shape: ConflictException)
215
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
216
+ o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
217
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
218
+ end)
219
+
220
+ api.add_operation(:enable_region, Seahorse::Model::Operation.new.tap do |o|
221
+ o.name = "EnableRegion"
222
+ o.http_method = "POST"
223
+ o.http_request_uri = "/enableRegion"
224
+ o.input = Shapes::ShapeRef.new(shape: EnableRegionRequest)
225
+ o.output = Shapes::ShapeRef.new(shape: Shapes::StructureShape.new(struct_class: Aws::EmptyStructure))
226
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
227
+ o.errors << Shapes::ShapeRef.new(shape: ConflictException)
228
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
229
+ o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
230
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
231
+ end)
232
+
144
233
  api.add_operation(:get_alternate_contact, Seahorse::Model::Operation.new.tap do |o|
145
234
  o.name = "GetAlternateContact"
146
235
  o.http_method = "POST"
@@ -167,6 +256,36 @@ module Aws::Account
167
256
  o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
168
257
  end)
169
258
 
259
+ api.add_operation(:get_region_opt_status, Seahorse::Model::Operation.new.tap do |o|
260
+ o.name = "GetRegionOptStatus"
261
+ o.http_method = "POST"
262
+ o.http_request_uri = "/getRegionOptStatus"
263
+ o.input = Shapes::ShapeRef.new(shape: GetRegionOptStatusRequest)
264
+ o.output = Shapes::ShapeRef.new(shape: GetRegionOptStatusResponse)
265
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
266
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
267
+ o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
268
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
269
+ end)
270
+
271
+ api.add_operation(:list_regions, Seahorse::Model::Operation.new.tap do |o|
272
+ o.name = "ListRegions"
273
+ o.http_method = "POST"
274
+ o.http_request_uri = "/listRegions"
275
+ o.input = Shapes::ShapeRef.new(shape: ListRegionsRequest)
276
+ o.output = Shapes::ShapeRef.new(shape: ListRegionsResponse)
277
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
278
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
279
+ o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
280
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
281
+ o[:pager] = Aws::Pager.new(
282
+ limit_key: "max_results",
283
+ tokens: {
284
+ "next_token" => "next_token"
285
+ }
286
+ )
287
+ end)
288
+
170
289
  api.add_operation(:put_alternate_contact, Seahorse::Model::Operation.new.tap do |o|
171
290
  o.name = "PutAlternateContact"
172
291
  o.http_method = "POST"
@@ -14,84 +14,87 @@ module Aws::Account
14
14
  use_dual_stack = parameters.use_dual_stack
15
15
  use_fips = parameters.use_fips
16
16
  endpoint = parameters.endpoint
17
- if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
18
- if Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint))
19
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
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.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws")
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://account-fips.#{region}.api.aws", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"account", "signingRegion"=>"us-east-1"}]})
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.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws")
29
+ if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
30
+ 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"))
31
+ return Aws::Endpoints::Endpoint.new(url: "https://account-fips.#{region}.api.aws", headers: {}, properties: {})
32
+ end
33
+ raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
31
34
  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://account-fips.#{region}.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"account", "signingRegion"=>"us-east-1"}]})
35
+ if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
36
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
37
+ return Aws::Endpoints::Endpoint.new(url: "https://account-fips.#{region}.amazonaws.com", headers: {}, properties: {})
38
+ end
39
+ raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
37
40
  end
38
- raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
41
+ if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
42
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
43
+ return Aws::Endpoints::Endpoint.new(url: "https://account.#{region}.api.aws", headers: {}, properties: {})
44
+ end
45
+ raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
46
+ end
47
+ return Aws::Endpoints::Endpoint.new(url: "https://account.us-east-1.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"account", "signingRegion"=>"us-east-1"}]})
39
48
  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://account.#{region}.api.aws", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"account", "signingRegion"=>"us-east-1"}]})
49
+ if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-cn")
50
+ if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
51
+ 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"))
52
+ return Aws::Endpoints::Endpoint.new(url: "https://account-fips.#{region}.api.amazonwebservices.com.cn", headers: {}, properties: {})
53
+ end
54
+ raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
43
55
  end
44
- raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
56
+ if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
57
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
58
+ return Aws::Endpoints::Endpoint.new(url: "https://account-fips.#{region}.amazonaws.com.cn", headers: {}, properties: {})
59
+ end
60
+ raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
61
+ end
62
+ if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
63
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
64
+ return Aws::Endpoints::Endpoint.new(url: "https://account.#{region}.api.amazonwebservices.com.cn", headers: {}, properties: {})
65
+ end
66
+ raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
67
+ end
68
+ return Aws::Endpoints::Endpoint.new(url: "https://account.cn-northwest-1.amazonaws.com.cn", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"account", "signingRegion"=>"cn-northwest-1"}]})
45
69
  end
46
- return Aws::Endpoints::Endpoint.new(url: "https://account.us-east-1.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"account", "signingRegion"=>"us-east-1"}]})
47
- end
48
- if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-cn")
49
70
  if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
50
71
  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"))
51
- return Aws::Endpoints::Endpoint.new(url: "https://account-fips.#{region}.api.amazonwebservices.com.cn", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"account", "signingRegion"=>"cn-northwest-1"}]})
72
+ return Aws::Endpoints::Endpoint.new(url: "https://account-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
52
73
  end
53
74
  raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
54
75
  end
55
76
  if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
56
77
  if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
57
- return Aws::Endpoints::Endpoint.new(url: "https://account-fips.#{region}.amazonaws.com.cn", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"account", "signingRegion"=>"cn-northwest-1"}]})
78
+ return Aws::Endpoints::Endpoint.new(url: "https://account-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
58
79
  end
59
80
  raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
60
81
  end
61
82
  if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
62
83
  if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
63
- return Aws::Endpoints::Endpoint.new(url: "https://account.#{region}.api.amazonwebservices.com.cn", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"account", "signingRegion"=>"cn-northwest-1"}]})
84
+ return Aws::Endpoints::Endpoint.new(url: "https://account.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
64
85
  end
65
86
  raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
66
87
  end
67
- return Aws::Endpoints::Endpoint.new(url: "https://account.cn-northwest-1.amazonaws.com.cn", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"account", "signingRegion"=>"cn-northwest-1"}]})
68
- end
69
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
70
- 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"))
71
- return Aws::Endpoints::Endpoint.new(url: "https://account-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
88
+ if Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
89
+ return Aws::Endpoints::Endpoint.new(url: "https://account.us-east-1.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"account", "signingRegion"=>"us-east-1"}]})
72
90
  end
73
- raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
74
- end
75
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
76
- if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
77
- return Aws::Endpoints::Endpoint.new(url: "https://account-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
91
+ if Aws::Endpoints::Matchers.string_equals?(region, "aws-cn-global")
92
+ return Aws::Endpoints::Endpoint.new(url: "https://account.cn-northwest-1.amazonaws.com.cn", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"account", "signingRegion"=>"cn-northwest-1"}]})
78
93
  end
79
- raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
80
- end
81
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
82
- if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
83
- return Aws::Endpoints::Endpoint.new(url: "https://account.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
84
- end
85
- raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
86
- end
87
- if Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
88
- return Aws::Endpoints::Endpoint.new(url: "https://account.us-east-1.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"account", "signingRegion"=>"us-east-1"}]})
89
- end
90
- if Aws::Endpoints::Matchers.string_equals?(region, "aws-cn-global")
91
- return Aws::Endpoints::Endpoint.new(url: "https://account.cn-northwest-1.amazonaws.com.cn", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"account", "signingRegion"=>"cn-northwest-1"}]})
94
+ return Aws::Endpoints::Endpoint.new(url: "https://account.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
92
95
  end
93
- return Aws::Endpoints::Endpoint.new(url: "https://account.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
94
96
  end
97
+ raise ArgumentError, "Invalid Configuration: Missing Region"
95
98
  raise ArgumentError, 'No endpoint could be resolved'
96
99
 
97
100
  end
@@ -25,6 +25,34 @@ module Aws::Account
25
25
  end
26
26
  end
27
27
 
28
+ class DisableRegion
29
+ def self.build(context)
30
+ unless context.config.regional_endpoint
31
+ endpoint = context.config.endpoint.to_s
32
+ end
33
+ Aws::Account::EndpointParameters.new(
34
+ region: context.config.region,
35
+ use_dual_stack: context.config.use_dualstack_endpoint,
36
+ use_fips: context.config.use_fips_endpoint,
37
+ endpoint: endpoint,
38
+ )
39
+ end
40
+ end
41
+
42
+ class EnableRegion
43
+ def self.build(context)
44
+ unless context.config.regional_endpoint
45
+ endpoint = context.config.endpoint.to_s
46
+ end
47
+ Aws::Account::EndpointParameters.new(
48
+ region: context.config.region,
49
+ use_dual_stack: context.config.use_dualstack_endpoint,
50
+ use_fips: context.config.use_fips_endpoint,
51
+ endpoint: endpoint,
52
+ )
53
+ end
54
+ end
55
+
28
56
  class GetAlternateContact
29
57
  def self.build(context)
30
58
  unless context.config.regional_endpoint
@@ -53,6 +81,34 @@ module Aws::Account
53
81
  end
54
82
  end
55
83
 
84
+ class GetRegionOptStatus
85
+ def self.build(context)
86
+ unless context.config.regional_endpoint
87
+ endpoint = context.config.endpoint.to_s
88
+ end
89
+ Aws::Account::EndpointParameters.new(
90
+ region: context.config.region,
91
+ use_dual_stack: context.config.use_dualstack_endpoint,
92
+ use_fips: context.config.use_fips_endpoint,
93
+ endpoint: endpoint,
94
+ )
95
+ end
96
+ end
97
+
98
+ class ListRegions
99
+ def self.build(context)
100
+ unless context.config.regional_endpoint
101
+ endpoint = context.config.endpoint.to_s
102
+ end
103
+ Aws::Account::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
+
56
112
  class PutAlternateContact
57
113
  def self.build(context)
58
114
  unless context.config.regional_endpoint
@@ -28,6 +28,7 @@ module Aws::Account
28
28
  #
29
29
  # ## Error Classes
30
30
  # * {AccessDeniedException}
31
+ # * {ConflictException}
31
32
  # * {InternalServerException}
32
33
  # * {ResourceNotFoundException}
33
34
  # * {TooManyRequestsException}
@@ -54,6 +55,21 @@ module Aws::Account
54
55
  end
55
56
  end
56
57
 
58
+ class ConflictException < ServiceError
59
+
60
+ # @param [Seahorse::Client::RequestContext] context
61
+ # @param [String] message
62
+ # @param [Aws::Account::Types::ConflictException] data
63
+ def initialize(context, message, data = Aws::EmptyStructure.new)
64
+ super(context, message, data)
65
+ end
66
+
67
+ # @return [String]
68
+ def message
69
+ @message || @data[:message]
70
+ end
71
+ end
72
+
57
73
  class InternalServerException < ServiceError
58
74
 
59
75
  # @param [Seahorse::Client::RequestContext] context
@@ -120,10 +136,20 @@ module Aws::Account
120
136
  super(context, message, data)
121
137
  end
122
138
 
139
+ # @return [String]
140
+ def field_list
141
+ @data[:field_list]
142
+ end
143
+
123
144
  # @return [String]
124
145
  def message
125
146
  @message || @data[:message]
126
147
  end
148
+
149
+ # @return [String]
150
+ def reason
151
+ @data[:reason]
152
+ end
127
153
  end
128
154
 
129
155
  end
@@ -58,10 +58,18 @@ module Aws::Account
58
58
  case context.operation_name
59
59
  when :delete_alternate_contact
60
60
  Aws::Account::Endpoints::DeleteAlternateContact.build(context)
61
+ when :disable_region
62
+ Aws::Account::Endpoints::DisableRegion.build(context)
63
+ when :enable_region
64
+ Aws::Account::Endpoints::EnableRegion.build(context)
61
65
  when :get_alternate_contact
62
66
  Aws::Account::Endpoints::GetAlternateContact.build(context)
63
67
  when :get_contact_information
64
68
  Aws::Account::Endpoints::GetContactInformation.build(context)
69
+ when :get_region_opt_status
70
+ Aws::Account::Endpoints::GetRegionOptStatus.build(context)
71
+ when :list_regions
72
+ Aws::Account::Endpoints::ListRegions.build(context)
65
73
  when :put_alternate_contact
66
74
  Aws::Account::Endpoints::PutAlternateContact.build(context)
67
75
  when :put_contact_information
@@ -59,6 +59,22 @@ module Aws::Account
59
59
  include Aws::Structure
60
60
  end
61
61
 
62
+ # The request could not be processed because of a conflict in the
63
+ # current status of the resource. For example, this happens if you try
64
+ # to enable a Region that is currently being disabled (in a status of
65
+ # DISABLING).
66
+ #
67
+ # @!attribute [rw] message
68
+ # @return [String]
69
+ #
70
+ # @see http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/ConflictException AWS API Documentation
71
+ #
72
+ class ConflictException < Struct.new(
73
+ :message)
74
+ SENSITIVE = []
75
+ include Aws::Structure
76
+ end
77
+
62
78
  # Contains the details of the primary contact information associated
63
79
  # with an Amazon Web Services account.
64
80
  #
@@ -181,6 +197,109 @@ module Aws::Account
181
197
  include Aws::Structure
182
198
  end
183
199
 
200
+ # @!attribute [rw] account_id
201
+ # Specifies the 12-digit account ID number of the Amazon Web Services
202
+ # account that you want to access or modify with this operation. If
203
+ # you don't specify this parameter, it defaults to the Amazon Web
204
+ # Services account of the identity used to call the operation. To use
205
+ # this parameter, the caller must be an identity in the
206
+ # [organization's management account][1] or a delegated administrator
207
+ # account. The specified account ID must also be a member account in
208
+ # the same organization. The organization must have [all features
209
+ # enabled][2], and the organization must have [trusted access][3]
210
+ # enabled for the Account Management service, and optionally a
211
+ # [delegated admin][4] account assigned.
212
+ #
213
+ # <note markdown="1"> The management account can't specify its own `AccountId`. It must
214
+ # call the operation in standalone context by not including the
215
+ # `AccountId` parameter.
216
+ #
217
+ # </note>
218
+ #
219
+ # To call this operation on an account that is not a member of an
220
+ # organization, don't specify this parameter. Instead, call the
221
+ # operation using an identity belonging to the account whose contacts
222
+ # you wish to retrieve or modify.
223
+ #
224
+ #
225
+ #
226
+ # [1]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account
227
+ # [2]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html
228
+ # [3]: https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-trusted-access.html
229
+ # [4]: https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-delegated-admin.html
230
+ # @return [String]
231
+ #
232
+ # @!attribute [rw] region_name
233
+ # Specifies the Region-code for a given Region name (for example,
234
+ # `af-south-1`). When you disable a Region, Amazon Web Services
235
+ # performs actions to deactivate that Region in your account, such as
236
+ # destroying IAM resources in the Region. This process takes a few
237
+ # minutes for most accounts, but this can take several hours. You
238
+ # cannot enable the Region until the disabling process is fully
239
+ # completed.
240
+ # @return [String]
241
+ #
242
+ # @see http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/DisableRegionRequest AWS API Documentation
243
+ #
244
+ class DisableRegionRequest < Struct.new(
245
+ :account_id,
246
+ :region_name)
247
+ SENSITIVE = []
248
+ include Aws::Structure
249
+ end
250
+
251
+ # @!attribute [rw] account_id
252
+ # Specifies the 12-digit account ID number of the Amazon Web Services
253
+ # account that you want to access or modify with this operation. If
254
+ # you don't specify this parameter, it defaults to the Amazon Web
255
+ # Services account of the identity used to call the operation. To use
256
+ # this parameter, the caller must be an identity in the
257
+ # [organization's management account][1] or a delegated administrator
258
+ # account. The specified account ID must also be a member account in
259
+ # the same organization. The organization must have [all features
260
+ # enabled][2], and the organization must have [trusted access][3]
261
+ # enabled for the Account Management service, and optionally a
262
+ # [delegated admin][4] account assigned.
263
+ #
264
+ # <note markdown="1"> The management account can't specify its own `AccountId`. It must
265
+ # call the operation in standalone context by not including the
266
+ # `AccountId` parameter.
267
+ #
268
+ # </note>
269
+ #
270
+ # To call this operation on an account that is not a member of an
271
+ # organization, don't specify this parameter. Instead, call the
272
+ # operation using an identity belonging to the account whose contacts
273
+ # you wish to retrieve or modify.
274
+ #
275
+ #
276
+ #
277
+ # [1]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account
278
+ # [2]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html
279
+ # [3]: https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-trusted-access.html
280
+ # [4]: https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-delegated-admin.html
281
+ # @return [String]
282
+ #
283
+ # @!attribute [rw] region_name
284
+ # Specifies the Region-code for a given Region name (for example,
285
+ # `af-south-1`). When you enable a Region, Amazon Web Services
286
+ # performs actions to prepare your account in that Region, such as
287
+ # distributing your IAM resources to the Region. This process takes a
288
+ # few minutes for most accounts, but it can take several hours. You
289
+ # cannot use the Region until this process is complete. Furthermore,
290
+ # you cannot disable the Region until the enabling process is fully
291
+ # completed.
292
+ # @return [String]
293
+ #
294
+ # @see http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/EnableRegionRequest AWS API Documentation
295
+ #
296
+ class EnableRegionRequest < Struct.new(
297
+ :account_id,
298
+ :region_name)
299
+ SENSITIVE = []
300
+ include Aws::Structure
301
+ end
302
+
184
303
  # @!attribute [rw] account_id
185
304
  # Specifies the 12 digit account ID number of the Amazon Web Services
186
305
  # account that you want to access or modify with this operation.
@@ -294,6 +413,71 @@ module Aws::Account
294
413
  include Aws::Structure
295
414
  end
296
415
 
416
+ # @!attribute [rw] account_id
417
+ # Specifies the 12-digit account ID number of the Amazon Web Services
418
+ # account that you want to access or modify with this operation. If
419
+ # you don't specify this parameter, it defaults to the Amazon Web
420
+ # Services account of the identity used to call the operation. To use
421
+ # this parameter, the caller must be an identity in the
422
+ # [organization's management account][1] or a delegated administrator
423
+ # account. The specified account ID must also be a member account in
424
+ # the same organization. The organization must have [all features
425
+ # enabled][2], and the organization must have [trusted access][3]
426
+ # enabled for the Account Management service, and optionally a
427
+ # [delegated admin][4] account assigned.
428
+ #
429
+ # <note markdown="1"> The management account can't specify its own `AccountId`. It must
430
+ # call the operation in standalone context by not including the
431
+ # `AccountId` parameter.
432
+ #
433
+ # </note>
434
+ #
435
+ # To call this operation on an account that is not a member of an
436
+ # organization, don't specify this parameter. Instead, call the
437
+ # operation using an identity belonging to the account whose contacts
438
+ # you wish to retrieve or modify.
439
+ #
440
+ #
441
+ #
442
+ # [1]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account
443
+ # [2]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html
444
+ # [3]: https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-trusted-access.html
445
+ # [4]: https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-delegated-admin.html
446
+ # @return [String]
447
+ #
448
+ # @!attribute [rw] region_name
449
+ # Specifies the Region-code for a given Region name (for example,
450
+ # `af-south-1`). This function will return the status of whatever
451
+ # Region you pass into this parameter.
452
+ # @return [String]
453
+ #
454
+ # @see http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/GetRegionOptStatusRequest AWS API Documentation
455
+ #
456
+ class GetRegionOptStatusRequest < Struct.new(
457
+ :account_id,
458
+ :region_name)
459
+ SENSITIVE = []
460
+ include Aws::Structure
461
+ end
462
+
463
+ # @!attribute [rw] region_name
464
+ # The Region code that was passed in.
465
+ # @return [String]
466
+ #
467
+ # @!attribute [rw] region_opt_status
468
+ # One of the potential statuses a Region can undergo (Enabled,
469
+ # Enabling, Disabled, Disabling, Enabled\_By\_Default).
470
+ # @return [String]
471
+ #
472
+ # @see http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/GetRegionOptStatusResponse AWS API Documentation
473
+ #
474
+ class GetRegionOptStatusResponse < Struct.new(
475
+ :region_name,
476
+ :region_opt_status)
477
+ SENSITIVE = []
478
+ include Aws::Structure
479
+ end
480
+
297
481
  # The operation failed because of an error internal to Amazon Web
298
482
  # Services. Try your operation again later.
299
483
  #
@@ -308,6 +492,103 @@ module Aws::Account
308
492
  include Aws::Structure
309
493
  end
310
494
 
495
+ # @!attribute [rw] account_id
496
+ # Specifies the 12-digit account ID number of the Amazon Web Services
497
+ # account that you want to access or modify with this operation. If
498
+ # you don't specify this parameter, it defaults to the Amazon Web
499
+ # Services account of the identity used to call the operation. To use
500
+ # this parameter, the caller must be an identity in the
501
+ # [organization's management account][1] or a delegated administrator
502
+ # account. The specified account ID must also be a member account in
503
+ # the same organization. The organization must have [all features
504
+ # enabled][2], and the organization must have [trusted access][3]
505
+ # enabled for the Account Management service, and optionally a
506
+ # [delegated admin][4] account assigned.
507
+ #
508
+ # <note markdown="1"> The management account can't specify its own `AccountId`. It must
509
+ # call the operation in standalone context by not including the
510
+ # `AccountId` parameter.
511
+ #
512
+ # </note>
513
+ #
514
+ # To call this operation on an account that is not a member of an
515
+ # organization, don't specify this parameter. Instead, call the
516
+ # operation using an identity belonging to the account whose contacts
517
+ # you wish to retrieve or modify.
518
+ #
519
+ #
520
+ #
521
+ # [1]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account
522
+ # [2]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html
523
+ # [3]: https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-trusted-access.html
524
+ # [4]: https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-delegated-admin.html
525
+ # @return [String]
526
+ #
527
+ # @!attribute [rw] max_results
528
+ # The total number of items to return in the command’s output. If the
529
+ # total number of items available is more than the value specified, a
530
+ # `NextToken` is provided in the command’s output. To resume
531
+ # pagination, provide the `NextToken` value in the `starting-token`
532
+ # argument of a subsequent command. Do not use the `NextToken`
533
+ # response element directly outside of the Amazon Web Services CLI.
534
+ # For usage examples, see [Pagination][1] in the *Amazon Web Services
535
+ # Command Line Interface User Guide*.
536
+ #
537
+ #
538
+ #
539
+ # [1]: http://docs.aws.amazon.com/cli/latest/userguide/pagination.html
540
+ # @return [Integer]
541
+ #
542
+ # @!attribute [rw] next_token
543
+ # A token used to specify where to start paginating. This is the
544
+ # `NextToken` from a previously truncated response. For usage
545
+ # examples, see [Pagination][1] in the *Amazon Web Services Command
546
+ # Line Interface User Guide*.
547
+ #
548
+ #
549
+ #
550
+ # [1]: http://docs.aws.amazon.com/cli/latest/userguide/pagination.html
551
+ # @return [String]
552
+ #
553
+ # @!attribute [rw] region_opt_status_contains
554
+ # A list of Region statuses (Enabling, Enabled, Disabling, Disabled,
555
+ # Enabled\_by\_default) to use to filter the list of Regions for a
556
+ # given account. For example, passing in a value of ENABLING will only
557
+ # return a list of Regions with a Region status of ENABLING.
558
+ # @return [Array<String>]
559
+ #
560
+ # @see http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/ListRegionsRequest AWS API Documentation
561
+ #
562
+ class ListRegionsRequest < Struct.new(
563
+ :account_id,
564
+ :max_results,
565
+ :next_token,
566
+ :region_opt_status_contains)
567
+ SENSITIVE = []
568
+ include Aws::Structure
569
+ end
570
+
571
+ # @!attribute [rw] next_token
572
+ # If there is more data to be returned, this will be populated. It
573
+ # should be passed into the `next-token` request parameter of
574
+ # `list-regions`.
575
+ # @return [String]
576
+ #
577
+ # @!attribute [rw] regions
578
+ # This is a list of Regions for a given account, or if the filtered
579
+ # parameter was used, a list of Regions that match the filter criteria
580
+ # set in the `filter` parameter.
581
+ # @return [Array<Types::Region>]
582
+ #
583
+ # @see http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/ListRegionsResponse AWS API Documentation
584
+ #
585
+ class ListRegionsResponse < Struct.new(
586
+ :next_token,
587
+ :regions)
588
+ SENSITIVE = []
589
+ include Aws::Structure
590
+ end
591
+
311
592
  # @!attribute [rw] account_id
312
593
  # Specifies the 12 digit account ID number of the Amazon Web Services
313
594
  # account that you want to access or modify with this operation.
@@ -421,6 +702,27 @@ module Aws::Account
421
702
  include Aws::Structure
422
703
  end
423
704
 
705
+ # This is a structure that expresses the Region for a given account,
706
+ # consisting of a name and opt-in status.
707
+ #
708
+ # @!attribute [rw] region_name
709
+ # The Region code of a given Region (for example, `us-east-1`).
710
+ # @return [String]
711
+ #
712
+ # @!attribute [rw] region_opt_status
713
+ # One of potential statuses a Region can undergo (Enabled, Enabling,
714
+ # Disabled, Disabling, Enabled\_By\_Default).
715
+ # @return [String]
716
+ #
717
+ # @see http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/Region AWS API Documentation
718
+ #
719
+ class Region < Struct.new(
720
+ :region_name,
721
+ :region_opt_status)
722
+ SENSITIVE = []
723
+ include Aws::Structure
724
+ end
725
+
424
726
  # The operation failed because it specified a resource that can't be
425
727
  # found.
426
728
  #
@@ -451,14 +753,46 @@ module Aws::Account
451
753
 
452
754
  # The operation failed because one of the input parameters was invalid.
453
755
  #
756
+ # @!attribute [rw] field_list
757
+ # The field where the invalid entry was detected.
758
+ # @return [Array<Types::ValidationExceptionField>]
759
+ #
454
760
  # @!attribute [rw] message
761
+ # The message that informs you about what was invalid about the
762
+ # request.
763
+ # @return [String]
764
+ #
765
+ # @!attribute [rw] reason
766
+ # The reason that validation failed.
455
767
  # @return [String]
456
768
  #
457
769
  # @see http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/ValidationException AWS API Documentation
458
770
  #
459
771
  class ValidationException < Struct.new(
460
- :message)
461
- SENSITIVE = []
772
+ :field_list,
773
+ :message,
774
+ :reason)
775
+ SENSITIVE = [:message]
776
+ include Aws::Structure
777
+ end
778
+
779
+ # The input failed to meet the constraints specified by the Amazon Web
780
+ # Services service in a specified field.
781
+ #
782
+ # @!attribute [rw] message
783
+ # A message about the validation exception.
784
+ # @return [String]
785
+ #
786
+ # @!attribute [rw] name
787
+ # The field name where the invalid entry was detected.
788
+ # @return [String]
789
+ #
790
+ # @see http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/ValidationExceptionField AWS API Documentation
791
+ #
792
+ class ValidationExceptionField < Struct.new(
793
+ :message,
794
+ :name)
795
+ SENSITIVE = [:message]
462
796
  include Aws::Structure
463
797
  end
464
798
 
@@ -52,6 +52,6 @@ require_relative 'aws-sdk-account/customizations'
52
52
  # @!group service
53
53
  module Aws::Account
54
54
 
55
- GEM_VERSION = '1.9.0'
55
+ GEM_VERSION = '1.11.0'
56
56
 
57
57
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-account
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-18 00:00:00.000000000 Z
11
+ date: 2023-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core