Automation Account - Create Or Update

Create or update automation account.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}?api-version=2015-10-31

URI Parameters

Name In Required Type Description
subscriptionId
path True
  • string

Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

resourceGroupName
path True
  • string

Name of an Azure Resource group.

Regex pattern: ^[-\w\._]+$

automationAccountName
path True
  • string

The name of the automation account.

api-version
query True
  • string

Client Api Version.

Request Body

Name Required Type Description
location
  • string

Gets or sets the location of the resource.

name
  • string

Gets or sets name of the resource.

properties.sku

Gets or sets account SKU.

tags
  • object

Gets or sets the tags attached to the resource.

Responses

Name Type Description
200 OK

OK

201 Created

Created

Other Status Codes

Automation error response describing why the operation failed.

Examples

Create or update automation account

Sample Request

PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9?api-version=2015-10-31
{
  "properties": {
    "sku": {
      "name": "Free"
    }
  },
  "name": "myAutomationAccount9",
  "location": "East US 2"
}

Sample Response

{
  "name": "myAutomationAccount9",
  "id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9",
  "type": "Microsoft.Automation/AutomationAccounts",
  "location": "East US 2",
  "tags": {},
  "etag": null,
  "properties": {
    "sku": {
      "name": "Free",
      "family": null,
      "capacity": null
    },
    "state": "Ok",
    "creationTime": "2017-03-26T01:13:43.267+00:00",
    "lastModifiedBy": "myEmailId@microsoft.com",
    "lastModifiedTime": "2017-03-26T01:13:43.267+00:00"
  }
}
{
  "name": "ContoseAutomationAccount",
  "id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9",
  "type": "Microsoft.Automation/AutomationAccounts",
  "location": "East US 2",
  "tags": {},
  "etag": null,
  "properties": {
    "sku": {
      "name": "Free",
      "family": null,
      "capacity": null
    },
    "state": "Ok",
    "creationTime": "2017-03-28T18:21:15.187+00:00",
    "lastModifiedBy": "myEmaild@microsoft.com",
    "lastModifiedTime": "2017-03-28T18:21:15.187+00:00"
  }
}

Definitions

AutomationAccount

Definition of the automation account type.

AutomationAccountCreateOrUpdateParameters

The parameters supplied to the create or update automation account operation.

AutomationAccountState

Gets status of account.

ErrorResponse

Error response of an operation failure

Sku

The account SKU.

SkuNameEnum

Gets or sets the SKU name of the account.

AutomationAccount

Definition of the automation account type.

Name Type Description
etag
  • string

Gets or sets the etag of the resource.

id
  • string

Fully qualified resource Id for the resource

location
  • string

The Azure Region where the resource lives

name
  • string

The name of the resource

properties.creationTime
  • string

Gets the creation time.

properties.description
  • string

Gets or sets the description.

properties.lastModifiedBy
  • string

Gets or sets the last modified by.

properties.lastModifiedTime
  • string

Gets the last modified time.

properties.sku

Gets or sets the SKU of account.

properties.state

Gets status of account.

tags
  • object

Resource tags.

type
  • string

The type of the resource.

AutomationAccountCreateOrUpdateParameters

The parameters supplied to the create or update automation account operation.

Name Type Description
location
  • string

Gets or sets the location of the resource.

name
  • string

Gets or sets name of the resource.

properties.sku

Gets or sets account SKU.

tags
  • object

Gets or sets the tags attached to the resource.

AutomationAccountState

Gets status of account.

Name Type Description
Ok
  • string
Suspended
  • string
Unavailable
  • string

ErrorResponse

Error response of an operation failure

Name Type Description
code
  • string

Error code

message
  • string

Error message indicating why the operation failed.

Sku

The account SKU.

Name Type Description
capacity
  • integer

Gets or sets the SKU capacity.

family
  • string

Gets or sets the SKU family.

name

Gets or sets the SKU name of the account.

SkuNameEnum

Gets or sets the SKU name of the account.

Name Type Description
Basic
  • string
Free
  • string