az codespace secret

Manage plan secrets.

Commands

az codespace secret create

Create a plan secret.

az codespace secret delete

Delete a plan secret.

az codespace secret list

List plan secrets.

az codespace secret update

Update a plan secret.

az codespace secret create

Create a plan secret.

az codespace secret create --name
                           --plan
                           --value
                           [--filters]
                           [--note]
                           [--resource-group]

Examples

Create a plan secret.

az codespace secret create -g my-rg --plan my-plan --name API_KEY --value "secretkey" --note "service api key"

Create a plan secret with filters.

az codespace secret create -g my-rg --plan my-plan --name API_KEY --value "secretkey" --filters GitRepo=https://github.com/repo/name CodespaceName=mycodespace

Required Parameters

--name -n

Name of the secret.

--plan -p

Name or ID of the Codespace plan.

--value

Value of the secret.

Optional Parameters

--filters

Space-separated filters: type=value [type=value ...]. Use "" to clear existing filters. Allowed types: GitRepo, CodespaceName.

--note

Note for the secret.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az codespace secret delete

Delete a plan secret.

az codespace secret delete --id
                           --plan
                           [--resource-group]

Examples

Delete a plan secret.

az codespace secret delete -g my-rg --plan my-plan --id 00000000-0000-0000-0000-000000000000

Required Parameters

--id

Id of the secret.

--plan -p

Name or ID of the Codespace plan.

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az codespace secret list

List plan secrets.

az codespace secret list --plan
                         [--resource-group]

Examples

List plan secrets.

az codespace secret list -g my-rg --plan my-plan

Required Parameters

--plan -p

Name or ID of the Codespace plan.

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az codespace secret update

Update a plan secret.

az codespace secret update --id
                           --plan
                           [--filters]
                           [--name]
                           [--note]
                           [--resource-group]
                           [--value]

Examples

Update a plan secret with new values.

az codespace secret update -g my-rg --plan my-plan --id 00000000-0000-0000-0000-000000000000 --name API_KEY --value "newsecretkey" --note "service api key"

Update a plan secret with new filters.

az codespace secret update -g my-rg --plan my-plan --id 00000000-0000-0000-0000-000000000000 --filters GitRepo=https://github.com/repo/name CodespaceName=mycodespace

Update a plan secret and clear existing filters.

az codespace secret update -g my-rg --plan my-plan --id 00000000-0000-0000-0000-000000000000 --filters ''

Required Parameters

--id

Id of the secret.

--plan -p

Name or ID of the Codespace plan.

Optional Parameters

--filters

Space-separated filters: type=value [type=value ...]. Use "" to clear existing filters. Allowed types: GitRepo, CodespaceName.

--name -n

Name of the secret.

--note

Note for the secret.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--value

Value of the secret.