public MetricDefinitionsInner(Retrofit retrofit, MonitorManagementClientImpl client)
Initializes an instance of MetricDefinitionsInner.
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 List list(String resourceUri)
Lists the metric definitions for the resource.
Parameters:
resourceUri
- The identifier of the resource.
Returns:
the List<MetricDefinitionInner> 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 List list(String resourceUri, String metricnamespace)
Lists the metric definitions for the resource.
Parameters:
resourceUri
- The identifier of the resource.
metricnamespace
- Metric namespace to query metric definitions for.
Returns:
the List<MetricDefinitionInner> 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 definitions for the resource.
Parameters:
resourceUri
- The identifier of the resource.
Returns:
the observable to the List<MetricDefinitionInner> object
Throws:
IllegalArgumentException
- thrown if parameters fail the validation
listAsync
public ServiceFuture<>> listAsync(String resourceUri, final ServiceCallback<>> serviceCallback)
Lists the metric definitions for the 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 metricnamespace)
Lists the metric definitions for the resource.
Parameters:
resourceUri
- The identifier of the resource.
metricnamespace
- Metric namespace to query metric definitions for.
Returns:
the observable to the List<MetricDefinitionInner> object
Throws:
IllegalArgumentException
- thrown if parameters fail the validation
listAsync
public ServiceFuture<>> listAsync(String resourceUri, String metricnamespace, final ServiceCallback<>> serviceCallback)
Lists the metric definitions for the resource.
Parameters:
resourceUri
- The identifier of the resource.
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 definitions for the resource.
Parameters:
resourceUri
- The identifier of the resource.
Returns:
the observable to the List<MetricDefinitionInner> object
Throws:
IllegalArgumentException
- thrown if parameters fail the validation
listWithServiceResponseAsync
public Observable<><>>> listWithServiceResponseAsync(String resourceUri, String metricnamespace)
Lists the metric definitions for the resource.
Parameters:
resourceUri
- The identifier of the resource.
metricnamespace
- Metric namespace to query metric definitions for.
Returns:
the observable to the List<MetricDefinitionInner> object
Throws:
IllegalArgumentException
- thrown if parameters fail the validation
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see: https://aka.ms/ContentUserFeedback.