diff --git a/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/CommunicationService.json b/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/CommunicationService.json new file mode 100644 index 000000000000..4a6b30e4e010 --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/CommunicationService.json @@ -0,0 +1,965 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Communication Services Management API", + "version": "2020-08-20", + "description": "REST API for Azure Communication Services" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "host": "management.azure.com", + "schemes": [ + "https" + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/providers/Microsoft.Communication/operations": { + "get": { + "description": "Lists all of the available REST API operations of the Microsoft.Communication provider.", + "operationId": "Operations_List", + "summary": "List Operations", + "tags": [ + "Operations" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success. The response describes the list of operations.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "produces": [ + "application/json" + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Communication/checkNameAvailability": { + "post": { + "description": "Checks that the CommunicationService name is valid and is not already in use.", + "operationId": "CommunicationService_CheckNameAvailability", + "summary": "Check Name Availability", + "tags": [ + "CommunicationService" + ], + "parameters": [ + { + "name": "nameAvailabilityParameters", + "in": "body", + "schema": { + "$ref": "#/definitions/NameAvailabilityParameters" + }, + "description": "Parameters supplied to the operation." + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "consumes": [ + "application/json" + ], + "responses": { + "200": { + "description": "Success. The response describes the name availability.", + "schema": { + "$ref": "#/definitions/NameAvailability" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "produces": [ + "application/json" + ], + "x-ms-examples": { + "Check name availability available": { + "$ref": "./examples/checkNameAvailabilityAvailable.json" + }, + "Check name availability unavailable": { + "$ref": "./examples/checkNameAvailabilityUnavailable.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}/linkNotificationHub": { + "post": { + "description": "Links an Azure Notification Hub to this communication service.", + "operationId": "CommunicationService_LinkNotificationHub", + "summary": "Link Notification Hub", + "tags": [ + "CommunicationService" + ], + "parameters": [ + { + "name": "linkNotificationHubParameters", + "in": "body", + "schema": { + "$ref": "#/definitions/LinkNotificationHubParameters" + }, + "description": "Parameters supplied to the operation." + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/CommunicationServiceName" + } + ], + "consumes": [ + "application/json" + ], + "responses": { + "200": { + "description": "Success. The notification hub has been linked.", + "schema": { + "$ref": "#/definitions/LinkedNotificationHub" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "produces": [ + "application/json" + ], + "x-ms-examples": { + "Link notification hub": { + "$ref": "./examples/linkNotificationHub.json" + } + } + } + }, + "/providers/Microsoft.Communication/locations/{location}/operationStatuses/{operationId}": { + "get": { + "description": "Gets the current status of an async operation.", + "operationId": "OperationStatuses_Get", + "summary": "Get Operation Status", + "tags": [ + "OperationStatus" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/LocationParameter" + }, + { + "$ref": "#/parameters/OperationIdParameter" + } + ], + "consumes": [ + "application/json" + ], + "responses": { + "200": { + "description": "The requested operation status", + "schema": { + "$ref": "#/definitions/OperationStatus" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "produces": [ + "application/json" + ], + "x-ms-examples": { + "Get OperationStatus": { + "$ref": "./examples/getOperationStatus.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Communication/communicationServices": { + "get": { + "description": "Handles requests to list all resources in a subscription.", + "operationId": "CommunicationService_ListBySubscription", + "summary": "List By Subscription", + "tags": [ + "CommunicationService" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Success. The response describes the list of CommunicationServices in the subscription.", + "schema": { + "$ref": "#/definitions/CommunicationServiceResourceList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "produces": [ + "application/json" + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List by subscription": { + "$ref": "./examples/listBySubscription.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices": { + "get": { + "description": "Handles requests to list all resources in a resource group.", + "operationId": "CommunicationService_ListByResourceGroup", + "summary": "List By Resource Group", + "tags": [ + "CommunicationService" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "Success. The response describes the list of CommunicationServices in a resourceGroup.", + "schema": { + "$ref": "#/definitions/CommunicationServiceResourceList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "produces": [ + "application/json" + ], + "x-ms-examples": { + "List by resource group": { + "$ref": "./examples/listByResourceGroup.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}": { + "patch": { + "description": "Operation to update an existing CommunicationService.", + "operationId": "CommunicationService_Update", + "summary": "Update", + "tags": [ + "CommunicationService" + ], + "parameters": [ + { + "name": "parameters", + "in": "body", + "description": "Parameters for the update operation", + "required": false, + "schema": { + "$ref": "#/definitions/CommunicationServiceResource" + } + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/CommunicationServiceName" + } + ], + "responses": { + "200": { + "description": "The update request was successful", + "schema": { + "$ref": "#/definitions/CommunicationServiceResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "produces": [ + "application/json" + ], + "x-ms-examples": { + "Update resource": { + "$ref": "./examples/update.json" + } + } + }, + "get": { + "description": "Get the CommunicationService and its properties.", + "operationId": "CommunicationService_Get", + "summary": "Get", + "tags": [ + "CommunicationService" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/CommunicationServiceName" + } + ], + "responses": { + "200": { + "description": "Success. The response describe the corresponding CommunicationService service.", + "schema": { + "$ref": "#/definitions/CommunicationServiceResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "produces": [ + "application/json" + ], + "x-ms-examples": { + "Get resource": { + "$ref": "./examples/get.json" + } + } + }, + "put": { + "description": "Create a new CommunicationService or update an existing CommunicationService.", + "operationId": "CommunicationService_CreateOrUpdate", + "summary": "Create Or Update", + "tags": [ + "CommunicationService" + ], + "parameters": [ + { + "name": "parameters", + "in": "body", + "description": "Parameters for the create or update operation", + "required": false, + "schema": { + "$ref": "#/definitions/CommunicationServiceResource" + } + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/CommunicationServiceName" + } + ], + "consumes": [ + "application/json" + ], + "responses": { + "200": { + "description": "The create or update request was completed successfully", + "schema": { + "$ref": "#/definitions/CommunicationServiceResource" + } + }, + "201": { + "description": "The create or update request was accepted", + "headers": { + "Azure-AsyncOperation": { + "description": "URL to query for status of the operation.", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/CommunicationServiceResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "produces": [ + "application/json" + ], + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Create or update resource": { + "$ref": "./examples/createOrUpdate.json" + } + } + }, + "delete": { + "description": "Operation to delete a CommunicationService.", + "operationId": "CommunicationService_Delete", + "summary": "Delete", + "tags": [ + "CommunicationService" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/CommunicationServiceName" + } + ], + "responses": { + "200": { + "description": "The delete operation was successful." + }, + "202": { + "description": "The delete operation is being performed in the background.", + "headers": { + "location": { + "description": "URL to query for status of the operation.", + "type": "string" + } + } + }, + "204": { + "description": "The resource did not exist." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "Delete resource": { + "$ref": "./examples/delete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}/listKeys": { + "post": { + "description": "Get the access keys of the CommunicationService resource.", + "operationId": "CommunicationService_ListKeys", + "summary": "List Keys", + "tags": [ + "CommunicationService" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/CommunicationServiceName" + } + ], + "responses": { + "200": { + "description": "Success. The response describes CommunicationService access keys.", + "schema": { + "$ref": "#/definitions/CommunicationServiceKeys" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "produces": [ + "application/json" + ], + "x-ms-examples": { + "List keys": { + "$ref": "./examples/listKeys.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}/regenerateKey": { + "post": { + "description": "Regenerate CommunicationService access key. PrimaryKey and SecondaryKey cannot be regenerated at the same time.", + "operationId": "CommunicationService_RegenerateKey", + "summary": "Regenerate Key", + "tags": [ + "CommunicationService" + ], + "parameters": [ + { + "name": "parameters", + "in": "body", + "description": "Parameter that describes the Regenerate Key Operation.", + "required": true, + "schema": { + "$ref": "#/definitions/RegenerateKeyParameters" + } + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/CommunicationServiceName" + } + ], + "responses": { + "200": { + "description": "Created. The response contains the new key.", + "schema": { + "$ref": "#/definitions/CommunicationServiceKeys" + } + }, + "201": { + "description": "Created and an async operation is executing in background to make the new key take effect. The response contains new keys and an Azure-AsyncOperation header to query the async operation result.", + "schema": { + "$ref": "#/definitions/CommunicationServiceKeys" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "x-ms-examples": { + "Regenerate key": { + "$ref": "./examples/regenerateKey.json" + } + } + } + } + }, + "definitions": { + "NameAvailabilityParameters": { + "description": "Data POST-ed to the nameAvailability action", + "required": [ + "type", + "name" + ], + "type": "object", + "properties": { + "type": { + "description": "The resource type. Should be always \"Microsoft.Communication/CommunicationServices\".", + "type": "string" + }, + "name": { + "description": "The CommunicationService name to validate. e.g.\"my-CommunicationService-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" + } + } + }, + "LinkNotificationHubParameters": { + "description": "Description of an Azure Notification Hub to link to the communication service", + "required": [ + "resourceId", + "connectionString" + ], + "type": "object", + "properties": { + "resourceId": { + "description": "The resource ID of the notification hub", + "type": "string" + }, + "connectionString": { + "description": "Connection string for the notification hub", + "type": "string" + } + } + }, + "LinkedNotificationHub": { + "description": "A notification hub that has been linked to the communication service", + "type": "object", + "properties": { + "resourceId": { + "description": "The resource ID of the notification hub", + "type": "string" + } + } + }, + "OperationStatus": { + "description": "The current status of an async operation", + "type": "object", + "properties": { + "id": { + "description": "Fully qualified ID for the operation status.", + "type": "string", + "readOnly": true + }, + "status": { + "description": "Provisioning state of the resource.", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "Creating", + "Deleting", + "Moving" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "Status", + "modelAsString": true + } + }, + "startTime": { + "description": "The start time of the operation", + "type": "string", + "readOnly": true, + "format": "date-time" + }, + "endTime": { + "description": "The end time of the operation", + "type": "string", + "readOnly": true, + "format": "date-time" + }, + "percentComplete": { + "description": "Percent of the operation that is complete", + "type": "number", + "readOnly": true, + "minimum": 0, + "maximum": 100 + }, + "error": { + "description": "Operation Error message", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse", + "x-ms-client-flatten": true + } + } + }, + "CommunicationServiceResourceList": { + "description": "Object that includes an array of CommunicationServices and a possible link for next set.", + "type": "object", + "properties": { + "value": { + "description": "List of CommunicationService", + "type": "array", + "items": { + "$ref": "#/definitions/CommunicationServiceResource" + } + }, + "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" + } + } + }, + "CommunicationServiceResource": { + "description": "A class representing a CommunicationService resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/Resource" + }, + { + "$ref": "#/definitions/LocationResource" + }, + { + "$ref": "#/definitions/TaggedResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/CommunicationServiceProperties", + "description": "The properties of the service.", + "x-ms-client-flatten": true + }, + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + } + } + }, + "LocationResource": { + "description": "An ARM resource with its own location (not a global or an inherited location).", + "type": "object", + "properties": { + "location": { + "description": "The Azure location where the CommunicationService is running.", + "type": "string", + "x-ms-mutability": [ + "create", + "read" + ] + } + } + }, + "TaggedResource": { + "description": "An ARM resource with that can accept tags", + "type": "object", + "properties": { + "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" + ] + } + } + }, + "CommunicationServiceProperties": { + "description": "A class that describes the properties of the CommunicationService.", + "required": [ + "dataLocation" + ], + "type": "object", + "properties": { + "provisioningState": { + "description": "Provisioning state of the resource.", + "enum": [ + "Unknown", + "Succeeded", + "Failed", + "Canceled", + "Running", + "Creating", + "Updating", + "Deleting", + "Moving" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + } + }, + "hostName": { + "description": "FQDN of the CommunicationService instance.", + "type": "string", + "readOnly": true + }, + "dataLocation": { + "description": "The location where the communication service stores its data at rest.", + "type": "string", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "notificationHubId": { + "description": "Resource ID of an Azure Notification Hub linked to this resource.", + "type": "string", + "readOnly": true + }, + "version": { + "description": "Version of the CommunicationService resource. Probably you need the same or higher version of client SDKs.", + "type": "string", + "readOnly": true + }, + "immutableResourceId": { + "description": "The immutable resource Id of the communication service.", + "type": "string", + "readOnly": true + } + } + }, + "CommunicationServiceKeys": { + "description": "A class representing the access keys of a CommunicationService.", + "type": "object", + "properties": { + "primaryKey": { + "description": "The primary access key.", + "type": "string" + }, + "secondaryKey": { + "description": "The secondary access key.", + "type": "string" + }, + "primaryConnectionString": { + "description": "CommunicationService connection string constructed via the primaryKey", + "type": "string" + }, + "secondaryConnectionString": { + "description": "CommunicationService connection string constructed via the secondaryKey", + "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": false + } + } + } + } + }, + "parameters": { + "CommunicationServiceName": { + "name": "communicationServiceName", + "in": "path", + "description": "The name of the CommunicationService resource.", + "pattern": "^[-\\w]+$", + "minLength": 1, + "maxLength": 63, + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "LocationParameter": { + "name": "location", + "in": "path", + "description": "The Azure region", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "OperationIdParameter": { + "name": "operationId", + "in": "path", + "description": "The ID of an ongoing async operation", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/checkNameAvailabilityAvailable.json b/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/checkNameAvailabilityAvailable.json new file mode 100644 index 000000000000..7f98740e2575 --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/checkNameAvailabilityAvailable.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "subscriptionId": "12345", + "api-version": "2020-08-20", + "nameAvailabilityParameters": { + "type": "Microsoft.Communication/CommunicationServices", + "name": "MyCommunicationService" + } + }, + "responses": { + "200": { + "body": { + "nameAvailable": true, + "reason": "NameAvailable", + "message": "Requested name is available for the requested type" + } + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/checkNameAvailabilityUnavailable.json b/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/checkNameAvailabilityUnavailable.json new file mode 100644 index 000000000000..06c2199d7535 --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/checkNameAvailabilityUnavailable.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "subscriptionId": "12345", + "api-version": "2020-08-20", + "nameAvailabilityParameters": { + "type": "Microsoft.Communication/CommunicationServices", + "name": "MyCommunicationService" + } + }, + "responses": { + "200": { + "body": { + "nameAvailable": false, + "reason": "AlreadyExists", + "message": "Requested name is unavailable for the requested type" + } + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/createOrUpdate.json b/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/createOrUpdate.json new file mode 100644 index 000000000000..4e24f21f850e --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/createOrUpdate.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "subscriptionId": "12345", + "resourceGroupName": "MyResourceGroup", + "communicationServiceName": "MyCommunicationResource", + "api-version": "2020-08-20", + "parameters": { + "location": "Global", + "properties": { + "dataLocation": "United States" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/12345/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource", + "name": "MyCommunicationResource", + "type": "Microsoft.Communication/CommunicationServices", + "location": "Global", + "properties": { + "dataLocation": "United States", + "provisioningState": "Succeeded", + "hostName": "mycommunicationresource.communications.azure.com" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/providers/Microsoft.Communication/locations/westus/operationStatuses/ed5d502c-acaa-42ec-ad61-0d8488a9fd1d" + }, + "body": { + "id": "/subscriptions/12345/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource", + "name": "MyCommunicationResource", + "type": "Microsoft.Communication/CommunicationServices", + "location": "Global", + "properties": { + "dataLocation": "United States", + "provisioningState": "Accepted" + } + } + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/delete.json b/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/delete.json new file mode 100644 index 000000000000..dee27253600e --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/delete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "12345", + "resourceGroupName": "MyResourceGroup", + "communicationServiceName": "MyCommunicationResource", + "api-version": "2020-08-20" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Communication/locations/westus/operationStatuses/ed5d502c-acaa-42ec-ad61-0d8488a9fd1d" + } + }, + "204": {} + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/get.json b/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/get.json new file mode 100644 index 000000000000..2c3d49aa4b28 --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/get.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "12345", + "resourceGroupName": "MyResourceGroup", + "communicationServiceName": "MyCommunicationResource", + "api-version": "2020-08-20" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/12345/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource", + "name": "MyCommunicationResource", + "type": "Microsoft.Communication/CommunicationServices", + "location": "Global", + "properties": { + "dataLocation": "United States", + "provisioningState": "Running", + "hostName": "mycommunicationservice.comms.azure.net", + "version": "0.2.0" + } + } + }, + "default": { + "body": { + "error": { + "code": "ResourceNotFound", + "message": "The requested resource was not found" + } + } + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/getOperationStatus.json b/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/getOperationStatus.json new file mode 100644 index 000000000000..fc9587705dd9 --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/getOperationStatus.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "location": "westus2", + "operationId": "db5f291f-284d-46e9-9152-d5c83f7c14b8", + "api-version": "2020-08-20" + }, + "responses": { + "200": { + "body": { + "id": "db5f291f-284d-46e9-9152-d5c83f7c14b8", + "status": "Succeeded", + "startTime": "2020-07-06T17:06:26.100Z", + "endTime": "2020-07-06T17:06:42.800Z", + "percentComplete": 100 + } + }, + "default": { + "body": { + "error": { + "code": "OperationNotFound", + "message": "The requested async operation was not found" + } + } + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/linkNotificationHub.json b/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/linkNotificationHub.json new file mode 100644 index 000000000000..7ddfbcc705e1 --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/linkNotificationHub.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "12345", + "resourceGroupName": "MyResourceGroup", + "communicationServiceName": "MyCommunicationResource", + "api-version": "2020-08-20", + "linkNotificationHubParameters": { + "resourceId": "/subscriptions/12345/resourceGroups/MyOtherResourceGroup/providers/Microsoft.NotificationHubs/namespaces/MyNamespace/notificationHubs/MyHub", + "connectionString": "Endpoint=sb://MyNamespace.servicebus.windows.net/;SharedAccessKey=abcd1234" + } + }, + "responses": { + "200": { + "body": { + "resourceId": "/subscriptions/12345/resourceGroups/MyOtherResourceGroup/providers/Microsoft.NotificationHubs/namespaces/MyNamespace/notificationHubs/MyHub" + } + }, + "default": { + "body": { + "error": { + "code": "WrongSubscription", + "message": "The notification hub must be in the same subscription as the communication service" + } + } + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/listByResourceGroup.json b/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/listByResourceGroup.json new file mode 100644 index 000000000000..a1a743f567ab --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/listByResourceGroup.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "subscriptionId": "12345", + "resourceGroupName": "MyResourceGroup", + "api-version": "2020-08-20" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "provisioningState": "Running", + "dataLocation": "United States", + "hostName": "mycommunicationservice.comms.azure.net", + "version": "0.2.0" + } + } + ] + } + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/listBySubscription.json b/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/listBySubscription.json new file mode 100644 index 000000000000..99e114dcf5ee --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/listBySubscription.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "12345", + "api-version": "2020-08-20" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "provisioningState": "Running", + "dataLocation": "United States", + "hostName": "mycommunicationservice.comms.azure.net", + "version": "0.2.0" + } + } + ] + } + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/listKeys.json b/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/listKeys.json new file mode 100644 index 000000000000..b78580f4aa9a --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/listKeys.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "12345", + "resourceGroupName": "MyResourceGroup", + "communicationServiceName": "MyCommunicationResource", + "api-version": "2020-08-20" + }, + "responses": { + "200": { + "body": { + "primaryKey": "", + "secondaryKey": "" + } + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/regenerateKey.json b/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/regenerateKey.json new file mode 100644 index 000000000000..37aa4b26a332 --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/regenerateKey.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "12345", + "resourceGroupName": "MyResourceGroup", + "communicationServiceName": "MyCommunicationResource", + "api-version": "2020-08-20", + "parameters": { + "keyType": "Primary" + } + }, + "responses": { + "200": { + "body": { + "primaryKey": "1234", + "primaryConnectionString": "endpoint=http://example.com;accesskey=1234" + } + }, + "201": { + "body": {} + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/update.json b/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/update.json new file mode 100644 index 000000000000..3537d9dd4142 --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/examples/update.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "12345", + "resourceGroupName": "MyResourceGroup", + "communicationServiceName": "MyCommunicationResource", + "api-version": "2020-08-20", + "parameters": { + "tags": { + "newTag": "newVal" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/12345/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource", + "name": "MyCommunicationResource", + "type": "Microsoft.Communication/CommunicationServices", + "location": "Global", + "tags": { + "newTag": "newVal" + }, + "properties": { + "provisioningState": "Succeeded", + "dataLocation": "United States", + "hostName": "mycommunicationresource.communications.azure.com", + "version": "0.2.0" + } + } + } + } +} diff --git a/specification/communication/resource-manager/readme.azureresourceschema.md b/specification/communication/resource-manager/readme.azureresourceschema.md index 9f59d5cca93d..447921f5ed6b 100644 --- a/specification/communication/resource-manager/readme.azureresourceschema.md +++ b/specification/communication/resource-manager/readme.azureresourceschema.md @@ -6,12 +6,24 @@ These settings apply only when `--azureresourceschema` is specified on the comma ``` yaml $(azureresourceschema) && $(multiapi) batch: + - tag: schema-communication-2020-08-20 - tag: schema-communication-2020-08-20-preview ``` Please also specify `--azureresourceschema-folder=`. +### Tag: schema-communication-2020-08-20 and azureresourceschema + +``` yaml $(tag) == 'schema-communication-2020-08-20' && $(azureresourceschema) +output-folder: $(azureresourceschema-folder)/schemas + +# all the input files in this apiVersion +input-file: + - Microsoft.Communication/stable/2020-08-20/CommunicationService.json + +``` + ### Tag: schema-communication-2020-08-20-preview and azureresourceschema ``` yaml $(tag) == 'schema-communication-2020-08-20-preview' && $(azureresourceschema) diff --git a/specification/communication/resource-manager/readme.go.md b/specification/communication/resource-manager/readme.go.md index 1434d5fd3791..d1113c532b23 100644 --- a/specification/communication/resource-manager/readme.go.md +++ b/specification/communication/resource-manager/readme.go.md @@ -13,9 +13,19 @@ go: ``` yaml $(go) && $(multiapi) batch: + - tag: package-2020-08-20 - tag: package-2020-08-20-preview ``` +### Tag: package-2020-08-20 and go + +These settings apply only when `--tag=package-2020-08-20 --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +``` yaml $(tag) == 'package-2020-08-20' && $(go) +output-folder: $(go-sdk-folder)/services/$(namespace)/mgmt/2020-08-20/$(namespace) +``` + ### Tag: package-2020-08-20-preview and go These settings apply only when `--tag=package-2020-08-20-preview --go` is specified on the command line. diff --git a/specification/communication/resource-manager/readme.java.md b/specification/communication/resource-manager/readme.java.md index 9c6341c30e98..f52e515d6980 100644 --- a/specification/communication/resource-manager/readme.java.md +++ b/specification/communication/resource-manager/readme.java.md @@ -16,9 +16,23 @@ output-folder: $(azure-libraries-for-java-folder)/azure-mgmt-communication ``` yaml $(java) && $(multiapi) batch: + - tag: package-2020-08-20 - tag: package-2020-08-20-preview ``` +### Tag: package-2020-08-20 and java + +These settings apply only when `--tag=package-2020-08-20--java` is specified on the command line. +Please also specify `--azure-libraries-for-java=`. + +``` yaml $(tag) == 'package-2020-08-20' && $(java) && $(multiapi) +java: + namespace: com.microsoft.azure.management.communication.v2020_08_20 + output-folder: $(azure-libraries-for-java-folder)/sdk/communication/mgmt-v2020_08_20 +regenerate-manager: true +generate-interface: true +``` + ### Tag: package-2020-08-20-preview and java These settings apply only when `--tag=package-2020-08-20-preview --java` is specified on the command line. diff --git a/specification/communication/resource-manager/readme.md b/specification/communication/resource-manager/readme.md index f9e55f031a15..45d697427a39 100644 --- a/specification/communication/resource-manager/readme.md +++ b/specification/communication/resource-manager/readme.md @@ -28,7 +28,16 @@ These are the global settings for the Azure Communication Services API. title: CommunicationServiceManagementClient openapi-type: arm openapi-subtype: rpaas -tag: package-2020-08-20-preview +tag: package-2020-08-20 +``` + +### Tag: package-2020-08-20 + +These settings apply only when `--tag=package-2020-08-20` is specified on the command line. + +```yaml $(tag) == 'package-2020-08-20' +input-file: + - Microsoft.Communication/stable/2020-08-20/CommunicationService.json ``` ### Tag: package-2020-08-20-preview diff --git a/specification/communication/resource-manager/readme.python.md b/specification/communication/resource-manager/readme.python.md index 74a33158e6ad..94ed970f40ac 100644 --- a/specification/communication/resource-manager/readme.python.md +++ b/specification/communication/resource-manager/readme.python.md @@ -13,7 +13,7 @@ python: payload-flattening-threshold: 2 namespace: azure.mgmt.communication package-name: azure-mgmt-communication - package-version: 1.0.0rc1 + package-version: 1.0.0 clear-output-folder: true ``` @@ -37,7 +37,7 @@ azure-arm: true license-header: MICROSOFT_MIT_NO_VERSION package-name: azure-mgmt-communication no-namespace-folders: true -package-version: 1.0.0rc1 +package-version: 1.0.0 ``` ```yaml $(python) && $(python-mode) == 'update' && $(track2)