SnapshotInner Class

public final class SnapshotInner
extends Resource

Snapshot resource.

Constructor Summary

Constructor Description
SnapshotInner()

Creates an instance of SnapshotInner class.

Method Summary

Modifier and Type Method and Description
Float completionPercent()

Get the completionPercent property: Percentage complete for the background copy when a resource is created via the CopyStart operation.

CopyCompletionError copyCompletionError()

Get the copyCompletionError property: Indicates the error details if the background copy of a resource created via the CopyStart operation fails.

CreationData creationData()

Get the creationData property: Disk source information.

DataAccessAuthMode dataAccessAuthMode()

Get the dataAccessAuthMode property: Additional authentication requirements when exporting or uploading to a disk or snapshot.

String diskAccessId()

Get the diskAccessId property: ARM id of the DiskAccess resource for using private endpoints on disks.

Long diskSizeBytes()

Get the diskSizeBytes property: The size of the disk in bytes.

Integer diskSizeGB()

Get the diskSizeGB property: If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create.

DiskState diskState()

Get the diskState property: The state of the snapshot.

Encryption encryption()

Get the encryption property: Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.

EncryptionSettingsCollection encryptionSettingsCollection()

Get the encryptionSettingsCollection property: Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.

ExtendedLocation extendedLocation()

Get the extendedLocation property: The extended location where the snapshot will be created.

static SnapshotInner fromJson(JsonReader jsonReader)

Reads an instance of SnapshotInner from the JsonReader.

HyperVGeneration hyperVGeneration()

Get the hyperVGeneration property: The hypervisor generation of the Virtual Machine.

String id()

Get the id property: Fully qualified resource Id for the resource.

Boolean incremental()

Get the incremental property: Whether a snapshot is incremental.

String incrementalSnapshotFamilyId()

Get the incrementalSnapshotFamilyId property: Incremental snapshots for a disk share an incremental snapshot family id.

String managedBy()

Get the managedBy property: Unused.

String name()

Get the name property: The name of the resource.

NetworkAccessPolicy networkAccessPolicy()

Get the networkAccessPolicy property: Policy for accessing the disk via network.

OperatingSystemTypes osType()

Get the osType property: The Operating System type.

String provisioningState()

Get the provisioningState property: The disk provisioning state.

PublicNetworkAccess publicNetworkAccess()

Get the publicNetworkAccess property: Policy for controlling export on the disk.

PurchasePlanAutoGenerated purchasePlan()

Get the purchasePlan property: Purchase plan information for the image from which the source disk for the snapshot was originally created.

DiskSecurityProfile securityProfile()

Get the securityProfile property: Contains the security related information for the resource.

SnapshotSku sku()

Get the sku property: The snapshots sku name.

SupportedCapabilities supportedCapabilities()

Get the supportedCapabilities property: List of supported capabilities for the image from which the source disk from the snapshot was originally created.

Boolean supportsHibernation()

Get the supportsHibernation property: Indicates the OS on a snapshot supports hibernation.

OffsetDateTime timeCreated()

Get the timeCreated property: The time when the snapshot was created.

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: The type of the resource.

String uniqueId()

Get the uniqueId property: Unique Guid identifying the resource.

void validate()

Validates the instance.

SnapshotInner withCompletionPercent(Float completionPercent)

Set the completionPercent property: Percentage complete for the background copy when a resource is created via the CopyStart operation.

SnapshotInner withCopyCompletionError(CopyCompletionError copyCompletionError)

Set the copyCompletionError property: Indicates the error details if the background copy of a resource created via the CopyStart operation fails.

SnapshotInner withCreationData(CreationData creationData)

Set the creationData property: Disk source information.

SnapshotInner withDataAccessAuthMode(DataAccessAuthMode dataAccessAuthMode)

Set the dataAccessAuthMode property: Additional authentication requirements when exporting or uploading to a disk or snapshot.

SnapshotInner withDiskAccessId(String diskAccessId)

Set the diskAccessId property: ARM id of the DiskAccess resource for using private endpoints on disks.

SnapshotInner withDiskSizeGB(Integer diskSizeGB)

Set the diskSizeGB property: If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create.

SnapshotInner withEncryption(Encryption encryption)

Set the encryption property: Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.

SnapshotInner withEncryptionSettingsCollection(EncryptionSettingsCollection encryptionSettingsCollection)

Set the encryptionSettingsCollection property: Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.

SnapshotInner withExtendedLocation(ExtendedLocation extendedLocation)

Set the extendedLocation property: The extended location where the snapshot will be created.

SnapshotInner withHyperVGeneration(HyperVGeneration hyperVGeneration)

Set the hyperVGeneration property: The hypervisor generation of the Virtual Machine.

SnapshotInner withIncremental(Boolean incremental)

Set the incremental property: Whether a snapshot is incremental.

SnapshotInner withLocation(String location)
SnapshotInner withNetworkAccessPolicy(NetworkAccessPolicy networkAccessPolicy)

Set the networkAccessPolicy property: Policy for accessing the disk via network.

SnapshotInner withOsType(OperatingSystemTypes osType)

Set the osType property: The Operating System type.

SnapshotInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess)

Set the publicNetworkAccess property: Policy for controlling export on the disk.

SnapshotInner withPurchasePlan(PurchasePlanAutoGenerated purchasePlan)

Set the purchasePlan property: Purchase plan information for the image from which the source disk for the snapshot was originally created.

SnapshotInner withSecurityProfile(DiskSecurityProfile securityProfile)

Set the securityProfile property: Contains the security related information for the resource.

SnapshotInner withSku(SnapshotSku sku)

Set the sku property: The snapshots sku name.

SnapshotInner withSupportedCapabilities(SupportedCapabilities supportedCapabilities)

Set the supportedCapabilities property: List of supported capabilities for the image from which the source disk from the snapshot was originally created.

SnapshotInner withSupportsHibernation(Boolean supportsHibernation)

Set the supportsHibernation property: Indicates the OS on a snapshot supports hibernation.

SnapshotInner withTags(Map<String,String> tags)

Methods inherited from ProxyResource

Methods inherited from Resource

Methods inherited from java.lang.Object

Constructor Details

SnapshotInner

public SnapshotInner()

Creates an instance of SnapshotInner class.

Method Details

completionPercent

public Float completionPercent()

Get the completionPercent property: Percentage complete for the background copy when a resource is created via the CopyStart operation.

Returns:

the completionPercent value.

copyCompletionError

public CopyCompletionError copyCompletionError()

Get the copyCompletionError property: Indicates the error details if the background copy of a resource created via the CopyStart operation fails.

Returns:

the copyCompletionError value.

creationData

public CreationData creationData()

Get the creationData property: Disk source information. CreationData information cannot be changed after the disk has been created.

Returns:

the creationData value.

dataAccessAuthMode

public DataAccessAuthMode dataAccessAuthMode()

Get the dataAccessAuthMode property: Additional authentication requirements when exporting or uploading to a disk or snapshot.

Returns:

the dataAccessAuthMode value.

diskAccessId

public String diskAccessId()

Get the diskAccessId property: ARM id of the DiskAccess resource for using private endpoints on disks.

Returns:

the diskAccessId value.

diskSizeBytes

public Long diskSizeBytes()

Get the diskSizeBytes property: The size of the disk in bytes. This field is read only.

Returns:

the diskSizeBytes value.

diskSizeGB

public Integer diskSizeGB()

Get the diskSizeGB property: If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.

Returns:

the diskSizeGB value.

diskState

public DiskState diskState()

Get the diskState property: The state of the snapshot.

Returns:

the diskState value.

encryption

public Encryption encryption()

Get the encryption property: Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.

Returns:

the encryption value.

encryptionSettingsCollection

public EncryptionSettingsCollection encryptionSettingsCollection()

Get the encryptionSettingsCollection property: Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.

Returns:

the encryptionSettingsCollection value.

extendedLocation

public ExtendedLocation extendedLocation()

Get the extendedLocation property: The extended location where the snapshot will be created. Extended location cannot be changed.

Returns:

the extendedLocation value.

fromJson

public static SnapshotInner fromJson(JsonReader jsonReader)

Reads an instance of SnapshotInner from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of SnapshotInner if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

hyperVGeneration

public HyperVGeneration hyperVGeneration()

Get the hyperVGeneration property: The hypervisor generation of the Virtual Machine. Applicable to OS disks only.

Returns:

the hyperVGeneration value.

id

public String id()

Get the id property: Fully qualified resource Id for the resource.

Overrides:

SnapshotInner.id()

Returns:

the id value.

incremental

public Boolean incremental()

Get the incremental property: Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less space than full snapshots and can be diffed.

Returns:

the incremental value.

incrementalSnapshotFamilyId

public String incrementalSnapshotFamilyId()

Get the incrementalSnapshotFamilyId property: Incremental snapshots for a disk share an incremental snapshot family id. The Get Page Range Diff API can only be called on incremental snapshots with the same family id.

Returns:

the incrementalSnapshotFamilyId value.

managedBy

public String managedBy()

Get the managedBy property: Unused. Always Null.

Returns:

the managedBy value.

name

public String name()

Get the name property: The name of the resource.

Overrides:

SnapshotInner.name()

Returns:

the name value.

networkAccessPolicy

public NetworkAccessPolicy networkAccessPolicy()

Get the networkAccessPolicy property: Policy for accessing the disk via network.

Returns:

the networkAccessPolicy value.

osType

public OperatingSystemTypes osType()

Get the osType property: The Operating System type.

Returns:

the osType value.

provisioningState

public String provisioningState()

Get the provisioningState property: The disk provisioning state.

Returns:

the provisioningState value.

publicNetworkAccess

public PublicNetworkAccess publicNetworkAccess()

Get the publicNetworkAccess property: Policy for controlling export on the disk.

Returns:

the publicNetworkAccess value.

purchasePlan

public PurchasePlanAutoGenerated purchasePlan()

Get the purchasePlan property: Purchase plan information for the image from which the source disk for the snapshot was originally created.

Returns:

the purchasePlan value.

securityProfile

public DiskSecurityProfile securityProfile()

Get the securityProfile property: Contains the security related information for the resource.

Returns:

the securityProfile value.

sku

public SnapshotSku sku()

Get the sku property: The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional parameter for incremental snapshot and the default behavior is the SKU will be set to the same sku as the previous snapshot.

Returns:

the sku value.

supportedCapabilities

public SupportedCapabilities supportedCapabilities()

Get the supportedCapabilities property: List of supported capabilities for the image from which the source disk from the snapshot was originally created.

Returns:

the supportedCapabilities value.

supportsHibernation

public Boolean supportsHibernation()

Get the supportsHibernation property: Indicates the OS on a snapshot supports hibernation.

Returns:

the supportsHibernation value.

timeCreated

public OffsetDateTime timeCreated()

Get the timeCreated property: The time when the snapshot was created.

Returns:

the timeCreated value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

SnapshotInner.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: The type of the resource.

Overrides:

SnapshotInner.type()

Returns:

the type value.

uniqueId

public String uniqueId()

Get the uniqueId property: Unique Guid identifying the resource.

Returns:

the uniqueId value.

validate

public void validate()

Validates the instance.

withCompletionPercent

public SnapshotInner withCompletionPercent(Float completionPercent)

Set the completionPercent property: Percentage complete for the background copy when a resource is created via the CopyStart operation.

Parameters:

completionPercent - the completionPercent value to set.

Returns:

the SnapshotInner object itself.

withCopyCompletionError

public SnapshotInner withCopyCompletionError(CopyCompletionError copyCompletionError)

Set the copyCompletionError property: Indicates the error details if the background copy of a resource created via the CopyStart operation fails.

Parameters:

copyCompletionError - the copyCompletionError value to set.

Returns:

the SnapshotInner object itself.

withCreationData

public SnapshotInner withCreationData(CreationData creationData)

Set the creationData property: Disk source information. CreationData information cannot be changed after the disk has been created.

Parameters:

creationData - the creationData value to set.

Returns:

the SnapshotInner object itself.

withDataAccessAuthMode

public SnapshotInner withDataAccessAuthMode(DataAccessAuthMode dataAccessAuthMode)

Set the dataAccessAuthMode property: Additional authentication requirements when exporting or uploading to a disk or snapshot.

Parameters:

dataAccessAuthMode - the dataAccessAuthMode value to set.

Returns:

the SnapshotInner object itself.

withDiskAccessId

public SnapshotInner withDiskAccessId(String diskAccessId)

Set the diskAccessId property: ARM id of the DiskAccess resource for using private endpoints on disks.

Parameters:

diskAccessId - the diskAccessId value to set.

Returns:

the SnapshotInner object itself.

withDiskSizeGB

public SnapshotInner withDiskSizeGB(Integer diskSizeGB)

Set the diskSizeGB property: If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.

Parameters:

diskSizeGB - the diskSizeGB value to set.

Returns:

the SnapshotInner object itself.

withEncryption

public SnapshotInner withEncryption(Encryption encryption)

Set the encryption property: Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.

Parameters:

encryption - the encryption value to set.

Returns:

the SnapshotInner object itself.

withEncryptionSettingsCollection

public SnapshotInner withEncryptionSettingsCollection(EncryptionSettingsCollection encryptionSettingsCollection)

Set the encryptionSettingsCollection property: Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.

Parameters:

encryptionSettingsCollection - the encryptionSettingsCollection value to set.

Returns:

the SnapshotInner object itself.

withExtendedLocation

public SnapshotInner withExtendedLocation(ExtendedLocation extendedLocation)

Set the extendedLocation property: The extended location where the snapshot will be created. Extended location cannot be changed.

Parameters:

extendedLocation - the extendedLocation value to set.

Returns:

the SnapshotInner object itself.

withHyperVGeneration

public SnapshotInner withHyperVGeneration(HyperVGeneration hyperVGeneration)

Set the hyperVGeneration property: The hypervisor generation of the Virtual Machine. Applicable to OS disks only.

Parameters:

hyperVGeneration - the hyperVGeneration value to set.

Returns:

the SnapshotInner object itself.

withIncremental

public SnapshotInner withIncremental(Boolean incremental)

Set the incremental property: Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less space than full snapshots and can be diffed.

Parameters:

incremental - the incremental value to set.

Returns:

the SnapshotInner object itself.

withLocation

public SnapshotInner withLocation(String location)

Overrides:

SnapshotInner.withLocation(String location)

Parameters:

location

withNetworkAccessPolicy

public SnapshotInner withNetworkAccessPolicy(NetworkAccessPolicy networkAccessPolicy)

Set the networkAccessPolicy property: Policy for accessing the disk via network.

Parameters:

networkAccessPolicy - the networkAccessPolicy value to set.

Returns:

the SnapshotInner object itself.

withOsType

public SnapshotInner withOsType(OperatingSystemTypes osType)

Set the osType property: The Operating System type.

Parameters:

osType - the osType value to set.

Returns:

the SnapshotInner object itself.

withPublicNetworkAccess

public SnapshotInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess)

Set the publicNetworkAccess property: Policy for controlling export on the disk.

Parameters:

publicNetworkAccess - the publicNetworkAccess value to set.

Returns:

the SnapshotInner object itself.

withPurchasePlan

public SnapshotInner withPurchasePlan(PurchasePlanAutoGenerated purchasePlan)

Set the purchasePlan property: Purchase plan information for the image from which the source disk for the snapshot was originally created.

Parameters:

purchasePlan - the purchasePlan value to set.

Returns:

the SnapshotInner object itself.

withSecurityProfile

public SnapshotInner withSecurityProfile(DiskSecurityProfile securityProfile)

Set the securityProfile property: Contains the security related information for the resource.

Parameters:

securityProfile - the securityProfile value to set.

Returns:

the SnapshotInner object itself.

withSku

public SnapshotInner withSku(SnapshotSku sku)

Set the sku property: The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional parameter for incremental snapshot and the default behavior is the SKU will be set to the same sku as the previous snapshot.

Parameters:

sku - the sku value to set.

Returns:

the SnapshotInner object itself.

withSupportedCapabilities

public SnapshotInner withSupportedCapabilities(SupportedCapabilities supportedCapabilities)

Set the supportedCapabilities property: List of supported capabilities for the image from which the source disk from the snapshot was originally created.

Parameters:

supportedCapabilities - the supportedCapabilities value to set.

Returns:

the SnapshotInner object itself.

withSupportsHibernation

public SnapshotInner withSupportsHibernation(Boolean supportsHibernation)

Set the supportsHibernation property: Indicates the OS on a snapshot supports hibernation.

Parameters:

supportsHibernation - the supportsHibernation value to set.

Returns:

the SnapshotInner object itself.

withTags

public SnapshotInner withTags(Map tags)

Overrides:

SnapshotInner.withTags(Map<String,String> tags)

Parameters:

tags

Applies to