updateFeed method

Future<UpdateFeedResponse> updateFeed({
  1. required String id,
  2. required String name,
  3. required List<UpdateOutput> outputs,
})

Updates the name and/or outputs in a feed.

UpdateFeed is a PUT operation, which means that the payload that you specify completely overwrites the existing payload.

This means that if you want to touch the array of outputs, you must pass in the full new list. So you must omit outputs you want to delete, and include outputs you want to add or modify.

If you want to patch the array of outputs to make selective additions, use AssociateFeed.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerErrorException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw TooManyRequestException. May throw ValidationException.

Parameter id : The ID of the feed to update.

Parameter name : Required. You can specify the existing name (to leave it unchanged) or a new name.

Parameter outputs : Required. You can specify the existing array of outputs (to leave outputs unchanged) or you can specify a new array.

Implementation

Future<UpdateFeedResponse> updateFeed({
  required String id,
  required String name,
  required List<UpdateOutput> outputs,
}) async {
  final $payload = <String, dynamic>{
    'name': name,
    'outputs': outputs,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/v1/feed/${Uri.encodeComponent(id)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateFeedResponse.fromJson(response);
}