CreateWorkloadIdentityProvider
Creates a workload identity provider in your account or in your organization,
according to ResourceScope. A provider is the issuer and the trust boundary
for every workload identifier minted under it.
The provider's name must be unique within the collection it is created in. A name
conflict returns EntityAlreadyExistsException.
IAM creates one JSON Web Token (JWT) outbound signer for each supported signing algorithm along with the provider.
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
- Description
-
A description of the provider. If you omit it, the provider carries no description and responses omit the
Descriptionelement.Type: String
Length Constraints: Maximum length of 255.
Pattern:
^[\u0009\u000A\u000D\u0020-\u007E\u00A1-\u00FF]*$Required: No
- ProviderName
-
The friendly name of the provider to create. The name must be unique within the collection the provider is created in, and it becomes the resource name segment of the provider's ARN.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 128.
Pattern:
^[A-Za-z0-9_.-]+$Required: Yes
- ResourceScope
-
The scope the provider is created at, which is fixed at creation.
ACCOUNTcreates the provider in your account andORGANIZATIONcreates it in your organization. If you do not include this parameter, it defaults toACCOUNT.Type: String
Valid Values:
ACCOUNT | ORGANIZATIONRequired: No
- Scheme
-
The naming scheme of the identifiers minted under the provider.
-
SPIFFE– Renders the identifier in the form defined by SPIFFE (Secure Production Identity Framework For Everyone), an open standard for workload identity, rooted at the provider'sWorkloadIdentityDomain. -
NONE– Renders the path alone, with neither thespiffe://prefix nor the domain.
Type: String
Valid Values:
NONE | SPIFFERequired: Yes
-
- Tags.member.N
-
A list of tags that you want to attach to the new provider. Each tag consists of a key name and an associated value. Both members of a tag are required. Tag keys are case sensitive, and two tag keys that differ only in case are rejected with
InvalidInputException. For more information about tagging, see Tagging IAM resources in the IAM User Guide.NoteIf any one of the tags is invalid or if you exceed the allowed maximum number of tags, then the entire request fails and the resource is not created.
Type: Array of Tag objects
Array Members: Maximum number of 50 items.
Required: No
- WorkloadIdentityDomain
-
The domain that roots the identifiers minted under the provider. Use lowercase characters only.
This parameter is required when
SchemeisSPIFFE, because the domain is the naming root rendered into every identifier. Do not include it whenSchemeisNONE.Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?){0,31}$Required: No
Response Elements
The following elements are returned by the service.
- Arn
-
The Amazon Resource Name (ARN) specifying the provider, for example
arn:aws:iam::111122223333:workload-identity-provider/PaymentsProd. 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.
- CreateDate
-
The date and time, in ISO 8601 date-time format, when the provider was created.
Type: Timestamp
- Description
-
The description of the provider. Present only when the provider carries one.
Type: String
Length Constraints: Maximum length of 255.
Pattern:
^[\u0009\u000A\u000D\u0020-\u007E\u00A1-\u00FF]*$ - OutboundSigners
-
The provider's outbound signing material. On a create this carries the JWT signers only, one for each supported signing algorithm, plus the publishing endpoints. The
X509list is empty, because you attach a certificate authority after the provider exists. Present only when the provider holds signing material.Type: WorkloadIdentityOutboundSigners object
- ProviderId
-
The unique identifier of the provider, which does not change for the life of the provider. IAM prefixes it with
AWPAfor an account-scoped provider andAWPOfor an organization-scoped provider.Type: String
Length Constraints: Minimum length of 16. Maximum length of 128.
Pattern:
[\w]+ - ProviderName
-
The friendly name of the provider, as supplied on the request.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 128.
Pattern:
^[A-Za-z0-9_.-]+$ - ResourceScope
-
The resolved scope of the provider, so
ACCOUNTis reported when the request omitted it.Type: String
Valid Values:
ACCOUNT | ORGANIZATION - Scheme
-
The naming scheme of the provider.
SPIFFEroots every identifier at the provider's domain, andNONErenders the path alone.Type: String
Valid Values:
NONE | SPIFFE - Tags.member.N
-
The tags attached to the provider. Present only when the provider carries tags. 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.
- WorkloadIdentityDomain
-
The domain that roots the identifiers minted under the provider. Present only when a domain is claimed.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?){0,31}$
Errors
For information about the errors that are common to all actions, see Common Error Types.
- ConcurrentModification
-
The request was rejected because multiple requests to change this object were submitted simultaneously. Wait a few minutes and submit your request again.
HTTP Status Code: 409
- EntityAlreadyExists
-
The request was rejected because it attempted to create a resource that already exists.
HTTP Status Code: 409
- InvalidInput
-
The request was rejected because an invalid or out-of-range value was supplied for an input parameter.
HTTP Status Code: 400
- LimitExceeded
-
The request was rejected because it attempted to create resources beyond the current AWS account limits. The error message describes the limit exceeded.
HTTP Status Code: 409
- ServiceFailure
-
The request processing has failed because of an unknown error, exception or failure.
HTTP Status Code: 500
Examples
Example
This example creates a provider that uses the SPIFFE scheme.
The response includes the two JWT outbound signers that IAM creates with the
provider. X509 is empty until you attach a certificate
authority.
Sample Request
https://iam.amazonaws.com/?Action=CreateWorkloadIdentityProvider
&ProviderName=PaymentsProd
&Scheme=SPIFFE
&WorkloadIdentityDomain=example.org
&ResourceScope=ACCOUNT
&Description=Payments%20fleet%20provider
&Tags.member.1.Key=Team
&Tags.member.1.Value=Payments
&Version=2010-05-08
&AUTHPARAMS
Sample Response
<CreateWorkloadIdentityProviderResponse xmlns="https://iam.amazonaws.com/doc/2010-05-08/">
<CreateWorkloadIdentityProviderResult>
<Arn>arn:aws:iam::111122223333:workload-identity-provider/PaymentsProd</Arn>
<ResourceScope>ACCOUNT</ResourceScope>
<ProviderName>PaymentsProd</ProviderName>
<ProviderId>AWPAI3LGJ4EXAMPLE</ProviderId>
<Description>Payments fleet provider</Description>
<Scheme>SPIFFE</Scheme>
<WorkloadIdentityDomain>example.org</WorkloadIdentityDomain>
<Tags>
<member>
<Key>Team</Key>
<Value>Payments</Value>
</member>
</Tags>
<CreateDate>2012-05-08T23:34:01.495Z</CreateDate>
<OutboundSigners>
<X509/>
<Jwt>
<member>
<Configuration>
<KeyAlgorithm>RSA_2048</KeyAlgorithm>
</Configuration>
<SigningAlgorithm>RS256</SigningAlgorithm>
<StartSigningTime>2012-05-08T23:34:01.495Z</StartSigningTime>
</member>
<member>
<Configuration>
<KeyAlgorithm>ECC_NIST_P384</KeyAlgorithm>
</Configuration>
<SigningAlgorithm>ES384</SigningAlgorithm>
<StartSigningTime>2012-05-08T23:34:01.495Z</StartSigningTime>
</member>
</Jwt>
<OidcIssuerUri>https://ai3lgj4example.workloads.tokens.sts.global.api.aws</OidcIssuerUri>
<BundleEndpointUrl>https://ai3lgj4example.workloads.tokens.sts.global.api.aws/bundle</BundleEndpointUrl>
</OutboundSigners>
</CreateWorkloadIdentityProviderResult>
<ResponseMetadata>
<RequestId>4a93ceee-9966-11e1-b624-b1aEXAMPLE7c</RequestId>
</ResponseMetadata>
</CreateWorkloadIdentityProviderResponse>
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: