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

Resources interface

表示资源的接口。

方法

beginCreateOrUpdate(string, string, string, string, string, string, GenericResource, ResourcesCreateOrUpdateOptionalParams)

创建资源。

beginCreateOrUpdateAndWait(string, string, string, string, string, string, GenericResource, ResourcesCreateOrUpdateOptionalParams)

创建资源。

beginCreateOrUpdateById(string, string, GenericResource, ResourcesCreateOrUpdateByIdOptionalParams)

按 ID 创建资源。

beginCreateOrUpdateByIdAndWait(string, string, GenericResource, ResourcesCreateOrUpdateByIdOptionalParams)

按 ID 创建资源。

beginDelete(string, string, string, string, string, string, ResourcesDeleteOptionalParams)

删除资源。

beginDeleteAndWait(string, string, string, string, string, string, ResourcesDeleteOptionalParams)

删除资源。

beginDeleteById(string, string, ResourcesDeleteByIdOptionalParams)

按 ID 删除资源。

beginDeleteByIdAndWait(string, string, ResourcesDeleteByIdOptionalParams)

按 ID 删除资源。

beginMoveResources(string, ResourcesMoveInfo, ResourcesMoveResourcesOptionalParams)

要移动的资源必须位于正在使用的源订阅中的同一个源资源组中。 目标资源组可能位于不同的订阅中。 移动资源时,源组和目标组在作期间均处于锁定状态。 在移动完成之前,将阻止对组执行写入和删除作。

beginMoveResourcesAndWait(string, ResourcesMoveInfo, ResourcesMoveResourcesOptionalParams)

要移动的资源必须位于正在使用的源订阅中的同一个源资源组中。 目标资源组可能位于不同的订阅中。 移动资源时,源组和目标组在作期间均处于锁定状态。 在移动完成之前,将阻止对组执行写入和删除作。

beginUpdate(string, string, string, string, string, string, GenericResource, ResourcesUpdateOptionalParams)

更新资源。

beginUpdateAndWait(string, string, string, string, string, string, GenericResource, ResourcesUpdateOptionalParams)

更新资源。

beginUpdateById(string, string, GenericResource, ResourcesUpdateByIdOptionalParams)

按 ID 更新资源。

beginUpdateByIdAndWait(string, string, GenericResource, ResourcesUpdateByIdOptionalParams)

按 ID 更新资源。

beginValidateMoveResources(string, ResourcesMoveInfo, ResourcesValidateMoveResourcesOptionalParams)

此作检查是否可以将指定的资源移动到目标。 要移动的资源必须位于正在使用的源订阅中的同一个源资源组中。 目标资源组可能位于不同的订阅中。 如果验证成功,它将返回 HTTP 响应代码 204(无内容)。 如果验证失败,它将返回 HTTP 响应代码 409(冲突),并返回一条错误消息。 检索 Location 标头值中的 URL,以检查长时间运行的作的结果。

beginValidateMoveResourcesAndWait(string, ResourcesMoveInfo, ResourcesValidateMoveResourcesOptionalParams)

此作检查是否可以将指定的资源移动到目标。 要移动的资源必须位于正在使用的源订阅中的同一个源资源组中。 目标资源组可能位于不同的订阅中。 如果验证成功,它将返回 HTTP 响应代码 204(无内容)。 如果验证失败,它将返回 HTTP 响应代码 409(冲突),并返回一条错误消息。 检索 Location 标头值中的 URL,以检查长时间运行的作的结果。

checkExistence(string, string, string, string, string, string, ResourcesCheckExistenceOptionalParams)

检查资源是否存在。

checkExistenceById(string, string, ResourcesCheckExistenceByIdOptionalParams)

按 ID 检查资源是否存在。

get(string, string, string, string, string, string, ResourcesGetOptionalParams)

获取资源。

getById(string, string, ResourcesGetByIdOptionalParams)

按 ID 获取资源。

list(ResourcesListOptionalParams)

获取订阅中的所有资源。

listByResourceGroup(string, ResourcesListByResourceGroupOptionalParams)

获取资源组的所有资源。

方法详细信息

beginCreateOrUpdate(string, string, string, string, string, string, GenericResource, ResourcesCreateOrUpdateOptionalParams)

创建资源。

function beginCreateOrUpdate(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, apiVersion: string, parameters: GenericResource, options?: ResourcesCreateOrUpdateOptionalParams): Promise<SimplePollerLike<OperationState<GenericResource>, GenericResource>>

参数

resourceGroupName

string

资源的资源组的名称。 名称不区分大小写。

resourceProviderNamespace

string

资源提供程序的命名空间。

parentResourcePath

string

父资源标识。

resourceType

string

要创建的资源的资源类型。

resourceName

string

要创建的资源的名称。

apiVersion

string

用于作的 API 版本。

parameters
GenericResource

用于创建或更新资源的参数。

options
ResourcesCreateOrUpdateOptionalParams

选项参数。

返回

Promise<@azure/core-lro.SimplePollerLike<OperationState<GenericResource>, GenericResource>>

beginCreateOrUpdateAndWait(string, string, string, string, string, string, GenericResource, ResourcesCreateOrUpdateOptionalParams)

创建资源。

function beginCreateOrUpdateAndWait(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, apiVersion: string, parameters: GenericResource, options?: ResourcesCreateOrUpdateOptionalParams): Promise<GenericResource>

参数

resourceGroupName

string

资源的资源组的名称。 名称不区分大小写。

resourceProviderNamespace

string

资源提供程序的命名空间。

parentResourcePath

string

父资源标识。

resourceType

string

要创建的资源的资源类型。

resourceName

string

要创建的资源的名称。

apiVersion

string

用于作的 API 版本。

parameters
GenericResource

用于创建或更新资源的参数。

options
ResourcesCreateOrUpdateOptionalParams

选项参数。

返回

Promise<GenericResource>

beginCreateOrUpdateById(string, string, GenericResource, ResourcesCreateOrUpdateByIdOptionalParams)

按 ID 创建资源。

function beginCreateOrUpdateById(resourceId: string, apiVersion: string, parameters: GenericResource, options?: ResourcesCreateOrUpdateByIdOptionalParams): Promise<SimplePollerLike<OperationState<GenericResource>, GenericResource>>

参数

resourceId

string

资源的完全限定 ID,包括资源名称和资源类型。 使用格式 /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}

apiVersion

string

用于作的 API 版本。

parameters
GenericResource

创建或更新资源参数。

返回

Promise<@azure/core-lro.SimplePollerLike<OperationState<GenericResource>, GenericResource>>

beginCreateOrUpdateByIdAndWait(string, string, GenericResource, ResourcesCreateOrUpdateByIdOptionalParams)

按 ID 创建资源。

function beginCreateOrUpdateByIdAndWait(resourceId: string, apiVersion: string, parameters: GenericResource, options?: ResourcesCreateOrUpdateByIdOptionalParams): Promise<GenericResource>

参数

resourceId

string

资源的完全限定 ID,包括资源名称和资源类型。 使用格式 /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}

apiVersion

string

用于作的 API 版本。

parameters
GenericResource

创建或更新资源参数。

返回

Promise<GenericResource>

beginDelete(string, string, string, string, string, string, ResourcesDeleteOptionalParams)

删除资源。

function beginDelete(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, apiVersion: string, options?: ResourcesDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>

参数

resourceGroupName

string

包含要删除的资源的资源组的名称。 名称不区分大小写。

resourceProviderNamespace

string

资源提供程序的命名空间。

parentResourcePath

string

父资源标识。

resourceType

string

资源类型。

resourceName

string

要删除的资源的名称。

apiVersion

string

用于作的 API 版本。

options
ResourcesDeleteOptionalParams

选项参数。

返回

Promise<@azure/core-lro.SimplePollerLike<OperationState<void>, void>>

beginDeleteAndWait(string, string, string, string, string, string, ResourcesDeleteOptionalParams)

删除资源。

function beginDeleteAndWait(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, apiVersion: string, options?: ResourcesDeleteOptionalParams): Promise<void>

参数

resourceGroupName

string

包含要删除的资源的资源组的名称。 名称不区分大小写。

resourceProviderNamespace

string

资源提供程序的命名空间。

parentResourcePath

string

父资源标识。

resourceType

string

资源类型。

resourceName

string

要删除的资源的名称。

apiVersion

string

用于作的 API 版本。

options
ResourcesDeleteOptionalParams

选项参数。

返回

Promise<void>

beginDeleteById(string, string, ResourcesDeleteByIdOptionalParams)

按 ID 删除资源。

function beginDeleteById(resourceId: string, apiVersion: string, options?: ResourcesDeleteByIdOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>

参数

resourceId

string

资源的完全限定 ID,包括资源名称和资源类型。 使用格式 /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}

apiVersion

string

用于作的 API 版本。

options
ResourcesDeleteByIdOptionalParams

选项参数。

返回

Promise<@azure/core-lro.SimplePollerLike<OperationState<void>, void>>

beginDeleteByIdAndWait(string, string, ResourcesDeleteByIdOptionalParams)

按 ID 删除资源。

function beginDeleteByIdAndWait(resourceId: string, apiVersion: string, options?: ResourcesDeleteByIdOptionalParams): Promise<void>

参数

resourceId

string

资源的完全限定 ID,包括资源名称和资源类型。 使用格式 /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}

apiVersion

string

用于作的 API 版本。

options
ResourcesDeleteByIdOptionalParams

选项参数。

返回

Promise<void>

beginMoveResources(string, ResourcesMoveInfo, ResourcesMoveResourcesOptionalParams)

要移动的资源必须位于正在使用的源订阅中的同一个源资源组中。 目标资源组可能位于不同的订阅中。 移动资源时,源组和目标组在作期间均处于锁定状态。 在移动完成之前,将阻止对组执行写入和删除作。

function beginMoveResources(sourceResourceGroupName: string, parameters: ResourcesMoveInfo, options?: ResourcesMoveResourcesOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>

参数

sourceResourceGroupName

string

源订阅中要移动的资源的资源组的名称。

parameters
ResourcesMoveInfo

移动资源的参数。

options
ResourcesMoveResourcesOptionalParams

选项参数。

返回

Promise<@azure/core-lro.SimplePollerLike<OperationState<void>, void>>

beginMoveResourcesAndWait(string, ResourcesMoveInfo, ResourcesMoveResourcesOptionalParams)

要移动的资源必须位于正在使用的源订阅中的同一个源资源组中。 目标资源组可能位于不同的订阅中。 移动资源时,源组和目标组在作期间均处于锁定状态。 在移动完成之前,将阻止对组执行写入和删除作。

function beginMoveResourcesAndWait(sourceResourceGroupName: string, parameters: ResourcesMoveInfo, options?: ResourcesMoveResourcesOptionalParams): Promise<void>

参数

sourceResourceGroupName

string

源订阅中要移动的资源的资源组的名称。

parameters
ResourcesMoveInfo

移动资源的参数。

options
ResourcesMoveResourcesOptionalParams

选项参数。

返回

Promise<void>

beginUpdate(string, string, string, string, string, string, GenericResource, ResourcesUpdateOptionalParams)

更新资源。

function beginUpdate(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, apiVersion: string, parameters: GenericResource, options?: ResourcesUpdateOptionalParams): Promise<SimplePollerLike<OperationState<GenericResource>, GenericResource>>

参数

resourceGroupName

string

资源的资源组的名称。 名称不区分大小写。

resourceProviderNamespace

string

资源提供程序的命名空间。

parentResourcePath

string

父资源标识。

resourceType

string

要更新的资源的资源类型。

resourceName

string

要更新的资源的名称。

apiVersion

string

用于作的 API 版本。

parameters
GenericResource

用于更新资源的参数。

options
ResourcesUpdateOptionalParams

选项参数。

返回

Promise<@azure/core-lro.SimplePollerLike<OperationState<GenericResource>, GenericResource>>

beginUpdateAndWait(string, string, string, string, string, string, GenericResource, ResourcesUpdateOptionalParams)

更新资源。

function beginUpdateAndWait(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, apiVersion: string, parameters: GenericResource, options?: ResourcesUpdateOptionalParams): Promise<GenericResource>

参数

resourceGroupName

string

资源的资源组的名称。 名称不区分大小写。

resourceProviderNamespace

string

资源提供程序的命名空间。

parentResourcePath

string

父资源标识。

resourceType

string

要更新的资源的资源类型。

resourceName

string

要更新的资源的名称。

apiVersion

string

用于作的 API 版本。

parameters
GenericResource

用于更新资源的参数。

options
ResourcesUpdateOptionalParams

选项参数。

返回

Promise<GenericResource>

beginUpdateById(string, string, GenericResource, ResourcesUpdateByIdOptionalParams)

按 ID 更新资源。

function beginUpdateById(resourceId: string, apiVersion: string, parameters: GenericResource, options?: ResourcesUpdateByIdOptionalParams): Promise<SimplePollerLike<OperationState<GenericResource>, GenericResource>>

参数

resourceId

string

资源的完全限定 ID,包括资源名称和资源类型。 使用格式 /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}

apiVersion

string

用于作的 API 版本。

parameters
GenericResource

更新资源参数。

options
ResourcesUpdateByIdOptionalParams

选项参数。

返回

Promise<@azure/core-lro.SimplePollerLike<OperationState<GenericResource>, GenericResource>>

beginUpdateByIdAndWait(string, string, GenericResource, ResourcesUpdateByIdOptionalParams)

按 ID 更新资源。

function beginUpdateByIdAndWait(resourceId: string, apiVersion: string, parameters: GenericResource, options?: ResourcesUpdateByIdOptionalParams): Promise<GenericResource>

参数

resourceId

string

资源的完全限定 ID,包括资源名称和资源类型。 使用格式 /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}

apiVersion

string

用于作的 API 版本。

parameters
GenericResource

更新资源参数。

options
ResourcesUpdateByIdOptionalParams

选项参数。

返回

Promise<GenericResource>

beginValidateMoveResources(string, ResourcesMoveInfo, ResourcesValidateMoveResourcesOptionalParams)

此作检查是否可以将指定的资源移动到目标。 要移动的资源必须位于正在使用的源订阅中的同一个源资源组中。 目标资源组可能位于不同的订阅中。 如果验证成功,它将返回 HTTP 响应代码 204(无内容)。 如果验证失败,它将返回 HTTP 响应代码 409(冲突),并返回一条错误消息。 检索 Location 标头值中的 URL,以检查长时间运行的作的结果。

function beginValidateMoveResources(sourceResourceGroupName: string, parameters: ResourcesMoveInfo, options?: ResourcesValidateMoveResourcesOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>

参数

sourceResourceGroupName

string

源订阅中要验证要移动的资源的资源组的名称。

parameters
ResourcesMoveInfo

移动资源的参数。

返回

Promise<@azure/core-lro.SimplePollerLike<OperationState<void>, void>>

beginValidateMoveResourcesAndWait(string, ResourcesMoveInfo, ResourcesValidateMoveResourcesOptionalParams)

此作检查是否可以将指定的资源移动到目标。 要移动的资源必须位于正在使用的源订阅中的同一个源资源组中。 目标资源组可能位于不同的订阅中。 如果验证成功,它将返回 HTTP 响应代码 204(无内容)。 如果验证失败,它将返回 HTTP 响应代码 409(冲突),并返回一条错误消息。 检索 Location 标头值中的 URL,以检查长时间运行的作的结果。

function beginValidateMoveResourcesAndWait(sourceResourceGroupName: string, parameters: ResourcesMoveInfo, options?: ResourcesValidateMoveResourcesOptionalParams): Promise<void>

参数

sourceResourceGroupName

string

源订阅中要验证要移动的资源的资源组的名称。

parameters
ResourcesMoveInfo

移动资源的参数。

返回

Promise<void>

checkExistence(string, string, string, string, string, string, ResourcesCheckExistenceOptionalParams)

检查资源是否存在。

function checkExistence(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, apiVersion: string, options?: ResourcesCheckExistenceOptionalParams): Promise<ResourcesCheckExistenceResponse>

参数

resourceGroupName

string

包含要检查的资源的资源组的名称。 名称不区分大小写。

resourceProviderNamespace

string

要检查的资源的资源提供程序。

parentResourcePath

string

父资源标识。

resourceType

string

资源类型。

resourceName

string

要检查其是否存在的资源的名称。

apiVersion

string

用于作的 API 版本。

options
ResourcesCheckExistenceOptionalParams

选项参数。

返回

checkExistenceById(string, string, ResourcesCheckExistenceByIdOptionalParams)

按 ID 检查资源是否存在。

function checkExistenceById(resourceId: string, apiVersion: string, options?: ResourcesCheckExistenceByIdOptionalParams): Promise<ResourcesCheckExistenceByIdResponse>

参数

resourceId

string

资源的完全限定 ID,包括资源名称和资源类型。 使用格式 /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}

apiVersion

string

用于作的 API 版本。

返回

get(string, string, string, string, string, string, ResourcesGetOptionalParams)

获取资源。

function get(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, apiVersion: string, options?: ResourcesGetOptionalParams): Promise<GenericResource>

参数

resourceGroupName

string

包含要获取的资源的资源组的名称。 名称不区分大小写。

resourceProviderNamespace

string

资源提供程序的命名空间。

parentResourcePath

string

父资源标识。

resourceType

string

资源的资源类型。

resourceName

string

要获取的资源的名称。

apiVersion

string

用于作的 API 版本。

options
ResourcesGetOptionalParams

选项参数。

返回

Promise<GenericResource>

getById(string, string, ResourcesGetByIdOptionalParams)

按 ID 获取资源。

function getById(resourceId: string, apiVersion: string, options?: ResourcesGetByIdOptionalParams): Promise<GenericResource>

参数

resourceId

string

资源的完全限定 ID,包括资源名称和资源类型。 使用格式 /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}

apiVersion

string

用于作的 API 版本。

options
ResourcesGetByIdOptionalParams

选项参数。

返回

Promise<GenericResource>

list(ResourcesListOptionalParams)

获取订阅中的所有资源。

function list(options?: ResourcesListOptionalParams): PagedAsyncIterableIterator<GenericResourceExpanded, GenericResourceExpanded[], PageSettings>

参数

options
ResourcesListOptionalParams

选项参数。

返回

listByResourceGroup(string, ResourcesListByResourceGroupOptionalParams)

获取资源组的所有资源。

function listByResourceGroup(resourceGroupName: string, options?: ResourcesListByResourceGroupOptionalParams): PagedAsyncIterableIterator<GenericResourceExpanded, GenericResourceExpanded[], PageSettings>

参数

resourceGroupName

string

包含要获取的资源的资源组。

返回