deleteVirtualNode method

Future<DeleteVirtualNodeOutput> deleteVirtualNode({
  1. required String meshName,
  2. required String virtualNodeName,
})

Deletes an existing virtual node.

May throw BadRequestException. May throw ForbiddenException. May throw InternalServerErrorException. May throw NotFoundException. May throw ResourceInUseException. May throw ServiceUnavailableException. May throw TooManyRequestsException.

Parameter meshName : The name of the service mesh in which to delete the virtual node.

Parameter virtualNodeName : The name of the virtual node to delete.

Implementation

Future<DeleteVirtualNodeOutput> deleteVirtualNode({
  required String meshName,
  required String virtualNodeName,
}) async {
  ArgumentError.checkNotNull(meshName, 'meshName');
  _s.validateStringLength(
    'meshName',
    meshName,
    1,
    255,
    isRequired: true,
  );
  ArgumentError.checkNotNull(virtualNodeName, 'virtualNodeName');
  _s.validateStringLength(
    'virtualNodeName',
    virtualNodeName,
    1,
    255,
    isRequired: true,
  );
  final response = await _protocol.sendRaw(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/meshes/${Uri.encodeComponent(meshName)}/virtualNodes/${Uri.encodeComponent(virtualNodeName)}',
    exceptionFnMap: _exceptionFns,
  );
  final $json = await _s.jsonFromResponse(response);
  return DeleteVirtualNodeOutput(
    virtualNode: VirtualNodeData.fromJson($json),
  );
}