你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

ImageDiskReference Class

  • java.lang.Object
    • com.azure.resourcemanager.compute.models.ImageDiskReference

Implements

public final class ImageDiskReference
implements JsonSerializable<ImageDiskReference>

The source image used for creating the disk.

Constructor Summary

Constructor Description
ImageDiskReference()

Creates an instance of ImageDiskReference class.

Method Summary

Modifier and Type Method and Description
String communityGalleryImageId()

Get the communityGalleryImageId property: A relative uri containing a community Azure Compute Gallery image reference.

static ImageDiskReference fromJson(JsonReader jsonReader)

Reads an instance of ImageDiskReference from the JsonReader.

String id()

Get the id property: A relative uri containing either a Platform Image Repository, user image, or Azure Compute Gallery image reference.

Integer lun()

Get the lun property: If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use.

String sharedGalleryImageId()

Get the sharedGalleryImageId property: A relative uri containing a direct shared Azure Compute Gallery image reference.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ImageDiskReference withCommunityGalleryImageId(String communityGalleryImageId)

Set the communityGalleryImageId property: A relative uri containing a community Azure Compute Gallery image reference.

ImageDiskReference withId(String id)

Set the id property: A relative uri containing either a Platform Image Repository, user image, or Azure Compute Gallery image reference.

ImageDiskReference withLun(Integer lun)

Set the lun property: If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use.

ImageDiskReference withSharedGalleryImageId(String sharedGalleryImageId)

Set the sharedGalleryImageId property: A relative uri containing a direct shared Azure Compute Gallery image reference.

Methods inherited from java.lang.Object

Constructor Details

ImageDiskReference

public ImageDiskReference()

Creates an instance of ImageDiskReference class.

Method Details

communityGalleryImageId

public String communityGalleryImageId()

Get the communityGalleryImageId property: A relative uri containing a community Azure Compute Gallery image reference.

Returns:

the communityGalleryImageId value.

fromJson

public static ImageDiskReference fromJson(JsonReader jsonReader)

Reads an instance of ImageDiskReference from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If an error occurs while reading the ImageDiskReference.

id

public String id()

Get the id property: A relative uri containing either a Platform Image Repository, user image, or Azure Compute Gallery image reference.

Returns:

the id value.

lun

public Integer lun()

Get the lun property: If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null.

Returns:

the lun value.

sharedGalleryImageId

public String sharedGalleryImageId()

Get the sharedGalleryImageId property: A relative uri containing a direct shared Azure Compute Gallery image reference.

Returns:

the sharedGalleryImageId value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withCommunityGalleryImageId

public ImageDiskReference withCommunityGalleryImageId(String communityGalleryImageId)

Set the communityGalleryImageId property: A relative uri containing a community Azure Compute Gallery image reference.

Parameters:

communityGalleryImageId - the communityGalleryImageId value to set.

Returns:

the ImageDiskReference object itself.

withId

public ImageDiskReference withId(String id)

Set the id property: A relative uri containing either a Platform Image Repository, user image, or Azure Compute Gallery image reference.

Parameters:

id - the id value to set.

Returns:

the ImageDiskReference object itself.

withLun

public ImageDiskReference withLun(Integer lun)

Set the lun property: If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null.

Parameters:

lun - the lun value to set.

Returns:

the ImageDiskReference object itself.

withSharedGalleryImageId

public ImageDiskReference withSharedGalleryImageId(String sharedGalleryImageId)

Set the sharedGalleryImageId property: A relative uri containing a direct shared Azure Compute Gallery image reference.

Parameters:

sharedGalleryImageId - the sharedGalleryImageId value to set.

Returns:

the ImageDiskReference object itself.

Applies to