我想使用 azure devops cli 来使用 WIQL 或保存的查询来查询工作项。我尝试在 azure cli 文档和azboard中查找,但它通过工作项 ID 进行查询。谁能告诉我如何使用 az cli 查询工作项。
我正在尝试使用az pipelines管道中的 cli 更新变量组中的变量,我创建了一个 PAT 并将其传递到管道,其工作正常。但我使用默认的,例如$(System.AccessToken)它能够列出变量组中的变量,但无法更新变量组。其曰
错误:您无权对变量组执行此操作。变量组管理员应将您添加到管理员角色。##[错误]脚本失败,退出代码:1
经过一番搜索,我发现我需要将 Project Collection Build Service ( name ) 添加为变量组中的管理员,然后重试。我已经添加了这一点,但我仍然遇到同样的错误。有什么建议么?
我使用的是经典管道,这是从管道导出的任务。
steps
- task: AzureCLI@2
displayName: 'Azure CLI '
inputs:
azureSubscription: 'sc'
scriptType: pscore
scriptLocation: inlineScript
inlineScript: |
az extension add --name azure-devops
az pipelines variable-group variable list --group-id id --org "orgname" --project "projectname"
az pipelines variable-group variable update --group-id id --name apim-service-name --value $(str_tf_module_containername) --org "orgname" --project "projectname"
env:
AZURE_DEVOPS_EXT_PAT: $(System.AccessToken)
Run Code Online (Sandbox Code Playgroud) azure azure-cli azure-devops azure-pipelines azure-pipelines-yaml
我正在尝试通过 GitHub 操作在我的 azure ML 工作区上创建数据集
我已经创建了一个数据存储并将数据上传到该数据存储,当我尝试使用 cli 创建数据集时,出现以下错误:
'create' is misspelled or not recognized by the system.
这是我使用的命令:
> az ml dataset create
-n insurance_dataset
--resource-group rg-name
--workspace-name ml-ws-name
-p 'file:azureml/datastore/$(az ml datastore show-default -w ml-ws-name -g rg-name --query name -o tsv)/insurance/insurance.csv'
Run Code Online (Sandbox Code Playgroud)
知道我做错了什么吗?
我创建了一个 bash 脚本,因为我想通过 Jenkins 作业启动和停止虚拟机。脚本内容如下
set -x
applicationId = "xxxxxxxxxxxxxxxx"
tenantID="xxxxxxxxxxxxxxxxx"
password = "jenkins"
az login --service-principal --username "${applicationId}" --password "{$password}" --tenant "{tenantID}"
export resource_group=rg_networking
# declare an array variable
declare -a host_list=("<Array of Host Space sepperated>")
## now loop through the above array
for i in "${host_list[@]}"
do
echo "Stopping Virtual Machine $i"
az vm stop --name "${i}" --resource-group "${resource_group}"
done
exit 0
Run Code Online (Sandbox Code Playgroud)
运行 Jenkins 作业时收到的错误消息如下:
Get Token request returned http error: 400 and server response: {"error":"invalid_request","error_description":"AADSTS90002: Requested …Run Code Online (Sandbox Code Playgroud) 我正在尝试运行一个脚本来计算我的天蓝色存储帐户的大小。我这样做是因为我无权访问计费部分。
该脚本取自这里
我的存储帐户约为 2TB,但我想找出每个容器的单独大小。
当我在 azure cloud shell 中运行脚本时,20 分钟后超时。有办法让它活下去吗?
我正在测试一些脚本,需要一种方法来计算容器中有多少 blob。
我可以使用以下方法列出 blob:
az storage blob list --container-name "xxx" --account-key "xxx" --account-name "xxx" -o table
Run Code Online (Sandbox Code Playgroud)
但是我如何得到一个计数?
我尝试使用 --query length 但它不起作用。
我通过门户在天蓝色中创建了许多资源。如何使用 PowerShell 或 CLI 将标签添加到每个现有资源?
我想在不使用门户(指标)的情况下检索天蓝色存储帐户的大小。如何通过 azure CLI 或 bash 脚本获取存储帐户的指标?有没有办法通过 azure CLI 或任何 bash 脚本来实现这一点?
azure azure-storage azure-cli azure-blob-storage azure-metrics-advisor
我在 ADO 中创建了一个自定义的团队组,并尝试使用 azure cli 添加团队管理员,但没有找到任何相关的 az devops 命令!有什么方法可以使用 azure cli 添加团队管理员吗?
azure-cli ×9
azure ×6
azure-devops ×3
azure-cli2 ×1
azure-machine-learning-service ×1
azuremlsdk ×1
bash ×1
powershell ×1
syntax ×1