Skip to content

Commit

Permalink
feat(client-redshift): Adds support for Amazon Redshift RegisterNames…
Browse files Browse the repository at this point in the history
…pace and DeregisterNamespace APIs to share data to AWS Glue Data Catalog.
  • Loading branch information
awstools committed Dec 3, 2024
1 parent 94d1598 commit b6e41dd
Show file tree
Hide file tree
Showing 26 changed files with 1,178 additions and 122 deletions.
16 changes: 16 additions & 0 deletions clients/client-redshift/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,14 @@ DeleteUsageLimit

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/redshift/command/DeleteUsageLimitCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-redshift/Interface/DeleteUsageLimitCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-redshift/Interface/DeleteUsageLimitCommandOutput/)

</details>
<details>
<summary>
DeregisterNamespace
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/redshift/command/DeregisterNamespaceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-redshift/Interface/DeregisterNamespaceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-redshift/Interface/DeregisterNamespaceCommandOutput/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -1231,6 +1239,14 @@ RebootCluster

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/redshift/command/RebootClusterCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-redshift/Interface/RebootClusterCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-redshift/Interface/RebootClusterCommandOutput/)

</details>
<details>
<summary>
RegisterNamespace
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/redshift/command/RegisterNamespaceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-redshift/Interface/RegisterNamespaceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-redshift/Interface/RegisterNamespaceCommandOutput/)

</details>
<details>
<summary>
Expand Down
46 changes: 46 additions & 0 deletions clients/client-redshift/src/Redshift.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,11 @@ import {
DeleteUsageLimitCommandInput,
DeleteUsageLimitCommandOutput,
} from "./commands/DeleteUsageLimitCommand";
import {
DeregisterNamespaceCommand,
DeregisterNamespaceCommandInput,
DeregisterNamespaceCommandOutput,
} from "./commands/DeregisterNamespaceCommand";
import {
DescribeAccountAttributesCommand,
DescribeAccountAttributesCommandInput,
Expand Down Expand Up @@ -620,6 +625,11 @@ import {
RebootClusterCommandInput,
RebootClusterCommandOutput,
} from "./commands/RebootClusterCommand";
import {
RegisterNamespaceCommand,
RegisterNamespaceCommandInput,
RegisterNamespaceCommandOutput,
} from "./commands/RegisterNamespaceCommand";
import {
RejectDataShareCommand,
RejectDataShareCommandInput,
Expand Down Expand Up @@ -728,6 +738,7 @@ const commands = {
DeleteSnapshotScheduleCommand,
DeleteTagsCommand,
DeleteUsageLimitCommand,
DeregisterNamespaceCommand,
DescribeAccountAttributesCommand,
DescribeAuthenticationProfilesCommand,
DescribeClusterDbRevisionsCommand,
Expand Down Expand Up @@ -804,6 +815,7 @@ const commands = {
PurchaseReservedNodeOfferingCommand,
PutResourcePolicyCommand,
RebootClusterCommand,
RegisterNamespaceCommand,
RejectDataShareCommand,
ResetClusterParameterGroupCommand,
ResizeClusterCommand,
Expand Down Expand Up @@ -1627,6 +1639,23 @@ export interface Redshift {
cb: (err: any, data?: DeleteUsageLimitCommandOutput) => void
): void;

/**
* @see {@link DeregisterNamespaceCommand}
*/
deregisterNamespace(
args: DeregisterNamespaceCommandInput,
options?: __HttpHandlerOptions
): Promise<DeregisterNamespaceCommandOutput>;
deregisterNamespace(
args: DeregisterNamespaceCommandInput,
cb: (err: any, data?: DeregisterNamespaceCommandOutput) => void
): void;
deregisterNamespace(
args: DeregisterNamespaceCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DeregisterNamespaceCommandOutput) => void
): void;

/**
* @see {@link DescribeAccountAttributesCommand}
*/
Expand Down Expand Up @@ -2914,6 +2943,23 @@ export interface Redshift {
cb: (err: any, data?: RebootClusterCommandOutput) => void
): void;

/**
* @see {@link RegisterNamespaceCommand}
*/
registerNamespace(
args: RegisterNamespaceCommandInput,
options?: __HttpHandlerOptions
): Promise<RegisterNamespaceCommandOutput>;
registerNamespace(
args: RegisterNamespaceCommandInput,
cb: (err: any, data?: RegisterNamespaceCommandOutput) => void
): void;
registerNamespace(
args: RegisterNamespaceCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: RegisterNamespaceCommandOutput) => void
): void;

/**
* @see {@link RejectDataShareCommand}
*/
Expand Down
9 changes: 9 additions & 0 deletions clients/client-redshift/src/RedshiftClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ import {
} from "./commands/DeleteSnapshotScheduleCommand";
import { DeleteTagsCommandInput, DeleteTagsCommandOutput } from "./commands/DeleteTagsCommand";
import { DeleteUsageLimitCommandInput, DeleteUsageLimitCommandOutput } from "./commands/DeleteUsageLimitCommand";
import {
DeregisterNamespaceCommandInput,
DeregisterNamespaceCommandOutput,
} from "./commands/DeregisterNamespaceCommand";
import {
DescribeAccountAttributesCommandInput,
DescribeAccountAttributesCommandOutput,
Expand Down Expand Up @@ -470,6 +474,7 @@ import {
} from "./commands/PurchaseReservedNodeOfferingCommand";
import { PutResourcePolicyCommandInput, PutResourcePolicyCommandOutput } from "./commands/PutResourcePolicyCommand";
import { RebootClusterCommandInput, RebootClusterCommandOutput } from "./commands/RebootClusterCommand";
import { RegisterNamespaceCommandInput, RegisterNamespaceCommandOutput } from "./commands/RegisterNamespaceCommand";
import { RejectDataShareCommandInput, RejectDataShareCommandOutput } from "./commands/RejectDataShareCommand";
import {
ResetClusterParameterGroupCommandInput,
Expand Down Expand Up @@ -570,6 +575,7 @@ export type ServiceInputTypes =
| DeleteSnapshotScheduleCommandInput
| DeleteTagsCommandInput
| DeleteUsageLimitCommandInput
| DeregisterNamespaceCommandInput
| DescribeAccountAttributesCommandInput
| DescribeAuthenticationProfilesCommandInput
| DescribeClusterDbRevisionsCommandInput
Expand Down Expand Up @@ -646,6 +652,7 @@ export type ServiceInputTypes =
| PurchaseReservedNodeOfferingCommandInput
| PutResourcePolicyCommandInput
| RebootClusterCommandInput
| RegisterNamespaceCommandInput
| RejectDataShareCommandInput
| ResetClusterParameterGroupCommandInput
| ResizeClusterCommandInput
Expand Down Expand Up @@ -712,6 +719,7 @@ export type ServiceOutputTypes =
| DeleteSnapshotScheduleCommandOutput
| DeleteTagsCommandOutput
| DeleteUsageLimitCommandOutput
| DeregisterNamespaceCommandOutput
| DescribeAccountAttributesCommandOutput
| DescribeAuthenticationProfilesCommandOutput
| DescribeClusterDbRevisionsCommandOutput
Expand Down Expand Up @@ -788,6 +796,7 @@ export type ServiceOutputTypes =
| PurchaseReservedNodeOfferingCommandOutput
| PutResourcePolicyCommandOutput
| RebootClusterCommandOutput
| RegisterNamespaceCommandOutput
| RejectDataShareCommandOutput
| ResetClusterParameterGroupCommandOutput
| ResizeClusterCommandOutput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export interface AssociateDataShareConsumerCommandOutput extends DataShare, __Me
* // },
* // ],
* // ManagedBy: "STRING_VALUE",
* // DataShareType: "INTERNAL",
* // };
*
* ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export interface AuthorizeDataShareCommandOutput extends DataShare, __MetadataBe
* // },
* // ],
* // ManagedBy: "STRING_VALUE",
* // DataShareType: "INTERNAL",
* // };
*
* ```
Expand Down
22 changes: 22 additions & 0 deletions clients/client-redshift/src/commands/CreateClusterCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,28 @@ export interface CreateClusterCommandOutput extends CreateClusterResult, __Metad
* For more information about managing clusters, go to
* <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html">Amazon Redshift Clusters</a>
* in the <i>Amazon Redshift Cluster Management Guide</i>.</p>
* <p>VPC Block Public Access (BPA) enables you to block resources in VPCs and subnets that
* you own in a Region from reaching or being reached from the internet through internet
* gateways and egress-only internet gateways. If a subnet group for a
* provisioned cluster is in an account with VPC BPA turned on, the following capabilities
* are blocked:</p>
* <ul>
* <li>
* <p>Creating a public cluster</p>
* </li>
* <li>
* <p>Restoring a public cluster</p>
* </li>
* <li>
* <p>Modifying a private cluster to be public</p>
* </li>
* <li>
* <p>Adding a subnet with VPC BPA turned on to the subnet group when there's at
* least one public cluster within the group</p>
* </li>
* </ul>
* <p>For more information about VPC BPA, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/security-vpc-bpa.html">Block public access to VPCs and
* subnets</a> in the <i>Amazon VPC User Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export interface DeauthorizeDataShareCommandOutput extends DataShare, __Metadata
* // },
* // ],
* // ManagedBy: "STRING_VALUE",
* // DataShareType: "INTERNAL",
* // };
*
* ```
Expand Down
114 changes: 114 additions & 0 deletions clients/client-redshift/src/commands/DeregisterNamespaceCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
// smithy-typescript generated code
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { DeregisterNamespaceInputMessage } from "../models/models_0";
import { DeregisterNamespaceOutputMessage } from "../models/models_1";
import { de_DeregisterNamespaceCommand, se_DeregisterNamespaceCommand } from "../protocols/Aws_query";
import { RedshiftClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RedshiftClient";

/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link DeregisterNamespaceCommand}.
*/
export interface DeregisterNamespaceCommandInput extends DeregisterNamespaceInputMessage {}
/**
* @public
*
* The output of {@link DeregisterNamespaceCommand}.
*/
export interface DeregisterNamespaceCommandOutput extends DeregisterNamespaceOutputMessage, __MetadataBearer {}

/**
* <p>Deregisters a cluster or serverless namespace from the Amazon Web Services Glue Data Catalog.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { RedshiftClient, DeregisterNamespaceCommand } from "@aws-sdk/client-redshift"; // ES Modules import
* // const { RedshiftClient, DeregisterNamespaceCommand } = require("@aws-sdk/client-redshift"); // CommonJS import
* const client = new RedshiftClient(config);
* const input = { // DeregisterNamespaceInputMessage
* NamespaceIdentifier: { // NamespaceIdentifierUnion Union: only one key present
* ServerlessIdentifier: { // ServerlessIdentifier
* NamespaceIdentifier: "STRING_VALUE", // required
* WorkgroupIdentifier: "STRING_VALUE", // required
* },
* ProvisionedIdentifier: { // ProvisionedIdentifier
* ClusterIdentifier: "STRING_VALUE", // required
* },
* },
* ConsumerIdentifiers: [ // ConsumerIdentifierList // required
* "STRING_VALUE",
* ],
* };
* const command = new DeregisterNamespaceCommand(input);
* const response = await client.send(command);
* // { // DeregisterNamespaceOutputMessage
* // Status: "Registering" || "Deregistering",
* // };
*
* ```
*
* @param DeregisterNamespaceCommandInput - {@link DeregisterNamespaceCommandInput}
* @returns {@link DeregisterNamespaceCommandOutput}
* @see {@link DeregisterNamespaceCommandInput} for command's `input` shape.
* @see {@link DeregisterNamespaceCommandOutput} for command's `response` shape.
* @see {@link RedshiftClientResolvedConfig | config} for RedshiftClient's `config` shape.
*
* @throws {@link ClusterNotFoundFault} (client fault)
* <p>The <code>ClusterIdentifier</code> parameter does not refer to an existing cluster.
* </p>
*
* @throws {@link InvalidClusterStateFault} (client fault)
* <p>The specified cluster is not in the <code>available</code> state. </p>
*
* @throws {@link InvalidNamespaceFault} (client fault)
* <p>The namespace isn't valid because the namespace doesn't exist. Provide a valid namespace.</p>
*
* @throws {@link RedshiftServiceException}
* <p>Base exception class for all service exceptions from Redshift service.</p>
*
* @public
*/
export class DeregisterNamespaceCommand extends $Command
.classBuilder<
DeregisterNamespaceCommandInput,
DeregisterNamespaceCommandOutput,
RedshiftClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep(commonParams)
.m(function (this: any, Command: any, cs: any, config: RedshiftClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("RedshiftServiceVersion20121201", "DeregisterNamespace", {})
.n("RedshiftClient", "DeregisterNamespaceCommand")
.f(void 0, void 0)
.ser(se_DeregisterNamespaceCommand)
.de(de_DeregisterNamespaceCommand)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
api: {
input: DeregisterNamespaceInputMessage;
output: DeregisterNamespaceOutputMessage;
};
sdk: {
input: DeregisterNamespaceCommandInput;
output: DeregisterNamespaceCommandOutput;
};
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { AccountAttributeList, DescribeAccountAttributesMessage } from "../models/models_0";
import { AccountAttributeList } from "../models/models_0";
import { DescribeAccountAttributesMessage } from "../models/models_1";
import { de_DescribeAccountAttributesCommand, se_DescribeAccountAttributesCommand } from "../protocols/Aws_query";
import { RedshiftClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RedshiftClient";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { DescribeAuthenticationProfilesMessage, DescribeAuthenticationProfilesResult } from "../models/models_0";
import { DescribeAuthenticationProfilesMessage, DescribeAuthenticationProfilesResult } from "../models/models_1";
import {
de_DescribeAuthenticationProfilesCommand,
se_DescribeAuthenticationProfilesCommand,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { ClusterDbRevisionsMessage, DescribeClusterDbRevisionsMessage } from "../models/models_0";
import { ClusterDbRevisionsMessage } from "../models/models_0";
import { DescribeClusterDbRevisionsMessage } from "../models/models_1";
import { de_DescribeClusterDbRevisionsCommand, se_DescribeClusterDbRevisionsCommand } from "../protocols/Aws_query";
import { RedshiftClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RedshiftClient";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { ClusterParameterGroupsMessage, DescribeClusterParameterGroupsMessage } from "../models/models_0";
import { ClusterParameterGroupsMessage } from "../models/models_0";
import { DescribeClusterParameterGroupsMessage } from "../models/models_1";
import {
de_DescribeClusterParameterGroupsCommand,
se_DescribeClusterParameterGroupsCommand,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export interface DescribeDataSharesCommandOutput extends DescribeDataSharesResul
* // },
* // ],
* // ManagedBy: "STRING_VALUE",
* // DataShareType: "INTERNAL",
* // },
* // ],
* // Marker: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export interface DescribeDataSharesForConsumerCommandOutput
* // },
* // ],
* // ManagedBy: "STRING_VALUE",
* // DataShareType: "INTERNAL",
* // },
* // ],
* // Marker: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export interface DescribeDataSharesForProducerCommandOutput
* // },
* // ],
* // ManagedBy: "STRING_VALUE",
* // DataShareType: "INTERNAL",
* // },
* // ],
* // Marker: "STRING_VALUE",
Expand Down
Loading

0 comments on commit b6e41dd

Please sign in to comment.