az customlocation

注意

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

建立、取得、列出和刪除 CustomLocations 的命令。

命令

名稱 Description 類型 狀態
az customlocation create

建立自訂位置。

擴充 GA
az customlocation delete

刪除 Customlocation。

擴充 GA
az customlocation list

列出 CustomLocations 的命令。

擴充 GA
az customlocation list-enabled-resource-types

取得 CustomLocation 的已啟用資源類型詳細資料。

擴充 GA
az customlocation patch

修補自訂位置。

擴充 GA
az customlocation show

取得 Customlocation 的詳細資料。

擴充 GA
az customlocation update

更新自訂位置。

擴充 GA

az customlocation create

建立自訂位置。

az customlocation create --cluster-extension-ids
                         --host-resource-id
                         --name
                         --namespace
                         --resource-group
                         [--assign-identity]
                         [--kubeconfig]
                         [--location]
                         [--tags]

必要參數

--cluster-extension-ids -c

叢集延伸模組識別碼的空間分隔清單 - 輸入格式為 /subscription/.../resourceGroups/.../Microsoft.Kubernetes/connectedClusters/.../providers/Microsoft.KubernetesConfiguration/extensions/...

--host-resource-id

已連線叢集的主機資源識別碼。

--name -n

Customlocation 的名稱。

--namespace

自訂位置的命名空間。 針對命名空間範圍延伸模組,這應該符合與叢集擴充運算子相關聯的命名空間。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

選擇性參數

--assign-identity

使用 「SystemAssigned」 或 「None」 類型身分識別建立 CustomLocation 資源。

--kubeconfig -k

管理員叢集的 Kubeconfig。 如果叢集是未啟用 AAD 的叢集,則需要以檔案的形式傳入。

--location -l

位置。​​ 來自的值: az account list-locations 。 您可以使用 來設定預設位置 az configure --defaults location=<location>

--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「」 清除現有的標記。

全域參數
--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 customlocation delete

刪除 Customlocation。

az customlocation delete --name
                         --resource-group
                         [--yes]

必要參數

--name -n

Customlocation 的名稱。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

選擇性參數

--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 customlocation list

列出 CustomLocations 的命令。

az customlocation list [--resource-group]

選擇性參數

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

全域參數
--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 customlocation list-enabled-resource-types

取得 CustomLocation 的已啟用資源類型詳細資料。

az customlocation list-enabled-resource-types --name
                                              --resource-group

必要參數

--name -n

Customlocation 的名稱。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

全域參數
--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 customlocation patch

修補自訂位置。

az customlocation patch --name
                        --resource-group
                        [--assign-identity]
                        [--cluster-extension-ids]
                        [--display-name]
                        [--host-resource-id]
                        [--location]
                        [--namespace]
                        [--tags]

必要參數

--name -n

Customlocation 的名稱。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

選擇性參數

--assign-identity

使用 「SystemAssigned」 或 「None」 類型身分識別建立 CustomLocation 資源。

--cluster-extension-ids -c

叢集延伸模組識別碼的空間分隔清單 - 輸入格式為 /subscription/.../resourceGroups/.../Microsoft.Kubernetes/connectedClusters/.../providers/Microsoft.KubernetesConfiguration/extensions/...

--display-name -d

自訂位置的顯示名稱。

--host-resource-id

已連線叢集的主機資源識別碼。

--location -l

位置。​​ 來自的值: az account list-locations 。 您可以使用 來設定預設位置 az configure --defaults location=<location>

--namespace

自訂位置的命名空間。 針對命名空間範圍延伸模組,這應該符合與叢集擴充運算子相關聯的命名空間。

--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「」 清除現有的標記。

全域參數
--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 customlocation show

取得 Customlocation 的詳細資料。

az customlocation show --name
                       --resource-group

必要參數

--name -n

Customlocation 的名稱。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

全域參數
--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 customlocation update

更新自訂位置。

az customlocation update --cluster-extension-ids
                         --host-resource-id
                         --name
                         --namespace
                         --resource-group
                         [--assign-identity]
                         [--location]
                         [--tags]

必要參數

--cluster-extension-ids -c

叢集延伸模組識別碼的空間分隔清單 - 輸入格式為 /subscription/.../resourceGroups/.../Microsoft.Kubernetes/connectedClusters/.../providers/Microsoft.KubernetesConfiguration/extensions/...

--host-resource-id

已連線叢集的主機資源識別碼。

--name -n

Customlocation 的名稱。

--namespace

自訂位置的命名空間。 針對命名空間範圍延伸模組,這應該符合與叢集擴充運算子相關聯的命名空間。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

選擇性參數

--assign-identity

使用 「SystemAssigned」 或 「None」 類型身分識別建立 CustomLocation 資源。

--location -l

自訂位置資源的位置。

--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「」 清除現有的標記。

全域參數
--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 來取得完整偵錯記錄。