MockableComputeResourceGroupResource Class

Definition

A class to add extension methods to ResourceGroupResource.

public class MockableComputeResourceGroupResource : Azure.ResourceManager.ArmResource
type MockableComputeResourceGroupResource = class
    inherit ArmResource
Public Class MockableComputeResourceGroupResource
Inherits ArmResource
Inheritance
MockableComputeResourceGroupResource

Constructors

Name Description
MockableComputeResourceGroupResource()

Initializes a new instance of MockableComputeResourceGroupResource for mocking.

Properties

Name Description
Client

Gets the ArmClient this resource client was created from.

(Inherited from ArmResource)
Diagnostics

Gets the diagnostic options for this resource client.

(Inherited from ArmResource)
Endpoint

Gets the base uri for this resource client.

(Inherited from ArmResource)
Id

Gets the resource identifier.

(Inherited from ArmResource)
Pipeline

Gets the pipeline for this resource client.

(Inherited from ArmResource)

Methods

Name Description
CanUseTagResource(CancellationToken)

Checks to see if the TagResource API is deployed in the current environment.

(Inherited from ArmResource)
CanUseTagResourceAsync(CancellationToken)

Checks to see if the TagResource API is deployed in the current environment.

(Inherited from ArmResource)
GetAvailabilitySet(String, CancellationToken)

Retrieves information about an availability set.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}.
  • Operation Id. : AvailabilitySets_Get.
  • Default Api Version. : 2026-03-01.
GetAvailabilitySetAsync(String, CancellationToken)

Retrieves information about an availability set.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}.
  • Operation Id. : AvailabilitySets_Get.
  • Default Api Version. : 2026-03-01.
GetAvailabilitySets()

Gets a collection of AvailabilitySets in the ResourceGroupResource.

GetAvailableLocations(CancellationToken)

Lists all available geo-locations.

(Inherited from ArmResource)
GetAvailableLocationsAsync(CancellationToken)

Lists all available geo-locations.

(Inherited from ArmResource)
GetCapacityReservationGroup(String, Nullable<CapacityReservationGroupInstanceViewType>, CancellationToken)

The operation that retrieves information about a capacity reservation group.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}.
  • Operation Id. : CapacityReservationGroups_Get.
  • Default Api Version. : 2026-03-01.
GetCapacityReservationGroupAsync(String, Nullable<CapacityReservationGroupInstanceViewType>, CancellationToken)

The operation that retrieves information about a capacity reservation group.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}.
  • Operation Id. : CapacityReservationGroups_Get.
  • Default Api Version. : 2026-03-01.
GetCapacityReservationGroups()

Gets a collection of CapacityReservationGroups in the ResourceGroupResource.

GetDedicatedHostGroup(String, Nullable<InstanceViewType>, CancellationToken)

Retrieves information about a dedicated host group.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}.
  • Operation Id. : DedicatedHostGroups_Get.
  • Default Api Version. : 2026-03-01.
GetDedicatedHostGroupAsync(String, Nullable<InstanceViewType>, CancellationToken)

Retrieves information about a dedicated host group.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}.
  • Operation Id. : DedicatedHostGroups_Get.
  • Default Api Version. : 2026-03-01.
GetDedicatedHostGroups()

Gets a collection of DedicatedHostGroups in the ResourceGroupResource.

GetDiskAccess(String, CancellationToken)

Gets information about a disk access resource.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}.
  • Operation Id. : DiskAccesses_Get.
  • Default Api Version. : 2026-03-02.
GetDiskAccessAsync(String, CancellationToken)

Gets information about a disk access resource.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}.
  • Operation Id. : DiskAccesses_Get.
  • Default Api Version. : 2026-03-02.
GetDiskAccesses()

Gets a collection of DiskAccesses in the ResourceGroupResource.

GetDiskEncryptionSet(String, CancellationToken)

Gets information about a disk encryption set.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}.
  • Operation Id. : DiskEncryptionSets_Get.
  • Default Api Version. : 2026-03-02.
GetDiskEncryptionSetAsync(String, CancellationToken)

Gets information about a disk encryption set.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}.
  • Operation Id. : DiskEncryptionSets_Get.
  • Default Api Version. : 2026-03-02.
GetDiskEncryptionSets()

Gets a collection of DiskEncryptionSets in the ResourceGroupResource.

GetDiskImage(String, String, CancellationToken)

Gets an image.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}.
  • Operation Id. : Images_Get.
  • Default Api Version. : 2026-03-01.
GetDiskImageAsync(String, String, CancellationToken)

Gets an image.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}.
  • Operation Id. : Images_Get.
  • Default Api Version. : 2026-03-01.
GetDiskImages()

Gets a collection of DiskImages in the ResourceGroupResource.

GetGalleries()

Gets a collection of Galleries in the ResourceGroupResource.

GetGallery(String, Nullable<SelectPermission>, Nullable<GalleryExpand>, CancellationToken)

Retrieves information about a Shared Image Gallery.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}.
  • Operation Id. : Galleries_Get.
  • Default Api Version. : 2025-12-03.
GetGalleryAsync(String, Nullable<SelectPermission>, Nullable<GalleryExpand>, CancellationToken)

Retrieves information about a Shared Image Gallery.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}.
  • Operation Id. : Galleries_Get.
  • Default Api Version. : 2025-12-03.
GetInterconnectBlock(String, Nullable<InterconnectBlockExpandTypes>, CancellationToken)

Retrieves information about an Interconnect Block.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/interconnectBlocks/{interconnectBlockName}.
  • Operation Id. : InterconnectBlocks_Get.
  • Default Api Version. : 2026-03-01.
GetInterconnectBlockAsync(String, Nullable<InterconnectBlockExpandTypes>, CancellationToken)

Retrieves information about an Interconnect Block.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/interconnectBlocks/{interconnectBlockName}.
  • Operation Id. : InterconnectBlocks_Get.
  • Default Api Version. : 2026-03-01.
GetInterconnectBlocks()

Gets a collection of InterconnectBlocks in the ResourceGroupResource.

GetManagedDisk(String, CancellationToken)

Gets information about a disk.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}.
  • Operation Id. : Disks_Get.
  • Default Api Version. : 2026-03-02.
GetManagedDiskAsync(String, CancellationToken)

Gets information about a disk.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}.
  • Operation Id. : Disks_Get.
  • Default Api Version. : 2026-03-02.
GetManagedDisks()

Gets a collection of ManagedDisks in the ResourceGroupResource.

GetManagementLock(String, CancellationToken)

Get a management lock by scope.

  • Request Path: /{scope}/providers/Microsoft.Authorization/locks/{lockName}
  • Operation Id: ManagementLocks_GetByScope
  • Default Api Version: 2020-05-01
  • Resource: ManagementLockResource
(Inherited from ArmResource)
GetManagementLockAsync(String, CancellationToken)

Get a management lock by scope.

  • Request Path: /{scope}/providers/Microsoft.Authorization/locks/{lockName}
  • Operation Id: ManagementLocks_GetByScope
  • Default Api Version: 2020-05-01
  • Resource: ManagementLockResource
(Inherited from ArmResource)
GetManagementLocks()

Gets a collection of ManagementLockResources in the ArmResource.

(Inherited from ArmResource)
GetPolicyAssignment(String, CancellationToken)

This operation retrieves a single policy assignment, given its name and the scope it was created at.

  • Request Path: /{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}
  • Operation Id: PolicyAssignments_Get
  • Default Api Version: 2022-06-01
  • Resource: PolicyAssignmentResource
(Inherited from ArmResource)
GetPolicyAssignmentAsync(String, CancellationToken)

This operation retrieves a single policy assignment, given its name and the scope it was created at.

  • Request Path: /{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}
  • Operation Id: PolicyAssignments_Get
  • Default Api Version: 2022-06-01
  • Resource: PolicyAssignmentResource
(Inherited from ArmResource)
GetPolicyAssignments()

Gets a collection of PolicyAssignmentResources in the ArmResource.

(Inherited from ArmResource)
GetProximityPlacementGroup(String, String, CancellationToken)

Retrieves information about a proximity placement group .

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}.
  • Operation Id. : ProximityPlacementGroups_Get.
  • Default Api Version. : 2026-03-01.
GetProximityPlacementGroupAsync(String, String, CancellationToken)

Retrieves information about a proximity placement group .

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}.
  • Operation Id. : ProximityPlacementGroups_Get.
  • Default Api Version. : 2026-03-01.
GetProximityPlacementGroups()

Gets a collection of ProximityPlacementGroups in the ResourceGroupResource.

GetRestorePointGroup(String, Nullable<RestorePointGroupExpand>, CancellationToken)

The operation to get the restore point collection.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}.
  • Operation Id. : RestorePointCollections_Get.
  • Default Api Version. : 2026-03-01.
GetRestorePointGroupAsync(String, Nullable<RestorePointGroupExpand>, CancellationToken)

The operation to get the restore point collection.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}.
  • Operation Id. : RestorePointCollections_Get.
  • Default Api Version. : 2026-03-01.
GetRestorePointGroups()

Gets a collection of RestorePointGroups in the ResourceGroupResource.

GetSnapshot(String, CancellationToken)

Gets information about a snapshot.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}.
  • Operation Id. : Snapshots_Get.
  • Default Api Version. : 2026-03-02.
GetSnapshotAsync(String, CancellationToken)

Gets information about a snapshot.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}.
  • Operation Id. : Snapshots_Get.
  • Default Api Version. : 2026-03-02.
GetSnapshots()

Gets a collection of Snapshots in the ResourceGroupResource.

GetSshPublicKey(String, CancellationToken)

Retrieves information about an SSH public key.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}.
  • Operation Id. : SshPublicKeyResources_Get.
  • Default Api Version. : 2026-03-01.
GetSshPublicKeyAsync(String, CancellationToken)

Retrieves information about an SSH public key.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}.
  • Operation Id. : SshPublicKeyResources_Get.
  • Default Api Version. : 2026-03-01.
GetSshPublicKeys()

Gets a collection of SshPublicKeys in the ResourceGroupResource.

GetTagResource()

Gets an object representing a TagResource along with the instance operations that can be performed on it in the ArmResource.

(Inherited from ArmResource)
GetVirtualMachine(String, Nullable<InstanceViewType>, CancellationToken)

Retrieves information about the model view or the instance view of a virtual machine.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}.
  • Operation Id. : VirtualMachines_Get.
  • Default Api Version. : 2026-03-01.
GetVirtualMachineAsync(String, Nullable<InstanceViewType>, CancellationToken)

Retrieves information about the model view or the instance view of a virtual machine.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}.
  • Operation Id. : VirtualMachines_Get.
  • Default Api Version. : 2026-03-01.
GetVirtualMachines()

Gets a collection of VirtualMachines in the ResourceGroupResource.

GetVirtualMachineScaleSet(String, Nullable<VirtualMachineScaleSetGetExpand>, CancellationToken)

Display information about a virtual machine scale set.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}.
  • Operation Id. : VirtualMachineScaleSets_Get.
  • Default Api Version. : 2026-03-01.
GetVirtualMachineScaleSetAsync(String, Nullable<VirtualMachineScaleSetGetExpand>, CancellationToken)

Display information about a virtual machine scale set.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}.
  • Operation Id. : VirtualMachineScaleSets_Get.
  • Default Api Version. : 2026-03-01.
GetVirtualMachineScaleSets()

Gets a collection of VirtualMachineScaleSets in the ResourceGroupResource.

TryGetApiVersion(ResourceType, String)

Gets the api version override if it has been set for the current client options.

(Inherited from ArmResource)

Extension Methods

Name Description
GetAuthorizationRoleDefinition(ArmResource, ResourceIdentifier, CancellationToken)

Gets the role definition identified by roleDefinitionId at this resource scope.

GetAuthorizationRoleDefinitionAsync(ArmResource, ResourceIdentifier, CancellationToken)

Gets the role definition identified by roleDefinitionId at this resource scope.

GetAuthorizationRoleDefinitions(ArmResource)

Gets a collection of AuthorizationRoleDefinitionCollection objects within the specified scope.

GetDenyAssignment(ArmResource, String, CancellationToken)

Get the specified deny assignment.

GetDenyAssignmentAsync(ArmResource, String, CancellationToken)

Get the specified deny assignment.

GetDenyAssignments(ArmResource)

Gets a collection of DenyAssignmentCollection objects within the specified scope.

GetLinkerResource(ArmResource, String, CancellationToken)

Returns Linker resource for a given name.

  • Request Path: /{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}
  • Operation Id: Linker_Get
  • Default Api Version: 2022-05-01
  • Resource: LinkerResource
<item>MockingTo mock this method, please mock GetLinkerResource(String, CancellationToken) instead.</item>
GetLinkerResourceAsync(ArmResource, String, CancellationToken)

Returns Linker resource for a given name.

  • Request Path: /{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}
  • Operation Id: Linker_Get
  • Default Api Version: 2022-05-01
  • Resource: LinkerResource
<item>MockingTo mock this method, please mock GetLinkerResourceAsync(String, CancellationToken) instead.</item>
GetLinkerResources(ArmResource)

Gets a collection of LinkerResources in the ArmResource. <item>MockingTo mock this method, please mock GetLinkerResources() instead.</item>

GetRoleAssignment(ArmResource, String, String, CancellationToken)

Get a role assignment by scope and name.

GetRoleAssignmentAsync(ArmResource, String, String, CancellationToken)

Get a role assignment by scope and name.

GetRoleAssignments(ArmResource)

Gets a collection of RoleAssignmentCollection objects within the specified scope.

GetRoleAssignmentSchedule(ArmResource, String, CancellationToken)

Get the specified role assignment schedule for a resource scope.

GetRoleAssignmentScheduleAsync(ArmResource, String, CancellationToken)

Get the specified role assignment schedule for a resource scope.

GetRoleAssignmentScheduleInstance(ArmResource, String, CancellationToken)

Gets the specified role assignment schedule instance.

GetRoleAssignmentScheduleInstanceAsync(ArmResource, String, CancellationToken)

Gets the specified role assignment schedule instance.

GetRoleAssignmentScheduleInstances(ArmResource)

Gets a collection of RoleAssignmentScheduleInstanceCollection objects within the specified scope.

GetRoleAssignmentScheduleRequest(ArmResource, String, CancellationToken)

Get the specified role assignment schedule request.

GetRoleAssignmentScheduleRequestAsync(ArmResource, String, CancellationToken)

Get the specified role assignment schedule request.

GetRoleAssignmentScheduleRequests(ArmResource)

Gets a collection of RoleAssignmentScheduleRequestCollection objects within the specified scope.

GetRoleAssignmentSchedules(ArmResource)

Gets a collection of RoleAssignmentScheduleCollection objects within the specified scope.

GetRoleEligibilitySchedule(ArmResource, String, CancellationToken)

Get the specified role eligibility schedule for a resource scope.

GetRoleEligibilityScheduleAsync(ArmResource, String, CancellationToken)

Get the specified role eligibility schedule for a resource scope.

GetRoleEligibilityScheduleInstance(ArmResource, String, CancellationToken)

Gets the specified role eligibility schedule instance.

GetRoleEligibilityScheduleInstanceAsync(ArmResource, String, CancellationToken)

Gets the specified role eligibility schedule instance.

GetRoleEligibilityScheduleInstances(ArmResource)

Gets a collection of RoleEligibilityScheduleInstanceCollection objects within the specified scope.

GetRoleEligibilityScheduleRequest(ArmResource, String, CancellationToken)

Get the specified role eligibility schedule request.

GetRoleEligibilityScheduleRequestAsync(ArmResource, String, CancellationToken)

Get the specified role eligibility schedule request.

GetRoleEligibilityScheduleRequests(ArmResource)

Gets a collection of RoleEligibilityScheduleRequestCollection objects within the specified scope.

GetRoleEligibilitySchedules(ArmResource)

Gets a collection of RoleEligibilityScheduleCollection objects within the specified scope.

GetRoleManagementPolicies(ArmResource)

Gets a collection of RoleManagementPolicyCollection objects within the specified scope.

GetRoleManagementPolicy(ArmResource, String, CancellationToken)

Get the specified role management policy for a resource scope.

GetRoleManagementPolicyAssignment(ArmResource, String, CancellationToken)

Get the specified role management policy assignment for a resource scope.

GetRoleManagementPolicyAssignmentAsync(ArmResource, String, CancellationToken)

Get the specified role management policy assignment for a resource scope.

GetRoleManagementPolicyAssignments(ArmResource)

Gets a collection of RoleManagementPolicyAssignmentCollection objects within the specified scope.

GetRoleManagementPolicyAsync(ArmResource, String, CancellationToken)

Get the specified role management policy for a resource scope.

GetSystemAssignedIdentity(ArmResource)

Gets an object representing a SystemAssignedIdentityResource along with the instance operations that can be performed on it in the ArmResource scope.

Applies to