Enables your organization to create organization-level resources. An organization-level resource is an IAM resource that your organization owns instead of an individual Amazon Web Services 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 and CreateWorkloadIdentityTemplate.
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 Amazon Web Services accounts in Organizations.
-
Your organization must have All features enabled. For more information, see Available feature sets in the Organizations User Guide.
-
Enable trusted access for Identity and Access Management in Organizations. For details, see IAM and Organizations in the Organizations User Guide.
Raises:
Source code in docs_src/capo_iam/_services/iam.py
| def enable_organization_level_resources(
self, *, config_overrides: Optional[IAMClientConfig] = None
) -> "capo_iam.types.enable_organization_level_resources_response.EnableOrganizationLevelResourcesResponse":
"""<p>Enables your organization to create organization-level resources. An organization-level resource is an IAM resource that your organization owns instead of an individual Amazon Web Services account owning it.</p> <p>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.</p> <p>The organization-level resources that this capability governs include workload identity providers and workload identity templates that you create with a <code>ResourceScope</code> of <code>ORGANIZATION</code>. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateWorkloadIdentityProvider.html">CreateWorkloadIdentityProvider</a> and <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateWorkloadIdentityTemplate.html">CreateWorkloadIdentityTemplate</a>.</p> <p>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.</p> <p>Before you call this operation, your organization must be configured with the following settings:</p> <ul> <li> <p>You must manage your Amazon Web Services accounts in <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html">Organizations</a>.</p> </li> <li> <p>Your organization must have All features enabled. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#feature-set">Available feature sets</a> in the <i>Organizations User Guide</i>.</p> </li> <li> <p>Enable trusted access for Identity and Access Management in Organizations. For details, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/services-that-can-integrate-iam.html">IAM and Organizations</a> in the <i>Organizations User Guide</i>.</p> </li> </ul>
Raises:
capo_iam.errors.caller_is_not_management_account_exception.CallerIsNotManagementAccountException: <p>The request was rejected because the account making the request is not the management account for the organization.</p>
capo_iam.errors.organization_not_found_exception.OrganizationNotFoundException: <p>The request was rejected because no organization is associated with your account.</p>
capo_iam.errors.organization_not_in_all_features_mode_exception.OrganizationNotInAllFeaturesModeException: <p>The request was rejected because your organization does not have All features enabled. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#feature-set">Available feature sets</a> in the <i>Organizations User Guide</i>.</p>
capo_iam.errors.service_access_not_enabled_exception.ServiceAccessNotEnabledException: <p>The request was rejected because trusted access is not enabled for IAM in Organizations. For details, see IAM and Organizations in the <i>Organizations User Guide</i>.</p>
capo_iam.errors.service_failure_exception.ServiceFailureException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
capo_iam.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_iam.types.enable_organization_level_resources_request.EnableOrganizationLevelResourcesRequest]",
) -> OperationResponse[
"capo_iam.types.enable_organization_level_resources_response.EnableOrganizationLevelResourcesResponse"
]:
import capo_iam._operations.aws_identity_management_v20100508.enable_organization_level_resources
output, http_response = (
capo_iam._operations.aws_identity_management_v20100508.enable_organization_level_resources.enable_organization_level_resources(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("EnableOrganizationLevelResources")
)
input_: capo_iam.types.enable_organization_level_resources_request.EnableOrganizationLevelResourcesRequest = {}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|