acquire_role¶
Operation¶
acquire_role
async
¶
acquire_role(request: AcquireRoleInput | AcquireRoleInputDict, /, *, plugins: list[Plugin] | None = None) -> AcquireRoleOutput
acquire_role(*, plugins: list[Plugin] | None = None, **kwargs: Unpack[AcquireRoleInputDict]) -> 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 |
|---|---|---|---|
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¶
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¶
AcquireRoleInput
dataclass
¶
Bases: _SerdeShape
Dataclass for AcquireRoleInput structure.
Attributes¶
replacement_values
class-attribute
instance-attribute
¶
replacement_values: dict[str, ReplacementValueEntry] | None = ...
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.
Dictionaries¶
AcquireRoleInputDict
¶
Bases: TypedDict
Dictionary form of AcquireRoleInput.
Attributes¶
replacement_values
instance-attribute
¶
replacement_values: Mapping[str, ReplacementValueEntry | ReplacementValueEntryDict] | None
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
instance-attribute
¶
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.