All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.resourcemanager.costmanagement.fluent.ScheduledActionsClient Maven / Gradle / Ivy

Go to download

This package contains Microsoft Azure SDK for CostManagement Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. CostManagement management client provides access to CostManagement resources for Azure Enterprise Subscriptions. Package tag package-2022-10.

The newest version!
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.costmanagement.fluent;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.resourcemanager.costmanagement.fluent.models.CheckNameAvailabilityResponseInner;
import com.azure.resourcemanager.costmanagement.fluent.models.ScheduledActionInner;
import com.azure.resourcemanager.costmanagement.models.CheckNameAvailabilityRequest;

/** An instance of this class provides access to all the operations defined in ScheduledActionsClient. */
public interface ScheduledActionsClient {
    /**
     * List all private scheduled actions.
     *
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return scheduled actions list result as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable list();

    /**
     * List all private scheduled actions.
     *
     * @param filter May be used to filter scheduled actions by properties/viewId. Supported operator is 'eq'.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return scheduled actions list result as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable list(String filter, Context context);

    /**
     * List all shared scheduled actions within the given scope.
     *
     * @param scope The scope associated with scheduled action operations. This includes
     *     'subscriptions/{subscriptionId}' for subscription scope,
     *     'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
     *     scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for
     *     EnrollmentAccount scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
     *     BillingProfile scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
     *     InvoiceSection scope,
     *     'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External
     *     Billing Account scope and
     *     'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External
     *     Subscription scope. Note: Insight Alerts are only available on subscription scope.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return scheduled actions list result as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable listByScope(String scope);

    /**
     * List all shared scheduled actions within the given scope.
     *
     * @param scope The scope associated with scheduled action operations. This includes
     *     'subscriptions/{subscriptionId}' for subscription scope,
     *     'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
     *     scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for
     *     EnrollmentAccount scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
     *     BillingProfile scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
     *     InvoiceSection scope,
     *     'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External
     *     Billing Account scope and
     *     'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External
     *     Subscription scope. Note: Insight Alerts are only available on subscription scope.
     * @param filter May be used to filter scheduled actions by properties/viewId. Supported operator is 'eq'.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return scheduled actions list result as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable listByScope(String scope, String filter, Context context);

    /**
     * Create or update a private scheduled action.
     *
     * @param name Scheduled action name.
     * @param scheduledAction Scheduled action to be created or updated.
     * @param ifMatch ETag of the Entity. Not required when creating an entity. Optional when updating an entity and can
     *     be specified to achieve optimistic concurrency.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return scheduled action definition along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response createOrUpdateWithResponse(
        String name, ScheduledActionInner scheduledAction, String ifMatch, Context context);

    /**
     * Create or update a private scheduled action.
     *
     * @param name Scheduled action name.
     * @param scheduledAction Scheduled action to be created or updated.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return scheduled action definition.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ScheduledActionInner createOrUpdate(String name, ScheduledActionInner scheduledAction);

    /**
     * Get the private scheduled action by name.
     *
     * @param name Scheduled action name.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the private scheduled action by name along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response getWithResponse(String name, Context context);

    /**
     * Get the private scheduled action by name.
     *
     * @param name Scheduled action name.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the private scheduled action by name.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ScheduledActionInner get(String name);

    /**
     * Delete a private scheduled action.
     *
     * @param name Scheduled action name.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response deleteWithResponse(String name, Context context);

    /**
     * Delete a private scheduled action.
     *
     * @param name Scheduled action name.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void delete(String name);

    /**
     * Create or update a shared scheduled action within the given scope.
     *
     * @param scope The scope associated with scheduled action operations. This includes
     *     'subscriptions/{subscriptionId}' for subscription scope,
     *     'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
     *     scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for
     *     EnrollmentAccount scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
     *     BillingProfile scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
     *     InvoiceSection scope,
     *     'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External
     *     Billing Account scope and
     *     'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External
     *     Subscription scope. Note: Insight Alerts are only available on subscription scope.
     * @param name Scheduled action name.
     * @param scheduledAction Scheduled action to be created or updated.
     * @param ifMatch ETag of the Entity. Not required when creating an entity. Optional when updating an entity and can
     *     be specified to achieve optimistic concurrency.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return scheduled action definition along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response createOrUpdateByScopeWithResponse(
        String scope, String name, ScheduledActionInner scheduledAction, String ifMatch, Context context);

    /**
     * Create or update a shared scheduled action within the given scope.
     *
     * @param scope The scope associated with scheduled action operations. This includes
     *     'subscriptions/{subscriptionId}' for subscription scope,
     *     'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
     *     scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for
     *     EnrollmentAccount scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
     *     BillingProfile scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
     *     InvoiceSection scope,
     *     'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External
     *     Billing Account scope and
     *     'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External
     *     Subscription scope. Note: Insight Alerts are only available on subscription scope.
     * @param name Scheduled action name.
     * @param scheduledAction Scheduled action to be created or updated.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return scheduled action definition.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ScheduledActionInner createOrUpdateByScope(String scope, String name, ScheduledActionInner scheduledAction);

    /**
     * Get the shared scheduled action from the given scope by name.
     *
     * @param scope The scope associated with scheduled action operations. This includes
     *     'subscriptions/{subscriptionId}' for subscription scope,
     *     'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
     *     scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for
     *     EnrollmentAccount scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
     *     BillingProfile scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
     *     InvoiceSection scope,
     *     'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External
     *     Billing Account scope and
     *     'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External
     *     Subscription scope. Note: Insight Alerts are only available on subscription scope.
     * @param name Scheduled action name.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the shared scheduled action from the given scope by name along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response getByScopeWithResponse(String scope, String name, Context context);

    /**
     * Get the shared scheduled action from the given scope by name.
     *
     * @param scope The scope associated with scheduled action operations. This includes
     *     'subscriptions/{subscriptionId}' for subscription scope,
     *     'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
     *     scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for
     *     EnrollmentAccount scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
     *     BillingProfile scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
     *     InvoiceSection scope,
     *     'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External
     *     Billing Account scope and
     *     'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External
     *     Subscription scope. Note: Insight Alerts are only available on subscription scope.
     * @param name Scheduled action name.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the shared scheduled action from the given scope by name.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ScheduledActionInner getByScope(String scope, String name);

    /**
     * Delete a scheduled action within the given scope.
     *
     * @param scope The scope associated with scheduled action operations. This includes
     *     'subscriptions/{subscriptionId}' for subscription scope,
     *     'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
     *     scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for
     *     EnrollmentAccount scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
     *     BillingProfile scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
     *     InvoiceSection scope,
     *     'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External
     *     Billing Account scope and
     *     'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External
     *     Subscription scope. Note: Insight Alerts are only available on subscription scope.
     * @param name Scheduled action name.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response deleteByScopeWithResponse(String scope, String name, Context context);

    /**
     * Delete a scheduled action within the given scope.
     *
     * @param scope The scope associated with scheduled action operations. This includes
     *     'subscriptions/{subscriptionId}' for subscription scope,
     *     'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
     *     scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for
     *     EnrollmentAccount scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
     *     BillingProfile scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
     *     InvoiceSection scope,
     *     'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External
     *     Billing Account scope and
     *     'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External
     *     Subscription scope. Note: Insight Alerts are only available on subscription scope.
     * @param name Scheduled action name.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void deleteByScope(String scope, String name);

    /**
     * Processes a private scheduled action.
     *
     * @param name Scheduled action name.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response runWithResponse(String name, Context context);

    /**
     * Processes a private scheduled action.
     *
     * @param name Scheduled action name.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void run(String name);

    /**
     * Runs a shared scheduled action within the given scope.
     *
     * @param scope The scope associated with scheduled action operations. This includes
     *     'subscriptions/{subscriptionId}' for subscription scope,
     *     'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
     *     scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for
     *     EnrollmentAccount scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
     *     BillingProfile scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
     *     InvoiceSection scope,
     *     'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External
     *     Billing Account scope and
     *     'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External
     *     Subscription scope. Note: Insight Alerts are only available on subscription scope.
     * @param name Scheduled action name.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response runByScopeWithResponse(String scope, String name, Context context);

    /**
     * Runs a shared scheduled action within the given scope.
     *
     * @param scope The scope associated with scheduled action operations. This includes
     *     'subscriptions/{subscriptionId}' for subscription scope,
     *     'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
     *     scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for
     *     EnrollmentAccount scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
     *     BillingProfile scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
     *     InvoiceSection scope,
     *     'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External
     *     Billing Account scope and
     *     'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External
     *     Subscription scope. Note: Insight Alerts are only available on subscription scope.
     * @param name Scheduled action name.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void runByScope(String scope, String name);

    /**
     * Checks availability and correctness of the name for a scheduled action.
     *
     * @param checkNameAvailabilityRequest Scheduled action to be created or updated.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the check availability result along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response checkNameAvailabilityWithResponse(
        CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context context);

    /**
     * Checks availability and correctness of the name for a scheduled action.
     *
     * @param checkNameAvailabilityRequest Scheduled action to be created or updated.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the check availability result.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    CheckNameAvailabilityResponseInner checkNameAvailability(CheckNameAvailabilityRequest checkNameAvailabilityRequest);

    /**
     * Checks availability and correctness of the name for a scheduled action within the given scope.
     *
     * @param scope The scope associated with scheduled action operations. This includes
     *     'subscriptions/{subscriptionId}' for subscription scope,
     *     'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
     *     scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for
     *     EnrollmentAccount scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
     *     BillingProfile scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
     *     InvoiceSection scope,
     *     'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External
     *     Billing Account scope and
     *     'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External
     *     Subscription scope. Note: Insight Alerts are only available on subscription scope.
     * @param checkNameAvailabilityRequest Scheduled action to be created or updated.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the check availability result along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response checkNameAvailabilityByScopeWithResponse(
        String scope, CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context context);

    /**
     * Checks availability and correctness of the name for a scheduled action within the given scope.
     *
     * @param scope The scope associated with scheduled action operations. This includes
     *     'subscriptions/{subscriptionId}' for subscription scope,
     *     'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department
     *     scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for
     *     EnrollmentAccount scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
     *     BillingProfile scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for
     *     InvoiceSection scope,
     *     'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External
     *     Billing Account scope and
     *     'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External
     *     Subscription scope. Note: Insight Alerts are only available on subscription scope.
     * @param checkNameAvailabilityRequest Scheduled action to be created or updated.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the check availability result.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    CheckNameAvailabilityResponseInner checkNameAvailabilityByScope(
        String scope, CheckNameAvailabilityRequest checkNameAvailabilityRequest);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy