ElasticBeanstalk / Client / swap_environment_cnames

swap_environment_cnames#

ElasticBeanstalk.Client.swap_environment_cnames(**kwargs)#

Swaps the CNAMEs of two environments.

See also: AWS API Documentation

Request Syntax

response = client.swap_environment_cnames(
    SourceEnvironmentId='string',
    SourceEnvironmentName='string',
    DestinationEnvironmentId='string',
    DestinationEnvironmentName='string'
)
Parameters:
  • SourceEnvironmentId (string) –

    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) –

    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.

  • DestinationEnvironmentId (string) –

    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) –

    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.

Returns:

None

Examples

The following operation swaps the assigned subdomains of two environments:

response = client.swap_environment_cnames(
    DestinationEnvironmentName='my-env-green',
    SourceEnvironmentName='my-env-blue',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}