#[non_exhaustive]
pub enum DetachPolicyError {
Show 13 variants AccessDeniedException(AccessDeniedException), AwsOrganizationsNotInUseException(AwsOrganizationsNotInUseException), ConcurrentModificationException(ConcurrentModificationException), ConstraintViolationException(ConstraintViolationException), InvalidInputException(InvalidInputException), PolicyChangesInProgressException(PolicyChangesInProgressException), PolicyNotAttachedException(PolicyNotAttachedException), PolicyNotFoundException(PolicyNotFoundException), ServiceException(ServiceException), TargetNotFoundException(TargetNotFoundException), TooManyRequestsException(TooManyRequestsException), UnsupportedApiEndpointException(UnsupportedApiEndpointException), Unhandled(Unhandled),
}
Expand description

Error type for the DetachPolicyError operation.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

AccessDeniedException(AccessDeniedException)

You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see Access Management in the IAM User Guide.

§

AwsOrganizationsNotInUseException(AwsOrganizationsNotInUseException)

Your account isn't a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.

§

ConcurrentModificationException(ConcurrentModificationException)

The target of the operation is currently being modified by a different request. Try again later.

§

ConstraintViolationException(ConstraintViolationException)

Performing this operation violates a minimum or maximum value limit. For example, attempting to remove the last service control policy (SCP) from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit:

Some of the reasons in the following list might not be applicable to this specific API or operation.

  • ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management account from the organization. You can't remove the management account. Instead, after you remove all member accounts, delete the organization itself.

  • ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove an account from the organization that doesn't yet have enough information to exist as a standalone account. This account requires you to first complete phone verification. Follow the steps at Removing a member account from your organization in the Organizations User Guide.

  • ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.

  • ACCOUNT_CREATION_NOT_COMPLETE: Your account setup isn't complete or your account isn't fully active. You must complete the account setup before you create an organization.

  • ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact Amazon Web Services Support to request an increase in your limit.

    Or the number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations or contact Amazon Web Services Support to request an increase in the number of accounts.

    Deleted and closed accounts still count toward your limit.

    If you get this exception when running a command immediately after creating the organization, wait one hour and try again. After an hour, if the command continues to fail with this error, contact Amazon Web Services Support.

  • CANNOT_REGISTER_SUSPENDED_ACCOUNT_AS_DELEGATED_ADMINISTRATOR: You cannot register a suspended account as a delegated administrator.

  • CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to register the management account of the organization as a delegated administrator for an Amazon Web Services service integrated with Organizations. You can designate only a member account as a delegated administrator.

  • CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management account. To close the management account for the organization, you must first either remove or close all member accounts in the organization. Follow standard account closure process using root credentials.​

  • CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove an account that is registered as a delegated administrator for a service integrated with your organization. To complete this operation, you must first deregister this account as a delegated administrator.

  • CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota for the past 30 days.

  • CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number of accounts that you can close at a time. ​

  • CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an organization in the specified region, you must enable all features mode.

  • DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register an Amazon Web Services account as a delegated administrator for an Amazon Web Services service that already has a delegated administrator. To complete this operation, you must first deregister any existing delegated administrators for this service.

  • EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only valid for a limited period of time. You must resubmit the request and generate a new verfication code.

  • HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of handshakes that you can send in one day.

  • INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no supported payment method is associated with the account. Amazon Web Services does not support cards issued by financial institutions in Russia or Belarus. For more information, see Managing your Amazon Web Services payments.

  • MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account in this organization, you first must migrate the organization's management account to the marketplace that corresponds to the management account's address. For example, accounts with India addresses must be associated with the AISPL marketplace. All accounts in an organization must be associated with the same marketplace.

  • MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon Web Services Regions in China. To create an organization, the master must have a valid business license. For more information, contact customer support.

  • MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you must first provide a valid contact address and phone number for the management account. Then try the operation again.

  • MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the management account must have an associated account in the Amazon Web Services GovCloud (US-West) Region. For more information, see Organizations in the Amazon Web Services GovCloud User Guide.

  • MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization with this management account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see Considerations before removing an account from an organization in the Organizations User Guide.

  • MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted to register more delegated administrators than allowed for the service principal.

  • MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.

  • MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed on this resource.

  • MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation with this member account, you first must associate a valid payment instrument, such as a credit card, with the account. For more information, see Considerations before removing an account from an organization in the Organizations User Guide.

  • MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.

  • ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation that requires the organization to be configured to support all features. An organization that supports only consolidated billing features can't perform this operation.

  • OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is too many levels deep.

  • OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs that you can have in an organization.

  • POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that is larger than the maximum size.

  • POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of policies that you can have in an organization.

  • SERVICE_ACCESS_NOT_ENABLED: You attempted to register a delegated administrator before you enabled service access. Call the EnableAWSServiceAccess API first.

  • TAG_POLICY_VIOLATION: You attempted to create or update a resource with tags that are not compliant with the tag policy requirements for this account.

  • WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account, there is a waiting period before you can remove it from the organization. If you get an error that indicates that a wait period is required, try again in a few days.

§

InvalidInputException(InvalidInputException)

The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:

Some of the reasons in the following list might not be applicable to this specific API or operation.

  • DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to the same entity.

  • IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web Services and can't be modified.

  • INPUT_REQUIRED: You must include a value for all required parameters.

  • INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address for the invited account owner.

  • INVALID_ENUM: You specified an invalid value.

  • INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.

  • INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid characters.

  • INVALID_LIST_MEMBER: You provided a list to a parameter that contains at least one invalid value.

  • INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter from the response to a previous call of the operation.

  • INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, organization, or email) as a party.

  • INVALID_PATTERN: You provided a value that doesn't match the required pattern.

  • INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't match the required pattern.

  • INVALID_ROLE_NAME: You provided a role name that isn't valid. A role name can't begin with the reserved prefix AWSServiceRoleFor.

  • INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource Name (ARN) for the organization.

  • INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.

  • INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system tag. You can’t add, edit, or delete system tag keys because they're reserved for Amazon Web Services use. System tags don’t count against your tags per resource limit.

  • MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter for the operation.

  • MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer than allowed.

  • MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger value than allowed.

  • MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter than allowed.

  • MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.

  • MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only between entities in the same root.

  • TARGET_NOT_SUPPORTED: You can't perform the specified operation on that target entity.

  • UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that isn't recognized.

§

PolicyChangesInProgressException(PolicyChangesInProgressException)

Changes to the effective policy are in progress, and its contents can't be returned. Try the operation again later.

§

PolicyNotAttachedException(PolicyNotAttachedException)

The policy isn't attached to the specified target in the specified root.

§

PolicyNotFoundException(PolicyNotFoundException)

We can't find a policy with the PolicyId that you specified.

§

ServiceException(ServiceException)

Organizations can't complete your request because of an internal service error. Try again later.

§

TargetNotFoundException(TargetNotFoundException)

We can't find a root, OU, account, or policy with the TargetId that you specified.

§

TooManyRequestsException(TooManyRequestsException)

You have sent too many requests in too short a period of time. The quota helps protect against denial-of-service attacks. Try again later.

For information about quotas that affect Organizations, see Quotas for Organizations in the Organizations User Guide.

§

UnsupportedApiEndpointException(UnsupportedApiEndpointException)

This action isn't available in the current Amazon Web Services Region.

§

Unhandled(Unhandled)

👎Deprecated: Matching Unhandled directly is not forwards compatible. Instead, match using a variable wildcard pattern and check .code():    err if err.code() == Some("SpecificExceptionCode") => { /* handle the error */ } See ProvideErrorMetadata for what information is available for the error.

An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).

Implementations§

source§

impl DetachPolicyError

source

pub fn unhandled(err: impl Into<Box<dyn Error + Send + Sync + 'static>>) -> Self

Creates the DetachPolicyError::Unhandled variant from any error type.

source

pub fn generic(err: ErrorMetadata) -> Self

Creates the DetachPolicyError::Unhandled variant from an ErrorMetadata.

source

pub fn meta(&self) -> &ErrorMetadata

Returns error metadata, which includes the error code, message, request ID, and potentially additional information.

source

pub fn is_access_denied_exception(&self) -> bool

Returns true if the error kind is DetachPolicyError::AccessDeniedException.

source

pub fn is_aws_organizations_not_in_use_exception(&self) -> bool

Returns true if the error kind is DetachPolicyError::AwsOrganizationsNotInUseException.

source

pub fn is_concurrent_modification_exception(&self) -> bool

Returns true if the error kind is DetachPolicyError::ConcurrentModificationException.

source

pub fn is_constraint_violation_exception(&self) -> bool

Returns true if the error kind is DetachPolicyError::ConstraintViolationException.

source

pub fn is_invalid_input_exception(&self) -> bool

Returns true if the error kind is DetachPolicyError::InvalidInputException.

source

pub fn is_policy_changes_in_progress_exception(&self) -> bool

Returns true if the error kind is DetachPolicyError::PolicyChangesInProgressException.

source

pub fn is_policy_not_attached_exception(&self) -> bool

Returns true if the error kind is DetachPolicyError::PolicyNotAttachedException.

source

pub fn is_policy_not_found_exception(&self) -> bool

Returns true if the error kind is DetachPolicyError::PolicyNotFoundException.

source

pub fn is_service_exception(&self) -> bool

Returns true if the error kind is DetachPolicyError::ServiceException.

source

pub fn is_target_not_found_exception(&self) -> bool

Returns true if the error kind is DetachPolicyError::TargetNotFoundException.

source

pub fn is_too_many_requests_exception(&self) -> bool

Returns true if the error kind is DetachPolicyError::TooManyRequestsException.

source

pub fn is_unsupported_api_endpoint_exception(&self) -> bool

Returns true if the error kind is DetachPolicyError::UnsupportedApiEndpointException.

Trait Implementations§

source§

impl CreateUnhandledError for DetachPolicyError

source§

fn create_unhandled_error( source: Box<dyn Error + Send + Sync + 'static>, meta: Option<ErrorMetadata> ) -> Self

Creates an unhandled error variant with the given source and error metadata.
source§

impl Debug for DetachPolicyError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for DetachPolicyError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for DetachPolicyError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<DetachPolicyError> for Error

source§

fn from(err: DetachPolicyError) -> Self

Converts to this type from the input type.
source§

impl ProvideErrorKind for DetachPolicyError

source§

fn code(&self) -> Option<&str>

Returns the code for this error if one exists
source§

fn retryable_error_kind(&self) -> Option<ErrorKind>

Returns the ErrorKind when the error is modeled as retryable Read more
source§

impl ProvideErrorMetadata for DetachPolicyError

source§

fn meta(&self) -> &ErrorMetadata

Returns error metadata, which includes the error code, message, request ID, and potentially additional information.
source§

fn code(&self) -> Option<&str>

Returns the error code if it’s available.
source§

fn message(&self) -> Option<&str>

Returns the error message, if there is one.
source§

impl RequestId for DetachPolicyError

source§

fn request_id(&self) -> Option<&str>

Returns the request ID, or None if the service could not be reached.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more