View a markdown version of this page

GetCredentialProvider - AWS IAM CredentialBroker Control Plane

GetCredentialProvider

Retrieves a CredentialProvider of any provider type. Credential material is never returned: the response reports the Amazon Resource Name of the secret holding each credential, not its value. Nor does the response include the provider's tags; call ListTagsForResource for those.

This is also the operation to poll while an asynchronous create, update, or delete settles: status reports the transition. Once a delete finishes the provider no longer exists, so this operation returns ResourceNotFoundException rather than a deleted status.

Request Syntax

POST /GetCredentialProvider HTTP/1.1 Content-type: application/json { "credentialProviderIdentifier": "string", "credentialProviderPoolIdentifier": "string" }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

credentialProviderIdentifier

Identifies a credential provider. Accepts either the provider's ARN or its service-generated ID; both refer to the same provider.

Type: String

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

Pattern: (arn:aws(?:-cn|-us-gov)?:credentialbroker:[a-z0-9-]+:[0-9]{12}:credentialproviderpool/[a-z0-9]{1,64}/credentialprovider/[a-z0-9]{1,64}|[a-z0-9]{1,64})

Required: Yes

credentialProviderPoolIdentifier

Identifies a credential provider pool. Accepts either the pool's ARN or its service-generated ID; both refer to the same pool.

Type: String

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

Pattern: (arn:aws(?:-cn|-us-gov)?:credentialbroker:[a-z0-9-]+:[0-9]{12}:credentialproviderpool/[a-z0-9]{1,64}|[a-z0-9]{1,64})

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "createdAt": number, "credentialProviderArn": "string", "credentialProviderId": "string", "credentialProviderPoolId": "string", "name": "string", "providerConfiguration": { ... }, "providerType": "string", "status": "string", "statusReason": "string", "updatedAt": number }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

createdAt

When the credential provider was created.

Type: Timestamp

credentialProviderArn

Amazon Resource Name of a credential provider. Service-generated and stable for the life of the provider. The ARN embeds the parent pool, so it identifies the provider on its own without a separate pool identifier. Use it in IAM policies and anywhere an operation accepts a credential provider identifier.

Type: String

Pattern: arn:(aws|aws-us-gov|aws-cn|aws-iso|aws-iso-b|aws-iso-e|aws-iso-f|aws-eusc):credentialbroker:[a-z0-9-]{1,64}:[0-9]{12}:credentialproviderpool/[a-z0-9]{1,64}/credentialprovider/[a-z0-9]{1,64}

credentialProviderId

Service-generated identifier of a credential provider. Opaque and stable for the life of the provider, and unique within its parent pool. Accepted anywhere an operation takes a provider identifier, in place of the provider's ARN.

Type: String

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

Pattern: [a-z0-9]{1,64}

credentialProviderPoolId

Service-generated identifier of a credential provider pool. Opaque and stable for the life of the pool. Accepted anywhere an operation takes a pool identifier, in place of the pool's ARN.

Type: String

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

Pattern: [a-z0-9]{1,64}

name

The name of a credential provider. Must be unique among the providers that currently exist in the same pool, and can be changed after creation with UpdateCredentialProvider. A deleted provider's name becomes available for reuse.

Type: String

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

Pattern: [a-zA-Z0-9_.-]{1,128}

providerConfiguration

Type-specific configuration. The member that is set matches providerType.

Type: CredentialProviderConfigurationOutput object

Note: This object is a Union. Only one member of this object can be specified or returned.

providerType

The kind of credential a provider obtains and the configuration it requires. Fixed when the provider is created and cannot be changed by a later update. New values may be added over time.

Type: String

Valid Values: OAUTH | API_KEY

status

Lifecycle status of a credential provider. Create, update, and delete are asynchronous: the operation returns immediately with a transitional status, and the provider reaches READY or FAILED on its own. Poll GetCredentialProvider to observe the transition. New values may be added over time, so treat an unrecognized value as "still settling" rather than an error.

Type: String

Valid Values: CREATING | UPDATING | DELETING | READY | FAILED

statusReason

Explains why a resource is in a non-terminal status (e.g., FAILED, DELETING).

Type: String

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

updatedAt

When the credential provider was last modified. Equal to createdAt until the first successful update.

Type: Timestamp

Errors

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

AccessDeniedException

The caller is not authorized to perform the request, or a resource the request depends on refused access. reason distinguishes a denial by this service from a denial reported by a dependency the caller configured, such as a customer-owned secret, KMS key, or external identity provider, which usually points at a permission or configuration fix outside this API.

HTTP Status Code: 403

InternalServerException

The request failed because of an unexpected error in the service. Whether the request took effect is undefined, so for a create or update, read the resource back before retrying. Retryable: the same request may succeed later.

retryAfterSeconds

The number of seconds to wait before retrying. If this field is absent, retry with exponential backoff.

HTTP Status Code: 500

ResourceNotFoundException

The requested resource does not exist, or the caller is not permitted to know that it exists. A resource that was deleted, or that is still being created, can also be reported this way.

resourceId

The identifier of the resource that could not be found, echoed from the request.

resourceType

The type of the resource named by resourceId, when present.

HTTP Status Code: 404

ThrottlingException

The request was denied because the caller exceeded a request rate limit. Nothing was changed. Retry with exponential backoff, honoring retryAfterSeconds when it is present.

retryAfterSeconds

The number of seconds to wait before retrying. If this field is absent, retry with exponential backoff.

HTTP Status Code: 429

ValidationException

The request is not valid. The request was rejected before any change was made, so it is safe to correct the input and retry. Use reason to branch in code and message for the human-readable detail of which field or combination of fields was at fault.

HTTP Status Code: 400

See Also

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