Skip to content

set_default_policy_version

Operation

set_default_policy_version

set_default_policy_version(request: SetDefaultPolicyVersionInput | SetDefaultPolicyVersionInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[SetDefaultPolicyVersionInputDict]) -> SetDefaultPolicyVersionOutput

Sets the specified version of the specified policy as the policy's default (operative) version.

This operation affects all users, groups, and roles that the policy is attached to. To list the users, groups, and roles that the policy is attached to, use ListEntitiesForPolicy.

For information about managed policies, see Managed policies and inline policies in the IAM User Guide.

Parameters:

Name Type Description Default
request SetDefaultPolicyVersionInput | SetDefaultPolicyVersionInputDict | 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[SetDefaultPolicyVersionInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
SetDefaultPolicyVersionOutput

An instance of SetDefaultPolicyVersionOutput.

set_default_policy_version async

set_default_policy_version(request: SetDefaultPolicyVersionInput | SetDefaultPolicyVersionInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[SetDefaultPolicyVersionInputDict]) -> SetDefaultPolicyVersionOutput

Sets the specified version of the specified policy as the policy's default (operative) version.

This operation affects all users, groups, and roles that the policy is attached to. To list the users, groups, and roles that the policy is attached to, use ListEntitiesForPolicy.

For information about managed policies, see Managed policies and inline policies in the IAM User Guide.

Parameters:

Name Type Description Default
request SetDefaultPolicyVersionInput | SetDefaultPolicyVersionInputDict | 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[SetDefaultPolicyVersionInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
SetDefaultPolicyVersionOutput

An instance of SetDefaultPolicyVersionOutput.

Input

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

SetDefaultPolicyVersionInputDict

Bases: TypedDict

Dictionary form of SetDefaultPolicyVersionInput.

Attributes

policy_arn instance-attribute
policy_arn: Required[str]

The Amazon Resource Name (ARN) of the IAM policy whose default version you want to set.

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

version_id instance-attribute
version_id: Required[str]

The version of the policy to set as the default (operative) version.

For more information about managed policy versions, see Versioning for managed policies in the IAM User Guide.

SetDefaultPolicyVersionInput dataclass

Bases: _SerdeShape

Dataclass for SetDefaultPolicyVersionInput structure.

Attributes

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

The Amazon Resource Name (ARN) of the IAM policy whose default version you want to set.

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

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

The version of the policy to set as the default (operative) version.

For more information about managed policy versions, see Versioning for managed policies in the IAM User Guide.

Output

SetDefaultPolicyVersionOutput dataclass

Bases: _SerdeShape

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