Context / Client / create_connection
create_connection¶
- Context.Client.create_connection(**kwargs)¶
Creates a connection to a data source, such as an AWS Glue Data Catalog, an Amazon Bedrock knowledge base, or a third-party data catalog through an AWS Glue connection. GetConnection returns the connection’s status.
See also: AWS API Documentation
Request Syntax
response = client.create_connection( clientToken='string', name='string', dataSource={ 'type': 'GLUE_DATA_CATALOG'|'BEDROCK_KNOWLEDGE_BASE'|'DATABRICKS'|'SNOWFLAKE', 'location': { 'arn': 'string' } }, scope={ 'selectors': [ { 'path': [ { 'level': 'string', 'id': 'string' }, ] }, ] }, accessConfig={ 'iamRole': { 'roleArn': 'string' } }, syncSchedule={ 'frequency': 'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY', 'cronExpression': 'string' }, ingestionConfig={ 'roleArn': 'string' }, glueConnectionMappings=[ { 'path': [ { 'level': 'string', 'id': 'string' }, ], 'glueConnectionArn': 'string' }, ], publish=True|False, acknowledgements=[ 'string', ], tags={ 'string': 'string' } )
- Parameters:
clientToken (string) –
A client idempotency token. It is optional, so the AWS SDKs can generate it automatically and reuse it on retries. A retry with an identical request returns the original connection. A different request returns
ValidationException.acknowledgements,tagsand, once the connection isACTIVE,publishare not compared with the original request. A create refused for a missing acknowledgement records no token.This field is autopopulated if not provided.
name (string) –
[REQUIRED]
The name of the connection. Required. You can change it later with UpdateConnection. Starts with a letter and contains 3–63 ASCII letters, digits, and hyphens.
dataSource (dict) –
[REQUIRED]
The external data source that this connection binds to: its
typeandlocation.arn. The ARN must be in your account, except forGLUE_DATA_CATALOG, where it can name a catalog or an AWS Glue connection in another account.GLUE_DATA_CATALOG- An AWS Glue Data Catalog ARN (:catalogor:catalog/<path>), or the ARN of an existing AWS Glue connection (:connection/<name>) for a federated AWS data source such as Amazon Redshift or Amazon RDS. The AWS Glue connection must be a unified connection (ConnectionSchemaVersion 2) in your partition and Region that you can read. You can’t specifyscopewith an AWS Glue connection ARN. While AWS Glue is still validating the connection, the request fails withConflictException. If its validation failed, the request fails withAccessDeniedException.DATABRICKSorSNOWFLAKE- The ARN of an existing AWS Glue connection whose AWS Glue ConnectionType matchestype. AWS Context validates its Credential Broker settings, if present, and doesn’t store them.
type (string) – [REQUIRED]
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) – [REQUIRED]
Where the data source lives. For this scope, an AWS ARN only.
arn (string) – [REQUIRED]
The ARN of the data source. Its account segment must be your account when you create the connection.
scope (dict) –
Optional hierarchical subset of the data source to ingest. Absent means the whole source. A DATABRICKS scope names at most one
databricksCatalog, and a SNOWFLAKE scope onesnowflakeDatabase. A GLUE_DATA_CATALOG scope can select by service with aglueServicesegment (seeDataSourceScope). An unknown service name, a repeated or misplacedglueServicesegment, a later level of another service, orglueServiceon another connection type returns ValidationException.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 oneglueServicesegment, which selects a service rather than a node (seeDataSourceScope).path (list) – [REQUIRED]
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 asdatabaseortable, and theidof the resource at that level. Both are required.In a
GLUE_DATA_CATALOGconnection’s scope, the levelglueServicenames a service instead of a resource. Itsidis 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
glueServicesegment, or aglueServicesegment in any other position returnsValidationException. A resource path never containsglueService.level (string) – [REQUIRED]
The hierarchy level name for this segment (for example, “database”, “table”). Non-blank, no whitespace.
id (string) – [REQUIRED]
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.
accessConfig (dict) –
The access configuration for the data source, which names the AWS Identity and Access Management (IAM) role for data access. Optional.
For
GLUE_DATA_CATALOGandBEDROCK_KNOWLEDGE_BASE,iamRoleis the IAM role that AWS Context assumes to read the source and the AWS Glue connections inglueConnectionMappings. If you omitaccessConfigor set no variant, AWS Context reads them with your own credentials. This applies whether the source is in your account or another account. For a source in another account, AWS Context checks when it creates the connection thatiamRolecan read the source, and the request fails if it can’t. A source in another account with noiamRoleisn’t checked when the connection is created. AnaccessConfigwith no variant is stored as absent and is not returned on the connection.For
DATABRICKSandSNOWFLAKE, AWS Glue reads the source with theROLE_ARNof the AWS Glue connection indataSource, not withaccessConfig. For these types,accessConfigis reserved for other roles.Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
iamRole.iamRole (dict) –
Assume-role access. The service assumes
roleArnto read the connection’s data source.roleArn (string) – [REQUIRED]
The IAM role that AWS Context assumes to read this connection’s data source. The role must be in your account. AWS Context rejects a role in another account. It has the same format as
ingestionConfig.roleArn. You must haveiam:PassRolepermission on the role to pass it to AWS Context. Otherwise, CreateConnection and UpdateConnection fail withAccessDeniedException.
syncSchedule (dict) –
How often AWS Context re-syncs a
DATABRICKSorSNOWFLAKEsource. If you omit it, the default isDAILY. Not accepted forGLUE_DATA_CATALOGandBEDROCK_KNOWLEDGE_BASEconnections. You can change it with UpdateConnection.Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
frequency,cronExpression.frequency (string) –
How often catalog synchronization runs. AWS Glue determines the schedule’s start time. Valid values:
HOURLY- Every 60 minutes.DAILY- Every 1,440 minutes.WEEKLY- Not supported. You can save this value on a connection created withpublishset tofalse, but publishing the connection with this value returnsValidationException.MONTHLY- Not supported. You can save this value on a connection created withpublishset tofalse, but publishing the connection with this value returnsValidationException.
cronExpression (string) –
Not supported. Catalog synchronization doesn’t support cron schedules, so publishing a connection with this member returns
ValidationException. Usefrequencyinstead.
ingestionConfig (dict) –
[REQUIRED]
The ingestion configuration: the IAM role that a data producer (AWS Glue Data Catalog or Amazon Bedrock knowledge base) assumes to push data into this connection’s agent contexts. It is separate from
accessConfig, which names the role that AWS Context assumes to read the source. Required, because a connection can’t ingest data without a role that its data producer can assume. You must haveiam:PassRolepermission to pass this role to the data producer, and the role must be in your account.roleArn (string) – [REQUIRED]
The IAM role in your account that a data producer assumes to push data into this connection’s agent contexts. Your account must own the role.
glueConnectionMappings (list) –
The AWS Glue connection to use for each
redshiftNamespace, eachrdsInstanceandrdsDatabasepair, or eachsnowflakeDatabaseinscope, keyed bypath. Optional. You can specify 0–20 entries. The following rules apply:Once an entry names a level, every resource of that level in
scopeneeds an entry. While an entry namesrdsInstance, every selector that names anrdsInstancemust also name itsrdsDatabase.redshiftNamespaceandrdsInstanceentries requiredataSourceto be an AWS Glue Data Catalog ARN.accessConfig.iamRoleis optional.snowflakeDatabaseentries requiredataSourceto be an AWS Glue connection ARN.While any entry is present,
scopecannot contain a selector that names only a catalog or aglueService, because such a selector covers every resource of the catalog or service. Otherwise, a selector with aglueServicesegment follows these rules as it would without that segment. An entry’spathnever namesglueService.A selector that names only
glueServiceREDSHIFTorRDS, with no namespace or instance, cannot be combined with any entry. Such a connection reads only the service’s metadata, and you cannot query its data.
(dict) –
A GlueConnectionMapping binds one resource in the connection’s
scopeto an existing AWS Glue connection that you specify for it. The mapping covers every scope selector that names that resource. For aredshiftNamespace, AWS Context does not check which resource your AWS Glue connection targets. AWS Context does not revalidate an update that resends the stored list unchanged. A response does not return a status for each mapping.path (list) – [REQUIRED]
The resource that this mapping binds, root first, in the same form as
scope.selectors[].path. Required. Contains 1–2 segments:On a
GLUE_DATA_CATALOGconnection, either aredshiftNamespacesegment whose ID is an Amazon Redshift namespace ARN (namespace:<id>, ornamespace/<id>for Amazon Redshift Serverless), or anrdsInstancesegment whose ID is an Amazon RDS DB cluster or DB instance ARN (cluster:<id>ordb:<id>) followed by anrdsDatabasesegment whose ID is the database name. The ARN must be in your account and Region.On a
SNOWFLAKEconnection whosedataSourceis an AWS Glue connection, asnowflakeDatabasesegment whose ID is the database name, at most 255 characters.
(dict) –
One segment of a resource hierarchy path: the hierarchy
level, such asdatabaseortable, and theidof the resource at that level. Both are required.In a
GLUE_DATA_CATALOGconnection’s scope, the levelglueServicenames a service instead of a resource. Itsidis 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
glueServicesegment, or aglueServicesegment in any other position returnsValidationException. A resource path never containsglueService.level (string) – [REQUIRED]
The hierarchy level name for this segment (for example, “database”, “table”). Non-blank, no whitespace.
id (string) – [REQUIRED]
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.
glueConnectionArn (string) – [REQUIRED]
The ARN of your AWS Glue connection for
path, in your account and Region. Required. The connection type must be one thatpathaccepts:redshiftNamespace- AREDSHIFTunified connection (ConnectionSchemaVersion 2).rdsInstanceandrdsDatabase- APOSTGRESQLunified connection, or, for an RDS DB instance, alsoORACLE, with itsDATABASEproperty set to thatrdsDatabase.snowflakeDatabase- ASNOWFLAKEconnection with aROLE_ARNand itsDATABASEproperty set to that database. TheROLE_ARNmust allowglue:GetConnectionon that connection.
AWS Context synchronizes the database through this connection. It doesn’t change
DATABASEon a connection that it didn’t create. If AWS Glue is still validating the connection, the request fails withConflictException. If its validation failed, the request fails withAccessDeniedException.
publish (boolean) – Specifies whether to configure catalog synchronization and wait for it to be provisioned during this call. If you omit it, the default is
true. For aDATABRICKSorSNOWFLAKEconnection,falsevalidates only the AWS Glue connection. The connection is returned asCREATINGwithsubStatusGLUE_CONNECTION_VALIDATED, and you publish it later by calling UpdateConnection withpublishset totrue. Ignored forGLUE_DATA_CATALOGandBEDROCK_KNOWLEDGE_BASEconnections, which have no sync job.acknowledgements (list) –
The conditions that you acknowledge AWS Context can’t honor. Specify
CUSTOMER_MANAGED_KEYwhen the knowledge base is encrypted with an AWS KMS customer managed key and you accept that AWS Context stores the ingested data under AWS owned keys. If you omit it, creating a connection to such a knowledge base fails withValidationException. An unknown or repeated value also fails withValidationException.(string) –
A condition that you accept on CreateConnection. Supported value:
CUSTOMER_MANAGED_KEY.
tags (dict) –
Tags to add to the connection when you create it: up to 200 in the request, of which at most 50 can be user tags. Keys can’t start with
aws:. To add tags, you also needcontext:TagResourcepermission on the new connection. If you specify more than 50 user tags, the request fails withServiceQuotaExceededException, as on TagResource. If an AWS Organizations tag policy refuses a tag, the request fails withValidationException.(string) –
A tag key. Leading and trailing whitespace is trimmed. Keys starting with
aws:are reserved for AWS.(string) –
A tag value. Leading and trailing whitespace is trimmed.
- Return type:
dict
- Returns:
Response Syntax
{ 'id': 'string', 'arn': 'string', 'name': 'string', 'dataSource': { 'type': 'GLUE_DATA_CATALOG'|'BEDROCK_KNOWLEDGE_BASE'|'DATABRICKS'|'SNOWFLAKE', 'location': { 'arn': 'string' } }, 'scope': { 'selectors': [ { 'path': [ { 'level': 'string', 'id': 'string' }, ] }, ] }, 'accessConfig': { 'iamRole': { 'roleArn': 'string' } }, 'syncSchedule': { 'frequency': 'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY', 'cronExpression': 'string' }, 'ingestionConfig': { 'roleArn': 'string' }, 'glueConnectionMappings': [ { 'path': [ { 'level': 'string', 'id': 'string' }, ], 'glueConnectionArn': 'string' }, ], 'status': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'FAILED', 'failure': { 'code': 'GLUE_CONNECTION_UNAVAILABLE', 'message': 'string' }, 'subStatus': 'GLUE_CONNECTION_CREATED'|'GLUE_CONNECTION_VALIDATED'|'SYNC_JOB_CREATED', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1) }
Response Structure
(dict) –
A connection, as returned by CreateConnection, GetConnection, and UpdateConnection.
id,arn,name,dataSource,status,createdAt, andupdatedAtare always present. Every other member is optional.id (string) –
The ID of the connection.
arn (string) –
The ARN of the connection.
name (string) –
The name of the connection. You set it when you create the connection and can change it with UpdateConnection. Uses the same constraints as an agent context name. Always present.
dataSource (dict) –
The typed reference to the external data source that this connection binds to. Its
type, the authoritative kind of data source, is indataSource.type.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 hierarchical subset of the data source this connection ingests.
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 oneglueServicesegment, which selects a service rather than a node (seeDataSourceScope).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 asdatabaseortable, and theidof the resource at that level. Both are required.In a
GLUE_DATA_CATALOGconnection’s scope, the levelglueServicenames a service instead of a resource. Itsidis 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
glueServicesegment, or aglueServicesegment in any other position returnsValidationException. A resource path never containsglueService.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.
accessConfig (dict) –
Per-connection access configuration: the IAM role used for data access.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
iamRole. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBERis as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
iamRole (dict) –
Assume-role access. The service assumes
roleArnto read the connection’s data source.roleArn (string) –
The IAM role that AWS Context assumes to read this connection’s data source. The role must be in your account. AWS Context rejects a role in another account. It has the same format as
ingestionConfig.roleArn. You must haveiam:PassRolepermission on the role to pass it to AWS Context. Otherwise, CreateConnection and UpdateConnection fail withAccessDeniedException.
syncSchedule (dict) –
The effective sync schedule. Present for
DATABRICKSandSNOWFLAKEconnections (DAILYif you didn’t specify one). Absent forGLUE_DATA_CATALOGandBEDROCK_KNOWLEDGE_BASEconnections, which are event-driven.Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
frequency,cronExpression. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBERis as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
frequency (string) –
How often catalog synchronization runs. AWS Glue determines the schedule’s start time. Valid values:
HOURLY- Every 60 minutes.DAILY- Every 1,440 minutes.WEEKLY- Not supported. You can save this value on a connection created withpublishset tofalse, but publishing the connection with this value returnsValidationException.MONTHLY- Not supported. You can save this value on a connection created withpublishset tofalse, but publishing the connection with this value returnsValidationException.
cronExpression (string) –
Not supported. Catalog synchronization doesn’t support cron schedules, so publishing a connection with this member returns
ValidationException. Usefrequencyinstead.
ingestionConfig (dict) –
The connection’s ingestion configuration (the IAM role a data producer assumes to push into this connection). Absent when no ingestion role is configured.
roleArn (string) –
The IAM role in your account that a data producer assumes to push data into this connection’s agent contexts. Your account must own the role.
glueConnectionMappings (list) –
The AWS Glue connection for each
redshiftNamespace, eachrdsInstanceandrdsDatabasepair, or eachsnowflakeDatabaseinscope. Absent when none is configured.(dict) –
A GlueConnectionMapping binds one resource in the connection’s
scopeto an existing AWS Glue connection that you specify for it. The mapping covers every scope selector that names that resource. For aredshiftNamespace, AWS Context does not check which resource your AWS Glue connection targets. AWS Context does not revalidate an update that resends the stored list unchanged. A response does not return a status for each mapping.path (list) –
The resource that this mapping binds, root first, in the same form as
scope.selectors[].path. Required. Contains 1–2 segments:On a
GLUE_DATA_CATALOGconnection, either aredshiftNamespacesegment whose ID is an Amazon Redshift namespace ARN (namespace:<id>, ornamespace/<id>for Amazon Redshift Serverless), or anrdsInstancesegment whose ID is an Amazon RDS DB cluster or DB instance ARN (cluster:<id>ordb:<id>) followed by anrdsDatabasesegment whose ID is the database name. The ARN must be in your account and Region.On a
SNOWFLAKEconnection whosedataSourceis an AWS Glue connection, asnowflakeDatabasesegment whose ID is the database name, at most 255 characters.
(dict) –
One segment of a resource hierarchy path: the hierarchy
level, such asdatabaseortable, and theidof the resource at that level. Both are required.In a
GLUE_DATA_CATALOGconnection’s scope, the levelglueServicenames a service instead of a resource. Itsidis 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
glueServicesegment, or aglueServicesegment in any other position returnsValidationException. A resource path never containsglueService.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.
glueConnectionArn (string) –
The ARN of your AWS Glue connection for
path, in your account and Region. Required. The connection type must be one thatpathaccepts:redshiftNamespace- AREDSHIFTunified connection (ConnectionSchemaVersion 2).rdsInstanceandrdsDatabase- APOSTGRESQLunified connection, or, for an RDS DB instance, alsoORACLE, with itsDATABASEproperty set to thatrdsDatabase.snowflakeDatabase- ASNOWFLAKEconnection with aROLE_ARNand itsDATABASEproperty set to that database. TheROLE_ARNmust allowglue:GetConnectionon that connection.
AWS Context synchronizes the database through this connection. It doesn’t change
DATABASEon a connection that it didn’t create. If AWS Glue is still validating the connection, the request fails withConflictException. If its validation failed, the request fails withAccessDeniedException.
status (string) –
The connection’s status. Valid values:
CREATING- Validation or provisioning is still in progress.ACTIVE- The data source is reachable and, for aDATABRICKSorSNOWFLAKEconnection, AWS Glue has provisioned catalog synchronization and returned its crawler ARN. This doesn’t mean that a crawl has started or completed.UPDATING- The connection is being updated.DELETING- The connection is being deleted.FAILED- Validation or provisioning failed, and the connection can’t recover.
failure (dict) –
The reason the connection is FAILED. Absent in every other status.
code (string) –
A code that identifies why the connection failed. Codes include the following:
GLUE_CONNECTION_UNAVAILABLE- The AWS Glue connection failed AWS Glue validation or no longer exists, or AWS Context couldn’t provision catalog synchronization. Check the AWS Glue connection in the AWS Glue console, and then create the connection again.
New codes can be added, so handle a code that you don’t recognize. Use
code, notmessage, to decide how to respond.message (string) –
The failure message. For an AWS Glue connection that failed validation, this is the StatusReason from AWS Glue. Otherwise, it is a message from AWS Context.
subStatus (string) –
The last milestone a third-party connection’s lifecycle reached. Present in two statuses: CREATING, where it shows the resources provisioned so far, and DELETING, where it shows the resources removed so far. Absent in every other status and while nothing has been done yet in the current direction. CREATING at GLUE_CONNECTION_VALIDATED on a connection created with
publish: falsemeans it is waiting for UpdateConnectionpublish: true.createdAt (datetime) –
The date and time when the connection was created.
updatedAt (datetime) –
When the resource last changed. Equal to
createdAtuntil the first update.
Exceptions