aws-sdk-account 1.9.0 → 1.10.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: 2d76fd7e648e0deafd7fec5a9bd806d1a60c494ff2a40a025a3b95c741c30b83
4
+ data.tar.gz: 101eba9dfacd7ec708d9ce9cf17f169f9a399fc7fc02f2c4b4cba9eb735ba354
5
5
  SHA512:
6
- metadata.gz: 85504118999237e9bf102aab5141c5b83526165cbcad1337e4a21e913ab7ede2c1ceacfb19d61ec39466c05f0b3ed76cbbb8be5d89cad694e8697276dfb5bab6
7
- data.tar.gz: ddd05059d5c76696efc8f381940449c4e569ec2937800507ec5f205d3465f1e8814ea9f486322cf6bbd72373a34aa183b1015049a68f3554e2eb591d07485cb1
6
+ metadata.gz: a290e7a52e78b978de93845663a4b147d9888bdf9b9a938e2f91f03e2da43cd15eba0e33dc470ff6a836938b38e097a58364883b4c7425cf86416a188eb80e7f
7
+ data.tar.gz: 4ee75275ffc68ca66b7e894ca461df02ad8d8a66b9656edb0b99e3d97d4757fea16348d3dd2288894ead2e11bb4283ec2e3e006d17824ba95b59efffafabb19a
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.10.0 (2023-02-13)
5
+ ------------------
6
+
7
+ * 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
8
+
4
9
  1.9.0 (2023-01-18)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.9.0
1
+ 1.10.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, AWS performs actions to
480
+ # deactivate that Region in your account, such as destroying IAM
481
+ # 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, AWS performs actions to
539
+ # prepare your account in that Region, such as distributing your IAM
540
+ # resources to the Region. This process takes a few minutes for most
541
+ # accounts, but it can take several hours. You cannot use the Region
542
+ # until this process is complete. Furthermore, you cannot disable the
543
+ # 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.10.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,107 @@ 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, AWS performs actions to
235
+ # deactivate that Region in your account, such as destroying IAM
236
+ # resources in the Region. This process takes a few minutes for most
237
+ # accounts, but this can take several hours. You cannot enable the
238
+ # Region until the disabling process is fully completed.
239
+ # @return [String]
240
+ #
241
+ # @see http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/DisableRegionRequest AWS API Documentation
242
+ #
243
+ class DisableRegionRequest < Struct.new(
244
+ :account_id,
245
+ :region_name)
246
+ SENSITIVE = []
247
+ include Aws::Structure
248
+ end
249
+
250
+ # @!attribute [rw] account_id
251
+ # Specifies the 12-digit account ID number of the Amazon Web Services
252
+ # account that you want to access or modify with this operation. If
253
+ # you don't specify this parameter, it defaults to the Amazon Web
254
+ # Services account of the identity used to call the operation. To use
255
+ # this parameter, the caller must be an identity in the
256
+ # [organization's management account][1] or a delegated administrator
257
+ # account. The specified account ID must also be a member account in
258
+ # the same organization. The organization must have [all features
259
+ # enabled][2], and the organization must have [trusted access][3]
260
+ # enabled for the Account Management service, and optionally a
261
+ # [delegated admin][4] account assigned.
262
+ #
263
+ # <note markdown="1"> The management account can't specify its own `AccountId`. It must
264
+ # call the operation in standalone context by not including the
265
+ # `AccountId` parameter.
266
+ #
267
+ # </note>
268
+ #
269
+ # To call this operation on an account that is not a member of an
270
+ # organization, don't specify this parameter. Instead, call the
271
+ # operation using an identity belonging to the account whose contacts
272
+ # you wish to retrieve or modify.
273
+ #
274
+ #
275
+ #
276
+ # [1]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account
277
+ # [2]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html
278
+ # [3]: https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-trusted-access.html
279
+ # [4]: https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-delegated-admin.html
280
+ # @return [String]
281
+ #
282
+ # @!attribute [rw] region_name
283
+ # Specifies the Region-code for a given Region name (for example,
284
+ # `af-south-1`). When you enable a Region, AWS performs actions to
285
+ # prepare your account in that Region, such as distributing your IAM
286
+ # resources to the Region. This process takes a few minutes for most
287
+ # accounts, but it can take several hours. You cannot use the Region
288
+ # until this process is complete. Furthermore, you cannot disable the
289
+ # Region until the enabling process is fully completed.
290
+ # @return [String]
291
+ #
292
+ # @see http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/EnableRegionRequest AWS API Documentation
293
+ #
294
+ class EnableRegionRequest < Struct.new(
295
+ :account_id,
296
+ :region_name)
297
+ SENSITIVE = []
298
+ include Aws::Structure
299
+ end
300
+
184
301
  # @!attribute [rw] account_id
185
302
  # Specifies the 12 digit account ID number of the Amazon Web Services
186
303
  # account that you want to access or modify with this operation.
@@ -294,6 +411,71 @@ module Aws::Account
294
411
  include Aws::Structure
295
412
  end
296
413
 
414
+ # @!attribute [rw] account_id
415
+ # Specifies the 12-digit account ID number of the Amazon Web Services
416
+ # account that you want to access or modify with this operation. If
417
+ # you don't specify this parameter, it defaults to the Amazon Web
418
+ # Services account of the identity used to call the operation. To use
419
+ # this parameter, the caller must be an identity in the
420
+ # [organization's management account][1] or a delegated administrator
421
+ # account. The specified account ID must also be a member account in
422
+ # the same organization. The organization must have [all features
423
+ # enabled][2], and the organization must have [trusted access][3]
424
+ # enabled for the Account Management service, and optionally a
425
+ # [delegated admin][4] account assigned.
426
+ #
427
+ # <note markdown="1"> The management account can't specify its own `AccountId`. It must
428
+ # call the operation in standalone context by not including the
429
+ # `AccountId` parameter.
430
+ #
431
+ # </note>
432
+ #
433
+ # To call this operation on an account that is not a member of an
434
+ # organization, don't specify this parameter. Instead, call the
435
+ # operation using an identity belonging to the account whose contacts
436
+ # you wish to retrieve or modify.
437
+ #
438
+ #
439
+ #
440
+ # [1]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account
441
+ # [2]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html
442
+ # [3]: https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-trusted-access.html
443
+ # [4]: https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-delegated-admin.html
444
+ # @return [String]
445
+ #
446
+ # @!attribute [rw] region_name
447
+ # Specifies the Region-code for a given Region name (for example,
448
+ # `af-south-1`). This function will return the status of whatever
449
+ # Region you pass into this parameter.
450
+ # @return [String]
451
+ #
452
+ # @see http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/GetRegionOptStatusRequest AWS API Documentation
453
+ #
454
+ class GetRegionOptStatusRequest < Struct.new(
455
+ :account_id,
456
+ :region_name)
457
+ SENSITIVE = []
458
+ include Aws::Structure
459
+ end
460
+
461
+ # @!attribute [rw] region_name
462
+ # The Region code that was passed in.
463
+ # @return [String]
464
+ #
465
+ # @!attribute [rw] region_opt_status
466
+ # One of the potential statuses a Region can undergo (Enabled,
467
+ # Enabling, Disabled, Disabling, Enabled\_By\_Default).
468
+ # @return [String]
469
+ #
470
+ # @see http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/GetRegionOptStatusResponse AWS API Documentation
471
+ #
472
+ class GetRegionOptStatusResponse < Struct.new(
473
+ :region_name,
474
+ :region_opt_status)
475
+ SENSITIVE = []
476
+ include Aws::Structure
477
+ end
478
+
297
479
  # The operation failed because of an error internal to Amazon Web
298
480
  # Services. Try your operation again later.
299
481
  #
@@ -308,6 +490,103 @@ module Aws::Account
308
490
  include Aws::Structure
309
491
  end
310
492
 
493
+ # @!attribute [rw] account_id
494
+ # Specifies the 12-digit account ID number of the Amazon Web Services
495
+ # account that you want to access or modify with this operation. If
496
+ # you don't specify this parameter, it defaults to the Amazon Web
497
+ # Services account of the identity used to call the operation. To use
498
+ # this parameter, the caller must be an identity in the
499
+ # [organization's management account][1] or a delegated administrator
500
+ # account. The specified account ID must also be a member account in
501
+ # the same organization. The organization must have [all features
502
+ # enabled][2], and the organization must have [trusted access][3]
503
+ # enabled for the Account Management service, and optionally a
504
+ # [delegated admin][4] account assigned.
505
+ #
506
+ # <note markdown="1"> The management account can't specify its own `AccountId`. It must
507
+ # call the operation in standalone context by not including the
508
+ # `AccountId` parameter.
509
+ #
510
+ # </note>
511
+ #
512
+ # To call this operation on an account that is not a member of an
513
+ # organization, don't specify this parameter. Instead, call the
514
+ # operation using an identity belonging to the account whose contacts
515
+ # you wish to retrieve or modify.
516
+ #
517
+ #
518
+ #
519
+ # [1]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account
520
+ # [2]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html
521
+ # [3]: https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-trusted-access.html
522
+ # [4]: https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-delegated-admin.html
523
+ # @return [String]
524
+ #
525
+ # @!attribute [rw] max_results
526
+ # The total number of items to return in the command’s output. If the
527
+ # total number of items available is more than the value specified, a
528
+ # `NextToken` is provided in the command’s output. To resume
529
+ # pagination, provide the `NextToken` value in the `starting-token`
530
+ # argument of a subsequent command. Do not use the `NextToken`
531
+ # response element directly outside of the Amazon Web Services CLI.
532
+ # For usage examples, see [Pagination][1] in the *Amazon Web Services
533
+ # Command Line Interface User Guide*.
534
+ #
535
+ #
536
+ #
537
+ # [1]: http://docs.aws.amazon.com/cli/latest/userguide/pagination.html
538
+ # @return [Integer]
539
+ #
540
+ # @!attribute [rw] next_token
541
+ # A token used to specify where to start paginating. This is the
542
+ # `NextToken` from a previously truncated response. For usage
543
+ # examples, see [Pagination][1] in the *Amazon Web Services Command
544
+ # Line Interface User Guide*.
545
+ #
546
+ #
547
+ #
548
+ # [1]: http://docs.aws.amazon.com/cli/latest/userguide/pagination.html
549
+ # @return [String]
550
+ #
551
+ # @!attribute [rw] region_opt_status_contains
552
+ # A list of Region statuses (Enabling, Enabled, Disabling, Disabled,
553
+ # Enabled\_by\_default) to use to filter the list of Regions for a
554
+ # given account. For example, passing in a value of ENABLING will only
555
+ # return a list of Regions with a Region status of ENABLING.
556
+ # @return [Array<String>]
557
+ #
558
+ # @see http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/ListRegionsRequest AWS API Documentation
559
+ #
560
+ class ListRegionsRequest < Struct.new(
561
+ :account_id,
562
+ :max_results,
563
+ :next_token,
564
+ :region_opt_status_contains)
565
+ SENSITIVE = []
566
+ include Aws::Structure
567
+ end
568
+
569
+ # @!attribute [rw] next_token
570
+ # If there is more data to be returned, this will be populated. It
571
+ # should be passed into the `next-token` request parameter of
572
+ # `list-regions`.
573
+ # @return [String]
574
+ #
575
+ # @!attribute [rw] regions
576
+ # This is a list of Regions for a given account, or if the filtered
577
+ # parameter was used, a list of Regions that match the filter criteria
578
+ # set in the `filter` parameter.
579
+ # @return [Array<Types::Region>]
580
+ #
581
+ # @see http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/ListRegionsResponse AWS API Documentation
582
+ #
583
+ class ListRegionsResponse < Struct.new(
584
+ :next_token,
585
+ :regions)
586
+ SENSITIVE = []
587
+ include Aws::Structure
588
+ end
589
+
311
590
  # @!attribute [rw] account_id
312
591
  # Specifies the 12 digit account ID number of the Amazon Web Services
313
592
  # account that you want to access or modify with this operation.
@@ -421,6 +700,27 @@ module Aws::Account
421
700
  include Aws::Structure
422
701
  end
423
702
 
703
+ # This is a structure that expresses the Region for a given account,
704
+ # consisting of a name and opt-in status.
705
+ #
706
+ # @!attribute [rw] region_name
707
+ # The Region code of a given Region (for example, `us-east-1`).
708
+ # @return [String]
709
+ #
710
+ # @!attribute [rw] region_opt_status
711
+ # One of potential statuses a Region can undergo (Enabled, Enabling,
712
+ # Disabled, Disabling, Enabled\_By\_Default).
713
+ # @return [String]
714
+ #
715
+ # @see http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/Region AWS API Documentation
716
+ #
717
+ class Region < Struct.new(
718
+ :region_name,
719
+ :region_opt_status)
720
+ SENSITIVE = []
721
+ include Aws::Structure
722
+ end
723
+
424
724
  # The operation failed because it specified a resource that can't be
425
725
  # found.
426
726
  #
@@ -451,14 +751,46 @@ module Aws::Account
451
751
 
452
752
  # The operation failed because one of the input parameters was invalid.
453
753
  #
754
+ # @!attribute [rw] field_list
755
+ # The field where the invalid entry was detected.
756
+ # @return [Array<Types::ValidationExceptionField>]
757
+ #
454
758
  # @!attribute [rw] message
759
+ # The message that informs you about what was invalid about the
760
+ # request.
761
+ # @return [String]
762
+ #
763
+ # @!attribute [rw] reason
764
+ # The reason that validation failed.
455
765
  # @return [String]
456
766
  #
457
767
  # @see http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/ValidationException AWS API Documentation
458
768
  #
459
769
  class ValidationException < Struct.new(
460
- :message)
461
- SENSITIVE = []
770
+ :field_list,
771
+ :message,
772
+ :reason)
773
+ SENSITIVE = [:message]
774
+ include Aws::Structure
775
+ end
776
+
777
+ # The input failed to meet the constraints specified by the AWS service
778
+ # in a specified field.
779
+ #
780
+ # @!attribute [rw] message
781
+ # A message about the validation exception.
782
+ # @return [String]
783
+ #
784
+ # @!attribute [rw] name
785
+ # The field name where the invalid entry was detected.
786
+ # @return [String]
787
+ #
788
+ # @see http://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/ValidationExceptionField AWS API Documentation
789
+ #
790
+ class ValidationExceptionField < Struct.new(
791
+ :message,
792
+ :name)
793
+ SENSITIVE = [:message]
462
794
  include Aws::Structure
463
795
  end
464
796
 
@@ -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.10.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.10.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-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core