MetricsInner Class

  • java.lang.Object
    • com.microsoft.azure.management.monitor.implementation.MetricsInner

public class MetricsInner

An instance of this class provides access to all the operations defined in Metrics.

Constructor Summary

Constructor Description
MetricsInner(Retrofit retrofit, MonitorManagementClientImpl client)

Initializes an instance of MetricsInner.

Method Summary

Modifier and Type Method and Description
ResponseInner list(String resourceUri)

**Lists the metric values for a resource**.

ResponseInner list(String resourceUri, String timespan, Period interval, String metricnames, String aggregation, Integer top, String orderby, String filter, ResultType resultType, String metricnamespace)

**Lists the metric values for a resource**.

Observable<ResponseInner> listAsync(String resourceUri)

**Lists the metric values for a resource**.

ServiceFuture<ResponseInner> listAsync(String resourceUri, final ServiceCallback<ResponseInner> serviceCallback)

**Lists the metric values for a resource**.

Observable<ResponseInner> listAsync(String resourceUri, String timespan, Period interval, String metricnames, String aggregation, Integer top, String orderby, String filter, ResultType resultType, String metricnamespace)

**Lists the metric values for a resource**.

ServiceFuture<ResponseInner> listAsync(String resourceUri, String timespan, Period interval, String metricnames, String aggregation, Integer top, String orderby, String filter, ResultType resultType, String metricnamespace, final ServiceCallback<ResponseInner> serviceCallback)

**Lists the metric values for a resource**.

Observable<ServiceResponse<ResponseInner>> listWithServiceResponseAsync(String resourceUri)

**Lists the metric values for a resource**.

Observable<ServiceResponse<ResponseInner>> listWithServiceResponseAsync(String resourceUri, String timespan, Period interval, String metricnames, String aggregation, Integer top, String orderby, String filter, ResultType resultType, String metricnamespace)

**Lists the metric values for a resource**.

Constructor Details

MetricsInner

public MetricsInner(Retrofit retrofit, MonitorManagementClientImpl client)

Initializes an instance of MetricsInner.

Parameters:

retrofit - the Retrofit instance built from a Retrofit Builder.
client - the instance of the service client containing this operation class.

Method Details

list

public ResponseInner list(String resourceUri)

**Lists the metric values for a resource**.

Parameters:

resourceUri - The identifier of the resource.

Returns:

the ResponseInner object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
ErrorResponseException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

list

public ResponseInner list(String resourceUri, String timespan, Period interval, String metricnames, String aggregation, Integer top, String orderby, String filter, ResultType resultType, String metricnamespace)

**Lists the metric values for a resource**.

Parameters:

resourceUri - The identifier of the resource.
timespan - The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'.
interval - The interval (i.e. timegrain) of the query.
metricnames - The names of the metrics (comma separated) to retrieve.
aggregation - The list of aggregation types (comma separated) to retrieve.
top - The maximum number of records to retrieve. Valid only if $filter is specified. Defaults to 10.
orderby - The aggregation to use for sorting results and the direction of the sort. Only one order can be specified. Examples: sum asc.
filter - The **$filter** is used to reduce the set of metric data returned.<br>Example:<br>Metric contains metadata A, B and C.<br>- Return all time series of C where A = a1 and B = b1 or b2<br>**$filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**<br>- Invalid variant:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**<br>This is invalid because the logical or operator cannot separate two different metadata names.<br>- Return all time series where A = a1, B = b1 and C = c1:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**<br>- Return all time series where A = a1<br>**$filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**.
resultType - Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. Possible values include: 'Data', 'Metadata'
metricnamespace - Metric namespace to query metric definitions for.

Returns:

the ResponseInner object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
ErrorResponseException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

listAsync

public Observable listAsync(String resourceUri)

**Lists the metric values for a resource**.

Parameters:

resourceUri - The identifier of the resource.

Returns:

the observable to the ResponseInner object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

listAsync

public ServiceFuture listAsync(String resourceUri, final ServiceCallback serviceCallback)

**Lists the metric values for a resource**.

Parameters:

resourceUri - The identifier of the resource.
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

listAsync

public Observable listAsync(String resourceUri, String timespan, Period interval, String metricnames, String aggregation, Integer top, String orderby, String filter, ResultType resultType, String metricnamespace)

**Lists the metric values for a resource**.

Parameters:

resourceUri - The identifier of the resource.
timespan - The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'.
interval - The interval (i.e. timegrain) of the query.
metricnames - The names of the metrics (comma separated) to retrieve.
aggregation - The list of aggregation types (comma separated) to retrieve.
top - The maximum number of records to retrieve. Valid only if $filter is specified. Defaults to 10.
orderby - The aggregation to use for sorting results and the direction of the sort. Only one order can be specified. Examples: sum asc.
filter - The **$filter** is used to reduce the set of metric data returned.<br>Example:<br>Metric contains metadata A, B and C.<br>- Return all time series of C where A = a1 and B = b1 or b2<br>**$filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**<br>- Invalid variant:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**<br>This is invalid because the logical or operator cannot separate two different metadata names.<br>- Return all time series where A = a1, B = b1 and C = c1:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**<br>- Return all time series where A = a1<br>**$filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**.
resultType - Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. Possible values include: 'Data', 'Metadata'
metricnamespace - Metric namespace to query metric definitions for.

Returns:

the observable to the ResponseInner object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

listAsync

public ServiceFuture listAsync(String resourceUri, String timespan, Period interval, String metricnames, String aggregation, Integer top, String orderby, String filter, ResultType resultType, String metricnamespace, final ServiceCallback serviceCallback)

**Lists the metric values for a resource**.

Parameters:

resourceUri - The identifier of the resource.
timespan - The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'.
interval - The interval (i.e. timegrain) of the query.
metricnames - The names of the metrics (comma separated) to retrieve.
aggregation - The list of aggregation types (comma separated) to retrieve.
top - The maximum number of records to retrieve. Valid only if $filter is specified. Defaults to 10.
orderby - The aggregation to use for sorting results and the direction of the sort. Only one order can be specified. Examples: sum asc.
filter - The **$filter** is used to reduce the set of metric data returned.<br>Example:<br>Metric contains metadata A, B and C.<br>- Return all time series of C where A = a1 and B = b1 or b2<br>**$filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**<br>- Invalid variant:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**<br>This is invalid because the logical or operator cannot separate two different metadata names.<br>- Return all time series where A = a1, B = b1 and C = c1:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**<br>- Return all time series where A = a1<br>**$filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**.
resultType - Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. Possible values include: 'Data', 'Metadata'
metricnamespace - Metric namespace to query metric definitions for.
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

listWithServiceResponseAsync

public Observable<>> listWithServiceResponseAsync(String resourceUri)

**Lists the metric values for a resource**.

Parameters:

resourceUri - The identifier of the resource.

Returns:

the observable to the ResponseInner object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

listWithServiceResponseAsync

public Observable<>> listWithServiceResponseAsync(String resourceUri, String timespan, Period interval, String metricnames, String aggregation, Integer top, String orderby, String filter, ResultType resultType, String metricnamespace)

**Lists the metric values for a resource**.

Parameters:

resourceUri - The identifier of the resource.
timespan - The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'.
interval - The interval (i.e. timegrain) of the query.
metricnames - The names of the metrics (comma separated) to retrieve.
aggregation - The list of aggregation types (comma separated) to retrieve.
top - The maximum number of records to retrieve. Valid only if $filter is specified. Defaults to 10.
orderby - The aggregation to use for sorting results and the direction of the sort. Only one order can be specified. Examples: sum asc.
filter - The **$filter** is used to reduce the set of metric data returned.<br>Example:<br>Metric contains metadata A, B and C.<br>- Return all time series of C where A = a1 and B = b1 or b2<br>**$filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**<br>- Invalid variant:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**<br>This is invalid because the logical or operator cannot separate two different metadata names.<br>- Return all time series where A = a1, B = b1 and C = c1:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**<br>- Return all time series where A = a1<br>**$filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**.
resultType - Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. Possible values include: 'Data', 'Metadata'
metricnamespace - Metric namespace to query metric definitions for.

Returns:

the observable to the ResponseInner object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

Applies to