Skip to content

Commit d94a07e

Browse files
authored
Upgraded the Communication Service swagger version to 2023-06-01-preview (#25583)
1 parent e0a8594 commit d94a07e

32 files changed

+731
-488
lines changed

src/Communication/Communication.Autorest/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ internal
66
exports
77
tools
88
custom/*.psm1
9+
custom/autogen-model-cmdlets
910
test/*-TestResults.xml
1011
/*.ps1
1112
/*.ps1xml

src/Communication/Communication.Autorest/README.md

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
This directory contains the PowerShell module for the Communication service.
44

55
---
6-
## Status
7-
[![Az.Communication](https://img.shields.io/powershellgallery/v/Az.Communication.svg?style=flat-square&label=Az.Communication "Az.Communication")](https://www.powershellgallery.com/packages/Az.Communication/)
8-
96
## Info
107
- Modifiable: yes
118
- Generated: all
@@ -17,7 +14,7 @@ This directory contains the PowerShell module for the Communication service.
1714
This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension.
1815

1916
## Module Requirements
20-
- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.2.3 or greater
17+
- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.7.5 or greater
2118

2219
## Authentication
2320
AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent.
@@ -30,13 +27,13 @@ For information on how to develop for `Az.Communication`, see [how-to.md](how-to
3027
> see https://aka.ms/autorest
3128
3229
``` yaml
33-
commit: 23ff943dbe3b5ccdc63a6195daa0f30b17ed9d88
30+
commit: 663ea6835c33bca216b63f777227db6a459a06b3
3431
require:
3532
# readme.azure.noprofile.md is the common configuration file
3633
- $(this-folder)/../../readme.azure.noprofile.md
3734
input-file:
3835
# You need to specify your swagger files here.
39-
- $(repo)/specification/communication/resource-manager/Microsoft.Communication/stable/2020-08-20/CommunicationService.json
36+
- $(repo)/specification/communication/resource-manager/Microsoft.Communication/preview/2023-06-01-preview/CommunicationServices.json
4037

4138
# If the swagger has not been put in the repo, you may uncomment the following line and refer to it locally
4239
# - (this-folder)/relative-path-to-your-swagger
@@ -100,4 +97,25 @@ directive:
10097
variant: ^Check$|^CheckViaIdentity$|^CheckViaIdentityExpanded$
10198
subject: CommunicationServiceNameAvailability
10299
remove: true
100+
# Set a default value for Type parameter of Test-AzCommunicationServiceNameAvailability
101+
- from: types.json
102+
where: $.definitions.CheckNameAvailabilityRequest
103+
transform: >
104+
return {
105+
"description": "The check availability request body.",
106+
"type": "object",
107+
"properties": {
108+
"name": {
109+
"description": "The name of the resource for which availability needs to be checked.",
110+
"type": "string"
111+
},
112+
"type": {
113+
"description": "The resource type.",
114+
"type": "string"
115+
}
116+
},
117+
"required": [
118+
"name"
119+
]
120+
}
103121
```

src/Communication/Communication.Autorest/UX/Microsoft.Communication/communicationServices.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "communicationServices",
3-
"apiVersion": "2020-08-20",
3+
"apiVersion": "2023-06-01-preview",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.communication"
66
},

src/Communication/Communication.Autorest/custom/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ For `Az.Communication` to use custom cmdlets, it does this two different ways. W
1212

1313
For C# cmdlets, they are compiled with the rest of the generated low-level cmdlets into the `./bin/Az.Communication.private.dll`. The names of the cmdlets (methods) and files must follow the `[cmdletName]_[variantName]` syntax used for generated cmdlets. The `variantName` is used as the `ParameterSetName`, so use something appropriate that doesn't clash with already created variant or parameter set names. You cannot use the `ParameterSetName` property in the `Parameter` attribute on C# cmdlets. Each cmdlet must be separated into variants using the same pattern as seen in the `generated/cmdlets` folder.
1414

15-
For script cmdlets, these are loaded via the `Az.Communication.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundemental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build.
15+
For script cmdlets, these are loaded via the `Az.Communication.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundamental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build.
1616

1717
## Purpose
1818
This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `..\exports` folder.
@@ -32,10 +32,10 @@ These provide functionality to our HTTP pipeline and other useful features. In s
3232
### Attributes
3333
For processing the cmdlets, we've created some additional attributes:
3434
- `Microsoft.Azure.PowerShell.Cmdlets.Communication.DescriptionAttribute`
35-
- Used in C# cmdlets to provide a high-level description of the cmdlet. This is propegated to reference documentation via [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts.
35+
- Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts.
3636
- `Microsoft.Azure.PowerShell.Cmdlets.Communication.DoNotExportAttribute`
3737
- Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.Communication`.
3838
- `Microsoft.Azure.PowerShell.Cmdlets.Communication.InternalExportAttribute`
39-
- Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.Communication`. For more information, see [readme.md](..\internal/readme.md) in the `..\internal` folder.
39+
- Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.Communication`. For more information, see [README.md](..\internal/README.md) in the `..\internal` folder.
4040
- `Microsoft.Azure.PowerShell.Cmdlets.Communication.ProfileAttribute`
4141
- Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules.

src/Communication/Communication.Autorest/docs/Get-AzCommunicationService.md

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -42,37 +42,39 @@ Get the CommunicationService and its properties.
4242

4343
### Example 1: List existing CommunicationServices for a Subscription
4444
```powershell
45-
Get-AzCommunicationService -SubscriptionId 73fc3592-3cef-4300-5e19-8d18b65ce0e8
45+
Get-AzCommunicationService -SubscriptionId 632ec9eb-fad7-4cbd-993a-e72973ba2acc
4646
```
4747

4848
```output
49-
Location Name Type AzureAsyncOperation
50-
-------- ---- ---- -------------------
51-
global ContosoResource1 Microsoft.Communication/communicationServices
52-
global ContosoResource4 Microsoft.Communication/communicationServices
53-
global ContosoResource3 Microsoft.Communication/communicationServices
54-
global ContosoResource5 Microsoft.Communication/communicationServices
49+
Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType
50+
-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ----------------------------
51+
Global ContosoAcsResource1 7/09/2024 4:41:40 AM contosouser@microsoft.com User 7/09/2024 4:41:40 AM contosouser@microsoft.com User
52+
Global ContosoAcsResource2 4/10/2024 2:41:40 AM contosouser2@microsoft.com User 4/10/2024 2:41:40 AM contosouser2@microsoft.com User
53+
Global ContosoAcsResource3 5/01/2024 1:41:40 AM contosouser3@microsoft.com User 5/01/2024 1:41:40 AM contosouser3@microsoft.com User
54+
Global ContosoAcsResource4 6/08/2024 5:41:40 AM contosouser4@microsoft.com User 6/08/2024 5:41:40 AM contosouser4@microsoft.com User
55+
Global ContosoAcsResource5 6/09/2024 4:41:40 AM contosouser5@microsoft.com User 6/09/2024 4:41:40 AM contosouser5@microsoft.com User
5556
```
5657

5758
Returns a list of all ACS resources under that subscription.
5859

5960
### Example 2: Get infomation on specified Azure Communication resource
6061
```powershell
61-
Get-AzCommunicationService -Name ContosoAcsResource1 -ResourceGroupName ContosoResourceProvider1
62+
Get-AzCommunicationService -Name ContosoAcsResource34 -ResourceGroupName ContosoResourceProvider1
6263
```
6364

6465
```output
65-
Location Name Type AzureAsyncOperation
66-
-------- ---- ---- -------------------
67-
Global ContosoAcsResource1 Microsoft.Communication/communicationServices
66+
Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType
67+
-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ----------------------------
68+
Global ContosoAcsResource1 7/10/2024 4:41:40 AM contosouser@microsoft.com User 7/10/2024 9:02:15 AM contosouser@microsoft.com User
6869
```
6970

7071
Returns the information on an ACS resource, if one matching provided parameters is found.
7172

7273
## PARAMETERS
7374

7475
### -DefaultProfile
75-
The credentials, account, tenant, and subscription used for communication with Azure.
76+
The DefaultProfile parameter is not functional.
77+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
7678

7779
```yaml
7880
Type: System.Management.Automation.PSObject
@@ -135,6 +137,7 @@ Accept wildcard characters: False
135137
136138
### -SubscriptionId
137139
The ID of the target subscription.
140+
The value must be an UUID.
138141
139142
```yaml
140143
Type: System.String[]
@@ -157,22 +160,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
157160
158161
## OUTPUTS
159162
160-
### Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20200820.ICommunicationServiceResource
163+
### Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20230601Preview.ICommunicationServiceResource
161164
162165
## NOTES
163166
164-
ALIASES
165-
166-
COMPLEX PARAMETER PROPERTIES
167-
168-
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
169-
170-
171-
INPUTOBJECT <ICommunicationIdentity>: Identity Parameter
172-
- `[CommunicationServiceName <String>]`: The name of the CommunicationService resource.
173-
- `[Id <String>]`: Resource identity path
174-
- `[ResourceGroupName <String>]`: The name of the resource group. The name is case insensitive.
175-
- `[SubscriptionId <String>]`: The ID of the target subscription.
176-
177167
## RELATED LINKS
178168

src/Communication/Communication.Autorest/docs/Get-AzCommunicationServiceKey.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ Accept wildcard characters: False
5353
```
5454
5555
### -DefaultProfile
56-
The credentials, account, tenant, and subscription used for communication with Azure.
56+
The DefaultProfile parameter is not functional.
57+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
5758
5859
```yaml
5960
Type: System.Management.Automation.PSObject
@@ -85,6 +86,7 @@ Accept wildcard characters: False
8586
8687
### -SubscriptionId
8788
The ID of the target subscription.
89+
The value must be an UUID.
8890
8991
```yaml
9092
Type: System.String[]
@@ -136,11 +138,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
136138
137139
## OUTPUTS
138140
139-
### Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20200820.ICommunicationServiceKeys
141+
### Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20230601Preview.ICommunicationServiceKeys
140142
141143
## NOTES
142144
143-
ALIASES
144-
145145
## RELATED LINKS
146146

src/Communication/Communication.Autorest/docs/New-AzCommunicationService.md

Lines changed: 78 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ Create a new CommunicationService or update an existing CommunicationService.
1313
## SYNTAX
1414

1515
```
16-
New-AzCommunicationService -Name <String> -ResourceGroupName <String> [-SubscriptionId <String>]
17-
[-DataLocation <String>] [-Location <String>] [-Tag <Hashtable>] [-DefaultProfile <PSObject>] [-AsJob]
18-
[-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
16+
New-AzCommunicationService -Name <String> -ResourceGroupName <String> -Location <String>
17+
[-SubscriptionId <String>] [-DataLocation <String>] [-IdentityType <ManagedServiceIdentityType>]
18+
[-IdentityUserAssignedIdentity <Hashtable>] [-LinkedDomain <String[]>] [-Tag <Hashtable>]
19+
[-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
1920
```
2021

2122
## DESCRIPTION
@@ -29,9 +30,26 @@ New-AzCommunicationService -ResourceGroupName ContosoResourceProvider1 -Name Con
2930
```
3031

3132
```output
32-
Location Name Type AzureAsyncOperation
33-
-------- ---- ---- -------------------
34-
Global ContosoAcsResource1 Microsoft.Communication/communicationServices
33+
Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType
34+
-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ----------------------------
35+
Global ContosoAcsResource1 7/10/2024 4:41:40 AM contosouser@microsoft.com User 7/10/2024 4:41:40 AM contosouser@microsoft.com User
36+
```
37+
38+
Creates a ACS resource using the specified parameters.
39+
40+
### Example 2: Create a ACS resource with Linked domain and managed identity
41+
```powershell
42+
$linkedDomains = @(
43+
"/subscriptions/653983b8-683a-427c-8c27-9e9624ce9176/resourceGroups/tcsacstest/providers/Microsoft.Communication/emailServices/tcsacstestECSps/domains/AzureManagedDomain"
44+
)
45+
46+
New-AzCommunicationService -ResourceGroupName ContosoResourceProvider -Name ContosoAcsResource2 -DataLocation UnitedStates -Location Global -LinkedDomain @linkedDomains
47+
```
48+
49+
```output
50+
Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType
51+
-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ----------------------------
52+
Global ContosoAcsResource2 7/10/2024 5:41:40 AM contosouser@microsoft.com User 7/10/2024 5:41:40 AM contosouser@microsoft.com User
3553
```
3654

3755
Creates a ACS resource using the specified parameters.
@@ -69,7 +87,8 @@ Accept wildcard characters: False
6987
```
7088
7189
### -DefaultProfile
72-
The credentials, account, tenant, and subscription used for communication with Azure.
90+
The DefaultProfile parameter is not functional.
91+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
7392
7493
```yaml
7594
Type: System.Management.Automation.PSObject
@@ -83,15 +102,62 @@ Accept pipeline input: False
83102
Accept wildcard characters: False
84103
```
85104
105+
### -IdentityType
106+
Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
107+
108+
```yaml
109+
Type: Microsoft.Azure.PowerShell.Cmdlets.Communication.Support.ManagedServiceIdentityType
110+
Parameter Sets: (All)
111+
Aliases:
112+
113+
Required: False
114+
Position: Named
115+
Default value: None
116+
Accept pipeline input: False
117+
Accept wildcard characters: False
118+
```
119+
120+
### -IdentityUserAssignedIdentity
121+
The set of user assigned identities associated with the resource.
122+
The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
123+
The dictionary values can be empty objects ({}) in requests.
124+
125+
```yaml
126+
Type: System.Collections.Hashtable
127+
Parameter Sets: (All)
128+
Aliases:
129+
130+
Required: False
131+
Position: Named
132+
Default value: None
133+
Accept pipeline input: False
134+
Accept wildcard characters: False
135+
```
136+
137+
### -LinkedDomain
138+
List of email Domain resource Ids.
139+
140+
```yaml
141+
Type: System.String[]
142+
Parameter Sets: (All)
143+
Aliases:
144+
145+
Required: False
146+
Position: Named
147+
Default value: None
148+
Accept pipeline input: False
149+
Accept wildcard characters: False
150+
```
151+
86152
### -Location
87-
The Azure location where the CommunicationService is running.
153+
The geo-location where the resource lives
88154
89155
```yaml
90156
Type: System.String
91157
Parameter Sets: (All)
92158
Aliases:
93159

94-
Required: False
160+
Required: True
95161
Position: Named
96162
Default value: None
97163
Accept pipeline input: False
@@ -146,6 +212,7 @@ Accept wildcard characters: False
146212
147213
### -SubscriptionId
148214
The ID of the target subscription.
215+
The value must be an UUID.
149216
150217
```yaml
151218
Type: System.String
@@ -160,7 +227,7 @@ Accept wildcard characters: False
160227
```
161228
162229
### -Tag
163-
Tags of the service which is a list of key value pairs that describe the resource.
230+
Resource tags.
164231
165232
```yaml
166233
Type: System.Collections.Hashtable
@@ -212,11 +279,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
212279
213280
## OUTPUTS
214281
215-
### Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20200820.ICommunicationServiceResource
282+
### Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20230601Preview.ICommunicationServiceResource
216283
217284
## NOTES
218285
219-
ALIASES
220-
221286
## RELATED LINKS
222287

0 commit comments

Comments
 (0)