Skip to content

Commit 510d1f7

Browse files
Migrate Communication from generation to main (#25617)
* Move Communication to main * Update ChangeLog.md --------- Co-authored-by: Yabo Hu <[email protected]>
1 parent 8ae4a70 commit 510d1f7

File tree

211 files changed

+8653
-2898
lines changed

Some content is hidden

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

211 files changed

+8653
-2898
lines changed

src/Communication/Communication.Autorest/Az.Communication.format.ps1xml

Lines changed: 280 additions & 74 deletions
Large diffs are not rendered by default.

src/Communication/Communication.Autorest/README.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ For information on how to develop for `Az.Communication`, see [how-to.md](how-to
2727
> see https://aka.ms/autorest
2828
2929
``` yaml
30-
commit: 23ff943dbe3b5ccdc63a6195daa0f30b17ed9d88
30+
commit: 663ea6835c33bca216b63f777227db6a459a06b3
3131
require:
3232
# readme.azure.noprofile.md is the common configuration file
3333
- $(this-folder)/../../readme.azure.noprofile.md
3434
input-file:
3535
# You need to specify your swagger files here.
36-
- $(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
3737

3838
# If the swagger has not been put in the repo, you may uncomment the following line and refer to it locally
3939
# - (this-folder)/relative-path-to-your-swagger
@@ -97,4 +97,25 @@ directive:
9797
variant: ^Check$|^CheckViaIdentity$|^CheckViaIdentityExpanded$
9898
subject: CommunicationServiceNameAvailability
9999
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+
}
100121
```

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
},
Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
11
### Example 1: List existing CommunicationServices for a Subscription
22

33
```powershell
4-
Get-AzCommunicationService -SubscriptionId 73fc3592-3cef-4300-5e19-8d18b65ce0e8
4+
Get-AzCommunicationService -SubscriptionId 632ec9eb-fad7-4cbd-993a-e72973ba2acc
55
```
66

77
```output
8-
Location Name Type AzureAsyncOperation
9-
-------- ---- ---- -------------------
10-
global ContosoResource1 Microsoft.Communication/communicationServices
11-
global ContosoResource4 Microsoft.Communication/communicationServices
12-
global ContosoResource3 Microsoft.Communication/communicationServices
13-
global ContosoResource5 Microsoft.Communication/communicationServices
8+
Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType
9+
-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ----------------------------
10+
Global ContosoAcsResource1 7/09/2024 4:41:40 AM [email protected] User 7/09/2024 4:41:40 AM [email protected] User
11+
Global ContosoAcsResource2 4/10/2024 2:41:40 AM [email protected] User 4/10/2024 2:41:40 AM [email protected] User
12+
Global ContosoAcsResource3 5/01/2024 1:41:40 AM [email protected] User 5/01/2024 1:41:40 AM [email protected] User
13+
Global ContosoAcsResource4 6/08/2024 5:41:40 AM [email protected] User 6/08/2024 5:41:40 AM [email protected] User
14+
Global ContosoAcsResource5 6/09/2024 4:41:40 AM [email protected] User 6/09/2024 4:41:40 AM [email protected] User
1415
```
1516

1617
Returns a list of all ACS resources under that subscription.
1718

1819
### Example 2: Get infomation on specified Azure Communication resource
1920

2021
```powershell
21-
Get-AzCommunicationService -Name ContosoAcsResource1 -ResourceGroupName ContosoResourceProvider1
22+
Get-AzCommunicationService -Name ContosoAcsResource34 -ResourceGroupName ContosoResourceProvider1
2223
```
2324

2425
```output
25-
Location Name Type AzureAsyncOperation
26-
-------- ---- ---- -------------------
27-
Global ContosoAcsResource1 Microsoft.Communication/communicationServices
26+
Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType
27+
-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ----------------------------
28+
Global ContosoAcsResource1 7/10/2024 4:41:40 AM [email protected] User 7/10/2024 9:02:15 AM [email protected] User
2829
```
2930

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

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

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,27 @@ New-AzCommunicationService -ResourceGroupName ContosoResourceProvider1 -Name Con
55
```
66

77
```output
8-
Location Name Type AzureAsyncOperation
9-
-------- ---- ---- -------------------
10-
Global ContosoAcsResource1 Microsoft.Communication/communicationServices
8+
Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType
9+
-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ----------------------------
10+
Global ContosoAcsResource1 7/10/2024 4:41:40 AM [email protected] User 7/10/2024 4:41:40 AM [email protected] User
11+
```
12+
13+
Creates a ACS resource using the specified parameters.
14+
15+
### Example 2: Create a ACS resource with Linked domain and managed identity
16+
17+
```powershell
18+
$linkedDomains = @(
19+
"/subscriptions/653983b8-683a-427c-8c27-9e9624ce9176/resourceGroups/tcsacstest/providers/Microsoft.Communication/emailServices/tcsacstestECSps/domains/AzureManagedDomain"
20+
)
21+
22+
New-AzCommunicationService -ResourceGroupName ContosoResourceProvider -Name ContosoAcsResource2 -DataLocation UnitedStates -Location Global -LinkedDomain @linkedDomains
23+
```
24+
25+
```output
26+
Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType
27+
-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ----------------------------
28+
Global ContosoAcsResource2 7/10/2024 5:41:40 AM [email protected] User 7/10/2024 5:41:40 AM [email protected] User
1129
```
1230

1331
Creates a ACS resource using the specified parameters.

src/Communication/Communication.Autorest/examples/Test-AzCommunicationServiceNameAvailability.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ Test-AzCommunicationServiceNameAvailability -Name ContosoAcsResource1
44
```
55

66
```output
7-
Message NameAvailable Reason
8-
------- ------------- ------
9-
Requested name is unavailable for the requested type False AlreadyExists
7+
Message NameAvailable Reason
8+
------- ------------- ------
9+
Resource name already exists False AlreadyExists
1010
```
1111

1212
Verified that the CommunicationService name is valid and is not already in use.
@@ -17,9 +17,9 @@ Test-AzCommunicationServiceNameAvailability -Name ContosoAcsResource2
1717
```
1818

1919
```output
20-
Message NameAvailable Reason
21-
------- ------------- ------
22-
Requested name is available for the requested type True NameAvailable
20+
Message NameAvailable Reason
21+
------- ------------- ------
22+
True
2323
```
2424

2525
Verified that the requested CommunicationService name already in use.
Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,31 @@
11
### Example 1: Update an existing ACS resource to have tags
22

33
```powershell
4-
Update-AzCommunicationService -Name ContosoAcsResource1 -ResourceGroupName ContosoResourceProvider1 -Tag @{ExampleKey1="ExampleValue1"}
4+
Update-AzCommunicationService -Name ContosoAcsResource2 -ResourceGroupName ContosoResourceProvider1 -Tag @{ExampleKey1="ExampleValue1"}
55
```
66

77
```output
8-
Location Name Type AzureAsyncOperation
9-
-------- ---- ---- -------------------
10-
Global ContosoAcsResource1 Microsoft.Communication/communicationServices
8+
Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType
9+
-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ----------------------------
10+
Global ContosoAcsResource2 7/10/2024 5:41:40 AM [email protected] User 7/16/2024 3:40:40 AM [email protected] User
1111
```
1212

1313
Attaches the given tags to the specified ACS resource.
14+
15+
### Example 2: Update an existing ACS resource to have tags and link the domain
16+
17+
```powershell
18+
$linkedDomains = @(
19+
"/subscriptions/653983b8-683a-427c-8c27-9e9624ce9176/resourceGroups/tcsacstest/providers/Microsoft.Communication/emailServices/tcsacstestECSps/domains/AzureManagedDomain"
20+
)
21+
22+
Update-AzCommunicationService -Name ContosoAcsResource1 -ResourceGroupName ContosoResourceProvider1 -Tag @{ExampleKey1="ExampleValue1"} -LinkedDomain @linkedDomains
23+
```
24+
25+
```output
26+
Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType
27+
-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ----------------------------
28+
Global ContosoAcsResource1 7/10/2024 5:41:40 AM [email protected] User 7/16/2024 3:40:40 AM [email protected] User
29+
```
30+
31+
Attaches the given tags and links the doamin to the specified ACS resource.

src/Communication/Communication.Autorest/exports/Get-AzCommunicationService.ps1

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ Get the CommunicationService and its properties.
2020
.Description
2121
Get the CommunicationService and its properties.
2222
.Example
23-
Get-AzCommunicationService -SubscriptionId 73fc3592-3cef-4300-5e19-8d18b65ce0e8
23+
Get-AzCommunicationService -SubscriptionId 632ec9eb-fad7-4cbd-993a-e72973ba2acc
2424
.Example
25-
Get-AzCommunicationService -Name ContosoAcsResource1 -ResourceGroupName ContosoResourceProvider1
25+
Get-AzCommunicationService -Name ContosoAcsResource34 -ResourceGroupName ContosoResourceProvider1
2626
2727
.Inputs
2828
Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.ICommunicationIdentity
2929
.Outputs
30-
Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20200820.ICommunicationServiceResource
30+
Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20230601Preview.ICommunicationServiceResource
3131
.Notes
3232
COMPLEX PARAMETER PROPERTIES
3333
@@ -37,12 +37,12 @@ INPUTOBJECT <ICommunicationIdentity>: Identity Parameter
3737
[CommunicationServiceName <String>]: The name of the CommunicationService resource.
3838
[Id <String>]: Resource identity path
3939
[ResourceGroupName <String>]: The name of the resource group. The name is case insensitive.
40-
[SubscriptionId <String>]: The ID of the target subscription.
40+
[SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID.
4141
.Link
4242
https://learn.microsoft.com/powershell/module/az.communication/get-azcommunicationservice
4343
#>
4444
function Get-AzCommunicationService {
45-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20200820.ICommunicationServiceResource])]
45+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20230601Preview.ICommunicationServiceResource])]
4646
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
4747
param(
4848
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -67,6 +67,7 @@ param(
6767
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
6868
[System.String[]]
6969
# The ID of the target subscription.
70+
# The value must be an UUID.
7071
${SubscriptionId},
7172

7273
[Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]

src/Communication/Communication.Autorest/exports/Get-AzCommunicationServiceKey.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ Get the access keys of the CommunicationService resource.
2323
Get-AzCommunicationServiceKey -CommunicationServiceName ContosoAcsResource1 -ResourceGroupName ContosoResourceProvider1
2424
2525
.Outputs
26-
Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20200820.ICommunicationServiceKeys
26+
Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20230601Preview.ICommunicationServiceKeys
2727
.Link
2828
https://learn.microsoft.com/powershell/module/az.communication/get-azcommunicationservicekey
2929
#>
3030
function Get-AzCommunicationServiceKey {
31-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20200820.ICommunicationServiceKeys])]
31+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20230601Preview.ICommunicationServiceKeys])]
3232
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
3333
param(
3434
[Parameter(Mandatory)]
@@ -49,6 +49,7 @@ param(
4949
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
5050
[System.String[]]
5151
# The ID of the target subscription.
52+
# The value must be an UUID.
5253
${SubscriptionId},
5354

5455
[Parameter()]

src/Communication/Communication.Autorest/exports/New-AzCommunicationService.ps1

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,20 @@ Create a new CommunicationService or update an existing CommunicationService.
2121
Create a new CommunicationService or update an existing CommunicationService.
2222
.Example
2323
New-AzCommunicationService -ResourceGroupName ContosoResourceProvider1 -Name ContosoAcsResource1 -DataLocation UnitedStates -Location Global
24+
.Example
25+
$linkedDomains = @(
26+
"/subscriptions/653983b8-683a-427c-8c27-9e9624ce9176/resourceGroups/tcsacstest/providers/Microsoft.Communication/emailServices/tcsacstestECSps/domains/AzureManagedDomain"
27+
)
28+
29+
New-AzCommunicationService -ResourceGroupName ContosoResourceProvider -Name ContosoAcsResource2 -DataLocation UnitedStates -Location Global -LinkedDomain @linkedDomains
2430
2531
.Outputs
26-
Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20200820.ICommunicationServiceResource
32+
Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20230601Preview.ICommunicationServiceResource
2733
.Link
2834
https://learn.microsoft.com/powershell/module/az.communication/new-azcommunicationservice
2935
#>
3036
function New-AzCommunicationService {
31-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20200820.ICommunicationServiceResource])]
37+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20230601Preview.ICommunicationServiceResource])]
3238
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
3339
param(
3440
[Parameter(Mandatory)]
@@ -50,25 +56,49 @@ param(
5056
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
5157
[System.String]
5258
# The ID of the target subscription.
59+
# The value must be an UUID.
5360
${SubscriptionId},
5461

62+
[Parameter(Mandatory)]
63+
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Category('Body')]
64+
[System.String]
65+
# The geo-location where the resource lives
66+
${Location},
67+
5568
[Parameter()]
5669
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Category('Body')]
5770
[System.String]
5871
# The location where the communication service stores its data at rest.
5972
${DataLocation},
6073

6174
[Parameter()]
75+
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Communication.Support.ManagedServiceIdentityType])]
6276
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Category('Body')]
63-
[System.String]
64-
# The Azure location where the CommunicationService is running.
65-
${Location},
77+
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Support.ManagedServiceIdentityType]
78+
# Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
79+
${IdentityType},
80+
81+
[Parameter()]
82+
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Category('Body')]
83+
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api50.IUserAssignedIdentities]))]
84+
[System.Collections.Hashtable]
85+
# The set of user assigned identities associated with the resource.
86+
# The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
87+
# The dictionary values can be empty objects ({}) in requests.
88+
${IdentityUserAssignedIdentity},
89+
90+
[Parameter()]
91+
[AllowEmptyCollection()]
92+
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Category('Body')]
93+
[System.String[]]
94+
# List of email Domain resource Ids.
95+
${LinkedDomain},
6696

6797
[Parameter()]
6898
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Category('Body')]
69-
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20200820.ITaggedResourceTags]))]
99+
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api40.ITrackedResourceTags]))]
70100
[System.Collections.Hashtable]
71-
# Tags of the service which is a list of key value pairs that describe the resource.
101+
# Resource tags.
72102
${Tag},
73103

74104
[Parameter()]

0 commit comments

Comments
 (0)