MetricsServiceV2

google.logging.v2. MetricsServiceV2

Represents a MetricsServiceV2

Constructor

new MetricsServiceV2(rpcImpl, requestDelimitedopt, responseDelimitedopt)

Constructs a new MetricsServiceV2 service.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

Extends

  • $protobuf.rpc.Service

Methods

createLogMetric(request, callback) → {undefined}

Calls CreateLogMetric.

Parameters:
Name Type Description
request google.logging.v2.ICreateLogMetricRequest

CreateLogMetricRequest message or plain object

callback google.logging.v2.MetricsServiceV2.CreateLogMetricCallback

Node-style callback called with the error, if any, and LogMetric

Returns:
Type Description
undefined

createLogMetric(request) → {Promise.<google.logging.v2.LogMetric>}

Calls CreateLogMetric.

Parameters:
Name Type Description
request google.logging.v2.ICreateLogMetricRequest

CreateLogMetricRequest message or plain object

Returns:
Type Description
Promise.<google.logging.v2.LogMetric>

Promise

deleteLogMetric(request, callback) → {undefined}

Calls DeleteLogMetric.

Parameters:
Name Type Description
request google.logging.v2.IDeleteLogMetricRequest

DeleteLogMetricRequest message or plain object

callback google.logging.v2.MetricsServiceV2.DeleteLogMetricCallback

Node-style callback called with the error, if any, and Empty

Returns:
Type Description
undefined

deleteLogMetric(request) → {Promise.<google.protobuf.Empty>}

Calls DeleteLogMetric.

Parameters:
Name Type Description
request google.logging.v2.IDeleteLogMetricRequest

DeleteLogMetricRequest message or plain object

Returns:
Type Description
Promise.<google.protobuf.Empty>

Promise

getLogMetric(request, callback) → {undefined}

Calls GetLogMetric.

Parameters:
Name Type Description
request google.logging.v2.IGetLogMetricRequest

GetLogMetricRequest message or plain object

callback google.logging.v2.MetricsServiceV2.GetLogMetricCallback

Node-style callback called with the error, if any, and LogMetric

Returns:
Type Description
undefined

getLogMetric(request) → {Promise.<google.logging.v2.LogMetric>}

Calls GetLogMetric.

Parameters:
Name Type Description
request google.logging.v2.IGetLogMetricRequest

GetLogMetricRequest message or plain object

Returns:
Type Description
Promise.<google.logging.v2.LogMetric>

Promise

listLogMetrics(request, callback) → {undefined}

Calls ListLogMetrics.

Parameters:
Name Type Description
request google.logging.v2.IListLogMetricsRequest

ListLogMetricsRequest message or plain object

callback google.logging.v2.MetricsServiceV2.ListLogMetricsCallback

Node-style callback called with the error, if any, and ListLogMetricsResponse

Returns:
Type Description
undefined

listLogMetrics(request) → {Promise.<google.logging.v2.ListLogMetricsResponse>}

Calls ListLogMetrics.

Parameters:
Name Type Description
request google.logging.v2.IListLogMetricsRequest

ListLogMetricsRequest message or plain object

Returns:
Type Description
Promise.<google.logging.v2.ListLogMetricsResponse>

Promise

updateLogMetric(request, callback) → {undefined}

Calls UpdateLogMetric.

Parameters:
Name Type Description
request google.logging.v2.IUpdateLogMetricRequest

UpdateLogMetricRequest message or plain object

callback google.logging.v2.MetricsServiceV2.UpdateLogMetricCallback

Node-style callback called with the error, if any, and LogMetric

Returns:
Type Description
undefined

updateLogMetric(request) → {Promise.<google.logging.v2.LogMetric>}

Calls UpdateLogMetric.

Parameters:
Name Type Description
request google.logging.v2.IUpdateLogMetricRequest

UpdateLogMetricRequest message or plain object

Returns:
Type Description
Promise.<google.logging.v2.LogMetric>

Promise

(static) create(rpcImpl, requestDelimitedopt, responseDelimitedopt) → {MetricsServiceV2}

Creates new MetricsServiceV2 service using the specified rpc implementation.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

Returns:
Type Description
MetricsServiceV2

RPC service. Useful where requests and/or responses are streamed.

Type Definitions

CreateLogMetricCallback(error, responseopt)

Callback as used by createLogMetric.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.logging.v2.LogMetric <optional>

LogMetric

DeleteLogMetricCallback(error, responseopt)

Callback as used by deleteLogMetric.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.protobuf.Empty <optional>

Empty

GetLogMetricCallback(error, responseopt)

Callback as used by getLogMetric.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.logging.v2.LogMetric <optional>

LogMetric

ListLogMetricsCallback(error, responseopt)

Callback as used by listLogMetrics.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.logging.v2.ListLogMetricsResponse <optional>

ListLogMetricsResponse

UpdateLogMetricCallback(error, responseopt)

Callback as used by updateLogMetric.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.logging.v2.LogMetric <optional>

LogMetric