Interface MetricAlertsClient

    • Method Detail

      • listAsync

        com.azure.core.http.rest.PagedFlux<MetricAlertResourceInner> listAsync()
        Retrieve alert rule definitions in a subscription.
        Specified by:
        listAsync in interface InnerSupportsListing<MetricAlertResourceInner>
        Returns:
        represents a collection of alert rule resources.
        Throws:
        com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • list

        com.azure.core.http.rest.PagedIterable<MetricAlertResourceInner> list()
        Retrieve alert rule definitions in a subscription.
        Specified by:
        list in interface InnerSupportsListing<MetricAlertResourceInner>
        Returns:
        represents a collection of alert rule resources.
        Throws:
        com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • list

        com.azure.core.http.rest.PagedIterable<MetricAlertResourceInner> list​(com.azure.core.util.Context context)
        Retrieve alert rule definitions in a subscription.
        Parameters:
        context - The context to associate with this operation.
        Returns:
        represents a collection of alert rule resources.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • listByResourceGroup

        com.azure.core.http.rest.PagedIterable<MetricAlertResourceInner> listByResourceGroup​(String resourceGroupName)
        Retrieve alert rule definitions in a resource group.
        Specified by:
        listByResourceGroup in interface InnerSupportsListing<MetricAlertResourceInner>
        Parameters:
        resourceGroupName - The name of the resource group.
        Returns:
        represents a collection of alert rule resources.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • listByResourceGroup

        com.azure.core.http.rest.PagedIterable<MetricAlertResourceInner> listByResourceGroup​(String resourceGroupName,
                                                                                             com.azure.core.util.Context context)
        Retrieve alert rule definitions in a resource group.
        Parameters:
        resourceGroupName - The name of the resource group.
        context - The context to associate with this operation.
        Returns:
        represents a collection of alert rule resources.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • getByResourceGroupWithResponseAsync

        Mono<com.azure.core.http.rest.Response<MetricAlertResourceInner>> getByResourceGroupWithResponseAsync​(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 metric alert resource.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • getByResourceGroupWithResponse

        com.azure.core.http.rest.Response<MetricAlertResourceInner> getByResourceGroupWithResponse​(String resourceGroupName,
                                                                                                   String ruleName,
                                                                                                   com.azure.core.util.Context context)
        Retrieve an alert rule definition.
        Parameters:
        resourceGroupName - The name of the resource group.
        ruleName - The name of the rule.
        context - The context to associate with this operation.
        Returns:
        the metric alert resource.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • createOrUpdateWithResponseAsync

        Mono<com.azure.core.http.rest.Response<MetricAlertResourceInner>> createOrUpdateWithResponseAsync​(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 metric alert resource.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • createOrUpdateAsync

        Mono<MetricAlertResourceInner> 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 metric alert resource.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • createOrUpdate

        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 metric alert resource.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • createOrUpdateWithResponse

        com.azure.core.http.rest.Response<MetricAlertResourceInner> createOrUpdateWithResponse​(String resourceGroupName,
                                                                                               String ruleName,
                                                                                               MetricAlertResourceInner parameters,
                                                                                               com.azure.core.util.Context context)
        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.
        context - The context to associate with this operation.
        Returns:
        the metric alert resource.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • updateWithResponseAsync

        Mono<com.azure.core.http.rest.Response<MetricAlertResourceInner>> updateWithResponseAsync​(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 metric alert resource.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • updateAsync

        Mono<MetricAlertResourceInner> 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 metric alert resource.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • update

        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 metric alert resource.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • updateWithResponse

        com.azure.core.http.rest.Response<MetricAlertResourceInner> updateWithResponse​(String resourceGroupName,
                                                                                       String ruleName,
                                                                                       MetricAlertResourcePatch parameters,
                                                                                       com.azure.core.util.Context context)
        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.
        context - The context to associate with this operation.
        Returns:
        the metric alert resource.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • deleteWithResponseAsync

        Mono<com.azure.core.http.rest.Response<Void>> deleteWithResponseAsync​(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 completion.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • deleteAsync

        Mono<Void> deleteAsync​(String resourceGroupName,
                               String ruleName)
        Delete an alert rule definition.
        Specified by:
        deleteAsync in interface InnerSupportsDelete<Void>
        Parameters:
        resourceGroupName - The name of the resource group.
        ruleName - The name of the rule.
        Returns:
        the completion.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • delete

        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.
        com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • deleteWithResponse

        com.azure.core.http.rest.Response<Void> deleteWithResponse​(String resourceGroupName,
                                                                   String ruleName,
                                                                   com.azure.core.util.Context context)
        Delete an alert rule definition.
        Parameters:
        resourceGroupName - The name of the resource group.
        ruleName - The name of the rule.
        context - The context to associate with this operation.
        Returns:
        the response.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.