Skip to main content

scheduled_actions

Creates, updates, deletes, gets or lists a scheduled_actions resource.

Overview

Namescheduled_actions
TypeResource
Idazure.cost_management.scheduled_actions

Fields

The following fields are returned by SELECT queries:

OK. The request has succeeded.

NameDatatypeDescription
eTagstringResource Etag. For update calls, eTag is optional and can be specified to achieve optimistic concurrency. Fetch the resource's eTag by doing a 'GET' call first and then including the latest eTag as part of the request body or 'If-Match' header while performing the update. For create calls, eTag is not required.
kindstringKind of the scheduled action.
propertiesobjectThe properties of the scheduled action. (title: Scheduled action properties)
systemDataobjectKind of the scheduled action.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_by_scopeselectscope, nameGet the shared scheduled action from the given scope by name.
list_by_scopeselectscope$filterList all shared scheduled actions within the given scope.
getselectnameGet the private scheduled action by name.
listselect$filterList all private scheduled actions.
create_or_updateinsertnameIf-MatchCreate or update a private scheduled action.
delete_by_scopedeletescope, nameDelete a scheduled action within the given scope.
deletedeletenameDelete a private scheduled action.
runexecnameProcesses a private scheduled action.
run_by_scopeexecscope, nameRuns a shared scheduled action within the given scope.
check_name_availabilityexecChecks availability and correctness of the name for a scheduled action.
check_name_availability_by_scopeexecscopeChecks availability and correctness of the name for a scheduled action within the given scope.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
namestringScheduled action name.
scopestringThe 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.
$filterstringMay be used to filter scheduled actions by properties/viewId. Supported operator is 'eq'.
If-MatchstringETag of the Entity. Not required when creating an entity. Optional when updating an entity and can be specified to achieve optimistic concurrency.

SELECT examples

Get the shared scheduled action from the given scope by name.

SELECT
eTag,
kind,
properties,
systemData
FROM azure.cost_management.scheduled_actions
WHERE scope = '{{ scope }}' -- required
AND name = '{{ name }}' -- required
;

INSERT examples

Create or update a private scheduled action.

INSERT INTO azure.cost_management.scheduled_actions (
data__kind,
data__properties,
name,
If-Match
)
SELECT
'{{ kind }}',
'{{ properties }}',
'{{ name }}',
'{{ If-Match }}'
RETURNING
eTag,
kind,
properties,
systemData
;

DELETE examples

Delete a scheduled action within the given scope.

DELETE FROM azure.cost_management.scheduled_actions
WHERE scope = '{{ scope }}' --required
AND name = '{{ name }}' --required
;

Lifecycle Methods

Processes a private scheduled action.

EXEC azure.cost_management.scheduled_actions.run 
@name='{{ name }}' --required
;