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

 Loading code editorLoading code editor

SwapEnvironmentCNAMEsCommand Input

Parameter
Type
Description
DestinationEnvironmentId
string | undefined

The ID of the destination environment.

Condition: You must specify at least the DestinationEnvironmentID or the DestinationEnvironmentName. You may also specify both. You must specify the SourceEnvironmentId with the DestinationEnvironmentId.

DestinationEnvironmentName
string | undefined

The name of the destination environment.

Condition: You must specify at least the DestinationEnvironmentID or the DestinationEnvironmentName. You may also specify both. You must specify the SourceEnvironmentName with the DestinationEnvironmentName.

SourceEnvironmentId
string | undefined

The ID of the source environment.

Condition: You must specify at least the SourceEnvironmentID or the SourceEnvironmentName. You may also specify both. If you specify the SourceEnvironmentId, you must specify the DestinationEnvironmentId.

SourceEnvironmentName
string | undefined

The name of the source environment.

Condition: You must specify at least the SourceEnvironmentID or the SourceEnvironmentName. You may also specify both. If you specify the SourceEnvironmentName, you must specify the DestinationEnvironmentName.

SwapEnvironmentCNAMEsCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
ElasticBeanstalkServiceException
Base exception class for all service exceptions from ElasticBeanstalk service.