Share via


List all variables

 

The list all variables operation gets all the variables that belong to an automation account.

You cannot get decrypted values of encrypted variables using this operation, as encrypted variables can only be decrypted by runbooks and other objects in the same automation account as the variable.

Request

To specify the request, replace <subscription-id> with your subscription ID, <cloud-service-name> with the name of the cloud service to use for making the request, <automation-account-name> with the name of the automation account to use for making the request. Include required URI parameters.

Method

Request URI

GET

https://management.core.windows.net/<subscriptionId>/cloudServices/<cloud-service-name>/resources/automation/~/automationAccounts/<automation-account-name>/variables?api-version={api-version}

URI Parameters

Parameter

Description

api-version

Required. Must be set to 2014-12-08.

Request Headers

The request header in the following table is required.

Request Header

Description

x-ms-version

Specifies the version of the operation. Set to 2013-06-01 or a later version.

Request Body

None

Response

Status Code

A successful operation returns 200 (OK). For information about common error codes, see HTTP/1.1 Status Code Definitions.

Response Headers

Request Header

Description

x-ms-request-id

A unique identifier for the current operation.

Response Body

Each variable is returned as an array value.

{
   "value":[
      {
         "name":"Current Count",
         "properties":{
            "creationTime":"2015-05-21T18:03:40.837+00:00",
            "lastModifiedTime":"2015-05-21T18:03:40.837+00:00",
            "isEncrypted":false,
            "value":"41",
            "description":"Variable that keeps a current tally"
         }
      },
      {
         "name":"Test VMs",
         "properties":{
            "creationTime":"2015-05-21T18:42:04.087+00:00",
            "lastModifiedTime":"2015-05-21T18:42:04.087+00:00",
            "isEncrypted":false,
            "value":"Ltw087,ltwlabVMM,ltwlabSQL,ltwlabWAP",
            "description":"Test VMs"
         }
      }
   ]
}

Element

Description

name

A name for the variable.

creationTime

Date and time the variable was created.

lastModificationTime

The date and time the variable was last changed.

isEncrypted

Indicates whether the value is stored in an encrypted form. The default is "false".

description

A description of the variable.

value

The value the variable contains. Is not returned for encrypted variables.

nextLink

Returned only when the number of records exceeds the page size (100 records). This link, and any subsequent links, returns the next page of records.

See Also

Automation Variables
Operations on Automation