Skip to content

delete_user_policy

Operation

delete_user_policy

delete_user_policy(request: DeleteUserPolicyInput | DeleteUserPolicyInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[DeleteUserPolicyInputDict]) -> DeleteUserPolicyOutput

Deletes the specified inline policy that is embedded in the specified IAM user.

A user can also have managed policies attached to it. To detach a managed policy from a user, use DetachUserPolicy. For more information about policies, refer to Managed policies and inline policies in the IAM User Guide.

Parameters:

Name Type Description Default
request DeleteUserPolicyInput | DeleteUserPolicyInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[DeleteUserPolicyInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
DeleteUserPolicyOutput

An instance of DeleteUserPolicyOutput.

delete_user_policy async

delete_user_policy(request: DeleteUserPolicyInput | DeleteUserPolicyInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[DeleteUserPolicyInputDict]) -> DeleteUserPolicyOutput

Deletes the specified inline policy that is embedded in the specified IAM user.

A user can also have managed policies attached to it. To detach a managed policy from a user, use DetachUserPolicy. For more information about policies, refer to Managed policies and inline policies in the IAM User Guide.

Parameters:

Name Type Description Default
request DeleteUserPolicyInput | DeleteUserPolicyInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[DeleteUserPolicyInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
DeleteUserPolicyOutput

An instance of DeleteUserPolicyOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

DeleteUserPolicyInputDict

Bases: TypedDict

Dictionary form of DeleteUserPolicyInput.

Attributes

policy_name instance-attribute
policy_name: Required[str]

The name identifying the policy document to delete.

This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-

user_name instance-attribute
user_name: Required[str]

The name (friendly name, not ARN) identifying the user that the policy is embedded in.

This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-

DeleteUserPolicyInput dataclass

Bases: _SerdeShape

Dataclass for DeleteUserPolicyInput structure.

Attributes

policy_name class-attribute instance-attribute
policy_name: str | None = ...

The name identifying the policy document to delete.

This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-

user_name class-attribute instance-attribute
user_name: str | None = ...

The name (friendly name, not ARN) identifying the user that the policy is embedded in.

This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-

Output

DeleteUserPolicyOutput dataclass

Bases: _SerdeShape

Dataclass for DeleteUserPolicyOutput structure.

Attributes

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.