Edit

Share via


New-AzStorageAccountManagementPolicyBlobIndexMatchObject

Creates a ManagementPolicy BlobIndexMatch object, which can be used in New-AzStorageAccountManagementPolicyFilter.

Syntax

Default (Default)

New-AzStorageAccountManagementPolicyBlobIndexMatchObject
    [-Name <String>]
    [-Value <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The New-AzStorageAccountManagementPolicyBlobIndexMatchObject cmdlet creates a ManagementPolicy BlobIndexMatch object, which can be used in New-AzStorageAccountManagementPolicyFilter.

Examples

Example 1: Creates 2 ManagementPolicy BlobIndexMatch object3, then add them to a management policy rule filter

$blobindexmatch1 = New-AzStorageAccountManagementPolicyBlobIndexMatchObject -Name "tag1" -Value "value1"
$blobindexmatch1

Name Op Value
---- -- -----
tag1 == value1

$blobindexmatch2 = New-AzStorageAccountManagementPolicyBlobIndexMatchObject -Name "tag2" -Value "value2"

New-AzStorageAccountManagementPolicyFilter -PrefixMatch prefix1,prefix2 -BlobType blockBlob `
        -BlobIndexMatch $blobindexmatch1,$blobindexmatch2

PrefixMatch        BlobTypes   BlobIndexMatch
-----------        ---------   --------------
{prefix1, prefix2} {blockBlob} {tag1, tag2}

This command creates 2 ManagementPolicy BlobIndexMatch objects, then add them to a management policy rule filter.

Parameters

-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

Gets or sets this is the filter tag name, it can have 1 - 128 characters

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

-Value

Gets or sets this is the filter tag value field used for tag based filtering, it can have 0 - 256 characters.

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

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

None

Outputs

PSTagFilter