共用方式為


GenericResources Interface

Implements

public interface GenericResources
extends SupportsListing<GenericResource>, SupportsListingByResourceGroup<GenericResource>, SupportsListingInResourceGroupByTag<GenericResource>, SupportsGettingById<GenericResource>, SupportsCreating<Blank>, SupportsDeletingById, HasManager<com.microsoft.azure.management.resources.implementation.ResourceManager>

Entry point to generic resources management API.

Method Summary

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

Checks if a resource exists in a resource group.

abstract boolean checkExistenceById(String id)

Checks if a resource exists.

abstract boolean checkExistenceById(String id, String apiVersion)

Checks if a resource exists.

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

Delete resource and all of its child resources.

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

Force delete resource and all of its child resources.

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

Delete resource and all of its child resources asynchronously.

abstract rx.Completable deleteAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, boolean forceDeletion)

Force delete resource and all of its child resources asynchronously.

abstract com.microsoft.rest.ServiceFuture<java.lang.Void> deleteAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, boolean forceDeletion, ServiceCallback<Void> callback)

Force delete resource and all of its child resources asynchronously.

abstract com.microsoft.rest.ServiceFuture<java.lang.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.

abstract void deleteById(String id)

Deletes a resource from Azure, identifying it by its resource ID.

abstract void deleteById(String id, String apiVersion)

Deletes a resource from Azure, identifying it by its resource ID.

abstract rx.Completable deleteByIdAsync(String id)

Asynchronously delete a resource from Azure, identifying it by its resource ID.

abstract rx.Completable deleteByIdAsync(String id, String apiVersion)

Asynchronously delete a resource from Azure, identifying it by its resource ID.

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

Returns a resource belonging to a resource group.

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

Returns a resource belonging to a resource group.

abstract GenericResource getById(String id)

Gets the information about a resource from Azure based on the resource id.

abstract GenericResource getById(String id, String apiVersion)

Gets the information about a resource from Azure based on the resource id.

abstract rx.Observable<GenericResource> getByIdAsync(String id)

Gets the information about a resource from Azure based on the resource id.

abstract rx.Observable<GenericResource> getByIdAsync(String id, String apiVersion)

Gets the information about a resource from Azure based on the resource id.

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

Move resources from one resource group to another.

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

Move resources from one resource group to another asynchronously.

abstract com.microsoft.rest.ServiceFuture<java.lang.Void> moveResourcesAsync(String sourceResourceGroupName, ResourceGroup targetResourceGroup, List<String> resources, ServiceCallback<Void> callback)

Move resources from one resource group to another asynchronously.

Method Details

checkExistence

public abstract 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 abstract boolean checkExistenceById(String id)

Checks if a resource exists. For consistency across service versions, please use checkExistenceById(String id, String apiVersion) instead.

Parameters:

id - the ID of the resource.

Returns:

true if the resource exists; false otherwise

checkExistenceById

public abstract 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

delete

public abstract 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

delete

public abstract void delete(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, boolean forceDeletion)

Force delete resource and all of its child resources. This is only available to limited resource types.

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
forceDeletion - the force delete parameter

deleteAsync

public abstract 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 API version

Returns:

a representation of the deferred computation of this call

deleteAsync

public abstract Completable deleteAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, boolean forceDeletion)

Force delete resource and all of its child resources asynchronously. This is only available to limited resource types.

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
forceDeletion - the force delete parameter

Returns:

a representation of the deferred computation of this call

deleteAsync

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

Force delete resource and all of its child resources asynchronously. This is only available to limited resource types.

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
forceDeletion - the force delete parameter
callback - the callback to call on success or failure

Returns:

a handle to cancel the request

deleteAsync

public abstract 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

deleteById

public abstract void deleteById(String id)

Deletes a resource from Azure, identifying it by its resource ID. For consistency across service versions, please use deleteById(String id, String apiVersion) instead.

Parameters:

id - the resource ID of the resource to delete

deleteById

public abstract 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

public abstract Completable deleteByIdAsync(String id)

Asynchronously delete a resource from Azure, identifying it by its resource ID. For consistency across service versions, please use deleteByIdAsync(String id, String apiVersion) instead.

Parameters:

id - the resource ID of the resource to delete

Returns:

a representation of the deferred computation of this call

deleteByIdAsync

public abstract Completable 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

get

public abstract 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 abstract 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

getById

public abstract 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 id, String apiVersion) instead.

Parameters:

id - the id of the resource.

Returns:

an immutable representation of the resource

getById

public abstract 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

public abstract Observable 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 id, String apiVersion) instead.

Parameters:

id - the id of the resource.

Returns:

an immutable representation of the resource

getByIdAsync

public abstract Observable 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:

an immutable representation of the resource

moveResources

public abstract 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 abstract 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 abstract 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