Interface GenericResources

All Superinterfaces:
HasManager<ResourceManager>, SupportsCreating<GenericResource.DefinitionStages.Blank>, SupportsDeletingById, SupportsGettingById<GenericResource>, SupportsListing<GenericResource>, SupportsListingByResourceGroup<GenericResource>, SupportsListingInResourceGroupByTag<GenericResource>

Entry point to generic resources management API.
  • Method Details

    • deleteById

      void deleteById(String id)
      Deletes a resource from Azure, identifying it by its resource ID. For consistency across service versions, please use deleteById(String, String) instead.
      Specified by:
      deleteById in interface SupportsDeletingById
      Parameters:
      id - the resource ID of the resource to delete
    • deleteByIdAsync

      Mono<Void> deleteByIdAsync(String id)
      Asynchronously delete a resource from Azure, identifying it by its resource ID. For consistency across service versions, please use deleteByIdAsync(String, String) instead.
      Specified by:
      deleteByIdAsync in interface SupportsDeletingById
      Parameters:
      id - the resource ID of the resource to delete
      Returns:
      a representation of the deferred computation of this call
    • getById

      GenericResource getById(String id)
      Gets the information about a resource from Azure based on the resource id. For consistency across service versions, please use getById(String, String) instead.
      Specified by:
      getById in interface SupportsGettingById<GenericResource>
      Parameters:
      id - the id of the resource.
      Returns:
      an immutable representation of the resource
    • getByIdAsync

      Mono<GenericResource> getByIdAsync(String id)
      Gets the information about a resource from Azure based on the resource id. For consistency across service versions, please use getByIdAsync(String, String) instead.
      Specified by:
      getByIdAsync in interface SupportsGettingById<GenericResource>
      Parameters:
      id - the id of the resource.
      Returns:
      a Mono that emits the found resource asynchronously
    • deleteById

      void deleteById(String id, String apiVersion)
      Deletes a resource from Azure, identifying it by its resource ID.
      Parameters:
      id - the resource ID of the resource to delete
      apiVersion - the API version
    • deleteByIdAsync

      Mono<Void> deleteByIdAsync(String id, String apiVersion)
      Asynchronously delete a resource from Azure, identifying it by its resource ID.
      Parameters:
      id - the resource ID of the resource to delete
      apiVersion - the API version
      Returns:
      a representation of the deferred computation of this call
    • getById

      GenericResource getById(String id, String apiVersion)
      Gets the information about a resource from Azure based on the resource id.
      Parameters:
      id - the id of the resource.
      apiVersion - the API version
      Returns:
      an immutable representation of the resource
    • getByIdAsync

      Mono<GenericResource> getByIdAsync(String id, String apiVersion)
      Gets the information about a resource from Azure based on the resource id.
      Parameters:
      id - the id of the resource.
      apiVersion - the API version
      Returns:
      a Mono that emits the found resource asynchronously
    • checkExistence

      boolean checkExistence(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion)
      Checks if a resource exists in a resource group.
      Parameters:
      resourceGroupName - the resource group's name
      resourceProviderNamespace - the resource provider's namespace
      parentResourcePath - the parent's resource path
      resourceType - the type of the resource
      resourceName - the name of the resource
      apiVersion - the API version
      Returns:
      true if the resource exists; false otherwise
    • checkExistenceById

      boolean checkExistenceById(String id)
      Checks if a resource exists. For consistency across service versions, please use checkExistenceById(String, String) instead.
      Parameters:
      id - the ID of the resource.
      Returns:
      true if the resource exists; false otherwise
    • checkExistenceById

      boolean checkExistenceById(String id, String apiVersion)
      Checks if a resource exists.
      Parameters:
      id - the ID of the resource.
      apiVersion - the API version
      Returns:
      true if the resource exists; false otherwise
    • get

      GenericResource get(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion)
      Returns a resource belonging to a resource group.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      resourceProviderNamespace - Resource identity.
      parentResourcePath - Resource identity.
      resourceType - Resource identity.
      resourceName - Resource identity.
      apiVersion - the API version
      Returns:
      the generic resource
    • get

      GenericResource get(String resourceGroupName, String providerNamespace, String resourceType, String resourceName)
      Returns a resource belonging to a resource group.
      Parameters:
      resourceGroupName - the resource group name
      providerNamespace - the provider namespace
      resourceType - the resource type
      resourceName - the name of the resource
      Returns:
      the generic resource
    • validateMoveResources

      void validateMoveResources(String sourceResourceGroupName, ResourceGroup targetResourceGroup, List<String> resourceIds)
      Validates move resources from one resource group to another. If validation fails, ManagementException is thrown.
      Parameters:
      sourceResourceGroupName - Source resource group name
      targetResourceGroup - target resource group, can be in a different subscription
      resourceIds - the list of IDs of the resources to move
    • validateMoveResourcesAsync

      Mono<Void> validateMoveResourcesAsync(String sourceResourceGroupName, ResourceGroup targetResourceGroup, List<String> resourceIds)
      Validates move resources from one resource group to another asynchronously. If validation fails, ManagementException is thrown.
      Parameters:
      sourceResourceGroupName - Source resource group name
      targetResourceGroup - target resource group, can be in a different subscription
      resourceIds - the list of IDs of the resources to move
      Returns:
      a representation of the deferred computation of this call
    • moveResources

      void moveResources(String sourceResourceGroupName, ResourceGroup targetResourceGroup, List<String> resourceIds)
      Move resources from one resource group to another.
      Parameters:
      sourceResourceGroupName - Source resource group name
      targetResourceGroup - target resource group, can be in a different subscription
      resourceIds - the list of IDs of the resources to move
    • moveResourcesAsync

      Mono<Void> moveResourcesAsync(String sourceResourceGroupName, ResourceGroup targetResourceGroup, List<String> resourceIds)
      Move resources from one resource group to another asynchronously.
      Parameters:
      sourceResourceGroupName - Source resource group name
      targetResourceGroup - target resource group, can be in a different subscription
      resourceIds - the list of IDs of the resources to move
      Returns:
      a representation of the deferred computation of this call
    • delete

      void delete(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion)
      Delete resource and all of its child resources.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      resourceProviderNamespace - Resource identity.
      parentResourcePath - Resource identity.
      resourceType - Resource identity.
      resourceName - Resource identity.
      apiVersion - the API version
    • deleteAsync

      Mono<Void> deleteAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion)
      Delete resource and all of its child resources asynchronously.
      Parameters:
      resourceGroupName - The name of the resource group. The name is case insensitive.
      resourceProviderNamespace - Resource identity.
      parentResourcePath - Resource identity.
      resourceType - Resource identity.
      resourceName - Resource identity.
      apiVersion - the API version
      Returns:
      a representation of the deferred computation of this call
    • beginDeleteById

      Accepted<Void> beginDeleteById(String id)
      Begins deleting a resource from Azure, identifying it by its resource ID. For consistency across service versions, please use beginDeleteById(String, String) instead.
      Parameters:
      id - the resource ID of the resource to delete
      Returns:
      the accepted deleting operation
    • beginDeleteById

      Accepted<Void> beginDeleteById(String id, String apiVersion)
      Begins deleting a resource from Azure, identifying it by its resource ID.
      Parameters:
      id - the resource ID of the resource to delete
      apiVersion - the API version
      Returns:
      the accepted deleting operation