View a markdown version of this page

GetWorkloadIdentityTemplate - AWS Identity and Access Management

GetWorkloadIdentityTemplate

Retrieves a workload identity template, including its tags, addressed by its own ARN rather than by any name.

The attestation policy is deliberately not returned here. It is read through GetWorkloadIdentityTemplateAttestationPolicy, so a principal that is granted the template read does not thereby learn what the template will attest.

Request Parameters

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

WorkloadIdentityTemplateArn

The Amazon Resource Name (ARN) of the template to retrieve.

Type: String

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

Required: Yes

Response Elements

The following elements are returned by the service.

Arn

The template's own Amazon Resource Name (ARN). For more information about ARNs, see Amazon Resource Names (ARNs) in the AWS General Reference.

For an ORGANIZATION-scoped template, the account segment of the ARN is the organization ID, for example arn:aws:iam::o-abc123def4:workload-identity-template/PaymentsFleet.

Type: String

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

CreateDate

The date and time, in ISO 8601 date-time format, when the template was created.

Type: Timestamp

Description

The description of the template. Omitted when the template carries none.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1000.

Pattern: ^[\u0009\u000A\u000D\u0020-\u007E\u00A1-\u00FF]*$

Name

The name of the template.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: ^[A-Za-z0-9_-]+$

PathPattern

The pattern that workload identifiers are rendered from.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 16384.

Pattern: ^(?=.*\{)(?:\{[A-Za-z0-9:/._-]+\}|(?!\.{1,2}(?:/|$))[A-Za-z0-9._-]+)(?:/(?:\{[A-Za-z0-9:/._-]+\}|(?!\.{1,2}(?:/|$))[A-Za-z0-9._-]+))*$

PathPrefix

The namespace the pattern sits under. Omitted when the template carries none.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^(?!\.{1,2}(?:/|$))[A-Za-z0-9._-]+(?:/(?!\.{1,2}(?:/|$))[A-Za-z0-9._-]+)*$

ResourceScope

The scope the template is stored at.

Type: String

Valid Values: ACCOUNT | ORGANIZATION

Tags.member.N

The tags attached to the template. Omitted when the template carries none. For more information about tagging, see Tagging IAM resources in the IAM User Guide.

Type: Array of Tag objects

Array Members: Maximum number of 50 items.

TemplateId

The template's immutable identifier, which is distinct from its ARN. IAM prefixes it with AWTA for an account-scoped template and AWTO for an organization-scoped template. A template that is deleted and recreated under the same name keeps the ARN but gets a new identifier.

Type: String

Length Constraints: Minimum length of 16. Maximum length of 128.

Pattern: [\w]+

WorkloadIdentityProviderArn

The Amazon Resource Name (ARN) of the provider the template was created under.

Type: String

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

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 GetWorkloadIdentityTemplate.

Sample Request

https://iam.amazonaws.com/?Action=GetWorkloadIdentityTemplate &WorkloadIdentityTemplateArn=arn:aws:iam::111122223333:workload-identity-template/PaymentsFleet &Version=2010-05-08 &AUTHPARAMS

Sample Response

<GetWorkloadIdentityTemplateResponse xmlns="https://iam.amazonaws.com/doc/2010-05-08/"> <GetWorkloadIdentityTemplateResult> <Name>PaymentsFleet</Name> <TemplateId>AWTAI3LGJ4EXAMPLE</TemplateId> <Description>Payments fleet workloads attested through EKS</Description> <ResourceScope>ACCOUNT</ResourceScope> <Arn>arn:aws:iam::111122223333:workload-identity-template/PaymentsFleet</Arn> <WorkloadIdentityProviderArn>arn:aws:iam::111122223333:workload-identity-provider/PaymentsProd</WorkloadIdentityProviderArn> <PathPrefix>payments</PathPrefix> <PathPattern>{aws:WorkloadAttestation/aws/eks/ClusterName}/prod/{aws:WorkloadAttestation/aws/eks/Namespace}</PathPattern> <Tags> <member> <Key>Team</Key> <Value>Payments</Value> </member> </Tags> <CreateDate>2012-05-08T23:34:01.495Z</CreateDate> </GetWorkloadIdentityTemplateResult> <ResponseMetadata> <RequestId>20f7279f-99ee-11e1-a4c3-27EXAMPLE804</RequestId> </ResponseMetadata> </GetWorkloadIdentityTemplateResponse>

See Also

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