GetChannelNamespaceCommand

Retrieves the channel namespace for a specified Api.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { AppSyncClient, GetChannelNamespaceCommand } from "@aws-sdk/client-appsync"; // ES Modules import
// const { AppSyncClient, GetChannelNamespaceCommand } = require("@aws-sdk/client-appsync"); // CommonJS import
const client = new AppSyncClient(config);
const input = { // GetChannelNamespaceRequest
  apiId: "STRING_VALUE", // required
  name: "STRING_VALUE", // required
};
const command = new GetChannelNamespaceCommand(input);
const response = await client.send(command);
// { // GetChannelNamespaceResponse
//   channelNamespace: { // ChannelNamespace
//     apiId: "STRING_VALUE",
//     name: "STRING_VALUE",
//     subscribeAuthModes: [ // AuthModes
//       { // AuthMode
//         authType: "API_KEY" || "AWS_IAM" || "AMAZON_COGNITO_USER_POOLS" || "OPENID_CONNECT" || "AWS_LAMBDA", // required
//       },
//     ],
//     publishAuthModes: [
//       {
//         authType: "API_KEY" || "AWS_IAM" || "AMAZON_COGNITO_USER_POOLS" || "OPENID_CONNECT" || "AWS_LAMBDA", // required
//       },
//     ],
//     codeHandlers: "STRING_VALUE",
//     tags: { // TagMap
//       "<keys>": "STRING_VALUE",
//     },
//     channelNamespaceArn: "STRING_VALUE",
//     created: new Date("TIMESTAMP"),
//     lastModified: new Date("TIMESTAMP"),
//   },
// };

GetChannelNamespaceCommand Input

See GetChannelNamespaceCommandInput for more details

Parameter
Type
Description
apiId
Required
string | undefined

The Api ID.

name
Required
string | undefined

The name of the ChannelNamespace.

GetChannelNamespaceCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
channelNamespace
ChannelNamespace | undefined

The ChannelNamespace object.

Throws

Name
Fault
Details
AccessDeniedException
client

You don't have access to perform this operation on this resource.

BadRequestException
client

The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again.

InternalFailureException
server

An internal AppSync error occurred. Try your request again.

NotFoundException
client

The resource specified in the request was not found. Check the resource, and then try again.

UnauthorizedException
client

You aren't authorized to perform this operation.

AppSyncServiceException
Base exception class for all service exceptions from AppSync service.