< Back

Set-AzureAclConfig

Wed Jan 30, 2019 5:53 pm

NAME Set-AzureAclConfig



SYNOPSIS

Modifies an ACL configuration object.





SYNTAX

Set-AzureAclConfig [-Action] <String> [-RemoteSubnet] <String> [[-Order] <Int32>] [[-Description] <String>] -AddRule -ACL <NetworkAclObject>

[-InformationAction <ActionPreference>] [-InformationVariable <String>] [<CommonParameters>]



Set-AzureAclConfig [-Action] <String> [-RuleId] <Int32> [-RemoteSubnet] <String> [[-Order] <Int32>] [[-Description] <String>] -ACL <NetworkAclObject>

[-InformationAction <ActionPreference>] [-InformationVariable <String>] -SetRule [<CommonParameters>]



Set-AzureAclConfig [-RuleId] <Int32> -ACL <NetworkAclObject> [-InformationAction <ActionPreference>] [-InformationVariable <String>] -RemoveRule

[<CommonParameters>]





DESCRIPTION

The Set-AzureAclConfig cmdlet modifies an access control list (ACL) configuration object from an existing Azure virtual machine configuration.





PARAMETERS

-AddRule [<SwitchParameter>]

Indicates that this cmdlet adds a rule to the ACL configuration.



Required? true

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Action <String>

Specifies the action for the rule that this cmdlet adds or modifies. Valid values are: Permit and Deny.



Required? true

Position? 0

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-RemoteSubnet <String>

Specifies the remote subnet for the rule that this cmdlet adds or modifies. Specifies an address in Classless Interdomain Routing (CIDR) format.



Required? true

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Order <Int32>

Specifies the processing order for the rule that this cmdlet adds or modifies.



Required? false

Position? 2

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Description <String>

Specifies a description for the rule that this cmdlet adds or modifies.



Required? false

Position? 3

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ACL <NetworkAclObject>

Specifies an ACL configuration object that this cmdlet modifies.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-InformationAction <ActionPreference>





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InformationVariable <String>





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-RemoveRule [<SwitchParameter>]

Indicates that this cmdlet removes a rule from the ACL configuration.



Required? true

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-RuleId <Int32>

Specifies the ID of the rule that this cmdlet removes or modifies for the ACL configuration.



Required? true

Position? 0

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-SetRule [<SwitchParameter>]

Indicates that this cmdlet modifies a rule in the ACL configuration.



Required? true

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES









-------------------------- Example 1: Add a rule to a new ACL configuration --------------------------



PS C:\\>$Acl = New-AzureAclConfig

PS C:\\> Set-AzureAclConfig -AddRule -ACL $Acl -Action Permit -RemoteSubnet "172.0.0.0/8" -Order 100 -Description "Permit ACL rule"



The first command creates an ACL configuration, and then stores it in the $Acl variable.

-------------------------- Example 2: Modify a rule in an ACL configuration --------------------------



PS C:\\>$Acl = Get-AzureVM -ServiceName "ContosoService" -Name "VirtualMachine07" | Get-AzureAclConfig -EndpointName "Web"

PS C:\\> Set-AzureAclConfig -SetRule -RuleId 0 -ACL $Acl -Order 102 -Description "Web endpoint rule"

PS C:\\> Get-AzureVM -ServiceName "ContosoService" -Name "VirtualMachine07" | Set-AzureEndpoint -ACL $Acl -Name "Web" | Update-AzureVM



The first command gets the virtual machine named VirtualMachine07 in the service named ContosoService by using the Get-AzureVM cmdlet. The command

passes that object to the Get-AzureAclConfig cmdlet by using the pipeline operator. That cmdlet gets the ACL configuration for the endpoint named Web.

The command stores that ACL configuration object in the $Acl variable.

-------------------------- Example 3: Remove a rule from an ACL configuration --------------------------



PS C:\\>$Acl = Get-AzureVM -ServiceName "ContosoService" -Name "VirtualMachine07" | Get-AzureAclConfig -EndpointName "Web"

PS C:\\> Set-AzureAclConfig -RemoveRule -ID 0 -ACL $Acl

PS C:\\> Get-AzureVM -ServiceName "ContosoService" -Name "VirtualMachine07" | Set-AzureEndpoint -ACL $Acl -Name "Web" | Update-AzureVM



The first command stores an ACL configuration object in the $Acl variable. This is the same as the previous example.



RELATED LINKS

Get-AzureAclConfig

Get-AzureVM

New-AzureAclConfig

Remove-AzureAclConfig

Set-AzureEndpoint

Update-AzureVM