Skip to content

Commit

Permalink
feat(client-athena): Add FEDERATED type to CreateDataCatalog. This cr…
Browse files Browse the repository at this point in the history
…eates Athena Data Catalog, AWS Lambda connector, and AWS Glue connection. Create/DeleteDataCatalog returns DataCatalog. Add Status, ConnectionType, and Error to DataCatalog and DataCatalogSummary. Add DeleteCatalogOnly to delete Athena Catalog only.
  • Loading branch information
awstools committed Dec 3, 2024
1 parent 44b1172 commit 500786a
Show file tree
Hide file tree
Showing 7 changed files with 734 additions and 117 deletions.
36 changes: 33 additions & 3 deletions clients/client-athena/src/commands/CreateDataCatalogCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,24 @@ export interface CreateDataCatalogCommandOutput extends CreateDataCatalogOutput,
/**
* <p>Creates (registers) a data catalog with the specified name and properties. Catalogs
* created are visible to all users of the same Amazon Web Services account.</p>
* <p>This API operation creates the following resources.</p>
* <ul>
* <li>
* <p>CFN Stack Name with a maximum length of 128 characters and prefix
* <code>athenafederatedcatalog-CATALOG_NAME_SANITIZED</code> with length 23
* characters.</p>
* </li>
* <li>
* <p>Lambda Function Name with a maximum length of 64 characters and prefix
* <code>athenafederatedcatalog_CATALOG_NAME_SANITIZED</code> with length 23
* characters.</p>
* </li>
* <li>
* <p>Glue Connection Name with a maximum length of 255 characters and a prefix
* <code>athenafederatedcatalog_CATALOG_NAME_SANITIZED</code> with length 23
* characters. </p>
* </li>
* </ul>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand All @@ -38,7 +56,7 @@ export interface CreateDataCatalogCommandOutput extends CreateDataCatalogOutput,
* const client = new AthenaClient(config);
* const input = { // CreateDataCatalogInput
* Name: "STRING_VALUE", // required
* Type: "LAMBDA" || "GLUE" || "HIVE", // required
* Type: "LAMBDA" || "GLUE" || "HIVE" || "FEDERATED", // required
* Description: "STRING_VALUE",
* Parameters: { // ParametersMap
* "<keys>": "STRING_VALUE",
Expand All @@ -52,7 +70,19 @@ export interface CreateDataCatalogCommandOutput extends CreateDataCatalogOutput,
* };
* const command = new CreateDataCatalogCommand(input);
* const response = await client.send(command);
* // {};
* // { // CreateDataCatalogOutput
* // DataCatalog: { // DataCatalog
* // Name: "STRING_VALUE", // required
* // Description: "STRING_VALUE",
* // Type: "LAMBDA" || "GLUE" || "HIVE" || "FEDERATED", // required
* // Parameters: { // ParametersMap
* // "<keys>": "STRING_VALUE",
* // },
* // Status: "CREATE_IN_PROGRESS" || "CREATE_COMPLETE" || "CREATE_FAILED" || "CREATE_FAILED_CLEANUP_IN_PROGRESS" || "CREATE_FAILED_CLEANUP_COMPLETE" || "CREATE_FAILED_CLEANUP_FAILED" || "DELETE_IN_PROGRESS" || "DELETE_COMPLETE" || "DELETE_FAILED",
* // ConnectionType: "DYNAMODB" || "MYSQL" || "POSTGRESQL" || "REDSHIFT" || "ORACLE" || "SYNAPSE" || "SQLSERVER" || "DB2" || "OPENSEARCH" || "BIGQUERY" || "GOOGLECLOUDSTORAGE" || "HBASE" || "DOCUMENTDB" || "CMDB" || "TPCDS" || "TIMESTREAM" || "SAPHANA" || "SNOWFLAKE" || "DATALAKEGEN2" || "DB2AS400",
* // Error: "STRING_VALUE",
* // },
* // };
*
* ```
*
Expand Down Expand Up @@ -100,7 +130,7 @@ export class CreateDataCatalogCommand extends $Command
protected declare static __types: {
api: {
input: CreateDataCatalogInput;
output: {};
output: CreateDataCatalogOutput;
};
sdk: {
input: CreateDataCatalogCommandInput;
Expand Down
17 changes: 15 additions & 2 deletions clients/client-athena/src/commands/DeleteDataCatalogCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,23 @@ export interface DeleteDataCatalogCommandOutput extends DeleteDataCatalogOutput,
* const client = new AthenaClient(config);
* const input = { // DeleteDataCatalogInput
* Name: "STRING_VALUE", // required
* DeleteCatalogOnly: true || false,
* };
* const command = new DeleteDataCatalogCommand(input);
* const response = await client.send(command);
* // {};
* // { // DeleteDataCatalogOutput
* // DataCatalog: { // DataCatalog
* // Name: "STRING_VALUE", // required
* // Description: "STRING_VALUE",
* // Type: "LAMBDA" || "GLUE" || "HIVE" || "FEDERATED", // required
* // Parameters: { // ParametersMap
* // "<keys>": "STRING_VALUE",
* // },
* // Status: "CREATE_IN_PROGRESS" || "CREATE_COMPLETE" || "CREATE_FAILED" || "CREATE_FAILED_CLEANUP_IN_PROGRESS" || "CREATE_FAILED_CLEANUP_COMPLETE" || "CREATE_FAILED_CLEANUP_FAILED" || "DELETE_IN_PROGRESS" || "DELETE_COMPLETE" || "DELETE_FAILED",
* // ConnectionType: "DYNAMODB" || "MYSQL" || "POSTGRESQL" || "REDSHIFT" || "ORACLE" || "SYNAPSE" || "SQLSERVER" || "DB2" || "OPENSEARCH" || "BIGQUERY" || "GOOGLECLOUDSTORAGE" || "HBASE" || "DOCUMENTDB" || "CMDB" || "TPCDS" || "TIMESTREAM" || "SAPHANA" || "SNOWFLAKE" || "DATALAKEGEN2" || "DB2AS400",
* // Error: "STRING_VALUE",
* // },
* // };
*
* ```
*
Expand Down Expand Up @@ -88,7 +101,7 @@ export class DeleteDataCatalogCommand extends $Command
protected declare static __types: {
api: {
input: DeleteDataCatalogInput;
output: {};
output: DeleteDataCatalogOutput;
};
sdk: {
input: DeleteDataCatalogCommandInput;
Expand Down
5 changes: 4 additions & 1 deletion clients/client-athena/src/commands/GetDataCatalogCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,13 @@ export interface GetDataCatalogCommandOutput extends GetDataCatalogOutput, __Met
* // DataCatalog: { // DataCatalog
* // Name: "STRING_VALUE", // required
* // Description: "STRING_VALUE",
* // Type: "LAMBDA" || "GLUE" || "HIVE", // required
* // Type: "LAMBDA" || "GLUE" || "HIVE" || "FEDERATED", // required
* // Parameters: { // ParametersMap
* // "<keys>": "STRING_VALUE",
* // },
* // Status: "CREATE_IN_PROGRESS" || "CREATE_COMPLETE" || "CREATE_FAILED" || "CREATE_FAILED_CLEANUP_IN_PROGRESS" || "CREATE_FAILED_CLEANUP_COMPLETE" || "CREATE_FAILED_CLEANUP_FAILED" || "DELETE_IN_PROGRESS" || "DELETE_COMPLETE" || "DELETE_FAILED",
* // ConnectionType: "DYNAMODB" || "MYSQL" || "POSTGRESQL" || "REDSHIFT" || "ORACLE" || "SYNAPSE" || "SQLSERVER" || "DB2" || "OPENSEARCH" || "BIGQUERY" || "GOOGLECLOUDSTORAGE" || "HBASE" || "DOCUMENTDB" || "CMDB" || "TPCDS" || "TIMESTREAM" || "SAPHANA" || "SNOWFLAKE" || "DATALAKEGEN2" || "DB2AS400",
* // Error: "STRING_VALUE",
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ export interface ListDataCatalogsCommandOutput extends ListDataCatalogsOutput, _
* // DataCatalogsSummary: [ // DataCatalogSummaryList
* // { // DataCatalogSummary
* // CatalogName: "STRING_VALUE",
* // Type: "LAMBDA" || "GLUE" || "HIVE",
* // Type: "LAMBDA" || "GLUE" || "HIVE" || "FEDERATED",
* // Status: "CREATE_IN_PROGRESS" || "CREATE_COMPLETE" || "CREATE_FAILED" || "CREATE_FAILED_CLEANUP_IN_PROGRESS" || "CREATE_FAILED_CLEANUP_COMPLETE" || "CREATE_FAILED_CLEANUP_FAILED" || "DELETE_IN_PROGRESS" || "DELETE_COMPLETE" || "DELETE_FAILED",
* // ConnectionType: "DYNAMODB" || "MYSQL" || "POSTGRESQL" || "REDSHIFT" || "ORACLE" || "SYNAPSE" || "SQLSERVER" || "DB2" || "OPENSEARCH" || "BIGQUERY" || "GOOGLECLOUDSTORAGE" || "HBASE" || "DOCUMENTDB" || "CMDB" || "TPCDS" || "TIMESTREAM" || "SAPHANA" || "SNOWFLAKE" || "DATALAKEGEN2" || "DB2AS400",
* // Error: "STRING_VALUE",
* // },
* // ],
* // NextToken: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export interface UpdateDataCatalogCommandOutput extends UpdateDataCatalogOutput,
* const client = new AthenaClient(config);
* const input = { // UpdateDataCatalogInput
* Name: "STRING_VALUE", // required
* Type: "LAMBDA" || "GLUE" || "HIVE", // required
* Type: "LAMBDA" || "GLUE" || "HIVE" || "FEDERATED", // required
* Description: "STRING_VALUE",
* Parameters: { // ParametersMap
* "<keys>": "STRING_VALUE",
Expand Down
Loading

0 comments on commit 500786a

Please sign in to comment.