Skip to content

Commit

Permalink
Add Microsoft.Communication resource manager version 2020-08-20 (#13024)
Browse files Browse the repository at this point in the history
* Add Microsoft.Communication resource manager version 2020-08-20

* Fix mistyped API version from 2020-80-20 to 2020-08-20

* Fix linter errors and bring in more GA changes

- Remove 3 instances of ARM violation R4009 by including systemData field
- Change resource update to take a CommunicationServiceResource instead
  of a TaggedResource
- Remove custom definition for OperationList and use the common-types
  version instead
- Validate resource names
  • Loading branch information
memontic-ms authored Mar 15, 2021
1 parent 086ecb2 commit fba158f
Show file tree
Hide file tree
Showing 18 changed files with 1,312 additions and 3 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"parameters": {
"subscriptionId": "12345",
"api-version": "2020-08-20",
"nameAvailabilityParameters": {
"type": "Microsoft.Communication/CommunicationServices",
"name": "MyCommunicationService"
}
},
"responses": {
"200": {
"body": {
"nameAvailable": true,
"reason": "NameAvailable",
"message": "Requested name is available for the requested type"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"parameters": {
"subscriptionId": "12345",
"api-version": "2020-08-20",
"nameAvailabilityParameters": {
"type": "Microsoft.Communication/CommunicationServices",
"name": "MyCommunicationService"
}
},
"responses": {
"200": {
"body": {
"nameAvailable": false,
"reason": "AlreadyExists",
"message": "Requested name is unavailable for the requested type"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"parameters": {
"subscriptionId": "12345",
"resourceGroupName": "MyResourceGroup",
"communicationServiceName": "MyCommunicationResource",
"api-version": "2020-08-20",
"parameters": {
"location": "Global",
"properties": {
"dataLocation": "United States"
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/12345/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource",
"name": "MyCommunicationResource",
"type": "Microsoft.Communication/CommunicationServices",
"location": "Global",
"properties": {
"dataLocation": "United States",
"provisioningState": "Succeeded",
"hostName": "mycommunicationresource.communications.azure.com"
}
}
},
"201": {
"headers": {
"Azure-AsyncOperation": "https://management.azure.com/providers/Microsoft.Communication/locations/westus/operationStatuses/ed5d502c-acaa-42ec-ad61-0d8488a9fd1d"
},
"body": {
"id": "/subscriptions/12345/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource",
"name": "MyCommunicationResource",
"type": "Microsoft.Communication/CommunicationServices",
"location": "Global",
"properties": {
"dataLocation": "United States",
"provisioningState": "Accepted"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"parameters": {
"subscriptionId": "12345",
"resourceGroupName": "MyResourceGroup",
"communicationServiceName": "MyCommunicationResource",
"api-version": "2020-08-20"
},
"responses": {
"200": {},
"202": {
"headers": {
"Location": "https://management.azure.com/providers/Microsoft.Communication/locations/westus/operationStatuses/ed5d502c-acaa-42ec-ad61-0d8488a9fd1d"
}
},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parameters": {
"subscriptionId": "12345",
"resourceGroupName": "MyResourceGroup",
"communicationServiceName": "MyCommunicationResource",
"api-version": "2020-08-20"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/12345/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource",
"name": "MyCommunicationResource",
"type": "Microsoft.Communication/CommunicationServices",
"location": "Global",
"properties": {
"dataLocation": "United States",
"provisioningState": "Running",
"hostName": "mycommunicationservice.comms.azure.net",
"version": "0.2.0"
}
}
},
"default": {
"body": {
"error": {
"code": "ResourceNotFound",
"message": "The requested resource was not found"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"parameters": {
"location": "westus2",
"operationId": "db5f291f-284d-46e9-9152-d5c83f7c14b8",
"api-version": "2020-08-20"
},
"responses": {
"200": {
"body": {
"id": "db5f291f-284d-46e9-9152-d5c83f7c14b8",
"status": "Succeeded",
"startTime": "2020-07-06T17:06:26.100Z",
"endTime": "2020-07-06T17:06:42.800Z",
"percentComplete": 100
}
},
"default": {
"body": {
"error": {
"code": "OperationNotFound",
"message": "The requested async operation was not found"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"parameters": {
"subscriptionId": "12345",
"resourceGroupName": "MyResourceGroup",
"communicationServiceName": "MyCommunicationResource",
"api-version": "2020-08-20",
"linkNotificationHubParameters": {
"resourceId": "/subscriptions/12345/resourceGroups/MyOtherResourceGroup/providers/Microsoft.NotificationHubs/namespaces/MyNamespace/notificationHubs/MyHub",
"connectionString": "Endpoint=sb://MyNamespace.servicebus.windows.net/;SharedAccessKey=abcd1234"
}
},
"responses": {
"200": {
"body": {
"resourceId": "/subscriptions/12345/resourceGroups/MyOtherResourceGroup/providers/Microsoft.NotificationHubs/namespaces/MyNamespace/notificationHubs/MyHub"
}
},
"default": {
"body": {
"error": {
"code": "WrongSubscription",
"message": "The notification hub must be in the same subscription as the communication service"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"parameters": {
"subscriptionId": "12345",
"resourceGroupName": "MyResourceGroup",
"api-version": "2020-08-20"
},
"responses": {
"200": {
"body": {
"value": [
{
"properties": {
"provisioningState": "Running",
"dataLocation": "United States",
"hostName": "mycommunicationservice.comms.azure.net",
"version": "0.2.0"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"parameters": {
"subscriptionId": "12345",
"api-version": "2020-08-20"
},
"responses": {
"200": {
"body": {
"value": [
{
"properties": {
"provisioningState": "Running",
"dataLocation": "United States",
"hostName": "mycommunicationservice.comms.azure.net",
"version": "0.2.0"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"parameters": {
"subscriptionId": "12345",
"resourceGroupName": "MyResourceGroup",
"communicationServiceName": "MyCommunicationResource",
"api-version": "2020-08-20"
},
"responses": {
"200": {
"body": {
"primaryKey": "<primaryKey>",
"secondaryKey": "<secondaryKey>"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"parameters": {
"subscriptionId": "12345",
"resourceGroupName": "MyResourceGroup",
"communicationServiceName": "MyCommunicationResource",
"api-version": "2020-08-20",
"parameters": {
"keyType": "Primary"
}
},
"responses": {
"200": {
"body": {
"primaryKey": "1234",
"primaryConnectionString": "endpoint=http://example.com;accesskey=1234"
}
},
"201": {
"body": {}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parameters": {
"subscriptionId": "12345",
"resourceGroupName": "MyResourceGroup",
"communicationServiceName": "MyCommunicationResource",
"api-version": "2020-08-20",
"parameters": {
"tags": {
"newTag": "newVal"
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/12345/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource",
"name": "MyCommunicationResource",
"type": "Microsoft.Communication/CommunicationServices",
"location": "Global",
"tags": {
"newTag": "newVal"
},
"properties": {
"provisioningState": "Succeeded",
"dataLocation": "United States",
"hostName": "mycommunicationresource.communications.azure.com",
"version": "0.2.0"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,24 @@ These settings apply only when `--azureresourceschema` is specified on the comma

``` yaml $(azureresourceschema) && $(multiapi)
batch:
- tag: schema-communication-2020-08-20
- tag: schema-communication-2020-08-20-preview

```

Please also specify `--azureresourceschema-folder=<path to the root directory of your azure-resource-manager-schemas clone>`.

### Tag: schema-communication-2020-08-20 and azureresourceschema

``` yaml $(tag) == 'schema-communication-2020-08-20' && $(azureresourceschema)
output-folder: $(azureresourceschema-folder)/schemas

# all the input files in this apiVersion
input-file:
- Microsoft.Communication/stable/2020-08-20/CommunicationService.json

```

### Tag: schema-communication-2020-08-20-preview and azureresourceschema

``` yaml $(tag) == 'schema-communication-2020-08-20-preview' && $(azureresourceschema)
Expand Down
10 changes: 10 additions & 0 deletions specification/communication/resource-manager/readme.go.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,19 @@ go:
``` yaml $(go) && $(multiapi)
batch:
- tag: package-2020-08-20
- tag: package-2020-08-20-preview
```
### Tag: package-2020-08-20 and go
These settings apply only when `--tag=package-2020-08-20 --go` is specified on the command line.
Please also specify `--go-sdk-folder=<path to the root directory of your azure-sdk-for-go clone>`.

``` yaml $(tag) == 'package-2020-08-20' && $(go)
output-folder: $(go-sdk-folder)/services/$(namespace)/mgmt/2020-08-20/$(namespace)
```

### Tag: package-2020-08-20-preview and go

These settings apply only when `--tag=package-2020-08-20-preview --go` is specified on the command line.
Expand Down
14 changes: 14 additions & 0 deletions specification/communication/resource-manager/readme.java.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,23 @@ output-folder: $(azure-libraries-for-java-folder)/azure-mgmt-communication
``` yaml $(java) && $(multiapi)
batch:
- tag: package-2020-08-20
- tag: package-2020-08-20-preview
```
### Tag: package-2020-08-20 and java
These settings apply only when `--tag=package-2020-08-20--java` is specified on the command line.
Please also specify `--azure-libraries-for-java=<path to the root directory of your azure-sdk-for-java clone>`.

``` yaml $(tag) == 'package-2020-08-20' && $(java) && $(multiapi)
java:
namespace: com.microsoft.azure.management.communication.v2020_08_20
output-folder: $(azure-libraries-for-java-folder)/sdk/communication/mgmt-v2020_08_20
regenerate-manager: true
generate-interface: true
```

### Tag: package-2020-08-20-preview and java

These settings apply only when `--tag=package-2020-08-20-preview --java` is specified on the command line.
Expand Down
11 changes: 10 additions & 1 deletion specification/communication/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,16 @@ These are the global settings for the Azure Communication Services API.
title: CommunicationServiceManagementClient
openapi-type: arm
openapi-subtype: rpaas
tag: package-2020-08-20-preview
tag: package-2020-08-20
```
### Tag: package-2020-08-20
These settings apply only when `--tag=package-2020-08-20` is specified on the command line.

```yaml $(tag) == 'package-2020-08-20'
input-file:
- Microsoft.Communication/stable/2020-08-20/CommunicationService.json
```

### Tag: package-2020-08-20-preview
Expand Down
Loading

0 comments on commit fba158f

Please sign in to comment.