MetricAlertsInner Class

public class MetricAlertsInner implements InnerSupportsGet,InnerSupportsDelete,InnerSupportsListing

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

Constructor Summary

Constructor Description
MetricAlertsInner(Retrofit retrofit, MonitorManagementClientImpl client)

Initializes an instance of MetricAlertsInner.

Method Summary

Modifier and Type Method and Description
MetricAlertResourceInner createOrUpdate(String resourceGroupName, String ruleName, MetricAlertResourceInner parameters)

Create or update an metric alert definition.

Observable<MetricAlertResourceInner> createOrUpdateAsync(String resourceGroupName, String ruleName, MetricAlertResourceInner parameters)

Create or update an metric alert definition.

ServiceFuture<MetricAlertResourceInner> createOrUpdateAsync(String resourceGroupName, String ruleName, MetricAlertResourceInner parameters, final ServiceCallback<MetricAlertResourceInner> serviceCallback)

Create or update an metric alert definition.

Observable<ServiceResponse<MetricAlertResourceInner>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String ruleName, MetricAlertResourceInner parameters)

Create or update an metric alert definition.

void delete(String resourceGroupName, String ruleName)

Delete an alert rule definition.

Observable<Void> deleteAsync(String resourceGroupName, String ruleName)

Delete an alert rule definition.

ServiceFuture<Void> deleteAsync(String resourceGroupName, String ruleName, final ServiceCallback<Void> serviceCallback)

Delete an alert rule definition.

Observable<ServiceResponse<Void>> deleteWithServiceResponseAsync(String resourceGroupName, String ruleName)

Delete an alert rule definition.

MetricAlertResourceInner getByResourceGroup(String resourceGroupName, String ruleName)

Retrieve an alert rule definition.

Observable<MetricAlertResourceInner> getByResourceGroupAsync(String resourceGroupName, String ruleName)

Retrieve an alert rule definition.

ServiceFuture<MetricAlertResourceInner> getByResourceGroupAsync(String resourceGroupName, String ruleName, final ServiceCallback<MetricAlertResourceInner> serviceCallback)

Retrieve an alert rule definition.

Observable<ServiceResponse<MetricAlertResourceInner>> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String ruleName)

Retrieve an alert rule definition.

PagedList<MetricAlertResourceInner> list()

Retrieve alert rule definitions in a subscription.

Observable<Page<MetricAlertResourceInner>> listAsync()

Retrieve alert rule definitions in a subscription.

ServiceFuture<List<MetricAlertResourceInner>> listAsync(final ServiceCallback<List<MetricAlertResourceInner>> serviceCallback)

Retrieve alert rule definitions in a subscription.

PagedList<MetricAlertResourceInner> listByResourceGroup(String resourceGroupName)

Retrieve alert rule definitions in a resource group.

Observable<Page<MetricAlertResourceInner>> listByResourceGroupAsync(String resourceGroupName)

Retrieve alert rule definitions in a resource group.

ServiceFuture<List<MetricAlertResourceInner>> listByResourceGroupAsync(String resourceGroupName, final ServiceCallback<List<MetricAlertResourceInner>> serviceCallback)

Retrieve alert rule definitions in a resource group.

Observable<ServiceResponse<List<MetricAlertResourceInner>>> listByResourceGroupWithServiceResponseAsync(String resourceGroupName)

Retrieve alert rule definitions in a resource group.

Observable<ServiceResponse<List<MetricAlertResourceInner>>> listWithServiceResponseAsync()

Retrieve alert rule definitions in a subscription.

MetricAlertResourceInner update(String resourceGroupName, String ruleName, MetricAlertResourcePatch parameters)

Update an metric alert definition.

Observable<MetricAlertResourceInner> updateAsync(String resourceGroupName, String ruleName, MetricAlertResourcePatch parameters)

Update an metric alert definition.

ServiceFuture<MetricAlertResourceInner> updateAsync(String resourceGroupName, String ruleName, MetricAlertResourcePatch parameters, final ServiceCallback<MetricAlertResourceInner> serviceCallback)

Update an metric alert definition.

Observable<ServiceResponse<MetricAlertResourceInner>> updateWithServiceResponseAsync(String resourceGroupName, String ruleName, MetricAlertResourcePatch parameters)

Update an metric alert definition.

Inherited Members

Constructor Details

MetricAlertsInner

public MetricAlertsInner(Retrofit retrofit, MonitorManagementClientImpl client)

Initializes an instance of MetricAlertsInner.

Parameters:

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

Method Details

createOrUpdate

public MetricAlertResourceInner createOrUpdate(String resourceGroupName, String ruleName, MetricAlertResourceInner parameters)

Create or update an metric alert definition.

Parameters:

resourceGroupName - The name of the resource group.
ruleName - The name of the rule.
parameters - The parameters of the rule to create or update.

Returns:

the MetricAlertResourceInner 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

createOrUpdateAsync

public Observable createOrUpdateAsync(String resourceGroupName, String ruleName, MetricAlertResourceInner parameters)

Create or update an metric alert definition.

Parameters:

resourceGroupName - The name of the resource group.
ruleName - The name of the rule.
parameters - The parameters of the rule to create or update.

Returns:

the observable to the MetricAlertResourceInner object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

createOrUpdateAsync

public ServiceFuture createOrUpdateAsync(String resourceGroupName, String ruleName, MetricAlertResourceInner parameters, final ServiceCallback serviceCallback)

Create or update an metric alert definition.

Parameters:

resourceGroupName - The name of the resource group.
ruleName - The name of the rule.
parameters - The parameters of the rule to create or update.
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

createOrUpdateWithServiceResponseAsync

public Observable<>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String ruleName, MetricAlertResourceInner parameters)

Create or update an metric alert definition.

Parameters:

resourceGroupName - The name of the resource group.
ruleName - The name of the rule.
parameters - The parameters of the rule to create or update.

Returns:

the observable to the MetricAlertResourceInner object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

delete

public void delete(String resourceGroupName, String ruleName)

Delete an alert rule definition.

Parameters:

resourceGroupName - The name of the resource group.
ruleName - The name of the rule.

Throws:

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

deleteAsync

public Observable deleteAsync(String resourceGroupName, String ruleName)

Delete an alert rule definition.

Overrides:

MetricAlertsInner.deleteAsync(String resourceGroupName, String ruleName)

Parameters:

resourceGroupName - The name of the resource group.
ruleName - The name of the rule.

Returns:

the ServiceResponse object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

deleteAsync

public ServiceFuture deleteAsync(String resourceGroupName, String ruleName, final ServiceCallback serviceCallback)

Delete an alert rule definition.

Parameters:

resourceGroupName - The name of the resource group.
ruleName - The name of the rule.
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

deleteWithServiceResponseAsync

public Observable<>> deleteWithServiceResponseAsync(String resourceGroupName, String ruleName)

Delete an alert rule definition.

Parameters:

resourceGroupName - The name of the resource group.
ruleName - The name of the rule.

Returns:

the ServiceResponse object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

getByResourceGroup

public MetricAlertResourceInner getByResourceGroup(String resourceGroupName, String ruleName)

Retrieve an alert rule definition.

Overrides:

MetricAlertsInner.getByResourceGroup(String resourceGroupName, String ruleName)

Parameters:

resourceGroupName - The name of the resource group.
ruleName - The name of the rule.

Returns:

the MetricAlertResourceInner 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

getByResourceGroupAsync

public Observable getByResourceGroupAsync(String resourceGroupName, String ruleName)

Retrieve an alert rule definition.

Overrides:

MetricAlertsInner.getByResourceGroupAsync(String resourceGroupName, String ruleName)

Parameters:

resourceGroupName - The name of the resource group.
ruleName - The name of the rule.

Returns:

the observable to the MetricAlertResourceInner object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

getByResourceGroupAsync

public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String ruleName, final ServiceCallback serviceCallback)

Retrieve an alert rule definition.

Parameters:

resourceGroupName - The name of the resource group.
ruleName - The name of the rule.
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

getByResourceGroupWithServiceResponseAsync

public Observable<>> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String ruleName)

Retrieve an alert rule definition.

Parameters:

resourceGroupName - The name of the resource group.
ruleName - The name of the rule.

Returns:

the observable to the MetricAlertResourceInner object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

list

public PagedList list()

Retrieve alert rule definitions in a subscription.

Overrides:

MetricAlertsInner.list()

Returns:

the PagedList<MetricAlertResourceInner> object if successful.

listAsync

public Observable<>> listAsync()

Retrieve alert rule definitions in a subscription.

Overrides:

MetricAlertsInner.listAsync()

Returns:

the observable to the List<MetricAlertResourceInner> object

listAsync

public ServiceFuture<>> listAsync(final ServiceCallback<>> serviceCallback)

Retrieve alert rule definitions in a subscription.

Parameters:

serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

listByResourceGroup

public PagedList listByResourceGroup(String resourceGroupName)

Retrieve alert rule definitions in a resource group.

Overrides:

MetricAlertsInner.listByResourceGroup(String resourceGroupName)

Parameters:

resourceGroupName - The name of the resource group.

Returns:

the PagedList<MetricAlertResourceInner> object if successful.

listByResourceGroupAsync

public Observable<>> listByResourceGroupAsync(String resourceGroupName)

Retrieve alert rule definitions in a resource group.

Overrides:

MetricAlertsInner.listByResourceGroupAsync(String resourceGroupName)

Parameters:

resourceGroupName - The name of the resource group.

Returns:

the observable to the List<MetricAlertResourceInner> object

listByResourceGroupAsync

public ServiceFuture<>> listByResourceGroupAsync(String resourceGroupName, final ServiceCallback<>> serviceCallback)

Retrieve alert rule definitions in a resource group.

Parameters:

resourceGroupName - The name of the resource group.
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

listByResourceGroupWithServiceResponseAsync

public Observable<><>>> listByResourceGroupWithServiceResponseAsync(String resourceGroupName)

Retrieve alert rule definitions in a resource group.

Parameters:

resourceGroupName - The name of the resource group.

Returns:

the observable to the List<MetricAlertResourceInner> object

listWithServiceResponseAsync

public Observable<><>>> listWithServiceResponseAsync()

Retrieve alert rule definitions in a subscription.

Returns:

the observable to the List<MetricAlertResourceInner> object

update

public MetricAlertResourceInner update(String resourceGroupName, String ruleName, MetricAlertResourcePatch parameters)

Update an metric alert definition.

Parameters:

resourceGroupName - The name of the resource group.
ruleName - The name of the rule.
parameters - The parameters of the rule to update.

Returns:

the MetricAlertResourceInner 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

updateAsync

public Observable updateAsync(String resourceGroupName, String ruleName, MetricAlertResourcePatch parameters)

Update an metric alert definition.

Parameters:

resourceGroupName - The name of the resource group.
ruleName - The name of the rule.
parameters - The parameters of the rule to update.

Returns:

the observable to the MetricAlertResourceInner object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

updateAsync

public ServiceFuture updateAsync(String resourceGroupName, String ruleName, MetricAlertResourcePatch parameters, final ServiceCallback serviceCallback)

Update an metric alert definition.

Parameters:

resourceGroupName - The name of the resource group.
ruleName - The name of the rule.
parameters - The parameters of the rule to update.
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

updateWithServiceResponseAsync

public Observable<>> updateWithServiceResponseAsync(String resourceGroupName, String ruleName, MetricAlertResourcePatch parameters)

Update an metric alert definition.

Parameters:

resourceGroupName - The name of the resource group.
ruleName - The name of the rule.
parameters - The parameters of the rule to update.

Returns:

the observable to the MetricAlertResourceInner object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

Applies to