restartChannelPipelines method

Future<RestartChannelPipelinesResponse> restartChannelPipelines({
  1. required String channelId,
  2. List<ChannelPipelineIdToRestart>? pipelineIds,
})

Restart pipelines in one channel that is currently running.

May throw BadGatewayException. May throw BadRequestException. May throw ConflictException. May throw ForbiddenException. May throw GatewayTimeoutException. May throw InternalServerErrorException. May throw NotFoundException. May throw TooManyRequestsException.

Parameter channelId : ID of channel

Parameter pipelineIds : An array of pipelines to restart in this channel. Format PIPELINE_0 or PIPELINE_1.

Implementation

Future<RestartChannelPipelinesResponse> restartChannelPipelines({
  required String channelId,
  List<ChannelPipelineIdToRestart>? pipelineIds,
}) async {
  final $payload = <String, dynamic>{
    if (pipelineIds != null)
      'pipelineIds': pipelineIds.map((e) => e.value).toList(),
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/prod/channels/${Uri.encodeComponent(channelId)}/restartChannelPipelines',
    exceptionFnMap: _exceptionFns,
  );
  return RestartChannelPipelinesResponse.fromJson(response);
}