- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
ListConnectionsCommand
Lists connections. In Amazon DataZone, a connection enables you to connect your resources (domains, projects, and environments) to external resources and services.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DataZoneClient, ListConnectionsCommand } from "@aws-sdk/client-datazone"; // ES Modules import
// const { DataZoneClient, ListConnectionsCommand } = require("@aws-sdk/client-datazone"); // CommonJS import
const client = new DataZoneClient(config);
const input = { // ListConnectionsInput
domainIdentifier: "STRING_VALUE", // required
maxResults: Number("int"),
nextToken: "STRING_VALUE",
sortBy: "NAME",
sortOrder: "ASCENDING" || "DESCENDING",
name: "STRING_VALUE",
environmentIdentifier: "STRING_VALUE",
projectIdentifier: "STRING_VALUE", // required
type: "ATHENA" || "BIGQUERY" || "DATABRICKS" || "DOCUMENTDB" || "DYNAMODB" || "HYPERPOD" || "IAM" || "MYSQL" || "OPENSEARCH" || "ORACLE" || "POSTGRESQL" || "REDSHIFT" || "SAPHANA" || "SNOWFLAKE" || "SPARK" || "SQLSERVER" || "TERADATA" || "VERTICA" || "WORKFLOWS_MWAA",
};
const command = new ListConnectionsCommand(input);
const response = await client.send(command);
// { // ListConnectionsOutput
// items: [ // ConnectionSummaries // required
// { // ConnectionSummary
// connectionId: "STRING_VALUE", // required
// domainId: "STRING_VALUE", // required
// domainUnitId: "STRING_VALUE", // required
// environmentId: "STRING_VALUE",
// name: "STRING_VALUE", // required
// physicalEndpoints: [ // PhysicalEndpoints // required
// { // PhysicalEndpoint
// awsLocation: { // AwsLocation
// accessRole: "STRING_VALUE",
// awsAccountId: "STRING_VALUE",
// awsRegion: "STRING_VALUE",
// iamConnectionId: "STRING_VALUE",
// },
// glueConnectionName: "STRING_VALUE",
// glueConnection: { // GlueConnection
// name: "STRING_VALUE",
// description: "STRING_VALUE",
// connectionType: "ATHENA" || "BIGQUERY" || "DATABRICKS" || "DOCUMENTDB" || "DYNAMODB" || "HYPERPOD" || "IAM" || "MYSQL" || "OPENSEARCH" || "ORACLE" || "POSTGRESQL" || "REDSHIFT" || "SAPHANA" || "SNOWFLAKE" || "SPARK" || "SQLSERVER" || "TERADATA" || "VERTICA" || "WORKFLOWS_MWAA",
// matchCriteria: [ // MatchCriteria
// "STRING_VALUE",
// ],
// connectionProperties: { // ConnectionProperties
// "<keys>": "STRING_VALUE",
// },
// sparkProperties: { // PropertyMap
// "<keys>": "STRING_VALUE",
// },
// athenaProperties: {
// "<keys>": "STRING_VALUE",
// },
// pythonProperties: {
// "<keys>": "STRING_VALUE",
// },
// physicalConnectionRequirements: { // PhysicalConnectionRequirements
// subnetId: "STRING_VALUE",
// subnetIdList: [ // SubnetIdList
// "STRING_VALUE",
// ],
// securityGroupIdList: [ // SecurityGroupIdList
// "STRING_VALUE",
// ],
// availabilityZone: "STRING_VALUE",
// },
// creationTime: new Date("TIMESTAMP"),
// lastUpdatedTime: new Date("TIMESTAMP"),
// lastUpdatedBy: "STRING_VALUE",
// status: "CREATING" || "CREATE_FAILED" || "DELETING" || "DELETE_FAILED" || "READY" || "UPDATING" || "UPDATE_FAILED" || "DELETED",
// statusReason: "STRING_VALUE",
// lastConnectionValidationTime: new Date("TIMESTAMP"),
// authenticationConfiguration: { // AuthenticationConfiguration
// authenticationType: "BASIC" || "OAUTH2" || "CUSTOM",
// secretArn: "STRING_VALUE",
// oAuth2Properties: { // OAuth2Properties
// oAuth2GrantType: "AUTHORIZATION_CODE" || "CLIENT_CREDENTIALS" || "JWT_BEARER",
// oAuth2ClientApplication: { // OAuth2ClientApplication
// userManagedClientApplicationClientId: "STRING_VALUE",
// aWSManagedClientApplicationReference: "STRING_VALUE",
// },
// tokenUrl: "STRING_VALUE",
// tokenUrlParametersMap: { // TokenUrlParametersMap
// "<keys>": "STRING_VALUE",
// },
// authorizationCodeProperties: { // AuthorizationCodeProperties
// authorizationCode: "STRING_VALUE",
// redirectUri: "STRING_VALUE",
// },
// oAuth2Credentials: { // GlueOAuth2Credentials
// userManagedClientApplicationClientSecret: "STRING_VALUE",
// accessToken: "STRING_VALUE",
// refreshToken: "STRING_VALUE",
// jwtToken: "STRING_VALUE",
// },
// },
// },
// connectionSchemaVersion: Number("int"),
// compatibleComputeEnvironments: [ // ComputeEnvironmentsList
// "SPARK" || "ATHENA" || "PYTHON",
// ],
// },
// host: "STRING_VALUE",
// port: Number("int"),
// protocol: "ATHENA" || "GLUE_INTERACTIVE_SESSION" || "HTTPS" || "JDBC" || "LIVY" || "ODBC" || "PRISM",
// stage: "STRING_VALUE",
// },
// ],
// projectId: "STRING_VALUE",
// props: { // ConnectionPropertiesOutput Union: only one key present
// athenaProperties: { // AthenaPropertiesOutput
// workgroupName: "STRING_VALUE",
// },
// glueProperties: { // GluePropertiesOutput
// status: "CREATING" || "CREATE_FAILED" || "DELETING" || "DELETE_FAILED" || "READY" || "UPDATING" || "UPDATE_FAILED" || "DELETED",
// errorMessage: "STRING_VALUE",
// },
// hyperPodProperties: { // HyperPodPropertiesOutput
// clusterName: "STRING_VALUE", // required
// clusterArn: "STRING_VALUE",
// orchestrator: "EKS" || "SLURM",
// },
// iamProperties: { // IamPropertiesOutput
// environmentId: "STRING_VALUE",
// glueLineageSyncEnabled: true || false,
// },
// redshiftProperties: { // RedshiftPropertiesOutput
// storage: { // RedshiftStorageProperties Union: only one key present
// clusterName: "STRING_VALUE",
// workgroupName: "STRING_VALUE",
// },
// credentials: { // RedshiftCredentials Union: only one key present
// secretArn: "STRING_VALUE",
// usernamePassword: { // UsernamePassword
// password: "STRING_VALUE", // required
// username: "STRING_VALUE", // required
// },
// },
// isProvisionedSecret: true || false,
// jdbcIamUrl: "STRING_VALUE",
// jdbcUrl: "STRING_VALUE",
// redshiftTempDir: "STRING_VALUE",
// lineageSync: { // RedshiftLineageSyncConfigurationOutput
// lineageJobId: "STRING_VALUE",
// enabled: true || false,
// schedule: { // LineageSyncSchedule
// schedule: "STRING_VALUE",
// },
// },
// status: "CREATING" || "CREATE_FAILED" || "DELETING" || "DELETE_FAILED" || "READY" || "UPDATING" || "UPDATE_FAILED" || "DELETED",
// databaseName: "STRING_VALUE",
// },
// sparkEmrProperties: { // SparkEmrPropertiesOutput
// computeArn: "STRING_VALUE",
// credentials: {
// password: "STRING_VALUE", // required
// username: "STRING_VALUE", // required
// },
// credentialsExpiration: new Date("TIMESTAMP"),
// governanceType: "AWS_MANAGED" || "USER_MANAGED",
// instanceProfileArn: "STRING_VALUE",
// javaVirtualEnv: "STRING_VALUE",
// livyEndpoint: "STRING_VALUE",
// logUri: "STRING_VALUE",
// pythonVirtualEnv: "STRING_VALUE",
// runtimeRole: "STRING_VALUE",
// trustedCertificatesS3Uri: "STRING_VALUE",
// },
// sparkGlueProperties: { // SparkGluePropertiesOutput
// additionalArgs: { // SparkGlueArgs
// connection: "STRING_VALUE",
// },
// glueConnectionName: "STRING_VALUE",
// glueVersion: "STRING_VALUE",
// idleTimeout: Number("int"),
// javaVirtualEnv: "STRING_VALUE",
// numberOfWorkers: Number("int"),
// pythonVirtualEnv: "STRING_VALUE",
// workerType: "STRING_VALUE",
// },
// },
// type: "ATHENA" || "BIGQUERY" || "DATABRICKS" || "DOCUMENTDB" || "DYNAMODB" || "HYPERPOD" || "IAM" || "MYSQL" || "OPENSEARCH" || "ORACLE" || "POSTGRESQL" || "REDSHIFT" || "SAPHANA" || "SNOWFLAKE" || "SPARK" || "SQLSERVER" || "TERADATA" || "VERTICA" || "WORKFLOWS_MWAA", // required
// },
// ],
// nextToken: "STRING_VALUE",
// };
ListConnectionsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
domainIdentifier Required | string | undefined | The ID of the domain where you want to list connections. |
projectIdentifier Required | string | undefined | The ID of the project where you want to list connections. |
environmentIdentifier | string | undefined | The ID of the environment where you want to list connections. |
maxResults | number | undefined | The maximum number of connections to return in a single call to ListConnections. When the number of connections to be listed is greater than the value of MaxResults, the response contains a NextToken value that you can use in a subsequent call to ListConnections to list the next set of connections. |
name | string | undefined | The name of the connection. |
nextToken | string | undefined | When the number of connections is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of connections, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListConnections to list the next set of connections. |
sortBy | SortFieldConnection | undefined | Specifies how you want to sort the listed connections. |
sortOrder | SortOrder | undefined | Specifies the sort order for the listed connections. |
type | ConnectionType | undefined | The type of connection. |
ListConnectionsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
items Required | ConnectionSummary[] | undefined | The results of the ListConnections action. |
nextToken | string | undefined | When the number of connections is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of connections, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListConnections to list the next set of connections. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | You do not have sufficient access to perform this action. |
InternalServerException | server | The request has failed because of an unknown error, exception or failure. |
ThrottlingException | client | The request was denied due to request throttling. |
ValidationException | client | The input fails to satisfy the constraints specified by the Amazon Web Services service. |
UnauthorizedException | client | You do not have permission to perform this action. |
DataZoneServiceException | Base exception class for all service exceptions from DataZone service. |