Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Managed Identity Support to Azure Communication Services #24022

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,339 @@
{
"swagger": "2.0",
"info": {
"title": "Azure Communication Services Management API",
"version": "2023-04-01-preview",
"description": "REST API for Email Services/Domains/SenderUsernames"
},
"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}/senderUsernames": {
"get": {
"description": "List all valid sender usernames for a domains resource.",
"operationId": "SenderUsernames_ListByDomains",
"summary": "ListBy_Domains",
"tags": [
"SenderUsernames"
],
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "EmailServices.json#/parameters/EmailServiceName"
},
{
"$ref": "Domains.json#/parameters/DomainName"
}
],
"responses": {
"200": {
"description": "Success. The response describe the Domains SenderUsername collection.",
"schema": {
"$ref": "#/definitions/SenderUsernameResourceCollection"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"produces": [
"application/json"
],
"x-ms-examples": {
"Get SenderUsernames resource": {
"$ref": "./examples/senderUsernames/listByDomain.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}/senderUsernames/{senderUsername}": {
"get": {
"description": "Get a valid sender username for a domains resource.",
"operationId": "SenderUsernames_Get",
"summary": "Get",
"tags": [
"SenderUsernames"
],
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "EmailServices.json#/parameters/EmailServiceName"
},
{
"$ref": "Domains.json#/parameters/DomainName"
},
{
"$ref": "#/parameters/SenderUsername"
}
],
"responses": {
"200": {
"description": "Success. The response describe the corresponding SenderUsername resource.",
"schema": {
"$ref": "#/definitions/SenderUsernameResource"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse"
}
}
},
"produces": [
"application/json"
],
"x-ms-examples": {
"Get SenderUsernames resource": {
"$ref": "./examples/senderUsernames/get.json"
}
}
},
"put": {
"description": "Add a new SenderUsername resource under the parent Domains resource or update an existing SenderUsername resource.",
"operationId": "SenderUsernames_CreateOrUpdate",
"summary": "Create Or Update",
"tags": [
"SenderUsernames"
],
"parameters": [
{
"name": "parameters",
"in": "body",
"description": "Parameters for the create or update operation",
"required": true,
"schema": {
"$ref": "#/definitions/SenderUsernameResource"
}
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "EmailServices.json#/parameters/EmailServiceName"
},
{
"$ref": "Domains.json#/parameters/DomainName"
},
{
"$ref": "#/parameters/SenderUsername"
}
],
"consumes": [
"application/json"
],
"responses": {
"200": {
"description": "The update request was completed successfully",
"schema": {
"$ref": "#/definitions/SenderUsernameResource"
}
},
"201": {
"description": "The create request was completed successfully",
"schema": {
"$ref": "#/definitions/SenderUsernameResource"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse"
}
}
},
"produces": [
"application/json"
],
"x-ms-examples": {
"Create or update SenderUsernames resource": {
"$ref": "./examples/senderUsernames/createOrUpdate.json"
}
}
},
"delete": {
"description": "Operation to delete a SenderUsernames resource.",
"operationId": "SenderUsernames_Delete",
"summary": "Delete",
"tags": [
"SenderUsernames"
],
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "EmailServices.json#/parameters/EmailServiceName"
},
{
"$ref": "Domains.json#/parameters/DomainName"
},
{
"$ref": "#/parameters/SenderUsername"
}
],
"responses": {
"200": {
"description": "The delete operation was successful."
},
"204": {
"description": "The resource did not exist."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Delete SenderUsernames resource": {
"$ref": "./examples/senderUsernames/delete.json"
}
}
}
}
},
"definitions": {
"SenderUsernameResource": {
"description": "A class representing a SenderUsername resource.",
"type": "object",
"allOf": [
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource"
}
],
"properties": {
"properties": {
"$ref": "#/definitions/SenderUsernameProperties",
"description": "The properties of a SenderUsername resource.",
"x-ms-client-flatten": true
}
}
},
"SenderUsernameResourceCollection": {
"description": "A class representing a Domains SenderUsernames collection.",
"type": "object",
"properties": {
"value": {
"description": "List of SenderUsernames",
"type": "array",
"items": {
"$ref": "#/definitions/SenderUsernameResource"
}
},
"nextLink": {
"description": "The URL the client should use to fetch the next page (per server side paging).",
"type": "string"
}
}
},
"SenderUsernameProperties": {
"description": "A class that describes the properties of a SenderUsername resource.",
"type": "object",
"required": [
"username"
],
"properties": {
"dataLocation": {
"description": "The location where the SenderUsername resource data is stored at rest.",
"type": "string",
"readOnly": true
},
"username": {
"description": "A sender senderUsername to be used when sending emails.",
"type": "string"
},
"displayName": {
"description": "The display name for the senderUsername.",
"type": "string"
},
"provisioningState": {
"description": "Provisioning state of the resource. Unknown is the default state for Communication Services.",
"enum": [
"Unknown",
"Succeeded",
"Failed",
"Canceled",
"Running",
"Creating",
"Updating",
"Deleting",
"Moving"
],
"type": "string",
"readOnly": true,
"x-ms-enum": {
"name": "ProvisioningState",
"modelAsString": true
}
}
}
}
},
"parameters": {
"SenderUsername": {
"name": "senderUsername",
"in": "path",
"description": "The valid sender Username.",
"minLength": 1,
"maxLength": 253,
"required": true,
"type": "string",
"x-ms-parameter-location": "method"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"parameters": {
"subscriptionId": "11112222-3333-4444-5555-666677778888",
"api-version": "2023-04-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"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"parameters": {
"subscriptionId": "11112222-3333-4444-5555-666677778888",
"api-version": "2023-04-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"
}
}
}
}
Loading