Class: Aws::Organizations::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::Organizations::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-organizations/client.rb
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#accept_handshake(params = {}) ⇒ Types::AcceptHandshakeResponse
Sends a response to the originator of a handshake agreeing to the action proposed by the handshake request.
-
#attach_policy(params = {}) ⇒ Object
resp = client.attach_policy({ policy_id: “p-examplepolicyid111”, target_id: “333333333333”, }).
-
#cancel_handshake(params = {}) ⇒ Object
resp = client.cancel_handshake({ handshake_id: “h-examplehandshakeid111”, }).
-
#create_account(params = {}) ⇒ Object
resp = client.create_account({ account_name: “Production Account”, email: “[email protected]”, }).
-
#create_organization(params = {}) ⇒ Object
resp = client.create_organization({ feature_set: “CONSOLIDATED_BILLING”, }).
-
#create_organizational_unit(params = {}) ⇒ Object
resp = client.create_organizational_unit({ name: “AccountingOU”, parent_id: “r-examplerootid111”, }).
-
#create_policy(params = {}) ⇒ Object
resp = client.create_policy({ content: “\"Version\":\"2012-10-17\",\"Statement\":{\"Effect\":\"Allow\",\"Action\":\"s3:*\"}”, description: “Enables admins of attached accounts to delegate all S3 permissions”, name: “AllowAllS3Actions”, type: “SERVICE_CONTROL_POLICY”, }).
-
#decline_handshake(params = {}) ⇒ Types::DeclineHandshakeResponse
Declines a handshake request.
-
#delete_organization(params = {}) ⇒ Struct
Deletes the organization.
-
#delete_organizational_unit(params = {}) ⇒ Object
resp = client.delete_organizational_unit({ organizational_unit_id: “ou-examplerootid111-exampleouid111”, }).
-
#delete_policy(params = {}) ⇒ Object
resp = client.delete_policy({ policy_id: “p-examplepolicyid111”, }).
-
#describe_account(params = {}) ⇒ Types::DescribeAccountResponse
Retrieves Organizations-related information about the specified account.
-
#describe_create_account_status(params = {}) ⇒ Types::DescribeCreateAccountStatusResponse
Retrieves the current status of an asynchronous request to create an account.
-
#describe_handshake(params = {}) ⇒ Types::DescribeHandshakeResponse
Retrieves information about a previously requested handshake.
-
#describe_organization(params = {}) ⇒ Types::DescribeOrganizationResponse
Retrieves information about the organization that the user’s account belongs to.
-
#describe_organizational_unit(params = {}) ⇒ Types::DescribeOrganizationalUnitResponse
Retrieves information about an organizational unit (OU).
-
#describe_policy(params = {}) ⇒ Types::DescribePolicyResponse
Retrieves information about a policy.
-
#detach_policy(params = {}) ⇒ Struct
Detaches a policy from a target root, organizational unit, or account.
-
#disable_policy_type(params = {}) ⇒ Types::DisablePolicyTypeResponse
Disables an organizational control policy type in a root.
-
#enable_all_features(params = {}) ⇒ Types::EnableAllFeaturesResponse
Enables all features in an organization.
-
#enable_policy_type(params = {}) ⇒ Types::EnablePolicyTypeResponse
Enables a policy type in a root.
-
#invite_account_to_organization(params = {}) ⇒ Types::InviteAccountToOrganizationResponse
Sends an invitation to another account to join your organization as a member account.
-
#leave_organization(params = {}) ⇒ Struct
Removes a member account from its parent organization.
-
#list_accounts(params = {}) ⇒ Types::ListAccountsResponse
Lists all the accounts in the organization.
-
#list_accounts_for_parent(params = {}) ⇒ Types::ListAccountsForParentResponse
Lists the accounts in an organization that are contained by the specified target root or organizational unit (OU).
-
#list_children(params = {}) ⇒ Types::ListChildrenResponse
Lists all of the OUs or accounts that are contained in the specified parent OU or root.
-
#list_create_account_status(params = {}) ⇒ Types::ListCreateAccountStatusResponse
Lists the account creation requests that match the specified status that is currently being tracked for the organization.
-
#list_handshakes_for_account(params = {}) ⇒ Types::ListHandshakesForAccountResponse
Lists the current handshakes that are associated with the account of the requesting user.
-
#list_handshakes_for_organization(params = {}) ⇒ Types::ListHandshakesForOrganizationResponse
Lists the handshakes that are associated with the organization that the requesting user is part of.
-
#list_organizational_units_for_parent(params = {}) ⇒ Types::ListOrganizationalUnitsForParentResponse
Lists the organizational units (OUs) in a parent organizational unit or root.
-
#list_parents(params = {}) ⇒ Types::ListParentsResponse
Lists the root or organizational units (OUs) that serve as the immediate parent of the specified child OU or account.
-
#list_policies(params = {}) ⇒ Types::ListPoliciesResponse
Retrieves the list of all policies in an organization of a specified type.
-
#list_policies_for_target(params = {}) ⇒ Types::ListPoliciesForTargetResponse
Lists the policies that are directly attached to the specified target root, organizational unit (OU), or account.
-
#list_roots(params = {}) ⇒ Types::ListRootsResponse
Lists the roots that are defined in the current organization.
-
#list_targets_for_policy(params = {}) ⇒ Types::ListTargetsForPolicyResponse
Lists all the roots, OUs, and accounts to which the specified policy is attached.
-
#move_account(params = {}) ⇒ Struct
Moves an account from its current source parent root or OU to the specified destination parent root or OU.
-
#remove_account_from_organization(params = {}) ⇒ Struct
Removes the specified account from the organization.
-
#update_organizational_unit(params = {}) ⇒ Types::UpdateOrganizationalUnitResponse
Renames the specified organizational unit (OU).
-
#update_policy(params = {}) ⇒ Types::UpdatePolicyResponse
Updates an existing policy with a new name, description, or content.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(*args) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(*args) ⇒ Client
Returns a new instance of Client.
152 153 154 |
# File 'lib/aws-sdk-organizations/client.rb', line 152 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
3835 3836 3837 |
# File 'lib/aws-sdk-organizations/client.rb', line 3835 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
3838 3839 3840 |
# File 'lib/aws-sdk-organizations/client.rb', line 3838 def errors_module Errors end |
Instance Method Details
#accept_handshake(params = {}) ⇒ Types::AcceptHandshakeResponse
Sends a response to the originator of a handshake agreeing to the action proposed by the handshake request.
This operation can be called only by the following principals when they also have the relevant IAM permissions:
-
**Invitation to join** or **Approve all features request** handshakes: only a principal from the member account.
-
**Enable all features final confirmation** handshake: only a principal from the master account.
For more information about invitations, see [Inviting an AWS Account to Join Your Organization] in the *AWS Organizations User Guide*. For more information about requests to enable all features in the organization, see [Enabling All Features in Your Organization] in the *AWS Organizations User Guide*.
After you accept a handshake, it continues to appear in the results of relevant APIs for only 30 days. After that it is deleted.
[1]: docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_invites.html [2]: docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html
279 280 281 282 |
# File 'lib/aws-sdk-organizations/client.rb', line 279 def accept_handshake(params = {}, = {}) req = build_request(:accept_handshake, params) req.send_request() end |
#attach_policy(params = {}) ⇒ Object
resp = client.attach_policy({
policy_id: "p-examplepolicyid111",
target_id: "333333333333",
})
402 403 404 405 |
# File 'lib/aws-sdk-organizations/client.rb', line 402 def attach_policy(params = {}, = {}) req = build_request(:attach_policy, params) req.send_request() end |
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 |
# File 'lib/aws-sdk-organizations/client.rb', line 3813 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config) context[:gem_name] = 'aws-sdk-organizations' context[:gem_version] = '1.0.0' Seahorse::Client::Request.new(handlers, context) end |
#cancel_handshake(params = {}) ⇒ Object
resp = client.cancel_handshake({
handshake_id: "h-examplehandshakeid111",
})
resp.to_h outputs the following:
{
handshake: {
action: "INVITE",
arn: "arn:aws:organizations::111111111111:handshake/o-exampleorgid/invite/h-examplehandshakeid111",
expiration_timestamp: Time.parse("20170228T1215Z"),
id: "h-examplehandshakeid111",
parties: [
{
id: "o-exampleorgid",
type: "ORGANIZATION",
},
{
id: "[email protected]",
type: "EMAIL",
},
],
requested_timestamp: Time.parse("20170214T1215Z"),
resources: [
{
resources: [
{
type: "MASTER_EMAIL",
value: "[email protected]",
},
{
type: "MASTER_NAME",
value: "Master Account",
},
{
type: "ORGANIZATION_FEATURE_SET",
value: "CONSOLIDATED_BILLING",
},
],
type: "ORGANIZATION",
value: "o-exampleorgid",
},
{
type: "ACCOUNT",
value: "222222222222",
},
{
type: "NOTES",
value: "This is a request for Susan's account to join Bob's organization.",
},
],
state: "CANCELED",
},
}
519 520 521 522 |
# File 'lib/aws-sdk-organizations/client.rb', line 519 def cancel_handshake(params = {}, = {}) req = build_request(:cancel_handshake, params) req.send_request() end |
#create_account(params = {}) ⇒ Object
resp = client.create_account({
account_name: "Production Account",
email: "[email protected]",
})
resp.to_h outputs the following:
{
create_account_status: {
id: "car-examplecreateaccountrequestid111",
state: "IN_PROGRESS",
},
}
666 667 668 669 |
# File 'lib/aws-sdk-organizations/client.rb', line 666 def create_account(params = {}, = {}) req = build_request(:create_account, params) req.send_request() end |
#create_organization(params = {}) ⇒ Object
resp = client.create_organization({
feature_set: "CONSOLIDATED_BILLING",
})
resp.to_h outputs the following:
{
organization: {
arn: "arn:aws:organizations::111111111111:organization/o-exampleorgid",
available_policy_types: [
],
feature_set: "CONSOLIDATED_BILLING",
id: "o-exampleorgid",
master_account_arn: "arn:aws:organizations::111111111111:account/o-exampleorgid/111111111111",
master_account_email: "[email protected]",
master_account_id: "111111111111",
},
}
789 790 791 792 |
# File 'lib/aws-sdk-organizations/client.rb', line 789 def create_organization(params = {}, = {}) req = build_request(:create_organization, params) req.send_request() end |
#create_organizational_unit(params = {}) ⇒ Object
resp = client.create_organizational_unit({
name: "AccountingOU",
parent_id: "r-examplerootid111",
})
resp.to_h outputs the following:
{
organizational_unit: {
arn: "arn:aws:organizations::111111111111:ou/o-exampleorgid/ou-examplerootid111-exampleouid111",
id: "ou-examplerootid111-exampleouid111",
name: "AccountingOU",
},
}
875 876 877 878 |
# File 'lib/aws-sdk-organizations/client.rb', line 875 def create_organizational_unit(params = {}, = {}) req = build_request(:create_organizational_unit, params) req.send_request() end |
#create_policy(params = {}) ⇒ Object
resp = client.create_policy(
content: "{\\\"Version\\\":\\\"2012-10-17\\\",\\\"Statement\\\":{\\\"Effect\\\":\\\"Allow\\\",\\\"Action\\\":\\\"s3:*\\\"}",
description: "Enables admins of attached accounts to delegate all S3 permissions",
name: "AllowAllS3Actions",
type: "SERVICE_CONTROL_POLICY",
})
resp.to_h outputs the following:
{
policy: {
content: "\"Version\":\"2012-10-17\",\"Statement\":{\"Effect\":\"Allow\",\"Action\":\"s3:*\"}",
policy_summary: {
arn: "arn:aws:organizations::111111111111:policy/o-exampleorgid/service_control_policy/p-examplepolicyid111",
description: "Allows delegation of all S3 actions",
name: "AllowAllS3Actions",
type: "SERVICE_CONTROL_POLICY",
},
},
}
981 982 983 984 |
# File 'lib/aws-sdk-organizations/client.rb', line 981 def create_policy(params = {}, = {}) req = build_request(:create_policy, params) req.send_request() end |
#decline_handshake(params = {}) ⇒ Types::DeclineHandshakeResponse
Declines a handshake request. This sets the handshake state to ‘DECLINED` and effectively deactivates the request.
This operation can be called only from the account that received the handshake. The originator of the handshake can use CancelHandshake instead. The originator can’t reactivate a declined request, but can re-initiate the process with a new handshake request.
After you decline a handshake, it continues to appear in the results of relevant APIs for only 30 days. After that it is deleted.
1093 1094 1095 1096 |
# File 'lib/aws-sdk-organizations/client.rb', line 1093 def decline_handshake(params = {}, = {}) req = build_request(:decline_handshake, params) req.send_request() end |
#delete_organization(params = {}) ⇒ Struct
Deletes the organization. You can delete an organization only by using credentials from the master account. The organization must be empty of member accounts, OUs, and policies.
If you create any accounts using Organizations operations or the Organizations console, you can’t remove those accounts from the organization, which means that you can’t delete the organization.
1112 1113 1114 1115 |
# File 'lib/aws-sdk-organizations/client.rb', line 1112 def delete_organization(params = {}, = {}) req = build_request(:delete_organization, params) req.send_request() end |
#delete_organizational_unit(params = {}) ⇒ Object
resp = client.delete_organizational_unit({
organizational_unit_id: "ou-examplerootid111-exampleouid111",
})
1161 1162 1163 1164 |
# File 'lib/aws-sdk-organizations/client.rb', line 1161 def delete_organizational_unit(params = {}, = {}) req = build_request(:delete_organizational_unit, params) req.send_request() end |
#delete_policy(params = {}) ⇒ Object
resp = client.delete_policy({
policy_id: "p-examplepolicyid111",
})
1208 1209 1210 1211 |
# File 'lib/aws-sdk-organizations/client.rb', line 1208 def delete_policy(params = {}, = {}) req = build_request(:delete_policy, params) req.send_request() end |
#describe_account(params = {}) ⇒ Types::DescribeAccountResponse
Retrieves Organizations-related information about the specified account.
This operation can be called only from the organization’s master account.
1274 1275 1276 1277 |
# File 'lib/aws-sdk-organizations/client.rb', line 1274 def describe_account(params = {}, = {}) req = build_request(:describe_account, params) req.send_request() end |
#describe_create_account_status(params = {}) ⇒ Types::DescribeCreateAccountStatusResponse
Retrieves the current status of an asynchronous request to create an account.
This operation can be called only from the organization’s master account.
1340 1341 1342 1343 |
# File 'lib/aws-sdk-organizations/client.rb', line 1340 def describe_create_account_status(params = {}, = {}) req = build_request(:describe_create_account_status, params) req.send_request() end |
#describe_handshake(params = {}) ⇒ Types::DescribeHandshakeResponse
Retrieves information about a previously requested handshake. The handshake ID comes from the response to the original InviteAccountToOrganization operation that generated the handshake.
You can access handshakes that are ACCEPTED, DECLINED, or CANCELED for only 30 days after they change to that state. They are then deleted and no longer accessible.
This operation can be called from any account in the organization.
1449 1450 1451 1452 |
# File 'lib/aws-sdk-organizations/client.rb', line 1449 def describe_handshake(params = {}, = {}) req = build_request(:describe_handshake, params) req.send_request() end |
#describe_organization(params = {}) ⇒ Types::DescribeOrganizationResponse
Retrieves information about the organization that the user’s account belongs to.
This operation can be called from any account in the organization.
1504 1505 1506 1507 |
# File 'lib/aws-sdk-organizations/client.rb', line 1504 def describe_organization(params = {}, = {}) req = build_request(:describe_organization, params) req.send_request() end |
#describe_organizational_unit(params = {}) ⇒ Types::DescribeOrganizationalUnitResponse
Retrieves information about an organizational unit (OU).
This operation can be called only from the organization’s master account.
1566 1567 1568 1569 |
# File 'lib/aws-sdk-organizations/client.rb', line 1566 def describe_organizational_unit(params = {}, = {}) req = build_request(:describe_organizational_unit, params) req.send_request() end |
#describe_policy(params = {}) ⇒ Types::DescribePolicyResponse
Retrieves information about a policy.
This operation can be called only from the organization’s master account.
1636 1637 1638 1639 |
# File 'lib/aws-sdk-organizations/client.rb', line 1636 def describe_policy(params = {}, = {}) req = build_request(:describe_policy, params) req.send_request() end |
#detach_policy(params = {}) ⇒ Struct
Detaches a policy from a target root, organizational unit, or account. If the policy being detached is a service control policy (SCP), the changes to permissions for IAM users and roles in affected accounts are immediate.
Note: Every root, OU, and account must have at least one SCP attached. If you want to replace the default ‘FullAWSAccess` policy with one that limits the permissions that can be delegated, then you must attach the replacement policy before you can remove the default one. This is the authorization strategy of [whitelisting]. If you instead attach a second SCP and leave the `FullAWSAccess` SCP still attached, and specify `“Effect”: “Deny”` in the second SCP to override the `“Effect”: “Allow”` in the `FullAWSAccess` policy (or any other attached SCP), then you are using the authorization strategy of [blacklisting].
This operation can be called only from the organization’s master account.
[1]: docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_about-scps.html#orgs_policies_whitelist [2]: docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_about-scps.html#orgs_policies_blacklist
1721 1722 1723 1724 |
# File 'lib/aws-sdk-organizations/client.rb', line 1721 def detach_policy(params = {}, = {}) req = build_request(:detach_policy, params) req.send_request() end |
#disable_policy_type(params = {}) ⇒ Types::DisablePolicyTypeResponse
Disables an organizational control policy type in a root. A poicy of a certain type can be attached to entities in a root only if that type is enabled in the root. After you perform this operation, you no longer can attach policies of the specified type to that root or to any OU or account in that root. You can undo this by using the EnablePolicyType operation.
This operation can be called only from the organization’s master account.
1795 1796 1797 1798 |
# File 'lib/aws-sdk-organizations/client.rb', line 1795 def disable_policy_type(params = {}, = {}) req = build_request(:disable_policy_type, params) req.send_request() end |
#enable_all_features(params = {}) ⇒ Types::EnableAllFeaturesResponse
Enables all features in an organization. This enables the use of organization policies that can restrict the services and actions that can be called in each account. Until you enable all features, you have access only to consolidated billing, and you can’t use any of the advanced account administration features that AWS Organizations supports. For more information, see [Enabling All Features in Your Organization] in the *AWS Organizations User Guide*.
This operation is required only for organizations that were created explicitly with only the consolidated billing features enabled, or that were migrated from a Consolidated Billing account family to Organizations. Calling this operation sends a handshake to every invited account in the organization. The feature set change can be finalized and the additional features enabled only after all administrators in the invited accounts approve the change by accepting the handshake.
After all invited member accounts accept the handshake, you finalize the feature set change by accepting the handshake that contains ‘“Action”: “ENABLE_ALL_FEATURES”`. This completes the change.
After you enable all features in your organization, the master account in the organization can apply policies on all member accounts. These policies can restrict what users and even administrators in those accounts can do. The master account can apply policies that prevent accounts from leaving the organization. Ensure that your account administrators are aware of this.
This operation can be called only from the organization’s master account.
[1]: docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html
1891 1892 1893 1894 |
# File 'lib/aws-sdk-organizations/client.rb', line 1891 def enable_all_features(params = {}, = {}) req = build_request(:enable_all_features, params) req.send_request() end |
#enable_policy_type(params = {}) ⇒ Types::EnablePolicyTypeResponse
Enables a policy type in a root. After you enable a policy type in a root, you can attach policies of that type to the root, any OU, or account in that root. You can undo this by using the DisablePolicyType operation.
This operation can be called only from the organization’s master account.
1967 1968 1969 1970 |
# File 'lib/aws-sdk-organizations/client.rb', line 1967 def enable_policy_type(params = {}, = {}) req = build_request(:enable_policy_type, params) req.send_request() end |
#invite_account_to_organization(params = {}) ⇒ Types::InviteAccountToOrganizationResponse
Sends an invitation to another account to join your organization as a member account. Organizations sends email on your behalf to the email address that is associated with the other account’s owner. The invitation is implemented as a Handshake whose details are in the response.
You can invite AWS accounts only from the same reseller as the master account. For example, if your organization’s master account was created by Amazon Internet Services Pvt. Ltd (AISPL), an AWS reseller in India, then you can only invite other AISPL accounts to your organization. You can’t combine accounts from AISPL and AWS. For more information, see [Consolidated Billing in India].
This operation can be called only from the organization’s master account.
[1]: docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/useconsolidatedbilliing-India.html
2108 2109 2110 2111 |
# File 'lib/aws-sdk-organizations/client.rb', line 2108 def invite_account_to_organization(params = {}, = {}) req = build_request(:invite_account_to_organization, params) req.send_request() end |
#leave_organization(params = {}) ⇒ Struct
Removes a member account from its parent organization. This version of the operation is performed by the account that wants to leave. To remove a member account as a user in the master account, use RemoveAccountFromOrganization instead.
This operation can be called only from a member account in the organization.
-
The master account in an organization with all features enabled can set service control policies (SCPs) that can restrict what administrators of member accounts can do, including preventing them from successfully calling ‘LeaveOrganization` and leaving the organization.
-
If you created the account using the AWS Organizations console, the Organizations API, or the Organizations CLI commands, then you cannot remove the account.
-
You can leave an organization only after you enable IAM user access to billing in your account. For more information, see [Activating Access to the Billing and Cost Management Console] in the *AWS Billing and Cost Management User Guide*.
2154 2155 2156 2157 |
# File 'lib/aws-sdk-organizations/client.rb', line 2154 def leave_organization(params = {}, = {}) req = build_request(:leave_organization, params) req.send_request() end |
#list_accounts(params = {}) ⇒ Types::ListAccountsResponse
Lists all the accounts in the organization. To request only the accounts in a root or OU, use the ListAccountsForParent operation instead.
This operation can be called only from the organization’s master account.
2262 2263 2264 2265 |
# File 'lib/aws-sdk-organizations/client.rb', line 2262 def list_accounts(params = {}, = {}) req = build_request(:list_accounts, params) req.send_request() end |
#list_accounts_for_parent(params = {}) ⇒ Types::ListAccountsForParentResponse
Lists the accounts in an organization that are contained by the specified target root or organizational unit (OU). If you specify the root, you get a list of all the accounts that are not in any OU. If you specify an OU, you get a list of all the accounts in only that OU, and not in any child OUs. To get a list of all accounts in the organization, use the ListAccounts operation.
2358 2359 2360 2361 |
# File 'lib/aws-sdk-organizations/client.rb', line 2358 def list_accounts_for_parent(params = {}, = {}) req = build_request(:list_accounts_for_parent, params) req.send_request() end |
#list_children(params = {}) ⇒ Types::ListChildrenResponse
Lists all of the OUs or accounts that are contained in the specified parent OU or root. This operation, along with ListParents enables you to traverse the tree structure that makes up this root.
2456 2457 2458 2459 |
# File 'lib/aws-sdk-organizations/client.rb', line 2456 def list_children(params = {}, = {}) req = build_request(:list_children, params) req.send_request() end |
#list_create_account_status(params = {}) ⇒ Types::ListCreateAccountStatusResponse
Lists the account creation requests that match the specified status that is currently being tracked for the organization.
This operation can be called only from the organization’s master account.
2566 2567 2568 2569 |
# File 'lib/aws-sdk-organizations/client.rb', line 2566 def list_create_account_status(params = {}, = {}) req = build_request(:list_create_account_status, params) req.send_request() end |
#list_handshakes_for_account(params = {}) ⇒ Types::ListHandshakesForAccountResponse
Lists the current handshakes that are associated with the account of the requesting user.
Handshakes that are ACCEPTED, DECLINED, or CANCELED appear in the results of this API for only 30 days after changing to that state. After that they are deleted and no longer accessible.
This operation can be called from any account in the organization.
2701 2702 2703 2704 |
# File 'lib/aws-sdk-organizations/client.rb', line 2701 def list_handshakes_for_account(params = {}, = {}) req = build_request(:list_handshakes_for_account, params) req.send_request() end |
#list_handshakes_for_organization(params = {}) ⇒ Types::ListHandshakesForOrganizationResponse
Lists the handshakes that are associated with the organization that the requesting user is part of. The ‘ListHandshakesForOrganization` operation returns a list of handshake structures. Each structure contains details and status about a handshake.
Handshakes that are ACCEPTED, DECLINED, or CANCELED appear in the results of this API for only 30 days after changing to that state. After that they are deleted and no longer accessible.
This operation can be called only from the organization’s master account.
2881 2882 2883 2884 |
# File 'lib/aws-sdk-organizations/client.rb', line 2881 def list_handshakes_for_organization(params = {}, = {}) req = build_request(:list_handshakes_for_organization, params) req.send_request() end |
#list_organizational_units_for_parent(params = {}) ⇒ Types::ListOrganizationalUnitsForParentResponse
Lists the organizational units (OUs) in a parent organizational unit or root.
This operation can be called only from the organization’s master account.
2979 2980 2981 2982 |
# File 'lib/aws-sdk-organizations/client.rb', line 2979 def list_organizational_units_for_parent(params = {}, = {}) req = build_request(:list_organizational_units_for_parent, params) req.send_request() end |
#list_parents(params = {}) ⇒ Types::ListParentsResponse
Lists the root or organizational units (OUs) that serve as the immediate parent of the specified child OU or account. This operation, along with ListChildren enables you to traverse the tree structure that makes up this root.
This operation can be called only from the organization’s master account.
<note markdown=“1”> In the current release, a child can have only a single parent.
</note>
3075 3076 3077 3078 |
# File 'lib/aws-sdk-organizations/client.rb', line 3075 def list_parents(params = {}, = {}) req = build_request(:list_parents, params) req.send_request() end |
#list_policies(params = {}) ⇒ Types::ListPoliciesResponse
Retrieves the list of all policies in an organization of a specified type.
This operation can be called only from the organization’s master account.
3174 3175 3176 3177 |
# File 'lib/aws-sdk-organizations/client.rb', line 3174 def list_policies(params = {}, = {}) req = build_request(:list_policies, params) req.send_request() end |
#list_policies_for_target(params = {}) ⇒ Types::ListPoliciesForTargetResponse
Lists the policies that are directly attached to the specified target root, organizational unit (OU), or account. You must specify the policy type that you want included in the returned list.
This operation can be called only from the organization’s master account.
3281 3282 3283 3284 |
# File 'lib/aws-sdk-organizations/client.rb', line 3281 def list_policies_for_target(params = {}, = {}) req = build_request(:list_policies_for_target, params) req.send_request() end |
#list_roots(params = {}) ⇒ Types::ListRootsResponse
Lists the roots that are defined in the current organization.
This operation can be called only from the organization’s master account.
3361 3362 3363 3364 |
# File 'lib/aws-sdk-organizations/client.rb', line 3361 def list_roots(params = {}, = {}) req = build_request(:list_roots, params) req.send_request() end |
#list_targets_for_policy(params = {}) ⇒ Types::ListTargetsForPolicyResponse
Lists all the roots, OUs, and accounts to which the specified policy is attached.
This operation can be called only from the organization’s master account.
3460 3461 3462 3463 |
# File 'lib/aws-sdk-organizations/client.rb', line 3460 def list_targets_for_policy(params = {}, = {}) req = build_request(:list_targets_for_policy, params) req.send_request() end |
#move_account(params = {}) ⇒ Struct
Moves an account from its current source parent root or OU to the specified destination parent root or OU.
This operation can be called only from the organization’s master account.
3544 3545 3546 3547 |
# File 'lib/aws-sdk-organizations/client.rb', line 3544 def move_account(params = {}, = {}) req = build_request(:move_account, params) req.send_request() end |
#remove_account_from_organization(params = {}) ⇒ Struct
Removes the specified account from the organization.
The removed account becomes a stand-alone account that is not a member of any organization. It is no longer subject to any policies and is responsible for its own bill payments. The organization’s master account is no longer charged for any expenses accrued by the member account after it is removed from the organization.
This operation can be called only from the organization’s master account. Member accounts can remove themselves with LeaveOrganization instead.
-
You can remove only accounts that were created outside your organization and invited to join. If you created the account using the AWS Organizations console, the Organizations API, or the Organizations CLI commands, then you cannot remove the account.
-
You can remove a member account only after you enable IAM user access to billing in the member account. For more information, see
- Activating Access to the Billing and Cost Management Console][1
-
in
the *AWS Billing and Cost Management User Guide*.
3607 3608 3609 3610 |
# File 'lib/aws-sdk-organizations/client.rb', line 3607 def remove_account_from_organization(params = {}, = {}) req = build_request(:remove_account_from_organization, params) req.send_request() end |
#update_organizational_unit(params = {}) ⇒ Types::UpdateOrganizationalUnitResponse
Renames the specified organizational unit (OU). The ID and ARN do not change. The child OUs and accounts remain in place, and any attached policies of the OU remain attached.
This operation can be called only from the organization’s master account.
3682 3683 3684 3685 |
# File 'lib/aws-sdk-organizations/client.rb', line 3682 def update_organizational_unit(params = {}, = {}) req = build_request(:update_organizational_unit, params) req.send_request() end |
#update_policy(params = {}) ⇒ Types::UpdatePolicyResponse
Updates an existing policy with a new name, description, or content. If any parameter is not supplied, that value remains unchanged. Note that you cannot change a policy’s type.
This operation can be called only from the organization’s master account.
3804 3805 3806 3807 |
# File 'lib/aws-sdk-organizations/client.rb', line 3804 def update_policy(params = {}, = {}) req = build_request(:update_policy, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
3828 3829 3830 |
# File 'lib/aws-sdk-organizations/client.rb', line 3828 def waiter_names [] end |