IAM / Client / get_role_template_version
get_role_template_version¶
- IAM.Client.get_role_template_version(**kwargs)¶
Retrieves information about a version of the specified role template. Role templates define a reusable configuration—including role name and path patterns, trust policy, inline and managed policies, permissions boundary, tags, and maximum session duration—that you use to create IAM roles with AcquireRole.
If you do not specify a minor version, the service returns the template’s default minor version.
See also: AWS API Documentation
Request Syntax
response = client.get_role_template_version( TemplateArn='string', MinorVersion=123 )
- Parameters:
TemplateArn (string) –
[REQUIRED]
The Amazon Resource Name (ARN) of the role template whose version you want to retrieve.
For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.
MinorVersion (integer) – The minor version of the role template to retrieve. If you do not specify a minor version, the service returns the template’s default minor version.
- Return type:
dict
- Returns:
Response Syntax
{ 'RoleTemplateVersion': { 'TemplateArn': 'string', 'TemplateName': 'string', 'TemplateVersionId': 'string', 'Description': 'string', 'MajorVersion': 123, 'DefaultMinorVersion': 123, 'ManagedByType': 'Service', 'ManagedByValue': 'string', 'Enabled': True|False, 'MinorVersion': 123, 'RoleNamePattern': 'string', 'RolePathPattern': 'string', 'RoleDescriptionPattern': 'string', 'AssumeRolePolicyDocumentTemplate': {}, 'InlinePolicyTemplates': [ { 'PolicyName': 'string', 'PolicyDocument': {} }, ], 'ManagedPolicyArns': [ 'string', ], 'PermissionBoundaryArn': 'string', 'ParametersDefinition': [ { 'Name': 'string', 'Type': 'String'|'StringList'|'Number'|'NumberList'|'Arn'|'ArnList', 'SubType': 'string', 'Description': 'string', 'IsRequired': True|False, 'DefaultValue': 'string', 'Immutable': True|False }, ], 'RoleTagsTemplate': [ { 'Key': 'string', 'Value': 'string' }, ], 'MaxSessionDuration': 123, 'VersionEnabled': True|False, 'CreateTimestamp': datetime(2015, 1, 1), 'UpdateTimestamp': datetime(2015, 1, 1) } }
Response Structure
(dict) –
RoleTemplateVersion (dict) –
A structure that contains details about the requested role template version.
TemplateArn (string) –
The Amazon Resource Name (ARN) that identifies the role template.
For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.
TemplateName (string) –
The friendly name that identifies the role template.
TemplateVersionId (string) –
The identifier of the role template version.
Description (string) –
The description of the role template.
MajorVersion (integer) –
The major version number of the role template.
DefaultMinorVersion (integer) –
The minor version that the service uses by default when you create a role from this template without specifying a minor version.
ManagedByType (string) –
Indicates that the role template is managed by an Amazon Web Services service.
ManagedByValue (string) –
The identifier of the Amazon Web Services service that manages the role template.
Enabled (boolean) –
Specifies whether the role template is enabled. When a template is disabled, you cannot create roles from it.
MinorVersion (integer) –
The minor version number of this role template version.
RoleNamePattern (string) –
The pattern that is used to generate the name of a role that is created from this template. The pattern can include
@{parameter}placeholders that are replaced with the values you supply in theReplacementValuesparameter of AcquireRole.RolePathPattern (string) –
The pattern that is used to generate the path of a role that is created from this template.
RoleDescriptionPattern (string) –
The pattern that is used to generate the description of a role that is created from this template.
AssumeRolePolicyDocumentTemplate (dict) –
The trust policy template that grants an entity permission to assume roles that you create from this template.
InlinePolicyTemplates (list) –
A list of inline policy templates that the service embeds in roles that you create from this template.
(dict) –
Contains an inline policy template that the service embeds in roles that you create from a role template.
PolicyName (string) –
The name of the inline policy.
PolicyDocument (dict) –
The inline policy document.
ManagedPolicyArns (list) –
A list of the ARNs of the managed policies that the service attaches to roles that you create from this template.
(string) –
The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web Services resources.
For more information about ARNs, go to Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.
PermissionBoundaryArn (string) –
The ARN of the policy that sets the permissions boundary for roles that you create from this template.
For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.
ParametersDefinition (list) –
A list of the parameters that are defined for this role template version. You supply values for these parameters when you create a role with AcquireRole.
(dict) –
Defines a parameter that a role template accepts. You supply values for these parameters when you create a role with AcquireRole.
Name (string) –
The name of the parameter.
Type (string) –
The data type of the parameter. Valid values are
String,StringList,Number,NumberList,Arn, andArnList.SubType (string) –
An optional subtype that further constrains the values that are allowed for the parameter.
Description (string) –
A description of the parameter.
IsRequired (boolean) –
Specifies whether you must supply a value for the parameter when you create a role from the template.
DefaultValue (string) –
The value that the service uses for the parameter when you do not supply one.
Immutable (boolean) –
Specifies whether you can change the parameter value after you create the role.
RoleTagsTemplate (list) –
A list of tag templates that are applied to roles that are created from this template.
(dict) –
Represents a tag that is applied to roles that are created from a role template. The key and value can include
@{parameter}placeholders that are replaced with template parameter values when the role is created.Key (string) –
The key name of the tag.
Value (string) –
The value associated with the tag key.
MaxSessionDuration (integer) –
The maximum session duration (in seconds) for roles that are created from this template.
VersionEnabled (boolean) –
Specifies whether this specific minor version of the role template is enabled.
CreateTimestamp (datetime) –
The date and time, in ISO 8601 date-time format, when the role template version was created.
UpdateTimestamp (datetime) –
The date and time, in ISO 8601 date-time format, when the role template version was last updated.
Exceptions
IAM.Client.exceptions.NoSuchEntityExceptionIAM.Client.exceptions.InvalidInputExceptionIAM.Client.exceptions.ServiceFailureException