Share via


Storage Task Assignments - Get

Get the storage task assignment properties

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}?api-version=2024-01-01

URI Parameters

Name In Required Type Description
accountName
path True

string

minLength: 3
maxLength: 24
pattern: ^[a-z0-9]+$

The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

storageTaskAssignmentName
path True

string

minLength: 3
maxLength: 24
pattern: ^[a-z0-9]{3,24}$

The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.

subscriptionId
path True

string (uuid)

The ID of the target subscription. The value must be an UUID.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Responses

Name Type Description
200 OK

StorageTaskAssignment

OK -- properties retrieved successfully for the storage task assignment.

Other Status Codes

ErrorResponse

Error response describing why the operation failed.

Examples

GetStorageTaskAssignment

Sample request

GET https://management.azure.com/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/myassignment1?api-version=2024-01-01

Sample response

{
  "id": "/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.Storage/storageAccounts/sto4445/storageTaskAssignments/myassignment1",
  "name": "myassignment1",
  "type": "Microsoft.Storage/storageAccounts/storageTaskAssignments",
  "properties": {
    "taskId": "/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1",
    "enabled": true,
    "description": "My Storage task assignment",
    "executionContext": {
      "target": {
        "prefix": [
          "prefix1",
          "prefix2"
        ],
        "excludePrefix": []
      },
      "trigger": {
        "type": "RunOnce",
        "parameters": {
          "startOn": "2022-11-15T21:52:47.8145095Z"
        }
      }
    },
    "report": {
      "prefix": "container1"
    },
    "provisioningState": "Succeeded"
  }
}

Definitions

Name Description
ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

ExecutionTarget

Target helps provide filter parameters for the objects in the storage account and forms the execution context for the storage task

ExecutionTrigger

Execution trigger for storage task assignment

IntervalUnit

Run interval unit of task execution. This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is 'RunOnce'

ProvisioningState

Represents the provisioning state of the storage task assignment.

RunResult

Represents the overall result of the execution for the run instance

RunStatusEnum

Represents the status of the execution.

StorageTaskAssignment

The storage task assignment.

StorageTaskAssignmentExecutionContext

Execution context of the storage task assignment.

StorageTaskAssignmentProperties

Properties of the storage task assignment.

StorageTaskAssignmentReport

The storage task assignment report

StorageTaskReportProperties

Storage task execution report for a run instance.

TriggerParameters

The trigger parameters update for the storage task assignment execution

TriggerType

The trigger type of the storage task assignment execution

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

ExecutionTarget

Target helps provide filter parameters for the objects in the storage account and forms the execution context for the storage task

Name Type Description
excludePrefix

string[]

List of object prefixes to be excluded from task execution. If there is a conflict between include and exclude prefixes, the exclude prefix will be the determining factor

prefix

string[]

Required list of object prefixes to be included for task execution

ExecutionTrigger

Execution trigger for storage task assignment

Name Type Description
parameters

TriggerParameters

The trigger parameters of the storage task assignment execution

type

TriggerType

The trigger type of the storage task assignment execution

IntervalUnit

Run interval unit of task execution. This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is 'RunOnce'

Value Description
Days

ProvisioningState

Represents the provisioning state of the storage task assignment.

Value Description
ValidateSubscriptionQuotaBegin
ValidateSubscriptionQuotaEnd
Accepted
Creating
Succeeded
Deleting
Canceled
Failed

RunResult

Represents the overall result of the execution for the run instance

Value Description
Succeeded
Failed

RunStatusEnum

Represents the status of the execution.

Value Description
InProgress
Finished

StorageTaskAssignment

The storage task assignment.

Name Type Description
id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

The name of the resource

properties

StorageTaskAssignmentProperties

Properties of the storage task assignment.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

StorageTaskAssignmentExecutionContext

Execution context of the storage task assignment.

Name Type Description
target

ExecutionTarget

Execution target of the storage task assignment

trigger

ExecutionTrigger

Execution trigger of the storage task assignment

StorageTaskAssignmentProperties

Properties of the storage task assignment.

Name Type Description
description

string

Text that describes the purpose of the storage task assignment

enabled

boolean

Whether the storage task assignment is enabled or not

executionContext

StorageTaskAssignmentExecutionContext

The storage task assignment execution context

provisioningState

ProvisioningState

Represents the provisioning state of the storage task assignment.

report

StorageTaskAssignmentReport

The storage task assignment report

runStatus

StorageTaskReportProperties

Run status of storage task assignment

taskId

string (arm-id)

Id of the corresponding storage task

StorageTaskAssignmentReport

The storage task assignment report

Name Type Description
prefix

string

The container prefix for the location of storage task assignment report

StorageTaskReportProperties

Storage task execution report for a run instance.

Name Type Description
finishTime

string

End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison operators can be used as described for DateTime properties in https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators

objectFailedCount

string

Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators

objectsOperatedOnCount

string

Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount ge 100 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators

objectsSucceededCount

string

Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount gt 150 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators

objectsTargetedCount

string

Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options such as objectsTargetedCount gt 50 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators

runResult

RunResult

Represents the overall result of the execution for the run instance

runStatusEnum

RunStatusEnum

Represents the status of the execution.

runStatusError

string

Well known Azure Storage error code that represents the error encountered during execution of the run instance.

startTime

string

Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison operators can be used as described for DateTime properties in https://learn.microsoft.com/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators

storageAccountId

string (arm-id)

Represents the Storage Account Id where the storage task definition was applied and executed.

summaryReportPath

string

Full path to the verbose report stored in the reporting container as specified in the assignment execution context for the storage account.

taskAssignmentId

string (arm-id)

Represents the Storage Task Assignment Id associated with the storage task that provided an execution context.

taskId

string (arm-id)

Storage Task Arm Id.

taskVersion

string

Storage Task Version

TriggerParameters

The trigger parameters update for the storage task assignment execution

Name Type Description
endBy

string (date-time)

When to end task execution. This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is 'RunOnce'

interval

integer (int32)

minimum: 1

Run interval of task execution. This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is 'RunOnce'

intervalUnit

IntervalUnit

Run interval unit of task execution. This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is 'RunOnce'

startFrom

string (date-time)

When to start task execution. This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is 'RunOnce'

startOn

string (date-time)

When to start task execution. This is a required field when ExecutionTrigger.properties.type is 'RunOnce'; this property should not be present when ExecutionTrigger.properties.type is 'OnSchedule'

TriggerType

The trigger type of the storage task assignment execution

Value Description
RunOnce
OnSchedule