Update a runbook's metadata

 

The Update a runbook's metadata operation updates the properties of a runbook.

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 <runbook-name> with the name of the runbook to update. Include required URI parameters.

Method

Request URI

PATCH

https://management.core.windows.net/<subscriptionId>/cloudServices/<cloud-service-name>/resources/automation/~/automationAccounts/<automation-account-name>/runbooks/<runbook-name>?api-version=2014-12-08

URI Parameters

Parameter

Description

api-version

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

Request Headers

The request headers in the following table are required.

Request Header

Description

Content-Type

Set to application/json. Do not include a specification for charset.

x-ms-version

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

Request Body

{
   "tags":{
      "Testing":"simple script",
      "Source":"TechNet Script Center",
                "Approval":"Pending"
   },
   "properties":{
      "description":"Writes hello world.",
      "logProgress":true,
      "logVerbose":false
   }
}

Element

Required

Type

Description

tags

No

String

A list of key value pairs that describe the resource. You can only change the values for existing tags.

properties/description

No

String

An updated description for the runbook.

properties/logProgress

No

String

Indicates whether to log progress of the runbook. The default is false.

properties/logVerbose

No

String

Indicates whether to log verbose details of the runbook. The default is false.

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

{
   "id":"\/subscriptions\/2310a662-9154-4254-a8e1-34286f3bf56a\/cloudservices\/CLSV2_Litware\/resources\/~\/automationAccounts\/LitwareDataCenter\/runbooks\/Write-HelloWorld",
   "name":"Write-HelloWorld",
   "type":"Microsoft.Automation\/AutomationAccount\/Runbook",
   "location":"East US 2",
   "tags":{
      "Testing":"simple script",
      "Source":"TechNet Script Center",
      "Approval":"Pending"
   },
   "etag":"\"635657105673270000\"",
   "properties":{
      "description":"Writes hello world.",
      "logVerbose":false,
      "logProgress":true,
      "runbookType":"Script",
      "parameters":{
         "Name":{
            "type":"System.String",
            "isMandatory":false,
            "position":0,
            "defaultValue":"\"World\""
         }
      },
      "state":"Published",
      "jobCount":0,
      "provisioningState":null,
      "serviceManagementTags":null,
      "creationTime":"2015-04-26T05:45:42.457+00:00",
      "lastModifiedBy":null,
      "lastModifiedTime":"2015-04-27T05:49:27.327+00:00"
   }
}

Element

Description

id

The URI for this entity, excluding hostname/schema and api version. Not URL encoded. This field is used by the platform as the identifier for references for other objects.

name

The name of the runbook.

type

The type of the resource (e.g., Microsoft.Automation/AutomationAccount/Runbook)

location

Geo location of resource

tags

A list of key value pairs that describe the resource.

etag

Value used for concurrence control.

properties/description

The runbooks description.

properties/logVerbose

Indicates whether to log verbose details. The default is false.

properties/logProgress

Indicates whether to log progress. The default is false.

properties/runbookType

"Script" is the only supported type.

properties/parameters

A list of parameter objects that represent the Runbook parameters. Parameters are extracted as part of the create Runbook process. Parameters objects have a name and the following properties.

  • type

    The parameter's data type.

  • isMandatory

    Indicates whether the parameter is required.

  • position

    The zero-based numerical position of the parameter.

  • defaultValue

    The parameter's default value.

state

The status of the Runbook possible values are: new, edit, published.

jobCount

The number of jobs executed for this runbook.

provisioningState

The provisioning state of the runbook.

serviceManagementTags

Freeform values available to the runbook.

creationTime

The date and time the runbook was created.

lastModifiedTime

The date and time the runbook was last changed.

See Also

Automation Runbooks
Operations on Automation