updateConnection

Updates a connection's configuration.

Samples

// The following example adds the marketing_db database to the scope of the connection conn
// e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b and keeps its ingestion role, which every update must specify.
val resp = contextClient.updateConnection {
    connectionId = "conn-e5f6a7b8c9d04e1f8a2b3c4d5e6f7a8b"
    scope = DataSourceScope {
        selectors = listOf<ResourceSelector>(
            ResourceSelector {
                path = listOf<PathSegment>(
                    PathSegment {
                        level = "glueCatalog"
                        id = "arn:aws:glue:us-east-1:111122223333:catalog"
                    },
                    PathSegment {
                        level = "glueDatabase"
                        id = "sales_db"
                    }                        
                )
            },
            ResourceSelector {
                path = listOf<PathSegment>(
                    PathSegment {
                        level = "glueCatalog"
                        id = "arn:aws:glue:us-east-1:111122223333:catalog"
                    },
                    PathSegment {
                        level = "glueDatabase"
                        id = "marketing_db"
                    }                        
                )
            }                
        )
    }
    ingestionConfig = IngestionConfig {
        roleArn = "arn:aws:iam::111122223333:role/ContextIngestionRole"
    }
}