Edit

Share via


New-AzDevCenterUserDevBoxSnapshot

Captures a manual snapshot of the Dev Box.\nUpon completion, a snapshotId will be generated.\nTo retrieve all snapshots and their corresponding IDs, use the list snapshots endpoint.

Syntax

Capture (Default)

New-AzDevCenterUserDevBoxSnapshot
    -Endpoint <String>
    -DevBoxName <String>
    -ProjectName <String>
    [-UserId <String>]
    [-DefaultProfile <PSObject>]
    [-AsJob]
    [-NoWait]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

CaptureViaIdentity

New-AzDevCenterUserDevBoxSnapshot
    -Endpoint <String>
    -InputObject <IDevCenterdataIdentity>
    [-DefaultProfile <PSObject>]
    [-AsJob]
    [-NoWait]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

CaptureByDevCenter

New-AzDevCenterUserDevBoxSnapshot
    -DevCenterName <String>
    -DevBoxName <String>
    -ProjectName <String>
    [-UserId <String>]
    [-DefaultProfile <PSObject>]
    [-AsJob]
    [-NoWait]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

CaptureViaIdentityByDevCenter

New-AzDevCenterUserDevBoxSnapshot
    -DevCenterName <String>
    -InputObject <IDevCenterdataIdentity>
    [-DefaultProfile <PSObject>]
    [-AsJob]
    [-NoWait]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Captures a manual snapshot of the Dev Box.\nUpon completion, a snapshotId will be generated.\nTo retrieve all snapshots and their corresponding IDs, use the list snapshots endpoint.

Examples

Example 1: Create a Dev Box snapshot by endpoint

New-AzDevCenterUserDevBoxSnapshot `
  -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" `
  -ProjectName "DevProject" `
  -UserId "786a823c-8037-48ab-89b8-8599901e67d0" `
  -DevBoxName "myDevBox"

This command creates a snapshot for the dev box "myDevBox" assigned to the specified user using the endpoint.

Example 2: Create a Dev Box snapshot by dev center

New-AzDevCenterUserDevBoxSnapshot `
  -DevCenterName "ContosoDevCenter" `
  -ProjectName "DevProject" `
  -UserId "me" `
  -DevBoxName "myDevBox"

This command creates a snapshot for the dev box "myDevBox" assigned to the current signed-in user using the dev center name.

Example 3: Create a Dev Box snapshot by endpoint and InputObject

$snapshotInput = @{
    DevBoxName = "myDevBox"
    UserId = "me"
    ProjectName = "DevProject"
}
New-AzDevCenterUserDevBoxSnapshot `
  -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" `
  -InputObject $snapshotInput

This command creates a snapshot for the dev box "myDevBox" using the endpoint and an identity object.

Example 4: Create a Dev Box snapshot by dev center and InputObject

$snapshotInput = @{
    DevBoxName = "myDevBox"
    UserId = "786a823c-8037-48ab-89b8-8599901e67d0"
    ProjectName = "DevProject"
}
New-AzDevCenterUserDevBoxSnapshot `
  -DevCenterName "ContosoDevCenter" `
  -InputObject $snapshotInput

This command creates a snapshot for the dev box "myDevBox" using the dev center name and an identity object.

Parameters

-AsJob

Run the command as a job

Parameter properties

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

-DefaultProfile

The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

Parameter properties

Type:PSObject
Default value:None
Supports wildcards:False
DontShow:False
Aliases: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

-DevBoxName

Display name for the Dev Box.

Parameter properties

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

Parameter sets

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

-DevCenterName

The DevCenter upon which to execute operations.

Parameter properties

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

Parameter sets

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

-Endpoint

The DevCenter-specific URI to operate on.

Parameter properties

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

Parameter sets

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

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

Parameter properties

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

Parameter sets

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

-NoWait

Run the command asynchronously

Parameter properties

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

-ProjectName

Name of the project.

Parameter properties

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

Parameter sets

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

-UserId

The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.

Parameter properties

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

Parameter sets

Capture
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CaptureByDevCenter
Position:Named
Mandatory:False
Value from pipeline:False
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

IDevCenterdataIdentity

Outputs

IOperationStatus