Update a variable

 

Updated: May 26, 2016

The Update a variable task updates a variable asset.

The related Windows PowerShell cmdlet for this task is Set-AzureRmAutomationVariable.

To specify the request, replace {subscription-id} with your subscription ID, {resource-group-name} with the name of your resource group, {automation-account-name} with the name of the automation account, and {variable-name} with the name of the variable.

Method

Request URI

PATCH

https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Automation/automationAccounts/{automation-account-name}/variables/{variable-name}?api-version=2015-10-31

URI parameter

Description

api-version

Required. Valid values include 2015-10-31

The following code shows an example of the request body.

{
   "properties":{
      "value": 42
   }
}

The following code shows an example of the response body.

{
   "name":"Current Count",
   "properties":{
      "creationTime":"2015-05-21T19:04:24.29+00:00",
      "lastModifiedTime":"2015-05-21T19:09:19.747+00:00",
      "isEncrypted":false,
      "value":"42",
      "description":"Variable that keeps a current tally"
   }
}


201

For information about common error codes, see Service Management Status and Error Codes

Show: