Editar

Compartir a través de


New-AzServiceLinkerForWebApp

Create or update linker resource in webapp.

Syntax

New-AzServiceLinkerForWebApp
   [-ResourceUri <String>]
   [-Name <String>]
   -AuthInfo <IAuthInfoBase>
   -TargetService <ITargetServiceBase>
   [-ClientType <ClientType>]
   [-ConfigurationInfoAction <ActionType>]
   [-ConfigurationInfoAdditionalConfiguration <Hashtable>]
   [-ConfigurationInfoCustomizedKey <Hashtable>]
   [-FirewallRuleAzureService <AllowType>]
   [-FirewallRuleCallerClientIP <AllowType>]
   [-FirewallRuleIPRange <String[]>]
   [-PublicNetworkSolutionAction <ActionType>]
   [-Scope <String>]
   [-SecretStoreKeyVaultId <String>]
   [-SecretStoreKeyVaultSecretName <String>]
   [-VNetSolutionType <VNetSolutionType>]
   [-DefaultProfile <PSObject>]
   -ResourceGroupName <String>
   -WebApp <String>
   [-SubscriptionId <String>]
   [-AsJob]
   [-NoWait]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Create or update linker resource in webapp.

Examples

Example 1: Create service linker between webapp and postgresql

$target=New-AzServiceLinkerAzureResourceObject -Id /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/servicelinker-test-group/providers/Microsoft.DBforPostgreSQL/servers/servicelinker-postgresql/databases/test

$authInfo=New-AzServiceLinkerSecretAuthInfoObject -Name testUser -SecretValue ***  

New-AzServiceLinkerForWebApp -TargetService $target -AuthInfo $auth -ClientType dotnet -LinkerName testLinker -WebApp servicelinker-app -ResourceGroupName servicelinker-test-group

Name
----
testLinker

Create service linker between webapp and postgresql

Parameters

-AsJob

Run the command as a job

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-AuthInfo

The authentication type. To construct, see NOTES section for AUTHINFO properties and create a hash table.

Type:IAuthInfoBase
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ClientType

The application client type

Type:ClientType
Position:Named
Default value:"none"
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ConfigurationInfoAction

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.

Type:ActionType
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ConfigurationInfoAdditionalConfiguration

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

Type:Hashtable
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ConfigurationInfoCustomizedKey

Optional. A dictionary of default key name and customized key name mapping. If not specified, default key name will be used for generate configurations

Type:Hashtable
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-FirewallRuleAzureService

Allow Azure services to access the target service if true.

Type:AllowType
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-FirewallRuleCallerClientIP

Allow caller client IP to access the target service if true. the property is used when connecting local application to target service.

Type:AllowType
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-FirewallRuleIPRange

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.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

The name Linker resource.

Type:String
Aliases:LinkerName
Position:Named
Default value:"connect_"+(-join ((65..90) + (97..122) | Get-Random -Count 5 | % {[char]$_}))
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-NoWait

Run the command asynchronously

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PublicNetworkSolutionAction

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.

Type:ActionType
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

[ResourceGroupCompleter] The resource group of the resource to be connected.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceUri

The fully qualified Azure Resource manager identifier of the resource to be connected.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Scope

connection scope in source service.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SecretStoreKeyVaultId

The key vault id to store secret

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SecretStoreKeyVaultSecretName

The key vault secret name to store secret, only valid when storing one secret

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionId

Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

Type:String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TargetService

The target service properties To construct, see NOTES section for TARGETSERVICE properties and create a hash table.

Type:ITargetServiceBase
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-VNetSolutionType

Type of VNet solution.

Type:VNetSolutionType
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WebApp

[ResourceNameCompleter("Microsoft.Web/sites", nameof(ResourceGroupName))] The Name of webapp of the resource to be connected.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

ILinkerResource