

# Scram Secrets


Represents a secret stored in the Amazon Secrets Manager that can be used to authenticate with a cluster using your sign-in credentials.

## URI


`/v1/clusters/clusterArn/scram-secrets`

## HTTP methods


### GET


**Operation ID:** `ListScramSecrets`

Returns a list of SCRAM secrets associated with the cluster. SCRAM secrets are stored in the Amazon Secrets Manager service, and are used to authenticate clients using sign-in credentials.


**Path parameters**  

| Name | Type | Required | Description | 
| --- |--- |--- |--- |
| clusterArn | String | True | The Amazon Resource Name (ARN) that uniquely identifies the cluster. | 


**Query parameters**  

| Name | Type | Required | Description | 
| --- |--- |--- |--- |
| nextToken | String | False | The paginated results marker. When the result of the operation is truncated, the call returns `NextToken` in the response. To get the next batch, provide this token in your next request. | 
| maxResults | String | False | The maximum number of results to return in the response (default maximum 100 results per API call). If there are more results, the response includes a `NextToken` parameter. | 


**Responses**  

| Status code | Response model | Description | 
| --- |--- |--- |
| 200 |  ListScramSecretsResponse | Successful response. | 
| 400 | Error | The request isn't valid because the input is incorrect. Correct your input and then submit it again. | 
| 401 | Error | The request is not authorized. The provided credentials couldn't be validated. | 
| 403 | Error | Access forbidden. Check your credentials and then retry your request. | 
| 404 | Error | The resource could not be found due to incorrect input. Correct the input, then retry the request. | 
| 429 | Error | 429 response | 
| 500 | Error | There was an unexpected internal server error. Retrying your request might resolve the issue. | 
| 503 | Error | 503 response | 

### POST


**Operation ID:** `BatchAssociateScramSecret`

Associates a list of SCRAM secrets with a cluster. SCRAM secrets are stored in the Amazon Secrets Manager service, and are used to authenticate clients using sign-in credentials. You can associate up to 10 secrets with a cluster at a time.


**Path parameters**  

| Name | Type | Required | Description | 
| --- |--- |--- |--- |
| clusterArn | String | True | The Amazon Resource Name (ARN) that uniquely identifies the cluster. | 


**Responses**  

| Status code | Response model | Description | 
| --- |--- |--- |
| 200 |  BatchAssociateScramSecretResponse | Successful response. | 
| 400 | Error | The request isn't valid because the input is incorrect. Correct your input and then submit it again. | 
| 401 | Error | The request is not authorized. The provided credentials couldn't be validated. | 
| 403 | Error | Access forbidden. Check your credentials and then retry your request. | 
| 404 | Error | The resource could not be found due to incorrect input. Correct the input, then retry the request. | 
| 429 | Error | 429 response | 
| 500 | Error | There was an unexpected internal server error. Retrying your request might resolve the issue. | 
| 503 | Error | 503 response | 

### OPTIONS


Enable CORS by returning the correct headers. 


**Path parameters**  

| Name | Type | Required | Description | 
| --- |--- |--- |--- |
| clusterArn | String | True | The Amazon Resource Name (ARN) that uniquely identifies the cluster. | 


**Responses**  

| Status code | Response model | Description | 
| --- |--- |--- |
| 200 | None | Default response for CORS method | 

### PATCH


**Operation ID:** `BatchDisassociateScramSecret`

Disassociates a list of SCRAM secrets from a cluster. SCRAM secrets are stored in the Amazon Secrets Manager service, and are used to authenticate clients using sign-in credentials. You can disassociate up to 10 secrets from a cluster at a time.


**Path parameters**  

| Name | Type | Required | Description | 
| --- |--- |--- |--- |
| clusterArn | String | True | The Amazon Resource Name (ARN) that uniquely identifies the cluster. | 


**Responses**  

| Status code | Response model | Description | 
| --- |--- |--- |
| 200 |  BatchDisassociateScramSecretResponse | 200 response | 
| 400 | Error | The request isn't valid because the input is incorrect. Correct your input and then submit it again. | 
| 401 | Error | The request is not authorized. The provided credentials couldn't be validated. | 
| 403 | Error | Access forbidden. Check your credentials and then retry your request. | 
| 404 | Error | The resource could not be found due to incorrect input. Correct the input, then retry the request. | 
| 429 | Error | 429 response | 
| 500 | Error | There was an unexpected internal server error. Retrying your request might resolve the issue. | 
| 503 | Error | 503 response | 

## Schemas


### Request bodies


#### POST schema
POST

```
{
  "secretArnList": [
    "string"
  ]
}
```

#### PATCH schema
PATCH

```
{
  "secretArnList": [
    "string"
  ]
}
```

### Response bodies


#### ListScramSecretsResponse schema
ListScramSecretsResponse

```
{
  "secretArnList": [
    "string"
  ],
  "nextToken": "string"
}
```

#### BatchAssociateScramSecretResponse schema
BatchAssociateScramSecretResponse

```
{
  "clusterArn": "string",
  "unprocessedScramSecrets": [
    {
      "secretArn": "string",
      "errorMessage": "string",
      "errorCode": "string"
    }
  ]
}
```

#### BatchDisassociateScramSecretResponse schema
BatchDisassociateScramSecretResponse

```
{
  "clusterArn": "string",
  "unprocessedScramSecrets": [
    {
      "secretArn": "string",
      "errorMessage": "string",
      "errorCode": "string"
    }
  ]
}
```

#### Error schema
Error

```
{
  "message": "string",
  "invalidParameter": "string"
}
```

## Properties


### BatchAssociateScramSecretRequest


Request body for BatchAssociateScramSecret.


| Property | Type | Required | Description | 
| --- |--- |--- |--- |
| secretArnList | Array of type string | True | List of Amazon Secrets Manager secret Amazon Resource Name (ARN)s. | 

### BatchAssociateScramSecretResponse


Response body for BatchAssociateScramSecret.


| Property | Type | Required | Description | 
| --- |--- |--- |--- |
| clusterArn | string | False | The Amazon Resource Name (ARN) of the cluster. | 
| unprocessedScramSecrets | Array of type [UnprocessedScramSecret](#clusters-clusterarn-scram-secrets-model-unprocessedscramsecret) | False | List of errors when associating secrets to cluster. | 

### BatchDisassociateScramSecretRequest


Request body for BatchDisassociateScramSecret.


| Property | Type | Required | Description | 
| --- |--- |--- |--- |
| secretArnList | Array of type string | True | List of Amazon Secrets Manager secret Amazon Resource Name (ARN)s. | 

### BatchDisassociateScramSecretResponse


Response body for BatchDisassociateScramSecret.


| Property | Type | Required | Description | 
| --- |--- |--- |--- |
| clusterArn | string | False | The Amazon Resource Name (ARN) of the cluster. | 
| unprocessedScramSecrets | Array of type [UnprocessedScramSecret](#clusters-clusterarn-scram-secrets-model-unprocessedscramsecret) | False | List of errors when disassociating secrets to cluster. | 

### Error


Returns information about an error.


| Property | Type | Required | Description | 
| --- |--- |--- |--- |
| invalidParameter | string | False | The parameter that caused the error. | 
| message | string | False | The description of the error. | 

### ListScramSecretsResponse


Information about scram secrets associated to the cluster.


| Property | Type | Required | Description | 
| --- |--- |--- |--- |
| nextToken | string | False | Paginated results marker. | 
| secretArnList | Array of type string | False | The list of scram secrets associated with the cluster. | 

### UnprocessedScramSecret


Error info for scram secret associate/disassociate failure.


| Property | Type | Required | Description | 
| --- |--- |--- |--- |
| errorCode | string | False | Error code for associate/disassociate failure. | 
| errorMessage | string | False | Error message for associate/disassociate failure. | 
| secretArn | string | False | Amazon Secrets Manager secret Amazon Resource Name (ARN). | 

## See also


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

### ListScramSecrets

+ [AWS Command Line Interface V2](/goto/cli2/kafka-2018-11-14/ListScramSecrets)
+ [AWS SDK for .NET V4](/goto/DotNetSDKV4/kafka-2018-11-14/ListScramSecrets)
+ [AWS SDK for C\$1\$1](/goto/SdkForCpp/kafka-2018-11-14/ListScramSecrets)
+ [AWS SDK for Go v2](/goto/SdkForGoV2/kafka-2018-11-14/ListScramSecrets)
+ [AWS SDK for Java V2](/goto/SdkForJavaV2/kafka-2018-11-14/ListScramSecrets)
+ [AWS SDK for JavaScript V3](/goto/SdkForJavaScriptV3/kafka-2018-11-14/ListScramSecrets)
+ [AWS SDK for Kotlin](/goto/SdkForKotlin/kafka-2018-11-14/ListScramSecrets)
+ [AWS SDK for PHP V3](/goto/SdkForPHPV3/kafka-2018-11-14/ListScramSecrets)
+ [AWS SDK for Python](/goto/boto3/kafka-2018-11-14/ListScramSecrets)
+ [AWS SDK for Ruby V3](/goto/SdkForRubyV3/kafka-2018-11-14/ListScramSecrets)

### BatchAssociateScramSecret

+ [AWS Command Line Interface V2](/goto/cli2/kafka-2018-11-14/BatchAssociateScramSecret)
+ [AWS SDK for .NET V4](/goto/DotNetSDKV4/kafka-2018-11-14/BatchAssociateScramSecret)
+ [AWS SDK for C\$1\$1](/goto/SdkForCpp/kafka-2018-11-14/BatchAssociateScramSecret)
+ [AWS SDK for Go v2](/goto/SdkForGoV2/kafka-2018-11-14/BatchAssociateScramSecret)
+ [AWS SDK for Java V2](/goto/SdkForJavaV2/kafka-2018-11-14/BatchAssociateScramSecret)
+ [AWS SDK for JavaScript V3](/goto/SdkForJavaScriptV3/kafka-2018-11-14/BatchAssociateScramSecret)
+ [AWS SDK for Kotlin](/goto/SdkForKotlin/kafka-2018-11-14/BatchAssociateScramSecret)
+ [AWS SDK for PHP V3](/goto/SdkForPHPV3/kafka-2018-11-14/BatchAssociateScramSecret)
+ [AWS SDK for Python](/goto/boto3/kafka-2018-11-14/BatchAssociateScramSecret)
+ [AWS SDK for Ruby V3](/goto/SdkForRubyV3/kafka-2018-11-14/BatchAssociateScramSecret)

### BatchDisassociateScramSecret

+ [AWS Command Line Interface V2](/goto/cli2/kafka-2018-11-14/BatchDisassociateScramSecret)
+ [AWS SDK for .NET V4](/goto/DotNetSDKV4/kafka-2018-11-14/BatchDisassociateScramSecret)
+ [AWS SDK for C\$1\$1](/goto/SdkForCpp/kafka-2018-11-14/BatchDisassociateScramSecret)
+ [AWS SDK for Go v2](/goto/SdkForGoV2/kafka-2018-11-14/BatchDisassociateScramSecret)
+ [AWS SDK for Java V2](/goto/SdkForJavaV2/kafka-2018-11-14/BatchDisassociateScramSecret)
+ [AWS SDK for JavaScript V3](/goto/SdkForJavaScriptV3/kafka-2018-11-14/BatchDisassociateScramSecret)
+ [AWS SDK for Kotlin](/goto/SdkForKotlin/kafka-2018-11-14/BatchDisassociateScramSecret)
+ [AWS SDK for PHP V3](/goto/SdkForPHPV3/kafka-2018-11-14/BatchDisassociateScramSecret)
+ [AWS SDK for Python](/goto/boto3/kafka-2018-11-14/BatchDisassociateScramSecret)
+ [AWS SDK for Ruby V3](/goto/SdkForRubyV3/kafka-2018-11-14/BatchDisassociateScramSecret)