Removes CloudTrail delegated administrator permissions from a member account in an organization.
Parameters:
-
delegated_admin_account_id
(AccountId)
–
A delegated administrator account ID. This is a member account in an organization that is currently designated as a delegated administrator.
Raises:
-
AccountNotFoundException
–
This exception is thrown when the specified account is not found or not part of an organization.
-
AccountNotRegisteredException
–
This exception is thrown when the specified account is not registered as the CloudTrail delegated administrator.
-
CloudTrailAccessNotEnabledException
–
-
ConflictException
–
This exception is thrown when the specified resource is not ready for an operation. This can occur when you try to run an operation on a resource before CloudTrail has time to fully load the resource, or because another operation is modifying the resource. If this exception occurs, wait a few minutes, and then try the operation again.
-
InsufficientDependencyServiceAccessPermissionException
–
This exception is thrown when the IAM identity that is used to create the organization resource lacks one or more required permissions for creating an organization resource in a required service.
-
InvalidParameterException
–
The request includes a parameter that is not valid.
-
NotOrganizationManagementAccountException
–
This exception is thrown when the account making the request is not the organization's management account.
-
OperationNotPermittedException
–
This exception is thrown when the requested operation is not permitted.
-
OrganizationNotInAllFeaturesModeException
–
This exception is thrown when Organizations is not configured to support all features. All features must be enabled in Organizations to support creating an organization trail or event data store.
-
OrganizationsNotInUseException
–
This exception is thrown when the request is made from an Amazon Web Services account that is not a member of an organization. To make this request, sign in using the credentials of an account that belongs to an organization.
-
UnsupportedOperationException
–
This exception is thrown when the requested operation is not supported.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_cloudtrail/_services/cloud_trail.py
| def deregister_organization_delegated_admin(
self,
delegated_admin_account_id: "capo_cloudtrail.types.account_id.AccountId",
*,
config_overrides: Optional[CloudTrailClientConfig] = None,
) -> "capo_cloudtrail.types.deregister_organization_delegated_admin_response.DeregisterOrganizationDelegatedAdminResponse":
"""<p>Removes CloudTrail delegated administrator permissions from a member account in an organization.</p>
Args:
delegated_admin_account_id: <p>A delegated administrator account ID. This is a member account in an organization that is currently designated as a delegated administrator.</p>
Raises:
capo_cloudtrail.errors.account_not_found_exception.AccountNotFoundException: <p>This exception is thrown when the specified account is not found or not part of an organization.</p>
capo_cloudtrail.errors.account_not_registered_exception.AccountNotRegisteredException: <p>This exception is thrown when the specified account is not registered as the CloudTrail delegated administrator.</p>
capo_cloudtrail.errors.cloud_trail_access_not_enabled_exception.CloudTrailAccessNotEnabledException: <p>This exception is thrown when trusted access has not been enabled between CloudTrail and Organizations. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html#orgs_how-to-enable-disable-trusted-access">How to enable or disable trusted access</a> in the <i>Organizations User Guide</i> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare For Creating a Trail For Your Organization</a> in the <i>CloudTrail User Guide</i>.</p>
capo_cloudtrail.errors.conflict_exception.ConflictException: <p>This exception is thrown when the specified resource is not ready for an operation. This can occur when you try to run an operation on a resource before CloudTrail has time to fully load the resource, or because another operation is modifying the resource. If this exception occurs, wait a few minutes, and then try the operation again.</p>
capo_cloudtrail.errors.insufficient_dependency_service_access_permission_exception.InsufficientDependencyServiceAccessPermissionException: <p>This exception is thrown when the IAM identity that is used to create the organization resource lacks one or more required permissions for creating an organization resource in a required service.</p>
capo_cloudtrail.errors.invalid_parameter_exception.InvalidParameterException: <p>The request includes a parameter that is not valid.</p>
capo_cloudtrail.errors.not_organization_management_account_exception.NotOrganizationManagementAccountException: <p> This exception is thrown when the account making the request is not the organization's management account. </p>
capo_cloudtrail.errors.operation_not_permitted_exception.OperationNotPermittedException: <p>This exception is thrown when the requested operation is not permitted.</p>
capo_cloudtrail.errors.organization_not_in_all_features_mode_exception.OrganizationNotInAllFeaturesModeException: <p>This exception is thrown when Organizations is not configured to support all features. All features must be enabled in Organizations to support creating an organization trail or event data store.</p>
capo_cloudtrail.errors.organizations_not_in_use_exception.OrganizationsNotInUseException: <p>This exception is thrown when the request is made from an Amazon Web Services account that is not a member of an organization. To make this request, sign in using the credentials of an account that belongs to an organization.</p>
capo_cloudtrail.errors.unsupported_operation_exception.UnsupportedOperationException: <p>This exception is thrown when the requested operation is not supported.</p>
capo_cloudtrail.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_cloudtrail.types.deregister_organization_delegated_admin_request.DeregisterOrganizationDelegatedAdminRequest]",
) -> OperationResponse[
"capo_cloudtrail.types.deregister_organization_delegated_admin_response.DeregisterOrganizationDelegatedAdminResponse"
]:
import capo_cloudtrail._operations.cloud_trail_20131101.deregister_organization_delegated_admin
output, http_response = (
capo_cloudtrail._operations.cloud_trail_20131101.deregister_organization_delegated_admin.deregister_organization_delegated_admin(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeregisterOrganizationDelegatedAdmin")
)
input_: capo_cloudtrail.types.deregister_organization_delegated_admin_request.DeregisterOrganizationDelegatedAdminRequest = {
"delegated_admin_account_id": delegated_admin_account_id
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|