

# CreateCredentialProvider

Creates a CredentialProvider under a parent CredentialProviderPool. The provider type is determined by which member of `providerConfigurationInput` you set: `oauthConfiguration` creates an `OAUTH` provider, `apiKeyConfiguration` an `API_KEY` provider. Set exactly one. The operation always returns 202 Accepted.

Creation is asynchronous. The provider is returned with a transitional `status` and reaches `READY` or `FAILED` on its own; poll `GetCredentialProvider` to observe the transition.

Credentials this provider caches are encrypted under the parent pool's encryption configuration unless the provider overrides it. Within `oauthConfiguration`, set `providerEncryptionConfiguration` to a customer managed key to use that key in place of the pool's, or to `inheritFromPool` to follow the pool. A provider cannot select service-managed encryption on its own, the only way to use the service-owned key is to inherit it from a pool configured that way. An OAuth provider's response reports which applies in `encryptionSource`, as `INHERITED` or `PROVIDER_OVERRIDE`, alongside the resolved `encryptionConfiguration`.

 **Required permissions:** in addition to permission for this operation, the service performs these actions on your behalf, each only when the request calls for it: `secretsmanager:GetSecretValue` and `secretsmanager:DescribeSecret` when the provider references a secret you own; `secretsmanager:CreateSecret` when you supply the credential value instead, so that the service stores it in a secret it creates; and `kms:CreateGrant`, `kms:DescribeKey`, `kms:GenerateDataKeyWithoutPlaintext`, `kms:ReEncryptFrom`, `kms:ReEncryptTo`, `kms:Encrypt`, and `kms:Decrypt` when a customer managed KMS key is in use.

## Request Syntax
<a name="API_CreateCredentialProvider_RequestSyntax"></a>

```
POST /CreateCredentialProvider HTTP/1.1
Content-type: application/json

{
   "clientToken": "{{string}}",
   "credentialProviderPoolIdentifier": "{{string}}",
   "name": "{{string}}",
   "providerConfigurationInput": { ... },
   "tags": { 
      "{{string}}" : "{{string}}" 
   }
}
```

## URI Request Parameters
<a name="API_CreateCredentialProvider_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_CreateCredentialProvider_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [clientToken](#API_CreateCredentialProvider_RequestSyntax) **   <a name="credentialbrokercontrol-CreateCredentialProvider-request-clientToken"></a>
SDK-populated idempotency token for safe retries.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `[\x21-\x7E]+`   
Required: No

 ** [credentialProviderPoolIdentifier](#API_CreateCredentialProvider_RequestSyntax) **   <a name="credentialbrokercontrol-CreateCredentialProvider-request-credentialProviderPoolIdentifier"></a>
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

 ** [name](#API_CreateCredentialProvider_RequestSyntax) **   <a name="credentialbrokercontrol-CreateCredentialProvider-request-name"></a>
The name for the credential provider. Must be unique among the providers that currently exist in the same pool. You can change it later with UpdateCredentialProvider.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `[a-zA-Z0-9_.-]{1,128}`   
Required: Yes

 ** [providerConfigurationInput](#API_CreateCredentialProvider_RequestSyntax) **   <a name="credentialbrokercontrol-CreateCredentialProvider-request-providerConfigurationInput"></a>
Type-specific input configuration. Exactly one member must be set.  
Type: [CredentialProviderConfigurationInput](API_CredentialProviderConfigurationInput.md) object  
 **Note: **This object is a Union. Only one member of this object can be specified or returned.  
Required: Yes

 ** [tags](#API_CreateCredentialProvider_RequestSyntax) **   <a name="credentialbrokercontrol-CreateCredentialProvider-request-tags"></a>
Tags attached to a resource, as key-value pairs. Keys are unique within a resource and are case-sensitive. Use tags to categorize resources and to control access with tag-based IAM policies.  
Type: String to string map  
Map Entries: Minimum number of 0 items. Maximum number of 50 items.  
Key Length Constraints: Minimum length of 1. Maximum length of 128.  
Value Length Constraints: Minimum length of 0. Maximum length of 256.  
Required: No

## Response Syntax
<a name="API_CreateCredentialProvider_ResponseSyntax"></a>

```
HTTP/1.1 202
Content-type: application/json

{
   "createdAt": number,
   "credentialProviderArn": "string",
   "credentialProviderId": "string",
   "credentialProviderPoolId": "string",
   "name": "string",
   "providerConfiguration": { ... },
   "providerType": "string",
   "status": "string",
   "statusReason": "string",
   "tags": { 
      "string" : "string" 
   },
   "updatedAt": number
}
```

## Response Elements
<a name="API_CreateCredentialProvider_ResponseElements"></a>

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

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

 ** [createdAt](#API_CreateCredentialProvider_ResponseSyntax) **   <a name="credentialbrokercontrol-CreateCredentialProvider-response-createdAt"></a>
When the credential provider was created.  
Type: Timestamp

 ** [credentialProviderArn](#API_CreateCredentialProvider_ResponseSyntax) **   <a name="credentialbrokercontrol-CreateCredentialProvider-response-credentialProviderArn"></a>
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](#API_CreateCredentialProvider_ResponseSyntax) **   <a name="credentialbrokercontrol-CreateCredentialProvider-response-credentialProviderId"></a>
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](#API_CreateCredentialProvider_ResponseSyntax) **   <a name="credentialbrokercontrol-CreateCredentialProvider-response-credentialProviderPoolId"></a>
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](#API_CreateCredentialProvider_ResponseSyntax) **   <a name="credentialbrokercontrol-CreateCredentialProvider-response-name"></a>
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](#API_CreateCredentialProvider_ResponseSyntax) **   <a name="credentialbrokercontrol-CreateCredentialProvider-response-providerConfiguration"></a>
Type-specific resolved configuration with redacted secrets.  
Type: [CredentialProviderConfigurationOutput](API_CredentialProviderConfigurationOutput.md) object  
 **Note: **This object is a Union. Only one member of this object can be specified or returned.

 ** [providerType](#API_CreateCredentialProvider_ResponseSyntax) **   <a name="credentialbrokercontrol-CreateCredentialProvider-response-providerType"></a>
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](#API_CreateCredentialProvider_ResponseSyntax) **   <a name="credentialbrokercontrol-CreateCredentialProvider-response-status"></a>
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](#API_CreateCredentialProvider_ResponseSyntax) **   <a name="credentialbrokercontrol-CreateCredentialProvider-response-statusReason"></a>
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.

 ** [tags](#API_CreateCredentialProvider_ResponseSyntax) **   <a name="credentialbrokercontrol-CreateCredentialProvider-response-tags"></a>
Tags attached to a resource, as key-value pairs. Keys are unique within a resource and are case-sensitive. Use tags to categorize resources and to control access with tag-based IAM policies.  
Type: String to string map  
Map Entries: Minimum number of 0 items. Maximum number of 50 items.  
Key Length Constraints: Minimum length of 1. Maximum length of 128.  
Value Length Constraints: Minimum length of 0. Maximum length of 256.

 ** [updatedAt](#API_CreateCredentialProvider_ResponseSyntax) **   <a name="credentialbrokercontrol-CreateCredentialProvider-response-updatedAt"></a>
When the credential provider was last modified. Equal to `createdAt` until the first successful update.  
Type: Timestamp

## Errors
<a name="API_CreateCredentialProvider_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** 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

 ** ConflictException **   
The request conflicts with the current state of the resource. Nothing was changed. Depending on `reason`, the request may succeed if retried once the resource reaches a settled state, or it may require different input (for example a name that is not already taken).    
 ** resourceId **   
The identifier of the resource the request conflicted with, when the service attributes the conflict to a single resource.  
 ** resourceType **   
The type of the resource named by `resourceId`, when present.
HTTP Status Code: 409

 ** 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

 ** ServiceQuotaExceededException **   
The request would exceed a service quota, so it was rejected and nothing was created or changed. Delete resources that are no longer needed, or request a quota increase in Service Quotas using `serviceCode` and `quotaCode`, then retry.    
 ** quotaCode **   
The Service Quotas requirement that identifies the originating quota.  
 ** resourceId **   
The identifier of the resource whose quota was exceeded, when the quota applies to a specific resource rather than the account.  
 ** resourceType **   
The type of the resource named by `resourceId`, when present.  
 ** serviceCode **   
The Service Quotas requirement that identifies the originating service.
HTTP Status Code: 402

 ** 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
<a name="API_CreateCredentialProvider_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/credentialbroker-control-2026-09-30/CreateCredentialProvider) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/credentialbroker-control-2026-09-30/CreateCredentialProvider) 
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/credentialbroker-control-2026-09-30/CreateCredentialProvider) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/credentialbroker-control-2026-09-30/CreateCredentialProvider) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/credentialbroker-control-2026-09-30/CreateCredentialProvider) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/credentialbroker-control-2026-09-30/CreateCredentialProvider) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/credentialbroker-control-2026-09-30/CreateCredentialProvider) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/credentialbroker-control-2026-09-30/CreateCredentialProvider) 
+  [AWS SDK for Python (Boto3)](https://docs.aws.amazon.com/goto/boto3/credentialbroker-control-2026-09-30/CreateCredentialProvider) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/credentialbroker-control-2026-09-30/CreateCredentialProvider) 