

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 SecretReference

A reference to a credential held in a Secrets Manager secret that you own and manage. Use this instead of supplying the credential directly, so the value stays in your own secret.

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

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

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

```json
{
  "[JsonKey](#cfn-credentialbroker-credentialprovider-secretreference-jsonkey)" : {{String}},
  "[SecretId](#cfn-credentialbroker-credentialprovider-secretreference-secretid)" : {{String}}
}
```

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

```yaml
  [JsonKey](#cfn-credentialbroker-credentialprovider-secretreference-jsonkey): {{String}}
  [SecretId](#cfn-credentialbroker-credentialprovider-secretreference-secretid): {{String}}
```

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

`JsonKey`  <a name="cfn-credentialbroker-credentialprovider-secretreference-jsonkey"></a>
Key to read from the secret's JSON payload. The secret value must be a JSON object, and this key must be present in it; the value stored under the key is used as the credential.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SecretId`  <a name="cfn-credentialbroker-credentialprovider-secretreference-secretid"></a>
Name or Amazon Resource Name of a secret in Amazon Secrets Manager that you own. The secret must be in the same Region as the resource that references it, and its resource policy must allow this service to read it.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)