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
The id of the environment.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The name of Azure API Center service.
Environment title.
Environment type.
Optional Parameters
The custom metadata defined for API catalog entities. Support json-file and yaml-file.
Environment description.
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.
Server information of the environment. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
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 id of the environment.
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.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The name of Azure API Center service.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
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
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The name of Azure API Center service.
Optional Parameters
OData filter parameter.
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.
Token to specify where to start paginating. This is the token value from a previously truncated response.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
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 id of the environment.
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.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The name of Azure API Center service.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
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
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>
.
The custom metadata defined for API catalog entities. Support json-file and yaml-file.
Description.
The id of the environment.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
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.
{developerPortalUri:['https://developer.contoso.com'],instructions:'instructions markdown'} Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Server information of the environment. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
The name of Azure API Center service.
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Environment title.
Environment type.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.