get_policy_version¶
Operation¶
get_policy_version
async
¶
get_policy_version(input: GetPolicyVersionInput, plugins: list[Plugin] | None = None) -> GetPolicyVersionOutput
Retrieves information about the specified version of the specified managed policy, including the policy document.
Note
Policies returned by this operation are URL-encoded compliant with RFC
3986. You can use a URL decoding
method to convert the policy back to plain JSON text. For example, if
you use Java, you can use the decode method of the
java.net.URLDecoder utility class in the Java SDK. Other languages and
SDKs provide similar functionality, and some SDKs do this decoding
automatically.
To list the available versions for a policy, use ListPolicyVersions.
This operation retrieves information about managed policies. To retrieve information about an inline policy that is embedded in a user, group, or role, use GetUserPolicy, GetGroupPolicy, or GetRolePolicy.
For more information about the types of policies, see Managed policies and inline policies in the IAM User Guide.
For more information about managed policy versions, see Versioning for managed policies in the IAM User Guide.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
GetPolicyVersionInput
|
An instance of |
required |
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
|
Returns:
| Type | Description |
|---|---|
GetPolicyVersionOutput
|
An instance of |
Input¶
GetPolicyVersionInput
dataclass
¶
Bases: _SerdeShape
Dataclass for GetPolicyVersionInput structure.
Attributes¶
policy_arn
class-attribute
instance-attribute
¶
policy_arn: str | None = ...
The Amazon Resource Name (ARN) of the managed policy that you want information about.
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 = ...
Identifies the policy version to retrieve.
This parameter allows (through its regex pattern) a string of characters that consists of the lowercase letter 'v' followed by one or two digits, and optionally followed by a period '.' and a string of letters and digits.
Output¶
GetPolicyVersionOutput
dataclass
¶
Bases: _SerdeShape
Contains the response to a successful GetPolicyVersion request.
Attributes¶
policy_version
class-attribute
instance-attribute
¶
A structure containing details about the policy version.
response_metadata
class-attribute
instance-attribute
¶
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.