diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_Create.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_Create.json new file mode 100644 index 000000000000..d32b526031bf --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_Create.json @@ -0,0 +1,85 @@ +{ + "parameters": { + "api-version": "2021-09-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "workspaceName": "myWorkspace", + "requestBody": { + "sku": { + "name": "Standard" + }, + "properties": { + "provisioningState": "Accepted", + "zoneRedundancy": "Enabled" + }, + "identity": { + "type": "systemAssigned" + }, + "tags": { + "Environment": "Dev" + }, + "location": "West US" + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/grafana/myWorkspace", + "name": "myWorkspace", + "type": "Microsoft.Dashboard/grafana", + "sku": { + "name": "Standard" + }, + "properties": { + "provisioningState": "Succeeded", + "grafanaVersion": "7.1", + "endpoint": "my.azgrafana.io", + "zoneRedundancy": "Enabled" + }, + "identity": { + "type": "SystemAssigned" + }, + "tags": { + "Environment": "Dev" + }, + "location": "West US", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-02-03T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-02-04T02:03:01.1974346Z" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/grafana/myWorkspace", + "name": "myWorkspace", + "type": "Microsoft.Dashboard/grafana", + "sku": { + "name": "Standard" + }, + "properties": { + "provisioningState": "Accepted", + "grafanaVersion": "7.1", + "endpoint": "my.azgrafana.io", + "zoneRedundancy": "Enabled" + }, + "tags": { + "Environment": "Dev" + }, + "location": "West US", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-02-03T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-02-04T02:03:01.1974346Z" + } + } + } + } +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_Delete.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_Delete.json new file mode 100644 index 000000000000..82362f6340c1 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_Delete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "api-version": "2021-09-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "workspaceName": "myWorkspace" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_Get.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_Get.json new file mode 100644 index 000000000000..d02546640831 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_Get.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2021-09-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "workspaceName": "myWorkspace" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/grafana/myWorkspace", + "name": "myWorkspace", + "type": "Microsoft.Dashboard/grafana", + "sku": { + "name": "Standard" + }, + "properties": { + "provisioningState": "Succeeded", + "grafanaVersion": "7.1", + "endpoint": "my.azgrafana.io", + "zoneRedundancy": "Enabled" + }, + "tags": { + "Environment": "Dev" + }, + "location": "West US", + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2020-02-03T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-02-04T02:03:01.1974346Z" + } + } + } + } +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_List.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_List.json new file mode 100644 index 000000000000..de3a486126f3 --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_List.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2021-09-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/grafana/myWorkspace", + "name": "myWorkspace", + "type": "Microsoft.Dashboard/grafana", + "sku": { + "name": "Standard" + }, + "properties": { + "provisioningState": "Succeeded", + "grafanaVersion": "7.1", + "endpoint": "my.azgrafana.io", + "zoneRedundancy": "Enabled" + }, + "tags": { + "Environment": "Dev" + }, + "location": "West US" + } + ] + } + } + } +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_ListByResourceGroup.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_ListByResourceGroup.json new file mode 100644 index 000000000000..a6b44de2051e --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_ListByResourceGroup.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2021-09-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/grafana/myWorkspace", + "name": "myWorkspace", + "type": "Microsoft.Dashboard/grafana", + "sku": { + "name": "Standard" + }, + "properties": { + "provisioningState": "Succeeded", + "grafanaVersion": "7.1", + "endpoint": "my.azgrafana.io", + "zoneRedundancy": "Enabled" + }, + "tags": { + "Environment": "Dev" + }, + "location": "West US" + } + ] + } + } + } +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_Update.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_Update.json new file mode 100644 index 000000000000..9da2de0de77d --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Grafana_Update.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2021-09-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "workspaceName": "myWorkspace", + "requestBody": { + "tags": { + "Environment": "Dev 2" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/grafana/myWorkspace", + "name": "myWorkspace", + "type": "Microsoft.Dashboard/grafana", + "sku": { + "name": "Standard" + }, + "properties": { + "provisioningState": "Succeeded", + "grafanaVersion": "7.1", + "endpoint": "my.azgrafana.io", + "zoneRedundancy": "Enabled" + }, + "tags": { + "Environment": "Dev 2" + }, + "location": "West US" + } + } + } +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Operations_List.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Operations_List.json new file mode 100644 index 000000000000..cf2cb2e7a4ad --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/examples/Operations_List.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2021-09-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.Dashboard/grafana/write", + "display": { + "provider": "Microsoft.Dashboard", + "resource": "grafana", + "operation": "write", + "description": "Write grafana workspace resource" + }, + "origin": "user", + "actionType": "Internal" + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/grafana.json b/specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/grafana.json new file mode 100644 index 000000000000..85d244fc6f7e --- /dev/null +++ b/specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2021-09-01-preview/grafana.json @@ -0,0 +1,753 @@ +{ + "swagger": "2.0", + "info": { + "title": "Microsoft.Dashboard", + "description": "The Microsoft.Dashboard Rest API spec.", + "version": "2021-09-01-preview" + }, + "paths": { + "/providers/Microsoft.Dashboard/operations": { + "get": { + "tags": [ + "GrafanaResource" + ], + "summary": "List all available API operations provided by Microsoft.Dashboard.", + "operationId": "Operations_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. Return all available API operations provided by Microsoft.Dashboard.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Operations_List": { + "$ref": "./examples/Operations_List.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Dashboard/grafana": { + "get": { + "tags": [ + "GrafanaResource" + ], + "summary": "List all resources of workspaces for Grafana under the specified subscription.", + "operationId": "Grafana_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. Return all resources of workspaces for Grafana under the specified subscription.", + "schema": { + "$ref": "#/definitions/GrafanaResourceListResponse" + } + }, + "default": { + "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Grafana_List": { + "$ref": "./examples/Grafana_List.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana": { + "get": { + "tags": [ + "GrafanaResource" + ], + "summary": "List all resources of workspaces for Grafana under the specified resource group.", + "operationId": "Grafana_ListByResourceGroup", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. Return all resources of workspaces for Grafana under the given resource group.", + "schema": { + "$ref": "#/definitions/GrafanaResourceListResponse" + } + }, + "default": { + "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Grafana_ListByResourceGroup": { + "$ref": "./examples/Grafana_ListByResourceGroup.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}": { + "get": { + "tags": [ + "GrafanaResource" + ], + "summary": "Get the properties of a specific workspace for Grafana resource.", + "operationId": "Grafana_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/WorkspaceNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. Return the properties of the required workspace for Grafana resource.", + "schema": { + "$ref": "#/definitions/GrafanaResource" + } + }, + "default": { + "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Grafana_Get": { + "$ref": "./examples/Grafana_Get.json" + } + } + }, + "put": { + "tags": [ + "GrafanaResource" + ], + "summary": "Create or update a workspace for Grafana resource. This API is idempotent, so user can either create a new grafana or update an existing grafana.", + "operationId": "Grafana_Create", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/WorkspaceNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/GrafanaResource" + } + } + ], + "responses": { + "200": { + "description": "OK. Successfully create a workspace for Grafana resource.", + "schema": { + "$ref": "#/definitions/GrafanaResource" + } + }, + "201": { + "description": "Created. The operation was successfully started and will complete asynchronously.", + "schema": { + "$ref": "#/definitions/GrafanaResource" + } + }, + "default": { + "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Grafana_Create": { + "$ref": "./examples/Grafana_Create.json" + } + } + }, + "patch": { + "tags": [ + "GrafanaResource" + ], + "summary": "Update a workspace for Grafana resource.", + "operationId": "Grafana_Update", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/WorkspaceNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/GrafanaResourceUpdateParameters" + } + } + ], + "responses": { + "200": { + "description": "OK. Successfully update the workspace for Grafana resource.", + "schema": { + "$ref": "#/definitions/GrafanaResource" + } + }, + "default": { + "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Grafana_Update": { + "$ref": "./examples/Grafana_Update.json" + } + } + }, + "delete": { + "tags": [ + "GrafanaResource" + ], + "summary": "Delete a workspace for Grafana resource.", + "operationId": "Grafana_Delete", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/WorkspaceNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The workspace for Grafana resource is deleted." + }, + "202": { + "description": "Accepted. The operation is accepted and will be completed asynchronously." + }, + "204": { + "description": "No Content" + }, + "default": { + "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Grafana_Delete": { + "$ref": "./examples/Grafana_Delete.json" + } + } + } + } + }, + "definitions": { + "ActionType": { + "description": "Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "enum": [ + "Internal" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "modelAsString": true, + "name": "ActionType" + } + }, + "CreatedByType": { + "description": "The type of identity that created the resource.", + "enum": [ + "User", + "Application", + "ManagedIdentity", + "Key" + ], + "type": "string", + "x-ms-enum": { + "modelAsString": true, + "name": "CreatedByType" + } + }, + "GrafanaResource": { + "type": "object", + "description": "The grafana resource type.", + "x-ms-azure-resource": true, + "properties": { + "id": { + "description": "ARM id of the grafana resource", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Name of the grafana resource.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "The type of the grafana resource.", + "type": "string", + "readOnly": true + }, + "sku": { + "description": "The Sku of the grafana resource.", + "$ref": "#/definitions/ResourceSku" + }, + "properties": { + "description": "Properties specific to the grafana resource.", + "$ref": "#/definitions/GrafanaResourceProperties" + }, + "identity": { + "description": "The managed identity of the grafana resource.", + "$ref": "#/definitions/ManagedIdentity" + }, + "systemData": { + "description": "The system meta data relating to this grafana resource.", + "$ref": "#/definitions/SystemData" + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "The tags for grafana resource." + }, + "location": { + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ], + "description": "The geo-location where the grafana resource lives" + } + } + }, + "GrafanaResourceListResponse": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/GrafanaResource" + } + }, + "nextLink": { + "type": "string" + } + } + }, + "GrafanaResourceProperties": { + "type": "object", + "description": "Properties specific to the grafana resource.", + "properties": { + "provisioningState": { + "description": "Provisioning state of the resource.", + "$ref": "#/definitions/ProvisioningState" + }, + "grafanaVersion": { + "description": "The Grafana software version.", + "type": "string", + "readOnly": true + }, + "endpoint": { + "description": "The endpoint of the Grafana instance.", + "type": "string", + "readOnly": true + }, + "zoneRedundancy": { + "$ref": "#/definitions/ZoneRedundancy" + } + } + }, + "GrafanaResourceUpdateParameters": { + "type": "object", + "description": "The parameters for a PATCH request to a grafana resource.", + "properties": { + "identity": { + "description": "The managed identity of the grafana resource.", + "$ref": "#/definitions/ManagedIdentity" + }, + "tags": { + "type": "object", + "description": "The new tags of the grafana resource.", + "additionalProperties": { + "type": "string" + } + } + } + }, + "LastModifiedByType": { + "enum": [ + "User", + "Application", + "ManagedIdentity", + "Key" + ], + "type": "string", + "x-ms-enum": { + "modelAsString": true, + "name": "LastModifiedByType" + } + }, + "ManagedIdentity": { + "description": "The managed identity of a resource.", + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/ManagedIdentityTypes" + }, + "principalId": { + "description": "The principal id of the system assigned identity.", + "type": "string", + "readOnly": true + }, + "tenantId": { + "description": "The tenant id of the system assigned identity.", + "type": "string", + "readOnly": true + }, + "userAssignedIdentities": { + "description": "Dictionary of user assigned identities.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/UserAssignedIdentity" + } + } + } + }, + "ManagedIdentityTypes": { + "description": "The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the resource.", + "enum": [ + "None", + "SystemAssigned" + ], + "type": "string", + "x-ms-enum": { + "name": "IdentityType", + "modelAsString": true + } + }, + "OperationDisplay": { + "description": "Localized display information for this particular operation.", + "type": "object", + "properties": { + "provider": { + "description": "The localized friendly form of the resource provider name, i.e., Microsoft.Dashboard.", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "The localized friendly name of the resource type related to this operation, e.g., 'grafana'.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "Operation type, e.g., read, write, delete, etc.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "Description of the operation, e.g., 'Read grafana'.", + "type": "string", + "readOnly": true + } + } + }, + "OperationListResult": { + "description": "A list of REST API operations supported by Microsoft.Dashboard provider. It contains an URL link to get the next set of results.", + "type": "object", + "properties": { + "value": { + "description": "List of operations supported by the Microsoft.Dashboard provider.", + "type": "array", + "x-ms-identifiers": [], + "items": { + "$ref": "#/definitions/OperationResult" + }, + "readOnly": true + }, + "nextLink": { + "description": "URL to get the next set of operation list results if there are any.", + "type": "string", + "readOnly": true + } + } + }, + "OperationResult": { + "description": "A Microsoft.Dashboard REST API operation.", + "type": "object", + "properties": { + "name": { + "description": "Operation name, i.e., {provider}/{resource}/{operation}.", + "type": "string", + "readOnly": true + }, + "isDataAction": { + "description": "Indicates whether the operation applies to data-plane. Set \"true\" for data-plane operations and \"false\" for ARM/control-plane operations.", + "type": "boolean", + "readOnly": true + }, + "display": { + "$ref": "#/definitions/OperationDisplay" + }, + "origin": { + "$ref": "#/definitions/Origin" + }, + "actionType": { + "$ref": "#/definitions/ActionType" + } + } + }, + "Origin": { + "description": "The intended executor of the operation.", + "enum": [ + "user", + "system", + "user,system" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "modelAsString": true, + "name": "Origin" + } + }, + "ProvisioningState": { + "enum": [ + "Accepted", + "Creating", + "Updating", + "Deleting", + "Succeeded", + "Failed", + "Canceled", + "Deleted", + "NotSpecified" + ], + "type": "string", + "x-ms-enum": { + "modelAsString": true, + "name": "ProvisioningState" + } + }, + "ResourceSku": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + "SystemData": { + "type": "object", + "readOnly": true, + "properties": { + "createdBy": { + "type": "string" + }, + "createdByType": { + "$ref": "#/definitions/CreatedByType" + }, + "createdAt": { + "format": "date-time", + "type": "string" + }, + "lastModifiedBy": { + "type": "string" + }, + "lastModifiedByType": { + "$ref": "#/definitions/LastModifiedByType" + }, + "lastModifiedAt": { + "format": "date-time", + "type": "string" + } + } + }, + "ZoneRedundancy": { + "enum": [ + "Disabled", + "Enabled" + ], + "default": "Disabled", + "type": "string", + "x-ms-enum": { + "modelAsString": true, + "name": "ZoneRedundancy" + } + }, + "UserAssignedIdentity": { + "type": "object", + "properties": { + "principalId": { + "description": "The principal id of user assigned identity.", + "type": "string", + "readOnly": true + }, + "clientId": { + "description": "The client id of user assigned identity.", + "type": "string", + "readOnly": true + } + } + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + }, + "description": "Azure Active Directory OAuth2 Flow" + } + }, + "parameters": { + "WorkspaceNameParameter": { + "in": "path", + "name": "workspaceName", + "description": "The name of Azure Managed Workspace for Grafana.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "default": "2021-09-01-preview", + "description": "The API version to be used with the HTTP request (e.g. YYYY-MM-DD).", + "minLength": 1 + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "minLength": 1, + "x-ms-parameter-location": "method", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group. The name is case insensitive." + }, + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "minLength": 1, + "x-ms-parameter-location": "method", + "description": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call." + } + } +} diff --git a/specification/dashboard/resource-manager/readme.csharp.md b/specification/dashboard/resource-manager/readme.csharp.md new file mode 100644 index 000000000000..79d82b928253 --- /dev/null +++ b/specification/dashboard/resource-manager/readme.csharp.md @@ -0,0 +1,15 @@ +## C# + +These settings apply only when `--csharp` is specified on the command line. +Please also specify `--csharp-sdks-folder=`. + +```yaml $(csharp) +csharp: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 1 + clear-output-folder: true + client-side-validation: false + namespace: Microsoft.Azure.Management.Dashboard + output-folder: $(csharp-sdks-folder)/dashboard/Microsoft.Azure.Management.Dashboard/src/Generated +``` diff --git a/specification/dashboard/resource-manager/readme.go.md b/specification/dashboard/resource-manager/readme.go.md new file mode 100644 index 000000000000..6f4c7811b182 --- /dev/null +++ b/specification/dashboard/resource-manager/readme.go.md @@ -0,0 +1,11 @@ +## Go + +These settings apply only when `--go` is specified on the command line. + +```yaml $(go) && $(track2) +azure-arm: true +license-header: MICROSOFT_MIT_NO_VERSION +module-name: sdk/resourcemanager/dashboard/armdashboard +module: github.com/Azure/azure-sdk-for-go/$(module-name) +output-folder: $(go-sdk-folder)/$(module-name) +``` diff --git a/specification/dashboard/resource-manager/readme.java.md b/specification/dashboard/resource-manager/readme.java.md new file mode 100644 index 000000000000..8f81a1c9b7cc --- /dev/null +++ b/specification/dashboard/resource-manager/readme.java.md @@ -0,0 +1,33 @@ +## Java + +These settings apply only when `--java` is specified on the command line. +Please also specify `--azure-libraries-for-java-folder=`. + +``` yaml $(java) +azure-arm: true +fluent: true +namespace: com.microsoft.azure.management.dashboard +license-header: MICROSOFT_MIT_NO_CODEGEN +payload-flattening-threshold: 1 +output-folder: $(azure-libraries-for-java-folder)/azure-mgmt-dashboard +``` + +### Java multi-api + +``` yaml $(java) && $(multiapi) +batch: + - tag: package-2021-09-01-preview +``` + +### Tag: package-2021-09-01-preview and java + +These settings apply only when `--tag=package-2021-09-01-preview --java` is specified on the command line. +Please also specify `--azure-libraries-for-java=`. + +``` yaml $(tag) == 'package-2021-09-01-preview' && $(java) && $(multiapi) +java: + namespace: com.microsoft.azure.management.dashboard.v2021_09_01_preview + output-folder: $(azure-libraries-for-java-folder)/sdk/dashboard/mgmt-v2021_09_01_preview +regenerate-manager: true +generate-interface: true +``` \ No newline at end of file diff --git a/specification/dashboard/resource-manager/readme.md b/specification/dashboard/resource-manager/readme.md new file mode 100644 index 000000000000..89d375ae98eb --- /dev/null +++ b/specification/dashboard/resource-manager/readme.md @@ -0,0 +1,53 @@ +# Dashboard + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for Dashboard. + +--- +## Getting Started +To build the SDK for Dashboard, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run: + +> `autorest` + +To see additional help and options, run: + +> `autorest --help` + +--- +## Configuration +### Basic Information +These are the global settings for the Dashboard API. + +```yaml +title: DashboardManagementClient +openapi-type: arm +openapi-subtype: rpaas +tag: package-2021-09-01-preview +``` + +### Tag: package-2021-09-01-preview + +These settings apply only when `--tag=package-2021-09-01-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2021-09-01-preview' +input-file: + - Microsoft.Dashboard/preview/2021-09-01-preview/grafana.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-net + - repo: azure-sdk-for-python-track2 + - repo: azure-sdk-for-go-track2 + - repo: azure-resource-manager-schemas + - repo: azure-sdk-for-js + - repo: azure-sdk-for-java +``` diff --git a/specification/dashboard/resource-manager/readme.python.md b/specification/dashboard/resource-manager/readme.python.md new file mode 100644 index 000000000000..318a46d8c555 --- /dev/null +++ b/specification/dashboard/resource-manager/readme.python.md @@ -0,0 +1,23 @@ +## Python + +These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. + +``` yaml $(track2) +azure-arm: true +license-header: MICROSOFT_MIT_NO_VERSION +package-name: azure-mgmt-dashboard +no-namespace-folders: true +package-version: 1.0.0b1 +clear-output-folder: true +``` + +``` yaml $(python-mode) == 'update' && $(track2) +no-namespace-folders: true +output-folder: $(python-sdks-folder)/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard +``` + +``` yaml $(python-mode) == 'create' && $(track2) +basic-setup-py: true +output-folder: $(python-sdks-folder)/dashboard/azure-mgmt-dashboard +``` diff --git a/specification/dashboard/resource-manager/readme.typescript.md b/specification/dashboard/resource-manager/readme.typescript.md new file mode 100644 index 000000000000..f4c6f6b22555 --- /dev/null +++ b/specification/dashboard/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: "@azure/arm-dashboard" + output-folder: "$(typescript-sdks-folder)/sdk/dashboard/arm-dashboard" + payload-flattening-threshold: 1 + generate-metadata: true +```