|
| 1 | +// smithy-typescript generated code |
| 2 | +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; |
| 3 | +import { getSerdePlugin } from "@smithy/middleware-serde"; |
| 4 | +import { Command as $Command } from "@smithy/smithy-client"; |
| 5 | +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; |
| 6 | + |
| 7 | +import { commonParams } from "../endpoint/EndpointParameters"; |
| 8 | +import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient"; |
| 9 | +import { CreateCatalogRequest, CreateCatalogResponse } from "../models/models_1"; |
| 10 | +import { de_CreateCatalogCommand, se_CreateCatalogCommand } from "../protocols/Aws_json1_1"; |
| 11 | + |
| 12 | +/** |
| 13 | + * @public |
| 14 | + */ |
| 15 | +export type { __MetadataBearer }; |
| 16 | +export { $Command }; |
| 17 | +/** |
| 18 | + * @public |
| 19 | + * |
| 20 | + * The input for {@link CreateCatalogCommand}. |
| 21 | + */ |
| 22 | +export interface CreateCatalogCommandInput extends CreateCatalogRequest {} |
| 23 | +/** |
| 24 | + * @public |
| 25 | + * |
| 26 | + * The output of {@link CreateCatalogCommand}. |
| 27 | + */ |
| 28 | +export interface CreateCatalogCommandOutput extends CreateCatalogResponse, __MetadataBearer {} |
| 29 | + |
| 30 | +/** |
| 31 | + * <p>Creates a new catalog in the Glue Data Catalog.</p> |
| 32 | + * @example |
| 33 | + * Use a bare-bones client and the command you need to make an API call. |
| 34 | + * ```javascript |
| 35 | + * import { GlueClient, CreateCatalogCommand } from "@aws-sdk/client-glue"; // ES Modules import |
| 36 | + * // const { GlueClient, CreateCatalogCommand } = require("@aws-sdk/client-glue"); // CommonJS import |
| 37 | + * const client = new GlueClient(config); |
| 38 | + * const input = { // CreateCatalogRequest |
| 39 | + * Name: "STRING_VALUE", // required |
| 40 | + * CatalogInput: { // CatalogInput |
| 41 | + * Description: "STRING_VALUE", |
| 42 | + * FederatedCatalog: { // FederatedCatalog |
| 43 | + * Identifier: "STRING_VALUE", |
| 44 | + * ConnectionName: "STRING_VALUE", |
| 45 | + * }, |
| 46 | + * Parameters: { // ParametersMap |
| 47 | + * "<keys>": "STRING_VALUE", |
| 48 | + * }, |
| 49 | + * TargetRedshiftCatalog: { // TargetRedshiftCatalog |
| 50 | + * CatalogArn: "STRING_VALUE", // required |
| 51 | + * }, |
| 52 | + * CatalogProperties: { // CatalogProperties |
| 53 | + * DataLakeAccessProperties: { // DataLakeAccessProperties |
| 54 | + * DataLakeAccess: true || false, |
| 55 | + * DataTransferRole: "STRING_VALUE", |
| 56 | + * KmsKey: "STRING_VALUE", |
| 57 | + * CatalogType: "STRING_VALUE", |
| 58 | + * }, |
| 59 | + * CustomProperties: { |
| 60 | + * "<keys>": "STRING_VALUE", |
| 61 | + * }, |
| 62 | + * }, |
| 63 | + * CreateTableDefaultPermissions: [ // PrincipalPermissionsList |
| 64 | + * { // PrincipalPermissions |
| 65 | + * Principal: { // DataLakePrincipal |
| 66 | + * DataLakePrincipalIdentifier: "STRING_VALUE", |
| 67 | + * }, |
| 68 | + * Permissions: [ // PermissionList |
| 69 | + * "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS", |
| 70 | + * ], |
| 71 | + * }, |
| 72 | + * ], |
| 73 | + * CreateDatabaseDefaultPermissions: [ |
| 74 | + * { |
| 75 | + * Principal: { |
| 76 | + * DataLakePrincipalIdentifier: "STRING_VALUE", |
| 77 | + * }, |
| 78 | + * Permissions: [ |
| 79 | + * "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS", |
| 80 | + * ], |
| 81 | + * }, |
| 82 | + * ], |
| 83 | + * }, |
| 84 | + * Tags: { // TagsMap |
| 85 | + * "<keys>": "STRING_VALUE", |
| 86 | + * }, |
| 87 | + * }; |
| 88 | + * const command = new CreateCatalogCommand(input); |
| 89 | + * const response = await client.send(command); |
| 90 | + * // {}; |
| 91 | + * |
| 92 | + * ``` |
| 93 | + * |
| 94 | + * @param CreateCatalogCommandInput - {@link CreateCatalogCommandInput} |
| 95 | + * @returns {@link CreateCatalogCommandOutput} |
| 96 | + * @see {@link CreateCatalogCommandInput} for command's `input` shape. |
| 97 | + * @see {@link CreateCatalogCommandOutput} for command's `response` shape. |
| 98 | + * @see {@link GlueClientResolvedConfig | config} for GlueClient's `config` shape. |
| 99 | + * |
| 100 | + * @throws {@link AccessDeniedException} (client fault) |
| 101 | + * <p>Access to a resource was denied.</p> |
| 102 | + * |
| 103 | + * @throws {@link AlreadyExistsException} (client fault) |
| 104 | + * <p>A resource to be created or added already exists.</p> |
| 105 | + * |
| 106 | + * @throws {@link ConcurrentModificationException} (client fault) |
| 107 | + * <p>Two processes are trying to modify a resource simultaneously.</p> |
| 108 | + * |
| 109 | + * @throws {@link EntityNotFoundException} (client fault) |
| 110 | + * <p>A specified entity does not exist</p> |
| 111 | + * |
| 112 | + * @throws {@link FederatedResourceAlreadyExistsException} (client fault) |
| 113 | + * <p>A federated resource already exists.</p> |
| 114 | + * |
| 115 | + * @throws {@link FederationSourceException} (client fault) |
| 116 | + * <p>A federation source failed.</p> |
| 117 | + * |
| 118 | + * @throws {@link GlueEncryptionException} (client fault) |
| 119 | + * <p>An encryption operation failed.</p> |
| 120 | + * |
| 121 | + * @throws {@link InternalServiceException} (server fault) |
| 122 | + * <p>An internal service error occurred.</p> |
| 123 | + * |
| 124 | + * @throws {@link InvalidInputException} (client fault) |
| 125 | + * <p>The input provided was not valid.</p> |
| 126 | + * |
| 127 | + * @throws {@link OperationTimeoutException} (client fault) |
| 128 | + * <p>The operation timed out.</p> |
| 129 | + * |
| 130 | + * @throws {@link ResourceNumberLimitExceededException} (client fault) |
| 131 | + * <p>A resource numerical limit was exceeded.</p> |
| 132 | + * |
| 133 | + * @throws {@link GlueServiceException} |
| 134 | + * <p>Base exception class for all service exceptions from Glue service.</p> |
| 135 | + * |
| 136 | + * @public |
| 137 | + */ |
| 138 | +export class CreateCatalogCommand extends $Command |
| 139 | + .classBuilder< |
| 140 | + CreateCatalogCommandInput, |
| 141 | + CreateCatalogCommandOutput, |
| 142 | + GlueClientResolvedConfig, |
| 143 | + ServiceInputTypes, |
| 144 | + ServiceOutputTypes |
| 145 | + >() |
| 146 | + .ep(commonParams) |
| 147 | + .m(function (this: any, Command: any, cs: any, config: GlueClientResolvedConfig, o: any) { |
| 148 | + return [ |
| 149 | + getSerdePlugin(config, this.serialize, this.deserialize), |
| 150 | + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), |
| 151 | + ]; |
| 152 | + }) |
| 153 | + .s("AWSGlue", "CreateCatalog", {}) |
| 154 | + .n("GlueClient", "CreateCatalogCommand") |
| 155 | + .f(void 0, void 0) |
| 156 | + .ser(se_CreateCatalogCommand) |
| 157 | + .de(de_CreateCatalogCommand) |
| 158 | + .build() { |
| 159 | + /** @internal type navigation helper, not in runtime. */ |
| 160 | + protected declare static __types: { |
| 161 | + api: { |
| 162 | + input: CreateCatalogRequest; |
| 163 | + output: {}; |
| 164 | + }; |
| 165 | + sdk: { |
| 166 | + input: CreateCatalogCommandInput; |
| 167 | + output: CreateCatalogCommandOutput; |
| 168 | + }; |
| 169 | + }; |
| 170 | +} |
0 commit comments