Madhu
Madhu

Reputation: 439

How to generate a 'label' using a json file in app configuration service?

I'm trying to import a json file into Azure app configuration service using cli command: az appconfig kv import.

Sample json file

{
    "Pss": {
        "account/getall/get": "read",
        "account/setall/put": "write",
        "account/someendpoint/somevalue": "profile"
    }
}

I can see below preview in cli

Adding:
{"key": "Pss:account/getall/get", "value": "\"read\""}
{"key": "Pss:account/setall/put", "value": "\"write\""}
{"key": "Pss:account/someendpoint/somevalue", "value": "\"profile\""}

Labels are created as (No label) in app configuration service.

enter image description here

Could you please suggest to me what changes need to be done in the json file to generate label values?

Thanks in advance.

Upvotes: 0

Views: 554

Answers (1)

anon
anon

Reputation:

Below command will helps you to get the label name:

az appconfig kv import --name hkappconfig --label testingLabelName --source file --path /home/hari/Import.json --format json --separator . --content-type "application/json

enter image description here

By adding the attribute --label labelName in the Importing az cli command, You will get the label name in the configuration explorer of the app configuration.

Output:

enter image description here

Upvotes: 1

Related Questions