startChangeSet method
This operation allows you to request changes for your entities. Within a
single ChangeSet, you cannot start the same change type against the same
entity multiple times. Additionally, when a ChangeSet is running, all the
entities targeted by the different changes are locked until the ChangeSet
has completed (either succeeded, cancelled, or failed). If you try to
start a ChangeSet containing a change against an entity that is already
locked, you will receive a ResourceInUseException
.
For example, you cannot start the ChangeSet described in the example
below because it contains two changes to execute the same change type
(AddRevisions
) against the same entity
(entity-id@1)
.
May throw InternalServiceException. May throw AccessDeniedException. May throw ValidationException. May throw ResourceNotFoundException. May throw ResourceInUseException. May throw ThrottlingException. May throw ServiceQuotaExceededException.
Parameter catalog
:
The catalog related to the request. Fixed value:
AWSMarketplace
Parameter changeSet
:
Array of change
object.
Parameter changeSetName
:
Optional case sensitive string of up to 100 ASCII characters. The change
set name can be used to filter the list of change sets.
Parameter clientRequestToken
:
A unique token to identify the request to ensure idempotency.
Implementation
Future<StartChangeSetResponse> startChangeSet({
required String catalog,
required List<Change> changeSet,
String? changeSetName,
String? clientRequestToken,
}) async {
ArgumentError.checkNotNull(catalog, 'catalog');
_s.validateStringLength(
'catalog',
catalog,
1,
64,
isRequired: true,
);
ArgumentError.checkNotNull(changeSet, 'changeSet');
_s.validateStringLength(
'changeSetName',
changeSetName,
1,
100,
);
_s.validateStringLength(
'clientRequestToken',
clientRequestToken,
1,
36,
);
final $payload = <String, dynamic>{
'Catalog': catalog,
'ChangeSet': changeSet,
if (changeSetName != null) 'ChangeSetName': changeSetName,
if (clientRequestToken != null) 'ClientRequestToken': clientRequestToken,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/StartChangeSet',
exceptionFnMap: _exceptionFns,
);
return StartChangeSetResponse.fromJson(response);
}