From 6d72ca973e5de84066a6a22502c9db18c11a112d Mon Sep 17 00:00:00 2001 From: Varad Meru Date: Tue, 13 Mar 2018 21:45:51 -0700 Subject: [PATCH] Adding ListKeys support for Account --- .../stable/2015-10-31/account.json | 49 +++++++++++++++++++ .../stable/2015-10-31/definitions.json | 43 ++++++++++++++++ .../examples/listAutomationAccountKeys.json | 27 ++++++++++ 3 files changed, 119 insertions(+) create mode 100644 specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/examples/listAutomationAccountKeys.json diff --git a/specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/account.json b/specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/account.json index 35699335d258..b60126247cc9 100644 --- a/specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/account.json +++ b/specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/account.json @@ -508,6 +508,55 @@ "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 usages of an automation account": { + "$ref": "./examples/listAutomationAccountKeys.json" + } + }, + "parameters": [ + { + "$ref": "./definitions.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "automationAccountName", + "in": "path", + "required": true, + "type": "string", + "description": "The automation account name." + }, + { + "$ref": "./definitions.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "./definitions.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "./definitions.json#/definitions/KeyListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./definitions.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } } }, "definitions": {}, diff --git a/specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/definitions.json b/specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/definitions.json index 2fa446a687fe..2bd11ff48028 100644 --- a/specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/definitions.json +++ b/specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/definitions.json @@ -2270,6 +2270,49 @@ "x-ms-client-flatten": true, "description": "Definition of the job stream." }, + "Key":{ + "properties": { + "keyName": { + "type": "string", + "description": "Automation key name.", + "enum": [ + "primary", + "secondary" + ], + "x-ms-enum": { + "name": "AutomationKeyName", + "modelAsString": true + } + }, + "permissions": { + "type": "string", + "description": "Automation key permissions.", + "enum": [ + "Full" + ], + "x-ms-enum": { + "name": "AutomationKeyPermissions", + "modelAsString": true + } + }, + "value": { + "type": "string", + "description": "Value of the Automation Key used for registration." + } + }, + "description": "Automation key which is used to register a DSC Node" + }, + "KeyListResult":{ + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Key" + }, + "description": "Lists the automation keys." + } + } + }, "LinkedWorkspace": { "properties": { "id": { diff --git a/specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/examples/listAutomationAccountKeys.json b/specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/examples/listAutomationAccountKeys.json new file mode 100644 index 000000000000..8375d89a1222 --- /dev/null +++ b/specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/examples/listAutomationAccountKeys.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "subid", + "resourceGroupName": "rg", + "automationAccountName": "MyAutomationAccount", + "api-version": "2015-10-31" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "keys": [ + { + "KeyName": "Primary", + "Permissions": "Full", + "Value": "**************************************************************" + }, + { + "KeyName": "Secondary", + "Permissions": "Full", + "Value": "**************************************************************" + } + ] + } + } + } +} \ No newline at end of file