Skip to content

[Service Connector]: update to API version 2022-11-01-preview #20795

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
merged 12 commits into from
Feb 16, 2023
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
4 changes: 2 additions & 2 deletions src/ServiceLinker/Az.ServiceLinker.psd1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@{
GUID = '20a4a5d9-068c-43d8-b45a-7130dd33afe4'
RootModule = './Az.ServiceLinker.psm1'
ModuleVersion = '0.1.0'
ModuleVersion = '0.1.1'
CompatiblePSEditions = 'Core', 'Desktop'
Author = 'Microsoft Corporation'
CompanyName = 'Microsoft Corporation'
Expand All @@ -11,7 +11,7 @@
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.ServiceLinker.private.dll'
FormatsToProcess = './Az.ServiceLinker.format.ps1xml'
FunctionsToExport = 'Get-AzServiceLinkerConfigurationForContainerApp', 'Get-AzServiceLinkerConfigurationForSpringCloud', 'Get-AzServiceLinkerConfigurationForWebApp', 'Get-AzServiceLinkerForContainerApp', 'Get-AzServiceLinkerForSpringCloud', 'Get-AzServiceLinkerForWebApp', 'New-AzServiceLinkerAzureResourceObject', 'New-AzServiceLinkerConfluentBootstrapServerObject', 'New-AzServiceLinkerConfluentSchemaRegistryObject', 'New-AzServiceLinkerForContainerApp', 'New-AzServiceLinkerForSpringCloud', 'New-AzServiceLinkerForWebApp', 'New-AzServiceLinkerSecretAuthInfoObject', 'New-AzServiceLinkerServicePrincipalSecretAuthInfoObject', 'New-AzServiceLinkerSystemAssignedIdentityAuthInfoObject', 'New-AzServiceLinkerUserAssignedIdentityAuthInfoObject', 'Remove-AzServiceLinkerForContainerApp', 'Remove-AzServiceLinkerForSpringcloud', 'Remove-AzServiceLinkerForWebApp', 'Test-AzServiceLinkerForContainerApp', 'Test-AzServiceLinkerForSpringCloud', 'Test-AzServiceLinkerForWebApp', 'Update-AzServiceLinkerForContainerApp', 'Update-AzServiceLinkerForSpringCloud', 'Update-AzServiceLinkerForWebApp', '*'
FunctionsToExport = 'Get-AzServiceLinkerConfigurationForContainerApp', 'Get-AzServiceLinkerConfigurationForSpringCloud', 'Get-AzServiceLinkerConfigurationForWebApp', 'Get-AzServiceLinkerConfigurationName', 'Get-AzServiceLinkerForContainerApp', 'Get-AzServiceLinkerForSpringCloud', 'Get-AzServiceLinkerForWebApp', 'New-AzServiceLinkerAzureResourceObject', 'New-AzServiceLinkerConfluentBootstrapServerObject', 'New-AzServiceLinkerConfluentSchemaRegistryObject', 'New-AzServiceLinkerForContainerApp', 'New-AzServiceLinkerForSpringCloud', 'New-AzServiceLinkerForWebApp', 'New-AzServiceLinkerSecretAuthInfoObject', 'New-AzServiceLinkerServicePrincipalSecretAuthInfoObject', 'New-AzServiceLinkerSystemAssignedIdentityAuthInfoObject', 'New-AzServiceLinkerUserAssignedIdentityAuthInfoObject', 'Remove-AzServiceLinkerForContainerApp', 'Remove-AzServiceLinkerForSpringcloud', 'Remove-AzServiceLinkerForWebApp', 'Test-AzServiceLinkerForContainerApp', 'Test-AzServiceLinkerForSpringCloud', 'Test-AzServiceLinkerForWebApp', 'Update-AzServiceLinkerForContainerApp', 'Update-AzServiceLinkerForSpringCloud', 'Update-AzServiceLinkerForWebApp', '*'
AliasesToExport = '*'
PrivateData = @{
PSData = @{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ list source configurations for a linker in container app.
https://learn.microsoft.com/powershell/module/az.servicelinker/get-azservicelinkerconfigurationforcontainerapp
#>
function Get-AzServiceLinkerConfigurationForContainerApp {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.ISourceConfiguration])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20221101Preview.ISourceConfiguration])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ list source configurations for a linker in spring cloud.
https://learn.microsoft.com/powershell/module/az.servicelinker/get-azservicelinkerconfigurationforspringcloud
#>
function Get-AzServiceLinkerConfigurationForSpringCloud {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.ISourceConfiguration])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20221101Preview.ISourceConfiguration])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ list source configurations for a linker in webapp.
https://learn.microsoft.com/powershell/module/az.servicelinker/get-azservicelinkerconfigurationforwebapp
#>
function Get-AzServiceLinkerConfigurationForWebApp {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.ISourceConfiguration])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20221101Preview.ISourceConfiguration])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ INPUTOBJECT <IServiceLinkerIdentity>: Identity Parameter
https://learn.microsoft.com/powershell/module/az.servicelinker/get-azservicelinkerforcontainerapp
#>
function Get-AzServiceLinkerForContainerApp {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.ILinkerResource])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20221101Preview.ILinkerResource])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ INPUTOBJECT <IServiceLinkerIdentity>: Identity Parameter
https://learn.microsoft.com/powershell/module/az.servicelinker/get-azservicelinkerforspringcloud
#>
function Get-AzServiceLinkerForSpringCloud {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.ILinkerResource])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20221101Preview.ILinkerResource])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
Expand Down
2 changes: 1 addition & 1 deletion src/ServiceLinker/custom/Get-AzServiceLinkerForWebApp.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ INPUTOBJECT <IServiceLinkerIdentity>: Identity Parameter
https://learn.microsoft.com/powershell/module/az.servicelinker/get-azservicelinkerforwebapp
#>
function Get-AzServiceLinkerForWebApp {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.ILinkerResource])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20221101Preview.ILinkerResource])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ Create an in-memory object for AzureResource.
Create an in-memory object for AzureResource.

.Outputs
Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.AzureResource
Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20221101Preview.AzureResource
.Link
https://learn.microsoft.com/powershell/module/az.ServiceLinker/new-azservicelinkerazureresourceobject
#>
function New-AzServiceLinkerAzureResourceObject {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.AzureResource')]
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20221101Preview.AzureResource')]
[CmdletBinding(PositionalBinding=$false)]
Param(

[Parameter(Mandatory, HelpMessage="The Id of azure resource.")]
[string]
$Id,
# [Parameter(HelpMessage="The azure resource connection related properties.")]
# [Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.IAzureResourcePropertiesBase]
# [Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20221101Preview.IAzureResourcePropertiesBase]
# $ResourceProperty,
[Parameter(HelpMessage="True if connect via Kubernetes CSI Driver. Source must be AKS and target must be KeyVault.")]
[bool]
Expand All @@ -47,7 +47,7 @@ function New-AzServiceLinkerAzureResourceObject {
)

process {
$Object = [Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.AzureResource]::New()
$Object = [Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20221101Preview.AzureResource]::New()

if ($PSBoundParameters.ContainsKey('Id')) {
$Pattern = "/subscriptions/(?<subscriptionId>[^/]+)/resourceGroups/(?<resourceGroupName>[^/]+)/providers/(?<resourceProvider>[^/]+)(/(?<resourceType>[^/]+)/(?<resourceName>[^/]+))+"
Expand All @@ -57,7 +57,7 @@ function New-AzServiceLinkerAzureResourceObject {
$Object.Id = $Id
}
if ($PSBoundParameters.ContainsKey('ConnectAsKubernetesCsiDriver')) {
$ResourceProperty = [Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.AzureKeyVaultProperties]::New()
$ResourceProperty = [Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20221101Preview.AzureKeyVaultProperties]::New()
$ResourceProperty.ConnectAsKubernetesCsiDriver = $ConnectAsKubernetesCsiDriver
$Object.ResourceProperty = $ResourceProperty
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ Create an in-memory object for ConfluentBootstrapServer.
Create an in-memory object for ConfluentBootstrapServer.

.Outputs
Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.ConfluentBootstrapServer
Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20221101Preview.ConfluentBootstrapServer
.Link
https://learn.microsoft.com/powershell/module/az.ServiceLinker/new-azservicelinkerconfluentbootstrapserverobject
#>
function New-AzServiceLinkerConfluentBootstrapServerObject {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.ConfluentBootstrapServer')]
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20221101Preview.ConfluentBootstrapServer')]
[CmdletBinding(PositionalBinding=$false)]
Param(

Expand All @@ -41,7 +41,7 @@ function New-AzServiceLinkerConfluentBootstrapServerObject {
)

process {
$Object = [Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.ConfluentBootstrapServer]::New()
$Object = [Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20221101Preview.ConfluentBootstrapServer]::New()

if ($PSBoundParameters.ContainsKey('Endpoint')) {
if($Endpoint -notmatch ".*confluent.cloud:[0-9]*") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ Create an in-memory object for ConfluentSchemaRegistry.
Create an in-memory object for ConfluentSchemaRegistry.

.Outputs
Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.ConfluentSchemaRegistry
Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20221101Preview.ConfluentSchemaRegistry
.Link
https://learn.microsoft.com/powershell/module/az.ServiceLinker/new-azservicelinkerconfluentschemaregistryobject
#>
function New-AzServiceLinkerConfluentSchemaRegistryObject {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.ConfluentSchemaRegistry')]
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20221101Preview.ConfluentSchemaRegistry')]
[CmdletBinding(PositionalBinding=$false)]
Param(

Expand All @@ -41,7 +41,7 @@ function New-AzServiceLinkerConfluentSchemaRegistryObject {
)

process {
$Object = [Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.ConfluentSchemaRegistry]::New()
$Object = [Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20221101Preview.ConfluentSchemaRegistry]::New()

if ($PSBoundParameters.ContainsKey('Endpoint')) {
if($Endpoint -notmatch "https://.*\.confluent\.cloud"){
Expand Down
86 changes: 76 additions & 10 deletions src/ServiceLinker/custom/New-AzServiceLinkerForContainerApp.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Create or update linker resource in container app.
https://learn.microsoft.com/powershell/module/az.servicelinker/new-azservicelinkerforcontainerapp
#>
function New-AzServiceLinkerForContainerApp {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.ILinkerResource])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20221101Preview.ILinkerResource])]
[CmdletBinding(DefaultParameterSetName = 'CreateExpanded', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')]
param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Category('Path')]
Expand All @@ -41,7 +41,7 @@ function New-AzServiceLinkerForContainerApp {

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Category('Runtime')]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.DefaultInfo(Script = '(Get-AzContext).Subscription.Id')]
[System.String]
# Gets subscription ID which uniquely identify the Microsoft Azure subscription.
# The subscription ID forms part of the URI for every service call.
Expand All @@ -56,27 +56,87 @@ function New-AzServiceLinkerForContainerApp {
[Parameter()]
[Alias('LinkerName')]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.DefaultInfo(Script='"connect_"+(-join ((65..90) + (97..122) | Get-Random -Count 5 | % {[char]$_}))')]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.DefaultInfo(Script = '"connect_"+(-join ((65..90) + (97..122) | Get-Random -Count 5 | % {[char]$_}))')]
[System.String]
# The name Linker resource.
${Name},

[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.IAuthInfoBase]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20221101Preview.IAuthInfoBase]
# The authentication type.
# To construct, see NOTES section for AUTHINFO properties and create a hash table.
${AuthInfo},

[Parameter()]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Support.ClientType])]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.DefaultInfo(Script='"none"')]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.DefaultInfo(Script = '"none"')]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Support.ClientType]
# The application client type
${ClientType},

[Parameter(Mandatory)]
[Parameter()]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Support.ActionType])]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Support.ActionType]
# Optional, indicate whether to apply configurations on source application.
# If enable, generate configurations and applied to the source application.
# Default is enable.
# If optOut, no configuration change will be made on source.
${ConfigurationInfoAction},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Info(PossibleTypes = ([Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20221101Preview.IConfigurationInfoAdditionalConfigurations]))]
[System.Collections.Hashtable]
# A dictionary of additional configurations to be added.
# Service will auto generate a set of basic configurations and this property is to full fill more customized configurations
${ConfigurationInfoAdditionalConfiguration},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Info(PossibleTypes = ([Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20221101Preview.IConfigurationInfoCustomizedKeys]))]
[System.Collections.Hashtable]
# Optional.
# A dictionary of default key name and customized key name mapping.
# If not specified, default key name will be used for generate configurations
${ConfigurationInfoCustomizedKey},

[Parameter()]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Support.AllowType])]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Support.AllowType]
# Allow Azure services to access the target service if true.
${FirewallRuleAzureService},

[Parameter()]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Support.AllowType])]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Support.AllowType]
# Allow caller client IP to access the target service if true.
# the property is used when connecting local application to target service.
${FirewallRuleCallerClientIP},

[Parameter()]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Category('Body')]
[System.String[]]
# This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account.
${FirewallRuleIPRange},

[Parameter()]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Support.ActionType])]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Support.ActionType]
# Optional.
# Indicates public network solution.
# If enable, enable public network access of target service with best try.
# Default is enable.
# If optOut, opt out public network access configuration.
${PublicNetworkSolutionAction},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Category('Body')]
[System.String]
# connection scope in source service.
Expand All @@ -88,13 +148,19 @@ function New-AzServiceLinkerForContainerApp {
# The key vault id to store secret
${SecretStoreKeyVaultId},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Category('Body')]
[System.String]
# The key vault secret name to store secret, only valid when storing one secret
${SecretStoreKeyVaultSecretName},

[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.ITargetServiceBase]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20221101Preview.ITargetServiceBase]
# The target service properties
# To construct, see NOTES section for TARGETSERVICE properties and create a hash table.
${TargetService},

[Parameter()]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Support.VNetSolutionType])]
[Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Category('Body')]
Expand Down Expand Up @@ -175,4 +241,4 @@ function New-AzServiceLinkerForContainerApp {
$PSBoundParameters = Set-Header -PSBoundParameters $PSBoundParameters
Az.ServiceLinker.internal\New-AzServiceLinker @PSBoundParameters
}
}
}
Loading