Set-AzureAclConfig
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Set-AzureAclConfig
Sets an access control list (ACL) configuration.
Parameter Set: AddRule
Set-AzureAclConfig [-Action] <String> [-RemoteSubnet] <String> [[-Order] <Int32> ] [[-Description] <String> ] -ACL <NetworkAclObject> -AddRule [ <CommonParameters>]
Parameter Set: RemoveRule
Set-AzureAclConfig [-RuleId] <Int32> -ACL <NetworkAclObject> -RemoveRule [ <CommonParameters>]
Parameter Set: SetRule
Set-AzureAclConfig [-RuleId] <Int32> -ACL <NetworkAclObject> -SetRule [-Action <String> ] [-Description <String> ] [-Order <Int32> ] [-RemoteSubnet <String> ] [ <CommonParameters>]
This topic describes the cmdlet in the .6.19 version of the Windows Azure PowerShell module. To find out the version of the module you're using, from the Windows Azure PowerShell console, type (get-module azure).version.
This cmdlets sets the ACL configuration object for an existing virtual machine configuration.
-ACL<NetworkAclObject>
Specifies the ACL object that you want to modify.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
-Action<String>
Specifies whether the rule will permit or deny incoming network traffic from the specified remote subnet. The value must be either Permit or Deny.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-AddRule
Updates the ACL object by adding a rule.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Description<String>
Provides a description of the rule.
Aliases |
none |
Required? |
false |
Position? |
4 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Order<Int32>
Specifies the relative order in which this rule should be processed compared to the other rules applied to the ACL object. The lowest order takes precedence.
Aliases |
none |
Required? |
false |
Position? |
3 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-RemoteSubnet<String>
Specifies the remote subnet address to which this rule applies. The address must be a valid Classless Inter-Domain Routing (CIDR) address. For example, 10.0.0.0/8.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-RemoveRule
Updates the ACL object by removing a rule.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-RuleId<Int32>
Provides an ID number for the rule.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-SetRule
Updates the ACL object by modifying an existing ACL rule.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Example 1
This example uses two commands:
The first command creates a new ACL object and stores it in a variable named $acl1.
The second command updates the ACL object with a rule that permits incoming network traffic only from remote subnet 10.0.0.0/8.
PS C:\> $acl1 = New-AzureAclConfigC:\PS> Set-AzureAclConfig –AddRule –ACL $acl1 –Order 100 –Action permit –RemoteSubnet “10.0.0.0/8” –Description “Sharepoint ACL config”
Example 2
This example uses three commands:
The first command get an object for a virtual machine named MyVM, passes it through the pipeline to get the ACL configuration for one of the endpoints of the virtual machine, and stores this in a variable named $acl.
The second command updates the ACL object by modifying an existing rule with an ID, order, and description.
The third command updates the virtual machine.
PS C:\> $acl = Get-AzureVM -ServiceName "MyService" -Name "MyVM" | Get-AzureAclConfig -EndpointName "Web"C:\PS> Set-AzureAclConfig –SetRule -ID 0 -ACL $acl -Order 102 -Description "New Description"C:\PS> Get-AzureVM -ServiceName "MyService" -Name "MyVM" | Set-AzureEndpoint -ACL $acl -Name "Web" | Update-AzureVM
Example 3
This example uses three commands:
The first command get an object for a virtual machine named MyVM, passes it through the pipeline to get the ACL configuration for one of the endpoints of the virtual machine, and stores this in a variable named $acl.
The second command updates the ACL object by removing a rule.
The third command updates the virtual machine.
PS C:\> $acl = Get-AzureVM -ServiceName "MyService" -Name "MyVM" | Get-AzureAclConfig -EndpointName "Web"C:\PS> Set-AzureAclConfig –RemoveRule -ID 0 -ACL $aclC:\PS> Get-AzureVM -ServiceName "MyService" -Name "MyVM" | Set-AzureEndpoint -ACL $acl -Name "Web" | Update-AzureVM
PS C:\>