Skip to main content

tasks

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

Overview

Nametasks
TypeResource
Idazure.security.tasks

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
creationTimeUtcstring (date-time)The time this task was discovered in UTC.
lastStateChangeTimeUtcstring (date-time)The time this task's details were last changed in UTC.
securityTaskParametersobjectChanging set of properties, depending on the task type that is derived from the name field.
statestringState of the task (Active, Resolved etc.).
subStatestringAdditional data on the state of the task.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_resource_group_level_taskselectresource_group_name, asc_location, task_name, subscription_idRecommended tasks that will help improve the security of the subscription proactively.
list_by_resource_groupselectresource_group_name, asc_location, subscription_id$filterRecommended tasks that will help improve the security of the subscription proactively.
get_subscription_level_taskselectasc_location, task_name, subscription_idRecommended tasks that will help improve the security of the subscription proactively.
list_by_home_regionselectasc_location, subscription_id$filterRecommended tasks that will help improve the security of the subscription proactively.
listselectsubscription_id$filterRecommended tasks that will help improve the security of the subscription proactively.
update_resource_group_level_task_stateexecresource_group_name, asc_location, task_name, task_update_action_type, subscription_idRecommended tasks that will help improve the security of the subscription proactively.
update_subscription_level_task_stateexecasc_location, task_name, task_update_action_type, subscription_idRecommended tasks that will help improve the security of the subscription proactively.

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
asc_locationstringThe location where ASC stores the data of the subscription. can be retrieved from Get locations. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
task_namestringName of the task object, will be a GUID. Required.
task_update_action_typestringType of the action to do on the task. Known values are: "Activate", "Dismiss", "Start", "Resolve", and "Close". Required.
$filterstringOData filter. Optional. Default value is None.

SELECT examples

Recommended tasks that will help improve the security of the subscription proactively.

SELECT
id,
name,
creationTimeUtc,
lastStateChangeTimeUtc,
securityTaskParameters,
state,
subState,
systemData,
type
FROM azure.security.tasks
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND asc_location = '{{ asc_location }}' -- required
AND task_name = '{{ task_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

Lifecycle Methods

Recommended tasks that will help improve the security of the subscription proactively.

EXEC azure.security.tasks.update_resource_group_level_task_state 
@resource_group_name='{{ resource_group_name }}' --required,
@asc_location='{{ asc_location }}' --required,
@task_name='{{ task_name }}' --required,
@task_update_action_type='{{ task_update_action_type }}' --required,
@subscription_id='{{ subscription_id }}' --required
;