Edit

Share via


New-AzStorageActionTaskOperationObject

Create an in-memory object for StorageTaskOperation.

Syntax

Default (Default)

New-AzStorageActionTaskOperationObject
    -Name <String>
    [-OnFailure <String>]
    [-OnSuccess <String>]
    [-Parameter <IStorageTaskOperationParameters>]
    [<CommonParameters>]

Description

Create an in-memory object for StorageTaskOperation.

Examples

Example 1: Create a operation object

New-AzStorageActionTaskOperationObject -Name SetBlobTier -Parameter @{"tier"= "Hot"} -OnFailure break -OnSuccess continue | Format-List
Name      : SetBlobTier
OnFailure : break
OnSuccess : continue
Parameter : {
              "tier": "Hot"
            }

This command creates a operation object.

Parameters

-Name

The operation to be performed on the object.

Parameter properties

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

Parameter sets

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

-OnFailure

Action to be taken when the operation fails for a object.

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

-OnSuccess

Action to be taken when the operation is successful for a object.

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

-Parameter

Key-value parameters for the operation.

Parameter properties

Type:IStorageTaskOperationParameters
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.

Outputs

StorageTaskOperation