get_role¶
Operation¶
get_role
async
¶
get_role(input: GetRoleInput, plugins: list[Plugin] | None = None) -> GetRoleOutput
Retrieves information about the specified role, including the role's path, GUID, ARN, and the role's trust policy that grants permission to assume the role. For more information about roles, see IAM roles in the IAM User Guide.
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.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
GetRoleInput
|
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 |
|---|---|
GetRoleOutput
|
An instance of |
Input¶
GetRoleInput
dataclass
¶
Bases: _SerdeShape
Dataclass for GetRoleInput structure.
Attributes¶
role_name
class-attribute
instance-attribute
¶
role_name: str | None = ...
The name of the IAM role to get information about.
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¶
GetRoleOutput
dataclass
¶
Bases: _SerdeShape
Contains the response to a successful GetRole request.