你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

GenericResources 接口

实现

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

通用资源管理 API 的入口点。

方法摘要

修饰符和类型 方法和描述
abstract boolean checkExistence(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion)

检查资源组中是否存在资源。

abstract boolean checkExistenceById(String id)

检查资源是否存在。

abstract boolean checkExistenceById(String id, String apiVersion)

检查资源是否存在。

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

删除资源及其所有子资源。

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

强制删除资源及其所有子资源。

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

异步删除资源及其所有子资源。

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

异步强制删除资源及其所有子资源。

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)

异步强制删除资源及其所有子资源。

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

异步删除资源及其所有子资源。

abstract void deleteById(String id)

从 Azure 中删除资源,并按其资源 ID 标识该资源。

abstract void deleteById(String id, String apiVersion)

从 Azure 中删除资源,并按其资源 ID 标识该资源。

abstract rx.Completable deleteByIdAsync(String id)

从 Azure 异步删除资源,并按其资源 ID 标识该资源。

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

从 Azure 异步删除资源,并按其资源 ID 标识该资源。

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

返回属于资源组的资源。

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

返回属于资源组的资源。

abstract GenericResource getById(String id)

根据资源 ID 从 Azure 获取有关资源的信息。

abstract GenericResource getById(String id, String apiVersion)

根据资源 ID 从 Azure 获取有关资源的信息。

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

根据资源 ID 从 Azure 获取有关资源的信息。

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

根据资源 ID 从 Azure 获取有关资源的信息。

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

将资源从一个资源组移到另一个资源组。

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

以异步方式将资源从一个资源组移到另一个资源组。

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

以异步方式将资源从一个资源组移到另一个资源组。

方法详细信息

checkExistence

public abstract boolean checkExistence(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion)

检查资源组中是否存在资源。

Parameters:

resourceGroupName - 资源组的名称
resourceProviderNamespace - 资源提供程序的命名空间
parentResourcePath - 父级的资源路径
resourceType - 资源的类型
resourceName - 资源的名称
apiVersion - API 版本

Returns:

如果资源存在,则为 true;否则为 false

checkExistenceById

public abstract boolean checkExistenceById(String id)

检查资源是否存在。 为了跨服务版本保持一致,请改用 checkExistenceById(String id, String apiVersion)

Parameters:

id - 资源的 ID。

Returns:

如果资源存在,则为 true;否则为 false

checkExistenceById

public abstract boolean checkExistenceById(String id, String apiVersion)

检查资源是否存在。

Parameters:

id - 资源的 ID。
apiVersion - API 版本

Returns:

如果资源存在,则为 true;否则为 false

delete

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

删除资源及其所有子资源。

Parameters:

resourceGroupName - 资源组的名称。 此名称不区分大小写。
resourceProviderNamespace - 资源标识。
parentResourcePath - 资源标识。
resourceType - 资源标识。
resourceName - 资源标识。
apiVersion - API 版本

delete

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

强制删除资源及其所有子资源。 这仅适用于有限的资源类型。

Parameters:

resourceGroupName - 资源组的名称。 此名称不区分大小写。
resourceProviderNamespace - 资源标识。
parentResourcePath - 资源标识。
resourceType - 资源标识。
resourceName - 资源标识。
apiVersion - API 版本
forceDeletion - 强制删除参数

deleteAsync

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

异步删除资源及其所有子资源。

Parameters:

resourceGroupName - 资源组的名称。 此名称不区分大小写。
resourceProviderNamespace - 资源标识。
parentResourcePath - 资源标识。
resourceType - 资源标识。
resourceName - 资源标识。
apiVersion - API 版本

Returns:

此调用延迟计算的表示形式

deleteAsync

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

异步强制删除资源及其所有子资源。 这仅适用于有限的资源类型。

Parameters:

resourceGroupName - 资源组的名称。 此名称不区分大小写。
resourceProviderNamespace - 资源标识。
parentResourcePath - 资源标识。
resourceType - 资源标识。
resourceName - 资源标识。
apiVersion - API 版本
forceDeletion - 强制删除参数

Returns:

此调用延迟计算的表示形式

deleteAsync

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

异步强制删除资源及其所有子资源。 这仅适用于有限的资源类型。

Parameters:

resourceGroupName - 资源组的名称。 此名称不区分大小写。
resourceProviderNamespace - 资源标识。
parentResourcePath - 资源标识。
resourceType - 资源标识。
resourceName - 资源标识。
apiVersion - API 版本
forceDeletion - 强制删除参数
callback - 成功或失败时调用的回调

Returns:

用于取消请求的句柄

deleteAsync

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

异步删除资源及其所有子资源。

Parameters:

resourceGroupName - 资源组的名称。 此名称不区分大小写。
resourceProviderNamespace - 资源标识。
parentResourcePath - 资源标识。
resourceType - 资源标识。
resourceName - 资源标识。
apiVersion - 字符串值
callback - 成功或失败时调用的回调

Returns:

用于取消请求的句柄

deleteById

public abstract void deleteById(String id)

从 Azure 中删除资源,并按其资源 ID 标识该资源。 为了跨服务版本保持一致性,请改用 deleteById(String id, String apiVersion)

Parameters:

id - 要删除的资源的资源 ID

deleteById

public abstract void deleteById(String id, String apiVersion)

从 Azure 中删除资源,并按其资源 ID 标识该资源。

Parameters:

id - 要删除的资源的资源 ID
apiVersion - API 版本

deleteByIdAsync

public abstract Completable deleteByIdAsync(String id)

从 Azure 异步删除资源,并按其资源 ID 标识该资源。 为了跨服务版本保持一致性,请改用 deleteByIdAsync(String id, String apiVersion)

Parameters:

id - 要删除的资源的资源 ID

Returns:

此调用延迟计算的表示形式

deleteByIdAsync

public abstract Completable deleteByIdAsync(String id, String apiVersion)

从 Azure 异步删除资源,并按其资源 ID 标识该资源。

Parameters:

id - 要删除的资源的资源 ID
apiVersion - API 版本

Returns:

此调用延迟计算的表示形式

get

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

返回属于资源组的资源。

Parameters:

resourceGroupName - 资源组名称
providerNamespace - 提供程序命名空间
resourceType - 资源类型
resourceName - 资源的名称

Returns:

泛型资源

get

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

返回属于资源组的资源。

Parameters:

resourceGroupName - 资源组的名称。 此名称不区分大小写。
resourceProviderNamespace - 资源标识。
parentResourcePath - 资源标识。
resourceType - 资源标识。
resourceName - 资源标识。
apiVersion - API 版本

Returns:

泛型资源

getById

public abstract GenericResource getById(String id)

根据资源 ID 从 Azure 获取有关资源的信息。为了跨服务版本保持一致性,请改用 getById(String id, String apiVersion)

Parameters:

id - 资源的 ID。

Returns:

资源的不可变表示形式

getById

public abstract GenericResource getById(String id, String apiVersion)

根据资源 ID 从 Azure 获取有关资源的信息。

Parameters:

id - 资源的 ID。
apiVersion - API 版本

Returns:

资源的不可变表示形式

getByIdAsync

public abstract Observable getByIdAsync(String id)

根据资源 ID 从 Azure 获取有关资源的信息。为了跨服务版本保持一致性,请改用 getByIdAsync(String id, String apiVersion)

Parameters:

id - 资源的 ID。

Returns:

资源的不可变表示形式

getByIdAsync

public abstract Observable getByIdAsync(String id, String apiVersion)

根据资源 ID 从 Azure 获取有关资源的信息。

Parameters:

id - 资源的 ID。
apiVersion - API 版本

Returns:

资源的不可变表示形式

moveResources

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

将资源从一个资源组移到另一个资源组。

Parameters:

sourceResourceGroupName - 源资源组名称
targetResourceGroup - 目标资源组,可以位于不同的订阅中
resources - 要移动的资源的 ID 列表

moveResourcesAsync

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

以异步方式将资源从一个资源组移到另一个资源组。

Parameters:

sourceResourceGroupName - 源资源组名称
targetResourceGroup - 目标资源组,可以位于不同的订阅中
resources - 要移动的资源的 ID 列表

Returns:

此调用延迟计算的表示形式

moveResourcesAsync

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

以异步方式将资源从一个资源组移到另一个资源组。

Parameters:

sourceResourceGroupName - 源资源组名称
targetResourceGroup - 目标资源组,可以位于不同的订阅中
resources - 要移动的资源的 ID 列表
callback - 成功或失败时调用的回调

Returns:

用于取消请求的句柄

适用于