GenericResources Interface

public interface GenericResources extends SupportsListing,SupportsListingByResourceGroup,SupportsListingInResourceGroupByTag,SupportsGettingById,SupportsCreating<GenericResource.DefinitionStages.Blank>,SupportsDeletingById,HasManager

Entry point to generic resources management API.

Method Summary

Modifier and Type Method and Description
boolean checkExistence(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion)

Checks if a resource exists in a resource group.

boolean checkExistenceById(String id)

Checks if a resource exists.

void delete(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion)

Delete resource and all of its child resources.

Completable deleteAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion)

Delete resource and all of its child resources asynchronously.

ServiceFuture<Void> deleteAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, ServiceCallback<Void> callback)

Delete resource and all of its child resources asynchronously.

GenericResource get(String resourceGroupName, String providerNamespace, String resourceType, String resourceName)

Returns a resource belonging to a resource group.

GenericResource get(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion)

Returns a resource belonging to a resource group.

void moveResources(String sourceResourceGroupName, ResourceGroup targetResourceGroup, List<String> resources)

Move resources from one resource group to another.

Completable moveResourcesAsync(String sourceResourceGroupName, ResourceGroup targetResourceGroup, List<String> resources)

Move resources from one resource group to another asynchronously.

ServiceFuture<Void> moveResourcesAsync(String sourceResourceGroupName, ResourceGroup targetResourceGroup, List<String> resources, ServiceCallback<Void> callback)

Move resources from one resource group to another asynchronously.

Inherited Members

Method Details

checkExistence

public 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

public boolean checkExistenceById(String id)

Checks if a resource exists.

Parameters:

id - the ID of the resource.

Returns:

true if the resource exists; false otherwise

delete

public 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 String value

deleteAsync

public Completable 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 String value

Returns:

a representation of the deferred computation of this call

deleteAsync

public ServiceFuture deleteAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, ServiceCallback callback)

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 String value
callback - the callback to call on success or failure

Returns:

a handle to cancel the request

get

public 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

get

public 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 String value

Returns:

the generic resource

moveResources

public void moveResources(String sourceResourceGroupName, ResourceGroup targetResourceGroup, List resources)

Move resources from one resource group to another.

Parameters:

sourceResourceGroupName - Source resource group name
targetResourceGroup - target resource group, can be in a different subscription
resources - the list of IDs of the resources to move

moveResourcesAsync

public Completable moveResourcesAsync(String sourceResourceGroupName, ResourceGroup targetResourceGroup, List resources)

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
resources - the list of IDs of the resources to move

Returns:

a representation of the deferred computation of this call

moveResourcesAsync

public ServiceFuture moveResourcesAsync(String sourceResourceGroupName, ResourceGroup targetResourceGroup, List resources, ServiceCallback callback)

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
resources - the list of IDs of the resources to move
callback - the callback to call on success or failure

Returns:

a handle to cancel the request

Applies to