# Create

Launch stage: GA

`POST /api/2.0/accounts/{account_id}/credentials`

Creates a <Databricks> credential configuration that represents cloud cross-account credentials for a specified account. <Databricks> uses this to set up network infrastructure properly to host <Databricks> clusters. For your AWS IAM role, you need to trust the External ID (the Databricks Account API account ID)  in the returned credential object, and configure the required access policy.

 Save the response's `credentials_id` field, which is the ID for your new credential configuration object.

 For information about how to create a new workspace with this API, see [Create a new workspace using the Account API](http://docs.databricks.com/administration-guide/account-api/new-workspace.html)

API scopes: unity-catalog

Clouds: AWS

## Path parameters

- `account_id` (string, optional)

## Request body

- `credentials_name` (string, optional)
  The human-readable name of the credential configuration object.
  Example: `my_credential`
  Constraints: `[ 4 .. 256 ] characters`
- `aws_credentials` (object, required)
  - `sts_role` (object, required)
    - `role_arn` (string, optional)
      The Amazon Resource Name (ARN) of the cross account IAM role.
      Example: `arn:aws:iam::111110000000:role/test_role`

## Returns

- `credentials_id` (string, optional)
  <Databricks> credential configuration ID.
- `account_id` (string, optional)
  The <Databricks> account ID that hosts the credential.
- `aws_credentials` (object, required)
  - `sts_role` (object, required)
    - `role_arn` (string, optional)
      The Amazon Resource Name (ARN) of the cross account IAM role.
      Example: `arn:aws:iam::111110000000:role/test_role`
- `credentials_name` (string, optional)
  The human-readable name of the credential configuration object.
  Example: `credential_1`
  Constraints: `[ 4 .. 256 ] characters`
- `creation_time` (int64, optional)
  Time in epoch milliseconds when the credential was created.

## Response

```json
{
  "credentials_id": "string",
  "account_id": "string",
  "aws_credentials": {
    "sts_role": {}
  },
  "credentials_name": "credential_1",
  "creation_time": 0
}
```

