Share via


Get information about a variable

 

The Get information about a variable operation gets the value and other data about a specified variable.

You cannot get the decrypted value of an encrypted variable 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, and <variable-name> with the name of the variable to get information about. 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/<variable-name>?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

{
   "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, and of any type, the variable contains. This value is not returned for encrypted variables.

See Also

Automation Variables
Operations on Automation