acquire_role¶
Operation¶
acquire_role
async
¶
acquire_role(input: AcquireRoleInput, plugins: list[Plugin] | None = None) -> AcquireRoleOutput
Creates an IAM role from the specified role template. The new role takes its configuration---including its name, path, trust policy, inline and managed policies, permissions boundary, tags, and maximum session duration---from the role template version that you specify. For more information about roles, see IAM roles in the IAM User Guide.
If the template version defines parameters, use the ReplacementValues
parameter to supply the values that the service substitutes into the
role during creation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
AcquireRoleInput
|
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 |
|---|---|
AcquireRoleOutput
|
An instance of |
Input¶
AcquireRoleInput
dataclass
¶
Bases: _SerdeShape
Dataclass for AcquireRoleInput structure.
Attributes¶
replacement_values
class-attribute
instance-attribute
¶
A map of values to substitute for the parameters that are defined in the role template version. Each key is a parameter name from the template, and each value is a structure that contains the replacement values for that parameter.
template_arn
class-attribute
instance-attribute
¶
template_arn: str | None = ...
The Amazon Resource Name (ARN) of the role template to create the role from.
For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.
Output¶
AcquireRoleOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for AcquireRoleOutput structure.
Attributes¶
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.
role
instance-attribute
¶
A structure that contains details about the IAM role that was created.