- 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.
SwapEnvironmentCNAMEsCommand
Swaps the CNAMEs of two environments.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { ElasticBeanstalkClient, SwapEnvironmentCNAMEsCommand } from "@aws-sdk/client-elastic-beanstalk"; // ES Modules import
// const { ElasticBeanstalkClient, SwapEnvironmentCNAMEsCommand } = require("@aws-sdk/client-elastic-beanstalk"); // CommonJS import
const client = new ElasticBeanstalkClient(config);
const input = { // SwapEnvironmentCNAMEsMessage
SourceEnvironmentId: "STRING_VALUE",
SourceEnvironmentName: "STRING_VALUE",
DestinationEnvironmentId: "STRING_VALUE",
DestinationEnvironmentName: "STRING_VALUE",
};
const command = new SwapEnvironmentCNAMEsCommand(input);
const response = await client.send(command);
// {};
Example Usage
SwapEnvironmentCNAMEsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
DestinationEnvironmentId | string | undefined | The ID of the destination environment. Condition: You must specify at least the |
DestinationEnvironmentName | string | undefined | The name of the destination environment. Condition: You must specify at least the |
SourceEnvironmentId | string | undefined | The ID of the source environment. Condition: You must specify at least the |
SourceEnvironmentName | string | undefined | The name of the source environment. Condition: You must specify at least the |
SwapEnvironmentCNAMEsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ElasticBeanstalkServiceException | Base exception class for all service exceptions from ElasticBeanstalk service. |