setStatus method
Requests that the status of the specified physical or logical pipeline
objects be updated in the specified pipeline. This update might not occur
immediately, but is eventually consistent. The status that can be set
depends on the type of object (for example, DataNode or Activity). You
cannot perform this operation on FINISHED
pipelines and
attempting to do so returns InvalidRequestException
.
May throw PipelineNotFoundException. May throw PipelineDeletedException. May throw InternalServiceError. May throw InvalidRequestException.
Parameter objectIds
:
The IDs of the objects. The corresponding objects can be either physical
or components, but not a mix of both types.
Parameter pipelineId
:
The ID of the pipeline that contains the objects.
Parameter status
:
The status to be set on all the objects specified in
objectIds
. For components, use PAUSE
or
RESUME
. For instances, use TRY_CANCEL
,
RERUN
, or MARK_FINISHED
.
Implementation
Future<void> setStatus({
required List<String> objectIds,
required String pipelineId,
required String status,
}) async {
ArgumentError.checkNotNull(objectIds, 'objectIds');
ArgumentError.checkNotNull(pipelineId, 'pipelineId');
_s.validateStringLength(
'pipelineId',
pipelineId,
1,
1024,
isRequired: true,
);
ArgumentError.checkNotNull(status, 'status');
_s.validateStringLength(
'status',
status,
0,
1024,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'DataPipeline.SetStatus'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'objectIds': objectIds,
'pipelineId': pipelineId,
'status': status,
},
);
}