Edit

New-AzNetAppFilesBucket

Creates a new Bucket on an Azure NetApp Files (ANF) Volume.

Syntax

ByFieldsParameterSet (Default)

New-AzNetAppFilesBucket
    -ResourceGroupName <String>
    -AccountName <String>
    -PoolName <String>
    -VolumeName <String>
    -Name <String>
    [-Path <String>]
    [-Permissions <String>]
    [-NfsUserId <Int64>]
    [-NfsGroupId <Int64>]
    [-CifsUserName <String>]
    [-ServerFqdn <String>]
    [-ServerCertificateObject <String>]
    [-OnCertificateConflictAction <String>]
    [-CertificateKeyVaultUri <String>]
    [-CertificateName <String>]
    [-CredentialsKeyVaultUri <String>]
    [-CredentialsSecretName <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByParentObjectParameterSet

New-AzNetAppFilesBucket
    -Name <String>
    -VolumeObject <PSNetAppFilesVolume>
    [-Path <String>]
    [-Permissions <String>]
    [-NfsUserId <Int64>]
    [-NfsGroupId <Int64>]
    [-CifsUserName <String>]
    [-ServerFqdn <String>]
    [-ServerCertificateObject <String>]
    [-OnCertificateConflictAction <String>]
    [-CertificateKeyVaultUri <String>]
    [-CertificateName <String>]
    [-CredentialsKeyVaultUri <String>]
    [-CredentialsSecretName <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The New-AzNetAppFilesBucket cmdlet creates a Bucket on an ANF Volume. Buckets expose volume data to external services (for example, AI services) over an S3-compatible endpoint and require a certificate on the bucket server (provided inline via ServerCertificateObject or managed from Azure Key Vault via CertificateKeyVaultUri / CertificateName). The filesystem user identity accessing the volume data must be supplied either via NfsUserId / NfsGroupId (NFS) or CifsUserName (SMB).

Examples

Example 1: Create a Bucket with an inline self-signed certificate

$certObject = [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes((Get-Content -Raw ./bucket.pem)))

New-AzNetAppFilesBucket -ResourceGroupName "MyRG" -AccountName "MyAnfAccount" -PoolName "MyAnfPool" -VolumeName "MyAnfVolume" -Name "MyAnfBucket" `
    -Path "/" -Permissions "ReadOnly" `
    -NfsUserId 1000 -NfsGroupId 1000 `
    -ServerFqdn "bucket.contoso.local" `
    -ServerCertificateObject $certObject `
    -OnCertificateConflictAction "Update"

Creates a ReadOnly Bucket that exposes the volume root to an NFS user 1000:1000, using an inline PEM-encoded cert+key pair. Setting OnCertificateConflictAction to Update allows the bucket server to reuse/refresh an existing certificate without failing.

Example 2: Create a Bucket with AKV-managed certificate and credentials

New-AzNetAppFilesBucket -ResourceGroupName "MyRG" -AccountName "MyAnfAccount" -PoolName "MyAnfPool" -VolumeName "MyAnfVolume" -Name "MyAnfBucket" `
    -Path "/data" -Permissions "ReadWrite" -CifsUserName "anfuser" `
    -ServerFqdn "bucket.contoso.local" -OnCertificateConflictAction "Update" `
    -CertificateKeyVaultUri "https://anf-bucket-certs.vault.azure.net/" -CertificateName "anf-bucket-cert" `
    -CredentialsKeyVaultUri "https://anf-bucket-creds.vault.azure.net/" -CredentialsSecretName "anf-bucket-creds"

Creates a ReadWrite Bucket whose server certificate is fetched from Azure Key Vault and whose generated access/secret key pair will be stored back in Azure Key Vault.

Parameters

-AccountName

The name of the ANF account

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByFieldsParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CertificateKeyVaultUri

Base URI of the Azure Key Vault used to retrieve the bucket server certificate.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CertificateName

Name of the bucket server certificate stored in Azure Key Vault.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CifsUserName

CIFS username accessing the bucket data (mutually exclusive with NfsUserId/NfsGroupId).

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CredentialsKeyVaultUri

Base URI of the Azure Key Vault used to store the bucket credentials.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CredentialsSecretName

Name of the secret in Azure Key Vault holding the bucket credentials.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

The name of the ANF bucket

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:BucketName

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-NfsGroupId

NFS user GID accessing the bucket data.

Parameter properties

Type:

Nullable<T>[Int64]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-NfsUserId

NFS user UID accessing the bucket data (mutually exclusive with CifsUserName).

Parameter properties

Type:

Nullable<T>[Int64]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-OnCertificateConflictAction

Action when there is a certificate conflict. Either Update or Fail.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Path

The volume path mounted inside the bucket. Defaults to '/'.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Permissions

Access permissions for the bucket. Either ReadOnly or ReadWrite. Defaults to ReadOnly.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PoolName

The name of the ANF capacity pool

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByFieldsParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceGroupName

The resource group of the ANF account

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByFieldsParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ServerCertificateObject

Base64-encoded contents of the PEM file containing the bucket server certificate and private key. Mutually exclusive with the AKV certificate parameters.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ServerFqdn

Host part of the bucket URL, resolving to the bucket IP and allowed by the server certificate.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VolumeName

The name of the ANF volume

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByFieldsParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VolumeObject

The volume object containing the new bucket

Parameter properties

Type:PSNetAppFilesVolume
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByParentObjectParameterSet
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-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

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

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

PSNetAppFilesVolume

Outputs

PSNetAppFilesBucket