# DataSourceCredentialsProperty

Data source credentials.

This is a variant type structure. For this structure to be valid, only one of the attributes can be non-null.

- Source: Generated code
- Type last changed: v2.274.0 · 20 Oct 2026

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_quicksight as quicksight } from 'aws-cdk-lib';
const dataSourceCredentialsProperty: quicksight.CfnDataSource.DataSourceCredentialsProperty = {
  copySourceArn: 'copySourceArn',
  credentialPair: {
    password: 'password',
    username: 'username',

    // the properties below are optional
    alternateDataSourceParameters: [{
      amazonElasticsearchParameters: {
        domain: 'domain',
      },
      amazonOpenSearchParameters: {
        domain: 'domain',
      },
      athenaParameters: {
        consumerAccountRoleArn: 'consumerAccountRoleArn',
        identityCenterConfiguration: {
          enableIdentityPropagation: false,
        },
        roleArn: 'roleArn',
        workGroup: 'workGroup',
      },
      auroraParameters: {
        database: 'database',
        host: 'host',
        port: 123,
      },
      auroraPostgreSqlParameters: {
        database: 'database',
        host: 'host',
        port: 123,
      },
      databricksParameters: {
        host: 'host',
        port: 123,
        sqlEndpointPath: 'sqlEndpointPath',

        // the properties below are optional
        authenticationType: 'authenticationType',
        oAuthParameters: {
          tokenProviderUrl: 'tokenProviderUrl',

          // the properties below are optional
          identityProviderResourceUri: 'identityProviderResourceUri',
          identityProviderVpcConnectionProperties: {
            vpcConnectionArn: 'vpcConnectionArn',
          },
          oAuthScope: 'oAuthScope',
        },
      },
      mariaDbParameters: {
        database: 'database',
        host: 'host',
        port: 123,
      },
      mySqlParameters: {
        database: 'database',
        host: 'host',
        port: 123,
      },
      oracleParameters: {
        database: 'database',
        host: 'host',
        port: 123,

        // the properties below are optional
        useServiceName: false,
      },
      postgreSqlParameters: {
        database: 'database',
        host: 'host',
        port: 123,
      },
      prestoParameters: {
        catalog: 'catalog',
        host: 'host',
        port: 123,
      },
      rdsParameters: {
        database: 'database',
        instanceId: 'instanceId',
      },
      redshiftParameters: {
        database: 'database',

        // the properties below are optional
        clusterId: 'clusterId',
        host: 'host',
        iamParameters: {
          roleArn: 'roleArn',

          // the properties below are optional
          autoCreateDatabaseUser: false,
          databaseGroups: ['databaseGroups'],
          databaseUser: 'databaseUser',
        },
        identityCenterConfiguration: {
          enableIdentityPropagation: false,
        },
        port: 123,
      },
      s3Parameters: {
        manifestFileLocation: {
          bucket: 'bucket',
          key: 'key',
        },

        // the properties below are optional
        roleArn: 'roleArn',
      },
      s3TablesParameters: {
        tableBucketArn: 'tableBucketArn',
      },
      snowflakeParameters: {
        database: 'database',
        host: 'host',
        warehouse: 'warehouse',

        // the properties below are optional
        authenticationType: 'authenticationType',
        databaseAccessControlRole: 'databaseAccessControlRole',
        oAuthParameters: {
          tokenProviderUrl: 'tokenProviderUrl',

          // the properties below are optional
          identityProviderResourceUri: 'identityProviderResourceUri',
          identityProviderVpcConnectionProperties: {
            vpcConnectionArn: 'vpcConnectionArn',
          },
          oAuthScope: 'oAuthScope',
        },
      },
      sparkParameters: {
        host: 'host',
        port: 123,
      },
      sqlServerParameters: {
        database: 'database',
        host: 'host',
        port: 123,
      },
      starburstParameters: {
        catalog: 'catalog',
        host: 'host',
        port: 123,

        // the properties below are optional
        authenticationType: 'authenticationType',
        databaseAccessControlRole: 'databaseAccessControlRole',
        oAuthParameters: {
          tokenProviderUrl: 'tokenProviderUrl',

          // the properties below are optional
          identityProviderResourceUri: 'identityProviderResourceUri',
          identityProviderVpcConnectionProperties: {
            vpcConnectionArn: 'vpcConnectionArn',
          },
          oAuthScope: 'oAuthScope',
        },
        productType: 'productType',
      },
      teradataParameters: {
        database: 'database',
        host: 'host',
        port: 123,
      },
      trinoParameters: {
        catalog: 'catalog',
        host: 'host',
        port: 123,
      },
    }],
  },
  keyPairCredentials: {
    keyPairUsername: 'keyPairUsername',
    privateKey: 'privateKey',

    // the properties below are optional
    privateKeyPassphrase: 'privateKeyPassphrase',
  },
  oAuthClientCredentials: {
    clientId: 'clientId',
    clientSecret: 'clientSecret',
    username: 'username',
  },
  secretArn: 'secretArn',
};
```

## Properties

- `copySourceArn`: string — The Amazon Resource Name (ARN) of a data source that has the credential pair that you want to use.

  When `CopySourceArn` is not null, the credential pair from the data source in the ARN is used as the credentials for the `DataSourceCredentials` structure.

- `credentialPair`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDataSource.CredentialPairProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_quicksight.CfnDataSource.CredentialPairProperty.html) — Credential pair.

  For more information, see `[CredentialPair](https://docs.aws.amazon.com/quicksight/latest/APIReference/API_CredentialPair.html)` .

- `keyPairCredentials`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDataSource.KeyPairCredentialsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_quicksight.CfnDataSource.KeyPairCredentialsProperty.html) — The credentials for connecting using key-pair.

- `oAuthClientCredentials`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDataSource.OAuthClientCredentialsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_quicksight.CfnDataSource.OAuthClientCredentialsProperty.html)

- `secretArn`: string — The Amazon Resource Name (ARN) of the secret associated with the data source in AWS Secrets Manager .
