acquire_role¶
Operation¶
acquire_role
¶
acquire_role(request: AcquireRoleInput | AcquireRoleInputDict | None = None, /, *, 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 |
|---|---|---|---|
request
|
AcquireRoleInput | AcquireRoleInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
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
|
**kwargs
|
Unpack[AcquireRoleInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
AcquireRoleOutput
|
An instance of |
acquire_role
async
¶
acquire_role(request: AcquireRoleInput | AcquireRoleInputDict | None = None, /, *, 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 |
|---|---|---|---|
request
|
AcquireRoleInput | AcquireRoleInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
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
|
**kwargs
|
Unpack[AcquireRoleInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
AcquireRoleOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
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.
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.
Output¶
AcquireRoleOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for AcquireRoleOutput structure.