

This is the new *Amazon CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [Amazon CloudFormation User Guide](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::CredentialBroker::CredentialProvider ApiKeySecretInput

How the provider's API key is supplied. Set exactly one member: give the key value and let the service store it in a secret it owns, or point at an Amazon Secrets Manager secret you already own. Either way, reads return only the ARN of the secret, never the key.

## Syntax
<a name="aws-properties-credentialbroker-credentialprovider-apikeysecretinput-syntax"></a>

To declare this entity in your Amazon CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-credentialbroker-credentialprovider-apikeysecretinput-syntax.json"></a>

```json
{
  "[ApiKey](#cfn-credentialbroker-credentialprovider-apikeysecretinput-apikey)" : {{String}},
  "[ApiKeySecretReference](#cfn-credentialbroker-credentialprovider-apikeysecretinput-apikeysecretreference)" : {{SecretReference}}
}
```

### YAML
<a name="aws-properties-credentialbroker-credentialprovider-apikeysecretinput-syntax.yaml"></a>

```yaml
  [ApiKey](#cfn-credentialbroker-credentialprovider-apikeysecretinput-apikey): {{String}}
  [ApiKeySecretReference](#cfn-credentialbroker-credentialprovider-apikeysecretinput-apikeysecretreference): {{
    SecretReference}}
```

## Properties
<a name="aws-properties-credentialbroker-credentialprovider-apikeysecretinput-properties"></a>

`ApiKey`  <a name="cfn-credentialbroker-credentialprovider-apikeysecretinput-apikey"></a>
The API key value. The service stores it in an Amazon Secrets Manager secret that the service owns. Write-only: reads return only the ARN of the secret holding it.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `65536`  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ApiKeySecretReference`  <a name="cfn-credentialbroker-credentialprovider-apikeysecretinput-apikeysecretreference"></a>
An Amazon Secrets Manager secret you own that holds the API key. The service reads the key from your secret rather than storing a copy of its own.  
*Required*: No  
*Type*: [SecretReference](aws-properties-credentialbroker-credentialprovider-secretreference.md)  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)