View a markdown version of this page

GetRoleTemplateVersion - AWS Identity and Access Management

GetRoleTemplateVersion

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.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

MinorVersion

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.

Type: Integer

Required: No

TemplateArn

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 AWS General Reference.

Type: String

Length Constraints: Minimum length of 20. Maximum length of 2048.

Required: Yes

Response Elements

The following element is returned by the service.

RoleTemplateVersion

A structure that contains details about the requested role template version.

Type: RoleTemplateVersion object

Errors

For information about the errors that are common to all actions, see Common Error Types.

InvalidInput

The request was rejected because an invalid or out-of-range value was supplied for an input parameter.

HTTP Status Code: 400

NoSuchEntity

The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.

HTTP Status Code: 404

ServiceFailure

The request processing has failed because of an unknown error, exception or failure.

HTTP Status Code: 500

Examples

Example

This example illustrates one usage of GetRoleTemplateVersion.

Sample Request

https://iam.amazonaws.com/?Action=GetRoleTemplateVersion &TemplateArn=arn:aws:iam::aws:role-template/awsserviceprincipal/Example:1 &MinorVersion=1 &Version=2010-05-08 &AUTHPARAMS

Sample Response

<GetRoleTemplateVersionResponse xmlns="https://iam.amazonaws.com/doc/2010-05-08/"> <GetRoleTemplateVersionResult> <RoleTemplateVersion> <TemplateArn>arn:aws:iam::aws:role-template/awsserviceprincipal/Example:1</TemplateArn> <TemplateName>Example</TemplateName> <MajorVersion>1</MajorVersion> <MinorVersion>1</MinorVersion> <DefaultMinorVersion>1</DefaultMinorVersion> <Enabled>true</Enabled> <RoleNamePattern>Example-@{Department}</RoleNamePattern> <AssumeRolePolicyDocumentTemplate> {"Version":"2012-10-17","Statement":[{"Effect":"Allow", "Principal":{"Service":["ec2.amazonaws.com"]},"Action":["sts:AssumeRole"]}]} </AssumeRolePolicyDocumentTemplate> <CreateTimestamp>2026-06-26T20:43:32Z</CreateTimestamp> </RoleTemplateVersion> </GetRoleTemplateVersionResult> <ResponseMetadata> <RequestId>e4bdcdae-4f66-11e4-aefa-bfd6aEXAMPLE</RequestId> </ResponseMetadata> </GetRoleTemplateVersionResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: