From e0273df16b61f58d27ac24eeafd659ac6ce8aba4 Mon Sep 17 00:00:00 2001 From: guepsh Date: Sun, 15 Nov 2020 17:17:47 +0200 Subject: [PATCH 1/4] Azure Healthbot swagger . --- custom-words.txt | 1 + .../examples/CheckNameAvailability.json | 18 + .../examples/GetOperations.json | 23 + .../examples/ListBotsByResourceGroup.json | 26 + .../examples/ListBotsBySubscription.json | 26 + .../examples/ResourceCreationPut.json | 44 ++ .../examples/ResourceDeletionDelete.json | 16 + .../examples/ResourceInfoGet.json | 23 + .../examples/ResourceUpdatePatch.json | 30 + .../preview/2020-10-20-preview/healthbot.json | 630 ++++++++++++++++++ .../examples/CheckNameAvailability.json | 18 + .../2020-10-20/examples/GetOperations.json | 23 + .../examples/ListBotsByResourceGroup.json | 26 + .../examples/ListBotsBySubscription.json | 26 + .../examples/ResourceCreationPut.json | 44 ++ .../examples/ResourceDeletionDelete.json | 16 + .../2020-10-20/examples/ResourceInfoGet.json | 23 + .../examples/ResourceUpdatePatch.json | 30 + .../stable/2020-10-20/healthbot.json | 630 ++++++++++++++++++ .../resource-manager/readme.csharp.md | 15 + .../healthbot/resource-manager/readme.md | 87 +++ .../resource-manager/readme.python.md | 21 + .../healthbot/resource-manager/readme.ruby.md | 20 + .../resource-manager/readme.typescript.md | 13 + 24 files changed, 1829 insertions(+) create mode 100644 specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/CheckNameAvailability.json create mode 100644 specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/GetOperations.json create mode 100644 specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ListBotsByResourceGroup.json create mode 100644 specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ListBotsBySubscription.json create mode 100644 specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceCreationPut.json create mode 100644 specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceDeletionDelete.json create mode 100644 specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceInfoGet.json create mode 100644 specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceUpdatePatch.json create mode 100644 specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/healthbot.json create mode 100644 specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/CheckNameAvailability.json create mode 100644 specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/GetOperations.json create mode 100644 specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ListBotsByResourceGroup.json create mode 100644 specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ListBotsBySubscription.json create mode 100644 specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceCreationPut.json create mode 100644 specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceDeletionDelete.json create mode 100644 specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceInfoGet.json create mode 100644 specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceUpdatePatch.json create mode 100644 specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/healthbot.json create mode 100644 specification/healthbot/resource-manager/readme.csharp.md create mode 100644 specification/healthbot/resource-manager/readme.md create mode 100644 specification/healthbot/resource-manager/readme.python.md create mode 100644 specification/healthbot/resource-manager/readme.ruby.md create mode 100644 specification/healthbot/resource-manager/readme.typescript.md diff --git a/custom-words.txt b/custom-words.txt index a162607f2476..87a9be14a20c 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -705,6 +705,7 @@ HCRP HDFS hdinsight Headnode +healthbot healthcareapis Heatbeat heatmap diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/CheckNameAvailability.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/CheckNameAvailability.json new file mode 100644 index 000000000000..53f46488d56d --- /dev/null +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/CheckNameAvailability.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2020-10-20-preview", + "subscriptionId": "subscription-id", + "parameters": { + "name": "MyBot", + "type": "string" + } + }, + "responses": { + "200": { + "body": { + "nameAvailable": true, + "message": "" + } + } + } +} diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/GetOperations.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/GetOperations.json new file mode 100644 index 000000000000..d58415d617ca --- /dev/null +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/GetOperations.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2020-10-20-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.HealthBot/healthbot/botName/read", + "display": { + "provider": "Microsoft Healthcare Bot", + "resource": "Microsoft Healthcare Bot name availability", + "operation": "Check bot name availability", + "description": "Check bot name availability" + }, + "origin": "user,system" + } + ] + } + } + } +} diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ListBotsByResourceGroup.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ListBotsByResourceGroup.json new file mode 100644 index 000000000000..3d9281070422 --- /dev/null +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ListBotsByResourceGroup.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "subscription-id", + "resourceGroupName": "OneResourceGroupName", + "api-version": "2020-10-20-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "East US", + "name": "samplebotname", + "type": "Microsoft.HealthBot/healthBots", + "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", + "properties": { + "displayName": "My Bot", + "planId": "free", + "offerId": "microsofthealthcarebot" + } + } + ] + } + } + } +} diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ListBotsBySubscription.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ListBotsBySubscription.json new file mode 100644 index 000000000000..3d9281070422 --- /dev/null +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ListBotsBySubscription.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "subscription-id", + "resourceGroupName": "OneResourceGroupName", + "api-version": "2020-10-20-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "East US", + "name": "samplebotname", + "type": "Microsoft.HealthBot/healthBots", + "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", + "properties": { + "displayName": "My Bot", + "planId": "free", + "offerId": "microsofthealthcarebot" + } + } + ] + } + } + } +} diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceCreationPut.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceCreationPut.json new file mode 100644 index 000000000000..1cf65064d49d --- /dev/null +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceCreationPut.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "resourceGroupName": "healthbotClient", + "api-version": "2020-10-20-preview", + "subscriptionId": "subid", + "resourceName": "MyBot", + "parameters": { + "properties": { + "displayName": "My Bot", + "planId": "free", + "offerId": "microsofthealthcarebot" + } + } + }, + "responses": { + "200": { + "body": { + "location": "East US", + "name": "samplebotname", + "type": "Microsoft.HealthBot/healthBots", + "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", + "properties": { + "displayName": "My Bot", + "planId": "free", + "offerId": "microsofthealthcarebot" + } + } + }, + "201": { + "body": { + "location": "East US", + "name": "samplebotname", + "type": "Microsoft.HealthBot/healthBots", + "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", + "properties": { + "displayName": "My Bot", + "planId": "free", + "offerId": "microsofthealthcarebot", + "provisioningState": "Provisioning" + } + } + } + } +} diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceDeletionDelete.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceDeletionDelete.json new file mode 100644 index 000000000000..ae9d3941a3f0 --- /dev/null +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceDeletionDelete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "resourceGroupName": "healthbotClient", + "api-version": "2020-10-20-preview", + "subscriptionId": "subid", + "resourceName": "MyBot" + }, + "responses": { + "200": { + "body": { + "status": "OK" + } + }, + "204": {} + } +} diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceInfoGet.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceInfoGet.json new file mode 100644 index 000000000000..012eab237d5d --- /dev/null +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceInfoGet.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "resourceGroupName": "healthbotClient", + "api-version": "2020-10-20-preview", + "subscriptionId": "subid", + "resourceName": "MyBot" + }, + "responses": { + "200": { + "body": { + "location": "East US", + "name": "samplebotname", + "type": "Microsoft.HealthBot/healthBots", + "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", + "properties": { + "displayName": "My Bot", + "planId": "free", + "offerId": "microsofthealthcarebot" + } + } + } + } +} diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceUpdatePatch.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceUpdatePatch.json new file mode 100644 index 000000000000..8a95a07233b6 --- /dev/null +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceUpdatePatch.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "resourceGroupName": "healthbotClient", + "api-version": "2020-10-20-preview", + "subscriptionId": "subid", + "resourceName": "MyBot", + "parameters": { + "properties": { + "displayName": "My Bot", + "planId": "free", + "offerId": "microsofthealthcarebot" + } + } + }, + "responses": { + "200": { + "body": { + "location": "East US", + "name": "samplebotname", + "type": "Microsoft.HealthBot/healthBots", + "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", + "properties": { + "displayName": "My Bot", + "planId": "free", + "offerId": "microsofthealthcarebot" + } + } + } + } +} diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/healthbot.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/healthbot.json new file mode 100644 index 000000000000..3bdc9ff98e96 --- /dev/null +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/healthbot.json @@ -0,0 +1,630 @@ +{ + "swagger": "2.0", + "info": { + "version": "2020-10-20-preview", + "title": "healthbot", + "description": "Microsoft Healthcare Bot is a cloud platform that empowers developers in Healthcare organizations to build and deploy their compliant, AI-powered virtual health assistants and health bots, that help them improve processes and reduce costs.", + "x-ms-code-generation-settings": { + "name": "healthbotClient" + } + }, + "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}/providers/Microsoft.HealthBot/checkNameAvailability": { + "post": { + "description": "Check whether a bot name is available.", + "operationId": "Bots_GetCheckNameAvailability", + "x-ms-examples": { + "check Name Availability": { + "$ref": "./examples/CheckNameAvailability.json" + } + }, + "parameters": [ + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CheckNameAvailabilityRequestBody" + }, + "description": "The request body parameters to provide for the check name availability request" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The resource provider should return 200 (OK) to indicate that the operation completed successfully. For other errors (e.g. internal errors) use the appropriate HTTP error code.", + "schema": { + "$ref": "#/definitions/CheckNameAvailabilityResponseBody" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{resourceName}": { + "put": { + "operationId": "create_bot", + "x-ms-examples": { + "BatchAccountDelete": { + "$ref": "./examples/ResourceCreationPut.json" + } + }, + "description": "Create a new Healthcare Bot.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/resourceNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Bot" + }, + "description": "The parameters to provide for the created bot." + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "If resource is created successfully, the service should return 200.", + "schema": { + "$ref": "#/definitions/Bot" + } + }, + "201": { + "description": "If resource is updated successfully, the service should return 201 (Created). Execution to continue asynchronously.", + "schema": { + "$ref": "#/definitions/Bot" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + } + }, + "get": { + "operationId": "get_bot", + "x-ms-examples": { + "BatchAccountDelete": { + "$ref": "./examples/ResourceInfoGet.json" + } + }, + "description": "Get a Healthcare Bot.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/resourceNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "If resource is got successfully, the service should return 200.", + "schema": { + "$ref": "#/definitions/Bot" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + }, + "patch": { + "operationId": "patch_bot", + "x-ms-examples": { + "BatchAccountDelete": { + "$ref": "./examples/ResourceUpdatePatch.json" + } + }, + "description": "Patch a Healthcare Bot.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/resourceNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Bot" + }, + "description": "The parameters to provide for the required bot." + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "If resource is patched successfully, the service should return 200.", + "schema": { + "$ref": "#/definitions/Bot" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + }, + "delete": { + "operationId": "delete_bot", + "x-ms-examples": { + "BatchAccountDelete": { + "$ref": "./examples/ResourceDeletionDelete.json" + } + }, + "description": "Delete a Healthcare Bot.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/resourceNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "If resource is deleted successfully, the service should return 200.", + "schema": { + "$ref": "#/definitions/ValidationResult" + } + }, + "204": { + "description": "No content." + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots": { + "get": { + "description": "Returns all the resources of a particular type belonging to a resource group", + "operationId": "Bots_ListByResourceGroup", + "x-ms-examples": { + "List Bots by Resource Group": { + "$ref": "./examples/ListBotsByResourceGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The resource provider should return 200 (OK) to indicate that the operation completed successfully. For other errors (e.g. internal errors) use the appropriate HTTP error code.\nThe nextLink field is expected to point to the URL the client should use to fetch the next page (per server side paging). This matches the OData guidelines for paged responses here. If a resource provider does not support paging, it should return the same body (JSON object with “value” property) but omit nextLink entirely (or set to null, *not* empty string) for future compatibility.\nThe nextLink should be implemented using following query parameters:\n· skipToken: opaque token that allows the resource provider to skip resources already enumerated. This value is defined and returned by the RP after first request via nextLink.\n· top: the optional client query parameter which defines the maximum number of records to be returned by the server.\nImplementation details:\n· NextLink may include all the query parameters (specifically OData $filter) used by the client in the first query. \n· Server may return less records than requested with nextLink. Returning zero records with NextLink is an acceptable response. \nClients must fetch records until the nextLink is not returned back / null. Clients should never rely on number of returned records to determinate if pagination is completed.", + "schema": { + "$ref": "#/definitions/BotResponseList" + } + }, + "default": { + "description": "Error response describing why the operation failed. If the resource group does not exist, 404 (NotFound) will be returned.", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.HealthBot/healthBots": { + "get": { + "description": "Returns all the resources of a particular type belonging to a subscription.", + "operationId": "Bots_List", + "x-ms-examples": { + "List Bots by Subscription": { + "$ref": "./examples/ListBotsBySubscription.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The resource provider should return 200 (OK) to indicate that the operation completed successfully. For other errors (e.g. internal errors) use the appropriate HTTP error code.\nThe nextLink field is expected to point to the URL the client should use to fetch the next page (per server side paging). This matches the OData guidelines for paged responses. If a resource provider does not support paging, it should return the same body but leave nextLink empty for future compatibility.\nFor a detailed explanation of each field in the response body, please refer to the request body description in the PUT resource section. ", + "schema": { + "$ref": "#/definitions/BotResponseList" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.HealthBot/operations": { + "get": { + "tags": [ + "Operations" + ], + "description": "Lists all the available HealthBot operations.", + "operationId": "Operations_List", + "x-ms-examples": { + "Get Operations": { + "$ref": "./examples/GetOperations.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK.", + "schema": { + "$ref": "#/definitions/AvailableOperations" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "CheckNameAvailabilityRequestBody": { + "description": "The request body for a request to to check availability of a bot name.", + "type": "object", + "properties": { + "name": { + "description": "the name of the bot for which availability needs to be checked.", + "type": "string" + }, + "type": { + "description": "the type of the bot for which availability needs to be checked", + "type": "string" + } + } + }, + "CheckNameAvailabilityResponseBody": { + "description": "The response body returned for a request to check availability of a bot name.", + "type": "object", + "properties": { + "nameAvailable": { + "description": "indicates if the bot name is valid and available.", + "type": "boolean" + }, + "reason": { + "description": "Reason for the result", + "type": "string" + }, + "message": { + "description": "additional message from server", + "type": "string" + } + } + }, + "Resource": { + "description": "Azure resource", + "x-ms-azure-resource": true, + "properties": { + "id": { + "description": "Specifies the resource ID.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Specifies the name of the resource.", + "type": "string", + "readOnly": true + }, + "location": { + "description": "Specifies the location of the resource.", + "type": "string" + }, + "type": { + "description": "Specifies the type of the resource.", + "type": "string", + "readOnly": true + } + } + }, + "Bot": { + "type": "object", + "description": "Bot resource definition", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/BotProperties", + "description": "The set of properties specific to healthcare bot resource." + } + } + }, + "BotProperties": { + "title": "BotProperties", + "description": "The properties provided for bot creation", + "properties": { + "displayName": { + "type": "string", + "description": "The display name of the bot." + }, + "planId": { + "type": "string", + "description": "The plan ID of the bot." + }, + "offerId": { + "type": "string", + "description": "The offer ID of the bot." + }, + "provisioningState": { + "type": "string", + "description": "Gets the provisioning state of the Healthcare bot resource." + } + } + }, + "ValidationResult": { + "title": "ValidationResult", + "description": "The response returned from validation process", + "properties": { + "status": { + "type": "string", + "description": "The status code of the response validation." + } + } + }, + "Error": { + "title": "Error", + "description": "Bot error object.", + "properties": { + "status": { + "type": "string", + "description": "The status code of the response validation." + }, + "error": { + "$ref": "#/definitions/ErrorBody", + "description": "The error body." + } + } + }, + "ErrorBody": { + "title": "ErrorBody", + "description": "Error structure.", + "properties": { + "code": { + "type": "string", + "description": "error code." + }, + "message": { + "type": "string", + "description": "error message." + } + } + }, + "AvailableOperations": { + "description": "Available operations of the service", + "type": "object", + "properties": { + "value": { + "description": "Collection of available operation details", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/OperationDetail" + } + }, + "nextLink": { + "description": "URL client should use to fetch the next page (per server side paging).\r\nIt's null for now, added for future use.", + "type": "string" + } + } + }, + "OperationDetail": { + "description": "Operation detail payload", + "type": "object", + "properties": { + "name": { + "description": "Name of the operation", + "type": "string" + }, + "isDataAction": { + "description": "Indicates whether the operation is a data action", + "type": "boolean" + }, + "display": { + "$ref": "#/definitions/OperationDisplay", + "description": "Display of the operation" + }, + "origin": { + "description": "Origin of the operation", + "type": "string" + }, + "properties": { + "description": "Additional properties.", + "type": "object" + } + } + }, + "OperationDisplay": { + "description": "Operation display payload", + "type": "object", + "properties": { + "provider": { + "description": "Resource provider of the operation", + "type": "string" + }, + "resource": { + "description": "Resource of the operation", + "type": "string" + }, + "operation": { + "description": "Localized friendly name for the operation", + "type": "string" + }, + "description": { + "description": "Localized friendly description for the operation", + "type": "string" + } + } + }, + "BotResponseList": { + "properties": { + "nextLink": { + "description": "The link used to get the next page of bot service resources.", + "type": "string" + }, + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/Bot" + }, + "description": "Gets the list of healthcare bot results and their properties." + } + }, + "description": "The list of healthcare bot operation response." + } + }, + "parameters": { + "resourceGroupNameParameter": { + "name": "resourceGroupName", + "x-ms-parameter-location": "method", + "in": "path", + "required": true, + "type": "string", + "maxLength": 64, + "minLength": 2, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", + "description": "The name of the Bot resource group in the user subscription." + }, + "resourceNameParameter": { + "name": "resourceName", + "x-ms-parameter-location": "method", + "in": "path", + "required": true, + "type": "string", + "maxLength": 64, + "minLength": 2, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", + "description": "The name of the Bot resource." + }, + "subscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "Azure Subscription ID.", + "required": true, + "type": "string" + }, + "apiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Version of the API to be used with the client request." + } + } +} diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/CheckNameAvailability.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/CheckNameAvailability.json new file mode 100644 index 000000000000..e8d0773f42a6 --- /dev/null +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/CheckNameAvailability.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2020-10-20", + "subscriptionId": "subscription-id", + "parameters": { + "name": "MyBot", + "type": "string" + } + }, + "responses": { + "200": { + "body": { + "nameAvailable": true, + "message": "" + } + } + } +} diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/GetOperations.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/GetOperations.json new file mode 100644 index 000000000000..e2f79e0e1755 --- /dev/null +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/GetOperations.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2020-10-20" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.HealthBot/healthbot/botName/read", + "display": { + "provider": "Microsoft Healthcare Bot", + "resource": "Microsoft Healthcare Bot name availability", + "operation": "Check bot name availability", + "description": "Check bot name availability" + }, + "origin": "user,system" + } + ] + } + } + } +} diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ListBotsByResourceGroup.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ListBotsByResourceGroup.json new file mode 100644 index 000000000000..6759ba15d60c --- /dev/null +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ListBotsByResourceGroup.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "subscription-id", + "resourceGroupName": "OneResourceGroupName", + "api-version": "2020-10-20" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "East US", + "name": "samplebotname", + "type": "Microsoft.HealthBot/healthBots", + "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", + "properties": { + "displayName": "My Bot", + "planId": "free", + "offerId": "microsofthealthcarebot" + } + } + ] + } + } + } +} diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ListBotsBySubscription.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ListBotsBySubscription.json new file mode 100644 index 000000000000..6759ba15d60c --- /dev/null +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ListBotsBySubscription.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "subscription-id", + "resourceGroupName": "OneResourceGroupName", + "api-version": "2020-10-20" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "East US", + "name": "samplebotname", + "type": "Microsoft.HealthBot/healthBots", + "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", + "properties": { + "displayName": "My Bot", + "planId": "free", + "offerId": "microsofthealthcarebot" + } + } + ] + } + } + } +} diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceCreationPut.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceCreationPut.json new file mode 100644 index 000000000000..a065226713da --- /dev/null +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceCreationPut.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "resourceGroupName": "healthbotClient", + "api-version": "2020-10-20", + "subscriptionId": "subid", + "resourceName": "MyBot", + "parameters": { + "properties": { + "displayName": "My Bot", + "planId": "free", + "offerId": "microsofthealthcarebot" + } + } + }, + "responses": { + "200": { + "body": { + "location": "East US", + "name": "samplebotname", + "type": "Microsoft.HealthBot/healthBots", + "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", + "properties": { + "displayName": "My Bot", + "planId": "free", + "offerId": "microsofthealthcarebot" + } + } + }, + "201": { + "body": { + "location": "East US", + "name": "samplebotname", + "type": "Microsoft.HealthBot/healthBots", + "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", + "properties": { + "displayName": "My Bot", + "planId": "free", + "offerId": "microsofthealthcarebot", + "provisioningState": "Provisioning" + } + } + } + } +} diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceDeletionDelete.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceDeletionDelete.json new file mode 100644 index 000000000000..e308fc684578 --- /dev/null +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceDeletionDelete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "resourceGroupName": "healthbotClient", + "api-version": "2020-10-20", + "subscriptionId": "subid", + "resourceName": "MyBot" + }, + "responses": { + "200": { + "body": { + "status": "OK" + } + }, + "204": {} + } +} diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceInfoGet.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceInfoGet.json new file mode 100644 index 000000000000..41a3c6cb45f9 --- /dev/null +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceInfoGet.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "resourceGroupName": "healthbotClient", + "api-version": "2020-10-20", + "subscriptionId": "subid", + "resourceName": "MyBot" + }, + "responses": { + "200": { + "body": { + "location": "East US", + "name": "samplebotname", + "type": "Microsoft.HealthBot/healthBots", + "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", + "properties": { + "displayName": "My Bot", + "planId": "free", + "offerId": "microsofthealthcarebot" + } + } + } + } +} diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceUpdatePatch.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceUpdatePatch.json new file mode 100644 index 000000000000..30292125757e --- /dev/null +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceUpdatePatch.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "resourceGroupName": "healthbotClient", + "api-version": "2020-10-20", + "subscriptionId": "subid", + "resourceName": "MyBot", + "parameters": { + "properties": { + "displayName": "My Bot", + "planId": "free", + "offerId": "microsofthealthcarebot" + } + } + }, + "responses": { + "200": { + "body": { + "location": "East US", + "name": "samplebotname", + "type": "Microsoft.HealthBot/healthBots", + "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", + "properties": { + "displayName": "My Bot", + "planId": "free", + "offerId": "microsofthealthcarebot" + } + } + } + } +} diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/healthbot.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/healthbot.json new file mode 100644 index 000000000000..e8b005e9ee71 --- /dev/null +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/healthbot.json @@ -0,0 +1,630 @@ +{ + "swagger": "2.0", + "info": { + "version": "2020-10-20", + "title": "healthbot", + "description": "Microsoft Healthcare Bot is a cloud platform that empowers developers in Healthcare organizations to build and deploy their compliant, AI-powered virtual health assistants and health bots, that help them improve processes and reduce costs.", + "x-ms-code-generation-settings": { + "name": "healthbotClient" + } + }, + "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}/providers/Microsoft.HealthBot/checkNameAvailability": { + "post": { + "description": "Check whether a bot name is available.", + "operationId": "Bots_GetCheckNameAvailability", + "x-ms-examples": { + "check Name Availability": { + "$ref": "./examples/CheckNameAvailability.json" + } + }, + "parameters": [ + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CheckNameAvailabilityRequestBody" + }, + "description": "The request body parameters to provide for the check name availability request" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The resource provider should return 200 (OK) to indicate that the operation completed successfully. For other errors (e.g. internal errors) use the appropriate HTTP error code.", + "schema": { + "$ref": "#/definitions/CheckNameAvailabilityResponseBody" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{resourceName}": { + "put": { + "operationId": "create_bot", + "x-ms-examples": { + "BatchAccountDelete": { + "$ref": "./examples/ResourceCreationPut.json" + } + }, + "description": "Create a new Healthcare Bot.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/resourceNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Bot" + }, + "description": "The parameters to provide for the created bot." + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "If resource is created successfully, the service should return 200.", + "schema": { + "$ref": "#/definitions/Bot" + } + }, + "201": { + "description": "If resource is updated successfully, the service should return 201 (Created). Execution to continue asynchronously.", + "schema": { + "$ref": "#/definitions/Bot" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + } + }, + "get": { + "operationId": "get_bot", + "x-ms-examples": { + "BatchAccountDelete": { + "$ref": "./examples/ResourceInfoGet.json" + } + }, + "description": "Get a Healthcare Bot.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/resourceNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "If resource is got successfully, the service should return 200.", + "schema": { + "$ref": "#/definitions/Bot" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + }, + "patch": { + "operationId": "patch_bot", + "x-ms-examples": { + "BatchAccountDelete": { + "$ref": "./examples/ResourceUpdatePatch.json" + } + }, + "description": "Patch a Healthcare Bot.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/resourceNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Bot" + }, + "description": "The parameters to provide for the required bot." + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "If resource is patched successfully, the service should return 200.", + "schema": { + "$ref": "#/definitions/Bot" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + }, + "delete": { + "operationId": "delete_bot", + "x-ms-examples": { + "BatchAccountDelete": { + "$ref": "./examples/ResourceDeletionDelete.json" + } + }, + "description": "Delete a Healthcare Bot.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/resourceNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "If resource is deleted successfully, the service should return 200.", + "schema": { + "$ref": "#/definitions/ValidationResult" + } + }, + "204": { + "description": "No content." + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots": { + "get": { + "description": "Returns all the resources of a particular type belonging to a resource group", + "operationId": "Bots_ListByResourceGroup", + "x-ms-examples": { + "List Bots by Resource Group": { + "$ref": "./examples/ListBotsByResourceGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The resource provider should return 200 (OK) to indicate that the operation completed successfully. For other errors (e.g. internal errors) use the appropriate HTTP error code.\nThe nextLink field is expected to point to the URL the client should use to fetch the next page (per server side paging). This matches the OData guidelines for paged responses here. If a resource provider does not support paging, it should return the same body (JSON object with “value” property) but omit nextLink entirely (or set to null, *not* empty string) for future compatibility.\nThe nextLink should be implemented using following query parameters:\n· skipToken: opaque token that allows the resource provider to skip resources already enumerated. This value is defined and returned by the RP after first request via nextLink.\n· top: the optional client query parameter which defines the maximum number of records to be returned by the server.\nImplementation details:\n· NextLink may include all the query parameters (specifically OData $filter) used by the client in the first query. \n· Server may return less records than requested with nextLink. Returning zero records with NextLink is an acceptable response. \nClients must fetch records until the nextLink is not returned back / null. Clients should never rely on number of returned records to determinate if pagination is completed.", + "schema": { + "$ref": "#/definitions/BotResponseList" + } + }, + "default": { + "description": "Error response describing why the operation failed. If the resource group does not exist, 404 (NotFound) will be returned.", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.HealthBot/healthBots": { + "get": { + "description": "Returns all the resources of a particular type belonging to a subscription.", + "operationId": "Bots_List", + "x-ms-examples": { + "List Bots by Subscription": { + "$ref": "./examples/ListBotsBySubscription.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The resource provider should return 200 (OK) to indicate that the operation completed successfully. For other errors (e.g. internal errors) use the appropriate HTTP error code.\nThe nextLink field is expected to point to the URL the client should use to fetch the next page (per server side paging). This matches the OData guidelines for paged responses. If a resource provider does not support paging, it should return the same body but leave nextLink empty for future compatibility.\nFor a detailed explanation of each field in the response body, please refer to the request body description in the PUT resource section. ", + "schema": { + "$ref": "#/definitions/BotResponseList" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.HealthBot/operations": { + "get": { + "tags": [ + "Operations" + ], + "description": "Lists all the available HealthBot operations.", + "operationId": "Operations_List", + "x-ms-examples": { + "Get Operations": { + "$ref": "./examples/GetOperations.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK.", + "schema": { + "$ref": "#/definitions/AvailableOperations" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "CheckNameAvailabilityRequestBody": { + "description": "The request body for a request to to check availability of a bot name.", + "type": "object", + "properties": { + "name": { + "description": "the name of the bot for which availability needs to be checked.", + "type": "string" + }, + "type": { + "description": "the type of the bot for which availability needs to be checked", + "type": "string" + } + } + }, + "CheckNameAvailabilityResponseBody": { + "description": "The response body returned for a request to check availability of a bot name.", + "type": "object", + "properties": { + "nameAvailable": { + "description": "indicates if the bot name is valid and available.", + "type": "boolean" + }, + "reason": { + "description": "Reason for the result", + "type": "string" + }, + "message": { + "description": "additional message from server", + "type": "string" + } + } + }, + "Resource": { + "description": "Azure resource", + "x-ms-azure-resource": true, + "properties": { + "id": { + "description": "Specifies the resource ID.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Specifies the name of the resource.", + "type": "string", + "readOnly": true + }, + "location": { + "description": "Specifies the location of the resource.", + "type": "string" + }, + "type": { + "description": "Specifies the type of the resource.", + "type": "string", + "readOnly": true + } + } + }, + "Bot": { + "type": "object", + "description": "Bot resource definition", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/BotProperties", + "description": "The set of properties specific to healthcare bot resource." + } + } + }, + "BotProperties": { + "title": "BotProperties", + "description": "The properties provided for bot creation", + "properties": { + "displayName": { + "type": "string", + "description": "The display name of the bot." + }, + "planId": { + "type": "string", + "description": "The plan ID of the bot." + }, + "offerId": { + "type": "string", + "description": "The offer ID of the bot." + }, + "provisioningState": { + "type": "string", + "description": "Gets the provisioning state of the Healthcare bot resource." + } + } + }, + "ValidationResult": { + "title": "ValidationResult", + "description": "The response returned from validation process", + "properties": { + "status": { + "type": "string", + "description": "The status code of the response validation." + } + } + }, + "Error": { + "title": "Error", + "description": "Bot error object.", + "properties": { + "status": { + "type": "string", + "description": "The status code of the response validation." + }, + "error": { + "$ref": "#/definitions/ErrorBody", + "description": "The error body." + } + } + }, + "ErrorBody": { + "title": "ErrorBody", + "description": "Error structure.", + "properties": { + "code": { + "type": "string", + "description": "error code." + }, + "message": { + "type": "string", + "description": "error message." + } + } + }, + "AvailableOperations": { + "description": "Available operations of the service", + "type": "object", + "properties": { + "value": { + "description": "Collection of available operation details", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/OperationDetail" + } + }, + "nextLink": { + "description": "URL client should use to fetch the next page (per server side paging).\r\nIt's null for now, added for future use.", + "type": "string" + } + } + }, + "OperationDetail": { + "description": "Operation detail payload", + "type": "object", + "properties": { + "name": { + "description": "Name of the operation", + "type": "string" + }, + "isDataAction": { + "description": "Indicates whether the operation is a data action", + "type": "boolean" + }, + "display": { + "$ref": "#/definitions/OperationDisplay", + "description": "Display of the operation" + }, + "origin": { + "description": "Origin of the operation", + "type": "string" + }, + "properties": { + "description": "Additional properties.", + "type": "object" + } + } + }, + "OperationDisplay": { + "description": "Operation display payload", + "type": "object", + "properties": { + "provider": { + "description": "Resource provider of the operation", + "type": "string" + }, + "resource": { + "description": "Resource of the operation", + "type": "string" + }, + "operation": { + "description": "Localized friendly name for the operation", + "type": "string" + }, + "description": { + "description": "Localized friendly description for the operation", + "type": "string" + } + } + }, + "BotResponseList": { + "properties": { + "nextLink": { + "description": "The link used to get the next page of bot service resources.", + "type": "string" + }, + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/Bot" + }, + "description": "Gets the list of healthcare bot results and their properties." + } + }, + "description": "The list of healthcare bot operation response." + } + }, + "parameters": { + "resourceGroupNameParameter": { + "name": "resourceGroupName", + "x-ms-parameter-location": "method", + "in": "path", + "required": true, + "type": "string", + "maxLength": 64, + "minLength": 2, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", + "description": "The name of the Bot resource group in the user subscription." + }, + "resourceNameParameter": { + "name": "resourceName", + "x-ms-parameter-location": "method", + "in": "path", + "required": true, + "type": "string", + "maxLength": 64, + "minLength": 2, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.-]*$", + "description": "The name of the Bot resource." + }, + "subscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "Azure Subscription ID.", + "required": true, + "type": "string" + }, + "apiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Version of the API to be used with the client request." + } + } +} diff --git a/specification/healthbot/resource-manager/readme.csharp.md b/specification/healthbot/resource-manager/readme.csharp.md new file mode 100644 index 000000000000..14c4be9d14f0 --- /dev/null +++ b/specification/healthbot/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.HealthBot + output-folder: $(csharp-sdks-folder)/healthbot/management/Microsoft.HealthBot/GeneratedProtocol +``` diff --git a/specification/healthbot/resource-manager/readme.md b/specification/healthbot/resource-manager/readme.md new file mode 100644 index 000000000000..6ed83a9f4af9 --- /dev/null +++ b/specification/healthbot/resource-manager/readme.md @@ -0,0 +1,87 @@ +# healthbot + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for healthbot. + +## 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 healthbot. + +```yaml +openapi-type: arm +openapi-subtype: rpaas +tag: package-2020-10-20-preview +``` + + +### Tag: package-2020-10-20-preview + +These settings apply only when `--tag=package-2020-10-20-preview` is specified on the command line. + +```yaml $(tag) == 'package-2020-10-20-preview' +input-file: + - Microsoft.HealthBot/preview/2020-10-20-preview/healthbot.json +``` + +--- + +### Tag2: package-2020-10-20 + +These settings apply only when `--tag=package-2020-10-20` is specified on the command line. + +```yaml $(tag) == 'package-2020-10-20' +input-file: + - Microsoft.HealthBot/stable/2020-10-20/healthbot.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-js + - repo: azure-sdk-for-ruby + after_scripts: + - bundle install && rake arm:regen_all_profiles['azure_mgmt_healthbot'] +``` + +## 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) diff --git a/specification/healthbot/resource-manager/readme.python.md b/specification/healthbot/resource-manager/readme.python.md new file mode 100644 index 000000000000..1dbb61e1a22f --- /dev/null +++ b/specification/healthbot/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.HealthBot + package-name: healthbot + package-version: 2020-10-20-preview + clear-output-folder: true +``` + +```yaml $(python) +python: + no-namespace-folders: true + output-folder: $(python-sdks-folder)/azure-mgmt/healthbot +``` diff --git a/specification/healthbot/resource-manager/readme.ruby.md b/specification/healthbot/resource-manager/readme.ruby.md new file mode 100644 index 000000000000..59ab31b86210 --- /dev/null +++ b/specification/healthbot/resource-manager/readme.ruby.md @@ -0,0 +1,20 @@ +## Ruby + +These settings apply only when `--ruby` is specified on the command line. + +```yaml +package-name: azure_mgmt_healthbot +package-version: 2020-10-20-preview +azure-arm: true +``` + +### Tag: package-2020-10-20-preview and ruby + +These settings apply only when `--tag=package-2020-10-20-preview --ruby` is specified on the command line. +Please also specify `--ruby-sdks-folder=`. + +```yaml $(tag) == 'package-2020-10-20-preview' && $(ruby) +namespace: Microsoft.HealthBot +output-folder: $(ruby-sdks-folder)/healthbot +``` +prev \ No newline at end of file diff --git a/specification/healthbot/resource-manager/readme.typescript.md b/specification/healthbot/resource-manager/readme.typescript.md new file mode 100644 index 000000000000..5186c93d66ef --- /dev/null +++ b/specification/healthbot/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: "healthbot" + output-folder: "$(typescript-sdks-folder)/packages/healthbot" + payload-flattening-threshold: 1 + generate-metadata: true +``` From 660665b8c01818c5969c40540e4aa0c6a4eb0060 Mon Sep 17 00:00:00 2001 From: guepsh Date: Wed, 18 Nov 2020 18:20:45 +0200 Subject: [PATCH 2/4] Fixes according to review. --- .../examples/ListBotsByResourceGroup.json | 12 +- .../examples/ListBotsBySubscription.json | 12 +- .../examples/ResourceCreationPut.json | 27 +- .../examples/ResourceDeletionDelete.json | 6 +- .../examples/ResourceInfoGet.json | 12 +- .../examples/ResourceUpdatePatch.json | 16 +- .../preview/2020-10-20-preview/healthbot.json | 241 ++++++++++++++---- .../examples/ListBotsByResourceGroup.json | 12 +- .../examples/ListBotsBySubscription.json | 12 +- .../examples/ResourceCreationPut.json | 27 +- .../examples/ResourceDeletionDelete.json | 6 +- .../2020-10-20/examples/ResourceInfoGet.json | 12 +- .../examples/ResourceUpdatePatch.json | 16 +- .../stable/2020-10-20/healthbot.json | 241 ++++++++++++++---- 14 files changed, 488 insertions(+), 164 deletions(-) diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ListBotsByResourceGroup.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ListBotsByResourceGroup.json index 3d9281070422..b7672bec5b78 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ListBotsByResourceGroup.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ListBotsByResourceGroup.json @@ -14,9 +14,15 @@ "type": "Microsoft.HealthBot/healthBots", "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", "properties": { - "displayName": "My Bot", - "planId": "free", - "offerId": "microsofthealthcarebot" + "planId": "free" + }, + "systemData": { + "createdBy": "jack@outlook.com", + "createdByType": "user", + "createdAt": "2020-05-05T17:18:19.1234567Z", + "lastModifiedBy": "ryan@outlook.com", + "lastModifiedByType": "user", + "lastModifiedAt": "2020-05-06T17:18:19.1234567Z" } } ] diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ListBotsBySubscription.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ListBotsBySubscription.json index 3d9281070422..b7672bec5b78 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ListBotsBySubscription.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ListBotsBySubscription.json @@ -14,9 +14,15 @@ "type": "Microsoft.HealthBot/healthBots", "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", "properties": { - "displayName": "My Bot", - "planId": "free", - "offerId": "microsofthealthcarebot" + "planId": "free" + }, + "systemData": { + "createdBy": "jack@outlook.com", + "createdByType": "user", + "createdAt": "2020-05-05T17:18:19.1234567Z", + "lastModifiedBy": "ryan@outlook.com", + "lastModifiedByType": "user", + "lastModifiedAt": "2020-05-06T17:18:19.1234567Z" } } ] diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceCreationPut.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceCreationPut.json index 1cf65064d49d..7dde343e3407 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceCreationPut.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceCreationPut.json @@ -5,10 +5,9 @@ "subscriptionId": "subid", "resourceName": "MyBot", "parameters": { + "location": "East US", "properties": { - "displayName": "My Bot", - "planId": "free", - "offerId": "microsofthealthcarebot" + "planId": "free" } } }, @@ -20,9 +19,15 @@ "type": "Microsoft.HealthBot/healthBots", "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", "properties": { - "displayName": "My Bot", - "planId": "free", - "offerId": "microsofthealthcarebot" + "planId": "free" + }, + "systemData": { + "createdBy": "jack@outlook.com", + "createdByType": "user", + "createdAt": "2020-05-05T17:18:19.1234567Z", + "lastModifiedBy": "ryan@outlook.com", + "lastModifiedByType": "user", + "lastModifiedAt": "2020-05-06T17:18:19.1234567Z" } } }, @@ -33,10 +38,16 @@ "type": "Microsoft.HealthBot/healthBots", "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", "properties": { - "displayName": "My Bot", "planId": "free", - "offerId": "microsofthealthcarebot", "provisioningState": "Provisioning" + }, + "systemData": { + "createdBy": "jack@outlook.com", + "createdByType": "user", + "createdAt": "2020-05-05T17:18:19.1234567Z", + "lastModifiedBy": "ryan@outlook.com", + "lastModifiedByType": "user", + "lastModifiedAt": "2020-05-06T17:18:19.1234567Z" } } } diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceDeletionDelete.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceDeletionDelete.json index ae9d3941a3f0..641ce41f9cba 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceDeletionDelete.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceDeletionDelete.json @@ -6,11 +6,7 @@ "resourceName": "MyBot" }, "responses": { - "200": { - "body": { - "status": "OK" - } - }, + "200": {}, "204": {} } } diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceInfoGet.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceInfoGet.json index 012eab237d5d..0ac2561d94e1 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceInfoGet.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceInfoGet.json @@ -13,9 +13,15 @@ "type": "Microsoft.HealthBot/healthBots", "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", "properties": { - "displayName": "My Bot", - "planId": "free", - "offerId": "microsofthealthcarebot" + "planId": "free" + }, + "systemData": { + "createdBy": "jack@outlook.com", + "createdByType": "user", + "createdAt": "2020-05-05T17:18:19.1234567Z", + "lastModifiedBy": "ryan@outlook.com", + "lastModifiedByType": "user", + "lastModifiedAt": "2020-05-06T17:18:19.1234567Z" } } } diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceUpdatePatch.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceUpdatePatch.json index 8a95a07233b6..ed09160e6c4d 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceUpdatePatch.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceUpdatePatch.json @@ -6,9 +6,7 @@ "resourceName": "MyBot", "parameters": { "properties": { - "displayName": "My Bot", - "planId": "free", - "offerId": "microsofthealthcarebot" + "planId": "free" } } }, @@ -20,9 +18,15 @@ "type": "Microsoft.HealthBot/healthBots", "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", "properties": { - "displayName": "My Bot", - "planId": "free", - "offerId": "microsofthealthcarebot" + "planId": "free" + }, + "systemData": { + "createdBy": "jack@outlook.com", + "createdByType": "user", + "createdAt": "2020-05-05T17:18:19.1234567Z", + "lastModifiedBy": "ryan@outlook.com", + "lastModifiedByType": "user", + "lastModifiedAt": "2020-05-06T17:18:19.1234567Z" } } } diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/healthbot.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/healthbot.json index 3bdc9ff98e96..bd4ec02a898b 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/healthbot.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/healthbot.json @@ -103,7 +103,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Bot" + "$ref": "#/definitions/HealthBot" }, "description": "The parameters to provide for the created bot." }, @@ -113,15 +113,15 @@ ], "responses": { "200": { - "description": "If resource is created successfully, the service should return 200.", + "description": "If resource is updated successfully, the service should return 200.", "schema": { - "$ref": "#/definitions/Bot" + "$ref": "#/definitions/HealthBot" } }, "201": { - "description": "If resource is updated successfully, the service should return 201 (Created). Execution to continue asynchronously.", + "description": "If resource is created successfully, the service should return 201 (Created). Execution to continue asynchronously.", "schema": { - "$ref": "#/definitions/Bot" + "$ref": "#/definitions/HealthBot" } }, "default": { @@ -162,7 +162,7 @@ "200": { "description": "If resource is got successfully, the service should return 200.", "schema": { - "$ref": "#/definitions/Bot" + "$ref": "#/definitions/HealthBot" } }, "default": { @@ -196,7 +196,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Bot" + "$ref": "#/definitions/HealthBotUpdate" }, "description": "The parameters to provide for the required bot." }, @@ -208,7 +208,7 @@ "200": { "description": "If resource is patched successfully, the service should return 200.", "schema": { - "$ref": "#/definitions/Bot" + "$ref": "#/definitions/HealthBot" } }, "default": { @@ -243,10 +243,7 @@ ], "responses": { "200": { - "description": "If resource is deleted successfully, the service should return 200.", - "schema": { - "$ref": "#/definitions/ValidationResult" - } + "description": "If resource is deleted successfully, the service should return 200." }, "204": { "description": "No content." @@ -385,7 +382,11 @@ "description": "the type of the bot for which availability needs to be checked", "type": "string" } - } + }, + "required": [ + "name", + "type" + ] }, "CheckNameAvailabilityResponseBody": { "description": "The response body returned for a request to check availability of a bot name.", @@ -406,67 +407,169 @@ } }, "Resource": { - "description": "Azure resource", + "description": "The resource model definition for a ARM tracked top level resource", "x-ms-azure-resource": true, "properties": { "id": { - "description": "Specifies the resource ID.", + "description": "Fully qualified resource Id for the resource.", "type": "string", "readOnly": true }, "name": { - "description": "Specifies the name of the resource.", + "description": "The name of the resource", "type": "string", "readOnly": true }, - "location": { - "description": "Specifies the location of the resource.", - "type": "string" - }, "type": { - "description": "Specifies the type of the resource.", + "description": "The type of the resource.", "type": "string", "readOnly": true + }, + "systemData": { + "$ref": "#/definitions/SystemData", + "readOnly": true, + "description": "Metadata pertaining to creation and last modification of the resource" } } }, - "Bot": { - "type": "object", - "description": "Bot resource definition", + "TrackedResource": { + "description": "The resource model definition for a ARM tracked top level resource", + "properties": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Resource tags." + }, + "location": { + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ], + "description": "The geo-location where the resource lives" + } + }, + "required": [ + "location" + ], "allOf": [ { "$ref": "#/definitions/Resource" } + ] + }, + "HealthBot": { + "type": "object", + "description": "HealthBot resource definition", + "allOf": [ + { + "$ref": "#/definitions/TrackedResource" + } ], "properties": { "properties": { - "$ref": "#/definitions/BotProperties", + "$ref": "#/definitions/HealthBotProperties", "description": "The set of properties specific to healthcare bot resource." } } }, - "BotProperties": { - "title": "BotProperties", - "description": "The properties provided for bot creation", + "HealthBotProperties": { + "title": "HealthBotProperties", + "description": "The properties provided for bot creation. The Health Bot Service is a cloud platform that empowers developers in Healthcare organizations to build and deploy their compliant, AI-powered virtual health assistants and health bots, that help them improve processes and reduce costs.", "properties": { - "displayName": { + "planId": { "type": "string", - "description": "The display name of the bot." + "description": "The identifier of the plan (tier) the bot has.", + "enum": [ + "free", + "standard" + ] }, + "provisioningState": { + "type": "string", + "description": "Gets the provisioning state of the Healthcare bot resource.", + "readOnly": true + } + } + }, + "HealthBotUpdateProperties": { + "title": "HealthBotUpdateProperties", + "description": "The properties provided for bot update.", + "properties": { "planId": { "type": "string", - "description": "The plan ID of the bot." + "description": "The identifier of the plan (tier) the bot has.", + "enum": [ + "free", + "standard" + ] + } + } + }, + "HealthBotUpdate": { + "description": "An update to a HealthBot.", + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/HealthBotUpdateProperties", + "description": "The set of properties specific for updating a healthcare bot resource." + } + } + }, + "SystemData": { + "description": "Read only system data", + "type": "object", + "readOnly": true, + "properties": { + "createdBy": { + "type": "string", + "description": "The identity that created the resource." }, - "offerId": { + "createdByType": { + "$ref": "#/definitions/IdentityType", + "description": "The type of identity that created the resource" + }, + "createdAt": { "type": "string", - "description": "The offer ID of the bot." + "format": "date-time", + "description": "The timestamp of resource creation (UTC)" }, - "provisioningState": { + "lastModifiedBy": { "type": "string", - "description": "Gets the provisioning state of the Healthcare bot resource." + "description": "The identity that last modified the resource." + }, + "lastModifiedByType": { + "$ref": "#/definitions/IdentityType", + "description": "The type of identity that last modified the resource" + }, + "lastModifiedAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource last modification (UTC)" } } }, + "IdentityType": { + "description": "The type of identity that creates/modifies resources", + "type": "string", + "enum": [ + "user", + "application", + "managedIdentity", + "key" + ], + "x-ms-enum": { + "name": "IdentityType", + "modelAsString": true + } + }, "ValidationResult": { "title": "ValidationResult", "description": "The response returned from validation process", @@ -478,32 +581,61 @@ } }, "Error": { - "title": "Error", - "description": "Bot error object.", "properties": { - "status": { - "type": "string", - "description": "The status code of the response validation." - }, "error": { - "$ref": "#/definitions/ErrorBody", - "description": "The error body." + "type": "object", + "description": "The error object.", + "properties": { + "code": { + "readOnly": true, + "type": "string", + "description": "The error code." + }, + "message": { + "readOnly": true, + "type": "string", + "description": "The error message." + }, + "target": { + "readOnly": true, + "type": "string", + "description": "The error target." + }, + "details": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/Error" + }, + "description": "The error details." + }, + "additionalInfo": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/ErrorAdditionalInfo" + }, + "description": "The error additional info." + } + } } - } + }, + "description": "The resource management error response." }, - "ErrorBody": { - "title": "ErrorBody", - "description": "Error structure.", + "ErrorAdditionalInfo": { "properties": { - "code": { + "type": { + "readOnly": true, "type": "string", - "description": "error code." + "description": "The additional info type." }, - "message": { - "type": "string", - "description": "error message." + "info": { + "readOnly": true, + "type": "object", + "description": "The additional info." } - } + }, + "description": "The resource management error additional info." }, "AvailableOperations": { "description": "Available operations of the service", @@ -574,6 +706,7 @@ "BotResponseList": { "properties": { "nextLink": { + "readOnly": true, "description": "The link used to get the next page of bot service resources.", "type": "string" }, @@ -581,7 +714,7 @@ "readOnly": true, "type": "array", "items": { - "$ref": "#/definitions/Bot" + "$ref": "#/definitions/HealthBot" }, "description": "Gets the list of healthcare bot results and their properties." } diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ListBotsByResourceGroup.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ListBotsByResourceGroup.json index 6759ba15d60c..4ede44a529ab 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ListBotsByResourceGroup.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ListBotsByResourceGroup.json @@ -14,9 +14,15 @@ "type": "Microsoft.HealthBot/healthBots", "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", "properties": { - "displayName": "My Bot", - "planId": "free", - "offerId": "microsofthealthcarebot" + "planId": "free" + }, + "systemData": { + "createdBy": "jack@outlook.com", + "createdByType": "user", + "createdAt": "2020-05-05T17:18:19.1234567Z", + "lastModifiedBy": "ryan@outlook.com", + "lastModifiedByType": "user", + "lastModifiedAt": "2020-05-06T17:18:19.1234567Z" } } ] diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ListBotsBySubscription.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ListBotsBySubscription.json index 6759ba15d60c..4ede44a529ab 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ListBotsBySubscription.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ListBotsBySubscription.json @@ -14,9 +14,15 @@ "type": "Microsoft.HealthBot/healthBots", "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", "properties": { - "displayName": "My Bot", - "planId": "free", - "offerId": "microsofthealthcarebot" + "planId": "free" + }, + "systemData": { + "createdBy": "jack@outlook.com", + "createdByType": "user", + "createdAt": "2020-05-05T17:18:19.1234567Z", + "lastModifiedBy": "ryan@outlook.com", + "lastModifiedByType": "user", + "lastModifiedAt": "2020-05-06T17:18:19.1234567Z" } } ] diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceCreationPut.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceCreationPut.json index a065226713da..39a309091bc1 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceCreationPut.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceCreationPut.json @@ -5,10 +5,9 @@ "subscriptionId": "subid", "resourceName": "MyBot", "parameters": { + "location": "East US", "properties": { - "displayName": "My Bot", - "planId": "free", - "offerId": "microsofthealthcarebot" + "planId": "free" } } }, @@ -20,9 +19,15 @@ "type": "Microsoft.HealthBot/healthBots", "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", "properties": { - "displayName": "My Bot", - "planId": "free", - "offerId": "microsofthealthcarebot" + "planId": "free" + }, + "systemData": { + "createdBy": "jack@outlook.com", + "createdByType": "user", + "createdAt": "2020-05-05T17:18:19.1234567Z", + "lastModifiedBy": "ryan@outlook.com", + "lastModifiedByType": "user", + "lastModifiedAt": "2020-05-06T17:18:19.1234567Z" } } }, @@ -33,10 +38,16 @@ "type": "Microsoft.HealthBot/healthBots", "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", "properties": { - "displayName": "My Bot", "planId": "free", - "offerId": "microsofthealthcarebot", "provisioningState": "Provisioning" + }, + "systemData": { + "createdBy": "jack@outlook.com", + "createdByType": "user", + "createdAt": "2020-05-05T17:18:19.1234567Z", + "lastModifiedBy": "ryan@outlook.com", + "lastModifiedByType": "user", + "lastModifiedAt": "2020-05-06T17:18:19.1234567Z" } } } diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceDeletionDelete.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceDeletionDelete.json index e308fc684578..117d4b02ffd2 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceDeletionDelete.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceDeletionDelete.json @@ -6,11 +6,7 @@ "resourceName": "MyBot" }, "responses": { - "200": { - "body": { - "status": "OK" - } - }, + "200": {}, "204": {} } } diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceInfoGet.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceInfoGet.json index 41a3c6cb45f9..90f0f38739ac 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceInfoGet.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceInfoGet.json @@ -13,9 +13,15 @@ "type": "Microsoft.HealthBot/healthBots", "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", "properties": { - "displayName": "My Bot", - "planId": "free", - "offerId": "microsofthealthcarebot" + "planId": "free" + }, + "systemData": { + "createdBy": "jack@outlook.com", + "createdByType": "user", + "createdAt": "2020-05-05T17:18:19.1234567Z", + "lastModifiedBy": "ryan@outlook.com", + "lastModifiedByType": "user", + "lastModifiedAt": "2020-05-06T17:18:19.1234567Z" } } } diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceUpdatePatch.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceUpdatePatch.json index 30292125757e..3d779fec1d55 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceUpdatePatch.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceUpdatePatch.json @@ -6,9 +6,7 @@ "resourceName": "MyBot", "parameters": { "properties": { - "displayName": "My Bot", - "planId": "free", - "offerId": "microsofthealthcarebot" + "planId": "free" } } }, @@ -20,9 +18,15 @@ "type": "Microsoft.HealthBot/healthBots", "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", "properties": { - "displayName": "My Bot", - "planId": "free", - "offerId": "microsofthealthcarebot" + "planId": "free" + }, + "systemData": { + "createdBy": "jack@outlook.com", + "createdByType": "user", + "createdAt": "2020-05-05T17:18:19.1234567Z", + "lastModifiedBy": "ryan@outlook.com", + "lastModifiedByType": "user", + "lastModifiedAt": "2020-05-06T17:18:19.1234567Z" } } } diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/healthbot.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/healthbot.json index e8b005e9ee71..489a3769e3aa 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/healthbot.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/healthbot.json @@ -103,7 +103,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Bot" + "$ref": "#/definitions/HealthBot" }, "description": "The parameters to provide for the created bot." }, @@ -113,15 +113,15 @@ ], "responses": { "200": { - "description": "If resource is created successfully, the service should return 200.", + "description": "If resource is updated successfully, the service should return 200.", "schema": { - "$ref": "#/definitions/Bot" + "$ref": "#/definitions/HealthBot" } }, "201": { - "description": "If resource is updated successfully, the service should return 201 (Created). Execution to continue asynchronously.", + "description": "If resource is created successfully, the service should return 201 (Created). Execution to continue asynchronously.", "schema": { - "$ref": "#/definitions/Bot" + "$ref": "#/definitions/HealthBot" } }, "default": { @@ -162,7 +162,7 @@ "200": { "description": "If resource is got successfully, the service should return 200.", "schema": { - "$ref": "#/definitions/Bot" + "$ref": "#/definitions/HealthBot" } }, "default": { @@ -196,7 +196,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Bot" + "$ref": "#/definitions/HealthBotUpdate" }, "description": "The parameters to provide for the required bot." }, @@ -208,7 +208,7 @@ "200": { "description": "If resource is patched successfully, the service should return 200.", "schema": { - "$ref": "#/definitions/Bot" + "$ref": "#/definitions/HealthBot" } }, "default": { @@ -243,10 +243,7 @@ ], "responses": { "200": { - "description": "If resource is deleted successfully, the service should return 200.", - "schema": { - "$ref": "#/definitions/ValidationResult" - } + "description": "If resource is deleted successfully, the service should return 200." }, "204": { "description": "No content." @@ -385,7 +382,11 @@ "description": "the type of the bot for which availability needs to be checked", "type": "string" } - } + }, + "required": [ + "name", + "type" + ] }, "CheckNameAvailabilityResponseBody": { "description": "The response body returned for a request to check availability of a bot name.", @@ -406,67 +407,169 @@ } }, "Resource": { - "description": "Azure resource", + "description": "The resource model definition for a ARM tracked top level resource", "x-ms-azure-resource": true, "properties": { "id": { - "description": "Specifies the resource ID.", + "description": "Fully qualified resource Id for the resource.", "type": "string", "readOnly": true }, "name": { - "description": "Specifies the name of the resource.", + "description": "The name of the resource", "type": "string", "readOnly": true }, - "location": { - "description": "Specifies the location of the resource.", - "type": "string" - }, "type": { - "description": "Specifies the type of the resource.", + "description": "The type of the resource.", "type": "string", "readOnly": true + }, + "systemData": { + "$ref": "#/definitions/SystemData", + "readOnly": true, + "description": "Metadata pertaining to creation and last modification of the resource" } } }, - "Bot": { - "type": "object", - "description": "Bot resource definition", + "TrackedResource": { + "description": "The resource model definition for a ARM tracked top level resource", + "properties": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Resource tags." + }, + "location": { + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ], + "description": "The geo-location where the resource lives" + } + }, + "required": [ + "location" + ], "allOf": [ { "$ref": "#/definitions/Resource" } + ] + }, + "HealthBot": { + "type": "object", + "description": "HealthBot resource definition", + "allOf": [ + { + "$ref": "#/definitions/TrackedResource" + } ], "properties": { "properties": { - "$ref": "#/definitions/BotProperties", + "$ref": "#/definitions/HealthBotProperties", "description": "The set of properties specific to healthcare bot resource." } } }, - "BotProperties": { - "title": "BotProperties", - "description": "The properties provided for bot creation", + "HealthBotProperties": { + "title": "HealthBotProperties", + "description": "The properties provided for bot creation. The Health Bot Service is a cloud platform that empowers developers in Healthcare organizations to build and deploy their compliant, AI-powered virtual health assistants and health bots, that help them improve processes and reduce costs.", "properties": { - "displayName": { + "planId": { "type": "string", - "description": "The display name of the bot." + "description": "The identifier of the plan (tier) the bot has.", + "enum": [ + "free", + "standard" + ] }, + "provisioningState": { + "type": "string", + "description": "Gets the provisioning state of the Healthcare bot resource.", + "readOnly": true + } + } + }, + "HealthBotUpdateProperties": { + "title": "HealthBotUpdateProperties", + "description": "The properties provided for bot update.", + "properties": { "planId": { "type": "string", - "description": "The plan ID of the bot." + "description": "The identifier of the plan (tier) the bot has.", + "enum": [ + "free", + "standard" + ] + } + } + }, + "HealthBotUpdate": { + "description": "An update to a HealthBot.", + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/HealthBotUpdateProperties", + "description": "The set of properties specific for updating a healthcare bot resource." + } + } + }, + "SystemData": { + "description": "Read only system data", + "type": "object", + "readOnly": true, + "properties": { + "createdBy": { + "type": "string", + "description": "The identity that created the resource." }, - "offerId": { + "createdByType": { + "$ref": "#/definitions/IdentityType", + "description": "The type of identity that created the resource" + }, + "createdAt": { "type": "string", - "description": "The offer ID of the bot." + "format": "date-time", + "description": "The timestamp of resource creation (UTC)" }, - "provisioningState": { + "lastModifiedBy": { "type": "string", - "description": "Gets the provisioning state of the Healthcare bot resource." + "description": "The identity that last modified the resource." + }, + "lastModifiedByType": { + "$ref": "#/definitions/IdentityType", + "description": "The type of identity that last modified the resource" + }, + "lastModifiedAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource last modification (UTC)" } } }, + "IdentityType": { + "description": "The type of identity that creates/modifies resources", + "type": "string", + "enum": [ + "user", + "application", + "managedIdentity", + "key" + ], + "x-ms-enum": { + "name": "IdentityType", + "modelAsString": true + } + }, "ValidationResult": { "title": "ValidationResult", "description": "The response returned from validation process", @@ -478,32 +581,61 @@ } }, "Error": { - "title": "Error", - "description": "Bot error object.", "properties": { - "status": { - "type": "string", - "description": "The status code of the response validation." - }, "error": { - "$ref": "#/definitions/ErrorBody", - "description": "The error body." + "type": "object", + "description": "The error object.", + "properties": { + "code": { + "readOnly": true, + "type": "string", + "description": "The error code." + }, + "message": { + "readOnly": true, + "type": "string", + "description": "The error message." + }, + "target": { + "readOnly": true, + "type": "string", + "description": "The error target." + }, + "details": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/Error" + }, + "description": "The error details." + }, + "additionalInfo": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/ErrorAdditionalInfo" + }, + "description": "The error additional info." + } + } } - } + }, + "description": "The resource management error response." }, - "ErrorBody": { - "title": "ErrorBody", - "description": "Error structure.", + "ErrorAdditionalInfo": { "properties": { - "code": { + "type": { + "readOnly": true, "type": "string", - "description": "error code." + "description": "The additional info type." }, - "message": { - "type": "string", - "description": "error message." + "info": { + "readOnly": true, + "type": "object", + "description": "The additional info." } - } + }, + "description": "The resource management error additional info." }, "AvailableOperations": { "description": "Available operations of the service", @@ -574,6 +706,7 @@ "BotResponseList": { "properties": { "nextLink": { + "readOnly": true, "description": "The link used to get the next page of bot service resources.", "type": "string" }, @@ -581,7 +714,7 @@ "readOnly": true, "type": "array", "items": { - "$ref": "#/definitions/Bot" + "$ref": "#/definitions/HealthBot" }, "description": "Gets the list of healthcare bot results and their properties." } From 71c1d1c471000266463aa41ce3d329b11c1462fd Mon Sep 17 00:00:00 2001 From: guepsh Date: Mon, 23 Nov 2020 17:19:12 +0200 Subject: [PATCH 3/4] Fixes according to review. --- .../examples/ListBotsByResourceGroup.json | 9 +- .../examples/ListBotsBySubscription.json | 9 +- .../examples/ResourceCreationPut.json | 22 +-- .../examples/ResourceInfoGet.json | 9 +- .../examples/ResourceUpdatePatch.json | 13 +- .../preview/2020-10-20-preview/healthbot.json | 109 ++++++++++----- .../examples/ListBotsByResourceGroup.json | 9 +- .../examples/ListBotsBySubscription.json | 9 +- .../examples/ResourceCreationPut.json | 22 +-- .../2020-10-20/examples/ResourceInfoGet.json | 9 +- .../examples/ResourceUpdatePatch.json | 13 +- .../stable/2020-10-20/healthbot.json | 129 ++++++++++++------ 12 files changed, 242 insertions(+), 120 deletions(-) diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ListBotsByResourceGroup.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ListBotsByResourceGroup.json index b7672bec5b78..f34113e39986 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ListBotsByResourceGroup.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ListBotsByResourceGroup.json @@ -13,15 +13,18 @@ "name": "samplebotname", "type": "Microsoft.HealthBot/healthBots", "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", + "sku": { + "name": "F0" + }, "properties": { - "planId": "free" + "botManagementPortalLink": "https://us.healthbot.microsoft.com/account/contoso/scenarios/manage" }, "systemData": { "createdBy": "jack@outlook.com", - "createdByType": "user", + "createdByType": "User", "createdAt": "2020-05-05T17:18:19.1234567Z", "lastModifiedBy": "ryan@outlook.com", - "lastModifiedByType": "user", + "lastModifiedByType": "User", "lastModifiedAt": "2020-05-06T17:18:19.1234567Z" } } diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ListBotsBySubscription.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ListBotsBySubscription.json index b7672bec5b78..f34113e39986 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ListBotsBySubscription.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ListBotsBySubscription.json @@ -13,15 +13,18 @@ "name": "samplebotname", "type": "Microsoft.HealthBot/healthBots", "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", + "sku": { + "name": "F0" + }, "properties": { - "planId": "free" + "botManagementPortalLink": "https://us.healthbot.microsoft.com/account/contoso/scenarios/manage" }, "systemData": { "createdBy": "jack@outlook.com", - "createdByType": "user", + "createdByType": "User", "createdAt": "2020-05-05T17:18:19.1234567Z", "lastModifiedBy": "ryan@outlook.com", - "lastModifiedByType": "user", + "lastModifiedByType": "User", "lastModifiedAt": "2020-05-06T17:18:19.1234567Z" } } diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceCreationPut.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceCreationPut.json index 7dde343e3407..24c1355d7403 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceCreationPut.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceCreationPut.json @@ -6,8 +6,8 @@ "resourceName": "MyBot", "parameters": { "location": "East US", - "properties": { - "planId": "free" + "sku": { + "name": "F0" } } }, @@ -18,15 +18,18 @@ "name": "samplebotname", "type": "Microsoft.HealthBot/healthBots", "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", + "sku": { + "name": "F0" + }, "properties": { - "planId": "free" + "botManagementPortalLink": "https://us.healthbot.microsoft.com/account/contoso/scenarios/manage" }, "systemData": { "createdBy": "jack@outlook.com", - "createdByType": "user", + "createdByType": "User", "createdAt": "2020-05-05T17:18:19.1234567Z", "lastModifiedBy": "ryan@outlook.com", - "lastModifiedByType": "user", + "lastModifiedByType": "User", "lastModifiedAt": "2020-05-06T17:18:19.1234567Z" } } @@ -37,16 +40,19 @@ "name": "samplebotname", "type": "Microsoft.HealthBot/healthBots", "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", + "sku": { + "name": "F0" + }, "properties": { - "planId": "free", + "botManagementPortalLink": "https://us.healthbot.microsoft.com/account/contoso/scenarios/manage", "provisioningState": "Provisioning" }, "systemData": { "createdBy": "jack@outlook.com", - "createdByType": "user", + "createdByType": "User", "createdAt": "2020-05-05T17:18:19.1234567Z", "lastModifiedBy": "ryan@outlook.com", - "lastModifiedByType": "user", + "lastModifiedByType": "User", "lastModifiedAt": "2020-05-06T17:18:19.1234567Z" } } diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceInfoGet.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceInfoGet.json index 0ac2561d94e1..af9fca861c25 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceInfoGet.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceInfoGet.json @@ -12,15 +12,18 @@ "name": "samplebotname", "type": "Microsoft.HealthBot/healthBots", "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", + "sku": { + "name": "F0" + }, "properties": { - "planId": "free" + "botManagementPortalLink": "https://us.healthbot.microsoft.com/account/contoso/scenarios/manage" }, "systemData": { "createdBy": "jack@outlook.com", - "createdByType": "user", + "createdByType": "User", "createdAt": "2020-05-05T17:18:19.1234567Z", "lastModifiedBy": "ryan@outlook.com", - "lastModifiedByType": "user", + "lastModifiedByType": "User", "lastModifiedAt": "2020-05-06T17:18:19.1234567Z" } } diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceUpdatePatch.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceUpdatePatch.json index ed09160e6c4d..2c69d917caae 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceUpdatePatch.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/examples/ResourceUpdatePatch.json @@ -5,8 +5,8 @@ "subscriptionId": "subid", "resourceName": "MyBot", "parameters": { - "properties": { - "planId": "free" + "sku": { + "name": "F0" } } }, @@ -17,15 +17,18 @@ "name": "samplebotname", "type": "Microsoft.HealthBot/healthBots", "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", + "sku": { + "name": "F0" + }, "properties": { - "planId": "free" + "botManagementPortalLink": "https://us.healthbot.microsoft.com/account/contoso/scenarios/manage" }, "systemData": { "createdBy": "jack@outlook.com", - "createdByType": "user", + "createdByType": "User", "createdAt": "2020-05-05T17:18:19.1234567Z", "lastModifiedBy": "ryan@outlook.com", - "lastModifiedByType": "user", + "lastModifiedByType": "User", "lastModifiedAt": "2020-05-06T17:18:19.1234567Z" } } diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/healthbot.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/healthbot.json index bd4ec02a898b..d3c0103e7fcc 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/healthbot.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/healthbot.json @@ -196,7 +196,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/HealthBotUpdate" + "$ref": "#/definitions/HealthBotUpdateParameters" }, "description": "The parameters to provide for the required bot." }, @@ -370,6 +370,50 @@ } }, "definitions": { + "Sku": { + "description": "The resource model definition representing SKU", + "properties": { + "name": { + "type": "string", + "description": "The name of the HealthBot SKU", + "enum": [ + "F0", + "S1" + ], + "x-ms-enum": { + "name": "SkuName", + "modelAsString": true + } + }, + "tier": { + "type": "string", + "enum": [ + "Standard" + ], + "x-ms-enum": { + "name": "SkuTier", + "modelAsString": false + }, + "description": "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT." + }, + "size": { + "type": "string", + "description": "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. " + }, + "family": { + "type": "string", + "description": "If the service has different generations of hardware, for the same SKU, then that can be captured here." + }, + "capacity": { + "type": "integer", + "format": "int32", + "description": "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted." + } + }, + "required": [ + "name" + ] + }, "CheckNameAvailabilityRequestBody": { "description": "The request body for a request to to check availability of a bot name.", "type": "object", @@ -474,6 +518,10 @@ } ], "properties": { + "sku": { + "$ref": "#/definitions/Sku", + "description": "SKU of the HealthBot." + }, "properties": { "$ref": "#/definitions/HealthBotProperties", "description": "The set of properties specific to healthcare bot resource." @@ -482,44 +530,39 @@ }, "HealthBotProperties": { "title": "HealthBotProperties", - "description": "The properties provided for bot creation. The Health Bot Service is a cloud platform that empowers developers in Healthcare organizations to build and deploy their compliant, AI-powered virtual health assistants and health bots, that help them improve processes and reduce costs.", + "description": "The properties of a HealthBot. The Health Bot Service is a cloud platform that empowers developers in Healthcare organizations to build and deploy their compliant, AI-powered virtual health assistants and health bots, that help them improve processes and reduce costs.", "properties": { - "planId": { - "type": "string", - "description": "The identifier of the plan (tier) the bot has.", - "enum": [ - "free", - "standard" - ] - }, "provisioningState": { "type": "string", - "description": "Gets the provisioning state of the Healthcare bot resource.", + "description": "The provisioning state of the Healthcare bot resource.", "readOnly": true - } - } - }, - "HealthBotUpdateProperties": { - "title": "HealthBotUpdateProperties", - "description": "The properties provided for bot update.", - "properties": { - "planId": { + }, + "botManagementPortalLink": { "type": "string", - "description": "The identifier of the plan (tier) the bot has.", - "enum": [ - "free", - "standard" - ] + "description": "The link.", + "readOnly": true } } }, - "HealthBotUpdate": { - "description": "An update to a HealthBot.", + "HealthBotUpdateParameters": { "type": "object", + "description": "Parameters for updating a HealthBot.", "properties": { - "properties": { - "$ref": "#/definitions/HealthBotUpdateProperties", - "description": "The set of properties specific for updating a healthcare bot resource." + "tags": { + "type": "object", + "description": "Tags for a HealthBot.", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": [ + "read", + "create", + "update" + ] + }, + "sku": { + "$ref": "#/definitions/Sku", + "description": "SKU of the HealthBot." } } }, @@ -560,10 +603,10 @@ "description": "The type of identity that creates/modifies resources", "type": "string", "enum": [ - "user", - "application", - "managedIdentity", - "key" + "User", + "Application", + "ManagedIdentity", + "Key" ], "x-ms-enum": { "name": "IdentityType", diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ListBotsByResourceGroup.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ListBotsByResourceGroup.json index 4ede44a529ab..2a1f612c3ecc 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ListBotsByResourceGroup.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ListBotsByResourceGroup.json @@ -13,15 +13,18 @@ "name": "samplebotname", "type": "Microsoft.HealthBot/healthBots", "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", + "sku": { + "name": "F0" + }, "properties": { - "planId": "free" + "botManagementPortalLink": "https://us.healthbot.microsoft.com/account/contoso/scenarios/manage" }, "systemData": { "createdBy": "jack@outlook.com", - "createdByType": "user", + "createdByType": "User", "createdAt": "2020-05-05T17:18:19.1234567Z", "lastModifiedBy": "ryan@outlook.com", - "lastModifiedByType": "user", + "lastModifiedByType": "User", "lastModifiedAt": "2020-05-06T17:18:19.1234567Z" } } diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ListBotsBySubscription.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ListBotsBySubscription.json index 4ede44a529ab..2a1f612c3ecc 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ListBotsBySubscription.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ListBotsBySubscription.json @@ -13,15 +13,18 @@ "name": "samplebotname", "type": "Microsoft.HealthBot/healthBots", "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", + "sku": { + "name": "F0" + }, "properties": { - "planId": "free" + "botManagementPortalLink": "https://us.healthbot.microsoft.com/account/contoso/scenarios/manage" }, "systemData": { "createdBy": "jack@outlook.com", - "createdByType": "user", + "createdByType": "User", "createdAt": "2020-05-05T17:18:19.1234567Z", "lastModifiedBy": "ryan@outlook.com", - "lastModifiedByType": "user", + "lastModifiedByType": "User", "lastModifiedAt": "2020-05-06T17:18:19.1234567Z" } } diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceCreationPut.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceCreationPut.json index 39a309091bc1..adda6abd0dc2 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceCreationPut.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceCreationPut.json @@ -6,8 +6,8 @@ "resourceName": "MyBot", "parameters": { "location": "East US", - "properties": { - "planId": "free" + "sku": { + "name": "F0" } } }, @@ -18,15 +18,18 @@ "name": "samplebotname", "type": "Microsoft.HealthBot/healthBots", "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", + "sku": { + "name": "F0" + }, "properties": { - "planId": "free" + "botManagementPortalLink": "https://us.healthbot.microsoft.com/account/contoso/scenarios/manage" }, "systemData": { "createdBy": "jack@outlook.com", - "createdByType": "user", + "createdByType": "User", "createdAt": "2020-05-05T17:18:19.1234567Z", "lastModifiedBy": "ryan@outlook.com", - "lastModifiedByType": "user", + "lastModifiedByType": "User", "lastModifiedAt": "2020-05-06T17:18:19.1234567Z" } } @@ -37,16 +40,19 @@ "name": "samplebotname", "type": "Microsoft.HealthBot/healthBots", "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", + "sku": { + "name": "F0" + }, "properties": { - "planId": "free", + "botManagementPortalLink": "https://us.healthbot.microsoft.com/account/contoso/scenarios/manage", "provisioningState": "Provisioning" }, "systemData": { "createdBy": "jack@outlook.com", - "createdByType": "user", + "createdByType": "User", "createdAt": "2020-05-05T17:18:19.1234567Z", "lastModifiedBy": "ryan@outlook.com", - "lastModifiedByType": "user", + "lastModifiedByType": "User", "lastModifiedAt": "2020-05-06T17:18:19.1234567Z" } } diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceInfoGet.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceInfoGet.json index 90f0f38739ac..319b064111d9 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceInfoGet.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceInfoGet.json @@ -12,15 +12,18 @@ "name": "samplebotname", "type": "Microsoft.HealthBot/healthBots", "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", + "sku": { + "name": "F0" + }, "properties": { - "planId": "free" + "botManagementPortalLink": "https://us.healthbot.microsoft.com/account/contoso/scenarios/manage" }, "systemData": { "createdBy": "jack@outlook.com", - "createdByType": "user", + "createdByType": "User", "createdAt": "2020-05-05T17:18:19.1234567Z", "lastModifiedBy": "ryan@outlook.com", - "lastModifiedByType": "user", + "lastModifiedByType": "User", "lastModifiedAt": "2020-05-06T17:18:19.1234567Z" } } diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceUpdatePatch.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceUpdatePatch.json index 3d779fec1d55..d2612b118811 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceUpdatePatch.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/examples/ResourceUpdatePatch.json @@ -5,8 +5,8 @@ "subscriptionId": "subid", "resourceName": "MyBot", "parameters": { - "properties": { - "planId": "free" + "sku": { + "name": "F0" } } }, @@ -17,15 +17,18 @@ "name": "samplebotname", "type": "Microsoft.HealthBot/healthBots", "id": "/subscriptions/subscription-id/resourceGroups/OneResourceGroupName/providers/Microsoft.HealthBot/healthBots/samplebotname", + "sku": { + "name": "F0" + }, "properties": { - "planId": "free" + "botManagementPortalLink": "https://us.healthbot.microsoft.com/account/contoso/scenarios/manage" }, "systemData": { "createdBy": "jack@outlook.com", - "createdByType": "user", + "createdByType": "User", "createdAt": "2020-05-05T17:18:19.1234567Z", "lastModifiedBy": "ryan@outlook.com", - "lastModifiedByType": "user", + "lastModifiedByType": "User", "lastModifiedAt": "2020-05-06T17:18:19.1234567Z" } } diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/healthbot.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/healthbot.json index 489a3769e3aa..99be5be63dde 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/healthbot.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/healthbot.json @@ -196,7 +196,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/HealthBotUpdate" + "$ref": "#/definitions/HealthBotUpdateParameters" }, "description": "The parameters to provide for the required bot." }, @@ -370,6 +370,50 @@ } }, "definitions": { + "Sku": { + "description": "The resource model definition representing SKU", + "properties": { + "name": { + "type": "string", + "description": "The name of the HealthBot SKU", + "enum": [ + "F0", + "S1" + ], + "x-ms-enum": { + "name": "SkuName", + "modelAsString": true + } + }, + "tier": { + "type": "string", + "enum": [ + "Standard" + ], + "x-ms-enum": { + "name": "SkuTier", + "modelAsString": false + }, + "description": "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT." + }, + "size": { + "type": "string", + "description": "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. " + }, + "family": { + "type": "string", + "description": "If the service has different generations of hardware, for the same SKU, then that can be captured here." + }, + "capacity": { + "type": "integer", + "format": "int32", + "description": "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted." + } + }, + "required": [ + "name" + ] + }, "CheckNameAvailabilityRequestBody": { "description": "The request body for a request to to check availability of a bot name.", "type": "object", @@ -407,30 +451,30 @@ } }, "Resource": { - "description": "The resource model definition for a ARM tracked top level resource", - "x-ms-azure-resource": true, "properties": { "id": { - "description": "Fully qualified resource Id for the resource.", + "readOnly": true, "type": "string", - "readOnly": true + "description": "Fully qualified resource Id for the resource." }, "name": { - "description": "The name of the resource", + "readOnly": true, "type": "string", - "readOnly": true + "description": "The name of the resource" }, "type": { - "description": "The type of the resource.", + "readOnly": true, "type": "string", - "readOnly": true + "description": "The type of the resource." }, "systemData": { "$ref": "#/definitions/SystemData", "readOnly": true, "description": "Metadata pertaining to creation and last modification of the resource" } - } + }, + "description": "The resource model definition for a ARM tracked top level resource", + "x-ms-azure-resource": true }, "TrackedResource": { "description": "The resource model definition for a ARM tracked top level resource", @@ -467,13 +511,17 @@ }, "HealthBot": { "type": "object", - "description": "HealthBot resource definition", + "description": "Bot resource definition", "allOf": [ { "$ref": "#/definitions/TrackedResource" } ], "properties": { + "sku": { + "$ref": "#/definitions/Sku", + "description": "SKU of the HealthBot." + }, "properties": { "$ref": "#/definitions/HealthBotProperties", "description": "The set of properties specific to healthcare bot resource." @@ -482,44 +530,39 @@ }, "HealthBotProperties": { "title": "HealthBotProperties", - "description": "The properties provided for bot creation. The Health Bot Service is a cloud platform that empowers developers in Healthcare organizations to build and deploy their compliant, AI-powered virtual health assistants and health bots, that help them improve processes and reduce costs.", + "description": "The properties of a HealthBot. The Health Bot Service is a cloud platform that empowers developers in Healthcare organizations to build and deploy their compliant, AI-powered virtual health assistants and health bots, that help them improve processes and reduce costs.", "properties": { - "planId": { - "type": "string", - "description": "The identifier of the plan (tier) the bot has.", - "enum": [ - "free", - "standard" - ] - }, "provisioningState": { "type": "string", - "description": "Gets the provisioning state of the Healthcare bot resource.", + "description": "The provisioning state of the Healthcare bot resource.", "readOnly": true - } - } - }, - "HealthBotUpdateProperties": { - "title": "HealthBotUpdateProperties", - "description": "The properties provided for bot update.", - "properties": { - "planId": { + }, + "botManagementPortalLink": { "type": "string", - "description": "The identifier of the plan (tier) the bot has.", - "enum": [ - "free", - "standard" - ] + "description": "The link.", + "readOnly": true } } }, - "HealthBotUpdate": { - "description": "An update to a HealthBot.", + "HealthBotUpdateParameters": { "type": "object", + "description": "Parameters for updating a HealthBot.", "properties": { - "properties": { - "$ref": "#/definitions/HealthBotUpdateProperties", - "description": "The set of properties specific for updating a healthcare bot resource." + "tags": { + "type": "object", + "description": "Tags for a HealthBot.", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": [ + "read", + "create", + "update" + ] + }, + "sku": { + "$ref": "#/definitions/Sku", + "description": "SKU of the HealthBot." } } }, @@ -560,10 +603,10 @@ "description": "The type of identity that creates/modifies resources", "type": "string", "enum": [ - "user", - "application", - "managedIdentity", - "key" + "User", + "Application", + "ManagedIdentity", + "Key" ], "x-ms-enum": { "name": "IdentityType", From ead2733127abcab50d6cb251e2978aeb1c52f670 Mon Sep 17 00:00:00 2001 From: guepsh Date: Mon, 23 Nov 2020 17:26:28 +0200 Subject: [PATCH 4/4] Fixes according to review. --- .../preview/2020-10-20-preview/healthbot.json | 1 + .../Microsoft.HealthBot/stable/2020-10-20/healthbot.json | 1 + 2 files changed, 2 insertions(+) diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/healthbot.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/healthbot.json index d3c0103e7fcc..2d6be438756e 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/healthbot.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/preview/2020-10-20-preview/healthbot.json @@ -388,6 +388,7 @@ "tier": { "type": "string", "enum": [ + "Free", "Standard" ], "x-ms-enum": { diff --git a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/healthbot.json b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/healthbot.json index 99be5be63dde..9cfe448b55d8 100644 --- a/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/healthbot.json +++ b/specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-10-20/healthbot.json @@ -388,6 +388,7 @@ "tier": { "type": "string", "enum": [ + "Free", "Standard" ], "x-ms-enum": {