Skip to content

detach_group_policy

Operation

detach_group_policy

detach_group_policy(request: DetachGroupPolicyInput | DetachGroupPolicyInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[DetachGroupPolicyInputDict]) -> DetachGroupPolicyOutput

Removes the specified managed policy from the specified IAM group.

A group can also have inline policies embedded with it. To delete an inline policy, use DeleteGroupPolicy. For information about policies, see Managed policies and inline policies in the IAM User Guide.

Parameters:

Name Type Description Default
request DetachGroupPolicyInput | DetachGroupPolicyInputDict | 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[DetachGroupPolicyInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
DetachGroupPolicyOutput

An instance of DetachGroupPolicyOutput.

detach_group_policy async

detach_group_policy(request: DetachGroupPolicyInput | DetachGroupPolicyInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[DetachGroupPolicyInputDict]) -> DetachGroupPolicyOutput

Removes the specified managed policy from the specified IAM group.

A group can also have inline policies embedded with it. To delete an inline policy, use DeleteGroupPolicy. For information about policies, see Managed policies and inline policies in the IAM User Guide.

Parameters:

Name Type Description Default
request DetachGroupPolicyInput | DetachGroupPolicyInputDict | 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[DetachGroupPolicyInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
DetachGroupPolicyOutput

An instance of DetachGroupPolicyOutput.

Input

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

DetachGroupPolicyInputDict

Bases: TypedDict

Dictionary form of DetachGroupPolicyInput.

Attributes

group_name instance-attribute
group_name: Required[str]

The name (friendly name, not ARN) of the IAM group to detach the policy from.

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: _+=,.@-

policy_arn instance-attribute
policy_arn: Required[str]

The Amazon Resource Name (ARN) of the IAM policy you want to detach.

For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.

DetachGroupPolicyInput dataclass

Bases: _SerdeShape

Dataclass for DetachGroupPolicyInput structure.

Attributes

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

The name (friendly name, not ARN) of the IAM group to detach the policy from.

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: _+=,.@-

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

The Amazon Resource Name (ARN) of the IAM policy you want to detach.

For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.

Output

DetachGroupPolicyOutput dataclass

Bases: _SerdeShape

Dataclass for DetachGroupPolicyOutput 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.