- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
GetKeyspaceCommand
Returns the name of the specified keyspace, the Amazon Resource Name (ARN), the replication strategy, the Amazon Web Services Regions of a multi-Region keyspace, and the status of newly added Regions after an UpdateKeyspace
operation.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { KeyspacesClient, GetKeyspaceCommand } from "@aws-sdk/client-keyspaces"; // ES Modules import
// const { KeyspacesClient, GetKeyspaceCommand } = require("@aws-sdk/client-keyspaces"); // CommonJS import
const client = new KeyspacesClient(config);
const input = { // GetKeyspaceRequest
keyspaceName: "STRING_VALUE", // required
};
const command = new GetKeyspaceCommand(input);
const response = await client.send(command);
// { // GetKeyspaceResponse
// keyspaceName: "STRING_VALUE", // required
// resourceArn: "STRING_VALUE", // required
// replicationStrategy: "STRING_VALUE", // required
// replicationRegions: [ // RegionList
// "STRING_VALUE",
// ],
// replicationGroupStatuses: [ // ReplicationGroupStatusList
// { // ReplicationGroupStatus
// region: "STRING_VALUE", // required
// keyspaceStatus: "STRING_VALUE", // required
// tablesReplicationProgress: "STRING_VALUE",
// },
// ],
// };
GetKeyspaceCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
keyspaceName Required | string | undefined | The name of the keyspace. |
GetKeyspaceCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
keyspaceName Required | string | undefined | The name of the keyspace. |
replicationStrategy Required | Rs | undefined | Returns the replication strategy of the keyspace. The options are |
resourceArn Required | string | undefined | Returns the ARN of the keyspace. |
replicationGroupStatuses | ReplicationGroupStatus[] | undefined | A list of all Regions the keyspace is replicated in after the update keyspace operation and their status. |
replicationRegions | string[] | undefined | If the |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | You don't have sufficient access permissions to perform this action. |
InternalServerException | server | Amazon Keyspaces was unable to fully process this request because of an internal server error. |
ResourceNotFoundException | client | The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, or its status might not be |
ServiceQuotaExceededException | client | The operation exceeded the service quota for this resource. For more information on service quotas, see Quotas in the Amazon Keyspaces Developer Guide. |
ValidationException | client | The operation failed due to an invalid or malformed request. |
KeyspacesServiceException | Base exception class for all service exceptions from Keyspaces service. |