Skip to content

Latest commit

 

History

History
190 lines (144 loc) · 5.22 KB

Update-AzCognitiveServicesAccountNetworkRuleSet.md

File metadata and controls

190 lines (144 loc) · 5.22 KB
external help file Module Name online version schema
Microsoft.Azure.PowerShell.Cmdlets.CognitiveServices.dll-Help.xml
Az.CognitiveServices
2.0.0

Update-AzCognitiveServicesAccountNetworkRuleSet

SYNOPSIS

Update the NetworkRule property of a Cognitive Services account

SYNTAX

Update-AzCognitiveServicesAccountNetworkRuleSet [-ResourceGroupName] <String> [-Name] <String>
 [-DefaultAction <PSNetWorkRuleDefaultActionEnum>] [-IpRule <PSIpRule[]>]
 [-VirtualNetworkRule <PSVirtualNetworkRule[]>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
 [<CommonParameters>]

DESCRIPTION

The Update-AzCognitiveServicesAccountNetworkRuleSet cmdlet updates the NetworkRule property of a Cognitive Services account

EXAMPLES

Example 1: Update all properties of NetworkRule, input Rules with JSON

Update-AzCognitiveServicesAccountNetworkRuleSet -ResourceGroupName "myResourceGroup" -Name "myaccount" -DefaultAction Allow -IpRule (@{IpAddressOrRange="200.0.0.0/24"},@{IpAddressOrRange="28.2.0.0/16"}) `
-VirtualNetworkRule (@{VirtualNetworkResourceId="/subscriptions/s1/resourceGroups/g1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"},@{VirtualNetworkResourceId="/subscriptions/s1/resourceGroups/g1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/subnet2"})

This command update all properties of NetworkRule, input Rules with JSON.

Example 2: Update Bypass property of NetworkRule

Update-AzCognitiveServicesAccountNetworkRuleSet -ResourceGroupName "myResourceGroup" -Name "myaccount"

This command update Bypass property of NetworkRule (other properties won't change).

Example 3: Clean up rules of NetworkRule of a Cognitive Services account

Update-AzCognitiveServicesAccountNetworkRuleSet -ResourceGroupName "myResourceGroup" -Name "myaccount" -IpRule @() -VirtualNetworkRule @()

This command clean up rules of NetworkRule of a Cognitive Services account (other properties not change).

PARAMETERS

-DefaultAction

Cognitive Services Account NetworkRule DefaultAction. Default value Deny.

Type: Microsoft.Azure.Commands.Management.CognitiveServices.Models.PSNetWorkRuleDefaultActionEnum
Parameter Sets: (All)
Aliases:
Accepted values: Deny, Allow

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

-DefaultProfile

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

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Parameter Sets: (All)
Aliases: AzContext, AzureRmContext, AzureCredential

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

-IpRule

Cognitive Services Account NetworkRule IpRules.

Type: Microsoft.Azure.Commands.Management.CognitiveServices.Models.PSIpRule[]
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name

Cognitive Services Account Name.

Type: System.String
Parameter Sets: (All)
Aliases: CognitiveServicesAccountName, AccountName

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ResourceGroupName

Resource Group Name.

Type: System.String
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-VirtualNetworkRule

Cognitive Services Account NetworkRule VirtualNetworkRules.

Type: Microsoft.Azure.Commands.Management.CognitiveServices.Models.PSVirtualNetworkRule[]
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: cf

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

-WhatIf

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

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: wi

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

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.String

Microsoft.Azure.Commands.Management.CognitiveServices.Models.PSIpRule[]

Microsoft.Azure.Commands.Management.CognitiveServices.Models.PSVirtualNetworkRule[]

OUTPUTS

Microsoft.Azure.Commands.Management.CognitiveServices.Models.PSNetworkRuleSet

NOTES

RELATED LINKS