Jaa


az apic environment

Note

This reference is part of the apic-extension extension for the Azure CLI (version 2.57.0 or higher). The extension will automatically install the first time you run an az apic environment command. Learn more about extensions.

Commands to manage environments in API Center.

Commands

Name Description Type Status
az apic environment create

Create a new environment or update an existing environment.

Extension GA
az apic environment delete

Delete the environment.

Extension GA
az apic environment list

List a collection of environments.

Extension GA
az apic environment show

Get details of the environment.

Extension GA
az apic environment update

Update existing environment.

Extension GA

az apic environment create

Create a new environment or update an existing environment.

az apic environment create --environment-id
                           --resource-group
                           --service-name
                           --title
                           --type {development, production, staging, testing}
                           [--custom-properties]
                           [--description]
                           [--onboarding]
                           [--server]

Examples

Create environment

az apic environment create -g api-center-test -n contosoeuap --environment-id public --title "Public cloud" --type "development"

Required Parameters

--environment-id

The id of the environment.

--resource-group -g

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

--service-name -n

The name of Azure API Center service.

--title

Environment title.

Property Value
Parameter group: Properties Arguments
--type

Environment type.

Property Value
Parameter group: Properties Arguments
Accepted values: development, production, staging, testing

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--custom-properties

The custom metadata defined for API catalog entities. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--description

Environment description.

Property Value
Parameter group: Properties Arguments
--onboarding

Provide onboarding documentation related to your environment, e.g. {developerPortalUri:['https://developer.contoso.com'],instructions:'instructions markdown'} Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--server

Server information of the environment. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az apic environment delete

Delete the environment.

az apic environment delete [--environment-id]
                           [--ids]
                           [--resource-group]
                           [--service-name]
                           [--subscription]
                           [--yes]

Examples

Delete environment

az apic environment delete -g api-center-test -n contosoeuap --environment-id public

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--environment-id

The id of the environment.

Property Value
Parameter group: Resource Id Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--service-name -n

The name of Azure API Center service.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
--yes -y

Do not prompt for confirmation.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az apic environment list

List a collection of environments.

az apic environment list --resource-group
                         --service-name
                         [--filter]
                         [--max-items]
                         [--next-token]

Examples

List environments

az apic environment list -g api-center-test -n contosoeuap

Required Parameters

--resource-group -g

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

--service-name -n

The name of Azure API Center service.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--filter

OData filter parameter.

--max-items

Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token argument of a subsequent command.

Property Value
Parameter group: Pagination Arguments
--next-token

Token to specify where to start paginating. This is the token value from a previously truncated response.

Property Value
Parameter group: Pagination Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az apic environment show

Get details of the environment.

az apic environment show [--environment-id]
                         [--ids]
                         [--resource-group]
                         [--service-name]
                         [--subscription]

Examples

Show environment details

az apic environment show -g api-center-test -n contosoeuap --environment-id public

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--environment-id

The id of the environment.

Property Value
Parameter group: Resource Id Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--service-name -n

The name of Azure API Center service.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az apic environment update

Update existing environment.

az apic environment update [--add]
                           [--custom-properties]
                           [--description]
                           [--environment-id]
                           [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                           [--ids]
                           [--onboarding]
                           [--remove]
                           [--resource-group]
                           [--server]
                           [--service-name]
                           [--set]
                           [--subscription]
                           [--title]
                           [--type {development, production, staging, testing}]

Examples

Update environment

az apic environment update -g api-center-test -n contosoeuap --environment-id public --title "Public cloud"

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

Property Value
Parameter group: Generic Update Arguments
--custom-properties

The custom metadata defined for API catalog entities. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--description

Description.

Property Value
Parameter group: Properties Arguments
--environment-id

The id of the environment.

Property Value
Parameter group: Resource Id Arguments
--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Property Value
Parameter group: Generic Update Arguments
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--onboarding

{developerPortalUri:['https://developer.contoso.com'],instructions:'instructions markdown'} Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

Property Value
Parameter group: Generic Update Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--server

Server information of the environment. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--service-name -n

The name of Azure API Center service.

Property Value
Parameter group: Resource Id Arguments
--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.

Property Value
Parameter group: Generic Update Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
--title

Environment title.

Property Value
Parameter group: Properties Arguments
--type

Environment type.

Property Value
Parameter group: Properties Arguments
Accepted values: development, production, staging, testing
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False