A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.aws.amazon.com/organizations/latest/APIReference/API_EnablePolicyType.html below:

EnablePolicyType - AWS Organizations

EnablePolicyType

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 organizational unit (OU), or account in that root. You can undo this by using the DisablePolicyType operation.

This is an asynchronous request that AWS performs in the background. AWS recommends that you first use ListRoots to see the status of policy types for a specified root, and then use this operation.

This operation can be called only from the organization's management account or by a member account that is a delegated administrator.

You can enable a policy type in a root only if that policy type is available in the organization. To view the status of available policy types in the organization, use DescribeOrganization.

Request Syntax
{
   "PolicyType": "string",
   "RootId": "string"
}
Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

PolicyType

The policy type that you want to enable. You can specify one of the following values:

Type: String

Valid Values: SERVICE_CONTROL_POLICY | RESOURCE_CONTROL_POLICY | TAG_POLICY | BACKUP_POLICY | AISERVICES_OPT_OUT_POLICY | CHATBOT_POLICY | DECLARATIVE_POLICY_EC2 | SECURITYHUB_POLICY

Required: Yes

RootId

The unique identifier (ID) of the root in which you want to enable a policy type. You can get the ID from the ListRoots operation.

The regex pattern for a root ID string requires "r-" followed by from 4 to 32 lowercase letters or digits.

Type: String

Length Constraints: Maximum length of 34.

Pattern: ^r-[0-9a-z]{4,32}$

Required: Yes

Response Syntax
{
   "Root": { 
      "Arn": "string",
      "Id": "string",
      "Name": "string",
      "PolicyTypes": [ 
         { 
            "Status": "string",
            "Type": "string"
         }
      ]
   }
}
Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Root

A structure that shows the root with the updated list of enabled policy types.

Type: Root object

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see Access Management in the IAM User Guide.

HTTP Status Code: 400

AWSOrganizationsNotInUseException

Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.

HTTP Status Code: 400

ConcurrentModificationException

The target of the operation is currently being modified by a different request. Try again later.

HTTP Status Code: 400

ConstraintViolationException

Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:

Note

Some of the reasons in the following list might not be applicable to this specific API or operation.

HTTP Status Code: 400

InvalidInputException

The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:

Note

Some of the reasons in the following list might not be applicable to this specific API or operation.

HTTP Status Code: 400

PolicyChangesInProgressException

Changes to the effective policy are in progress, and its contents can't be returned. Try the operation again later.

HTTP Status Code: 400

PolicyTypeAlreadyEnabledException

The specified policy type is already enabled in the specified root.

HTTP Status Code: 400

PolicyTypeNotAvailableForOrganizationException

You can't use the specified policy type with the feature set currently enabled for this organization. For example, you can enable SCPs only after you enable all features in the organization. For more information, see Managing AWS Organizations policiesin the AWS Organizations User Guide.

HTTP Status Code: 400

RootNotFoundException

We can't find a root with the RootId that you specified.

HTTP Status Code: 400

ServiceException

AWS Organizations can't complete your request because of an internal service error. Try again later.

HTTP Status Code: 500

TooManyRequestsException

You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.

For information about quotas that affect AWS Organizations, see Quotas for AWS Organizations in the AWS Organizations User Guide.

HTTP Status Code: 400

UnsupportedAPIEndpointException

This action isn't available in the current AWS Region.

HTTP Status Code: 400

Examples

The following example shows how to enable the tag policy type in a root. The output shows a root object with a policyTypes response element showing that tag policiess are now enabled.

Example

This example illustrates one usage of EnablePolicyType.

Sample Request
POST / HTTP/1.1
X-Amz-Target: AWSOrganizationsV20161128.EnablePolicyType

{ "RootId": "r-examplerootid111", "PolicyType": "TAG_POLICY" }
Sample Response
HTTP/1.1 200 OK
Content-Type: application/json

{
  "Root": {
    "PolicyTypes": [
      {
        "Status":"ENABLED",
        "Type":"TAG_POLICY"
      }
    ],
    "Id": "r-examplerootid111",
    "Name": "Root",
    "Arn": "arn:aws:organizations::111111111111:root/o-exampleorgid/r-examplerootid111"
  }
}
See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4