Context / Client / list_connections

list_connections

Context.Client.list_connections(**kwargs)

Lists the connections in your account, most recently updated first.

See also: AWS API Documentation

Request Syntax

response = client.list_connections(
    maxResults=123,
    nextToken='string'
)
Parameters:
  • maxResults (integer) – Maximum number of results per page (upper bound, not a target). Defaults to 50 when absent. The service might return fewer items.

  • nextToken (string) – Opaque pagination cursor from a prior response. Omit for the first page.

Return type:

dict

Returns:

Response Syntax

{
    'items': [
        {
            'id': 'string',
            'arn': 'string',
            'name': 'string',
            'type': 'GLUE_DATA_CATALOG'|'BEDROCK_KNOWLEDGE_BASE'|'DATABRICKS'|'SNOWFLAKE',
            'status': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'FAILED',
            'createdAt': datetime(2015, 1, 1),
            'updatedAt': datetime(2015, 1, 1),
            'dataSource': {
                'type': 'GLUE_DATA_CATALOG'|'BEDROCK_KNOWLEDGE_BASE'|'DATABRICKS'|'SNOWFLAKE',
                'location': {
                    'arn': 'string'
                }
            },
            'scope': {
                'selectors': [
                    {
                        'path': [
                            {
                                'level': 'string',
                                'id': 'string'
                            },
                        ]
                    },
                ]
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • items (list) –

      The connections in your account, as summaries. Always present, and empty when the account has no connections.

      • (dict) –

        A summary of a connection, as returned by ListConnections. It includes name, so you can find connections by name without calling GetConnection for each one.

        • id (string) –

          The ID of the connection.

        • arn (string) –

          The ARN of the connection.

        • name (string) –

          The name of the connection.

        • type (string) –

          The kind of external data source.

          Valid values:

          • GLUE_DATA_CATALOG - An AWS Glue Data Catalog, or an AWS Glue connection that fronts a federated AWS data source.

          • BEDROCK_KNOWLEDGE_BASE - An Amazon Bedrock knowledge base.

          • DATABRICKS - A Databricks third-party catalog.

          • SNOWFLAKE - A Snowflake third-party catalog.

        • status (string) –

          The status of the connection.

          Valid values:

          • CREATING - Validation or provisioning is in progress.

          • ACTIVE - The data source is reachable and, for a third-party connection, AWS Glue has provisioned catalog synchronization. This does not mean a crawl has started or completed.

          • UPDATING - The connection is being updated.

          • DELETING - The connection is being deleted.

          • FAILED - Validation or provisioning failed terminally.

        • createdAt (datetime) –

          The date and time when the connection was created.

        • updatedAt (datetime) –

          The date and time when the connection was last updated.

        • dataSource (dict) –

          The connection’s data source: its type and location ARN, in the same form as the dataSource that GetConnection returns.

          • type (string) –

            The kind of data source.

            Valid values:

            • GLUE_DATA_CATALOG - An AWS Glue Data Catalog, or an AWS Glue connection that fronts a federated AWS data source.

            • BEDROCK_KNOWLEDGE_BASE - An Amazon Bedrock knowledge base.

            • DATABRICKS - A Databricks third-party catalog.

            • SNOWFLAKE - A Snowflake third-party catalog.

          • location (dict) –

            Where the data source lives. For this scope, an AWS ARN only.

            • arn (string) –

              The ARN of the data source. Its account segment must be your account when you create the connection.

        • scope (dict) –

          The part of the data source that the connection ingests, in the same form as the scope that GetConnection returns. Absent or empty if the connection ingests the whole source.

          • selectors (list) –

            The selectors describing which parts of the data source are in scope.

            • (dict) –

              A single selector: an ordered path of {level, id} segments identifying a node in the data source’s resource hierarchy. On a GLUE_DATA_CATALOG connection the path can also name at most one glueService segment, which selects a service rather than a node (see DataSourceScope).

              • path (list) –

                Ordered hierarchy path from the root to the selected resource. Must be non-empty.

                • (dict) –

                  One segment of a resource hierarchy path: the hierarchy level, such as database or table, and the id of the resource at that level. Both are required.

                  In a GLUE_DATA_CATALOG connection’s scope, the level glueService names a service instead of a resource. Its id is one of the following:

                  • GLUE - AWS Glue databases and tables.

                  • SAGEMAKER_AI - Amazon SageMaker AI resources.

                  • REDSHIFT - Amazon Redshift resources.

                  • RDS - Amazon RDS resources.

                  • MSK - Amazon Managed Streaming for Apache Kafka (Amazon MSK) resources.

                  • KINESIS - Amazon Kinesis Data Streams resources.

                  • FIREHOSE - Amazon Data Firehose resources.

                  • DYNAMODB - Amazon DynamoDB resources.

                  • KEYSPACES - Amazon Keyspaces (for Apache Cassandra) resources.

                  • ELASTICACHE - Amazon ElastiCache resources.

                  • OPENSEARCH - Amazon OpenSearch Service resources.

                  • NEPTUNE - Amazon Neptune resources.

                  • TIMESTREAM - Amazon Timestream resources.

                  • ATHENA - Amazon Athena resources.

                  • GLUE_SCHEMA_REGISTRY - AWS Glue Schema Registry resources.

                  • S3 - Amazon S3 resources.

                  • S3_VECTORS - Amazon S3 Vectors resources.

                  Every later segment of the selector must name a level of that service. Any other value, a second glueService segment, or a glueService segment in any other position returns ValidationException. A resource path never contains glueService.

                  • level (string) –

                    The hierarchy level name for this segment (for example, “database”, “table”). Non-blank, no whitespace.

                  • id (string) –

                    The ID of the resource at this level. Non-blank. Can contain spaces, backticks, and % (it is a resource name), but no control characters. AWS Context matches it exactly.

    • nextToken (string) –

      Pagination cursor for the next page. Absent when no more results exist.

Exceptions