-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Hub Generated] Publish private branch 'voiceservice-private-preview' (…
…#21862) * add or modify files * Sync custom-words to main * Add custom words
- Loading branch information
Showing
48 changed files
with
3,287 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
specification/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/cadl-project.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
emitters: | ||
"@azure-tools/cadl-autorest": | ||
azure-resource-provider-folder: ./swagger/VoiceServices/resource-manager | ||
examples-directory: ./examples | ||
"@azure-tools/cadl-providerhub-controller": | ||
code-kind: model |
196 changes: 196 additions & 0 deletions
196
...on/voiceservices/resource-manager/Microsoft.VoiceServices/cadl/communicationsgateway.cadl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,196 @@ | ||
// Definitions for the CommunicationsGateway resource and child resources | ||
|
||
import "@cadl-lang/openapi"; | ||
import "@cadl-lang/rest"; | ||
import "@azure-tools/cadl-providerhub"; | ||
import "@azure-tools/cadl-autorest"; | ||
import "@azure-tools/cadl-azure-core"; | ||
import "@azure-tools/cadl-azure-resource-manager"; | ||
|
||
namespace Microsoft.VoiceServices; | ||
|
||
using Cadl.Http; | ||
using Cadl.Rest; | ||
using Azure.ResourceManager; | ||
|
||
@doc("A TestLine resource") | ||
@parentResource(CommunicationsGateway) | ||
model TestLine is TrackedResource<TestLineProperties> { | ||
@pattern("^[a-zA-Z0-9-]{3,24}$") | ||
@key("testLineName") | ||
@segment("testLines") | ||
@doc("Unique identifier for this test line") | ||
@visibility("Read") | ||
@path | ||
name: string; | ||
} | ||
|
||
@doc("The purpose of the TestLine resource.") | ||
enum TestLinePurpose { | ||
Manual, | ||
Automated, | ||
} | ||
|
||
@doc("Details of the TestLine resource.") | ||
model TestLineProperties is ResourceProperties { | ||
@doc("The phone number") | ||
@visibility("read", "write", "create") | ||
phoneNumber: string; | ||
@doc("Purpose of this test line, e.g. automated or manual testing") | ||
@visibility("read", "write", "create") | ||
purpose: TestLinePurpose; | ||
} | ||
|
||
@armResourceOperations | ||
interface TestLines extends ResourceRead<TestLine>, ResourceCreate<TestLine>, ResourceDelete<TestLine>, ResourceListByParent<TestLine>, ResourceUpdateNoProperties<TestLine> {} | ||
|
||
@doc("A Contact resource") | ||
@parentResource(CommunicationsGateway) | ||
model Contact is TrackedResource<ContactProperties> { | ||
@pattern("^[a-zA-Z0-9-]{3,24}$") | ||
@key("contactName") | ||
@segment("contacts") | ||
@doc("Unique identifier for this contact") | ||
@visibility("Read") | ||
@path | ||
name: string; | ||
} | ||
|
||
@doc("Details of the Contact resource.") | ||
model ContactProperties is ResourceProperties { | ||
@doc("Full name of contact") | ||
@visibility("read", "write", "create") | ||
contactName: string; | ||
@doc("Telephone number of contact") | ||
@visibility("read", "write", "create") | ||
phoneNumber: string; | ||
@doc("Email address of contact") | ||
@visibility("read", "write", "create") | ||
email: string; | ||
@doc("Job title of contact") | ||
@visibility("read", "write", "create") | ||
role: string; | ||
} | ||
|
||
@armResourceOperations | ||
interface Contacts extends ResourceRead<Contact>, ResourceCreate<Contact>, ResourceDelete<Contact>, ResourceListByParent<Contact>, ResourceUpdateNoProperties<Contact> {} | ||
|
||
@doc("A CommunicationsGateway resource") | ||
model CommunicationsGateway is TrackedResource<CommunicationsGatewayProperties> { | ||
@pattern("^[a-zA-Z0-9-]{3,24}$") | ||
@key("communicationsGatewayName") | ||
@segment("communicationsGateways") | ||
@doc("Unique identifier for this deployment") | ||
@visibility("Read") | ||
@path | ||
name: string; | ||
} | ||
|
||
@doc("The status of the current CommunicationsGateway resource.") | ||
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 { | ||
@doc("Emergency calls are not handled different from other calls") | ||
Standard, | ||
@doc("Emergency calls are routed directly to the ESRP") | ||
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 | ||
} | ||
|
||
@doc("How this deployment connects back to the operator network") | ||
@knownValues(ConnectivityValues) | ||
model Connectivity is string {} | ||
enum ConnectivityValues { | ||
@doc("This deployment connects to the operator network using a Public IP address, e.g. when using MAPS") | ||
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 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.") | ||
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 ESRP from this region") | ||
@visibility("read", "write", "create") | ||
esrpAddresses?: string[]; | ||
} | ||
|
||
@doc("Available platform types.") | ||
@knownValues(CommunicationsPlatformValues) | ||
model CommunicationsPlatform is string {} | ||
enum CommunicationsPlatformValues { | ||
OperatorConnect, | ||
TeamsPhoneMobile | ||
} | ||
|
||
// Currently empty, with presence indicating that this feature should be enabled. | ||
// This is expected to include more properties in future, hence being an object. | ||
@doc("Details of API bridge functionality.") | ||
model ApiBridgeProperties {} | ||
|
||
@doc("Details of the CommunicationsGateway resource.") | ||
model CommunicationsGatewayProperties is ResourceProperties { | ||
@doc("The current status of the deployment.") | ||
@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") | ||
serviceLocations: ServiceRegionProperties[]; | ||
|
||
@doc("How to connect back to the operator network, e.g. MAPS") | ||
@visibility("read", "create") | ||
connectivity: Connectivity; | ||
|
||
@doc("Voice codecs to support") | ||
@visibility("read", "write", "create") | ||
codecs: TeamsCodecs[]; | ||
|
||
@doc("How to handle 911 calls") | ||
@visibility("read", "write", "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) | ||
platforms: CommunicationsPlatform[]; | ||
|
||
@doc("Details of API bridge functionality, if required") | ||
@visibility("read", "write", "create") | ||
apiBridge?: ApiBridgeProperties; | ||
} | ||
|
||
@armResourceOperations | ||
interface CommunicationsGateways extends ResourceRead<CommunicationsGateway>, ResourceCreate<CommunicationsGateway>, ResourceDelete<CommunicationsGateway>, ResourceListBySubscription<CommunicationsGateway>, ResourceListByParent<CommunicationsGateway>, ResourceUpdateNoProperties<CommunicationsGateway> {} |
118 changes: 118 additions & 0 deletions
118
...-manager/Microsoft.VoiceServices/cadl/examples/CommunicationsGateways_CreateOrUpdate.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
{ | ||
"operationId": "CommunicationsGateways_CreateOrUpdate", | ||
"title": "CreateCommunicationsGatewayResource", | ||
"parameters": { | ||
"subscriptionId": "00000000-0000-0000-0000-000000000000", | ||
"resourceGroupName": "testrg", | ||
"api-version": "2022-12-01-preview", | ||
"name": "myname", | ||
"communicationsGatewayName": "myname", | ||
"resource": { | ||
"location": "useast", | ||
"properties": { | ||
"serviceLocations": [ | ||
{ | ||
"name": "useast", | ||
"primaryRegionProperties": { | ||
"operatorAddresses": [ | ||
"198.51.100.1" | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "useast2", | ||
"primaryRegionProperties": { | ||
"operatorAddresses": [ | ||
"198.51.100.2" | ||
] | ||
} | ||
} | ||
], | ||
"connectivity": "PublicAddress", | ||
"codecs": [ | ||
"PCMA" | ||
], | ||
"e911Type": "Standard", | ||
"platforms": [ | ||
"OperatorConnect" | ||
] | ||
} | ||
} | ||
}, | ||
"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" | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "useast2", | ||
"primaryRegionProperties": { | ||
"operatorAddresses": [ | ||
"198.51.100.2" | ||
] | ||
} | ||
} | ||
], | ||
"status": "ChangePending", | ||
"connectivity": "PublicAddress", | ||
"codecs": [ | ||
"PCMA" | ||
], | ||
"e911Type": "Standard", | ||
"platforms": [ | ||
"OperatorConnect" | ||
] | ||
} | ||
} | ||
}, | ||
"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" | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "useast2", | ||
"primaryRegionProperties": { | ||
"operatorAddresses": [ | ||
"198.51.100.2" | ||
] | ||
} | ||
} | ||
], | ||
"connectivity": "PublicAddress", | ||
"codecs": [ | ||
"PCMA" | ||
], | ||
"e911Type": "Standard", | ||
"platforms": [ | ||
"OperatorConnect" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...resource-manager/Microsoft.VoiceServices/cadl/examples/CommunicationsGateways_Delete.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"operationId": "CommunicationsGateways_Delete", | ||
"title": "DeleteCommunicationsGatewayResource", | ||
"parameters": { | ||
"subscriptionId": "00000000-0000-0000-0000-000000000000", | ||
"resourceGroupName": "testrg", | ||
"api-version": "2022-12-01-preview", | ||
"communicationsGatewayName": "myname", | ||
"location": "useast" | ||
}, | ||
"responses": { | ||
"200": {}, | ||
"202": { | ||
"headers": { | ||
"azure-asyncoperation": "http://azure.async.operation/status" | ||
} | ||
}, | ||
"204": {} | ||
} | ||
} |
Oops, something went wrong.