{ "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}/credentials/{credentialName}": { "delete": { "tags": [ "Credential" ], "operationId": "Credential_Delete", "description": "Delete the credential.", "externalDocs": { "url": "http://aka.ms/azureautomationsdk/credentialoperations" }, "x-ms-examples": { "Delete a credential": { "$ref": "./examples/deleteCredentialExisting.json" } }, "parameters": [ { "$ref": "../../common/v1/definitions.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/AutomationAccountNameParameter" }, { "name": "credentialName", "in": "path", "required": true, "type": "string", "description": "The name of credential." }, { "$ref": "../../common/v1/definitions.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK" }, "default": { "description": "Automation error response describing why the operation failed.", "schema": { "$ref": "../../common/v1/definitions.json#/definitions/ErrorResponse" } } } }, "get": { "tags": [ "Credential" ], "operationId": "Credential_Get", "description": "Retrieve the credential identified by credential name.", "externalDocs": { "url": "http://aka.ms/azureautomationsdk/credentialoperations" }, "x-ms-examples": { "Get a credential": { "$ref": "./examples/getCredential.json" } }, "parameters": [ { "$ref": "../../common/v1/definitions.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/AutomationAccountNameParameter" }, { "name": "credentialName", "in": "path", "required": true, "type": "string", "description": "The name of credential." }, { "$ref": "../../common/v1/definitions.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Credential" } }, "default": { "description": "Automation error response describing why the operation failed.", "schema": { "$ref": "../../common/v1/definitions.json#/definitions/ErrorResponse" } } } }, "put": { "tags": [ "Credential" ], "operationId": "Credential_CreateOrUpdate", "description": "Create a credential.", "externalDocs": { "url": "http://aka.ms/azureautomationsdk/credentialoperations" }, "x-ms-examples": { "Create a credential": { "$ref": "./examples/createOrUpdateCredential.json" } }, "parameters": [ { "$ref": "../../common/v1/definitions.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/AutomationAccountNameParameter" }, { "name": "credentialName", "in": "path", "required": true, "type": "string", "description": "The parameters supplied to the create or update credential operation." }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/CredentialCreateOrUpdateParameters" }, "description": "The parameters supplied to the create or update credential operation." }, { "$ref": "../../common/v1/definitions.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter" } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/Credential" } }, "200": { "description": "OK", "schema": { "$ref": "#/definitions/Credential" } }, "default": { "description": "Automation error response describing why the operation failed.", "schema": { "$ref": "../../common/v1/definitions.json#/definitions/ErrorResponse" } } } }, "patch": { "tags": [ "Credential" ], "operationId": "Credential_Update", "description": "Update a credential.", "externalDocs": { "url": "http://aka.ms/azureautomationsdk/credentialoperations" }, "x-ms-examples": { "Update a credential": { "$ref": "./examples/updateCredential_patch.json" } }, "parameters": [ { "$ref": "../../common/v1/definitions.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/AutomationAccountNameParameter" }, { "name": "credentialName", "in": "path", "required": true, "type": "string", "description": "The parameters supplied to the Update credential operation." }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/CredentialUpdateParameters" }, "description": "The parameters supplied to the Update credential operation." }, { "$ref": "../../common/v1/definitions.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Credential" } }, "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/{automationAccountName}/credentials": { "get": { "tags": [ "Credential" ], "operationId": "Credential_ListByAutomationAccount", "description": "Retrieve a list of credentials.", "externalDocs": { "url": "http://aka.ms/azureautomationsdk/credentialoperations" }, "x-ms-examples": { "List credentials by automation account, first 100": { "$ref": "./examples/listCredentialsByAutomationAccount.json" }, "List credentials by automation account, next 100": { "$ref": "./examples/listCredentialsByAutomationAccount_next100_using_nextLink.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/CredentialListResult" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } } }, "definitions": { "CredentialCreateOrUpdateProperties": { "properties": { "userName": { "type": "string", "description": "Gets or sets the user name of the credential." }, "password": { "type": "string", "description": "Gets or sets the password of the credential." }, "description": { "type": "string", "description": "Gets or sets the description of the credential." } }, "required": [ "userName", "password" ], "description": "The properties of the create credential operation." }, "CredentialCreateOrUpdateParameters": { "properties": { "name": { "type": "string", "description": "Gets or sets the name of the credential." }, "properties": { "$ref": "#/definitions/CredentialCreateOrUpdateProperties", "x-ms-client-flatten": true, "description": "Gets or sets the properties of the credential." } }, "required": [ "name", "properties" ], "description": "The parameters supplied to the create or update credential operation." }, "CredentialProperties": { "properties": { "userName": { "type": "string", "readOnly": true, "description": "Gets the user name of the credential." }, "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 credential properties" }, "Credential": { "properties": { "properties": { "$ref": "#/definitions/CredentialProperties", "x-ms-client-flatten": true, "description": "Gets or sets the properties of the credential." } }, "allOf": [ { "$ref": "../../common/v1/definitions.json#/definitions/ProxyResource" } ], "description": "Definition of the credential." }, "CredentialListResult": { "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/Credential" }, "description": "Gets or sets a list of credentials." }, "nextLink": { "type": "string", "description": "Gets or sets the next link." } }, "description": "The response model for the list credential operation." }, "CredentialUpdateProperties": { "properties": { "userName": { "type": "string", "description": "Gets or sets the user name of the credential." }, "password": { "type": "string", "description": "Gets or sets the password of the credential." }, "description": { "type": "string", "description": "Gets or sets the description of the credential." } }, "description": "The properties of the Update credential" }, "CredentialUpdateParameters": { "properties": { "name": { "type": "string", "description": "Gets or sets the name of the credential." }, "properties": { "$ref": "#/definitions/CredentialUpdateProperties", "x-ms-client-flatten": true, "description": "Gets or sets the properties of the variable." } }, "description": "The parameters supplied to the Update credential operation." } }, "parameters": {} }