Skip to content

[skip ci] Archive b42305f0966492a69e2540f0646f966e758fa91b #27744

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<PropertyGroup>
<PsModuleName>Communication</PsModuleName>
<PsRootModuleName>Communication</PsRootModuleName>
<PsModuleFolder>Communication.Autorest</PsModuleFolder>
</PropertyGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., build.proj))\src\Az.autorest.props" />
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., build.proj))\src\Az.Post.props" />

</Project>

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.Communication.private.dll'
FormatsToProcess = './Az.Communication.format.ps1xml'
FunctionsToExport = 'Get-AzCommunicationService', 'Get-AzCommunicationServiceKey', 'New-AzCommunicationService', 'New-AzCommunicationServiceKey', 'Remove-AzCommunicationService', 'Set-AzCommunicationServiceNotificationHub', 'Test-AzCommunicationServiceNameAvailability', 'Update-AzCommunicationService', '*'
AliasesToExport = '*'
FunctionsToExport = 'Get-AzCommunicationService', 'Get-AzCommunicationServiceKey', 'New-AzCommunicationService', 'New-AzCommunicationServiceKey', 'Remove-AzCommunicationService', 'Set-AzCommunicationServiceNotificationHub', 'Test-AzCommunicationServiceNameAvailability', 'Update-AzCommunicationService'
PrivateData = @{
PSData = @{
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Communication'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the ""License"");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// distributed under the License is distributed on an ""AS IS"" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------------
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
// is regenerated.

using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly: AssemblyTitle("Microsoft Azure Powershell - Communication")]
[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)]
[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)]
[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)]
[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - Communication")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.5.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("0.5.0")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]

[assembly: ComVisible(false)]
[assembly: CLSCompliant(false)]
[assembly: Guid("8533dc23-0eb6-4da7-a2be-ea32d5130da2")]
[assembly: AssemblyVersion("0.4.2")]
[assembly: AssemblyFileVersion("0.4.2")]
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
# is regenerated.
# ----------------------------------------------------------------------------------
param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
param([switch]$NotIsolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
$ErrorActionPreference = 'Stop'

if(-not $Isolated) {
if(-not $NotIsolated) {
Write-Host -ForegroundColor Green 'Creating isolated process...'
$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
& "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
& "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
return
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Get-AzCommunicationService -Name ContosoAcsResource34 -ResourceGroupName Contoso
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.ICommunicationIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20230601Preview.ICommunicationServiceResource
Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.ICommunicationServiceResource
.Notes
COMPLEX PARAMETER PROPERTIES

Expand All @@ -42,7 +42,7 @@ INPUTOBJECT <ICommunicationIdentity>: Identity Parameter
https://learn.microsoft.com/powershell/module/az.communication/get-azcommunicationservice
#>
function Get-AzCommunicationService {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20230601Preview.ICommunicationServiceResource])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.ICommunicationServiceResource])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
Expand Down Expand Up @@ -74,7 +74,6 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.ICommunicationIdentity]
# Identity Parameter
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},

[Parameter()]
Expand Down Expand Up @@ -133,6 +132,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName

$testPlayback = $false
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }

$context = Get-AzContext
if (-not $context -and -not $testPlayback) {
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
exit
}

if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
Expand All @@ -157,9 +165,7 @@ begin {
List = 'Az.Communication.private\Get-AzCommunicationService_List';
List1 = 'Az.Communication.private\Get-AzCommunicationService_List1';
}
if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
$testPlayback = $false
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
Expand All @@ -173,6 +179,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
if ($wrappedCmd -eq $null) {
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
}
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ Get the access keys of the CommunicationService resource.
Get-AzCommunicationServiceKey -CommunicationServiceName ContosoAcsResource1 -ResourceGroupName ContosoResourceProvider1

.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20230601Preview.ICommunicationServiceKeys
Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.ICommunicationServiceKeys
.Link
https://learn.microsoft.com/powershell/module/az.communication/get-azcommunicationservicekey
#>
function Get-AzCommunicationServiceKey {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20230601Preview.ICommunicationServiceKeys])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.ICommunicationServiceKeys])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
Expand Down Expand Up @@ -108,6 +108,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName

$testPlayback = $false
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }

$context = Get-AzContext
if (-not $context -and -not $testPlayback) {
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
exit
}

if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
Expand All @@ -129,9 +138,7 @@ begin {
$mapping = @{
List = 'Az.Communication.private\Get-AzCommunicationServiceKey_List';
}
if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
$testPlayback = $false
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
Expand All @@ -145,6 +152,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
if ($wrappedCmd -eq $null) {
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
}
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,25 @@

<#
.Synopsis
Create a new CommunicationService or update an existing CommunicationService.
create a new CommunicationService or create an existing CommunicationService.
.Description
Create a new CommunicationService or update an existing CommunicationService.
create a new CommunicationService or create an existing CommunicationService.
.Example
New-AzCommunicationService -ResourceGroupName ContosoResourceProvider1 -Name ContosoAcsResource1 -DataLocation UnitedStates -Location Global
.Example
$linkedDomains = @(
"/subscriptions/653983b8-683a-427c-8c27-9e9624ce9176/resourceGroups/tcsacstest/providers/Microsoft.Communication/emailServices/tcsacstestECSps/domains/AzureManagedDomain"
)

New-AzCommunicationService -ResourceGroupName ContosoResourceProvider -Name ContosoAcsResource2 -DataLocation UnitedStates -Location Global -LinkedDomain @linkedDomains
New-AzCommunicationService -ResourceGroupName ContosoResourceProvider -Name ContosoAcsResource2 -DataLocation UnitedStates -Location Global -LinkedDomain @linkedDomains

.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20230601Preview.ICommunicationServiceResource
Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.ICommunicationServiceResource
.Link
https://learn.microsoft.com/powershell/module/az.communication/new-azcommunicationservice
#>
function New-AzCommunicationService {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api20230601Preview.ICommunicationServiceResource])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.ICommunicationServiceResource])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
Expand All @@ -59,48 +59,58 @@ param(
# The value must be an UUID.
${SubscriptionId},

[Parameter(Mandatory)]
[Parameter(ParameterSetName='CreateExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Category('Body')]
[System.String]
# The geo-location where the resource lives
${Location},

[Parameter()]
[Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Category('Body')]
[System.String]
# The location where the communication service stores its data at rest.
${DataLocation},

[Parameter()]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Communication.Support.ManagedServiceIdentityType])]
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Support.ManagedServiceIdentityType]
# Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
${IdentityType},

[Parameter()]
[Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api50.IUserAssignedIdentities]))]
[System.Collections.Hashtable]
# The set of user assigned identities associated with the resource.
# The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
# The dictionary values can be empty objects ({}) in requests.
${IdentityUserAssignedIdentity},
[System.Management.Automation.SwitchParameter]
# Determines whether to enable a system-assigned identity for the resource.
${EnableSystemAssignedIdentity},

[Parameter()]
[Parameter(ParameterSetName='CreateExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Category('Body')]
[System.String[]]
# List of email Domain resource Ids.
${LinkedDomain},

[Parameter()]
[Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.Api40.ITrackedResourceTags]))]
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Communication.Models.ITrackedResourceTags]))]
[System.Collections.Hashtable]
# Resource tags.
${Tag},

[Parameter(ParameterSetName='CreateExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Category('Body')]
[System.String[]]
# The array of user assigned identities associated with the resource.
# The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.'
${UserAssignedIdentity},

[Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Category('Body')]
[System.String]
# Path of Json file supplied to the Create operation
${JsonFilePath},

[Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Communication.Category('Body')]
[System.String]
# Json string supplied to the Create operation
${JsonString},

[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
Expand Down Expand Up @@ -169,6 +179,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName

$testPlayback = $false
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }

$context = Get-AzContext
if (-not $context -and -not $testPlayback) {
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
exit
}

if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
Expand All @@ -189,10 +208,10 @@ begin {

$mapping = @{
CreateExpanded = 'Az.Communication.private\New-AzCommunicationService_CreateExpanded';
CreateViaJsonFilePath = 'Az.Communication.private\New-AzCommunicationService_CreateViaJsonFilePath';
CreateViaJsonString = 'Az.Communication.private\New-AzCommunicationService_CreateViaJsonString';
}
if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
$testPlayback = $false
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Communication.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
Expand All @@ -206,6 +225,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
if ($wrappedCmd -eq $null) {
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
}
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
Expand Down
Loading
Loading