get_group_policy¶
Operation¶
get_group_policy
async
¶
get_group_policy(request: GetGroupPolicyInput | GetGroupPolicyInputDict, /, *, plugins: list[Plugin] | None = None) -> GetGroupPolicyOutput
get_group_policy(*, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetGroupPolicyInputDict]) -> GetGroupPolicyOutput
Retrieves the specified inline policy document that is embedded in the specified IAM group.
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.
An IAM group can also have managed policies attached to it. To retrieve a managed policy document that is attached to a group, use GetPolicy to determine the policy's default version, then use GetPolicyVersion to retrieve the policy document.
For more information about policies, see Managed policies and inline policies in the IAM User Guide.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
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 |
|---|---|
GetGroupPolicyOutput
|
An instance of |
Input¶
Pass the input fields as keyword arguments, or pass a model or dictionary as the first positional argument. Pass plugins separately as a keyword argument.
Model¶
GetGroupPolicyInput
dataclass
¶
Bases: _SerdeShape
Dataclass for GetGroupPolicyInput structure.
Attributes¶
group_name
class-attribute
instance-attribute
¶
group_name: str | None = ...
The name of the group the policy is associated with.
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_name
class-attribute
instance-attribute
¶
policy_name: str | None = ...
The name of the policy document to get.
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: _+=,.@-
Dictionaries¶
GetGroupPolicyInputDict
¶
Bases: TypedDict
Dictionary form of GetGroupPolicyInput.
Attributes¶
group_name
instance-attribute
¶
The name of the group the policy is associated with.
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_name
instance-attribute
¶
The name of the policy document to get.
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¶
GetGroupPolicyOutput
dataclass
¶
Bases: _SerdeShape
Contains the response to a successful GetGroupPolicy request.
Attributes¶
policy_document
instance-attribute
¶
policy_document: str
The policy document.
IAM stores policies in JSON format. However, resources that were created using CloudFormation templates can be formatted in YAML. CloudFormation always converts a YAML policy to JSON format before submitting it to IAM.
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.