From dbedaaac9e03a633aa6b254782f27d9364184369 Mon Sep 17 00:00:00 2001 From: sebastianrex <107705086+sebastianrex@users.noreply.github.com> Date: Fri, 13 Jan 2023 09:50:45 +0000 Subject: [PATCH] add or modify files --- .../cadl/cadl-project.yaml | 14 +- .../cadl/communicationsgateway.cadl | 188 ++- ...CommunicationsGateways_CreateOrUpdate.json | 162 ++ .../CommunicationsGateways_Delete.json | 20 + .../CommunicationsGateways_Get.json | 65 + ...nicationsGateways_ListByResourceGroup.json | 67 + ...unicationsGateways_ListBySubscription.json | 66 + .../CommunicationsGateways_Update.json | 66 + .../NameAvailability_CheckLocal.json | 22 + .../examples/2023-01-31/Operations_List.json | 25 + .../2023-01-31/TestLines_CreateOrUpdate.json | 45 + .../examples/2023-01-31/TestLines_Delete.json | 22 + .../examples/2023-01-31/TestLines_Get.json | 26 + ...TestLines_ListByCommunicationsGateway.json | 28 + .../examples/2023-01-31/TestLines_Update.json | 28 + .../Microsoft.VoiceServices/cadl/main.cadl | 2 +- .../Microsoft.VoiceServices/cadl/package.json | 16 +- .../cadl/voiceservices.cadl | 85 +- ...CommunicationsGateways_CreateOrUpdate.json | 162 ++ .../CommunicationsGateways_Delete.json | 20 + .../examples/CommunicationsGateways_Get.json | 65 + ...nicationsGateways_ListByResourceGroup.json | 67 + ...unicationsGateways_ListBySubscription.json | 66 + .../CommunicationsGateways_Update.json | 66 + .../examples/NameAvailability_CheckLocal.json | 22 + .../2023-01-31/examples/Operations_List.json | 25 + .../examples/TestLines_CreateOrUpdate.json | 45 + .../2023-01-31/examples/TestLines_Delete.json | 22 + .../2023-01-31/examples/TestLines_Get.json | 26 + ...TestLines_ListByCommunicationsGateway.json | 28 + .../2023-01-31/examples/TestLines_Update.json | 28 + .../stable/2023-01-31/voiceservices.json | 1327 +++++++++++++++++ .../voiceservices/resource-manager/readme.md | 12 +- 33 files changed, 2847 insertions(+), 81 deletions(-) create mode 100644 specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/CommunicationsGateways_CreateOrUpdate.json create mode 100644 specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/CommunicationsGateways_Delete.json create mode 100644 specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/CommunicationsGateways_Get.json create mode 100644 specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/CommunicationsGateways_ListByResourceGroup.json create mode 100644 specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/CommunicationsGateways_ListBySubscription.json create mode 100644 specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/CommunicationsGateways_Update.json create mode 100644 specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/NameAvailability_CheckLocal.json create mode 100644 specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/Operations_List.json create mode 100644 specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/TestLines_CreateOrUpdate.json create mode 100644 specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/TestLines_Delete.json create mode 100644 specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/TestLines_Get.json create mode 100644 specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/TestLines_ListByCommunicationsGateway.json create mode 100644 specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/TestLines_Update.json create mode 100644 specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_CreateOrUpdate.json create mode 100644 specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_Delete.json create mode 100644 specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_Get.json create mode 100644 specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_ListByResourceGroup.json create mode 100644 specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_ListBySubscription.json create mode 100644 specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_Update.json create mode 100644 specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/NameAvailability_CheckLocal.json create mode 100644 specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/Operations_List.json create mode 100644 specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/TestLines_CreateOrUpdate.json create mode 100644 specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/TestLines_Delete.json create mode 100644 specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/TestLines_Get.json create mode 100644 specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/TestLines_ListByCommunicationsGateway.json create mode 100644 specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/TestLines_Update.json create mode 100644 specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/voiceservices.json diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/cadl-project.yaml b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/cadl-project.yaml index a283814ef29b..01177730ad4b 100644 --- a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/cadl-project.yaml +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/cadl-project.yaml @@ -1,6 +1,14 @@ -emitters: +emit: + - "@azure-tools/cadl-autorest" + - "@azure-tools/cadl-providerhub-controller" + +options: "@azure-tools/cadl-autorest": - azure-resource-provider-folder: ./swagger/VoiceServices/resource-manager + azure-resource-provider-folder: ./swagger/voiceservices/resource-manager examples-directory: ./examples + omit-unreachable-types: true + output-file: voiceservices.json + emitter-output-dir: "{output-dir}" + "@azure-tools/cadl-providerhub-controller": - code-kind: model + emitter-output-dir: "{output-dir}/generated" diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/communicationsgateway.cadl b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/communicationsgateway.cadl index eff7d4e6c752..00db85505823 100644 --- a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/communicationsgateway.cadl +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/communicationsgateway.cadl @@ -11,6 +11,7 @@ namespace Microsoft.VoiceServices; using Cadl.Http; using Cadl.Rest; +using Cadl.Versioning; using Azure.ResourceManager; @doc("A TestLine resource") @@ -34,15 +35,21 @@ enum TestLinePurpose { @doc("Details of the TestLine resource.") model TestLineProperties is ResourceProperties { @doc("The phone number") - @visibility("read", "write", "create") + @visibility("read", "update", "create") phoneNumber: string; + @doc("Purpose of this test line, e.g. automated or manual testing") - @visibility("read", "write", "create") + @visibility("read", "update", "create") purpose: TestLinePurpose; } @armResourceOperations -interface TestLines extends ResourceRead, ResourceCreate, ResourceDelete, ResourceListByParent, ResourceUpdateNoProperties {} +interface TestLines + extends ResourceRead, + ResourceCreate, + ResourceDelete, + ResourceListByParent, + ResourceUpdateNoProperties {} @doc("A Contact resource") @parentResource(CommunicationsGateway) @@ -59,24 +66,34 @@ model Contact is TrackedResource { @doc("Details of the Contact resource.") model ContactProperties is ResourceProperties { @doc("Full name of contact") - @visibility("read", "write", "create") + @visibility("read", "update", "create") contactName: string; + @doc("Telephone number of contact") - @visibility("read", "write", "create") + @visibility("read", "update", "create") phoneNumber: string; + @doc("Email address of contact") - @visibility("read", "write", "create") + @visibility("read", "update", "create") email: string; + @doc("Job title of contact") - @visibility("read", "write", "create") + @visibility("read", "update", "create") role: string; } +@removed(Versions.v2023_01_31) @armResourceOperations -interface Contacts extends ResourceRead, ResourceCreate, ResourceDelete, ResourceListByParent, ResourceUpdateNoProperties {} +interface Contacts + extends ResourceRead, + ResourceCreate, + ResourceDelete, + ResourceListByParent, + ResourceUpdateNoProperties {} @doc("A CommunicationsGateway resource") -model CommunicationsGateway is TrackedResource { +model CommunicationsGateway + is TrackedResource { @pattern("^[a-zA-Z0-9-]{3,24}$") @key("communicationsGatewayName") @segment("communicationsGateways") @@ -90,68 +107,72 @@ model CommunicationsGateway is TrackedResource enum Status { @doc("The resource has been created or updated, but the CommunicationsGateway service has not yet been updated to reflect the changes.") ChangePending, + @doc("The CommunicationsGateway service is up and running with the parameters specified in the resource.") Complete, } @doc("The method for terminating emergency calls to the PSTN.") -@knownValues(E911TypeValues) -model E911Type is string {} -enum E911TypeValues { +enum E911Type { @doc("Emergency calls are not handled different from other calls") Standard, + @doc("Emergency calls are routed directly to the ESRP") - DirectToEsrp + DirectToEsrp, } @doc("The voice codecs expected for communication with Teams.") -@knownValues(TeamsCodecsValues) -model TeamsCodecs is string {} -enum TeamsCodecsValues { - PCMA, - PCMU, - G722, - G722_2, - SILK_8, - SILK_16 +enum TeamsCodecs { + PCMA, + PCMU, + G722, + G722_2, + SILK_8, + SILK_16, } @doc("How this deployment connects back to the operator network") -@knownValues(ConnectivityValues) -model Connectivity is string {} -enum ConnectivityValues { +enum Connectivity { @doc("This deployment connects to the operator network using a Public IP address, e.g. when using MAPS") - PublicAddress + PublicAddress, } @doc("The service region configuration needed for Teams Callings.") model ServiceRegionProperties { - @doc("The name of the region in which the resources needed for Teams Calling will be deployed.") - @visibility("read", "create") - name: string; + @doc("The name of the region in which the resources needed for Teams Calling will be deployed.") + @visibility("read", "create") + name: string; - @doc("The configuration used in this region as primary, and other regions as backup.") - @visibility("read", "write", "create") - primaryRegionProperties: PrimaryRegionProperties; + @doc("The configuration used in this region as primary, and other regions as backup.") + @visibility("read", "update", "create") + primaryRegionProperties: PrimaryRegionProperties; } @doc("The configuration used in this region as primary, and other regions as backup.") model PrimaryRegionProperties { - @doc("IP address to use to contact the operator network from this region") - @visibility("read", "write", "create") - operatorAddresses: string[]; + @doc("IP address to use to contact the operator network from this region") + @visibility("read", "update", "create") + operatorAddresses: string[]; + + @doc("IP address to use to contact the ESRP from this region") + @visibility("read", "update", "create") + esrpAddresses?: string[]; - @doc("IP address to use to contact the ESRP from this region") - @visibility("read", "write", "create") - esrpAddresses?: string[]; + @added(Versions.v2023_01_31) + @doc("The allowed source IP address or CIDR ranges for signaling") + @visibility("read", "update", "create") + allowedSignalingSourceAddressPrefixes?: string[] = []; + + @added(Versions.v2023_01_31) + @doc("The allowed source IP address or CIDR ranges for media") + @visibility("read", "update", "create") + allowedMediaSourceAddressPrefixes?: string[] = []; } @doc("Available platform types.") -@knownValues(CommunicationsPlatformValues) -model CommunicationsPlatform is string {} -enum CommunicationsPlatformValues { - OperatorConnect, - TeamsPhoneMobile +enum CommunicationsPlatform { + OperatorConnect, + TeamsPhoneMobile, } // Currently empty, with presence indicating that this feature should be enabled. @@ -159,14 +180,23 @@ enum CommunicationsPlatformValues { @doc("Details of API bridge functionality.") model ApiBridgeProperties {} +@doc("Available auto-generated domain name scopes.") +enum AutoGeneratedDomainNameLabelScope { + TenantReuse, + SubscriptionReuse, + ResourceGroupReuse, + NoReuse +} + @doc("Details of the CommunicationsGateway resource.") model CommunicationsGatewayProperties is ResourceProperties { @doc("The current status of the deployment.") - @visibility("read") status?: Status; + @visibility("read") + status?: Status; @doc("The regions in which to deploy the resources needed for Teams Calling") @OpenAPI.extension("x-ms-identifiers", ["name"]) - @visibility("read", "write", "create") + @visibility("read", "update", "create") serviceLocations: ServiceRegionProperties[]; @doc("How to connect back to the operator network, e.g. MAPS") @@ -174,23 +204,75 @@ model CommunicationsGatewayProperties is ResourceProperties { connectivity: Connectivity; @doc("Voice codecs to support") - @visibility("read", "write", "create") + @visibility("read", "update", "create") codecs: TeamsCodecs[]; - + @doc("How to handle 911 calls") - @visibility("read", "write", "create") + @visibility("read", "update", "create") e911Type: E911Type; @doc("What platforms to support") - @visibility("read", "write", "create") - // Can be set once we get a cald release with this decorator - // @minItems(1) + @visibility("read", "update", "create") + @minItems(1) platforms: CommunicationsPlatform[]; @doc("Details of API bridge functionality, if required") - @visibility("read", "write", "create") + @visibility("read", "update", "create") apiBridge?: ApiBridgeProperties; + + @added(Versions.v2023_01_31) + @doc("The scope at which the auto-generated domain name can be re-used") + @visibility("read", "create") + autoGeneratedDomainNameLabelScope?: AutoGeneratedDomainNameLabelScope = AutoGeneratedDomainNameLabelScope.TenantReuse; + + @added(Versions.v2023_01_31) + @doc("The autogenerated label used as part of the FQDNs for accessing the Communications Gateway") + @visibility("read") + autoGeneratedDomainNameLabel?: string; + + @added(Versions.v2023_01_31) + @doc("This number is used in Teams Phone Mobile scenarios for access to the voicemail IVR from the native dialer.") + @visibility("read", "update", "create") + teamsVoicemailPilotNumber?: string; + + @added(Versions.v2023_01_31) + @doc("Whether an on-premises Mobile Control Point is in use.") + @visibility("read", "update", "create") + onPremMcpEnabled?: boolean = false; + + @added(Versions.v2023_01_31) + @doc("A list of dial strings used for emergency calling.") + @visibility("read", "update", "create") + emergencyDialStrings?: string[] = ["911", "933"]; } @armResourceOperations -interface CommunicationsGateways extends ResourceRead, ResourceCreate, ResourceDelete, ResourceListBySubscription, ResourceListByParent, ResourceUpdateNoProperties {} \ No newline at end of file +interface CommunicationsGateways + extends ResourceRead, + ResourceCreate, + ResourceDelete, + ResourceListBySubscription, + ResourceListByParent, + ResourceUpdateNoProperties {} + +#suppress "@azure-tools/cadl-azure-resource-manager/arm-resource-interface-requires-decorator" "CheckNameAvailability is not supported by cadl-azure-resource-manager." +#suppress "@azure-tools/cadl-azure-resource-manager/arm-resource-interface-uses-templates" "CheckNameAvailability is not supported by cadl-azure-resource-manager." +#suppress "@azure-tools/cadl-azure-resource-manager/arm-resource-operation-missing-decorator" "CheckNameAvailability is not supported by cadl-azure-resource-manager." +@added(Versions.v2023_01_31) +interface NameAvailability { + @doc("Check whether the resource name is available in the given region.") + @post + @route("/subscriptions/{subscriptionId}/providers/Microsoft.VoiceServices/locations/{location}/checkNameAvailability") + checkLocal( + @doc("The check availability request body.") + @body + body: CheckNameAvailabilityRequest, + + @doc("The location in which uniqueness will be verified.") + @path + location: string, + + ...SubscriptionIdParameter, + ...ApiVersionParameter + ): CheckNameAvailabilityResponse | ErrorResponse; +} diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/CommunicationsGateways_CreateOrUpdate.json b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/CommunicationsGateways_CreateOrUpdate.json new file mode 100644 index 000000000000..2bd30b3c2943 --- /dev/null +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/CommunicationsGateways_CreateOrUpdate.json @@ -0,0 +1,162 @@ +{ + "operationId": "CommunicationsGateways_CreateOrUpdate", + "title": "CreateCommunicationsGatewayResource", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "testrg", + "api-version": "2023-01-31", + "name": "myname", + "communicationsGatewayName": "myname", + "resource": { + "location": "useast", + "properties": { + "serviceLocations": [ + { + "name": "useast", + "primaryRegionProperties": { + "operatorAddresses": [ + "198.51.100.1" + ], + "allowedSignalingSourceAddressPrefixes": [ + "10.1.1.0/24" + ], + "allowedMediaSourceAddressPrefixes": [ + "10.1.2.0/24" + ] + } + }, + { + "name": "useast2", + "primaryRegionProperties": { + "operatorAddresses": [ + "198.51.100.2" + ], + "allowedSignalingSourceAddressPrefixes": [ + "10.2.1.0/24" + ], + "allowedMediaSourceAddressPrefixes": [ + "10.2.2.0/24" + ] + } + } + ], + "connectivity": "PublicAddress", + "codecs": [ + "PCMA" + ], + "e911Type": "Standard", + "platforms": [ + "OperatorConnect" + ], + "autoGeneratedDomainNameLabelScope": "NoReuse", + "teamsVoicemailPilotNumber": "1234567890" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname", + "name": "myname", + "type": "Microsoft.Voiceservice/communicationsGateways", + "location": "useast", + "properties": { + "serviceLocations": [ + { + "name": "useast", + "primaryRegionProperties": { + "operatorAddresses": [ + "198.51.100.1" + ], + "allowedSignalingSourceAddressPrefixes": [ + "10.1.1.0/24" + ], + "allowedMediaSourceAddressPrefixes": [ + "10.1.2.0/24" + ] + } + }, + { + "name": "useast2", + "primaryRegionProperties": { + "operatorAddresses": [ + "198.51.100.2" + ], + "allowedSignalingSourceAddressPrefixes": [ + "10.2.1.0/24" + ], + "allowedMediaSourceAddressPrefixes": [ + "10.2.2.0/24" + ] + } + } + ], + "status": "ChangePending", + "connectivity": "PublicAddress", + "codecs": [ + "PCMA" + ], + "e911Type": "Standard", + "platforms": [ + "OperatorConnect" + ], + "autoGeneratedDomainNameLabelScope": "NoReuse", + "autoGeneratedDomainNameLabel": "somelabel", + "teamsVoicemailPilotNumber": "1234567890" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname", + "name": "myname", + "type": "Microsoft.Voiceservice/communicationsGateways", + "location": "useast", + "properties": { + "status": "ChangePending", + "serviceLocations": [ + { + "name": "useast", + "primaryRegionProperties": { + "operatorAddresses": [ + "198.51.100.1" + ], + "allowedSignalingSourceAddressPrefixes": [ + "10.1.1.0/24" + ], + "allowedMediaSourceAddressPrefixes": [ + "10.1.2.0/24" + ] + } + }, + { + "name": "useast2", + "primaryRegionProperties": { + "operatorAddresses": [ + "198.51.100.2" + ], + "allowedSignalingSourceAddressPrefixes": [ + "10.2.1.0/24" + ], + "allowedMediaSourceAddressPrefixes": [ + "10.2.2.0/24" + ] + } + } + ], + "connectivity": "PublicAddress", + "codecs": [ + "PCMA" + ], + "e911Type": "Standard", + "platforms": [ + "OperatorConnect" + ], + "autoGeneratedDomainNameLabelScope": "NoReuse", + "autoGeneratedDomainNameLabel": "somelabel", + "teamsVoicemailPilotNumber": "1234567890" + } + } + } + } +} diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/CommunicationsGateways_Delete.json b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/CommunicationsGateways_Delete.json new file mode 100644 index 000000000000..676da42e1ef7 --- /dev/null +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/CommunicationsGateways_Delete.json @@ -0,0 +1,20 @@ +{ + "operationId": "CommunicationsGateways_Delete", + "title": "DeleteCommunicationsGatewayResource", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "testrg", + "api-version": "2023-01-31", + "communicationsGatewayName": "myname", + "location": "useast" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "azure-asyncoperation": "http://azure.async.operation/status" + } + }, + "204": {} + } +} diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/CommunicationsGateways_Get.json b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/CommunicationsGateways_Get.json new file mode 100644 index 000000000000..86f259a4ade2 --- /dev/null +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/CommunicationsGateways_Get.json @@ -0,0 +1,65 @@ +{ + "operationId": "CommunicationsGateways_Get", + "title": "GetCommunicationsGatewayResource", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "testrg", + "api-version": "2023-01-31", + "name": "myname", + "communicationsGatewayName": "myname" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateways/myname", + "name": "myname", + "location": "useast", + "type": "Microsoft.VoiceService/communicationsGateways", + "properties": { + "status": "ChangePending", + "serviceLocations": [ + { + "name": "useast", + "primaryRegionProperties": { + "operatorAddresses": [ + "198.51.100.1" + ], + "allowedSignalingSourceAddressPrefixes": [ + "10.1.1.0/24" + ], + "allowedMediaSourceAddressPrefixes": [ + "10.1.2.0/24" + ] + } + }, + { + "name": "useast2", + "primaryRegionProperties": { + "operatorAddresses": [ + "198.51.100.2" + ], + "allowedSignalingSourceAddressPrefixes": [ + "10.2.1.0/24" + ], + "allowedMediaSourceAddressPrefixes": [ + "10.2.2.0/24" + ] + } + } + ], + "connectivity": "PublicAddress", + "codecs": [ + "PCMA" + ], + "e911Type": "Standard", + "platforms": [ + "OperatorConnect" + ], + "autoGeneratedDomainNameLabelScope": "NoReuse", + "autoGeneratedDomainNameLabel": "somelabel", + "teamsVoicemailPilotNumber": "1234567890" + } + } + } + } +} diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/CommunicationsGateways_ListByResourceGroup.json b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/CommunicationsGateways_ListByResourceGroup.json new file mode 100644 index 000000000000..bd371b5a753b --- /dev/null +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/CommunicationsGateways_ListByResourceGroup.json @@ -0,0 +1,67 @@ +{ + "operationId": "CommunicationsGateways_ListByResourceGroup", + "title": "ListCommunicationsGatewayResource", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "testrg", + "api-version": "2023-01-31" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateways/myname", + "name": "myname", + "location": "useast", + "type": "Microsoft.VoiceService/communicationsGateways", + "properties": { + "status": "ChangePending", + "serviceLocations": [ + { + "name": "useast", + "primaryRegionProperties": { + "operatorAddresses": [ + "198.51.100.1" + ], + "allowedSignalingSourceAddressPrefixes": [ + "10.1.1.0/24" + ], + "allowedMediaSourceAddressPrefixes": [ + "10.1.2.0/24" + ] + } + }, + { + "name": "useast2", + "primaryRegionProperties": { + "operatorAddresses": [ + "198.51.100.2" + ], + "allowedSignalingSourceAddressPrefixes": [ + "10.2.1.0/24" + ], + "allowedMediaSourceAddressPrefixes": [ + "10.2.2.0/24" + ] + } + } + ], + "connectivity": "PublicAddress", + "codecs": [ + "PCMA" + ], + "e911Type": "Standard", + "platforms": [ + "OperatorConnect" + ], + "autoGeneratedDomainNameLabelScope": "NoReuse", + "autoGeneratedDomainNameLabel": "somelabel", + "teamsVoicemailPilotNumber": "1234567890" + } + } + ] + } + } + } +} diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/CommunicationsGateways_ListBySubscription.json b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/CommunicationsGateways_ListBySubscription.json new file mode 100644 index 000000000000..6145dbe9651b --- /dev/null +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/CommunicationsGateways_ListBySubscription.json @@ -0,0 +1,66 @@ +{ + "operationId": "CommunicationsGateways_ListBySubscription", + "title": "ListCommunicationsGatewayResourceSub", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "api-version": "2023-01-31" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateways/myname", + "name": "myname", + "location": "useast", + "type": "Microsoft.VoiceService/communicationsGateways", + "properties": { + "status": "ChangePending", + "serviceLocations": [ + { + "name": "useast", + "primaryRegionProperties": { + "operatorAddresses": [ + "198.51.100.1" + ], + "allowedSignalingSourceAddressPrefixes": [ + "10.1.1.0/24" + ], + "allowedMediaSourceAddressPrefixes": [ + "10.1.2.0/24" + ] + } + }, + { + "name": "useast2", + "primaryRegionProperties": { + "operatorAddresses": [ + "198.51.100.2" + ], + "allowedSignalingSourceAddressPrefixes": [ + "10.2.1.0/24" + ], + "allowedMediaSourceAddressPrefixes": [ + "10.2.2.0/24" + ] + } + } + ], + "connectivity": "PublicAddress", + "codecs": [ + "PCMA" + ], + "e911Type": "Standard", + "platforms": [ + "OperatorConnect" + ], + "autoGeneratedDomainNameLabelScope": "NoReuse", + "autoGeneratedDomainNameLabel": "somelabel", + "teamsVoicemailPilotNumber": "1234567890" + } + } + ] + } + } + } +} diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/CommunicationsGateways_Update.json b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/CommunicationsGateways_Update.json new file mode 100644 index 000000000000..10824ec0304b --- /dev/null +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/CommunicationsGateways_Update.json @@ -0,0 +1,66 @@ +{ + "operationId": "CommunicationsGateways_Update", + "title": "UpdateCommunicationsGatewayResource", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "testrg", + "api-version": "2023-01-31", + "communicationsGatewayName": "myname", + "location": "useast", + "properties": {} + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname", + "name": "myname", + "type": "Microsoft.Voiceservice/communicationsGateways", + "location": "useast", + "properties": { + "status": "ChangePending", + "serviceLocations": [ + { + "name": "useast", + "primaryRegionProperties": { + "operatorAddresses": [ + "198.51.100.1" + ], + "allowedSignalingSourceAddressPrefixes": [ + "10.1.1.0/24" + ], + "allowedMediaSourceAddressPrefixes": [ + "10.1.2.0/24" + ] + } + }, + { + "name": "useast2", + "primaryRegionProperties": { + "operatorAddresses": [ + "198.51.100.2" + ], + "allowedSignalingSourceAddressPrefixes": [ + "10.2.1.0/24" + ], + "allowedMediaSourceAddressPrefixes": [ + "10.2.2.0/24" + ] + } + } + ], + "connectivity": "PublicAddress", + "codecs": [ + "PCMA" + ], + "e911Type": "Standard", + "platforms": [ + "OperatorConnect" + ], + "autoGeneratedDomainNameLabelScope": "NoReuse", + "autoGeneratedDomainNameLabel": "somelabel", + "teamsVoicemailPilotNumber": "1234567890" + } + } + } + } +} diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/NameAvailability_CheckLocal.json b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/NameAvailability_CheckLocal.json new file mode 100644 index 000000000000..d9bbf2abdef0 --- /dev/null +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/NameAvailability_CheckLocal.json @@ -0,0 +1,22 @@ +{ + "operationId": "NameAvailability_CheckLocal", + "title": "CheckLocalNameAvailability", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "api-version": "2023-01-31", + "location": "useast", + "body": { + "name": "myname", + "type": "Microsoft.VoiceServices/CommunicationsGateway" + } + }, + "responses": { + "200": { + "body": { + "nameAvailable": false, + "reason": "AlreadyExists", + "message": "Some error string" + } + } + } +} diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/Operations_List.json b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/Operations_List.json new file mode 100644 index 000000000000..ae48e68e6d1c --- /dev/null +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/Operations_List.json @@ -0,0 +1,25 @@ +{ + "operationId": "Operations_List", + "title": "OperationsList", + "parameters": { + "api-version": "2023-01-31" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.VoiceService/communicationsGateways/write", + "display": { + "provider": "Microsoft.VoiceService", + "resource": "communicationsGateways", + "operation": "write", + "description": "Write communicationsGateways resource" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/TestLines_CreateOrUpdate.json b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/TestLines_CreateOrUpdate.json new file mode 100644 index 000000000000..71d835457ab3 --- /dev/null +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/TestLines_CreateOrUpdate.json @@ -0,0 +1,45 @@ +{ + "operationId": "TestLines_CreateOrUpdate", + "title": "CreateTestLineResource", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "testrg", + "api-version": "2023-01-31", + "name": "myline", + "testLineName": "myline", + "communicationsGatewayName": "myname", + "resource": { + "location": "useast", + "properties": { + "phoneNumber": "+1-555-1234", + "purpose": "Automated" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/TestLines/myline", + "name": "myline", + "location": "useast", + "type": "Microsoft.Voiceservice/communicationsGateways/testLines", + "properties": { + "phoneNumber": "+1-555-1234", + "purpose": "Automated" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/TestLines/myline", + "name": "myline", + "location": "useast", + "type": "Microsoft.Voiceservice/communicationsGateways/testLines", + "properties": { + "phoneNumber": "+1-555-1234", + "purpose": "Automated" + } + } + } + } +} diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/TestLines_Delete.json b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/TestLines_Delete.json new file mode 100644 index 000000000000..6123b7d09e52 --- /dev/null +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/TestLines_Delete.json @@ -0,0 +1,22 @@ +{ + "operationId": "TestLines_Delete", + "title": "DeleteTestLineResource", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "testrg", + "api-version": "2023-01-31", + "name": "myline", + "testLineName": "myline", + "communicationsGatewayName": "myname", + "location": "useast" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "azure-asyncoperation": "http://azure.async.operation/status" + } + }, + "204": {} + } +} diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/TestLines_Get.json b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/TestLines_Get.json new file mode 100644 index 000000000000..c806fa64ec4e --- /dev/null +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/TestLines_Get.json @@ -0,0 +1,26 @@ +{ + "operationId": "TestLines_Get", + "title": "GetTestLineResource", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "testrg", + "api-version": "2023-01-31", + "name": "myline", + "testLineName": "myline", + "communicationsGatewayName": "myname" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/TestLines/myline", + "name": "myline", + "type": "Microsoft.Voiceservice/communicationsGateways/testLines", + "location": "useast", + "properties": { + "phoneNumber": "+1-555-1234", + "purpose": "Automated" + } + } + } + } +} diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/TestLines_ListByCommunicationsGateway.json b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/TestLines_ListByCommunicationsGateway.json new file mode 100644 index 000000000000..dca876395662 --- /dev/null +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/TestLines_ListByCommunicationsGateway.json @@ -0,0 +1,28 @@ +{ + "operationId": "TestLines_ListByCommunicationsGateway", + "title": "ListTestLineResource", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "testrg", + "api-version": "2023-01-31", + "communicationsGatewayName": "myname" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/TestLines/myline", + "name": "myline", + "type": "Microsoft.Voiceservice/communicationsGateways/testLines", + "location": "useast", + "properties": { + "phoneNumber": "+1-555-1234", + "purpose": "Automated" + } + } + ] + } + } + } +} diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/TestLines_Update.json b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/TestLines_Update.json new file mode 100644 index 000000000000..65c65dbbcff4 --- /dev/null +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/examples/2023-01-31/TestLines_Update.json @@ -0,0 +1,28 @@ +{ + "operationId": "TestLines_Update", + "title": "UpdateTestLineResource", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "testrg", + "api-version": "2023-01-31", + "name": "myline", + "testLineName": "myline", + "communicationsGatewayName": "myname", + "location": "useast", + "properties": {} + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/TestLines/myline", + "name": "myline", + "location": "useast", + "type": "Microsoft.Voiceservice/communicationsGateways/testLines", + "properties": { + "phoneNumber": "+1-555-1234", + "purpose": "Automated" + } + } + } + } +} diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/main.cadl b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/main.cadl index 81e6d8570341..d97a8c0b27e8 100644 --- a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/main.cadl +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/main.cadl @@ -2,4 +2,4 @@ import "./voiceservices.cadl"; // Then import the resource API definitions -import "./communicationsgateway.cadl"; \ No newline at end of file +import "./communicationsgateway.cadl"; diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/package.json b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/package.json index abf51999fe52..c7f54f794782 100644 --- a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/package.json +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/package.json @@ -8,13 +8,13 @@ "refreshVSToken": "vsts-npm-auth -config \".npmrc\" -TargetConfig \"$HOME\\.npmrc\"" }, "dependencies": { - "@cadl-lang/compiler": "~0.35.0", - "@cadl-lang/openapi": "~0.12.0", - "@cadl-lang/rest": "~0.17.0", - "@azure-tools/cadl-autorest": "~0.20.0", - "@azure-tools/cadl-azure-core": "~0.7.0", - "@azure-tools/cadl-providerhub": "~0.21.0", - "@azure-tools/cadl-providerhub-controller": "~0.16.0", - "@azure-tools/cadl-azure-resource-manager": "~0.10.0" + "@azure-tools/cadl-autorest": "^0.24.0", + "@azure-tools/cadl-azure-core": "^0.24.0", + "@azure-tools/cadl-azure-resource-manager": "^0.24.0", + "@azure-tools/cadl-providerhub": "^0.24.0", + "@azure-tools/cadl-providerhub-controller": "^0.24.0", + "@cadl-lang/compiler": "^0.38.3", + "@cadl-lang/openapi": "^0.38.0", + "@cadl-lang/rest": "^0.38.0" } } diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/voiceservices.cadl b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/voiceservices.cadl index e1a8ca9ea64e..378e871528dc 100644 --- a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/voiceservices.cadl +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/voiceservices.cadl @@ -11,26 +11,43 @@ using Cadl.Versioning; using Azure.ResourceManager; @armProviderNamespace("Microsoft.VoiceServices") -@serviceTitle("Microsoft.VoiceServices") -@serviceVersion("2022-12-01-preview") -@versionedDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) +@service({ + title: "Microsoft.VoiceServices", +}) +@versioned(Versions) +@versionedDependency( + [ + [ + Versions.v2022_12_01_preview, + Azure.ResourceManager.Versions.v1_0_Preview_1 + ], + [ + Versions.v2023_01_31, + Azure.ResourceManager.Versions.v1_0_Preview_1 + ] + ] +) namespace Microsoft.VoiceServices; +enum Versions { + v2022_12_01_preview: "2022-12-01-preview", + v2023_01_31: "2023-01-31", +} + +interface Operations extends Azure.ResourceManager.Operations {} + // Various tooling enforces (or at least suggests) that all models should have a provisioning State field, as this means something special to ARM. @doc("Provisioning state of the resource.") -enum ProvisioningStateEnum { - Succeeded, Failed, Canceled +enum ProvisioningState { + ...ResourceProvisioningState } -@knownValues(ProvisioningStateEnum) -model ProvisioningState is string; - @doc("General resource properties.") model ResourceProperties { - @doc("Resource provisioning state.") - @visibility("read") - provisioningState?: ProvisioningState; + @doc("Resource provisioning state.") + @visibility("read") + provisioningState?: ProvisioningState; } // A helper template for defining empty properties for resource PATCH operations @@ -38,14 +55,17 @@ model ResourceProperties { // See https://github.com/Azure/azure-rest-api-specs-pr/pull/8707#discussion_r971363996 for context @doc("The type used for update operations of the {name}.", TResource) @friendlyName("{name}Update", TResource) -model ResourceUpdateModelNoProperties - is OptionalProperties>>; +model ResourceUpdateModelNoProperties + is OptionalProperties>>; #suppress "@azure-tools/cadl-azure-resource-manager/arm-resource-interface-requires-decorator" "Interface template does not require this." #suppress "@azure-tools/cadl-azure-resource-manager/arm-resource-interface-uses-templates" "This is an official operations template." @doc("Template for resources with no updateable properties") @armResourceOperations -interface ResourceUpdateNoProperties { +interface ResourceUpdateNoProperties { @autoRoute @doc("Update a {name}", TResource) @armResourceUpdate(TResource) @@ -57,4 +77,39 @@ interface ResourceUpdateNoProperties { @body properties: ResourceUpdateModelNoProperties ): ArmResponse | ErrorResponse; -} \ No newline at end of file +} + +// These models should be provided by the common CADL infra, but currently they are not. See GitHub PR: +// https://github.com/Azure/cadl-azure/pull/2311 +// For now, these definitions are reimplementations of the common types from: +// https://github.com/Azure/azure-rest-api-specs-pr/blob/66dc2c9a0243bc217a938583a53da052498ac39f/specification/common-types/resource-management/v3/types.json + +// Ideally all of these would be marked as @added(Versions.v2022_12_02_preview) but they can't be because of +// https://github.com/microsoft/cadl/issues/1332 + +@doc("The check availability request body.") +model CheckNameAvailabilityRequest { + @doc("The name of the resource for which availability needs to be checked.") + name?: string; + + @doc("The resource type.") + type?: string; +} + +@doc("Possible reasons for a name not being available.") +enum CheckNameAvailabilityReason { + "Invalid", + "AlreadyExists", +} + +@doc("The check availability result.") +model CheckNameAvailabilityResponse { + @doc("Indicates if the resource name is available.") + nameAvailable?: boolean; + + @doc("The reason why the given name is not available.") + reason?: CheckNameAvailabilityReason; + + @doc("Detailed reason why the given name is not available.") + message?: string; +} diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_CreateOrUpdate.json b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_CreateOrUpdate.json new file mode 100644 index 000000000000..2bd30b3c2943 --- /dev/null +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_CreateOrUpdate.json @@ -0,0 +1,162 @@ +{ + "operationId": "CommunicationsGateways_CreateOrUpdate", + "title": "CreateCommunicationsGatewayResource", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "testrg", + "api-version": "2023-01-31", + "name": "myname", + "communicationsGatewayName": "myname", + "resource": { + "location": "useast", + "properties": { + "serviceLocations": [ + { + "name": "useast", + "primaryRegionProperties": { + "operatorAddresses": [ + "198.51.100.1" + ], + "allowedSignalingSourceAddressPrefixes": [ + "10.1.1.0/24" + ], + "allowedMediaSourceAddressPrefixes": [ + "10.1.2.0/24" + ] + } + }, + { + "name": "useast2", + "primaryRegionProperties": { + "operatorAddresses": [ + "198.51.100.2" + ], + "allowedSignalingSourceAddressPrefixes": [ + "10.2.1.0/24" + ], + "allowedMediaSourceAddressPrefixes": [ + "10.2.2.0/24" + ] + } + } + ], + "connectivity": "PublicAddress", + "codecs": [ + "PCMA" + ], + "e911Type": "Standard", + "platforms": [ + "OperatorConnect" + ], + "autoGeneratedDomainNameLabelScope": "NoReuse", + "teamsVoicemailPilotNumber": "1234567890" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname", + "name": "myname", + "type": "Microsoft.Voiceservice/communicationsGateways", + "location": "useast", + "properties": { + "serviceLocations": [ + { + "name": "useast", + "primaryRegionProperties": { + "operatorAddresses": [ + "198.51.100.1" + ], + "allowedSignalingSourceAddressPrefixes": [ + "10.1.1.0/24" + ], + "allowedMediaSourceAddressPrefixes": [ + "10.1.2.0/24" + ] + } + }, + { + "name": "useast2", + "primaryRegionProperties": { + "operatorAddresses": [ + "198.51.100.2" + ], + "allowedSignalingSourceAddressPrefixes": [ + "10.2.1.0/24" + ], + "allowedMediaSourceAddressPrefixes": [ + "10.2.2.0/24" + ] + } + } + ], + "status": "ChangePending", + "connectivity": "PublicAddress", + "codecs": [ + "PCMA" + ], + "e911Type": "Standard", + "platforms": [ + "OperatorConnect" + ], + "autoGeneratedDomainNameLabelScope": "NoReuse", + "autoGeneratedDomainNameLabel": "somelabel", + "teamsVoicemailPilotNumber": "1234567890" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname", + "name": "myname", + "type": "Microsoft.Voiceservice/communicationsGateways", + "location": "useast", + "properties": { + "status": "ChangePending", + "serviceLocations": [ + { + "name": "useast", + "primaryRegionProperties": { + "operatorAddresses": [ + "198.51.100.1" + ], + "allowedSignalingSourceAddressPrefixes": [ + "10.1.1.0/24" + ], + "allowedMediaSourceAddressPrefixes": [ + "10.1.2.0/24" + ] + } + }, + { + "name": "useast2", + "primaryRegionProperties": { + "operatorAddresses": [ + "198.51.100.2" + ], + "allowedSignalingSourceAddressPrefixes": [ + "10.2.1.0/24" + ], + "allowedMediaSourceAddressPrefixes": [ + "10.2.2.0/24" + ] + } + } + ], + "connectivity": "PublicAddress", + "codecs": [ + "PCMA" + ], + "e911Type": "Standard", + "platforms": [ + "OperatorConnect" + ], + "autoGeneratedDomainNameLabelScope": "NoReuse", + "autoGeneratedDomainNameLabel": "somelabel", + "teamsVoicemailPilotNumber": "1234567890" + } + } + } + } +} diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_Delete.json b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_Delete.json new file mode 100644 index 000000000000..676da42e1ef7 --- /dev/null +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_Delete.json @@ -0,0 +1,20 @@ +{ + "operationId": "CommunicationsGateways_Delete", + "title": "DeleteCommunicationsGatewayResource", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "testrg", + "api-version": "2023-01-31", + "communicationsGatewayName": "myname", + "location": "useast" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "azure-asyncoperation": "http://azure.async.operation/status" + } + }, + "204": {} + } +} diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_Get.json b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_Get.json new file mode 100644 index 000000000000..86f259a4ade2 --- /dev/null +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_Get.json @@ -0,0 +1,65 @@ +{ + "operationId": "CommunicationsGateways_Get", + "title": "GetCommunicationsGatewayResource", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "testrg", + "api-version": "2023-01-31", + "name": "myname", + "communicationsGatewayName": "myname" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateways/myname", + "name": "myname", + "location": "useast", + "type": "Microsoft.VoiceService/communicationsGateways", + "properties": { + "status": "ChangePending", + "serviceLocations": [ + { + "name": "useast", + "primaryRegionProperties": { + "operatorAddresses": [ + "198.51.100.1" + ], + "allowedSignalingSourceAddressPrefixes": [ + "10.1.1.0/24" + ], + "allowedMediaSourceAddressPrefixes": [ + "10.1.2.0/24" + ] + } + }, + { + "name": "useast2", + "primaryRegionProperties": { + "operatorAddresses": [ + "198.51.100.2" + ], + "allowedSignalingSourceAddressPrefixes": [ + "10.2.1.0/24" + ], + "allowedMediaSourceAddressPrefixes": [ + "10.2.2.0/24" + ] + } + } + ], + "connectivity": "PublicAddress", + "codecs": [ + "PCMA" + ], + "e911Type": "Standard", + "platforms": [ + "OperatorConnect" + ], + "autoGeneratedDomainNameLabelScope": "NoReuse", + "autoGeneratedDomainNameLabel": "somelabel", + "teamsVoicemailPilotNumber": "1234567890" + } + } + } + } +} diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_ListByResourceGroup.json b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_ListByResourceGroup.json new file mode 100644 index 000000000000..bd371b5a753b --- /dev/null +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_ListByResourceGroup.json @@ -0,0 +1,67 @@ +{ + "operationId": "CommunicationsGateways_ListByResourceGroup", + "title": "ListCommunicationsGatewayResource", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "testrg", + "api-version": "2023-01-31" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateways/myname", + "name": "myname", + "location": "useast", + "type": "Microsoft.VoiceService/communicationsGateways", + "properties": { + "status": "ChangePending", + "serviceLocations": [ + { + "name": "useast", + "primaryRegionProperties": { + "operatorAddresses": [ + "198.51.100.1" + ], + "allowedSignalingSourceAddressPrefixes": [ + "10.1.1.0/24" + ], + "allowedMediaSourceAddressPrefixes": [ + "10.1.2.0/24" + ] + } + }, + { + "name": "useast2", + "primaryRegionProperties": { + "operatorAddresses": [ + "198.51.100.2" + ], + "allowedSignalingSourceAddressPrefixes": [ + "10.2.1.0/24" + ], + "allowedMediaSourceAddressPrefixes": [ + "10.2.2.0/24" + ] + } + } + ], + "connectivity": "PublicAddress", + "codecs": [ + "PCMA" + ], + "e911Type": "Standard", + "platforms": [ + "OperatorConnect" + ], + "autoGeneratedDomainNameLabelScope": "NoReuse", + "autoGeneratedDomainNameLabel": "somelabel", + "teamsVoicemailPilotNumber": "1234567890" + } + } + ] + } + } + } +} diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_ListBySubscription.json b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_ListBySubscription.json new file mode 100644 index 000000000000..6145dbe9651b --- /dev/null +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_ListBySubscription.json @@ -0,0 +1,66 @@ +{ + "operationId": "CommunicationsGateways_ListBySubscription", + "title": "ListCommunicationsGatewayResourceSub", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "api-version": "2023-01-31" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateways/myname", + "name": "myname", + "location": "useast", + "type": "Microsoft.VoiceService/communicationsGateways", + "properties": { + "status": "ChangePending", + "serviceLocations": [ + { + "name": "useast", + "primaryRegionProperties": { + "operatorAddresses": [ + "198.51.100.1" + ], + "allowedSignalingSourceAddressPrefixes": [ + "10.1.1.0/24" + ], + "allowedMediaSourceAddressPrefixes": [ + "10.1.2.0/24" + ] + } + }, + { + "name": "useast2", + "primaryRegionProperties": { + "operatorAddresses": [ + "198.51.100.2" + ], + "allowedSignalingSourceAddressPrefixes": [ + "10.2.1.0/24" + ], + "allowedMediaSourceAddressPrefixes": [ + "10.2.2.0/24" + ] + } + } + ], + "connectivity": "PublicAddress", + "codecs": [ + "PCMA" + ], + "e911Type": "Standard", + "platforms": [ + "OperatorConnect" + ], + "autoGeneratedDomainNameLabelScope": "NoReuse", + "autoGeneratedDomainNameLabel": "somelabel", + "teamsVoicemailPilotNumber": "1234567890" + } + } + ] + } + } + } +} diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_Update.json b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_Update.json new file mode 100644 index 000000000000..10824ec0304b --- /dev/null +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/CommunicationsGateways_Update.json @@ -0,0 +1,66 @@ +{ + "operationId": "CommunicationsGateways_Update", + "title": "UpdateCommunicationsGatewayResource", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "testrg", + "api-version": "2023-01-31", + "communicationsGatewayName": "myname", + "location": "useast", + "properties": {} + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname", + "name": "myname", + "type": "Microsoft.Voiceservice/communicationsGateways", + "location": "useast", + "properties": { + "status": "ChangePending", + "serviceLocations": [ + { + "name": "useast", + "primaryRegionProperties": { + "operatorAddresses": [ + "198.51.100.1" + ], + "allowedSignalingSourceAddressPrefixes": [ + "10.1.1.0/24" + ], + "allowedMediaSourceAddressPrefixes": [ + "10.1.2.0/24" + ] + } + }, + { + "name": "useast2", + "primaryRegionProperties": { + "operatorAddresses": [ + "198.51.100.2" + ], + "allowedSignalingSourceAddressPrefixes": [ + "10.2.1.0/24" + ], + "allowedMediaSourceAddressPrefixes": [ + "10.2.2.0/24" + ] + } + } + ], + "connectivity": "PublicAddress", + "codecs": [ + "PCMA" + ], + "e911Type": "Standard", + "platforms": [ + "OperatorConnect" + ], + "autoGeneratedDomainNameLabelScope": "NoReuse", + "autoGeneratedDomainNameLabel": "somelabel", + "teamsVoicemailPilotNumber": "1234567890" + } + } + } + } +} diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/NameAvailability_CheckLocal.json b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/NameAvailability_CheckLocal.json new file mode 100644 index 000000000000..d9bbf2abdef0 --- /dev/null +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/NameAvailability_CheckLocal.json @@ -0,0 +1,22 @@ +{ + "operationId": "NameAvailability_CheckLocal", + "title": "CheckLocalNameAvailability", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "api-version": "2023-01-31", + "location": "useast", + "body": { + "name": "myname", + "type": "Microsoft.VoiceServices/CommunicationsGateway" + } + }, + "responses": { + "200": { + "body": { + "nameAvailable": false, + "reason": "AlreadyExists", + "message": "Some error string" + } + } + } +} diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/Operations_List.json b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/Operations_List.json new file mode 100644 index 000000000000..ae48e68e6d1c --- /dev/null +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/Operations_List.json @@ -0,0 +1,25 @@ +{ + "operationId": "Operations_List", + "title": "OperationsList", + "parameters": { + "api-version": "2023-01-31" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.VoiceService/communicationsGateways/write", + "display": { + "provider": "Microsoft.VoiceService", + "resource": "communicationsGateways", + "operation": "write", + "description": "Write communicationsGateways resource" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/TestLines_CreateOrUpdate.json b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/TestLines_CreateOrUpdate.json new file mode 100644 index 000000000000..71d835457ab3 --- /dev/null +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/TestLines_CreateOrUpdate.json @@ -0,0 +1,45 @@ +{ + "operationId": "TestLines_CreateOrUpdate", + "title": "CreateTestLineResource", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "testrg", + "api-version": "2023-01-31", + "name": "myline", + "testLineName": "myline", + "communicationsGatewayName": "myname", + "resource": { + "location": "useast", + "properties": { + "phoneNumber": "+1-555-1234", + "purpose": "Automated" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/TestLines/myline", + "name": "myline", + "location": "useast", + "type": "Microsoft.Voiceservice/communicationsGateways/testLines", + "properties": { + "phoneNumber": "+1-555-1234", + "purpose": "Automated" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/TestLines/myline", + "name": "myline", + "location": "useast", + "type": "Microsoft.Voiceservice/communicationsGateways/testLines", + "properties": { + "phoneNumber": "+1-555-1234", + "purpose": "Automated" + } + } + } + } +} diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/TestLines_Delete.json b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/TestLines_Delete.json new file mode 100644 index 000000000000..6123b7d09e52 --- /dev/null +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/TestLines_Delete.json @@ -0,0 +1,22 @@ +{ + "operationId": "TestLines_Delete", + "title": "DeleteTestLineResource", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "testrg", + "api-version": "2023-01-31", + "name": "myline", + "testLineName": "myline", + "communicationsGatewayName": "myname", + "location": "useast" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "azure-asyncoperation": "http://azure.async.operation/status" + } + }, + "204": {} + } +} diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/TestLines_Get.json b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/TestLines_Get.json new file mode 100644 index 000000000000..c806fa64ec4e --- /dev/null +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/TestLines_Get.json @@ -0,0 +1,26 @@ +{ + "operationId": "TestLines_Get", + "title": "GetTestLineResource", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "testrg", + "api-version": "2023-01-31", + "name": "myline", + "testLineName": "myline", + "communicationsGatewayName": "myname" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/TestLines/myline", + "name": "myline", + "type": "Microsoft.Voiceservice/communicationsGateways/testLines", + "location": "useast", + "properties": { + "phoneNumber": "+1-555-1234", + "purpose": "Automated" + } + } + } + } +} diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/TestLines_ListByCommunicationsGateway.json b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/TestLines_ListByCommunicationsGateway.json new file mode 100644 index 000000000000..dca876395662 --- /dev/null +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/TestLines_ListByCommunicationsGateway.json @@ -0,0 +1,28 @@ +{ + "operationId": "TestLines_ListByCommunicationsGateway", + "title": "ListTestLineResource", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "testrg", + "api-version": "2023-01-31", + "communicationsGatewayName": "myname" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/TestLines/myline", + "name": "myline", + "type": "Microsoft.Voiceservice/communicationsGateways/testLines", + "location": "useast", + "properties": { + "phoneNumber": "+1-555-1234", + "purpose": "Automated" + } + } + ] + } + } + } +} diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/TestLines_Update.json b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/TestLines_Update.json new file mode 100644 index 000000000000..65c65dbbcff4 --- /dev/null +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/examples/TestLines_Update.json @@ -0,0 +1,28 @@ +{ + "operationId": "TestLines_Update", + "title": "UpdateTestLineResource", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "testrg", + "api-version": "2023-01-31", + "name": "myline", + "testLineName": "myline", + "communicationsGatewayName": "myname", + "location": "useast", + "properties": {} + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VoiceService/communicationsGateway/myname/TestLines/myline", + "name": "myline", + "location": "useast", + "type": "Microsoft.Voiceservice/communicationsGateways/testLines", + "properties": { + "phoneNumber": "+1-555-1234", + "purpose": "Automated" + } + } + } + } +} diff --git a/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/voiceservices.json b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/voiceservices.json new file mode 100644 index 000000000000..873dac7d7e8f --- /dev/null +++ b/specification/voiceservices/resource-manager/Microsoft.VoiceServices/stable/2023-01-31/voiceservices.json @@ -0,0 +1,1327 @@ +{ + "swagger": "2.0", + "info": { + "title": "Microsoft.VoiceServices", + "version": "2023-01-31", + "x-cadl-generated": [ + { + "emitter": "@azure-tools/cadl-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "host": "management.azure.com", + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow.", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "tags": [ + { + "name": "Operations" + }, + { + "name": "TestLines" + }, + { + "name": "CommunicationsGateways" + } + ], + "paths": { + "/providers/Microsoft.VoiceServices/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "List the operations for the provider", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/OperationListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "OperationsList": { + "$ref": "./examples/Operations_List.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.VoiceServices/communicationsGateways": { + "get": { + "tags": [ + "CommunicationsGateways" + ], + "operationId": "CommunicationsGateways_ListBySubscription", + "description": "List CommunicationsGateway resources by subscription ID", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/CommunicationsGatewayListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "ListCommunicationsGatewayResourceSub": { + "$ref": "./examples/CommunicationsGateways_ListBySubscription.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.VoiceServices/locations/{location}/checkNameAvailability": { + "post": { + "operationId": "NameAvailability_CheckLocal", + "description": "Check whether the resource name is available in the given region.", + "parameters": [ + { + "name": "location", + "in": "path", + "required": true, + "description": "The location in which uniqueness will be verified.", + "type": "string" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "body", + "in": "body", + "required": true, + "description": "The check availability request body.", + "schema": { + "$ref": "#/definitions/CheckNameAvailabilityRequest" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/CheckNameAvailabilityResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "CheckLocalNameAvailability": { + "$ref": "./examples/NameAvailability_CheckLocal.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways": { + "get": { + "tags": [ + "CommunicationsGateways" + ], + "operationId": "CommunicationsGateways_ListByResourceGroup", + "description": "List CommunicationsGateway resources by resource group", + "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": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/CommunicationsGatewayListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "ListCommunicationsGatewayResource": { + "$ref": "./examples/CommunicationsGateways_ListByResourceGroup.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}": { + "get": { + "tags": [ + "CommunicationsGateways" + ], + "operationId": "CommunicationsGateways_Get", + "description": "Get a CommunicationsGateway", + "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" + }, + { + "name": "communicationsGatewayName", + "in": "path", + "required": true, + "description": "Unique identifier for this deployment", + "pattern": "^[a-zA-Z0-9-]{3,24}$", + "type": "string" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/CommunicationsGateway" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "GetCommunicationsGatewayResource": { + "$ref": "./examples/CommunicationsGateways_Get.json" + } + } + }, + "put": { + "tags": [ + "CommunicationsGateways" + ], + "operationId": "CommunicationsGateways_CreateOrUpdate", + "description": "Create a CommunicationsGateway", + "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" + }, + { + "name": "communicationsGatewayName", + "in": "path", + "required": true, + "description": "Unique identifier for this deployment", + "pattern": "^[a-zA-Z0-9-]{3,24}$", + "type": "string" + }, + { + "name": "resource", + "in": "body", + "required": true, + "description": "Resource create parameters.", + "schema": { + "$ref": "#/definitions/CommunicationsGateway" + } + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/CommunicationsGateway" + } + }, + "201": { + "description": "ARM create operation completed successfully.", + "headers": { + "Retry-After": { + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": "integer", + "format": "int32" + } + }, + "schema": { + "$ref": "#/definitions/CommunicationsGateway" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "CreateCommunicationsGatewayResource": { + "$ref": "./examples/CommunicationsGateways_CreateOrUpdate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "tags": [ + "CommunicationsGateways" + ], + "operationId": "CommunicationsGateways_Delete", + "description": "Delete a CommunicationsGateway", + "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" + }, + { + "name": "communicationsGatewayName", + "in": "path", + "required": true, + "description": "Unique identifier for this deployment", + "pattern": "^[a-zA-Z0-9-]{3,24}$", + "type": "string" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Retry-After": { + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": "integer", + "format": "int32" + } + } + }, + "204": { + "description": "Resource deleted successfully." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DeleteCommunicationsGatewayResource": { + "$ref": "./examples/CommunicationsGateways_Delete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "tags": [ + "CommunicationsGateways" + ], + "operationId": "CommunicationsGateways_Update", + "description": "Update a CommunicationsGateway", + "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" + }, + { + "name": "communicationsGatewayName", + "in": "path", + "required": true, + "description": "Unique identifier for this deployment", + "pattern": "^[a-zA-Z0-9-]{3,24}$", + "type": "string" + }, + { + "name": "properties", + "in": "body", + "required": true, + "description": "The resource properties to be updated.", + "schema": { + "$ref": "#/definitions/CommunicationsGatewayUpdate" + } + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/CommunicationsGateway" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "UpdateCommunicationsGatewayResource": { + "$ref": "./examples/CommunicationsGateways_Update.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}/testLines": { + "get": { + "tags": [ + "TestLines" + ], + "operationId": "TestLines_ListByCommunicationsGateway", + "description": "List TestLine resources by CommunicationsGateway", + "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" + }, + { + "name": "communicationsGatewayName", + "in": "path", + "required": true, + "description": "Unique identifier for this deployment", + "pattern": "^[a-zA-Z0-9-]{3,24}$", + "type": "string" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/TestLineListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "ListTestLineResource": { + "$ref": "./examples/TestLines_ListByCommunicationsGateway.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VoiceServices/communicationsGateways/{communicationsGatewayName}/testLines/{testLineName}": { + "get": { + "tags": [ + "TestLines" + ], + "operationId": "TestLines_Get", + "description": "Get a TestLine", + "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" + }, + { + "name": "communicationsGatewayName", + "in": "path", + "required": true, + "description": "Unique identifier for this deployment", + "pattern": "^[a-zA-Z0-9-]{3,24}$", + "type": "string" + }, + { + "name": "testLineName", + "in": "path", + "required": true, + "description": "Unique identifier for this test line", + "pattern": "^[a-zA-Z0-9-]{3,24}$", + "type": "string" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/TestLine" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "GetTestLineResource": { + "$ref": "./examples/TestLines_Get.json" + } + } + }, + "put": { + "tags": [ + "TestLines" + ], + "operationId": "TestLines_CreateOrUpdate", + "description": "Create a TestLine", + "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" + }, + { + "name": "communicationsGatewayName", + "in": "path", + "required": true, + "description": "Unique identifier for this deployment", + "pattern": "^[a-zA-Z0-9-]{3,24}$", + "type": "string" + }, + { + "name": "testLineName", + "in": "path", + "required": true, + "description": "Unique identifier for this test line", + "pattern": "^[a-zA-Z0-9-]{3,24}$", + "type": "string" + }, + { + "name": "resource", + "in": "body", + "required": true, + "description": "Resource create parameters.", + "schema": { + "$ref": "#/definitions/TestLine" + } + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/TestLine" + } + }, + "201": { + "description": "ARM create operation completed successfully.", + "headers": { + "Retry-After": { + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": "integer", + "format": "int32" + } + }, + "schema": { + "$ref": "#/definitions/TestLine" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "CreateTestLineResource": { + "$ref": "./examples/TestLines_CreateOrUpdate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "tags": [ + "TestLines" + ], + "operationId": "TestLines_Delete", + "description": "Delete a TestLine", + "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" + }, + { + "name": "communicationsGatewayName", + "in": "path", + "required": true, + "description": "Unique identifier for this deployment", + "pattern": "^[a-zA-Z0-9-]{3,24}$", + "type": "string" + }, + { + "name": "testLineName", + "in": "path", + "required": true, + "description": "Unique identifier for this test line", + "pattern": "^[a-zA-Z0-9-]{3,24}$", + "type": "string" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Retry-After": { + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": "integer", + "format": "int32" + } + } + }, + "204": { + "description": "Resource deleted successfully." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DeleteTestLineResource": { + "$ref": "./examples/TestLines_Delete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "tags": [ + "TestLines" + ], + "operationId": "TestLines_Update", + "description": "Update a TestLine", + "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" + }, + { + "name": "communicationsGatewayName", + "in": "path", + "required": true, + "description": "Unique identifier for this deployment", + "pattern": "^[a-zA-Z0-9-]{3,24}$", + "type": "string" + }, + { + "name": "testLineName", + "in": "path", + "required": true, + "description": "Unique identifier for this test line", + "pattern": "^[a-zA-Z0-9-]{3,24}$", + "type": "string" + }, + { + "name": "properties", + "in": "body", + "required": true, + "description": "The resource properties to be updated.", + "schema": { + "$ref": "#/definitions/TestLineUpdate" + } + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/TestLine" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "UpdateTestLineResource": { + "$ref": "./examples/TestLines_Update.json" + } + } + } + } + }, + "definitions": { + "ApiBridgeProperties": { + "type": "object", + "properties": {}, + "description": "Details of API bridge functionality." + }, + "AutoGeneratedDomainNameLabelScope": { + "type": "string", + "description": "Available auto-generated domain name scopes.", + "enum": [ + "TenantReuse", + "SubscriptionReuse", + "ResourceGroupReuse", + "NoReuse" + ], + "x-ms-enum": { + "name": "AutoGeneratedDomainNameLabelScope", + "modelAsString": true + } + }, + "CheckNameAvailabilityReason": { + "type": "string", + "description": "Possible reasons for a name not being available.", + "enum": [ + "Invalid", + "AlreadyExists" + ], + "x-ms-enum": { + "name": "CheckNameAvailabilityReason", + "modelAsString": true + } + }, + "CheckNameAvailabilityRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the resource for which availability needs to be checked." + }, + "type": { + "type": "string", + "description": "The resource type." + } + }, + "description": "The check availability request body." + }, + "CheckNameAvailabilityResponse": { + "type": "object", + "properties": { + "nameAvailable": { + "type": "boolean", + "description": "Indicates if the resource name is available." + }, + "reason": { + "$ref": "#/definitions/CheckNameAvailabilityReason", + "description": "The reason why the given name is not available." + }, + "message": { + "type": "string", + "description": "Detailed reason why the given name is not available." + } + }, + "description": "The check availability result." + }, + "CommunicationsGateway": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/CommunicationsGatewayProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "description": "A CommunicationsGateway resource", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ] + }, + "CommunicationsGatewayListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/CommunicationsGateway" + }, + "x-cadl-name": "CommunicationsGateway[]", + "description": "The CommunicationsGateway items on this page" + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items", + "x-cadl-name": "Rest.ResourceLocation" + } + }, + "description": "The response of a CommunicationsGateway list operation.", + "required": [ + "value" + ] + }, + "CommunicationsGatewayProperties": { + "type": "object", + "properties": { + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "Resource provisioning state.", + "readOnly": true + }, + "status": { + "$ref": "#/definitions/Status", + "description": "The current status of the deployment.", + "readOnly": true + }, + "serviceLocations": { + "type": "array", + "items": { + "$ref": "#/definitions/ServiceRegionProperties" + }, + "x-ms-identifiers": [ + "name" + ], + "x-cadl-name": "ServiceRegionProperties[]", + "description": "The regions in which to deploy the resources needed for Teams Calling", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "connectivity": { + "$ref": "#/definitions/Connectivity", + "description": "How to connect back to the operator network, e.g. MAPS", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "codecs": { + "type": "array", + "items": { + "$ref": "#/definitions/TeamsCodecs" + }, + "x-cadl-name": "TeamsCodecs[]", + "description": "Voice codecs to support", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "e911Type": { + "$ref": "#/definitions/E911Type", + "description": "How to handle 911 calls", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "platforms": { + "type": "array", + "items": { + "$ref": "#/definitions/CommunicationsPlatform" + }, + "x-cadl-name": "CommunicationsPlatform[]", + "description": "What platforms to support", + "minItems": 1, + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "apiBridge": { + "$ref": "#/definitions/ApiBridgeProperties", + "description": "Details of API bridge functionality, if required", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "autoGeneratedDomainNameLabelScope": { + "$ref": "#/definitions/AutoGeneratedDomainNameLabelScope", + "description": "The scope at which the auto-generated domain name can be re-used", + "default": "TenantReuse", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "autoGeneratedDomainNameLabel": { + "type": "string", + "description": "The autogenerated label used as part of the FQDNs for accessing the Communications Gateway", + "readOnly": true + }, + "teamsVoicemailPilotNumber": { + "type": "string", + "description": "This number is used in Teams Phone Mobile scenarios for access to the voicemail IVR from the native dialer.", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "onPremMcpEnabled": { + "type": "boolean", + "description": "Whether an on-premises Mobile Control Point is in use.", + "default": false, + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "emergencyDialStrings": { + "type": "array", + "items": { + "type": "string" + }, + "x-cadl-name": "string[]", + "description": "A list of dial strings used for emergency calling.", + "default": [ + "911", + "933" + ], + "x-ms-mutability": [ + "read", + "update", + "create" + ] + } + }, + "description": "Details of the CommunicationsGateway resource.", + "required": [ + "serviceLocations", + "connectivity", + "codecs", + "e911Type", + "platforms" + ] + }, + "CommunicationsGatewayUpdate": { + "type": "object", + "properties": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-cadl-name": "Record", + "description": "Resource tags." + } + }, + "description": "The type used for update operations of the CommunicationsGateway." + }, + "CommunicationsPlatform": { + "type": "string", + "description": "Available platform types.", + "enum": [ + "OperatorConnect", + "TeamsPhoneMobile" + ], + "x-ms-enum": { + "name": "CommunicationsPlatform", + "modelAsString": true + } + }, + "Connectivity": { + "type": "string", + "description": "How this deployment connects back to the operator network", + "enum": [ + "PublicAddress" + ], + "x-ms-enum": { + "name": "Connectivity", + "modelAsString": true, + "values": [ + { + "name": "PublicAddress", + "value": "PublicAddress", + "description": "This deployment connects to the operator network using a Public IP address, e.g. when using MAPS" + } + ] + } + }, + "E911Type": { + "type": "string", + "description": "The method for terminating emergency calls to the PSTN.", + "enum": [ + "Standard", + "DirectToEsrp" + ], + "x-ms-enum": { + "name": "E911Type", + "modelAsString": true, + "values": [ + { + "name": "Standard", + "value": "Standard", + "description": "Emergency calls are not handled different from other calls" + }, + { + "name": "DirectToEsrp", + "value": "DirectToEsrp", + "description": "Emergency calls are routed directly to the ESRP" + } + ] + } + }, + "PrimaryRegionProperties": { + "type": "object", + "properties": { + "operatorAddresses": { + "type": "array", + "items": { + "type": "string" + }, + "x-cadl-name": "string[]", + "description": "IP address to use to contact the operator network from this region", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "esrpAddresses": { + "type": "array", + "items": { + "type": "string" + }, + "x-cadl-name": "string[]", + "description": "IP address to use to contact the ESRP from this region", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "allowedSignalingSourceAddressPrefixes": { + "type": "array", + "items": { + "type": "string" + }, + "x-cadl-name": "string[]", + "description": "The allowed source IP address or CIDR ranges for signaling", + "default": [], + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "allowedMediaSourceAddressPrefixes": { + "type": "array", + "items": { + "type": "string" + }, + "x-cadl-name": "string[]", + "description": "The allowed source IP address or CIDR ranges for media", + "default": [], + "x-ms-mutability": [ + "read", + "update", + "create" + ] + } + }, + "description": "The configuration used in this region as primary, and other regions as backup.", + "required": [ + "operatorAddresses" + ] + }, + "ProvisioningState": { + "type": "string", + "description": "Provisioning state of the resource.", + "enum": [ + "Succeeded", + "Failed", + "Canceled" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + } + }, + "ServiceRegionProperties": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the region in which the resources needed for Teams Calling will be deployed.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "primaryRegionProperties": { + "$ref": "#/definitions/PrimaryRegionProperties", + "description": "The configuration used in this region as primary, and other regions as backup.", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + } + }, + "description": "The service region configuration needed for Teams Callings.", + "required": [ + "name", + "primaryRegionProperties" + ] + }, + "Status": { + "type": "string", + "description": "The status of the current CommunicationsGateway resource.", + "enum": [ + "ChangePending", + "Complete" + ], + "x-ms-enum": { + "name": "Status", + "modelAsString": true, + "values": [ + { + "name": "ChangePending", + "value": "ChangePending", + "description": "The resource has been created or updated, but the CommunicationsGateway service has not yet been updated to reflect the changes." + }, + { + "name": "Complete", + "value": "Complete", + "description": "The CommunicationsGateway service is up and running with the parameters specified in the resource." + } + ] + } + }, + "TeamsCodecs": { + "type": "string", + "description": "The voice codecs expected for communication with Teams.", + "enum": [ + "PCMA", + "PCMU", + "G722", + "G722_2", + "SILK_8", + "SILK_16" + ], + "x-ms-enum": { + "name": "TeamsCodecs", + "modelAsString": true + } + }, + "TestLine": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/TestLineProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "description": "A TestLine resource", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ] + }, + "TestLineListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/TestLine" + }, + "x-cadl-name": "TestLine[]", + "description": "The TestLine items on this page" + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items", + "x-cadl-name": "Rest.ResourceLocation" + } + }, + "description": "The response of a TestLine list operation.", + "required": [ + "value" + ] + }, + "TestLineProperties": { + "type": "object", + "properties": { + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "Resource provisioning state.", + "readOnly": true + }, + "phoneNumber": { + "type": "string", + "description": "The phone number", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "purpose": { + "$ref": "#/definitions/TestLinePurpose", + "description": "Purpose of this test line, e.g. automated or manual testing", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + } + }, + "description": "Details of the TestLine resource.", + "required": [ + "phoneNumber", + "purpose" + ] + }, + "TestLinePurpose": { + "type": "string", + "description": "The purpose of the TestLine resource.", + "enum": [ + "Manual", + "Automated" + ], + "x-ms-enum": { + "name": "TestLinePurpose", + "modelAsString": true + } + }, + "TestLineUpdate": { + "type": "object", + "properties": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-cadl-name": "Record", + "description": "Resource tags." + } + }, + "description": "The type used for update operations of the TestLine." + } + }, + "parameters": {} +} diff --git a/specification/voiceservices/resource-manager/readme.md b/specification/voiceservices/resource-manager/readme.md index 5cb043c3b9c0..5572b7d39413 100644 --- a/specification/voiceservices/resource-manager/readme.md +++ b/specification/voiceservices/resource-manager/readme.md @@ -27,7 +27,7 @@ These are the global settings for the voiceservices. ```yaml openapi-type: arm openapi-subtype: rpaas -tag: package-2022-12-01-preview +tag: package-2023-01-31 ``` ### Tag: package-2022-12-01-preview @@ -39,6 +39,15 @@ input-file: - Microsoft.VoiceServices/preview/2022-12-01-preview/openapi.json ``` +### Tag: package-2023-01-31 + +These settings apply only when `--tag=package-2023-01-31` is specified on the command line. + +```yaml $(tag) == 'package-2023-01-31' +input-file: + - Microsoft.VoiceServices/stable/2023-01-31/voiceservices.json +``` + --- # Code Generation @@ -55,6 +64,7 @@ swagger-to-sdk: - repo: azure-sdk-for-go - repo: azure-sdk-for-js - repo: azure-sdk-for-net + - repo: azure-sdk-for-net-track2 - repo: azure-resource-manager-schemas - repo: azure-cli-extensions - repo: azure-powershell