aws-sdk-organizations 1.70.0 → 1.72.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,6 +67,7 @@ module Aws::Organizations
67
67
  # * {PolicyTypeAlreadyEnabledException}
68
68
  # * {PolicyTypeNotAvailableForOrganizationException}
69
69
  # * {PolicyTypeNotEnabledException}
70
+ # * {ResourcePolicyNotFoundException}
70
71
  # * {RootNotFoundException}
71
72
  # * {ServiceException}
72
73
  # * {SourceParentNotFoundException}
@@ -700,6 +701,21 @@ module Aws::Organizations
700
701
  end
701
702
  end
702
703
 
704
+ class ResourcePolicyNotFoundException < ServiceError
705
+
706
+ # @param [Seahorse::Client::RequestContext] context
707
+ # @param [String] message
708
+ # @param [Aws::Organizations::Types::ResourcePolicyNotFoundException] data
709
+ def initialize(context, message, data = Aws::EmptyStructure.new)
710
+ super(context, message, data)
711
+ end
712
+
713
+ # @return [String]
714
+ def message
715
+ @message || @data[:message]
716
+ end
717
+ end
718
+
703
719
  class RootNotFoundException < ServiceError
704
720
 
705
721
  # @param [Seahorse::Client::RequestContext] context
@@ -0,0 +1,178 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+
11
+ module Aws::Organizations
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::Organizations::EndpointProvider',
17
+ docstring: 'The endpoint provider used to resolve endpoints. Any '\
18
+ 'object that responds to `#resolve_endpoint(parameters)` '\
19
+ 'where `parameters` is a Struct similar to '\
20
+ '`Aws::Organizations::EndpointParameters`'
21
+ ) do |cfg|
22
+ Aws::Organizations::EndpointProvider.new
23
+ end
24
+
25
+ # @api private
26
+ class Handler < Seahorse::Client::Handler
27
+ def call(context)
28
+ # If endpoint was discovered, do not resolve or apply the endpoint.
29
+ unless context[:discovered_endpoint]
30
+ params = parameters_for_operation(context)
31
+ endpoint = context.config.endpoint_provider.resolve_endpoint(params)
32
+
33
+ context.http_request.endpoint = endpoint.url
34
+ apply_endpoint_headers(context, endpoint.headers)
35
+ end
36
+
37
+ context[:endpoint_params] = params
38
+ context[:auth_scheme] =
39
+ Aws::Endpoints.resolve_auth_scheme(context, endpoint)
40
+
41
+ @handler.call(context)
42
+ end
43
+
44
+ private
45
+
46
+ def apply_endpoint_headers(context, headers)
47
+ headers.each do |key, values|
48
+ value = values
49
+ .compact
50
+ .map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
51
+ .join(',')
52
+
53
+ context.http_request.headers[key] = value
54
+ end
55
+ end
56
+
57
+ def parameters_for_operation(context)
58
+ case context.operation_name
59
+ when :accept_handshake
60
+ Aws::Organizations::Endpoints::AcceptHandshake.build(context)
61
+ when :attach_policy
62
+ Aws::Organizations::Endpoints::AttachPolicy.build(context)
63
+ when :cancel_handshake
64
+ Aws::Organizations::Endpoints::CancelHandshake.build(context)
65
+ when :close_account
66
+ Aws::Organizations::Endpoints::CloseAccount.build(context)
67
+ when :create_account
68
+ Aws::Organizations::Endpoints::CreateAccount.build(context)
69
+ when :create_gov_cloud_account
70
+ Aws::Organizations::Endpoints::CreateGovCloudAccount.build(context)
71
+ when :create_organization
72
+ Aws::Organizations::Endpoints::CreateOrganization.build(context)
73
+ when :create_organizational_unit
74
+ Aws::Organizations::Endpoints::CreateOrganizationalUnit.build(context)
75
+ when :create_policy
76
+ Aws::Organizations::Endpoints::CreatePolicy.build(context)
77
+ when :decline_handshake
78
+ Aws::Organizations::Endpoints::DeclineHandshake.build(context)
79
+ when :delete_organization
80
+ Aws::Organizations::Endpoints::DeleteOrganization.build(context)
81
+ when :delete_organizational_unit
82
+ Aws::Organizations::Endpoints::DeleteOrganizationalUnit.build(context)
83
+ when :delete_policy
84
+ Aws::Organizations::Endpoints::DeletePolicy.build(context)
85
+ when :delete_resource_policy
86
+ Aws::Organizations::Endpoints::DeleteResourcePolicy.build(context)
87
+ when :deregister_delegated_administrator
88
+ Aws::Organizations::Endpoints::DeregisterDelegatedAdministrator.build(context)
89
+ when :describe_account
90
+ Aws::Organizations::Endpoints::DescribeAccount.build(context)
91
+ when :describe_create_account_status
92
+ Aws::Organizations::Endpoints::DescribeCreateAccountStatus.build(context)
93
+ when :describe_effective_policy
94
+ Aws::Organizations::Endpoints::DescribeEffectivePolicy.build(context)
95
+ when :describe_handshake
96
+ Aws::Organizations::Endpoints::DescribeHandshake.build(context)
97
+ when :describe_organization
98
+ Aws::Organizations::Endpoints::DescribeOrganization.build(context)
99
+ when :describe_organizational_unit
100
+ Aws::Organizations::Endpoints::DescribeOrganizationalUnit.build(context)
101
+ when :describe_policy
102
+ Aws::Organizations::Endpoints::DescribePolicy.build(context)
103
+ when :describe_resource_policy
104
+ Aws::Organizations::Endpoints::DescribeResourcePolicy.build(context)
105
+ when :detach_policy
106
+ Aws::Organizations::Endpoints::DetachPolicy.build(context)
107
+ when :disable_aws_service_access
108
+ Aws::Organizations::Endpoints::DisableAWSServiceAccess.build(context)
109
+ when :disable_policy_type
110
+ Aws::Organizations::Endpoints::DisablePolicyType.build(context)
111
+ when :enable_aws_service_access
112
+ Aws::Organizations::Endpoints::EnableAWSServiceAccess.build(context)
113
+ when :enable_all_features
114
+ Aws::Organizations::Endpoints::EnableAllFeatures.build(context)
115
+ when :enable_policy_type
116
+ Aws::Organizations::Endpoints::EnablePolicyType.build(context)
117
+ when :invite_account_to_organization
118
+ Aws::Organizations::Endpoints::InviteAccountToOrganization.build(context)
119
+ when :leave_organization
120
+ Aws::Organizations::Endpoints::LeaveOrganization.build(context)
121
+ when :list_aws_service_access_for_organization
122
+ Aws::Organizations::Endpoints::ListAWSServiceAccessForOrganization.build(context)
123
+ when :list_accounts
124
+ Aws::Organizations::Endpoints::ListAccounts.build(context)
125
+ when :list_accounts_for_parent
126
+ Aws::Organizations::Endpoints::ListAccountsForParent.build(context)
127
+ when :list_children
128
+ Aws::Organizations::Endpoints::ListChildren.build(context)
129
+ when :list_create_account_status
130
+ Aws::Organizations::Endpoints::ListCreateAccountStatus.build(context)
131
+ when :list_delegated_administrators
132
+ Aws::Organizations::Endpoints::ListDelegatedAdministrators.build(context)
133
+ when :list_delegated_services_for_account
134
+ Aws::Organizations::Endpoints::ListDelegatedServicesForAccount.build(context)
135
+ when :list_handshakes_for_account
136
+ Aws::Organizations::Endpoints::ListHandshakesForAccount.build(context)
137
+ when :list_handshakes_for_organization
138
+ Aws::Organizations::Endpoints::ListHandshakesForOrganization.build(context)
139
+ when :list_organizational_units_for_parent
140
+ Aws::Organizations::Endpoints::ListOrganizationalUnitsForParent.build(context)
141
+ when :list_parents
142
+ Aws::Organizations::Endpoints::ListParents.build(context)
143
+ when :list_policies
144
+ Aws::Organizations::Endpoints::ListPolicies.build(context)
145
+ when :list_policies_for_target
146
+ Aws::Organizations::Endpoints::ListPoliciesForTarget.build(context)
147
+ when :list_roots
148
+ Aws::Organizations::Endpoints::ListRoots.build(context)
149
+ when :list_tags_for_resource
150
+ Aws::Organizations::Endpoints::ListTagsForResource.build(context)
151
+ when :list_targets_for_policy
152
+ Aws::Organizations::Endpoints::ListTargetsForPolicy.build(context)
153
+ when :move_account
154
+ Aws::Organizations::Endpoints::MoveAccount.build(context)
155
+ when :put_resource_policy
156
+ Aws::Organizations::Endpoints::PutResourcePolicy.build(context)
157
+ when :register_delegated_administrator
158
+ Aws::Organizations::Endpoints::RegisterDelegatedAdministrator.build(context)
159
+ when :remove_account_from_organization
160
+ Aws::Organizations::Endpoints::RemoveAccountFromOrganization.build(context)
161
+ when :tag_resource
162
+ Aws::Organizations::Endpoints::TagResource.build(context)
163
+ when :untag_resource
164
+ Aws::Organizations::Endpoints::UntagResource.build(context)
165
+ when :update_organizational_unit
166
+ Aws::Organizations::Endpoints::UpdateOrganizationalUnit.build(context)
167
+ when :update_policy
168
+ Aws::Organizations::Endpoints::UpdatePolicy.build(context)
169
+ end
170
+ end
171
+ end
172
+
173
+ def add_handlers(handlers, _config)
174
+ handlers.add(Handler, step: :build, priority: 75)
175
+ end
176
+ end
177
+ end
178
+ end
@@ -711,8 +711,6 @@ module Aws::Organizations
711
711
  # @return [String]
712
712
  #
713
713
  # @!attribute [rw] role_name
714
- # (Optional)
715
- #
716
714
  # The name of an IAM role that Organizations automatically
717
715
  # preconfigures in the new member account. This role trusts the
718
716
  # management account, allowing users in the management account to
@@ -1838,6 +1836,18 @@ module Aws::Organizations
1838
1836
  include Aws::Structure
1839
1837
  end
1840
1838
 
1839
+ # @!attribute [rw] resource_policy
1840
+ # A structure that contains details about the resource policy.
1841
+ # @return [Types::ResourcePolicy]
1842
+ #
1843
+ # @see http://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeResourcePolicyResponse AWS API Documentation
1844
+ #
1845
+ class DescribeResourcePolicyResponse < Struct.new(
1846
+ :resource_policy)
1847
+ SENSITIVE = []
1848
+ include Aws::Structure
1849
+ end
1850
+
1841
1851
  # We can't find the destination container (a root or OU) with the
1842
1852
  # `ParentId` that you specified.
1843
1853
  #
@@ -4603,6 +4613,72 @@ module Aws::Organizations
4603
4613
  include Aws::Structure
4604
4614
  end
4605
4615
 
4616
+ # @note When making an API call, you may pass PutResourcePolicyRequest
4617
+ # data as a hash:
4618
+ #
4619
+ # {
4620
+ # content: "ResourcePolicyContent", # required
4621
+ # tags: [
4622
+ # {
4623
+ # key: "TagKey", # required
4624
+ # value: "TagValue", # required
4625
+ # },
4626
+ # ],
4627
+ # }
4628
+ #
4629
+ # @!attribute [rw] content
4630
+ # If provided, the new content for the resource policy. The text must
4631
+ # be correctly formatted JSON that complies with the syntax for the
4632
+ # resource policy's type. For more information, see [Service Control
4633
+ # Policy Syntax][1] in the *Organizations User Guide.*
4634
+ #
4635
+ #
4636
+ #
4637
+ # [1]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html
4638
+ # @return [String]
4639
+ #
4640
+ # @!attribute [rw] tags
4641
+ # Updates the list of tags that you want to attach to the
4642
+ # newly-created resource policy. For each tag in the list, you must
4643
+ # specify both a tag key and a value. You can set the value to an
4644
+ # empty string, but you can't set it to `null`. For more information
4645
+ # about tagging, see [Tagging Organizations resources][1] in the
4646
+ # Organizations User Guide.
4647
+ #
4648
+ # <note markdown="1"> Calls with tags apply to the initial creation of the resource
4649
+ # policy, otherwise an exception is thrown. If any one of the tags is
4650
+ # invalid or if you exceed the allowed number of tags for the resource
4651
+ # policy, then the entire request fails and the resource policy is not
4652
+ # created.
4653
+ #
4654
+ # </note>
4655
+ #
4656
+ #
4657
+ #
4658
+ # [1]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html
4659
+ # @return [Array<Types::Tag>]
4660
+ #
4661
+ # @see http://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/PutResourcePolicyRequest AWS API Documentation
4662
+ #
4663
+ class PutResourcePolicyRequest < Struct.new(
4664
+ :content,
4665
+ :tags)
4666
+ SENSITIVE = []
4667
+ include Aws::Structure
4668
+ end
4669
+
4670
+ # @!attribute [rw] resource_policy
4671
+ # A structure that contains details about the resource policy.
4672
+ # @return [Types::ResourcePolicy]
4673
+ #
4674
+ # @see http://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/PutResourcePolicyResponse AWS API Documentation
4675
+ #
4676
+ class PutResourcePolicyResponse < Struct.new(
4677
+ :resource_policy)
4678
+ SENSITIVE = []
4679
+ include Aws::Structure
4680
+ end
4681
+
4606
4682
  # @note When making an API call, you may pass RegisterDelegatedAdministratorRequest
4607
4683
  # data as a hash:
4608
4684
  #
@@ -4657,6 +4733,60 @@ module Aws::Organizations
4657
4733
  include Aws::Structure
4658
4734
  end
4659
4735
 
4736
+ # A structure that contains details about a resource policy.
4737
+ #
4738
+ # @!attribute [rw] resource_policy_summary
4739
+ # A structure that contains resource policy ID and Amazon Resource
4740
+ # Name (ARN).
4741
+ # @return [Types::ResourcePolicySummary]
4742
+ #
4743
+ # @!attribute [rw] content
4744
+ # The policy text of the resource policy.
4745
+ # @return [String]
4746
+ #
4747
+ # @see http://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ResourcePolicy AWS API Documentation
4748
+ #
4749
+ class ResourcePolicy < Struct.new(
4750
+ :resource_policy_summary,
4751
+ :content)
4752
+ SENSITIVE = []
4753
+ include Aws::Structure
4754
+ end
4755
+
4756
+ # We can't find a resource policy request with the parameter that you
4757
+ # specified.
4758
+ #
4759
+ # @!attribute [rw] message
4760
+ # @return [String]
4761
+ #
4762
+ # @see http://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ResourcePolicyNotFoundException AWS API Documentation
4763
+ #
4764
+ class ResourcePolicyNotFoundException < Struct.new(
4765
+ :message)
4766
+ SENSITIVE = []
4767
+ include Aws::Structure
4768
+ end
4769
+
4770
+ # A structure that contains resource policy ID and Amazon Resource Name
4771
+ # (ARN).
4772
+ #
4773
+ # @!attribute [rw] id
4774
+ # The unique identifier (ID) of the resource policy.
4775
+ # @return [String]
4776
+ #
4777
+ # @!attribute [rw] arn
4778
+ # The Amazon Resource Name (ARN) of the resource policy.
4779
+ # @return [String]
4780
+ #
4781
+ # @see http://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ResourcePolicySummary AWS API Documentation
4782
+ #
4783
+ class ResourcePolicySummary < Struct.new(
4784
+ :id,
4785
+ :arn)
4786
+ SENSITIVE = []
4787
+ include Aws::Structure
4788
+ end
4789
+
4660
4790
  # Contains details about a root. A root is a top-level parent node in
4661
4791
  # the hierarchy of an organization that can contain organizational units
4662
4792
  # (OUs) and accounts. The root contains every Amazon Web Services
@@ -13,9 +13,13 @@ require 'aws-sigv4'
13
13
 
14
14
  require_relative 'aws-sdk-organizations/types'
15
15
  require_relative 'aws-sdk-organizations/client_api'
16
+ require_relative 'aws-sdk-organizations/plugins/endpoints.rb'
16
17
  require_relative 'aws-sdk-organizations/client'
17
18
  require_relative 'aws-sdk-organizations/errors'
18
19
  require_relative 'aws-sdk-organizations/resource'
20
+ require_relative 'aws-sdk-organizations/endpoint_parameters'
21
+ require_relative 'aws-sdk-organizations/endpoint_provider'
22
+ require_relative 'aws-sdk-organizations/endpoints'
19
23
  require_relative 'aws-sdk-organizations/customizations'
20
24
 
21
25
  # This module provides support for AWS Organizations. This module is available in the
@@ -48,6 +52,6 @@ require_relative 'aws-sdk-organizations/customizations'
48
52
  # @!group service
49
53
  module Aws::Organizations
50
54
 
51
- GEM_VERSION = '1.70.0'
55
+ GEM_VERSION = '1.72.0'
52
56
 
53
57
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-organizations
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.70.0
4
+ version: 1.72.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: 2022-05-02 00:00:00.000000000 Z
11
+ date: 2022-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '3'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 3.127.0
22
+ version: 3.165.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '3'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 3.127.0
32
+ version: 3.165.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: aws-sigv4
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -59,7 +59,11 @@ files:
59
59
  - lib/aws-sdk-organizations/client.rb
60
60
  - lib/aws-sdk-organizations/client_api.rb
61
61
  - lib/aws-sdk-organizations/customizations.rb
62
+ - lib/aws-sdk-organizations/endpoint_parameters.rb
63
+ - lib/aws-sdk-organizations/endpoint_provider.rb
64
+ - lib/aws-sdk-organizations/endpoints.rb
62
65
  - lib/aws-sdk-organizations/errors.rb
66
+ - lib/aws-sdk-organizations/plugins/endpoints.rb
63
67
  - lib/aws-sdk-organizations/resource.rb
64
68
  - lib/aws-sdk-organizations/types.rb
65
69
  homepage: https://github.com/aws/aws-sdk-ruby