# Credentials

> Credentials - Creates credentials for an external OAuth provider.

This Markdown file sits beside the HTML page at the same path (with a `.md` suffix). It summarizes the topic and lists links for tools and LLM context.

Companion generated at `2026-07-27T18:44:30.513288+00:00` (UTC).

## Primary page

- [Credentials](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md): Full documentation for this topic (Markdown sidecar).

## Sections on this page

- [Credential](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential): In-page section heading.
- [list()](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential.list): In-page section heading.
- [get()](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential.get): In-page section heading.
- [delete()](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential.delete): In-page section heading.
- [create_basic()](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential.create_basic): In-page section heading.
- [create_oauth()](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential.create_oauth): In-page section heading.
- [create_s3()](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential.create_s3): In-page section heading.
- [create_azure()](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential.create_azure): In-page section heading.
- [create_snowflake_key_pair()](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential.create_snowflake_key_pair): In-page section heading.
- [create_databricks_access_token()](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential.create_databricks_access_token): In-page section heading.
- [create_databricks_service_principal()](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential.create_databricks_service_principal): In-page section heading.
- [create_azure_service_principal()](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential.create_azure_service_principal): In-page section heading.
- [create_adls_oauth()](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential.create_adls_oauth): In-page section heading.
- [create_external_oauth_provider()](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential.create_external_oauth_provider): In-page section heading.
- [create_box_jwt()](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential.create_box_jwt): In-page section heading.
- [create_gcp()](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential.create_gcp): In-page section heading.
- [update()](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential.update): In-page section heading.

## Documentation content

### Credential

#### list()

Returns list of available credentials.

Returns

| Returns | Description |
| --- | --- |
| credentials | contains a list of available credentials. |

Return type: [list](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential.list) of `Credential instances`

> [!NOTE] Examples
> ```
> >>> import datarobot as dr
> >>> data_sources = dr.Credential.list()
> >>> data_sources
> [
>     Credential('5e429d6ecf8a5f36c5693e03', 'my_s3_cred', 's3'),
>     Credential('5e42cc4dcf8a5f3256865840', 'my_jdbc_cred', 'jdbc'),
> ]
> ```

#### get()

Gets the Credential.

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| credential_id | str | the identifier of the credential. |

Returns

| Returns | Description |
| --- | --- |
| credential | the requested credential. |

Return type: [Credential](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential)

> [!NOTE] Examples
> ```
> >>> import datarobot as dr
> >>> cred = dr.Credential.get('5a8ac9ab07a57a0001be501f')
> >>> cred
> Credential('5e429d6ecf8a5f36c5693e03', 'my_s3_cred', 's3'),
> ```

#### delete()

Deletes the Credential the store.

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| credential_id | str | the identifier of the credential. |

Returns

| Returns | Description |
| --- | --- |
| credential | the requested credential. |

Return type: [Credential](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential)

> [!NOTE] Examples
> ```
> >>> import datarobot as dr
> >>> cred = dr.Credential.get('5a8ac9ab07a57a0001be501f')
> >>> cred.delete()
> ```

#### create_basic()

Creates the credentials.

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| name | str | the name to use for this set of credentials. |
| user | str | the username to store for this set of credentials. |
| password | str | the password to store for this set of credentials. |
| description | Optional[str] | the description to use for this set of credentials. |

Returns

| Returns | Description |
| --- | --- |
| credential | the created credential. |

Return type: [Credential](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential)

> [!NOTE] Examples
> ```
> >>> import datarobot as dr
> >>> cred = dr.Credential.create_basic(
> ...     name='my_basic_cred',
> ...     user='username',
> ...     password='password',
> ... )
> >>> cred
> Credential('5e429d6ecf8a5f36c5693e03', 'my_basic_cred', 'basic'),
> ```

#### create_oauth()

Creates the OAUTH credentials.

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| name | str | the name to use for this set of credentials. |
| token | str | the OAUTH token |
| refresh_token | str | The OAUTH token |
| description | Optional[str] | the description to use for this set of credentials. |

Returns

| Returns | Description |
| --- | --- |
| credential | the created credential. |

Return type: [Credential](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential)

> [!NOTE] Examples
> ```
> >>> import datarobot as dr
> >>> cred = dr.Credential.create_oauth(
> ...     name='my_oauth_cred',
> ...     token='XXX',
> ...     refresh_token='YYY',
> ... )
> >>> cred
> Credential('5e429d6ecf8a5f36c5693e03', 'my_oauth_cred', 'oauth'),
> ```

#### create_s3()

Creates the S3 credentials.

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| name | str | the name to use for this set of credentials. |
| aws_access_key_id | Optional[str] | the AWS access key id. |
| aws_secret_access_key | Optional[str] | the AWS secret access key. |
| aws_session_token | Optional[str] | the AWS session token. |
| config_id | Optional[str] | The ID of the saved shared secure configuration. If specified, cannot include awsAccessKeyId, awsSecretAccessKey or awsSessionToken. |
| description | Optional[str] | the description to use for this set of credentials. |

Returns

| Returns | Description |
| --- | --- |
| credential | the created credential. |

Return type: [Credential](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential)

> [!NOTE] Examples
> ```
> >>> import datarobot as dr
> >>> cred = dr.Credential.create_s3(
> ...     name='my_s3_cred',
> ...     aws_access_key_id='XXX',
> ...     aws_secret_access_key='YYY',
> ...     aws_session_token='ZZZ',
> ... )
> >>> cred
> Credential('5e429d6ecf8a5f36c5693e03', 'my_s3_cred', 's3'),
> ```

#### create_azure()

Creates the Azure storage credentials.

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| name | str | the name to use for this set of credentials. |
| azure_connection_string | str | the Azure connection string. |
| description | Optional[str] | the description to use for this set of credentials. |

Returns

| Returns | Description |
| --- | --- |
| credential | the created credential. |

Return type: [Credential](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential)

> [!NOTE] Examples
> ```
> >>> import datarobot as dr
> >>> cred = dr.Credential.create_azure(
> ...     name='my_azure_cred',
> ...     azure_connection_string='XXX',
> ... )
> >>> cred
> Credential('5e429d6ecf8a5f36c5693e03', 'my_azure_cred', 'azure'),
> ```

#### create_snowflake_key_pair()

Creates the Snowflake Key Pair credentials.

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| name | str | the name to use for this set of credentials. |
| user | Optional[str] | the Snowflake login name |
| private_key | Optional[str] | the private key copied exactly from user private key file. Since it contains multiple lines, when assign to a variable, put the key string inside triple-quotes |
| passphrase | Optional[str] | the string used to encrypt the private key |
| config_id | Optional[str] | The ID of the saved shared secure configuration. If specified, cannot include user, privateKeyStr or passphrase. |
| description | Optional[str] | the description to use for this set of credentials. |

Returns

| Returns | Description |
| --- | --- |
| credential | the created credential. |

Return type: [Credential](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential)

> [!NOTE] Examples
> ```
> >>> import datarobot as dr
> >>> cred = dr.Credential.create_snowflake_key_pair(
> ...     name='key_pair_cred',
> ...     user='XXX',
> ...     private_key='YYY',
> ...     passphrase='ZZZ',
> ... )
> >>> cred
> Credential('5e429d6ecf8a5f36c5693e03', 'key_pair_cred', 'snowflake_key_pair_user_account'),
> ```

#### create_databricks_access_token()

Creates the Databricks access token credentials.

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| name | str | the name to use for this set of credentials. |
| databricks_access_token | Optional[str] | the Databricks personal access token |
| description | Optional[str] | the description to use for this set of credentials. |

Returns

| Returns | Description |
| --- | --- |
| credential | the created credential. |

Return type: [Credential](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential)

> [!NOTE] Examples
> ```
> >>> import datarobot as dr
> >>> cred = dr.Credential.create_databricks_access_token(
> ...     name='access_token_cred',
> ...     databricks_access_token='XXX',
> ... )
> >>> cred
> Credential('5e429d6ecf8a5f36c5693e03', 'access_token_cred', 'databricks_access_token_account'),
> ```

#### create_databricks_service_principal()

Creates the Databricks access token credentials.

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| name | str | the name to use for this set of credentials. |
| client_id | Optional[str] | the client ID for Databricks Service Principal |
| client_secret | Optional[str] | the client secret for Databricks Service Principal |
| config_id | Optional[str] | The ID of the saved shared secure configuration. If specified, cannot include clientId and clientSecret. |
| description | Optional[str] | the description to use for this set of credentials. |

Returns

| Returns | Description |
| --- | --- |
| credential | the created credential. |

Return type: [Credential](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential)

> [!NOTE] Examples
> ```
> >>> import datarobot as dr
> >>> cred = dr.Credential.create_databricks_service_principal(
> ...     name='svc_principal_cred',
> ...     client_id='XXX',
> ...     client_secret='XXX',
> ... )
> >>> cred
> Credential('5e429d6ecf8a5f36c5693e03', 'svc_principal_cred', 'databricks_service_principal_account'),
> ```

#### create_azure_service_principal()

Creates the Azure service principal credentials.

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| name | str | The name to use for these credentials. |
| client_id | Optional[str] | The client ID. |
| client_secret | Optional[str] | The client secret. |
| azure_tenant_id | Optional[str] | The Azure tenant ID. |
| config_id | Optional[str] | The ID of the saved secure configuration. If specified, the ID cannot include clientId, clientSecret, or azureTenantId. |
| description | Optional[str] | The description to use for these credentials. |

Returns

| Returns | Description |
| --- | --- |
| credential | the created credential. |

Return type: [Credential](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential)

> [!NOTE] Examples
> ```
> >>> import datarobot as dr
> >>> cred = dr.Credential.create_azure_service_principal(
> ...     name='my_azure_service_principal_cred',
> ...     client_id='XXX',
> ...     client_secret='YYY',
> ...     azure_tenant_id='ZZZ',
> ... )
> >>> cred
> Credential('66c9172d8b7a361cda126f5c', 'my_azure_service_principal_cred', 'azure_service_principal')
> ```

#### create_adls_oauth()

Creates the ADLS OAuth credentials.

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| name | str | The name to use for these credentials. |
| client_id | Optional[str] | The client ID. |
| client_secret | Optional[str] | The client secret. |
| oauth_scopes | List[str], optional | The OAuth scopes. |
| config_id | Optional[str] | The ID of the saved shared secure configuration. If specified, cannot include clientId, clientSecret, or oauthScopes. |
| description | Optional[str] | The description to use for the ADLS OAuth credentials. |

Returns

| Returns | Description |
| --- | --- |
| credential | The created credential. |

Return type: [Credential](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential)

> [!NOTE] Examples
> ```
> >>> import datarobot as dr
> >>> cred = dr.Credential.create_adls_oauth(
> ...     name='my_adls_oauth_cred',
> ...     client_id='XXX',
> ...     client_secret='YYY',
> ...     oauth_scopes=['ZZZ'],
> ... )
> >>> cred
> Credential('66c91e0f03010d4790735220', 'my_adls_oauth_cred', 'adls_gen2_oauth')
> ```

#### create_external_oauth_provider()

Creates credentials for an external OAuth provider.

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| name | str | The display name for these credentials in DataRobot. |
| authentication_id | str | The authorization identifier returned by the external OAuth provider service. |
| description | Optional[str] | The description to use for the credentials. |

Returns

| Returns | Description |
| --- | --- |
| credential | The created credential. |

Return type: [Credential](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential)

#### create_box_jwt()

Creates the Box JWT credentials.

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| name | str | The name to use for this set of credentials. |
| client_id | str | The Box JWT client ID. |
| client_secret | str | The Box JWT client secret. |
| enterprise_id | str | The Box enterprise identifier. |
| public_key_id | str | The Box public key identifier. |
| private_key_str | str | The RSA private key for Box JWT. |
| passphrase | str | The passphrase for the Box JWT private key. |
| description | Optional[str] | The description to use for this set of credentials. |

Returns

| Returns | Description |
| --- | --- |
| credential | The created credential. |

Return type: [Credential](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential)

> [!NOTE] Examples
> ```
> >>> import datarobot as dr
> >>> cred = dr.Credential.create_box_jwt(
> ...     name='my_box_jwt_cred',
> ...     client_id='XXX',
> ...     client_secret='YYY',
> ...     enterprise_id='ZZZ',
> ...     public_key_id='AAA',
> ...     private_key_str='-----...', # PKCS#8 formatted private key string with newlines replaced by
> 
> ...     passphrase='BBB',
> ... )
> >>> cred
> Credential('5e429d6ecf8a5f36c5693e03', 'my_box_jwt_cred', 'box_jwt')
> ```

#### create_gcp()

Creates the GCP credentials.

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| name | str | the name to use for this set of credentials. |
| gcp_key | str \\| dict | the GCP key in json format or parsed as dict. |
| description | Optional[str] | the description to use for this set of credentials. |

Returns

| Returns | Description |
| --- | --- |
| credential | the created credential. |

Return type: [Credential](https://docs.datarobot.com/ja/docs/api/reference/sdk/credentials.html.md#datarobot.models.Credential)

> [!NOTE] Examples
> ```
> >>> import datarobot as dr
> >>> cred = dr.Credential.create_gcp(
> ...     name='my_gcp_cred',
> ...     gcp_key='XXX',
> ... )
> >>> cred
> Credential('5e429d6ecf8a5f36c5693e03', 'my_gcp_cred', 'gcp'),
> ```

#### update()

Update the credential values of an existing credential. Updates this object in place.

Added in version v3.2.

Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| name | str | The name to use for this set of credentials. |
| description | Optional[str] | The description to use for this set of credentials; if omitted, and name is not omitted, then it clears any previous description for that name. |
| kwargs |  | (Keyword arguments specific to the given credential_type that should be updated.) |

Return type: `None`
