共用方式為


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)

依標識碼建立資源。

beginCreateOrUpdateByIdAndWait(string, string, GenericResource, ResourcesCreateOrUpdateByIdOptionalParams)

依標識碼建立資源。

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

刪除資源。

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

刪除資源。

beginDeleteById(string, string, ResourcesDeleteByIdOptionalParams)

依標識碼刪除資源。

beginDeleteByIdAndWait(string, string, ResourcesDeleteByIdOptionalParams)

依標識碼刪除資源。

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)

依標識碼更新資源。

beginUpdateByIdAndWait(string, string, GenericResource, ResourcesUpdateByIdOptionalParams)

依標識碼更新資源。

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)

依標識碼檢查資源是否存在。 此 API 目前僅適用於一組有限的資源提供者。 如果資源提供者未實作此 API,ARM 會以 405 回應。 接著,替代方法是使用 GET API 來檢查資源是否存在。

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

取得資源。

getById(string, string, ResourcesGetByIdOptionalParams)

依標識碼取得資源。

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)

依標識碼建立資源。

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

參數

resourceId

string

資源的完整標識碼,包括資源名稱和資源類型。 使用 /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)

依標識碼建立資源。

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

參數

resourceId

string

資源的完整標識碼,包括資源名稱和資源類型。 使用 /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)

依標識碼刪除資源。

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

參數

resourceId

string

資源的完整標識碼,包括資源名稱和資源類型。 使用 /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)

依標識碼刪除資源。

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

參數

resourceId

string

資源的完整標識碼,包括資源名稱和資源類型。 使用 /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)

依標識碼更新資源。

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

參數

resourceId

string

資源的完整標識碼,包括資源名稱和資源類型。 使用 /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)

依標識碼更新資源。

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

參數

resourceId

string

資源的完整標識碼,包括資源名稱和資源類型。 使用 /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)

依標識碼檢查資源是否存在。 此 API 目前僅適用於一組有限的資源提供者。 如果資源提供者未實作此 API,ARM 會以 405 回應。 接著,替代方法是使用 GET API 來檢查資源是否存在。

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

參數

resourceId

string

資源的完整標識碼,包括資源名稱和資源類型。 使用 /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)

依標識碼取得資源。

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

參數

resourceId

string

資源的完整標識碼,包括資源名稱和資源類型。 使用 /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

要取得的資源群組。

傳回