diff --git a/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/CheckNameAvailability.json b/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/CheckNameAvailability.json new file mode 100644 index 000000000000..4ed88178968c --- /dev/null +++ b/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/CheckNameAvailability.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "parameters": { + "type": "Microsoft.SignalRService/SignalR", + "name": "my-signalr-service" + }, + "api-version": "2018-03-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "nameAvailable": false, + "reason": "AlreadyExists", + "message": "The leaf is already used by other people" + } + } + } +} \ No newline at end of file diff --git a/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/CreateOrUpdate.json b/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/CreateOrUpdate.json new file mode 100644 index 000000000000..4d7ae72aa398 --- /dev/null +++ b/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/CreateOrUpdate.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "parameters": { + "location": "eastus", + "tags": { + "key1": "value1" + }, + "sku": { + "name": "Basic_DS2", + "tier": "Basic", + "capacity": 1 + }, + "properties": {} + }, + "api-version": "2018-03-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "resourceName": "mySignalRService" + }, + "responses": { + "201": { + "body": { + "sku": { + "name": "Basic_DS2", + "tier": "Basic", + "size": "DS2", + "capacity": 1 + }, + "properties": { + "provisioningState": "Succeeded", + "externalIP": "10.0.0.1", + "hostName": "myservice.service.signalr.net", + "publicPort": 5001, + "serverPort": 5002 + }, + "location": "eastus", + "tags": { + "key1": "value1" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService", + "name": "mySignalRService", + "type": "Microsoft.SignalRService/SignalR" + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/subid/providers/Microsoft.SignalRService/...pathToOperationResult..." + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/subid/providers/Microsoft.SignalRService/...pathToOperationResult..." + } + } + } +} \ No newline at end of file diff --git a/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/Delete.json b/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/Delete.json new file mode 100644 index 000000000000..16ab9c5dd1a4 --- /dev/null +++ b/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2018-03-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "resourceName": "mySignalRService" + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/subid/providers/Microsoft.SignalRService/...pathToOperationResult..." + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/Get.json b/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/Get.json new file mode 100644 index 000000000000..099be827dbdb --- /dev/null +++ b/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/Get.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2018-03-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "resourceName": "mySignalRService" + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "Basic_DS2", + "tier": "Basic", + "size": "DS2", + "capacity": 1 + }, + "properties": { + "provisioningState": "Succeeded", + "externalIP": "10.0.0.1", + "hostName": "myservice.service.signalr.net", + "publicPort": 5001, + "serverPort": 5002 + }, + "location": "eastus", + "tags": { + "key1": "value1" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService", + "name": "mySignalRService", + "type": "Microsoft.SignalRService/SignalR" + } + } + } +} \ No newline at end of file diff --git a/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/ListByResourceGroup.json b/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/ListByResourceGroup.json new file mode 100644 index 000000000000..6cc07738f2db --- /dev/null +++ b/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/ListByResourceGroup.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2018-03-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "sku": { + "name": "Basic_DS2", + "tier": "Basic", + "size": "DS2", + "capacity": 1 + }, + "properties": { + "provisioningState": "Succeeded", + "externalIP": "10.0.0.1", + "hostName": "myservice.service.signalr.net", + "publicPort": 5001, + "serverPort": 5002 + }, + "location": "eastus", + "tags": { + "key1": "value1" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService", + "name": "mySignalRService", + "type": "Microsoft.SignalRService/SignalR" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/ListBySubscription.json b/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/ListBySubscription.json new file mode 100644 index 000000000000..344a811a8a6c --- /dev/null +++ b/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/ListBySubscription.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2018-03-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "sku": { + "name": "Basic_DS2", + "tier": "Basic", + "size": "DS2", + "capacity": 1 + }, + "properties": { + "provisioningState": "Succeeded", + "externalIP": "10.0.0.1", + "hostName": "myservice.service.signalr.net", + "publicPort": 5001, + "serverPort": 5002 + }, + "location": "eastus", + "tags": { + "key1": "value1" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService", + "name": "mySignalRService", + "type": "Microsoft.SignalRService/SignalR" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/ListKeys.json b/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/ListKeys.json new file mode 100644 index 000000000000..9fb08975c5ee --- /dev/null +++ b/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/ListKeys.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2018-03-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "resourceName": "mySignalRService" + }, + "responses": { + "200": { + "body": { + "primaryKey": "primaryAccessKey", + "secondaryKey": "secondaryAccessKey" + } + } + } +} \ No newline at end of file diff --git a/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/ListOperations.json b/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/ListOperations.json new file mode 100644 index 000000000000..231eaf16f9f1 --- /dev/null +++ b/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/ListOperations.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2018-03-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.SignalRService/SignalR/read", + "display": { + "provider": "Microsoft.SignalRService", + "resource": "SignalR", + "operation": "Manage SignalR (read-only)", + "description": "View the SignalR's settings and configurations in the management portal or through API" + }, + "properties": {} + } + ], + "nextLink": "providers/Microsoft.SignalRService?$skipToken={opaqueString}" + } + } + } +} \ No newline at end of file diff --git a/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/RegenerateKey.json b/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/RegenerateKey.json new file mode 100644 index 000000000000..798962ef6782 --- /dev/null +++ b/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/RegenerateKey.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "parameters": { + "keyType": "Primary" + }, + "api-version": "2018-03-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "resourceName": "mySignalRService" + }, + "responses": { + "201": { + "body": { + "primaryKey": "primaryAccessKey", + "secondaryKey": "secondaryAccessKey" + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/subid/providers/Microsoft.SignalRService/...pathToOperationResult..." + } + } + } +} \ No newline at end of file diff --git a/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/Update.json b/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/Update.json new file mode 100644 index 000000000000..830275237aba --- /dev/null +++ b/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/examples/Update.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "parameters": { + "tags": { + "key1": "value1" + }, + "sku": { + "name": "Basic_DS2", + "tier": "Basic", + "capacity": 1 + }, + "properties": {} + }, + "api-version": "2018-03-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "resourceName": "mySignalRService" + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "Basic_DS2", + "tier": "Basic", + "size": "DS2", + "capacity": 1 + }, + "properties": { + "provisioningState": "Succeeded", + "externalIP": "10.0.0.1", + "hostName": "myservice.service.signalr.net", + "publicPort": 5001, + "serverPort": 5002 + }, + "location": "eastus", + "tags": { + "key1": "value1" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/SignalR/mySignalRService", + "name": "mySignalRService", + "type": "Microsoft.SignalRService/SignalR" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/subid/providers/Microsoft.SignalRService/...pathToOperationResult..." + } + } + } +} \ No newline at end of file diff --git a/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/signalr.json b/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/signalr.json new file mode 100644 index 000000000000..2f5857bb24e9 --- /dev/null +++ b/specification/signalr/resource-manager/Microsoft.SignalRService/preview/2018-03-01-preview/signalr.json @@ -0,0 +1,891 @@ +{ + "swagger": "2.0", + "info": { + "version": "2018-03-01-preview", + "title": "SignalRManagementClient", + "description": "REST API for Azure SignalR Service" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/providers/Microsoft.SignalRService/operations": { + "get": { + "tags": [ + "SignalR" + ], + "description": "Lists all of the available REST API operations of the Microsoft.SignalRService provider.", + "operationId": "Signalr_ListOperations", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success. The response describes the list of operations.", + "schema": { + "$ref": "#/definitions/OperationList" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "ListOperations": { + "$ref": "./examples/ListOperations.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/checkNameAvailability": { + "post": { + "tags": [ + "SignalR" + ], + "description": "Checks that the SignalR name is valid and is not already in use.", + "operationId": "Signalr_CheckNameAvailability", + "parameters": [ + { + "name": "parameters", + "in": "body", + "description": "Parameters supplied to the operation.", + "required": false, + "schema": { + "$ref": "#/definitions/NameAvailabilityParameters" + } + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Success. The response describes the name availability.", + "schema": { + "$ref": "#/definitions/NameAvailability" + } + } + }, + "x-ms-examples": { + "CheckNameAvailability": { + "$ref": "./examples/CheckNameAvailability.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/SignalR": { + "get": { + "tags": [ + "SignalR" + ], + "description": "Handles requests to list all resources in a subscription.", + "operationId": "Signalr_ListBySubscription", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Success. The response describes the list of SignalR services in the subscription.", + "schema": { + "$ref": "#/definitions/SignalRResourceList" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "ListBySubscription": { + "$ref": "./examples/ListBySubscription.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR": { + "get": { + "tags": [ + "SignalR" + ], + "description": "Handles requests to list all resources in a resource group.", + "operationId": "Signalr_ListByResourceGroup", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupParameter" + } + ], + "responses": { + "200": { + "description": "Success. The response describes the list of SignalR services in a resourceGroup.", + "schema": { + "$ref": "#/definitions/SignalRResourceList" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "ListByResourceGroup": { + "$ref": "./examples/ListByResourceGroup.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}/listKeys": { + "post": { + "tags": [ + "SignalR" + ], + "description": "Get the access keys of the SignalR resource.", + "operationId": "Signalr_ListKeys", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/SignalRServiceName" + } + ], + "responses": { + "200": { + "description": "Success. The response describes SignalR service access keys.", + "schema": { + "$ref": "#/definitions/SignalRKeys" + } + } + }, + "x-ms-examples": { + "ListKeys": { + "$ref": "./examples/ListKeys.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}/regenerateKey": { + "post": { + "tags": [ + "SignalR" + ], + "description": "Regenerate SignalR service access key. PrimaryKey and SecondaryKey cannot be regenerated at the same time.", + "operationId": "Signalr_RegenerateKey", + "parameters": [ + { + "name": "parameters", + "in": "body", + "description": "Parameter that describes the Regenerate Key Operation.", + "required": false, + "schema": { + "$ref": "#/definitions/RegenerateKeyParameters" + } + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/SignalRServiceName" + } + ], + "responses": { + "201": { + "description": "Created and an async operation is excuting in background to make the new key to take effect. The response contains new keys and a Location header to query the async operation result.", + "schema": { + "$ref": "#/definitions/SignalRKeys" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "RegenerateKey": { + "$ref": "./examples/RegenerateKey.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}": { + "get": { + "tags": [ + "SignalR" + ], + "description": "Get the SignalR service and its properties.", + "operationId": "Signalr_Get", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/SignalRServiceName" + } + ], + "responses": { + "200": { + "description": "Success. The response describe the corresponding SingalR service.", + "schema": { + "$ref": "#/definitions/SignalRResource" + } + } + }, + "x-ms-examples": { + "Get": { + "$ref": "./examples/Get.json" + } + } + }, + "put": { + "tags": [ + "SignalR" + ], + "description": "Create a new SignalR service and update an exiting SignalR service.", + "operationId": "Signalr_CreateOrUpdate", + "parameters": [ + { + "name": "parameters", + "in": "body", + "description": "Parameters for the create or update operation", + "required": false, + "schema": { + "$ref": "#/definitions/SignalRCreateParameters" + } + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/SignalRServiceName" + } + ], + "responses": { + "201": { + "description": "Created. The response describes the new service and contains a Location header to query the operation result.", + "schema": { + "$ref": "#/definitions/SignalRResource" + } + }, + "202": { + "description": "Accepted. The response indicates the exiting SingalR service is now updating and contains a Location header to query the operation result.." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "CreateOrUpdate": { + "$ref": "./examples/CreateOrUpdate.json" + } + } + }, + "delete": { + "tags": [ + "SignalR" + ], + "description": "Operation to delete a SignalR service.", + "operationId": "Signalr_Delete", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/SignalRServiceName" + } + ], + "responses": { + "202": { + "description": "Accepted. The response indicates the delete operation is performed in the background." + }, + "204": { + "description": "Success. The response indicates the resource is already deleted." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete": { + "$ref": "./examples/Delete.json" + } + } + }, + "patch": { + "tags": [ + "SignalR" + ], + "description": "Operation to update an exiting SignalR service.", + "operationId": "Signalr_Update", + "parameters": [ + { + "name": "parameters", + "in": "body", + "description": "Parameters for the update operation", + "required": false, + "schema": { + "$ref": "#/definitions/SignalRUpdateParameters" + } + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/SignalRServiceName" + } + ], + "responses": { + "200": { + "description": "Success. The response describes a SingalR service which is not up-to-date.", + "schema": { + "$ref": "#/definitions/SignalRResource" + } + }, + "202": { + "description": "Accepted. The response indicates the exiting SingalR service is now updating and contains a Location header to query the operation result.." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update": { + "$ref": "./examples/Update.json" + } + } + } + } + }, + "definitions": { + "OperationList": { + "description": "Result of the request to list REST API operations. It contains a list of operations.", + "type": "object", + "properties": { + "value": { + "description": "List of operations supported by the resource provider.", + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + } + }, + "nextLink": { + "description": "The URL the client should use to fetch the next page (per server side paging).\r\nIt's null for now, added for future use.", + "type": "string" + } + } + }, + "Operation": { + "description": "REST API operation supported by SignalR resource provider.", + "type": "object", + "properties": { + "name": { + "description": "Name of the operation with format: {provider}/{resource}/{operation}", + "type": "string" + }, + "display": { + "$ref": "#/definitions/OperationDisplay", + "description": "The object that describes the operation." + }, + "origin": { + "description": "Optional. The intended executor of the operation; governs the display of the operation in the RBAC UX and the audit logs UX.", + "type": "string" + }, + "properties": { + "$ref": "#/definitions/OperationProperties", + "description": "Extra properties for the operation.", + "x-ms-client-flatten": false + } + } + }, + "OperationDisplay": { + "description": "The object that describes a operation.", + "type": "object", + "properties": { + "provider": { + "description": "Friendly name of the resource provider", + "type": "string" + }, + "resource": { + "description": "Resource type on which the operation is performed.", + "type": "string" + }, + "operation": { + "description": "The localized friendly name for the operation.", + "type": "string" + }, + "description": { + "description": "The localized friendly description for the operation", + "type": "string" + } + } + }, + "OperationProperties": { + "description": "Extra Operation properties.", + "type": "object", + "properties": { + "serviceSpecification": { + "$ref": "#/definitions/ServiceSpecification", + "description": "The service specifications." + } + } + }, + "ServiceSpecification": { + "description": "An object that describes a specification.", + "type": "object", + "properties": { + "metricSpecifications": { + "description": "Specifications of the Metrics for Azure Monitoring.", + "type": "array", + "items": { + "$ref": "#/definitions/MetricSpecification" + } + } + } + }, + "MetricSpecification": { + "description": "Specifications of the Metrics for Azure Monitoring.", + "type": "object", + "properties": { + "name": { + "description": "Name of the metric.", + "type": "string" + }, + "displayName": { + "description": "Localized friendly display name of the metric.", + "type": "string" + }, + "displayDescription": { + "description": "Localized friendly description of the metric.", + "type": "string" + }, + "unit": { + "description": "The unit that makes sense for the metric.", + "type": "string" + }, + "aggregationType": { + "description": "Only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count.", + "type": "string" + }, + "fillGapWithZero": { + "description": "Optional. If set to true, then zero will be returned for time duration where no metric is emitted/published. \r\nEx. a metric that returns the number of times a particular error code was emitted. The error code may not appear \r\noften, instead of the RP publishing 0, Shoebox can auto fill in 0s for time periods where nothing was emitted.", + "type": "string" + }, + "category": { + "description": "The name of the metric category that the metric belongs to. A metric can only belong to a single category.", + "type": "string" + } + } + }, + "NameAvailabilityParameters": { + "description": "Data POST-ed to the nameAvailability action", + "required": [ + "type", + "name" + ], + "type": "object", + "properties": { + "type": { + "description": "The resource type. Should be always \"Microsoft.SignalRService/SignalR\".", + "type": "string" + }, + "name": { + "description": "The SignalR service name to validate. e.g.\"my-signalR-name-here\"", + "type": "string" + } + } + }, + "NameAvailability": { + "description": "Result of the request to check name availability. It contains a flag and possible reason of failure.", + "type": "object", + "properties": { + "nameAvailable": { + "description": "Indicates whether the name is available or not.", + "type": "boolean" + }, + "reason": { + "description": "The reason of the availability. Required if name is not available.", + "type": "string" + }, + "message": { + "description": "The message of the operation.", + "type": "string" + } + } + }, + "SignalRResourceList": { + "description": "Object that includes an array of SignalR services and a possible link for next set.", + "type": "object", + "properties": { + "value": { + "description": "List of SignalR services", + "type": "array", + "items": { + "$ref": "#/definitions/SignalRResource" + } + }, + "nextLink": { + "description": "The URL the client should use to fetch the next page (per server side paging).\r\nIt's null for now, added for future use.", + "type": "string" + } + } + }, + "SignalRResource": { + "description": "A class represent a SignalR service resource.", + "type": "object", + "x-ms-client-name": "SignalrResourceList", + "allOf": [ + { + "$ref": "#/definitions/TrackedResource" + } + ], + "properties": { + "sku": { + "$ref": "#/definitions/ResourceSku", + "x-ms-client-name": "signalrsku", + "description": "SKU of the service." + }, + "properties": { + "$ref": "#/definitions/SignalRProperties", + "description": "The properties of the service.", + "x-ms-client-flatten": true + }, + "id": { + "description": "Fully qualified resource Id for the resource.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "The name of the resouce.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "The type of the service - e.g. \"Microsoft.SignalRService/SignalR\"", + "type": "string", + "readOnly": true + } + } + }, + "TrackedResource": { + "description": "The resource model definition for a ARM tracked top level resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "location": { + "description": "The GEO location of the SignalR service. e.g. West US | East US | North Central US | South Central US.", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "tags": { + "description": "Tags of the service which is a list of key value pairs that describe the resource.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": [ + "read", + "create", + "update" + ] + } + } + }, + "Resource": { + "description": "The core properties of ARM resources.", + "type": "object", + "properties": { + "id": { + "description": "Fully qualified resource Id for the resource.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "The name of the resouce.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "The type of the service - e.g. \"Microsoft.SignalRService/SignalR\"", + "type": "string", + "readOnly": true + } + }, + "x-ms-azure-resource": true + }, + "ResourceSku": { + "description": "The billing information of the resource.(e.g. basic vs. standard)", + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "description": "The name of the SKU. This is typically a letter + number code, such as A0 or P3. Required (if sku is specified)", + "type": "string" + }, + "tier": { + "description": "The tier of this particular SKU. Optional.", + "enum": [ + "Free", + "Basic", + "Premium" + ], + "type": "string", + "x-ms-enum": { + "name": "SignalRSkuTier", + "modelAsString": true + } + }, + "size": { + "description": "Optional, string. When the name field is the combination of tier and some other value, this would be the standalone code.", + "type": "string" + }, + "family": { + "description": "Optional, string. If the service has different generations of hardware, for the same SKU, then that can be captured here.", + "type": "string" + }, + "capacity": { + "format": "int32", + "description": "Optional, integer. If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not \r\npossible for the resource this may be omitted.", + "type": "integer" + } + } + }, + "SignalRProperties": { + "description": "A class that describes the properties of the SignalR service that should contain more read-only properties than AzSignalR.Models.SignalRCreateOrUpdateProperties", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/SignalRCreateOrUpdateProperties" + } + ], + "properties": { + "provisioningState": { + "description": "Provisioning state of the resource.", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "Creating", + "Updating", + "Deleting", + "Moving" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + } + }, + "externalIP": { + "description": "The publicly accessible IP of the SignalR service.", + "type": "string", + "readOnly": true + }, + "hostName": { + "description": "FQDN of the SignalR service instance. Format: xxx.service.signalr.net", + "type": "string", + "readOnly": true + }, + "publicPort": { + "format": "int32", + "description": "The publicly accessibly port of the SignalR service which is designed for browser/client side usage.", + "type": "integer", + "readOnly": true + }, + "serverPort": { + "format": "int32", + "description": "The publicly accessibly port of the SignalR service which is designed for customer server side usage.", + "type": "integer", + "readOnly": true + } + } + }, + "SignalRCreateOrUpdateProperties": { + "description": "Settings used to provision or configure the resource.", + "type": "object", + "properties": { + "hostNamePrefix": { + "description": "Prefix for the hostName of the SignalR service. Retained for future use.\r\nThe hostname will be of format: <hostNamePrefix>.service.signalr.net.", + "type": "string" + } + } + }, + "SignalRKeys": { + "description": "A class represents the access keys of SignalR service.", + "type": "object", + "properties": { + "primaryKey": { + "description": "The primary access key.", + "type": "string" + }, + "secondaryKey": { + "description": "The secondary access key.", + "type": "string" + } + } + }, + "RegenerateKeyParameters": { + "description": "Parameters describes the request to regenerate access keys", + "type": "object", + "properties": { + "keyType": { + "description": "The keyType to regenerate. Must be either 'primary' or 'secondary'(case-insensitive).", + "enum": [ + "Primary", + "Secondary" + ], + "type": "string", + "x-ms-enum": { + "name": "KeyType", + "modelAsString": true + } + } + } + }, + "SignalRCreateParameters": { + "description": "Parameters for SignalR service create/update operation.\r\n\r\nKeep the same schema as AzSignalR.Models.SignalRResource", + "required": [ + "location" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/SignalRUpdateParameters" + } + ], + "properties": { + "location": { + "description": "Azure GEO region: e.g. West US | East US | North Central US | South Central US | West Europe | North Europe | East Asia | Southeast Asia | etc. \r\nThe geo region of a resource never changes after it is created.", + "type": "string" + } + } + }, + "SignalRUpdateParameters": { + "description": "Parameters for SignalR service update operation", + "type": "object", + "properties": { + "tags": { + "description": "A list of key value pairs that describe the resource.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sku": { + "$ref": "#/definitions/ResourceSku", + "description": "The billing information of the resource.(e.g. basic vs. standard)" + }, + "properties": { + "$ref": "#/definitions/SignalRCreateOrUpdateProperties", + "description": "Settings used to provision or configure the resource", + "x-ms-client-flatten": false + } + } + } + }, + "parameters": { + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "Client Api Version.", + "required": true, + "type": "string" + }, + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "Gets subscription Id which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "required": true, + "type": "string" + }, + "ResourceGroupParameter": { + "name": "resourceGroupName", + "in": "path", + "description": "The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "SignalRServiceName": { + "name": "resourceName", + "in": "path", + "description": "The name of the SignalR resource.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + }, + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow" + } + }, + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ] +} \ No newline at end of file diff --git a/specification/signalr/resource-manager/readme.md b/specification/signalr/resource-manager/readme.md new file mode 100644 index 000000000000..6692ccb2e2c2 --- /dev/null +++ b/specification/signalr/resource-manager/readme.md @@ -0,0 +1,143 @@ +# SignalR + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for SignalR. + + + +--- +## Getting Started +To build the SDK for SignalR, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run: + +> `autorest` + +To see additional help and options, run: + +> `autorest --help` +--- + +## Configuration + + + +### Basic Information +These are the global settings for the SignalR API. + +``` yaml +openapi-type: arm +tag: package-2018-03-01-preview +``` + + +### Tag: package-2018-03-01-preview + +These settings apply only when `--tag=package-2018-03-01-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2018-03-01-preview' +input-file: +- Microsoft.SignalRService/preview/2018-03-01-preview/signalr.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-libraries-for-java + - repo: azure-sdk-for-go +``` + + +## Python + +These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. +Use `--python-mode=update` if you already have a setup.py and just want to update the code itself. + +``` yaml $(python) +python-mode: create +python: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 2 + namespace: azure.mgmt.signalr + package-name: azure-mgmt-signalr + package-version: 0.1.0 + clear-output-folder: true +``` +``` yaml $(python) && $(python-mode) == 'update' +python: + no-namespace-folders: true + output-folder: $(python-sdks-folder)/azure-mgmt-signalr/azure/mgmt/signalr +``` +``` yaml $(python) && $(python-mode) == 'create' +python: + basic-setup-py: true + output-folder: $(python-sdks-folder)/azure-mgmt-signalr +``` + + +## Go + +These settings apply only when `--go` is specified on the command line. + +``` yaml $(go) +go: + license-header: MICROSOFT_APACHE_NO_VERSION + namespace: signalr + clear-output-folder: true +``` + +### Go multi-api + +``` yaml $(go) && $(multiapi) +batch: + - tag: package-2018-03-01-preview +``` + +### Tag: package-2018-03-01-preview and go + +These settings apply only when `--tag=package-2018-03-01-preview --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +``` yaml $(tag) == 'package-2018-03-01-preview' && $(go) +output-folder: $(go-sdk-folder)/services/signalr/mgmt/2018-03-01-preview/signalr +``` + +## Java + +These settings apply only when `--java` is specified on the command line. +Please also specify `--azure-libraries-for-java-folder=`. + +``` yaml $(java) +java: + azure-arm: true + fluent: true + namespace: com.microsoft.azure.management.signalr + license-header: MICROSOFT_MIT_NO_CODEGEN + payload-flattening-threshold: 1 + output-folder: $(azure-libraries-for-java-folder)/azure-mgmt-signalr +``` + +## C# + +These settings apply only when `--csharp` is specified on the command line. +Please also specify `--csharp-sdks-folder=`. + +``` yaml $(csharp) +csharp: + # last generated with AutoRest.0.17.3 + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + namespace: Microsoft.Azure.Management.SignalR + output-folder: $(csharp-sdks-folder)/SignalR/Management.SignalR/Generated + clear-output-folder: true +``` \ No newline at end of file