azure-cli

How to populate a CosmosDB collection by command line?

耗尽温柔 提交于 2020-07-23 03:58:05
问题 I am developing a set of Scripts for Azure and I would like to know how to populate a CosmosDB collection with az . Currently, I know how to create a Database and Collection but how to initialize the Database? az cosmosdb create \ --resource-group $RESOURCE_GROUP \ --name $COSMOS_DB_ACCOUNT az cosmosdb database create \ --resource-group-name $RESOURCE_GROUP \ --name $COSMOS_DB_ACCOUNT \ --db-name $COSMOS_DB_NAME az cosmosdb collection create \ --resource-group-name $RESOURCE_GROUP \ --name

How to populate a CosmosDB collection by command line?

丶灬走出姿态 提交于 2020-07-23 03:57:34
问题 I am developing a set of Scripts for Azure and I would like to know how to populate a CosmosDB collection with az . Currently, I know how to create a Database and Collection but how to initialize the Database? az cosmosdb create \ --resource-group $RESOURCE_GROUP \ --name $COSMOS_DB_ACCOUNT az cosmosdb database create \ --resource-group-name $RESOURCE_GROUP \ --name $COSMOS_DB_ACCOUNT \ --db-name $COSMOS_DB_NAME az cosmosdb collection create \ --resource-group-name $RESOURCE_GROUP \ --name

Azure CLI run-command invoke RunPowerShellScript with parameters

做~自己de王妃 提交于 2020-07-07 11:03:00
问题 I've been trying to run a script on an Azure VM that requires parameters passed to it like so; az vm run-command invoke -g <resource group> -n <vm name> --command-id RunPowerShellScript --scripts "@....\Desktop\write-host.ps1" --parameters First Second I have done this succesfully using the AzureRM modules in the following way; Invoke-AzureRmVMRunCommand -ResourceGroupName <resource group> -VMName <vm name> -CommandId "RunPowerShellScript" -ScriptPath "....\Desktop\write-host.ps1" -Parameter

Azure CLI run-command invoke RunPowerShellScript with parameters

有些话、适合烂在心里 提交于 2020-07-07 11:00:05
问题 I've been trying to run a script on an Azure VM that requires parameters passed to it like so; az vm run-command invoke -g <resource group> -n <vm name> --command-id RunPowerShellScript --scripts "@....\Desktop\write-host.ps1" --parameters First Second I have done this succesfully using the AzureRM modules in the following way; Invoke-AzureRmVMRunCommand -ResourceGroupName <resource group> -VMName <vm name> -CommandId "RunPowerShellScript" -ScriptPath "....\Desktop\write-host.ps1" -Parameter

How to get the list of variable of release pipelines in Azure devops using Azure CLI

廉价感情. 提交于 2020-06-29 04:53:08
问题 I am Using Azure CLI, What I want to get the list of variable used in release pipeline . Current I am able to get the list of variable used in build pipeline using command az pipelines variable List Please let know how can I get the list of variables used in release pipeline using CLI "through console I don't want as it is difficult to copy and paste all variable used in release pipeline" 回答1: How to get the list of variable of release pipelines in Azure devops using Azure CLI There's no

Azure CLI edit Content Type file property

徘徊边缘 提交于 2020-06-17 15:53:07
问题 I'm trying to update Content Type property of a file located in my Azure $web blob container using Azure CLI. I'm trying to do this because it's wrongly set and my service-worker.js (for my PWA) needs to have "application/javascript" instead of "text/plain; charset=utf-8" in order to be registered. 回答1: When using Azure cli, you should use az storage blob update. The sample code: az storage blob update --container-name xxx --name xxx --account-key xxx --account-name xxx --content-type

Azure CLI edit Content Type file property

微笑、不失礼 提交于 2020-06-17 15:50:27
问题 I'm trying to update Content Type property of a file located in my Azure $web blob container using Azure CLI. I'm trying to do this because it's wrongly set and my service-worker.js (for my PWA) needs to have "application/javascript" instead of "text/plain; charset=utf-8" in order to be registered. 回答1: When using Azure cli, you should use az storage blob update. The sample code: az storage blob update --container-name xxx --name xxx --account-key xxx --account-name xxx --content-type

AKS creation through CLI fails: Reconcile standard load balancer failed

梦想的初衷 提交于 2020-06-15 04:37:32
问题 I have created the AKS using below CLI command on countless number of occasions. I had no problem until today. az aks create --resource-group rg --name ama --generate-ssh-keys --location southeastasia --aad-server-app-id xxxxx-xxxxxx-xxx-xxx-xxxxxxxxx --aad-server-app-secret @xxx?=1[xxx:xxx:xxxx:xxxx --aad-client-app-id xxxxx-xxx-xxx-xxx-xxx --client-secret xxxxx-xxx-xxx-xxxx-xxxxxxxx --aad-tenant-id xxxx-xxxx-xxxx-xxxx-xxxx --service-principal xxxxx-xxxx-xxxx-xxxx-xxxxxxx --node-count 3

ARM Template: Incorrect storage endpoint for AppSettings, WEBSITE_CONTENTSHARE

左心房为你撑大大i 提交于 2020-06-13 07:57:49
问题 Getting error when deploying Azure function to USGov Arizona using ARM template. Template works in Azure commercial. Error is: 12:34:11 - 12:33:27 PM - Resource Microsoft.Web/sites/config 'SFGovAppService/appsettings' failed with message '{ 12:34:11 - "Code": "BadRequest", 12:34:11 - "Message": "There was a conflict. The remote name could not be resolved: 'sftestgovstorage.file.core.windows.net'", 12:34:11 - "Target": null, 12:34:11 - "Details": [ 12:34:11 - { 12:34:11 - "Message": "There was

Secret name is not supporting special character

杀马特。学长 韩版系。学妹 提交于 2020-04-30 10:13:44
问题 I have a requirement where I need to store my secret name as fname_lname. But when I tried with underscore I got following error. For time being to bypass the error I wrote a utility to convert from underscore to hyphen and vice versa. Is there any reason why there is no support for basic special character like underscore? az keyvault secret set --vault-name 'my-kv' -n 'fname_lname' -v 'myvalue' parameter 'secret_name' must conform to the following pattern: '^[0-9a-zA-Z-]+$'. 回答1: It seems