Skip to content

disable_organizations_root_credentials_management

disable_organizations_root_credentials_management(
    *, config_overrides: Optional[IAMClientConfig] = None
) -> DisableOrganizationsRootCredentialsManagementResponse

Disables the management of privileged root user credentials across member accounts in your organization. When you disable this feature, the management account and the delegated administrator for IAM can no longer manage root user credentials for member accounts in your organization.

Raises:

Examples:

To disable the RootCredentialsManagement feature in your organization The following command disables the management of privileged root user credentials across member accounts in your organization.

>>> client.disable_organizations_root_credentials_management()
Source code in docs_src/capo_iam/_services/iam.py
def disable_organizations_root_credentials_management(
    self, *, config_overrides: Optional[IAMClientConfig] = None
) -> "capo_iam.types.disable_organizations_root_credentials_management_response.DisableOrganizationsRootCredentialsManagementResponse":
    """<p>Disables the management of privileged root user credentials across member accounts in your organization. When you disable this feature, the management account and the delegated administrator for IAM can no longer manage root user credentials for member accounts in your organization.</p>

    Raises:
        capo_iam.errors.account_not_management_or_delegated_administrator_exception.AccountNotManagementOrDelegatedAdministratorException: <p>The request was rejected because the account making the request is not the management account or delegated administrator account for <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html#id_root-user-access-management">centralized root access</a>.</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.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To disable the RootCredentialsManagement feature in your organization
        The following command disables the management of privileged root user credentials across member accounts in your organization.

        >>> client.disable_organizations_root_credentials_management()
    """

    def _handler(
        req: "OperationRequest[capo_iam.types.disable_organizations_root_credentials_management_request.DisableOrganizationsRootCredentialsManagementRequest]",
    ) -> OperationResponse[
        "capo_iam.types.disable_organizations_root_credentials_management_response.DisableOrganizationsRootCredentialsManagementResponse"
    ]:
        import capo_iam._operations.aws_identity_management_v20100508.disable_organizations_root_credentials_management

        output, http_response = (
            capo_iam._operations.aws_identity_management_v20100508.disable_organizations_root_credentials_management.disable_organizations_root_credentials_management(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("DisableOrganizationsRootCredentialsManagement"),
    )
    input_: capo_iam.types.disable_organizations_root_credentials_management_request.DisableOrganizationsRootCredentialsManagementRequest = {}

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output