Interface DisksClient
public interface DisksClient
An instance of this class provides access to all the operations defined in DisksClient.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
attach
(String resourceGroupName, String labName, String username, String name, AttachDiskProperties attachDiskProperties) Attach and create the lease of the disk to the virtual machine.void
attach
(String resourceGroupName, String labName, String username, String name, AttachDiskProperties attachDiskProperties, com.azure.core.util.Context context) Attach and create the lease of the disk to the virtual machine.beginAttach
(String resourceGroupName, String labName, String username, String name, AttachDiskProperties attachDiskProperties) Attach and create the lease of the disk to the virtual machine.beginAttach
(String resourceGroupName, String labName, String username, String name, AttachDiskProperties attachDiskProperties, com.azure.core.util.Context context) Attach and create the lease of the disk to the virtual machine.com.azure.core.util.polling.SyncPoller<com.azure.core.management.polling.PollResult<DiskInner>,
DiskInner> beginCreateOrUpdate
(String resourceGroupName, String labName, String username, String name, DiskInner disk) Create or replace an existing disk.com.azure.core.util.polling.SyncPoller<com.azure.core.management.polling.PollResult<DiskInner>,
DiskInner> beginCreateOrUpdate
(String resourceGroupName, String labName, String username, String name, DiskInner disk, com.azure.core.util.Context context) Create or replace an existing disk.beginDelete
(String resourceGroupName, String labName, String username, String name) Delete disk.beginDelete
(String resourceGroupName, String labName, String username, String name, com.azure.core.util.Context context) Delete disk.beginDetach
(String resourceGroupName, String labName, String username, String name, DetachDiskProperties detachDiskProperties) Detach and break the lease of the disk attached to the virtual machine.beginDetach
(String resourceGroupName, String labName, String username, String name, DetachDiskProperties detachDiskProperties, com.azure.core.util.Context context) Detach and break the lease of the disk attached to the virtual machine.createOrUpdate
(String resourceGroupName, String labName, String username, String name, DiskInner disk) Create or replace an existing disk.createOrUpdate
(String resourceGroupName, String labName, String username, String name, DiskInner disk, com.azure.core.util.Context context) Create or replace an existing disk.void
Delete disk.void
delete
(String resourceGroupName, String labName, String username, String name, com.azure.core.util.Context context) Delete disk.void
detach
(String resourceGroupName, String labName, String username, String name, DetachDiskProperties detachDiskProperties) Detach and break the lease of the disk attached to the virtual machine.void
detach
(String resourceGroupName, String labName, String username, String name, DetachDiskProperties detachDiskProperties, com.azure.core.util.Context context) Detach and break the lease of the disk attached to the virtual machine.Get disk.com.azure.core.http.rest.Response<DiskInner>
getWithResponse
(String resourceGroupName, String labName, String username, String name, String expand, com.azure.core.util.Context context) Get disk.com.azure.core.http.rest.PagedIterable<DiskInner>
List disks in a given user profile.com.azure.core.http.rest.PagedIterable<DiskInner>
list
(String resourceGroupName, String labName, String username, String expand, String filter, Integer top, String orderby, com.azure.core.util.Context context) List disks in a given user profile.Allows modifying tags of disks.com.azure.core.http.rest.Response<DiskInner>
updateWithResponse
(String resourceGroupName, String labName, String username, String name, DiskFragment disk, com.azure.core.util.Context context) Allows modifying tags of disks.
-
Method Details
-
list
com.azure.core.http.rest.PagedIterable<DiskInner> list(String resourceGroupName, String labName, String username) List disks in a given user profile.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.username
- The name of the user profile.- Returns:
- the response of a list operation as paginated response with
PagedIterable
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
list
com.azure.core.http.rest.PagedIterable<DiskInner> list(String resourceGroupName, String labName, String username, String expand, String filter, Integer top, String orderby, com.azure.core.util.Context context) List disks in a given user profile.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.username
- The name of the user profile.expand
- Specify the $expand query. Example: 'properties($select=diskType)'.filter
- The filter to apply to the operation. Example: '$filter=contains(name,'myName').top
- The maximum number of resources to return from the operation. Example: '$top=10'.orderby
- The ordering expression for the results, using OData notation. Example: '$orderby=name desc'.context
- The context to associate with this operation.- Returns:
- the response of a list operation as paginated response with
PagedIterable
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
getWithResponse
com.azure.core.http.rest.Response<DiskInner> getWithResponse(String resourceGroupName, String labName, String username, String name, String expand, com.azure.core.util.Context context) Get disk.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.username
- The name of the user profile.name
- The name of the disk.expand
- Specify the $expand query. Example: 'properties($select=diskType)'.context
- The context to associate with this operation.- Returns:
- disk along with
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
get
Get disk.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.username
- The name of the user profile.name
- The name of the disk.- Returns:
- disk.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
beginCreateOrUpdate
com.azure.core.util.polling.SyncPoller<com.azure.core.management.polling.PollResult<DiskInner>,DiskInner> beginCreateOrUpdate(String resourceGroupName, String labName, String username, String name, DiskInner disk) Create or replace an existing disk. This operation can take a while to complete.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.username
- The name of the user profile.name
- The name of the disk.disk
- A Disk.- Returns:
- the
SyncPoller
for polling of a Disk. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
beginCreateOrUpdate
com.azure.core.util.polling.SyncPoller<com.azure.core.management.polling.PollResult<DiskInner>,DiskInner> beginCreateOrUpdate(String resourceGroupName, String labName, String username, String name, DiskInner disk, com.azure.core.util.Context context) Create or replace an existing disk. This operation can take a while to complete.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.username
- The name of the user profile.name
- The name of the disk.disk
- A Disk.context
- The context to associate with this operation.- Returns:
- the
SyncPoller
for polling of a Disk. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
createOrUpdate
DiskInner createOrUpdate(String resourceGroupName, String labName, String username, String name, DiskInner disk) Create or replace an existing disk. This operation can take a while to complete.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.username
- The name of the user profile.name
- The name of the disk.disk
- A Disk.- Returns:
- a Disk.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
createOrUpdate
DiskInner createOrUpdate(String resourceGroupName, String labName, String username, String name, DiskInner disk, com.azure.core.util.Context context) Create or replace an existing disk. This operation can take a while to complete.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.username
- The name of the user profile.name
- The name of the disk.disk
- A Disk.context
- The context to associate with this operation.- Returns:
- a Disk.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
beginDelete
com.azure.core.util.polling.SyncPoller<com.azure.core.management.polling.PollResult<Void>,Void> beginDelete(String resourceGroupName, String labName, String username, String name) Delete disk. This operation can take a while to complete.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.username
- The name of the user profile.name
- The name of the disk.- Returns:
- the
SyncPoller
for polling of long-running operation. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
beginDelete
com.azure.core.util.polling.SyncPoller<com.azure.core.management.polling.PollResult<Void>,Void> beginDelete(String resourceGroupName, String labName, String username, String name, com.azure.core.util.Context context) Delete disk. This operation can take a while to complete.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.username
- The name of the user profile.name
- The name of the disk.context
- The context to associate with this operation.- Returns:
- the
SyncPoller
for polling of long-running operation. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
delete
Delete disk. This operation can take a while to complete.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.username
- The name of the user profile.name
- The name of the disk.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
delete
void delete(String resourceGroupName, String labName, String username, String name, com.azure.core.util.Context context) Delete disk. This operation can take a while to complete.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.username
- The name of the user profile.name
- The name of the disk.context
- The context to associate with this operation.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
updateWithResponse
com.azure.core.http.rest.Response<DiskInner> updateWithResponse(String resourceGroupName, String labName, String username, String name, DiskFragment disk, com.azure.core.util.Context context) Allows modifying tags of disks. All other properties will be ignored.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.username
- The name of the user profile.name
- The name of the disk.disk
- A Disk.context
- The context to associate with this operation.- Returns:
- a Disk along with
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
update
DiskInner update(String resourceGroupName, String labName, String username, String name, DiskFragment disk) Allows modifying tags of disks. All other properties will be ignored.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.username
- The name of the user profile.name
- The name of the disk.disk
- A Disk.- Returns:
- a Disk.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
beginAttach
com.azure.core.util.polling.SyncPoller<com.azure.core.management.polling.PollResult<Void>,Void> beginAttach(String resourceGroupName, String labName, String username, String name, AttachDiskProperties attachDiskProperties) Attach and create the lease of the disk to the virtual machine. This operation can take a while to complete.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.username
- The name of the user profile.name
- The name of the disk.attachDiskProperties
- Properties of the disk to attach.- Returns:
- the
SyncPoller
for polling of long-running operation. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
beginAttach
com.azure.core.util.polling.SyncPoller<com.azure.core.management.polling.PollResult<Void>,Void> beginAttach(String resourceGroupName, String labName, String username, String name, AttachDiskProperties attachDiskProperties, com.azure.core.util.Context context) Attach and create the lease of the disk to the virtual machine. This operation can take a while to complete.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.username
- The name of the user profile.name
- The name of the disk.attachDiskProperties
- Properties of the disk to attach.context
- The context to associate with this operation.- Returns:
- the
SyncPoller
for polling of long-running operation. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
attach
void attach(String resourceGroupName, String labName, String username, String name, AttachDiskProperties attachDiskProperties) Attach and create the lease of the disk to the virtual machine. This operation can take a while to complete.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.username
- The name of the user profile.name
- The name of the disk.attachDiskProperties
- Properties of the disk to attach.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
attach
void attach(String resourceGroupName, String labName, String username, String name, AttachDiskProperties attachDiskProperties, com.azure.core.util.Context context) Attach and create the lease of the disk to the virtual machine. This operation can take a while to complete.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.username
- The name of the user profile.name
- The name of the disk.attachDiskProperties
- Properties of the disk to attach.context
- The context to associate with this operation.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
beginDetach
com.azure.core.util.polling.SyncPoller<com.azure.core.management.polling.PollResult<Void>,Void> beginDetach(String resourceGroupName, String labName, String username, String name, DetachDiskProperties detachDiskProperties) Detach and break the lease of the disk attached to the virtual machine. This operation can take a while to complete.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.username
- The name of the user profile.name
- The name of the disk.detachDiskProperties
- Properties of the disk to detach.- Returns:
- the
SyncPoller
for polling of long-running operation. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
beginDetach
com.azure.core.util.polling.SyncPoller<com.azure.core.management.polling.PollResult<Void>,Void> beginDetach(String resourceGroupName, String labName, String username, String name, DetachDiskProperties detachDiskProperties, com.azure.core.util.Context context) Detach and break the lease of the disk attached to the virtual machine. This operation can take a while to complete.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.username
- The name of the user profile.name
- The name of the disk.detachDiskProperties
- Properties of the disk to detach.context
- The context to associate with this operation.- Returns:
- the
SyncPoller
for polling of long-running operation. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
detach
void detach(String resourceGroupName, String labName, String username, String name, DetachDiskProperties detachDiskProperties) Detach and break the lease of the disk attached to the virtual machine. This operation can take a while to complete.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.username
- The name of the user profile.name
- The name of the disk.detachDiskProperties
- Properties of the disk to detach.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
detach
void detach(String resourceGroupName, String labName, String username, String name, DetachDiskProperties detachDiskProperties, com.azure.core.util.Context context) Detach and break the lease of the disk attached to the virtual machine. This operation can take a while to complete.- Parameters:
resourceGroupName
- The name of the resource group.labName
- The name of the lab.username
- The name of the user profile.name
- The name of the disk.detachDiskProperties
- Properties of the disk to detach.context
- The context to associate with this operation.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-