scheduled_actions
Creates, updates, deletes, gets or lists a scheduled_actions
resource.
Overview
Name | scheduled_actions |
Type | Resource |
Id | azure.cost_management.scheduled_actions |
Fields
The following fields are returned by SELECT
queries:
- get_by_scope
- list_by_scope
- get
- list
OK. The request has succeeded.
Name | Datatype | Description |
---|---|---|
eTag | string | Resource 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. |
kind | string | Kind of the scheduled action. |
properties | object | The properties of the scheduled action. (title: Scheduled action properties) |
systemData | object | Kind of the scheduled action. |
OK. The request has succeeded.
Name | Datatype | Description |
---|---|---|
eTag | string | Resource 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. |
kind | string | Kind of the scheduled action. |
properties | object | The properties of the scheduled action. (title: Scheduled action properties) |
systemData | object | Kind of the scheduled action. |
OK. The request has succeeded.
Name | Datatype | Description |
---|---|---|
eTag | string | Resource 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. |
kind | string | Kind of the scheduled action. |
properties | object | The properties of the scheduled action. (title: Scheduled action properties) |
systemData | object | Kind of the scheduled action. |
OK. The request has succeeded.
Name | Datatype | Description |
---|---|---|
eTag | string | Resource 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. |
kind | string | Kind of the scheduled action. |
properties | object | The properties of the scheduled action. (title: Scheduled action properties) |
systemData | object | Kind of the scheduled action. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get_by_scope | select | scope , name | Get the shared scheduled action from the given scope by name. | |
list_by_scope | select | scope | $filter | List all shared scheduled actions within the given scope. |
get | select | name | Get the private scheduled action by name. | |
list | select | $filter | List all private scheduled actions. | |
create_or_update | insert | name | If-Match | Create or update a private scheduled action. |
delete_by_scope | delete | scope , name | Delete a scheduled action within the given scope. | |
delete | delete | name | Delete a private scheduled action. | |
run | exec | name | Processes a private scheduled action. | |
run_by_scope | exec | scope , name | Runs a shared scheduled action within the given scope. | |
check_name_availability | exec | Checks availability and correctness of the name for a scheduled action. | ||
check_name_availability_by_scope | exec | scope | Checks 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.
Name | Datatype | Description |
---|---|---|
name | string | Scheduled action name. |
scope | string | 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. |
$filter | string | May be used to filter scheduled actions by properties/viewId. Supported operator is 'eq'. |
If-Match | string | ETag 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_by_scope
- list_by_scope
- get
- list
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
;
List all shared scheduled actions within the given scope.
SELECT
eTag,
kind,
properties,
systemData
FROM azure.cost_management.scheduled_actions
WHERE scope = '{{ scope }}' -- required
AND $filter = '{{ $filter }}'
;
Get the private scheduled action by name.
SELECT
eTag,
kind,
properties,
systemData
FROM azure.cost_management.scheduled_actions
WHERE name = '{{ name }}' -- required
;
List all private scheduled actions.
SELECT
eTag,
kind,
properties,
systemData
FROM azure.cost_management.scheduled_actions
WHERE $filter = '{{ $filter }}'
;
INSERT
examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: scheduled_actions
props:
- name: name
value: string
description: Required parameter for the scheduled_actions resource.
- name: kind
value: string
description: |
Kind of the scheduled action.
valid_values: ['Email', 'InsightAlert']
- name: properties
value: object
description: |
The properties of the scheduled action.
- name: If-Match
value: string
description: ETag of the Entity. Not required when creating an entity. Optional when updating an entity and can be specified to achieve optimistic concurrency.
DELETE
examples
- delete_by_scope
- delete
Delete a scheduled action within the given scope.
DELETE FROM azure.cost_management.scheduled_actions
WHERE scope = '{{ scope }}' --required
AND name = '{{ name }}' --required
;
Delete a private scheduled action.
DELETE FROM azure.cost_management.scheduled_actions
WHERE name = '{{ name }}' --required
;
Lifecycle Methods
- run
- run_by_scope
- check_name_availability
- check_name_availability_by_scope
Processes a private scheduled action.
EXEC azure.cost_management.scheduled_actions.run
@name='{{ name }}' --required
;
Runs a shared scheduled action within the given scope.
EXEC azure.cost_management.scheduled_actions.run_by_scope
@scope='{{ scope }}' --required,
@name='{{ name }}' --required
;
Checks availability and correctness of the name for a scheduled action.
EXEC azure.cost_management.scheduled_actions.check_name_availability
@@json=
'{
"name": "{{ name }}",
"type": "{{ type }}"
}'
;
Checks availability and correctness of the name for a scheduled action within the given scope.
EXEC azure.cost_management.scheduled_actions.check_name_availability_by_scope
@scope='{{ scope }}' --required
@@json=
'{
"name": "{{ name }}",
"type": "{{ type }}"
}'
;