Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Update-AzStorageAccountNetworkRuleSet
- Module:
- Az.Storage Module
Update the NetworkRule property of a Storage account
Syntax
Default (Default)
Update-AzStorageAccountNetworkRuleSet
[-ResourceGroupName] <String>
[-Name] <String>
[-Bypass <PSNetWorkRuleBypassEnum>]
[-DefaultAction <PSNetWorkRuleDefaultActionEnum>]
[-IPRule <PSIpRule[]>]
[-VirtualNetworkRule <PSVirtualNetworkRule[]>]
[-ResourceAccessRule <PSResourceAccessRule[]>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Update-AzStorageAccountNetworkRuleSet cmdlet updates the NetworkRule property of a Storage account
Examples
Example 1: Update all properties of NetworkRule, input Rules with JSON
Update-AzStorageAccountNetworkRuleSet -ResourceGroupName "myResourceGroup" -Name "mystorageaccount" -Bypass Logging,Metrics -DefaultAction Allow -IpRule (@{IPAddressOrRange="10.0.0.0/7";Action="allow"},@{IPAddressOrRange="28.2.0.0/16";Action="allow"}) `
-VirtualNetworkRule (@{VirtualNetworkResourceId="/subscriptions/s1/resourceGroups/g1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1";Action="allow"},
@{VirtualNetworkResourceId="/subscriptions/s1/resourceGroups/g1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/subnet2";Action="allow"}) -ResourceAccessRule (@{ResourceId=$ResourceId1;TenantId=$tenantId1},@{ResourceId=$ResourceId2;TenantId=$tenantId1})
This command update all properties of NetworkRule, input Rules with JSON.
Example 2: Update Bypass property of NetworkRule
Update-AzStorageAccountNetworkRuleSet -ResourceGroupName "myResourceGroup" -Name "mystorageaccount" -Bypass AzureServices,Metrics
This command update Bypass property of NetworkRule (other properties won't change).
Example 3: Clean up rules of NetworkRule of a Storage account
Update-AzStorageAccountNetworkRuleSet -ResourceGroupName "myResourceGroup" -Name "mystorageaccount" -IpRule @() -VirtualNetworkRule @() -ResourceAccessRule @()
This command clean up rules of NetworkRule of a Storage account (other properties not change).
Parameters
-AsJob
Run cmdlet in the background
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Bypass
The Bypass value to update to the NetworkRule property of a Storage account. The allowed value are none or any combination of: • Logging • Metrics • Azureservices
Parameter properties
| Type: | PSNetWorkRuleBypassEnum |
| Default value: | None |
| Accepted values: | None, Logging, Metrics, AzureServices |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | cf |
Parameter sets
-DefaultAction
The DefaultAction value to update to the NetworkRule property of a Storage account. The allowed Options: • Allow • Deny
Parameter properties
| Type: | PSNetWorkRuleDefaultActionEnum |
| Default value: | None |
| Accepted values: | Allow, Deny |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
| Type: | IAzureContextContainer |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
-IPRule
The Array of IpRule objects to update to the NetworkRule Property of a Storage account.
Parameter properties
| Type: | PSIpRule[] |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Name
Specifies the name of the Storage account.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | StorageAccountName, AccountName |
Parameter sets
-ResourceAccessRule
Storage Account NetworkRule ResourceAccessRules.
Parameter properties
| Type: | |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ResourceGroupName
Specifies the name of the resource group contains the Storage account.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-VirtualNetworkRule
The Array of VirtualNetworkRule objects to update to the NetworkRule Property of a Storage account.
Parameter properties
| Type: | |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | wi |
Parameter sets
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
String
PSIpRule
PSVirtualNetworkRule
Outputs
PSNetworkRuleSet
Azure PowerShell
Feedback
Was this page helpful?
