|
| 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 { KeyspacesClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../KeyspacesClient"; |
| 9 | +import { UpdateKeyspaceRequest, UpdateKeyspaceResponse } from "../models/models_0"; |
| 10 | +import { de_UpdateKeyspaceCommand, se_UpdateKeyspaceCommand } from "../protocols/Aws_json1_0"; |
| 11 | + |
| 12 | +/** |
| 13 | + * @public |
| 14 | + */ |
| 15 | +export type { __MetadataBearer }; |
| 16 | +export { $Command }; |
| 17 | +/** |
| 18 | + * @public |
| 19 | + * |
| 20 | + * The input for {@link UpdateKeyspaceCommand}. |
| 21 | + */ |
| 22 | +export interface UpdateKeyspaceCommandInput extends UpdateKeyspaceRequest {} |
| 23 | +/** |
| 24 | + * @public |
| 25 | + * |
| 26 | + * The output of {@link UpdateKeyspaceCommand}. |
| 27 | + */ |
| 28 | +export interface UpdateKeyspaceCommandOutput extends UpdateKeyspaceResponse, __MetadataBearer {} |
| 29 | + |
| 30 | +/** |
| 31 | + * <p> |
| 32 | + * Adds a new Amazon Web Services Region to the keyspace. You can add a new Region to a keyspace that is either a single or a multi-Region keyspace. |
| 33 | + * The new replica Region is applied to all tables in the keyspace. For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/keyspaces-multi-region-add-replica.html">Add an Amazon Web Services Region to a keyspace in Amazon Keyspaces</a> in the <i>Amazon Keyspaces Developer |
| 34 | + * Guide</i>. |
| 35 | + * </p> |
| 36 | + * <p>To change a single-Region to a multi-Region keyspace, you have to enable client-side timestamps |
| 37 | + * for all tables in the keyspace. For more information, see |
| 38 | + * <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/client-side-timestamps.html">Client-side timestamps in Amazon Keyspaces</a> in the <i>Amazon Keyspaces Developer |
| 39 | + * Guide</i>.</p> |
| 40 | + * @example |
| 41 | + * Use a bare-bones client and the command you need to make an API call. |
| 42 | + * ```javascript |
| 43 | + * import { KeyspacesClient, UpdateKeyspaceCommand } from "@aws-sdk/client-keyspaces"; // ES Modules import |
| 44 | + * // const { KeyspacesClient, UpdateKeyspaceCommand } = require("@aws-sdk/client-keyspaces"); // CommonJS import |
| 45 | + * const client = new KeyspacesClient(config); |
| 46 | + * const input = { // UpdateKeyspaceRequest |
| 47 | + * keyspaceName: "STRING_VALUE", // required |
| 48 | + * replicationSpecification: { // ReplicationSpecification |
| 49 | + * replicationStrategy: "STRING_VALUE", // required |
| 50 | + * regionList: [ // RegionList |
| 51 | + * "STRING_VALUE", |
| 52 | + * ], |
| 53 | + * }, |
| 54 | + * clientSideTimestamps: { // ClientSideTimestamps |
| 55 | + * status: "STRING_VALUE", // required |
| 56 | + * }, |
| 57 | + * }; |
| 58 | + * const command = new UpdateKeyspaceCommand(input); |
| 59 | + * const response = await client.send(command); |
| 60 | + * // { // UpdateKeyspaceResponse |
| 61 | + * // resourceArn: "STRING_VALUE", // required |
| 62 | + * // }; |
| 63 | + * |
| 64 | + * ``` |
| 65 | + * |
| 66 | + * @param UpdateKeyspaceCommandInput - {@link UpdateKeyspaceCommandInput} |
| 67 | + * @returns {@link UpdateKeyspaceCommandOutput} |
| 68 | + * @see {@link UpdateKeyspaceCommandInput} for command's `input` shape. |
| 69 | + * @see {@link UpdateKeyspaceCommandOutput} for command's `response` shape. |
| 70 | + * @see {@link KeyspacesClientResolvedConfig | config} for KeyspacesClient's `config` shape. |
| 71 | + * |
| 72 | + * @throws {@link AccessDeniedException} (client fault) |
| 73 | + * <p>You don't have sufficient access permissions to perform this action. </p> |
| 74 | + * |
| 75 | + * @throws {@link ConflictException} (client fault) |
| 76 | + * <p>Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to |
| 77 | + * perform an action and the same or a different action is already |
| 78 | + * in progress, or if you try to create a resource that already exists. </p> |
| 79 | + * |
| 80 | + * @throws {@link InternalServerException} (server fault) |
| 81 | + * <p>Amazon Keyspaces was unable to fully process this request because of an internal server error.</p> |
| 82 | + * |
| 83 | + * @throws {@link ResourceNotFoundException} (client fault) |
| 84 | + * <p>The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, |
| 85 | + * or its status might not be <code>ACTIVE</code>.</p> |
| 86 | + * |
| 87 | + * @throws {@link ServiceQuotaExceededException} (client fault) |
| 88 | + * <p>The operation exceeded the service quota for this resource. For more information on service quotas, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html">Quotas</a> in the <i>Amazon Keyspaces Developer |
| 89 | + * Guide</i>.</p> |
| 90 | + * |
| 91 | + * @throws {@link ValidationException} (client fault) |
| 92 | + * <p>The operation failed due to an invalid or malformed request.</p> |
| 93 | + * |
| 94 | + * @throws {@link KeyspacesServiceException} |
| 95 | + * <p>Base exception class for all service exceptions from Keyspaces service.</p> |
| 96 | + * |
| 97 | + * @public |
| 98 | + */ |
| 99 | +export class UpdateKeyspaceCommand extends $Command |
| 100 | + .classBuilder< |
| 101 | + UpdateKeyspaceCommandInput, |
| 102 | + UpdateKeyspaceCommandOutput, |
| 103 | + KeyspacesClientResolvedConfig, |
| 104 | + ServiceInputTypes, |
| 105 | + ServiceOutputTypes |
| 106 | + >() |
| 107 | + .ep(commonParams) |
| 108 | + .m(function (this: any, Command: any, cs: any, config: KeyspacesClientResolvedConfig, o: any) { |
| 109 | + return [ |
| 110 | + getSerdePlugin(config, this.serialize, this.deserialize), |
| 111 | + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), |
| 112 | + ]; |
| 113 | + }) |
| 114 | + .s("KeyspacesService", "UpdateKeyspace", {}) |
| 115 | + .n("KeyspacesClient", "UpdateKeyspaceCommand") |
| 116 | + .f(void 0, void 0) |
| 117 | + .ser(se_UpdateKeyspaceCommand) |
| 118 | + .de(de_UpdateKeyspaceCommand) |
| 119 | + .build() { |
| 120 | + /** @internal type navigation helper, not in runtime. */ |
| 121 | + protected declare static __types: { |
| 122 | + api: { |
| 123 | + input: UpdateKeyspaceRequest; |
| 124 | + output: UpdateKeyspaceResponse; |
| 125 | + }; |
| 126 | + sdk: { |
| 127 | + input: UpdateKeyspaceCommandInput; |
| 128 | + output: UpdateKeyspaceCommandOutput; |
| 129 | + }; |
| 130 | + }; |
| 131 | +} |
0 commit comments