Update a module

 

The Update a module operation updates tag values for an existing module.

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

Method

Request URI

PATCH

https://management.core.windows.net/<subscription-id>/cloudServices/<cloud-service-name>/resources/automation/~/automationAccounts/<automation-account-name>/modules/<module-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":"Test verified"
   }
}

Element

Required

Type

Description

tags

Yes

String

A list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 10 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. If unspecified, existing tags are left unchanged; otherwise they are replaced.

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\/modules\/GitHub",
   "name":"GitHub",
   "type":"Microsoft.Automation\/AutomationAccount\/Module",
   "location":"East US 2",
   "tags":{
      "Testing":"Test verified"
   },
   "etag":null,
   "properties":{
      "isGlobal":false,
      "version":2,
      "sizeInBytes":3214,
      "activityCount":4,
      "creationTime":"2015-04-30T16:08:46.51+00:00",
      "lastModifiedTime":"2015-04-30T16:10:38.333+00:00",
      "error":{
         "code":null,
         "message":null
      },
      "provisioningState":"Creating"
   }
}

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 module.

type

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

location

The location of the resource. The resource must be built in this geographical region.

tags

The updated tags and their values.

etag

Value used for concurrence control.

properties/isGlobal

Flag indicating whether the module is global.

properties/version

The version of the module, which will be automatically incremented by 1.

properties/sizeInBytes

The size of the module in bytes.

properties/activityCount

The number of activities contained within the module.

properties/creationTime

The date and time the module was created.

properties/lastModifiedTime

The date and time the module was last changed.

properties/error

An array of any error codes and their messages.

properties/provisioningState

The state of the job until a terminal state is reached.

See Also

Automation Modules
Operations on Automation