Context / Client / delete_connection

delete_connection

Context.Client.delete_connection(**kwargs)

Deletes a connection. While any agent context still uses the connection, the request fails with ConflictException. Remove the connection from each agent context with UpdateAgentContext, and wait until AWS Context has removed the connection’s data from the agent context, before you retry. For a DATABRICKS or SNOWFLAKE connection, deletionMode specifies whether AWS Context also deletes the AWS Glue connection. If the connection stays DELETING, call DeleteConnection again to finish the cleanup. Deleting a connection that doesn’t exist or is already being deleted succeeds, so you can safely retry.

See also: AWS API Documentation

Request Syntax

response = client.delete_connection(
    connectionId='string',
    deletionMode='RETAIN'|'DELETE'
)
Parameters:
  • connectionId (string) –

    [REQUIRED]

    The connection to delete, by its ID (which starts with conn-) or its ARN.

  • deletionMode (string) – Specifies what happens to the connectivity resources behind the connection: the AWS Glue connection, whether AWS Context created it or you specified an existing one. AWS Context keeps the AWS Glue connections named in glueConnectionMappings. This member doesn’t affect agent context content. To remove the connection’s content from an agent context, remove the connection from the agent context with UpdateAgentContext. AWS Context never changes your source data. If you omit it, the default is RETAIN. It has no effect on GLUE_DATA_CATALOG and BEDROCK_KNOWLEDGE_BASE connections.

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

Exceptions