Editar

Compartilhar via


Add-AzServiceEndpointPolicyDefinition

Adds a service endpoint policy definition to a specified policy.

Syntax

Add-AzServiceEndpointPolicyDefinition
   -Name <String>
   -ServiceEndpointPolicy <PSServiceEndpointPolicy>
   [-Description <String>]
   [-ServiceResource <String[]>]
   [-Service <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Add-AzServiceEndpointPolicyDefinition cmdlet add a service endpoint policy definition to the policy.

Examples

Example 1: Updates a service endpoint policy definition in a service endpoint policy

New-AzServiceEndpointPolicyDefinition -Name "ServiceEndpointPolicyDefinition1" -Service "Microsoft.Storage" -ServiceResource "subscriptions/sub1" -Description "New Definition"

This command updated the service endpoint policy definition with name ServiceEndpointPolicyDefinition1, service Microsoft.Storage, service resources subscriptions/sub1 and description "New Definition" that belongs to the resource group named ResourceGroup01 and stores it in the $policydef variable.

Parameters

-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

-Description

The description of the definition

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

-Name

The name of the service endpoint policy definition

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

-Service

Name of the service

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

-ServiceEndpointPolicy

The ServiceEndpointPolicy

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

-ServiceResource

List of service resources

Type:String[]
Position:Named
Default value:None
Required:False
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

PSServiceEndpointPolicy

Outputs

PSServiceEndpointPolicy