diff --git a/specification/portal/resource-manager/Microsoft.Portal/preview/2015-11-01-preview/examples/createOrUpdateDashboard.json b/specification/portal/resource-manager/Microsoft.Portal/preview/2015-11-01-preview/examples/createOrUpdateDashboard.json new file mode 100644 index 000000000000..2786b442c6db --- /dev/null +++ b/specification/portal/resource-manager/Microsoft.Portal/preview/2015-11-01-preview/examples/createOrUpdateDashboard.json @@ -0,0 +1,152 @@ +{ + "parameters": { + "dashboardName": "testDashboard", + "resourceGroupName": "testRG", + "api-version": "2015-11-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "dashboard": { + "properties": { + "lenses": { + "aLens": { + "order": 1, + "parts": { + "aPart": { + "position": { + "x": 1, + "y": 2, + "rowSpan": 4, + "colSpan": 3 + } + }, + "bPart": { + "position": { + "x": 5, + "y": 5, + "rowSpan": 6, + "colSpan": 6 + } + } + } + }, + "bLens": { + "order": 2, + "parts": {} + } + }, + "metadata": { + "metadata": { + "X": 4, + "Y": 3, + "RowSpan": 1, + "ColSpan": 2 + } + } + }, + "location": "eastus", + "tags": { + "aKey": "aValue", + "anotherKey": "anotherValue" + } + } + }, + "responses": { + "201": { + "body": { + "properties": { + "lenses": { + "aLens": { + "order": 1, + "parts": { + "aPart": { + "position": { + "x": 1, + "y": 2, + "rowSpan": 4, + "colSpan": 3 + } + }, + "bPart": { + "position": { + "x": 5, + "y": 5, + "rowSpan": 6, + "colSpan": 6 + } + } + } + }, + "bLens": { + "order": 2, + "parts": {} + } + }, + "metadata": { + "metadata": { + "X": 4, + "Y": 3, + "RowSpan": 1, + "ColSpan": 2 + } + } + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.Portal/dashboards/testDashboard", + "name": "testDashboard", + "type": "Microsoft.Portal/dashboards", + "location": "eastus", + "tags": { + "aKey": "aValue", + "anotherKey": "anotherValue" + } + } + }, + "200": { + "body": { + "properties": { + "lenses": { + "aLens": { + "order": 1, + "parts": { + "aPart": { + "position": { + "x": 1, + "y": 2, + "rowSpan": 4, + "colSpan": 3 + } + }, + "bPart": { + "position": { + "x": 5, + "y": 5, + "rowSpan": 6, + "colSpan": 6 + } + } + } + }, + "bLens": { + "order": 2, + "parts": {} + } + }, + "metadata": { + "metadata": { + "X": 4, + "Y": 3, + "RowSpan": 1, + "ColSpan": 2 + } + } + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.Portal/dashboards/testDashboard", + "name": "testDashboard", + "type": "Microsoft.Portal/dashboards", + "location": "eastus", + "tags": { + "aKey": "aValue", + "anotherKey": "anotherValue" + } + } + } + } +} \ No newline at end of file diff --git a/specification/portal/resource-manager/Microsoft.Portal/preview/2015-11-01-preview/examples/deleteDashboard.json b/specification/portal/resource-manager/Microsoft.Portal/preview/2015-11-01-preview/examples/deleteDashboard.json new file mode 100644 index 000000000000..a0ecf3b5b255 --- /dev/null +++ b/specification/portal/resource-manager/Microsoft.Portal/preview/2015-11-01-preview/examples/deleteDashboard.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "dashboardName": "testDashboard", + "resourceGroupName": "testRG", + "api-version": "2015-11-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": {}, + "204": {} + } +} \ No newline at end of file diff --git a/specification/portal/resource-manager/Microsoft.Portal/preview/2015-11-01-preview/examples/getDashboard.json b/specification/portal/resource-manager/Microsoft.Portal/preview/2015-11-01-preview/examples/getDashboard.json new file mode 100644 index 000000000000..32dde93c57d3 --- /dev/null +++ b/specification/portal/resource-manager/Microsoft.Portal/preview/2015-11-01-preview/examples/getDashboard.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "dashboardName": "testDashboard", + "resourceGroupName": "testRG", + "api-version": "2015-11-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "properties": { + "lenses": { + "aLens": { + "order": 1, + "parts": { + "aPart": { + "position": { + "x": 1, + "y": 2, + "rowSpan": 4, + "colSpan": 3 + } + }, + "bPart": { + "position": { + "x": 5, + "y": 5, + "rowSpan": 6, + "colSpan": 6 + } + } + } + }, + "bLens": { + "order": 2, + "parts": {} + } + }, + "metadata": { + "metadata": { + "X": 4, + "Y": 3, + "RowSpan": 1, + "ColSpan": 2 + } + } + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.Portal/dashboards/testDashboard", + "name": "testDashboard", + "type": "Microsoft.Portal/dashboards", + "location": "eastus", + "tags": { + "aKey": "aValue", + "anotherKey": "anotherValue" + } + } + } + } +} \ No newline at end of file diff --git a/specification/portal/resource-manager/Microsoft.Portal/preview/2015-11-01-preview/examples/listDashboardsByResourceGroup.json b/specification/portal/resource-manager/Microsoft.Portal/preview/2015-11-01-preview/examples/listDashboardsByResourceGroup.json new file mode 100644 index 000000000000..17ed451aaf49 --- /dev/null +++ b/specification/portal/resource-manager/Microsoft.Portal/preview/2015-11-01-preview/examples/listDashboardsByResourceGroup.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "resourceGroupName": "testRG", + "api-version": "2015-11-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "lenses": { + "aLens": { + "order": 1, + "parts": { + "aPart": { + "position": { + "x": 1, + "y": 2, + "rowSpan": 4, + "colSpan": 3 + } + }, + "bPart": { + "position": { + "x": 5, + "y": 5, + "rowSpan": 6, + "colSpan": 6 + } + } + } + }, + "bLens": { + "order": 2, + "parts": {} + } + }, + "metadata": { + "metadata": { + "X": 4, + "Y": 3, + "RowSpan": 1, + "ColSpan": 2 + } + } + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.Portal/dashboards/testDashboard", + "name": "testDashboard", + "type": "Microsoft.Portal/dashboards", + "location": "eastus", + "tags": { + "aKey": "aValue", + "anotherKey": "anotherValue" + } + }, + { + "properties": { + "lenses": { + "aLens": { + "order": 1, + "parts": { + "aPart": { + "position": { + "x": 1, + "y": 2, + "rowSpan": 4, + "colSpan": 3 + } + }, + "bPart": { + "position": { + "x": 5, + "y": 5, + "rowSpan": 6, + "colSpan": 6 + } + } + } + }, + "bLens": { + "order": 2, + "parts": {} + } + }, + "metadata": { + "metadata": { + "X": 4, + "Y": 3, + "RowSpan": 1, + "ColSpan": 2 + } + } + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.Portal/dashboards/testDashboard2", + "name": "testDashboard2", + "type": "Microsoft.Portal/dashboards", + "location": "eastus", + "tags": { + "aKey": "aValue", + "anotherKey": "anotherValue" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/portal/resource-manager/Microsoft.Portal/preview/2015-11-01-preview/examples/listDashboardsBySubscription.json b/specification/portal/resource-manager/Microsoft.Portal/preview/2015-11-01-preview/examples/listDashboardsBySubscription.json new file mode 100644 index 000000000000..d6b41f7b74f1 --- /dev/null +++ b/specification/portal/resource-manager/Microsoft.Portal/preview/2015-11-01-preview/examples/listDashboardsBySubscription.json @@ -0,0 +1,108 @@ +{ + "parameters": { + "api-version": "2015-11-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "lenses": { + "aLens": { + "order": 1, + "parts": { + "aPart": { + "position": { + "x": 1, + "y": 2, + "rowSpan": 4, + "colSpan": 3 + } + }, + "bPart": { + "position": { + "x": 5, + "y": 5, + "rowSpan": 6, + "colSpan": 6 + } + } + } + }, + "bLens": { + "order": 2, + "parts": {} + } + }, + "metadata": { + "metadata": { + "X": 4, + "Y": 3, + "RowSpan": 1, + "ColSpan": 2 + } + } + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.Portal/dashboards/testDashboard", + "name": "testDashboard", + "type": "Microsoft.Portal/dashboards", + "location": "eastus", + "tags": { + "aKey": "aValue", + "anotherKey": "anotherValue" + } + }, + { + "properties": { + "lenses": { + "aLens": { + "order": 1, + "parts": { + "aPart": { + "position": { + "x": 1, + "y": 2, + "rowSpan": 4, + "colSpan": 3 + } + }, + "bPart": { + "position": { + "x": 5, + "y": 5, + "rowSpan": 6, + "colSpan": 6 + } + } + } + }, + "bLens": { + "order": 2, + "parts": {} + } + }, + "metadata": { + "metadata": { + "X": 4, + "Y": 3, + "RowSpan": 1, + "ColSpan": 2 + } + } + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.Portal/dashboards/testDashboard2", + "name": "testDashboard2", + "type": "Microsoft.Portal/dashboards", + "location": "eastus", + "tags": { + "aKey": "aValue", + "anotherKey": "anotherValue" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/portal/resource-manager/Microsoft.Portal/preview/2015-11-01-preview/examples/operationsList.json b/specification/portal/resource-manager/Microsoft.Portal/preview/2015-11-01-preview/examples/operationsList.json new file mode 100644 index 000000000000..3da99eaaf665 --- /dev/null +++ b/specification/portal/resource-manager/Microsoft.Portal/preview/2015-11-01-preview/examples/operationsList.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2015-11-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.Portal/dashboards/read", + "isDataAction": "false", + "display": { + "provider": "Microsoft Portal", + "resource": "Dashboards", + "operation": "Get Dashboard", + "description": "Reads the dashboards for the subscription." + } + }, + { + "name": "Microsoft.Portal/dashboards/write", + "isDataAction": "false", + "display": { + "provider": "Microsoft Portal", + "resource": "Dashboards", + "operation": "Set Dashboard", + "description": "Add or modify dashboard to a subscription." + } + }, + { + "name": "Microsoft.Portal/dashboards/delete", + "isDataAction": "false", + "display": { + "provider": "Microsoft Portal", + "resource": "Dashboards", + "operation": "Delete Dashboard", + "description": "Removes the dashboard from the subscription." + } + }, + { + "name": "Microsoft.Portal/register/action", + "isDataAction": "false", + "display": { + "provider": "Microsoft Portal", + "resource": "Portal Resource Provider", + "operation": "Registers the Portal Resource Provider", + "description": "Registers the subscription for the portal resource provider and enables shared dashboards." + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/portal/resource-manager/Microsoft.Portal/preview/2015-11-01-preview/examples/updateDashboard.json b/specification/portal/resource-manager/Microsoft.Portal/preview/2015-11-01-preview/examples/updateDashboard.json new file mode 100644 index 000000000000..abf711698fac --- /dev/null +++ b/specification/portal/resource-manager/Microsoft.Portal/preview/2015-11-01-preview/examples/updateDashboard.json @@ -0,0 +1,65 @@ +{ + "parameters": { + "dashboardName": "testDashboard", + "resourceGroupName": "testRG", + "api-version": "2015-11-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "dashboard": { + "tags": { + "aKey": "bValue", + "anotherKey": "anotherValue2" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "lenses": { + "aLens": { + "order": 1, + "parts": { + "aPart": { + "position": { + "x": 1, + "y": 2, + "rowSpan": 4, + "colSpan": 3 + } + }, + "bPart": { + "position": { + "x": 5, + "y": 5, + "rowSpan": 6, + "colSpan": 6 + } + } + } + }, + "bLens": { + "order": 2, + "parts": {} + } + }, + "metadata": { + "metadata": { + "X": 4, + "Y": 3, + "RowSpan": 1, + "ColSpan": 2 + } + } + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.Portal/dashboards/testDashboard", + "name": "testDashboard", + "type": "Microsoft.Portal/dashboards", + "location": "eastus", + "tags": { + "aKey": "bValue", + "anotherKey": "anotherValue2" + } + } + } + } +} \ No newline at end of file diff --git a/specification/portal/resource-manager/Microsoft.Portal/preview/2015-11-01-preview/portal.json b/specification/portal/resource-manager/Microsoft.Portal/preview/2015-11-01-preview/portal.json new file mode 100644 index 000000000000..5bb0cabfb1a8 --- /dev/null +++ b/specification/portal/resource-manager/Microsoft.Portal/preview/2015-11-01-preview/portal.json @@ -0,0 +1,676 @@ +{ + "swagger": "2.0", + "info": { + "version": "2015-11-01-preview", + "title": "portal", + "description": "Allows creation and deletion of Azure Shared Dashboards.", + "x-ms-code-generation-settings": { + "name": "portalClient" + } + }, + "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": { + "/providers/Microsoft.Portal/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "x-ms-examples": { + "List the portal operations": { + "$ref": "examples/operationsList.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "description": "The Microsoft Portal operations API.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Describe the result of a successful operation.", + "schema": { + "$ref": "#/definitions/ResourceProviderOperationList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Portal/dashboards/{dashboardName}": { + "put": { + "tags": [ + "Dashboard" + ], + "operationId": "Dashboards_CreateOrUpdate", + "x-ms-examples": { + "Create or update a Dashboard": { + "$ref": "examples/createOrUpdateDashboard.json" + } + }, + "description": "Creates or updates a Dashboard.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/DashboardNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "dashboard", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Dashboard" + }, + "description": "The parameters required to create or update a dashboard." + } + ], + "responses": { + "201": { + "description": "Created response definition. Resource has been created", + "schema": { + "$ref": "#/definitions/Dashboard" + } + }, + "200": { + "description": "Resource already exists.", + "schema": { + "$ref": "#/definitions/Dashboard" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + }, + "delete": { + "tags": [ + "Dashboard" + ], + "operationId": "Dashboards_Delete", + "x-ms-examples": { + "Delete a Dashboard": { + "$ref": "examples/deleteDashboard.json" + } + }, + "description": "Deletes the Dashboard.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/DashboardNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK response definition." + }, + "204": { + "description": "OK resource was not found." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + }, + "get": { + "tags": [ + "Dashboard" + ], + "operationId": "Dashboards_Get", + "x-ms-examples": { + "Get a Dashboard": { + "$ref": "examples/getDashboard.json" + } + }, + "description": "Gets the Dashboard.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/DashboardNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK response definition.", + "schema": { + "$ref": "#/definitions/Dashboard" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + }, + "patch": { + "tags": [ + "Dashboard" + ], + "operationId": "Dashboards_Update", + "x-ms-examples": { + "Update a Dashboard": { + "$ref": "examples/updateDashboard.json" + } + }, + "description": "Updates an existing Dashboard.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/DashboardNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "dashboard", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PatchableDashboard" + }, + "description": "The updatable fields of a Dashboard." + } + ], + "responses": { + "200": { + "description": "OK response definition.", + "schema": { + "$ref": "#/definitions/Dashboard" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Portal/dashboards": { + "get": { + "tags": [ + "Dashboard" + ], + "operationId": "Dashboards_ListByResourceGroup", + "x-ms-examples": { + "List all custom resource providers on the resourceGroup": { + "$ref": "examples/listDashboardsByResourceGroup.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "description": "Gets all the Dashboards within a resource group.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of Dashboards.", + "schema": { + "$ref": "#/definitions/DashboardListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Portal/dashboards": { + "get": { + "tags": [ + "Dashboard" + ], + "operationId": "Dashboards_ListBySubscription", + "x-ms-examples": { + "List all custom resource providers on the subscription": { + "$ref": "examples/listDashboardsBySubscription.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "description": "Gets all the dashboards within a subscription.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of dashboards.", + "schema": { + "$ref": "#/definitions/DashboardListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + } + } + }, + "definitions": { + "DashboardListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Dashboard" + }, + "description": "The array of custom resource provider manifests." + }, + "nextLink": { + "type": "string", + "description": "The URL to use for getting the next set of results." + } + }, + "description": "List of dashboards." + }, + "DashboardParts": { + "description": "A dashboard part.", + "required": [ + "position" + ], + "properties": { + "position": { + "type": "object", + "required": [ + "x", + "y", + "rowSpan", + "colSpan" + ], + "description": "The dashboard's part position.", + "properties": { + "x": { + "type": "number", + "description": "The dashboard's part x coordinate." + }, + "y": { + "type": "number", + "description": "The dashboard's part y coordinate." + }, + "rowSpan": { + "type": "number", + "description": "The dashboard's part row span." + }, + "colSpan": { + "type": "number", + "description": "The dashboard's part column span." + }, + "metadata": { + "description": "The dashboard part's metadata.", + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + }, + "metadata": { + "description": "The dashboard part's metadata.", + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + }, + "DashboardLens": { + "description": "A dashboard lens.", + "required": [ + "order", + "parts" + ], + "properties": { + "order": { + "type": "integer", + "description": "The lens order." + }, + "parts": { + "type": "object", + "description": "The dashboard parts.", + "additionalProperties": { + "$ref": "#/definitions/DashboardParts" + } + }, + "metadata": { + "description": "The dashboard len's metadata.", + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + }, + "DashboardProperties": { + "description": "The shared dashboard properties.", + "properties": { + "lenses": { + "type": "object", + "description": "The dashboard lenses.", + "additionalProperties": { + "$ref": "#/definitions/DashboardLens" + } + }, + "metadata": { + "description": "The dashboard metadata.", + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + }, + "Dashboard": { + "description": "The shared dashboard resource definition.", + "x-ms-azure-resource": true, + "x-ms-client-flatten": true, + "required": [ + "location" + ], + "properties": { + "properties": { + "description": "The shared dashboard properties.", + "x-ms-client-flatten": true, + "$ref": "#/definitions/DashboardProperties" + }, + "id": { + "readOnly": true, + "type": "string", + "description": "Resource Id" + }, + "name": { + "readOnly": true, + "type": "string", + "description": "Resource name" + }, + "type": { + "readOnly": true, + "type": "string", + "description": "Resource type" + }, + "location": { + "type": "string", + "description": "Resource location", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + } + } + }, + "PatchableDashboard": { + "description": "The shared dashboard resource definition.", + "x-ms-azure-resource": true, + "x-ms-client-flatten": true, + "properties": { + "properties": { + "description": "The shared dashboard properties.", + "x-ms-client-flatten": true, + "$ref": "#/definitions/DashboardProperties" + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + } + } + }, + "ResourceProviderOperationList": { + "description": "Results of the request to list operations.", + "readOnly": true, + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ResourceProviderOperation" + }, + "description": "List of operations supported by this resource provider." + }, + "nextLink": { + "type": "string", + "description": "The URL to use for getting the next set of results." + } + } + }, + "ResourceProviderOperation": { + "description": "Supported operations of this resource provider.", + "readOnly": true, + "properties": { + "name": { + "description": "Operation name, in format of {provider}/{resource}/{operation}", + "type": "string" + }, + "isDataAction": { + "description": "Indicates whether the operation applies to data-plane.", + "type": "string" + }, + "display": { + "description": "Display metadata associated with the operation.", + "properties": { + "provider": { + "description": "Resource provider: Microsoft Custom Providers.", + "type": "string" + }, + "resource": { + "description": "Resource on which the operation is performed.", + "type": "string" + }, + "operation": { + "description": "Type of operation: get, read, delete, etc.", + "type": "string" + }, + "description": { + "description": "Description of this operation.", + "type": "string" + } + } + } + } + }, + "ErrorResponse": { + "description": "Error response.", + "properties": { + "error": { + "$ref": "#/definitions/ErrorDefinition", + "description": "The error details." + } + } + }, + "ErrorDefinition": { + "description": "Error definition.", + "properties": { + "code": { + "description": "Service specific error code which serves as the substatus for the HTTP error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Description of the error.", + "type": "string", + "readOnly": true + }, + "details": { + "description": "Internal error details.", + "type": "array", + "items": { + "$ref": "#/definitions/ErrorDefinition" + }, + "readOnly": true + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)" + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group.", + "x-ms-parameter-location": "method" + }, + "DashboardNameParameter": { + "name": "dashboardName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the dashboard.", + "minLength": 3, + "maxLength": 64, + "x-ms-parameter-location": "method" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to be used with the HTTP request." + } + } +} \ No newline at end of file diff --git a/specification/portal/resource-manager/readme.go.md b/specification/portal/resource-manager/readme.go.md new file mode 100644 index 000000000000..2f294d04a728 --- /dev/null +++ b/specification/portal/resource-manager/readme.go.md @@ -0,0 +1,19 @@ +## Go + +These settings apply only when `--go` is specified on the command line. + +```yaml $(go) +go: + license-header: MICROSOFT_APACHE_NO_VERSION + namespace: portal + clear-output-folder: true +``` + +### Tag: package-2015-11-01-preview and go + +These settings apply only when `--tag=package-2015-11-01-preview --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +```yaml $(tag) == 'package-2015-11-01-preview' && $(go) +output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2015-11-01-preview/$(namespace) +``` diff --git a/specification/portal/resource-manager/readme.md b/specification/portal/resource-manager/readme.md new file mode 100644 index 000000000000..09102be41ac4 --- /dev/null +++ b/specification/portal/resource-manager/readme.md @@ -0,0 +1,84 @@ +# portal + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for portal. + +## Getting Started + +To build the SDKs for My API, simply install AutoRest via `npm` (`npm install -g autorest`) and then run: + +> `autorest readme.md` + +To see additional help and options, run: + +> `autorest --help` + +For other options on installation see [Installing AutoRest](https://aka.ms/autorest/install) on the AutoRest github page. + +--- + +## Configuration + +### Basic Information + +These are the global settings for the portal. + +```yaml +openapi-type: arm +tag: package-2015-11-01-preview +``` + +### Tag: package-2015-11-01-preview + +These settings apply only when `--tag=package-2015-11-01-preview` is specified on the command line. + +```yaml $(tag) == 'package-2015-11-01-preview' +input-file: + - Microsoft.Portal/preview/2015-11-01-preview/portal.json +``` + +--- + +# Code Generation + +## Swagger to SDK + +This section describes what SDK should be generated by the automatic system. +This is not used by Autorest itself. + +```yaml $(swagger-to-sdk) +swagger-to-sdk: + - repo: azure-sdk-for-python + - repo: azure-sdk-for-java + - repo: azure-sdk-for-go + - repo: azure-sdk-for-node + - repo: azure-sdk-for-js + - repo: azure-sdk-for-ruby + after_scripts: + - bundle install && rake arm:regen_all_profiles['azure_mgmt_portal'] +``` + +## Go + +See configuration in [readme.go.md](./readme.go.md) + +## Python + +See configuration in [readme.python.md](./readme.python.md) + +## Ruby + +See configuration in [readme.ruby.md](./readme.ruby.md) + +## TypeScript + +See configuration in [readme.typescript.md](./readme.typescript.md) + +## CSharp + +See configuration in [readme.csharp.md](./readme.csharp.md) + +## NodeJS + +See configuration in [readme.nodejs.md](./readme.nodejs.md) diff --git a/specification/portal/resource-manager/readme.nodejs.md b/specification/portal/resource-manager/readme.nodejs.md new file mode 100644 index 000000000000..c108530e393e --- /dev/null +++ b/specification/portal/resource-manager/readme.nodejs.md @@ -0,0 +1,15 @@ +## Node.js + +These settings apply only when `--nodejs` is specified on the command line. +Please also specify `--node-sdk-folder=`. + +```yaml $(nodejs) +nodejs: + azure-arm: true + payload-flattening-threshold: 1 + generate-license-txt: true + generate-package-json: true + generate-readme-md: false + package-name: portal + output-folder: $(node-sdk-folder)/portal/Generated +``` diff --git a/specification/portal/resource-manager/readme.python.md b/specification/portal/resource-manager/readme.python.md new file mode 100644 index 000000000000..30501376cea9 --- /dev/null +++ b/specification/portal/resource-manager/readme.python.md @@ -0,0 +1,21 @@ +## Python + +These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. + +```yaml $(python) +python: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 2 + namespace: Microsoft.Portal + package-name: portal + package-version: 2015-11-01-preview + clear-output-folder: true +``` + +```yaml $(python) +python: + no-namespace-folders: true + output-folder: $(python-sdks-folder)/azure-mgmt/portal +``` diff --git a/specification/portal/resource-manager/readme.ruby.md b/specification/portal/resource-manager/readme.ruby.md new file mode 100644 index 000000000000..786d34bca721 --- /dev/null +++ b/specification/portal/resource-manager/readme.ruby.md @@ -0,0 +1,19 @@ +## Ruby + +These settings apply only when `--ruby` is specified on the command line. + +```yaml +package-name: azure_mgmt_portal +package-version: 2015-11-01-preview +azure-arm: true +``` + +### Tag: package-2015-11-01-preview and ruby + +These settings apply only when `--tag=package-2015-11-01-preview --ruby` is specified on the command line. +Please also specify `--ruby-sdks-folder=`. + +```yaml $(tag) == 'package-2015-11-01-preview' && $(ruby) +namespace: Microsoft.Portal +output-folder: $(ruby-sdks-folder)/portal +``` diff --git a/specification/portal/resource-manager/readme.typescript.md b/specification/portal/resource-manager/readme.typescript.md new file mode 100644 index 000000000000..0a91f375800e --- /dev/null +++ b/specification/portal/resource-manager/readme.typescript.md @@ -0,0 +1,13 @@ +## TypeScript + +These settings apply only when `--typescript` is specified on the command line. +Please also specify `--typescript-sdks-folder=`. + +```yaml $(typescript) +typescript: + azure-arm: true + package-name: "portal" + output-folder: "$(typescript-sdks-folder)/packages/portal" + payload-flattening-threshold: 1 + generate-metadata: true +```