Skip to content

Commit 15c7974

Browse files
committed
Email Service data plane - updated test scenarios
1 parent 76c9945 commit 15c7974

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+855
-195
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: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ Returns the information on an ACS resource, if one matching provided parameters
7272
## PARAMETERS
7373

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

7778
```yaml
7879
Type: System.Management.Automation.PSObject
@@ -135,6 +136,7 @@ Accept wildcard characters: False
135136
136137
### -SubscriptionId
137138
The ID of the target subscription.
139+
The value must be an UUID.
138140
139141
```yaml
140142
Type: System.String[]
@@ -157,22 +159,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
157159
158160
## OUTPUTS
159161
160-
### Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20200820.ICommunicationServiceResource
162+
### Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20230601Preview.ICommunicationServiceResource
161163
162164
## NOTES
163165
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-
177166
## RELATED LINKS
178167

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: 58 additions & 10 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
@@ -69,7 +70,8 @@ Accept wildcard characters: False
6970
```
7071
7172
### -DefaultProfile
72-
The credentials, account, tenant, and subscription used for communication with Azure.
73+
The DefaultProfile parameter is not functional.
74+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
7375
7476
```yaml
7577
Type: System.Management.Automation.PSObject
@@ -83,15 +85,62 @@ Accept pipeline input: False
8385
Accept wildcard characters: False
8486
```
8587
88+
### -IdentityType
89+
Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
90+
91+
```yaml
92+
Type: Microsoft.Azure.PowerShell.Cmdlets.Communication.Support.ManagedServiceIdentityType
93+
Parameter Sets: (All)
94+
Aliases:
95+
96+
Required: False
97+
Position: Named
98+
Default value: None
99+
Accept pipeline input: False
100+
Accept wildcard characters: False
101+
```
102+
103+
### -IdentityUserAssignedIdentity
104+
The set of user assigned identities associated with the resource.
105+
The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
106+
The dictionary values can be empty objects ({}) in requests.
107+
108+
```yaml
109+
Type: System.Collections.Hashtable
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+
### -LinkedDomain
121+
List of email Domain resource Ids.
122+
123+
```yaml
124+
Type: System.String[]
125+
Parameter Sets: (All)
126+
Aliases:
127+
128+
Required: False
129+
Position: Named
130+
Default value: None
131+
Accept pipeline input: False
132+
Accept wildcard characters: False
133+
```
134+
86135
### -Location
87-
The Azure location where the CommunicationService is running.
136+
The geo-location where the resource lives
88137
89138
```yaml
90139
Type: System.String
91140
Parameter Sets: (All)
92141
Aliases:
93142

94-
Required: False
143+
Required: True
95144
Position: Named
96145
Default value: None
97146
Accept pipeline input: False
@@ -146,6 +195,7 @@ Accept wildcard characters: False
146195
147196
### -SubscriptionId
148197
The ID of the target subscription.
198+
The value must be an UUID.
149199
150200
```yaml
151201
Type: System.String
@@ -160,7 +210,7 @@ Accept wildcard characters: False
160210
```
161211
162212
### -Tag
163-
Tags of the service which is a list of key value pairs that describe the resource.
213+
Resource tags.
164214
165215
```yaml
166216
Type: System.Collections.Hashtable
@@ -212,11 +262,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
212262
213263
## OUTPUTS
214264
215-
### Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20200820.ICommunicationServiceResource
265+
### Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20230601Preview.ICommunicationServiceResource
216266
217267
## NOTES
218268
219-
ALIASES
220-
221269
## RELATED LINKS
222270

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

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ Accept wildcard characters: False
8989
```
9090
9191
### -DefaultProfile
92-
The credentials, account, tenant, and subscription used for communication with Azure.
92+
The DefaultProfile parameter is not functional.
93+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
9394
9495
```yaml
9596
Type: System.Management.Automation.PSObject
@@ -140,7 +141,7 @@ Parameters describes the request to regenerate access keys
140141
To construct, see NOTES section for PARAMETER properties and create a hash table.
141142
142143
```yaml
143-
Type: Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20200820.IRegenerateKeyParameters
144+
Type: Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20230601Preview.IRegenerateKeyParameters
144145
Parameter Sets: Regenerate, RegenerateViaIdentity
145146
Aliases:
146147

@@ -169,6 +170,7 @@ Accept wildcard characters: False
169170
170171
### -SubscriptionId
171172
The ID of the target subscription.
173+
The value must be an UUID.
172174
173175
```yaml
174176
Type: System.String
@@ -218,31 +220,15 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
218220
219221
## INPUTS
220222
221-
### Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20200820.IRegenerateKeyParameters
223+
### Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20230601Preview.IRegenerateKeyParameters
222224
223225
### Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.ICommunicationIdentity
224226
225227
## OUTPUTS
226228
227-
### Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20200820.ICommunicationServiceKeys
229+
### Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20230601Preview.ICommunicationServiceKeys
228230
229231
## NOTES
230232
231-
ALIASES
232-
233-
COMPLEX PARAMETER PROPERTIES
234-
235-
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.
236-
237-
238-
INPUTOBJECT <ICommunicationIdentity>: Identity Parameter
239-
- `[CommunicationServiceName <String>]`: The name of the CommunicationService resource.
240-
- `[Id <String>]`: Resource identity path
241-
- `[ResourceGroupName <String>]`: The name of the resource group. The name is case insensitive.
242-
- `[SubscriptionId <String>]`: The ID of the target subscription.
243-
244-
PARAMETER <IRegenerateKeyParameters>: Parameters describes the request to regenerate access keys
245-
- `[KeyType <KeyType?>]`: The keyType to regenerate. Must be either 'primary' or 'secondary'(case-insensitive).
246-
247233
## RELATED LINKS
248234

src/Communication/Communication.Autorest/docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Docs
2-
This directory contains the documentation of the cmdlets for the `Az.Communication` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overriden on regeneration*. To update documentation examples, please use the `..\examples` folder.
2+
This directory contains the documentation of the cmdlets for the `Az.Communication` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overridden on regeneration*. To update documentation examples, please use the `..\examples` folder.
33

44
## Info
55
- Modifiable: no

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

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ Accept wildcard characters: False
5454
```
5555
5656
### -DefaultProfile
57-
The credentials, account, tenant, and subscription used for communication with Azure.
57+
The DefaultProfile parameter is not functional.
58+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
5859
5960
```yaml
6061
Type: System.Management.Automation.PSObject
@@ -147,6 +148,7 @@ Accept wildcard characters: False
147148
148149
### -SubscriptionId
149150
The ID of the target subscription.
151+
The value must be an UUID.
150152
151153
```yaml
152154
Type: System.String
@@ -204,18 +206,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
204206
205207
## NOTES
206208
207-
ALIASES
208-
209-
COMPLEX PARAMETER PROPERTIES
210-
211-
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.
212-
213-
214-
INPUTOBJECT <ICommunicationIdentity>: Identity Parameter
215-
- `[CommunicationServiceName <String>]`: The name of the CommunicationService resource.
216-
- `[Id <String>]`: Resource identity path
217-
- `[ResourceGroupName <String>]`: The name of the resource group. The name is case insensitive.
218-
- `[SubscriptionId <String>]`: The ID of the target subscription.
219-
220209
## RELATED LINKS
221210

0 commit comments

Comments
 (0)