diff --git a/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/CommunicationServices.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/CommunicationServices.json new file mode 100644 index 000000000000..6ee7e458c9d9 --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/CommunicationServices.json @@ -0,0 +1,860 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Communication Services Management API", + "version": "2022-07-01-preview", + "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/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success. The response describes the list of operations.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "produces": [ + "application/json" + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Operations_List": { + "$ref": "./examples/communicationServices/operationsList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Communication/checkNameAvailability": { + "post": { + "description": "Checks that the CommunicationService name is valid and is not already in use.", + "operationId": "CommunicationServices_CheckNameAvailability", + "summary": "Check Name Availability", + "tags": [ + "CommunicationServices" + ], + "parameters": [ + { + "name": "nameAvailabilityParameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/NameAvailabilityParameters" + }, + "description": "Parameters supplied to the operation." + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "consumes": [ + "application/json" + ], + "responses": { + "200": { + "description": "Success. The response describes the name availability.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/CheckNameAvailabilityResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "produces": [ + "application/json" + ], + "x-ms-examples": { + "Check name availability available": { + "$ref": "./examples/communicationServices/checkNameAvailabilityAvailable.json" + }, + "Check name availability unavailable": { + "$ref": "./examples/communicationServices/checkNameAvailabilityUnavailable.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}/linkNotificationHub": { + "post": { + "description": "Links an Azure Notification Hub to this communication service.", + "operationId": "CommunicationServices_LinkNotificationHub", + "summary": "Link Notification Hub", + "tags": [ + "CommunicationServices" + ], + "parameters": [ + { + "name": "linkNotificationHubParameters", + "in": "body", + "schema": { + "$ref": "#/definitions/LinkNotificationHubParameters" + }, + "description": "Parameters supplied to the operation." + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/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/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "produces": [ + "application/json" + ], + "x-ms-examples": { + "Link notification hub": { + "$ref": "./examples/communicationServices/linkNotificationHub.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Communication/communicationServices": { + "get": { + "description": "Handles requests to list all resources in a subscription.", + "operationId": "CommunicationServices_ListBySubscription", + "summary": "List By Subscription", + "tags": [ + "CommunicationServices" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/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/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "produces": [ + "application/json" + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List by subscription": { + "$ref": "./examples/communicationServices/listBySubscription.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices": { + "get": { + "description": "Handles requests to list all resources in a resource group.", + "operationId": "CommunicationServices_ListByResourceGroup", + "summary": "List By Resource Group", + "tags": [ + "CommunicationServices" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/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/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "produces": [ + "application/json" + ], + "x-ms-examples": { + "List by resource group": { + "$ref": "./examples/communicationServices/listByResourceGroup.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}": { + "patch": { + "description": "Operation to update an existing CommunicationService.", + "operationId": "CommunicationServices_Update", + "summary": "Update", + "tags": [ + "CommunicationServices" + ], + "parameters": [ + { + "name": "parameters", + "in": "body", + "description": "Parameters for the update operation", + "required": true, + "schema": { + "$ref": "#/definitions/CommunicationServiceResourceUpdate" + } + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/CommunicationServiceName" + } + ], + "responses": { + "200": { + "description": "The update request was successful", + "schema": { + "$ref": "#/definitions/CommunicationServiceResource" + } + }, + "201": { + "description": "The 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/v3/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": { + "Update resource": { + "$ref": "./examples/communicationServices/update.json" + } + } + }, + "get": { + "description": "Get the CommunicationService and its properties.", + "operationId": "CommunicationServices_Get", + "summary": "Get", + "tags": [ + "CommunicationServices" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/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/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "produces": [ + "application/json" + ], + "x-ms-examples": { + "Get resource": { + "$ref": "./examples/communicationServices/get.json" + } + } + }, + "put": { + "description": "Create a new CommunicationService or update an existing CommunicationService.", + "operationId": "CommunicationServices_CreateOrUpdate", + "summary": "Create Or Update", + "tags": [ + "CommunicationServices" + ], + "parameters": [ + { + "name": "parameters", + "in": "body", + "description": "Parameters for the create or update operation", + "required": true, + "schema": { + "$ref": "#/definitions/CommunicationServiceResource" + } + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/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/v3/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/communicationServices/createOrUpdate.json" + } + } + }, + "delete": { + "description": "Operation to delete a CommunicationService.", + "operationId": "CommunicationServices_Delete", + "summary": "Delete", + "tags": [ + "CommunicationServices" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/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/v3/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/communicationServices/delete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}/listKeys": { + "post": { + "description": "Get the access keys of the CommunicationService resource.", + "operationId": "CommunicationServices_ListKeys", + "summary": "List Keys", + "tags": [ + "CommunicationServices" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/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/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "produces": [ + "application/json" + ], + "x-ms-examples": { + "List keys": { + "$ref": "./examples/communicationServices/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": "CommunicationServices_RegenerateKey", + "summary": "Regenerate Key", + "tags": [ + "CommunicationServices" + ], + "parameters": [ + { + "name": "parameters", + "in": "body", + "description": "Parameter that describes the Regenerate Key Operation.", + "required": true, + "schema": { + "$ref": "#/definitions/RegenerateKeyParameters" + } + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/CommunicationServiceName" + } + ], + "responses": { + "200": { + "description": "Regenerate key request was completed successfully. The response contains the new key.", + "schema": { + "$ref": "#/definitions/CommunicationServiceKeys" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Regenerate key": { + "$ref": "./examples/communicationServices/regenerateKey.json" + } + } + } + } + }, + "definitions": { + "NameAvailabilityParameters": { + "description": "Data POST-ed to the nameAvailability action", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/CheckNameAvailabilityRequest" + } + ], + "required": [ + "type", + "name" + ] + }, + "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" + } + } + }, + "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/v3/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/CommunicationServiceProperties", + "description": "The properties of the service.", + "x-ms-client-flatten": true + } + } + }, + "DomainsResourceList": { + "description": "List of email Domain resource Ids.", + "type": "array", + "items": { + "type": "string", + "description": "Resource ID of an EmailService/Domain resource linked to this resource." + } + }, + "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": "CommunicationServices_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 + }, + "linkedDomains": { + "$ref": "#/definitions/DomainsResourceList" + } + } + }, + "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 + } + } + } + }, + "CommunicationServiceUpdateProperties": { + "description": "A class that describes the properties that can be updated for CommunicationService resource.", + "type": "object", + "properties": { + "linkedDomains": { + "$ref": "#/definitions/DomainsResourceList" + } + } + }, + "CommunicationServiceResourceUpdate": { + "description": "A class representing update parameters for CommunicationService resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TaggedResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/CommunicationServiceUpdateProperties", + "description": "The properties of the service.", + "x-ms-client-flatten": true + } + } + } + }, + "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" + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/Domains.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/Domains.json new file mode 100644 index 000000000000..aa5432f6c42c --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/Domains.json @@ -0,0 +1,745 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Communication Services Management API", + "version": "2022-07-01-preview", + "description": "REST API for Email Services/Domains" + }, + "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": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}": { + "get": { + "description": "Get the Domains resource and its properties.", + "operationId": "Domains_Get", + "summary": "Get", + "tags": [ + "Domains" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "EmailServices.json#/parameters/EmailServiceName" + }, + { + "$ref": "#/parameters/DomainName" + } + ], + "responses": { + "200": { + "description": "Success. The response describe the corresponding Domains resource.", + "schema": { + "$ref": "#/definitions/DomainResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "produces": [ + "application/json" + ], + "x-ms-examples": { + "Get Domains resource": { + "$ref": "./examples/domains/get.json" + } + } + }, + "put": { + "description": "Add a new Domains resource under the parent EmailService resource or update an existing Domains resource.", + "operationId": "Domains_CreateOrUpdate", + "summary": "Create Or Update", + "tags": [ + "Domains" + ], + "parameters": [ + { + "name": "parameters", + "in": "body", + "description": "Parameters for the create or update operation", + "required": true, + "schema": { + "$ref": "#/definitions/DomainResource" + } + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "EmailServices.json#/parameters/EmailServiceName" + }, + { + "$ref": "#/parameters/DomainName" + } + ], + "consumes": [ + "application/json" + ], + "responses": { + "200": { + "description": "The create or update request was completed successfully", + "schema": { + "$ref": "#/definitions/DomainResource" + } + }, + "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/DomainResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/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 Domains resource": { + "$ref": "./examples/domains/createOrUpdate.json" + } + } + }, + "delete": { + "description": "Operation to delete a Domains resource.", + "operationId": "Domains_Delete", + "summary": "Delete", + "tags": [ + "Domains" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "EmailServices.json#/parameters/EmailServiceName" + }, + { + "$ref": "#/parameters/DomainName" + } + ], + "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/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "Delete Domains resource": { + "$ref": "./examples/domains/delete.json" + } + } + }, + "patch": { + "description": "Operation to update an existing Domains resource.", + "operationId": "Domains_Update", + "summary": "Update", + "tags": [ + "Domains" + ], + "parameters": [ + { + "name": "parameters", + "in": "body", + "description": "Parameters for the update operation", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateDomainRequestParameters" + } + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "EmailServices.json#/parameters/EmailServiceName" + }, + { + "$ref": "#/parameters/DomainName" + } + ], + "responses": { + "200": { + "description": "The update request was successful", + "schema": { + "$ref": "#/definitions/DomainResource" + } + }, + "201": { + "description": "The update request was accepted", + "headers": { + "Azure-AsyncOperation": { + "description": "URL to query for status of the operation.", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/DomainResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/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": { + "Update Domains resource": { + "$ref": "./examples/domains/update.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains": { + "get": { + "description": "Handles requests to list all Domains resources under the parent EmailServices resource.", + "operationId": "Domains_ListByEmailServiceResource", + "summary": "List by EmailService", + "tags": [ + "Domains" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "EmailServices.json#/parameters/EmailServiceName" + } + ], + "responses": { + "200": { + "description": "Success. The response describes the list of Domains resources under the parent EmailServices resource.", + "schema": { + "$ref": "#/definitions/DomainResourceList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "produces": [ + "application/json" + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List Domains resources by EmailServiceName": { + "$ref": "./examples/domains/listByEmailService.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}/initiateVerification": { + "post": { + "description": "Initiate verification of DNS record.", + "operationId": "Domains_InitiateVerification", + "summary": "Initiate Verification", + "tags": [ + "Domains" + ], + "parameters": [ + { + "name": "parameters", + "in": "body", + "schema": { + "$ref": "#/definitions/VerificationParameter" + }, + "description": "Type of verification to be initiated.", + "required": true + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "EmailServices.json#/parameters/EmailServiceName" + }, + { + "$ref": "#/parameters/DomainName" + } + ], + "responses": { + "202": { + "description": "The initiateVerification operation is being performed in the background.", + "headers": { + "location": { + "description": "URL to query for status of the operation.", + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "produces": [ + "application/json" + ], + "x-ms-examples": { + "Initiate verification": { + "$ref": "./examples/domains/initiateVerification.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}/cancelVerification": { + "post": { + "description": "Cancel verification of DNS record.", + "operationId": "Domains_CancelVerification", + "summary": "Cancel Verification", + "tags": [ + "Domains" + ], + "parameters": [ + { + "name": "parameters", + "in": "body", + "schema": { + "$ref": "#/definitions/VerificationParameter" + }, + "description": "Type of verification to be canceled.", + "required": true + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "EmailServices.json#/parameters/EmailServiceName" + }, + { + "$ref": "#/parameters/DomainName" + } + ], + "responses": { + "202": { + "description": "The cancelVerification operation is being performed in the background.", + "headers": { + "location": { + "description": "URL to query for status of the operation.", + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "produces": [ + "application/json" + ], + "x-ms-examples": { + "Cancel verification": { + "$ref": "./examples/domains/cancelVerification.json" + } + } + } + } + }, + "definitions": { + "VerificationParameter": { + "description": "Input parameter for verification APIs", + "type": "object", + "required": [ + "verificationType" + ], + "properties": { + "verificationType": { + "description": "Type of verification.", + "enum": [ + "Domain", + "SPF", + "DKIM", + "DKIM2", + "DMARC" + ], + "type": "string", + "x-ms-enum": { + "name": "VerificationType", + "modelAsString": true + } + } + } + }, + "VerificationStatusRecord": { + "description": "A class that represents a VerificationStatus record.", + "type": "object", + "properties": { + "status": { + "description": "Status of the verification operation.", + "enum": [ + "NotStarted", + "VerificationRequested", + "VerificationInProgress", + "VerificationFailed", + "Verified", + "CancellationRequested" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "VerificationStatus", + "modelAsString": true + } + }, + "errorCode": { + "description": "Error code. This property will only be present if the status is UnableToVerify.", + "type": "string", + "readOnly": true + } + } + }, + "DnsRecord": { + "description": "A class that represents a VerificationStatus record.", + "type": "object", + "properties": { + "type": { + "description": "Type of the DNS record. Example: TXT", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Name of the DNS record.", + "type": "string", + "readOnly": true + }, + "value": { + "description": "Value of the DNS record.", + "type": "string", + "readOnly": true + }, + "ttl": { + "description": "Represents an expiry time in seconds to represent how long this entry can be cached by the resolver, default = 3600sec.", + "type": "integer", + "format": "int32", + "readOnly": true + } + } + }, + "ValidSenderUsernameCollection": { + "description": "Collection of valid sender usernames. This is a key-value pair where key=username and value=display name.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "DomainProperties": { + "description": "A class that describes the properties of a Domains resource.", + "type": "object", + "required": [ + "domainManagement" + ], + "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": "Domains_ProvisioningState", + "modelAsString": true + } + }, + "dataLocation": { + "description": "The location where the Domains resource data is stored at rest.", + "type": "string", + "readOnly": true + }, + "fromSenderDomain": { + "description": "P2 sender domain that is displayed to the email recipients [RFC 5322].", + "type": "string", + "readOnly": true + }, + "mailFromSenderDomain": { + "description": "P1 sender domain that is present on the email envelope [RFC 5321].", + "type": "string", + "readOnly": true + }, + "domainManagement": { + "$ref": "#/definitions/DomainManagement" + }, + "verificationStates": { + "description": "List of VerificationStatusRecord", + "type": "object", + "properties": { + "Domain": { + "$ref": "#/definitions/VerificationStatusRecord" + }, + "SPF": { + "$ref": "#/definitions/VerificationStatusRecord" + }, + "DKIM": { + "$ref": "#/definitions/VerificationStatusRecord" + }, + "DKIM2": { + "$ref": "#/definitions/VerificationStatusRecord" + }, + "DMARC": { + "$ref": "#/definitions/VerificationStatusRecord" + } + }, + "readOnly": true + }, + "verificationRecords": { + "description": "List of DnsRecord", + "type": "object", + "properties": { + "Domain": { + "$ref": "#/definitions/DnsRecord" + }, + "SPF": { + "$ref": "#/definitions/DnsRecord" + }, + "DKIM": { + "$ref": "#/definitions/DnsRecord" + }, + "DKIM2": { + "$ref": "#/definitions/DnsRecord" + }, + "DMARC": { + "$ref": "#/definitions/DnsRecord" + } + }, + "readOnly": true + }, + "validSenderUsernames": { + "$ref": "#/definitions/ValidSenderUsernameCollection" + }, + "userEngagementTracking": { + "$ref": "#/definitions/UserEngagementTracking" + } + } + }, + "DomainManagement": { + "description": "Describes how a Domains resource is being managed.", + "enum": [ + "AzureManaged", + "CustomerManaged", + "CustomerManagedInExchangeOnline" + ], + "type": "string", + "x-ms-enum": { + "name": "DomainManagement", + "modelAsString": true + } + }, + "UserEngagementTracking": { + "description": "Describes whether user engagement tracking is enabled or disabled.", + "enum": [ + "Disabled", + "Enabled" + ], + "type": "string", + "x-ms-enum": { + "name": "UserEngagementTracking", + "modelAsString": true + } + }, + "DomainResource": { + "description": "A class representing a Domains resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DomainProperties", + "description": "The properties of a Domains resource.", + "x-ms-client-flatten": true + } + } + }, + "UpdateDomainProperties": { + "description": "A class that describes the updatable properties of a Domains resource.", + "type": "object", + "properties": { + "validSenderUsernames": { + "$ref": "#/definitions/ValidSenderUsernameCollection" + }, + "userEngagementTracking": { + "$ref": "#/definitions/UserEngagementTracking" + } + } + }, + "UpdateDomainRequestParameters": { + "description": "A class that describes the PATCH request parameters of a Domains resource.", + "type": "object", + "allOf": [ + { + "$ref": "CommunicationServices.json#/definitions/TaggedResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/UpdateDomainProperties", + "x-ms-client-flatten": true + } + } + }, + "DomainResourceList": { + "description": "Object that includes an array of Domains resource and a possible link for next set.", + "type": "object", + "properties": { + "value": { + "description": "List of Domains resource", + "type": "array", + "items": { + "$ref": "#/definitions/DomainResource" + } + }, + "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" + } + } + } + }, + "parameters": { + "DomainName": { + "name": "domainName", + "in": "path", + "description": "The name of the Domains resource.", + "minLength": 1, + "maxLength": 253, + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/EmailServices.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/EmailServices.json new file mode 100644 index 000000000000..1945a5007f4c --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/EmailServices.json @@ -0,0 +1,502 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Communication Services Management API", + "version": "2022-07-01-preview", + "description": "REST API for Email 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": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}": { + "get": { + "description": "Get the EmailService and its properties.", + "operationId": "EmailServices_Get", + "summary": "Get", + "tags": [ + "EmailServices" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/EmailServiceName" + } + ], + "responses": { + "200": { + "description": "Success. The response describe the corresponding EmailService resource.", + "schema": { + "$ref": "#/definitions/EmailServiceResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "produces": [ + "application/json" + ], + "x-ms-examples": { + "Get EmailService resource": { + "$ref": "./examples/emailServices/get.json" + } + } + }, + "put": { + "description": "Create a new EmailService or update an existing EmailService.", + "operationId": "EmailServices_CreateOrUpdate", + "summary": "Create Or Update", + "tags": [ + "EmailServices" + ], + "parameters": [ + { + "name": "parameters", + "in": "body", + "description": "Parameters for the create or update operation", + "required": true, + "schema": { + "$ref": "#/definitions/EmailServiceResource" + } + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/EmailServiceName" + } + ], + "consumes": [ + "application/json" + ], + "responses": { + "200": { + "description": "The create or update request was completed successfully", + "schema": { + "$ref": "#/definitions/EmailServiceResource" + } + }, + "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/EmailServiceResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/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 EmailService resource": { + "$ref": "./examples/emailServices/createOrUpdate.json" + } + } + }, + "delete": { + "description": "Operation to delete a EmailService.", + "operationId": "EmailServices_Delete", + "summary": "Delete", + "tags": [ + "EmailServices" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/EmailServiceName" + } + ], + "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/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "Delete EmailService resource": { + "$ref": "./examples/emailServices/delete.json" + } + } + }, + "patch": { + "description": "Operation to update an existing EmailService.", + "operationId": "EmailServices_Update", + "summary": "Update", + "tags": [ + "EmailServices" + ], + "parameters": [ + { + "name": "parameters", + "in": "body", + "description": "Parameters for the update operation", + "required": true, + "schema": { + "$ref": "#/definitions/EmailServiceResourceUpdate" + } + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/EmailServiceName" + } + ], + "responses": { + "200": { + "description": "The update request was successful", + "schema": { + "$ref": "#/definitions/EmailServiceResource" + } + }, + "201": { + "description": "The update request was accepted", + "headers": { + "Azure-AsyncOperation": { + "description": "URL to query for status of the operation.", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/EmailServiceResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/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": { + "Update EmailService resource": { + "$ref": "./examples/emailServices/update.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Communication/emailServices": { + "get": { + "description": "Handles requests to list all resources in a subscription.", + "operationId": "EmailServices_ListBySubscription", + "summary": "List By Subscription", + "tags": [ + "EmailServices" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Success. The response describes the list of EmailServices in the subscription.", + "schema": { + "$ref": "#/definitions/EmailServiceResourceList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "produces": [ + "application/json" + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List EmailService resources by subscription": { + "$ref": "./examples/emailServices/listBySubscription.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices": { + "get": { + "description": "Handles requests to list all resources in a resource group.", + "operationId": "EmailServices_ListByResourceGroup", + "summary": "List By Resource Group", + "tags": [ + "EmailServices" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "Success. The response describes the list of EmailServices in a resourceGroup.", + "schema": { + "$ref": "#/definitions/EmailServiceResourceList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "produces": [ + "application/json" + ], + "x-ms-examples": { + "List EmailService resources by resource group": { + "$ref": "./examples/emailServices/listByResourceGroup.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Communication/listVerifiedExchangeOnlineDomains": { + "post": { + "description": "Get a list of domains that are fully verified in Exchange Online.", + "operationId": "EmailServices_ListVerifiedExchangeOnlineDomains", + "summary": "List Verified Domains From Exchange Online", + "tags": [ + "EmailServices" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Success. The response describe a list of verified domains from Exchange Online.", + "schema": { + "$ref": "#/definitions/VerifiedExchangeOnlineDomainList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "produces": [ + "application/json" + ], + "x-ms-examples": { + "Get verified Exchange Online domains": { + "$ref": "./examples/emailServices/getVerifiedExchangeOnlineDomains.json" + } + } + } + } + }, + "definitions": { + "EmailServiceProperties": { + "description": "A class that describes the properties of the EmailService.", + "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": "EmailServices_ProvisioningState", + "modelAsString": true + } + }, + "dataLocation": { + "description": "The location where the email service stores its data at rest.", + "type": "string", + "x-ms-mutability": [ + "create", + "read" + ] + } + } + }, + "EmailServiceResource": { + "description": "A class representing an EmailService resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/EmailServiceProperties", + "description": "The properties of the service.", + "x-ms-client-flatten": true + } + } + }, + "EmailServiceResourceUpdate": { + "description": "A class representing update parameters for EmailService resource.", + "type": "object", + "allOf": [ + { + "$ref": "CommunicationServices.json#/definitions/TaggedResource" + } + ] + }, + "VerifiedExchangeOnlineDomainList": { + "description": "List of FQDNs of verified domains in Exchange Online.", + "type": "array", + "items": { + "type": "string" + } + }, + "EmailServiceResourceList": { + "description": "Object that includes an array of EmailServices and a possible link for next set.", + "type": "object", + "properties": { + "value": { + "description": "List of EmailService", + "type": "array", + "items": { + "$ref": "#/definitions/EmailServiceResource" + } + }, + "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" + } + } + } + }, + "parameters": { + "EmailServiceName": { + "name": "emailServiceName", + "in": "path", + "description": "The name of the EmailService resource.", + "pattern": "^[a-zA-Z0-9-]+$", + "minLength": 1, + "maxLength": 63, + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/checkNameAvailabilityAvailable.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/checkNameAvailabilityAvailable.json new file mode 100644 index 000000000000..e066e65b2275 --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/checkNameAvailabilityAvailable.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "subscriptionId": "12345", + "api-version": "2022-07-01-preview", + "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/preview/2022-07-01-preview/examples/communicationServices/checkNameAvailabilityUnavailable.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/checkNameAvailabilityUnavailable.json new file mode 100644 index 000000000000..9afa68b53abb --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/checkNameAvailabilityUnavailable.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "subscriptionId": "12345", + "api-version": "2022-07-01-preview", + "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/preview/2022-07-01-preview/examples/communicationServices/createOrUpdate.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/createOrUpdate.json new file mode 100644 index 000000000000..f0ff276e4482 --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/createOrUpdate.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "subscriptionId": "12345", + "resourceGroupName": "MyResourceGroup", + "communicationServiceName": "MyCommunicationResource", + "api-version": "2022-07-01-preview", + "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/preview/2022-07-01-preview/examples/communicationServices/delete.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/delete.json new file mode 100644 index 000000000000..a8d27aa2627b --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/delete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "12345", + "resourceGroupName": "MyResourceGroup", + "communicationServiceName": "MyCommunicationResource", + "api-version": "2022-07-01-preview" + }, + "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/preview/2022-07-01-preview/examples/communicationServices/get.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/get.json new file mode 100644 index 000000000000..0fc667e128e8 --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/get.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "12345", + "resourceGroupName": "MyResourceGroup", + "communicationServiceName": "MyCommunicationResource", + "api-version": "2022-07-01-preview" + }, + "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/preview/2022-07-01-preview/examples/communicationServices/linkNotificationHub.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/linkNotificationHub.json new file mode 100644 index 000000000000..68bcce8bd4d6 --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/linkNotificationHub.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "12345", + "resourceGroupName": "MyResourceGroup", + "communicationServiceName": "MyCommunicationResource", + "api-version": "2022-07-01-preview", + "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/preview/2022-07-01-preview/examples/communicationServices/listByResourceGroup.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/listByResourceGroup.json new file mode 100644 index 000000000000..d57f5fbc40f8 --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/listByResourceGroup.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "12345", + "resourceGroupName": "MyResourceGroup", + "api-version": "2022-07-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/12345/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource", + "name": "MyCommunicationResource", + "type": "Microsoft.Communication/CommunicationServices", + "location": "Global", + "properties": { + "provisioningState": "Running", + "dataLocation": "United States", + "hostName": "mycommunicationservice.comms.azure.net", + "version": "0.2.0" + } + } + ] + } + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/listBySubscription.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/listBySubscription.json new file mode 100644 index 000000000000..5ae775df6826 --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/listBySubscription.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "12345", + "api-version": "2022-07-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/12345/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource", + "name": "MyCommunicationResource", + "type": "Microsoft.Communication/CommunicationServices", + "location": "Global", + "properties": { + "provisioningState": "Running", + "dataLocation": "United States", + "hostName": "mycommunicationservice.comms.azure.net", + "version": "0.2.0" + } + } + ] + } + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/listKeys.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/listKeys.json new file mode 100644 index 000000000000..c8b8d27ca31d --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/listKeys.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "12345", + "resourceGroupName": "MyResourceGroup", + "communicationServiceName": "MyCommunicationResource", + "api-version": "2022-07-01-preview" + }, + "responses": { + "200": { + "body": { + "primaryKey": "", + "secondaryKey": "" + } + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/operationsList.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/operationsList.json new file mode 100644 index 000000000000..71e4af3ddd17 --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/operationsList.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2022-07-01-preview" + }, + "responses": { + "200": { + "description": "The list of supported operations has been fetched successfully.", + "body": { + "value": [ + { + "name": "", + "isDataAction": false, + "display": { + "provider": "", + "resource": "", + "operation": "", + "description": "" + } + } + ] + } + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/regenerateKey.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/regenerateKey.json new file mode 100644 index 000000000000..f7d9382c9fc7 --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/regenerateKey.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "subscriptionId": "12345", + "resourceGroupName": "MyResourceGroup", + "communicationServiceName": "MyCommunicationResource", + "api-version": "2022-07-01-preview", + "parameters": { + "keyType": "Primary" + } + }, + "responses": { + "200": { + "body": { + "primaryKey": "1234", + "primaryConnectionString": "endpoint=http://example.com;accesskey=1234" + } + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/update.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/update.json new file mode 100644 index 000000000000..98a73c981887 --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/communicationServices/update.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "subscriptionId": "12345", + "resourceGroupName": "MyResourceGroup", + "communicationServiceName": "MyCommunicationResource", + "api-version": "2022-07-01-preview", + "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" + } + } + }, + "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", + "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/Microsoft.Communication/preview/2022-07-01-preview/examples/domains/cancelVerification.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/domains/cancelVerification.json new file mode 100644 index 000000000000..821eec5c24b4 --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/domains/cancelVerification.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "12345", + "resourceGroupName": "MyResourceGroup", + "emailServiceName": "MyEmailServiceResource", + "domainName": "mydomain.com", + "api-version": "2022-07-01-preview", + "parameters": { + "verificationType": "SPF" + } + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Communication/locations/westus/operationStatuses/ed5d502c-acaa-42ec-ad61-0d8488a9fd1d", + "Retry-After": 60 + } + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/domains/createOrUpdate.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/domains/createOrUpdate.json new file mode 100644 index 000000000000..16bdb75beecc --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/domains/createOrUpdate.json @@ -0,0 +1,80 @@ +{ + "parameters": { + "subscriptionId": "12345", + "resourceGroupName": "MyResourceGroup", + "emailServiceName": "MyEmailServiceResource", + "domainName": "mydomain.com", + "api-version": "2022-07-01-preview", + "parameters": { + "location": "Global", + "properties": { + "domainManagement": "CustomerManaged" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/12345/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/EmailServices/MyEmailServiceResource/Domains/mydomain.com", + "name": "mydomain.com", + "type": "Microsoft.Communication/EmailServices/Domains", + "location": "Global", + "properties": { + "dataLocation": "United States", + "provisioningState": "Running", + "fromSenderDomain": "mydomain.com", + "mailFromSenderDomain": "mydomain.com", + "domainManagement": "CustomerManaged", + "verificationStates": { + "Domain": { + "status": "NotStarted", + "errorCode": "" + } + }, + "verificationRecords": { + "Domain": { + "type": "TXT", + "name": "recordName", + "value": "recordValue", + "ttl": 3600 + } + }, + "userEngagementTracking": "Disabled" + } + } + }, + "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/EmailServices/MyEmailServiceResource/Domains/mydomain.com", + "name": "mydomain.com", + "type": "Microsoft.Communication/EmailServices/Domains", + "location": "Global", + "properties": { + "dataLocation": "United States", + "provisioningState": "Running", + "fromSenderDomain": "mydomain.com", + "mailFromSenderDomain": "mydomain.com", + "domainManagement": "CustomerManaged", + "verificationStates": { + "Domain": { + "status": "NotStarted", + "errorCode": "" + } + }, + "verificationRecords": { + "Domain": { + "type": "TXT", + "name": "recordName", + "value": "recordValue", + "ttl": 3600 + } + }, + "userEngagementTracking": "Disabled" + } + } + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/domains/delete.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/domains/delete.json new file mode 100644 index 000000000000..103cb5a451b0 --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/domains/delete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "12345", + "resourceGroupName": "MyResourceGroup", + "emailServiceName": "MyEmailServiceResource", + "domainName": "mydomain.com", + "api-version": "2022-07-01-preview" + }, + "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/preview/2022-07-01-preview/examples/domains/get.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/domains/get.json new file mode 100644 index 000000000000..bf964a3444e6 --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/domains/get.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "subscriptionId": "12345", + "resourceGroupName": "MyResourceGroup", + "emailServiceName": "MyEmailServiceResource", + "domainName": "mydomain.com", + "api-version": "2022-07-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/12345/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/EmailServices/MyEmailServiceResource/Domains/mydomain.com", + "name": "mydomain.com", + "type": "Microsoft.Communication/EmailServices/Domains", + "location": "Global", + "properties": { + "dataLocation": "United States", + "provisioningState": "Running", + "fromSenderDomain": "mydomain.com", + "mailFromSenderDomain": "mydomain.com", + "domainManagement": "CustomerManaged", + "verificationStates": { + "Domain": { + "status": "Verified", + "errorCode": "" + } + }, + "verificationRecords": { + "Domain": { + "type": "TXT", + "name": "recordName", + "value": "recordValue", + "ttl": 3600 + } + }, + "userEngagementTracking": "Disabled" + } + } + }, + "default": { + "body": { + "error": { + "code": "ResourceNotFound", + "message": "The requested resource was not found" + } + } + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/domains/initiateVerification.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/domains/initiateVerification.json new file mode 100644 index 000000000000..821eec5c24b4 --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/domains/initiateVerification.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "12345", + "resourceGroupName": "MyResourceGroup", + "emailServiceName": "MyEmailServiceResource", + "domainName": "mydomain.com", + "api-version": "2022-07-01-preview", + "parameters": { + "verificationType": "SPF" + } + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Communication/locations/westus/operationStatuses/ed5d502c-acaa-42ec-ad61-0d8488a9fd1d", + "Retry-After": 60 + } + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/domains/listByEmailService.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/domains/listByEmailService.json new file mode 100644 index 000000000000..d553de789000 --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/domains/listByEmailService.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "subscriptionId": "12345", + "resourceGroupName": "MyResourceGroup", + "emailServiceName": "MyEmailServiceResource", + "api-version": "2022-07-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/12345/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/EmailServices/MyEmailServiceResource/Domains/mydomain.com", + "name": "mydomain.com", + "type": "Microsoft.Communication/EmailServices/Domains", + "location": "Global", + "properties": { + "provisioningState": "Running", + "dataLocation": "United States", + "fromSenderDomain": "mydomain.com", + "mailFromSenderDomain": "mydomain.com", + "domainManagement": "CustomerManaged", + "verificationStates": { + "Domain": { + "status": "Verified", + "errorCode": "" + }, + "SPF": { + "status": "NotStarted", + "errorCode": "" + } + }, + "verificationRecords": { + "Domain": { + "type": "TXT", + "name": "recordName", + "value": "recordValue", + "ttl": 3600 + }, + "SPF": { + "type": "TXT", + "name": "recordName", + "value": "recordValue", + "ttl": 3600 + } + } + } + } + ] + } + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/domains/update.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/domains/update.json new file mode 100644 index 000000000000..2dc648457de0 --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/domains/update.json @@ -0,0 +1,111 @@ +{ + "parameters": { + "subscriptionId": "12345", + "resourceGroupName": "MyResourceGroup", + "emailServiceName": "MyEmailServiceResource", + "domainName": "mydomain.com", + "api-version": "2022-07-01-preview", + "parameters": { + "properties": { + "validSenderUsernames": { + "alerts": "MyDomain Alerts", + "info": "MyDomain Info" + }, + "userEngagementTracking": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/12345/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/EmailServices/MyEmailServiceResource/Domains/mydomain.com", + "name": "mydomain.com", + "type": "Microsoft.Communication/EmailServices/Domains", + "location": "Global", + "properties": { + "dataLocation": "United States", + "provisioningState": "Running", + "fromSenderDomain": "mydomain.com", + "mailFromSenderDomain": "mydomain.com", + "domainManagement": "CustomerManaged", + "verificationStates": { + "Domain": { + "status": "Verified", + "errorCode": "" + }, + "SPF": { + "status": "NotStarted", + "errorCode": "" + } + }, + "verificationRecords": { + "Domain": { + "type": "TXT", + "name": "recordName", + "value": "recordValue", + "ttl": 3600 + }, + "SPF": { + "type": "TXT", + "name": "recordName", + "value": "recordValue", + "ttl": 3600 + } + }, + "validSenderUsernames": { + "alerts": "MyDomain Alerts", + "info": "MyDomain Info" + }, + "userEngagementTracking": "Enabled" + } + } + }, + "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/EmailServices/MyEmailServiceResource/Domains/mydomain.com", + "name": "mydomain.com", + "type": "Microsoft.Communication/EmailServices/Domains", + "location": "Global", + "properties": { + "dataLocation": "United States", + "provisioningState": "Running", + "fromSenderDomain": "mydomain.com", + "mailFromSenderDomain": "mydomain.com", + "domainManagement": "CustomerManaged", + "verificationStates": { + "Domain": { + "status": "Verified", + "errorCode": "" + }, + "SPF": { + "status": "NotStarted", + "errorCode": "" + } + }, + "verificationRecords": { + "Domain": { + "type": "TXT", + "name": "recordName", + "value": "recordValue", + "ttl": 3600 + }, + "SPF": { + "type": "TXT", + "name": "recordName", + "value": "recordValue", + "ttl": 3600 + } + }, + "validSenderUsernames": { + "alerts": "MyDomain Alerts", + "info": "MyDomain Info" + }, + "userEngagementTracking": "Enabled" + } + } + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/emailServices/createOrUpdate.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/emailServices/createOrUpdate.json new file mode 100644 index 000000000000..633c9d931801 --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/emailServices/createOrUpdate.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "subscriptionId": "12345", + "resourceGroupName": "MyResourceGroup", + "emailServiceName": "MyEmailServiceResource", + "api-version": "2022-07-01-preview", + "parameters": { + "location": "Global", + "properties": { + "dataLocation": "United States" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/12345/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/EmailServices/MyEmailServiceResource", + "name": "MyEmailServiceResource", + "type": "Microsoft.Communication/EmailServices", + "location": "Global", + "properties": { + "dataLocation": "United States", + "provisioningState": "Succeeded" + } + } + }, + "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/EmailServices/MyEmailServiceResource", + "name": "MyEmailServiceResource", + "type": "Microsoft.Communication/EmailServices", + "location": "Global", + "properties": { + "dataLocation": "United States", + "provisioningState": "Accepted" + } + } + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/emailServices/delete.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/emailServices/delete.json new file mode 100644 index 000000000000..6837e34318ed --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/emailServices/delete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "12345", + "resourceGroupName": "MyResourceGroup", + "emailServiceName": "MyEmailServiceResource", + "api-version": "2022-07-01-preview" + }, + "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/preview/2022-07-01-preview/examples/emailServices/get.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/emailServices/get.json new file mode 100644 index 000000000000..cafca880f618 --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/emailServices/get.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "12345", + "resourceGroupName": "MyResourceGroup", + "emailServiceName": "MyEmailServiceResource", + "api-version": "2022-07-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/12345/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/EmailServices/MyEmailServiceResource", + "name": "MyEmailServiceResource", + "type": "Microsoft.Communication/EmailServices", + "location": "Global", + "properties": { + "dataLocation": "United States", + "provisioningState": "Running" + } + } + }, + "default": { + "body": { + "error": { + "code": "ResourceNotFound", + "message": "The requested resource was not found" + } + } + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/emailServices/getVerifiedExchangeOnlineDomains.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/emailServices/getVerifiedExchangeOnlineDomains.json new file mode 100644 index 000000000000..686f1c1c8468 --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/emailServices/getVerifiedExchangeOnlineDomains.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "12345", + "api-version": "2022-07-01-preview" + }, + "responses": { + "200": { + "body": [ + "example.com", + "contoso.com" + ] + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/emailServices/listByResourceGroup.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/emailServices/listByResourceGroup.json new file mode 100644 index 000000000000..d745dd621bc0 --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/emailServices/listByResourceGroup.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "12345", + "resourceGroupName": "MyResourceGroup", + "api-version": "2022-07-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "Global", + "properties": { + "provisioningState": "Running", + "dataLocation": "United States" + } + } + ] + } + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/emailServices/listBySubscription.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/emailServices/listBySubscription.json new file mode 100644 index 000000000000..b199753ae5cc --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/emailServices/listBySubscription.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "12345", + "api-version": "2022-07-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "Global", + "properties": { + "provisioningState": "Running", + "dataLocation": "United States" + } + } + ] + } + } + } +} diff --git a/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/emailServices/update.json b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/emailServices/update.json new file mode 100644 index 000000000000..8fd7ed75f5fd --- /dev/null +++ b/specification/communication/resource-manager/Microsoft.Communication/preview/2022-07-01-preview/examples/emailServices/update.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "12345", + "resourceGroupName": "MyResourceGroup", + "emailServiceName": "MyEmailServiceResource", + "api-version": "2022-07-01-preview", + "parameters": { + "tags": { + "newTag": "newVal" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/12345/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/EmailServices/MyEmailServiceResource", + "name": "MyEmailServiceResource", + "type": "Microsoft.Communication/EmailServices", + "location": "Global", + "tags": { + "newTag": "newVal" + }, + "properties": { + "provisioningState": "Succeeded", + "dataLocation": "United States" + } + } + }, + "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/EmailServices/MyEmailServiceResource", + "name": "MyEmailServiceResource", + "type": "Microsoft.Communication/EmailServices", + "location": "Global", + "tags": { + "newTag": "newVal" + }, + "properties": { + "provisioningState": "Succeeded", + "dataLocation": "United States" + } + } + } + } +} diff --git a/specification/communication/resource-manager/readme.md b/specification/communication/resource-manager/readme.md index a6c498c73d23..19d86324d7c1 100644 --- a/specification/communication/resource-manager/readme.md +++ b/specification/communication/resource-manager/readme.md @@ -24,11 +24,23 @@ To see additional help and options, run: These are the global settings for the Azure Communication Services API. -```yaml +``` yaml title: CommunicationServiceManagementClient openapi-type: arm openapi-subtype: rpaas -tag: package-2021-10-01-preview +tag: package-preview-2022-07 +``` + + +### Tag: package-preview-2022-07 + +These settings apply only when `--tag=package-preview-2022-07` is specified on the command line. + +```yaml $(tag) == 'package-preview-2022-07' +input-file: + - Microsoft.Communication/preview/2022-07-01-preview/CommunicationServices.json + - Microsoft.Communication/preview/2022-07-01-preview/Domains.json + - Microsoft.Communication/preview/2022-07-01-preview/EmailServices.json ``` ### Tag: package-2020-08-20 @@ -60,6 +72,8 @@ input-file: - Microsoft.Communication/preview/2021-10-01-preview/EmailServices.json ``` +--- + # Code Generation ## Swagger to SDK @@ -67,16 +81,19 @@ input-file: This section describes what SDK should be generated by the automatic system. This is not used by Autorest itself. -```yaml $(swagger-to-sdk) +``` yaml $(swagger-to-sdk) swagger-to-sdk: - - repo: azure-sdk-for-net - repo: azure-sdk-for-net-track2 - repo: azure-sdk-for-python-track2 - repo: azure-sdk-for-go + - repo: azure-sdk-for-go-track2 - repo: azure-sdk-for-js - repo: azure-sdk-for-java - repo: azure-cli-extensions - repo: azure-powershell + + after_scripts: + - bundle install && rake arm:regen_all_profiles['azure_mgmt_vsonline'] ``` ## CSharp @@ -95,7 +112,10 @@ See configuration in [readme.go.md](./readme.go.md) See configuration in [readme.typescript.md](./readme.typescript.md) +## Az + +See configuration in [readme.az.md](./readme.az.md) + +## Cli -## Comments and notes -x-ms-identifiers will become a requirement on every RP resource. To add it, [check here](https://github.com/Azure/autorest/tree/main/docs/extensions#x-ms-identifiers). -For more info, reach out to the @changeanalysisteam. +See configuration in [readme.cli.md](./readme.cli.md)