swapEnvironmentCNAMEs method
Swaps the CNAMEs of two environments.
Parameter destinationEnvironmentId
:
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
.
Parameter destinationEnvironmentName
:
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
.
Parameter sourceEnvironmentId
:
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
.
Parameter sourceEnvironmentName
:
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
.
Implementation
Future<void> swapEnvironmentCNAMEs({
String? destinationEnvironmentId,
String? destinationEnvironmentName,
String? sourceEnvironmentId,
String? sourceEnvironmentName,
}) async {
_s.validateStringLength(
'destinationEnvironmentName',
destinationEnvironmentName,
4,
40,
);
_s.validateStringLength(
'sourceEnvironmentName',
sourceEnvironmentName,
4,
40,
);
final $request = <String, dynamic>{};
destinationEnvironmentId
?.also((arg) => $request['DestinationEnvironmentId'] = arg);
destinationEnvironmentName
?.also((arg) => $request['DestinationEnvironmentName'] = arg);
sourceEnvironmentId?.also((arg) => $request['SourceEnvironmentId'] = arg);
sourceEnvironmentName
?.also((arg) => $request['SourceEnvironmentName'] = arg);
await _protocol.send(
$request,
action: 'SwapEnvironmentCNAMEs',
version: '2010-12-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['SwapEnvironmentCNAMEsMessage'],
shapes: shapes,
);
}