Upravit

Sdílet prostřednictvím


New-AzNetAppFilesExportPolicyRuleObject

Creates export policy rule object.

Syntax

New-AzNetAppFilesExportPolicyRuleObject
   -RuleIndex <Int32>
   [-UnixReadOnly]
   [-UnixReadWrite]
   [-Kerberos5ReadOnly]
   [-Kerberos5ReadWrite]
   [-Kerberos5iReadOnly]
   [-Kerberos5iReadWrite]
   [-Kerberos5p]
   [-Kerberos5pReadWrite]
   [-Cifs]
   [-Nfsv3]
   [-Nfsv41]
   [-AllowedClient <String>]
   [-HasRootAccess]
   [-ChownMode <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

New-AzNetAppFilesExportPolicyRuleObject is a helper cmdlet that creates an export policy rule object that can be used with New-AzExportPolicyObject and New-AzNetAppFilesVolume.

Examples

Example 1

$exportPolicyRule = New-AzNetAppFilesExportPolicyRuleObject -RuleIndex 1 -AllowedClient '0.0.0.0/0' -UnixReadOnly -UnixReadWrite -Cifs -Nfsv3 
$exportPolicyRules = $($exportPolicyRule)
$newExportPolicy = New-AzNetAppFilesExportPolicyObject -Rule $exportPolicyRules
New-AzNetAppFilesVolume -ResourceGroupName "MyRG" -AccountName "MyAnfAccount" -PoolName "MyAnfPool" -Name "MyAnfVolume" -Location "westus2" -CreationToken "MyAnfVolume" -UsageThreshold 1099511627776 -ServiceLevel "Premium" -SubnetId "/subscriptions/subsId/resourceGroups/MyRG/providers/Microsoft.Network/virtualNetworks/MyVnetName/subnets/MySubNetName" -ExportPolicy $newExportPolicy

This example creates an ExportPolicyRule in variable $exportPolicyRule, sets it an export policy object $exportPolicyRules that is then used in the creation of an AFN volume "MyAnfVolume""

Parameters

-AllowedClient

Client ingress specification as comma separated string with IPv4 CIDRs, IPv4 host addresses and host names.

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

-ChownMode

Specifies who is authorized to change the ownership of a file. restricted - Only root user can change the ownership of the file. unrestricted - Non-root users can change ownership of files that they own.

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

-Cifs

Allows CIFS protocol.

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

-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

-HasRootAccess

Has root access to volume.

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

-Kerberos5iReadOnly

Kerberos5i Read only access.

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

-Kerberos5iReadWrite

Kerberos5i Read and write access.

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

-Kerberos5p

Kerberos5p Read only access.

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

-Kerberos5pReadWrite

Kerberos5p Read and write access.

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

-Kerberos5ReadOnly

Kerberos5 Read only access.

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

-Kerberos5ReadWrite

Kerberos5 Read and write access.

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

-Nfsv3

Allows NFSv3 protocol.

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

-Nfsv41

Allows NFSv41 protocol.

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

-RuleIndex

Order index.

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

-UnixReadOnly

Read only access.

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

-UnixReadWrite

Read and write access.

Type:SwitchParameter
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

None

Outputs

PSNetAppFilesExportPolicyRule