Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding ListKeys support for Automation Account #2654

Merged
merged 1 commit into from
Mar 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
@@ -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": "**************************************************************"
}
]
}
}
}
}