

# EnableOrganizationLevelResources

Enables your organization to create organization-level resources. An organization-level resource is an IAM resource that your organization owns instead of an individual AWS account owning it.

Creating organization-level resources is an opt-in capability. Your organization cannot create organization-level resources until the management account enables the capability by calling this operation.

The organization-level resources that this capability governs include workload identity providers and workload identity templates that you create with a `ResourceScope` of `ORGANIZATION`. For more information, see [CreateWorkloadIdentityProvider](https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateWorkloadIdentityProvider.html) and [CreateWorkloadIdentityTemplate](https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateWorkloadIdentityTemplate.html).

This operation acts on the organization that the calling account belongs to. Only the management account of that organization can call this operation. A delegated administrator for IAM cannot call it.

Before you call this operation, your organization must be configured with the following settings:
+ You must manage your AWS accounts in [AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html).
+ Your organization must have All features enabled. For more information, see [Available feature sets](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#feature-set) in the * AWS Organizations User Guide*.
+ Enable trusted access for AWS Identity and Access Management in AWS Organizations. For details, see [IAM and AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/services-that-can-integrate-iam.html) in the * AWS Organizations User Guide*.

## Response Elements
<a name="API_EnableOrganizationLevelResources_ResponseElements"></a>

The following elements are returned by the service.

 **EnabledFeatures.member.N**   
The features that are enabled for your organization after this call. This is the organization's complete set of enabled features, not only the feature that you enabled.  
Type: Array of strings  
Valid Values: `RootCredentialsManagement | RootSessions | OrganizationIamResources` 

 ** OrganizationId **   
The unique identifier (ID) of the organization that the calling account belongs to.  
Type: String  
Length Constraints: Maximum length of 34.  
Pattern: `^o-[a-z0-9]{10,32}$` 

## Errors
<a name="API_EnableOrganizationLevelResources_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** CallerIsNotManagementAccount **   
The request was rejected because the account making the request is not the management account for the organization.  
HTTP Status Code: 400

 ** OrganizationNotFound **   
The request was rejected because no organization is associated with your account.  
HTTP Status Code: 400

 ** OrganizationNotInAllFeaturesMode **   
The request was rejected because your organization does not have All features enabled. For more information, see [Available feature sets](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#feature-set) in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** ServiceAccessNotEnabled **   
The request was rejected because trusted access is not enabled for IAM in AWS Organizations. For details, see IAM and AWS Organizations in the * AWS Organizations User Guide*.  
HTTP Status Code: 400

 ** ServiceFailure **   
The request processing has failed because of an unknown error, exception or failure.  
HTTP Status Code: 500

## Examples
<a name="API_EnableOrganizationLevelResources_Examples"></a>

### Example – Enable organization-level resources
<a name="API_EnableOrganizationLevelResources_Example_1"></a>

This example illustrates one usage of EnableOrganizationLevelResources.

#### Sample Request
<a name="API_EnableOrganizationLevelResources_Example_1_Request"></a>

```
https://iam.us-east-1.amazonaws.com/?Action=EnableOrganizationLevelResources
&Version=2010-05-08
&AUTHPARAMS
```

#### Sample Response
<a name="API_EnableOrganizationLevelResources_Example_1_Response"></a>

```xml
<EnableOrganizationLevelResourcesResponse xmlns="https://iam.amazonaws.com/doc/2010-05-08/">
  <EnableOrganizationLevelResourcesResult>
    <OrganizationId>o-aa111bb222</OrganizationId>
    <EnabledFeatures>
      <member>RootCredentialsManagement</member>
      <member>RootSessions</member>
      <member>OrganizationIamResources</member>
    </EnabledFeatures>
  </EnableOrganizationLevelResourcesResult>
  <ResponseMetadata>
    <RequestId>4a93ceee-9966-11e1-b624-b1aEXAMPLE7c</RequestId>
  </ResponseMetadata>
</EnableOrganizationLevelResourcesResponse>
```

## See Also
<a name="API_EnableOrganizationLevelResources_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/iam-2010-05-08/EnableOrganizationLevelResources) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/iam-2010-05-08/EnableOrganizationLevelResources) 
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/iam-2010-05-08/EnableOrganizationLevelResources) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/iam-2010-05-08/EnableOrganizationLevelResources) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/iam-2010-05-08/EnableOrganizationLevelResources) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/iam-2010-05-08/EnableOrganizationLevelResources) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/iam-2010-05-08/EnableOrganizationLevelResources) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/iam-2010-05-08/EnableOrganizationLevelResources) 
+  [AWS SDK for Python (Boto3)](https://docs.aws.amazon.com/goto/boto3/iam-2010-05-08/EnableOrganizationLevelResources) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/iam-2010-05-08/EnableOrganizationLevelResources) 