編輯

共用方式為


New-AzSqlElasticJobPrivateEndpoint

Creates a new job private endpoint

Syntax

New-AzSqlElasticJobPrivateEndpoint
   [-ResourceGroupName] <String>
   [-ServerName] <String>
   [-AgentName] <String>
   [-Name] <String>
   -TargetServerAzureResourceId <String>
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzSqlElasticJobPrivateEndpoint
   [-ElasticJobAgentObject] <AzureSqlElasticJobAgentModel>
   [-Name] <String>
   -TargetServerAzureResourceId <String>
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzSqlElasticJobPrivateEndpoint
   [-ElasticJobAgentResourceId] <String>
   [-Name] <String>
   -TargetServerAzureResourceId <String>
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-AzSqlElasticJobPrivateEndpoint cmdlet creates a new job private endpoint

Examples

Example 1

$agent = Get-AzSqlElasticJobAgent -ResourceGroupName rg -ServerName elasticjobserver -Name agent
$agent | New-AzSqlElasticJobPrivateEndpoint -Name endpoint1 -TargetServerAzureResourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/rg1/providers/Microsoft.Sql/servers/server1"

PrivateEndpointName         : endpoint1
TargetServerAzureResourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/rg1/providers/Microsoft.Sql/servers/server1
PrivateEndpointId           : EJ_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx_endpoint1
ResourceGroupName           : rg
ServerName                  : elasticjobserver
AgentName                   : agent
ResourceId                  : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/rg/providers/Microsoft.Sql/servers/elasticjobserver/jobAgents/agent/privateEndpoints/endpoint1
Type                        : Microsoft.Sql/servers/jobAgents/privateEndpoints

Creates a new job private endpoint

Parameters

-AgentName

The agent name

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

-AsJob

Run cmdlet in the background

Type:SwitchParameter
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:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ElasticJobAgentObject

The agent object

Type:AzureSqlElasticJobAgentModel
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ElasticJobAgentResourceId

The agent resource id

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

-Name

The private endpoint name

Type:String
Aliases:PrivateEndpointName
Position:3
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The resource group name

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

-ServerName

The server name

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

-TargetServerAzureResourceId

The resource ID for the server the private endpoint will target.

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

Inputs

AzureSqlElasticJobAgentModel

String

Outputs

AzureSqlElasticJobPrivateEndpointModel