az providerhub resource-type-registration

注意

此參考是 Azure CLI 的 providerhub 延伸模組的一部分 (2.15.0 版或更高版本)。 擴充功能會在您第一次執行 az providerhub resource-type-registration 命令時自動安裝。 深入了解擴充功能。

使用 providerhub 管理資源類型註冊。

命令

名稱 Description 類型 狀態
az providerhub resource-type-registration create

建立資源類型。

擴充 GA
az providerhub resource-type-registration delete

刪除資源類型。

擴充 GA
az providerhub resource-type-registration list

取得指定提供者的資源類型清單。

擴充 GA
az providerhub resource-type-registration show

取得指定訂用帳戶和提供者中的資源類型詳細資料。

擴充 GA

az providerhub resource-type-registration create

建立資源類型。

az providerhub resource-type-registration create --provider-namespace
                                                 --resource-type
                                                 [--allowed-unauthorized-actions]
                                                 [--auth-mappings]
                                                 [--check-name-availability-specifications]
                                                 [--creation-begin]
                                                 [--dav]
                                                 [--default-api-version]
                                                 [--deletion-policy {CascadeDeleteAll, CascadeDeleteProxyOnlyChildren, NotSpecified}]
                                                 [--enable-async-operation {false, true}]
                                                 [--enable-third-party-s2s {false, true}]
                                                 [--endpoints]
                                                 [--extended-locations]
                                                 [--identity-management]
                                                 [--is-pure-proxy {false, true}]
                                                 [--linked-access-checks]
                                                 [--logging-rules]
                                                 [--marketplace-type {AddOn, Bypass, NotSpecified, Store}]
                                                 [--opt-in-headers {ClientGroupMembership, NotSpecified, SignedAuxiliaryTokens, SignedUserToken, UnboundedClientGroupMembership}]
                                                 [--override-actions]
                                                 [--patch-begin]
                                                 [--regionality {Global, NotSpecified, Regional}]
                                                 [--req-features-policy {All, Any}]
                                                 [--required-features]
                                                 [--resource-move-policy]
                                                 [--routing-type]
                                                 [--service-tree-infos]
                                                 [--soft-delete-ttl]
                                                 [--sub-state-rules]
                                                 [--swagger-specifications]
                                                 [--template-deployment-options]
                                                 [--throttling-rules]

範例

ResourceTypeRegistrations_CreateOrUpdate

az providerhub resource-type-registration create     --endpoints api-versions="2019-01-01" locations="Global"     required-features="Microsoft.Contoso/RPaaSSampleApp"     extension-endpoint-uri="https://contoso-test-extension-endpoint.com/"     extension-categories="ResourceReadValidate" extension-categories="ResourceDeletionValidate"     --regionality "Global"     --routing-type "ProxyOnly"     --swagger-specifications api-versions="2019-01-01"     swagger-spec-folder-uri="https://github.com/pathtoresourceproviderswaggerspecfolder"     --provider-namespace "Microsoft.Contoso"     --enable-async-operation false     --template-deployment-options preflight-supported="true"     preflight-options="DefaultValidationOnly" preflight-options="continueDeploymentOnFailure"     --resource-type "testResourceType"

必要參數

--provider-namespace

在 ProviderHub 內裝載的資源提供者名稱。

--resource-type

資源類型。

選擇性參數

--allowed-unauthorized-actions --aua

允許的未經授權動作。

使用方式:--allowed-unauthorized-actions 「Microsoft.Contoso/rpResourceType/read, Microsoft.Contoso/rpResourceType/delete」。

--auth-mappings --authorization-action-mappings

允許 RP 針對 ARM 的 RBAC 用途覆寫動作動詞。

使用方式:--auth-mappings original=XX desired=XX

original:必要。 原始動作名稱。 desired:必要。 所需的動作名稱。

您可以使用多個 --auth-mappings 引數來指定多個動作。

--check-name-availability-specifications --checkname-specs

平台層級的名稱可用性檢查功能。

使用量:--check-name-availability-specifications enable-default-validation=XX resource-types-with-custom-validation=XX

enable-default-validation:布林值,指出 RP 是否退出宣告 RPaaS 來執行檢查名稱。 resource-types-with-custom-validation:需要 RP 額外驗證的類型。

--creation-begin --resource-creation-begin

處理資源建立的延伸模組選項會開始延伸模組要求。

使用方式:--creation-begin request=XX response=XX 要求:擴充選項類型清單。 response:擴充選項類型的清單。

--dav --disallowed-action-verbs

不允許的動作動詞。

使用方式:-dav 「read」。

--default-api-version

端點的預設 API 版本。

使用量:--default-api-version 「2021-01-01」。

--deletion-policy --resource-deletion-policy

資源刪除原則。

使用方式:--delete-policy 「CascadeDeleteAll」。

接受的值: CascadeDeleteAll, CascadeDeleteProxyOnlyChildren, NotSpecified
--enable-async-operation

指出是否為此資源類型啟用非同步作業。

使用方式:--enable-async-operation 「false」。

接受的值: false, true
--enable-third-party-s2s

指出是否為此資源類型啟用協力廠商 s2。

使用方式:--enable-third-party-s2s 「false」。

接受的值: false, true
--endpoints

資源類型端點。

使用量:--endpoints api-versions=XX locations=XX required-features=XX api-versions:必要。 以逗號分隔的 API 版本清單。 locations:必要。 以逗號分隔的位置清單。 required-features:必要。 必要功能清單。 您可以指定多個必要功能。 您可以使用多個 --endpoints 引數來指定多個動作。

--extended-locations

擴充位置選項。

使用方式:--extended-locations type=XX supported-policy=XX

type:擴充位置類型。 supported-policy:支援的原則。

您可以使用多個 --extended-locations 引數來指定多個動作。

--identity-management

MSI 相關設定。

使用方式:--identity-management type=XX application-id=XX

type:身分識別管理的型別。 application-id:處理身分識別的應用程式識別碼。

--is-pure-proxy

指出這是否為 PureProxy 資源類型。

使用方式:--is-pure-proxy 「false」。

接受的值: false, true
--linked-access-checks

啟用其他角色型存取控制 (RBAC) 檢查相關資源。

使用方式:--linked-access-checks action-name=XX linked-property=XX linked-action=XX linked-action-verb=XX linked-type=XX

action-name:動作名稱。 linked-property:連結的屬性。 linked-action:連結的動作。 linked-action-verb:連結動作動詞。 linked-type:連結的類型。

您可以使用多個 --linked-access-checks 引數來指定多個動作。

--logging-rules

記錄規則。

使用方式:--logging-rules action=XX direction=XX detail-level=XX

action:必要。 動作名稱。 方向:必要。 方向。 詳細層級:必要。 詳細資料層級。

您可以使用多個 --logging-rules 引數來指定多個動作。

--marketplace-type

資源類型的市集行為類型。

使用方式:--marketplace-type 「AddOn」。

接受的值: AddOn, Bypass, NotSpecified, Store
--opt-in-headers

加入宣告標頭。

使用方式:--opt-in-headers 「SignedUserToken」。

接受的值: ClientGroupMembership, NotSpecified, SignedAuxiliaryTokens, SignedUserToken, UnboundedClientGroupMembership
--override-actions --subscription-state-override-actions

訂閱狀態覆寫動作。

使用量:--subscription-state-override-actions state=XX action=XX

您可以使用多個 --subscription-state-override-actions 引數來指定多個動作。

--patch-begin --resource-patch-begin

處理資源修補程式的擴充選項會開始延伸模組要求。

使用方式:--patch-begin request=XX response=XX request:擴充選項類型清單。 response:擴充選項類型的清單。

--regionality

資源類型的區域性。

使用方式:-區域性「區域」。

接受的值: Global, NotSpecified, Regional
--req-features-policy --required-features-policy

接受的值是 「Any」 或 「All」。 如果值為 「All」,則只允許註冊至所有對應功能旗標的訂用帳戶。.

使用量:--req-features-policy 「All」。

接受的值: All, Any
--required-features

必要的功能。

使用方式:-required-features 「Microsoft.Contoso/feature1, Microsoft.Contoso/feature2」。

--resource-move-policy

資源移動原則。

使用量:--resource-move-policy validation-required=XX cross-resource-group-move-enabled=XX cross-subscription-move-enabled=XX

需要驗證:布林值,指出移動資源是否需要驗證。 已啟用 cross-resource-group-move-enabled:布林值,指出是否允許跨資源群組移動資源。 已啟用跨訂用帳戶移動:布林值,指出是否允許跨訂用帳戶移動資源。

--routing-type

資源路由類型。.

使用方式:--routing-type 「Default」

可用的路由類型包括:Default、ProxyOnly、HostBased、Extension、Tenant、Fanout、LocationBased、Failover、CascadeExtension、ChildFanout、CascadeAuthorizedExtension、BypassEndpointSelectionOptimization。

--service-tree-infos

資源提供者的 ServiceTree 資訊。

使用量:--service-tree-infos service-id=XX component-id=XX

service-id:必要。 服務識別碼。component-id:必要。 元件識別碼。

您可以使用多個 --service-tree-infos 引數來指定多個動作。

--soft-delete-ttl

虛刪除存留時間。

--sub-state-rules --subscription-state-rules

訂用帳戶狀態規則。

使用方式:--sub-state-rules state=XX allowed-actions=XX

state:訂閱狀態。 allowed-actions:允許的動作。

您可以使用多個 --sub-state-rules 引數來指定多個動作。

--swagger-specifications

資源類型的 Swagger 規格。

使用方式:--swagger-specifications api-versions=XX swagger-spec-folder-uri=XX

api-versions:必要。 資源類型 API 版本,以逗號分隔。 swagger-spec-folder-uri:必要。 Swagger 規格 URI。

您可以使用多個 --swagger-specifications 引數來指定多個動作。

--template-deployment-options --tmplt-deploy-opt

範本部署選項。

使用方式:--template-deployment-options preflight-supported=XX preflight-options=XX

預檢支援:布林值,指出是否支援預檢驗證。 preflight-options:預檢選項。

--throttling-rules

啟用針對要求數目或資源數目的不同動作設定個別限制(僅適用于集合讀取要求)。

使用方式:--throttling-rules action=XX metrics=XX required-features=XX

action:必要。 動作名稱。 計量:必要。 節流計量。 required-features:節流規則所需的功能。

您可以使用多個 --throttling-rules 引數來指定多個動作。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az providerhub resource-type-registration delete

刪除資源類型。

az providerhub resource-type-registration delete [--ids]
                                                 [--provider-namespace]
                                                 [--resource-type]
                                                 [--subscription]
                                                 [--yes]

範例

ResourceTypeRegistrations_Delete

az providerhub resource-type-registration delete --provider-namespace "Microsoft.Contoso" --resource-type "testResourceType"

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--provider-namespace

在 ProviderHub 內裝載的資源提供者名稱。

--resource-type

資源類型。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--yes -y

不提示確認。

預設值: False
全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az providerhub resource-type-registration list

取得指定提供者的資源類型清單。

az providerhub resource-type-registration list --provider-namespace

範例

ResourceTypeRegistrations_ListByProviderRegistration

az providerhub resource-type-registration list --provider-namespace "Microsoft.Contoso"

必要參數

--provider-namespace

在 ProviderHub 內裝載的資源提供者名稱。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az providerhub resource-type-registration show

取得指定訂用帳戶和提供者中的資源類型詳細資料。

az providerhub resource-type-registration show [--ids]
                                               [--provider-namespace]
                                               [--resource-type]
                                               [--subscription]

範例

ResourceTypeRegistrations_Get

az providerhub resource-type-registration show --provider-namespace "Microsoft.Contoso" --resource-type "employees"

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--provider-namespace

在 ProviderHub 內裝載的資源提供者名稱。

--resource-type

資源類型。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。