{ "swagger": "2.0", "info": { "title": "AutomationManagement", "version": "2015-10-31", "x-ms-code-generation-settings": { "useDateTimeOffset": true } }, "host": "management.azure.com", "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "flow": "implicit", "description": "Azure Active Directory OAuth2 Flow", "scopes": { "user_impersonation": "impersonate your user account" } } }, "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}": { "patch": { "tags": [ "AutomationAccount" ], "operationId": "AutomationAccount_Update", "description": "Update an automation account.", "externalDocs": { "url": "http://aka.ms/azureautomationsdk/automationaccountoperations" }, "x-ms-examples": { "Update an automation account": { "$ref": "./examples/updateAutomationAccount.json" } }, "parameters": [ { "$ref": "../../common/v1/definitions.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/AutomationAccountNameParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/AutomationAccountUpdateParameters" }, "description": "Parameters supplied to the update automation account." }, { "$ref": "../../common/v1/definitions.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/AutomationAccount" } }, "default": { "description": "Automation error response describing why the operation failed.", "schema": { "$ref": "../../common/v1/definitions.json#/definitions/ErrorResponse" } } } }, "put": { "tags": [ "AutomationAccount" ], "operationId": "AutomationAccount_CreateOrUpdate", "description": "Create or update automation account.", "externalDocs": { "url": "http://aka.ms/azureautomationsdk/automationaccountoperations" }, "x-ms-examples": { "Create or update automation account": { "$ref": "./examples/createOrUpdateAutomationAccount.json" } }, "parameters": [ { "$ref": "../../common/v1/definitions.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/AutomationAccountNameParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/AutomationAccountCreateOrUpdateParameters" }, "description": "Parameters supplied to the create or update automation account." }, { "$ref": "../../common/v1/definitions.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter" } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/AutomationAccount" } }, "200": { "description": "OK", "schema": { "$ref": "#/definitions/AutomationAccount" } }, "default": { "description": "Automation error response describing why the operation failed.", "schema": { "$ref": "../../common/v1/definitions.json#/definitions/ErrorResponse" } } } }, "delete": { "tags": [ "AutomationAccount" ], "operationId": "AutomationAccount_Delete", "description": "Delete an automation account.", "externalDocs": { "url": "http://aka.ms/azureautomationsdk/automationaccountoperations" }, "x-ms-examples": { "Delete automation account": { "$ref": "./examples/deleteAutomationAccount.json" } }, "parameters": [ { "$ref": "../../common/v1/definitions.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/AutomationAccountNameParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK" }, "204": { "description": "No Content" }, "default": { "description": "Automation error response describing why the operation failed.", "schema": { "$ref": "../../common/v1/definitions.json#/definitions/ErrorResponse" } } } }, "get": { "tags": [ "AutomationAccount" ], "operationId": "AutomationAccount_Get", "description": "Get information about an Automation Account.", "externalDocs": { "url": "http://aka.ms/azureautomationsdk/automationaccountoperations" }, "x-ms-examples": { "Get automation account": { "$ref": "./examples/getAutomationAccount.json" } }, "parameters": [ { "$ref": "../../common/v1/definitions.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/AutomationAccountNameParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/AutomationAccount" } }, "default": { "description": "Automation error response describing why the operation failed.", "schema": { "$ref": "../../common/v1/definitions.json#/definitions/ErrorResponse" } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts": { "get": { "tags": [ "AutomationAccount" ], "operationId": "AutomationAccount_ListByResourceGroup", "description": "Retrieve a list of accounts within a given resource group.", "externalDocs": { "url": "http://aka.ms/azureautomationsdk/automationaccountoperations" }, "x-ms-examples": { "List automation accounts by resource group": { "$ref": "./examples/listAutomationAccountsByResourceGroup.json" } }, "parameters": [ { "$ref": "../../common/v1/definitions.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/AutomationAccountListResult" } }, "default": { "description": "Automation error response describing why the operation failed.", "schema": { "$ref": "../../common/v1/definitions.json#/definitions/ErrorResponse" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/providers/Microsoft.Automation/operations": { "get": { "tags": [ "Operations" ], "description": "Lists all of the available Automation REST API operations.", "operationId": "Operations_List", "parameters": [ { "$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/OperationListResult" } }, "default": { "description": "Automation error response describing why the operation failed.", "schema": { "$ref": "../../common/v1/definitions.json#/definitions/ErrorResponse" } } }, "x-ms-pageable": { "nextLinkName": null } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.Automation/automationAccounts": { "get": { "tags": [ "AutomationAccount" ], "summary": "Lists the Automation Accounts within an Azure subscription.", "operationId": "AutomationAccount_List", "description": "Retrieve a list of accounts within a given subscription.", "x-ms-examples": { "List automation accounts by resource group": { "$ref": "./examples/listAutomationAccountsBySubscription.json" } }, "parameters": [ { "$ref": "../../common/v1/definitions.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/AutomationAccountListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../common/v1/definitions.json#/definitions/ErrorResponse" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/statistics": { "get": { "tags": [ "Statistics" ], "operationId": "Statistics_ListByAutomationAccount", "description": "Retrieve the statistics for the account.", "externalDocs": { "url": "http://aka.ms/azureautomationsdk/statisticsoperations" }, "x-ms-examples": { "Get statistics of an automation account": { "$ref": "./examples/getStatisticsOfAutomationAccount.json" } }, "parameters": [ { "$ref": "../../common/v1/definitions.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/AutomationAccountNameParameter" }, { "name": "$filter", "in": "query", "required": false, "type": "string", "description": "The filter to apply on the operation." }, { "$ref": "../../common/v1/definitions.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/StatisticsListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../common/v1/definitions.json#/definitions/ErrorResponse" } } }, "x-ms-pageable": { "nextLinkName": null } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/usages": { "get": { "tags": [ "Usages" ], "operationId": "Usages_ListByAutomationAccount", "description": "Retrieve the usage for the account id.", "externalDocs": { "url": "http://aka.ms/azureautomationsdk/usageoperations" }, "x-ms-examples": { "Get usages of an automation account": { "$ref": "./examples/getUsagesOfAutomationAccount.json" } }, "parameters": [ { "$ref": "../../common/v1/definitions.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/AutomationAccountNameParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/UsageListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../common/v1/definitions.json#/definitions/ErrorResponse" } } }, "x-ms-pageable": { "nextLinkName": null } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/listKeys": { "post": { "tags": [ "ListKeys" ], "operationId": "Keys_ListByAutomationAccount", "description": "Retrieve the automation keys for an account.", "x-ms-examples": { "Get lists of an automation account": { "$ref": "./examples/listAutomationAccountKeys.json" } }, "parameters": [ { "$ref": "../../common/v1/definitions.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/AutomationAccountNameParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/KeyListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../common/v1/definitions.json#/definitions/ErrorResponse" } } } } } }, "definitions": { "AutomationAccount": { "properties": { "properties": { "$ref": "#/definitions/AutomationAccountProperties", "x-ms-client-flatten": true, "description": "Gets or sets the automation account properties." }, "etag": { "type": "string", "description": "Gets or sets the etag of the resource." } }, "allOf": [ { "$ref": "../../common/v1/definitions.json#/definitions/TrackedResource" } ], "description": "Definition of the automation account type." }, "AutomationAccountProperties": { "properties": { "sku": { "$ref": "#/definitions/Sku", "description": "Gets or sets the SKU of account." }, "lastModifiedBy": { "type": "string", "description": "Gets or sets the last modified by." }, "state": { "type": "string", "readOnly": true, "description": "Gets status of account.", "enum": [ "Ok", "Unavailable", "Suspended" ], "x-ms-enum": { "name": "AutomationAccountState", "modelAsString": true } }, "creationTime": { "type": "string", "format": "date-time", "readOnly": true, "description": "Gets the creation time.", "x-nullable": false }, "lastModifiedTime": { "type": "string", "format": "date-time", "readOnly": true, "description": "Gets the last modified time.", "x-nullable": false }, "description": { "type": "string", "description": "Gets or sets the description." } }, "description": "Definition of the account property." }, "Sku": { "properties": { "name": { "type": "string", "description": "Gets or sets the SKU name of the account.", "enum": [ "Free", "Basic" ], "x-ms-enum": { "name": "SkuNameEnum", "modelAsString": true } }, "family": { "type": "string", "description": "Gets or sets the SKU family." }, "capacity": { "type": "integer", "format": "int32", "description": "Gets or sets the SKU capacity." } }, "required": [ "name" ], "description": "The account SKU." }, "AutomationAccountCreateOrUpdateParameters": { "properties": { "properties": { "$ref": "#/definitions/AutomationAccountCreateOrUpdateProperties", "x-ms-client-flatten": true, "description": "Gets or sets account create or update properties." }, "name": { "type": "string", "description": "Gets or sets name of the resource." }, "location": { "type": "string", "description": "Gets or sets the location of the resource." }, "tags": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Gets or sets the tags attached to the resource." } }, "description": "The parameters supplied to the create or update automation account operation." }, "AutomationAccountCreateOrUpdateProperties": { "properties": { "sku": { "$ref": "#/definitions/Sku", "description": "Gets or sets account SKU." } }, "description": "The parameters supplied to the create or update account properties." }, "AutomationAccountListResult": { "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/AutomationAccount" }, "description": "Gets or sets list of accounts." }, "nextLink": { "type": "string", "description": "Gets or sets the next link." } }, "description": "The response model for the list account operation." }, "OperationListResult": { "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/Operation" }, "description": "List of Automation operations supported by the Automation resource provider." } }, "description": "The response model for the list of Automation operations" }, "Operation": { "description": "Automation REST API operation", "type": "object", "properties": { "name": { "description": "Operation name: {provider}/{resource}/{operation}", "type": "string" }, "display": { "properties": { "provider": { "description": "Service provider: Microsoft.Automation", "type": "string" }, "resource": { "description": "Resource on which the operation is performed: Runbooks, Jobs etc.", "type": "string" }, "operation": { "description": "Operation type: Read, write, delete, etc.", "type": "string" } }, "description": "Provider, Resource and Operation values" } } }, "Statistics": { "properties": { "counterProperty": { "type": "string", "readOnly": true, "description": "Gets the property value of the statistic." }, "counterValue": { "type": "integer", "format": "int64", "readOnly": true, "description": "Gets the value of the statistic." }, "startTime": { "type": "string", "format": "date-time", "readOnly": true, "description": "Gets the startTime of the statistic.", "x-nullable": false }, "endTime": { "type": "string", "format": "date-time", "readOnly": true, "description": "Gets the endTime of the statistic.", "x-nullable": true }, "id": { "type": "string", "readOnly": true, "description": "Gets the id." } }, "description": "Definition of the statistic." }, "StatisticsListResult": { "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/Statistics" }, "description": "Gets or sets a list of statistics." } }, "description": "The response model for the list statistics operation." }, "Usage": { "properties": { "id": { "type": "string", "description": "Gets or sets the id of the resource." }, "name": { "$ref": "#/definitions/UsageCounterName", "description": "Gets or sets the usage counter name." }, "unit": { "type": "string", "description": "Gets or sets the usage unit name." }, "currentValue": { "type": "number", "format": "double", "description": "Gets or sets the current usage value." }, "limit": { "type": "integer", "format": "int64", "description": "Gets or sets max limit. -1 for unlimited" }, "throttleStatus": { "type": "string", "description": "Gets or sets the throttle status." } }, "description": "Definition of Usage." }, "UsageCounterName": { "properties": { "value": { "type": "string", "description": "Gets or sets the usage counter name." }, "localizedValue": { "type": "string", "description": "Gets or sets the localized usage counter name." } }, "description": "Definition of usage counter name." }, "UsageListResult": { "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/Usage" }, "description": "Gets or sets usage." } }, "description": "The response model for the get usage operation." }, "Key": { "properties": { "KeyName": { "readOnly": true, "type": "string", "description": "Automation key name.", "enum": [ "Primary", "Secondary" ], "x-ms-enum": { "name": "AutomationKeyName", "modelAsString": true } }, "Permissions": { "readOnly": true, "type": "string", "description": "Automation key permissions.", "enum": [ "Read", "Full" ], "x-ms-enum": { "name": "AutomationKeyPermissions", "modelAsString": true } }, "Value": { "readOnly": true, "type": "string", "description": "Value of the Automation Key used for registration." } }, "description": "Automation key which is used to register a DSC Node" }, "KeyListResult": { "properties": { "keys": { "type": "array", "items": { "$ref": "#/definitions/Key" }, "description": "Lists the automation keys." } } }, "AutomationAccountUpdateProperties": { "properties": { "sku": { "$ref": "#/definitions/Sku", "description": "Gets or sets account SKU." } }, "description": "The parameters supplied to the update account properties." }, "AutomationAccountUpdateParameters": { "properties": { "properties": { "$ref": "#/definitions/AutomationAccountUpdateProperties", "x-ms-client-flatten": true, "description": "Gets or sets account update properties." }, "name": { "type": "string", "description": "Gets or sets the name of the resource." }, "location": { "type": "string", "description": "Gets or sets the location of the resource." }, "tags": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Gets or sets the tags attached to the resource." } }, "description": "The parameters supplied to the update automation account operation." } }, "parameters": {} }