updateViewMetadata method

Future<void> updateViewMetadata({
  1. required String instanceId,
  2. required String viewId,
  3. String? description,
  4. String? name,
})

Updates the view metadata. Note that either Name or Description must be provided.

May throw AccessDeniedException. May throw DuplicateResourceException. May throw InternalServiceException. May throw InvalidParameterException. May throw InvalidRequestException. May throw ResourceInUseException. May throw ResourceNotFoundException. May throw TooManyRequestsException.

Parameter instanceId : The identifier of the Connect Customer instance. You can find the instanceId in the ARN of the instance.

Parameter viewId : The identifier of the view. Both ViewArn and ViewId can be used.

Parameter description : The description of the view.

Parameter name : The name of the view.

Implementation

Future<void> updateViewMetadata({
  required String instanceId,
  required String viewId,
  String? description,
  String? name,
}) async {
  final $payload = <String, dynamic>{
    if (description != null) 'Description': description,
    if (name != null) 'Name': name,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/views/${Uri.encodeComponent(instanceId)}/${Uri.encodeComponent(viewId)}/metadata',
    exceptionFnMap: _exceptionFns,
  );
}