- 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.
GetConnectionsCommand
Retrieves a list of connection definitions from the Data Catalog.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { GlueClient, GetConnectionsCommand } from "@aws-sdk/client-glue"; // ES Modules import
// const { GlueClient, GetConnectionsCommand } = require("@aws-sdk/client-glue"); // CommonJS import
const client = new GlueClient(config);
const input = { // GetConnectionsRequest
CatalogId: "STRING_VALUE",
Filter: { // GetConnectionsFilter
MatchCriteria: [ // MatchCriteria
"STRING_VALUE",
],
ConnectionType: "JDBC" || "SFTP" || "MONGODB" || "KAFKA" || "NETWORK" || "MARKETPLACE" || "CUSTOM" || "SALESFORCE" || "VIEW_VALIDATION_REDSHIFT" || "VIEW_VALIDATION_ATHENA" || "GOOGLEADS" || "GOOGLESHEETS" || "GOOGLEANALYTICS4" || "SERVICENOW" || "MARKETO" || "SAPODATA" || "ZENDESK" || "JIRACLOUD" || "NETSUITEERP" || "HUBSPOT" || "FACEBOOKADS" || "INSTAGRAMADS" || "ZOHOCRM" || "SALESFORCEPARDOT" || "SALESFORCEMARKETINGCLOUD" || "SLACK" || "STRIPE" || "INTERCOM" || "SNAPCHATADS",
ConnectionSchemaVersion: Number("int"),
},
HidePassword: true || false,
NextToken: "STRING_VALUE",
MaxResults: Number("int"),
};
const command = new GetConnectionsCommand(input);
const response = await client.send(command);
// { // GetConnectionsResponse
// ConnectionList: [ // ConnectionList
// { // Connection
// Name: "STRING_VALUE",
// Description: "STRING_VALUE",
// ConnectionType: "JDBC" || "SFTP" || "MONGODB" || "KAFKA" || "NETWORK" || "MARKETPLACE" || "CUSTOM" || "SALESFORCE" || "VIEW_VALIDATION_REDSHIFT" || "VIEW_VALIDATION_ATHENA" || "GOOGLEADS" || "GOOGLESHEETS" || "GOOGLEANALYTICS4" || "SERVICENOW" || "MARKETO" || "SAPODATA" || "ZENDESK" || "JIRACLOUD" || "NETSUITEERP" || "HUBSPOT" || "FACEBOOKADS" || "INSTAGRAMADS" || "ZOHOCRM" || "SALESFORCEPARDOT" || "SALESFORCEMARKETINGCLOUD" || "SLACK" || "STRIPE" || "INTERCOM" || "SNAPCHATADS",
// 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",
// SecurityGroupIdList: [ // SecurityGroupIdList
// "STRING_VALUE",
// ],
// AvailabilityZone: "STRING_VALUE",
// },
// CreationTime: new Date("TIMESTAMP"),
// LastUpdatedTime: new Date("TIMESTAMP"),
// LastUpdatedBy: "STRING_VALUE",
// Status: "READY" || "IN_PROGRESS" || "FAILED",
// StatusReason: "STRING_VALUE",
// LastConnectionValidationTime: new Date("TIMESTAMP"),
// AuthenticationConfiguration: { // AuthenticationConfiguration
// AuthenticationType: "BASIC" || "OAUTH2" || "CUSTOM" || "IAM",
// 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",
// },
// },
// },
// ConnectionSchemaVersion: Number("int"),
// CompatibleComputeEnvironments: [ // ComputeEnvironmentList
// "SPARK" || "ATHENA" || "PYTHON",
// ],
// },
// ],
// NextToken: "STRING_VALUE",
// };
GetConnectionsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
CatalogId | string | undefined | The ID of the Data Catalog in which the connections reside. If none is provided, the Amazon Web Services account ID is used by default. |
Filter | GetConnectionsFilter | undefined | A filter that controls which connections are returned. |
HidePassword | boolean | undefined | Allows you to retrieve the connection metadata without returning the password. For instance, the Glue console uses this flag to retrieve the connection, and does not display the password. Set this parameter when the caller might not have permission to use the KMS key to decrypt the password, but it does have permission to access the rest of the connection properties. |
MaxResults | number | undefined | The maximum number of connections to return in one response. |
NextToken | string | undefined | A continuation token, if this is a continuation call. |
GetConnectionsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
ConnectionList | Connection[] | undefined | A list of requested connection definitions. |
NextToken | string | undefined | A continuation token, if the list of connections returned does not include the last of the filtered connections. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
EntityNotFoundException | client | A specified entity does not exist |
GlueEncryptionException | client | An encryption operation failed. |
InvalidInputException | client | The input provided was not valid. |
OperationTimeoutException | client | The operation timed out. |
GlueServiceException | Base exception class for all service exceptions from Glue service. |