Skip to content
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 @@ -2274,6 +2274,16 @@
"x-ms-client-flatten": true,
"description": "Definition of the job stream."
},
"LinkedWorkspace": {
"properties": {
"id": {
"type": "string",
"readOnly": true,
"description": "Gets the id of the linked workspace."
}
},
"description": "Definition of the linked workspace."
},
"ModuleCreateOrUpdateProperties": {
"properties": {
"contentLink": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"parameters": {
"subscriptionId": "subid",
"resourceGroupName": "rg",
"automationAccountName": "ContosoAutomationAccount",
"api-version": "2015-10-31"
},
"responses": {
"200": {
"headers": {},
"body": {
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.OperationalInsights/workspaces/ContosoWorkspace"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"swagger": "2.0",
"info": {
"title": "AutomationManagement",
"version": "2015-10-31"
},
"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}/linkedWorkspace": {
"get": {
"tags": [
"LinkedWorkspace"
],
"operationId": "LinkedWorkspace_Get",
"description": "Retrieve the linked workspace for the account id.",
"externalDocs": {
"url": "http://aka.ms/azureautomationsdk/linkedworkspaceoperations"
},
"x-ms-examples": {
"Get the linked workspace of an automation account": {
"$ref": "./examples/getLinkedWorkspace.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/LinkedWorkspace"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a collection GET call. It should return a value array. Also it only has id property?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now, our web service returns a single linked workspace, with id property only for GET linkedWorkspace. The id property will either be null or the resource id of the linked workspace.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API has been out there for 1.5 years. It is not on Azure REST API documentation because of an issue we had with available operations API, which has been fixed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, what can we do then :). This is definitely not the correct design.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ravbhatnagar for your feedback. I will advocate fixing the API in our next version:

GET /providers/Microsoft.Automation/automationAccounts/{automationAccountName}/linkedWorkspaces

which returns an array of linked workspaces.

Of course nothing is set in stone yet.

}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./definitions.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {},
"parameters": {}
}
2 changes: 2 additions & 0 deletions specification/automation/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ input-file:
- Microsoft.Automation/stable/2015-10-31/hybridRunbookWorkerGroup.json
- Microsoft.Automation/stable/2015-10-31/job.json
- Microsoft.Automation/stable/2015-10-31/jobSchedule.json
- Microsoft.Automation/stable/2015-10-31/linkedWorkspace.json
- Microsoft.Automation/stable/2015-10-31/module.json
- Microsoft.Automation/stable/2015-10-31/runbook.json
- Microsoft.Automation/stable/2015-10-31/schedule.json
Expand Down Expand Up @@ -78,6 +79,7 @@ input-file:
- Microsoft.Automation/stable/2015-10-31/hybridRunbookWorkerGroup.json
- Microsoft.Automation/stable/2015-10-31/job.json
- Microsoft.Automation/stable/2015-10-31/jobSchedule.json
- Microsoft.Automation/stable/2015-10-31/linkedWorkspace.json
- Microsoft.Automation/stable/2015-10-31/module.json
- Microsoft.Automation/stable/2015-10-31/runbook.json
- Microsoft.Automation/stable/2015-10-31/schedule.json
Expand Down