

# DisableOrganizationLevelResources

Disables your organization's ability 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. After you disable this capability, your organization returns to its default state and cannot create organization-level resources until the management account enables the capability again.

The organization-level resources that this capability governs include workload identity providers and workload identity templates that you create with a `ResourceScope` of `ORGANIZATION`.

Delete your organization's organization-level resources before you call this operation. If any organization-level resource still exists, IAM rejects the request with `OrganizationLevelResourcesExistException`. To delete an organization-scoped workload identity provider or workload identity template, see [DeleteWorkloadIdentityProvider](https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteWorkloadIdentityProvider.html) and [DeleteWorkloadIdentityTemplate](https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteWorkloadIdentityTemplate.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.

## Response Elements
<a name="API_DisableOrganizationLevelResources_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, so the feature that you disabled is no longer in the list.  
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_DisableOrganizationLevelResources_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

 ** OrganizationLevelResourcesExist **   
The request was rejected because your organization still has organization-level resources. Delete them before you disable organization-level resources for your 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_DisableOrganizationLevelResources_Examples"></a>

### Example – Disable organization-level resources
<a name="API_DisableOrganizationLevelResources_Example_1"></a>

This example illustrates one usage of DisableOrganizationLevelResources.

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

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

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

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

## See Also
<a name="API_DisableOrganizationLevelResources_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/DisableOrganizationLevelResources) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/iam-2010-05-08/DisableOrganizationLevelResources) 
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/iam-2010-05-08/DisableOrganizationLevelResources) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/iam-2010-05-08/DisableOrganizationLevelResources) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/iam-2010-05-08/DisableOrganizationLevelResources) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/iam-2010-05-08/DisableOrganizationLevelResources) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/iam-2010-05-08/DisableOrganizationLevelResources) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/iam-2010-05-08/DisableOrganizationLevelResources) 
+  [AWS SDK for Python (Boto3)](https://docs.aws.amazon.com/goto/boto3/iam-2010-05-08/DisableOrganizationLevelResources) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/iam-2010-05-08/DisableOrganizationLevelResources) 