Share via


az spring gateway

Note

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

(Enterprise Tier Only) Commands to manage gateway in Azure Spring Apps.

Commands

Name Description Type Status
az spring gateway clear

Clear all settings of gateway.

Extension GA
az spring gateway create

Create Spring Cloud Gateway.

Extension GA
az spring gateway custom-___domain

Commands to manage custom domains for gateway.

Extension GA
az spring gateway custom-___domain bind

Bind a custom ___domain with the gateway.

Extension GA
az spring gateway custom-___domain list

List all custom domains of the gateway.

Extension GA
az spring gateway custom-___domain show

Show details of a custom ___domain.

Extension GA
az spring gateway custom-___domain unbind

Unbind a custom-___domain of the gateway.

Extension GA
az spring gateway custom-___domain update

Update a custom ___domain of the gateway.

Extension GA
az spring gateway delete

Delete Spring Cloud Gateway.

Extension GA
az spring gateway restart

Restart Spring Cloud Gateway.

Extension GA
az spring gateway route-config

Commands to manage gateway route configs in Azure Spring Apps.

Extension GA
az spring gateway route-config create

Create a gateway route config with routing rules of Json array format.

Extension GA
az spring gateway route-config list

List all existing gateway route configs.

Extension GA
az spring gateway route-config remove

Delete an existing gateway route config.

Extension GA
az spring gateway route-config show

Get an existing gateway route config.

Extension GA
az spring gateway route-config update

Update an existing gateway route config with routing rules of Json array format.

Extension GA
az spring gateway show

Show the settings, provisioning status and runtime status of gateway.

Extension GA
az spring gateway sync-cert

Sync certificate of gateway.

Extension GA
az spring gateway update

Update an existing gateway properties.

Extension GA

az spring gateway clear

Clear all settings of gateway.

az spring gateway clear --resource-group
                        --service
                        [--no-wait]

Required Parameters

--resource-group -g

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

--service -s

The name of Azure Spring Apps instance, you can configure the default service using az configure --defaults spring=<name>.

Optional Parameters

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

--no-wait

Do not wait for the long-running operation to finish.

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.

--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 spring gateway create

Create Spring Cloud Gateway.

az spring gateway create --resource-group
                         --service
                         [--instance-count]

Examples

Create Spring Cloud Gateway.

az spring gateway create -s MyService -g MyResourceGroup --instance-count 2

Required Parameters

--resource-group -g

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

--service -s

The name of Azure Spring Apps instance, you can configure the default service using az configure --defaults spring=<name>.

Optional Parameters

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

--instance-count

Number of instance.

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 spring gateway delete

Delete Spring Cloud Gateway.

az spring gateway delete --resource-group
                         --service
                         [--yes]

Required Parameters

--resource-group -g

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

--service -s

The name of Azure Spring Apps instance, you can configure the default service using az configure --defaults spring=<name>.

Optional Parameters

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

--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.

--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 spring gateway restart

Restart Spring Cloud Gateway.

az spring gateway restart --resource-group
                          --service
                          [--no-wait]
                          [--yes]

Examples

Restart Spring Cloud Gateway.

az spring gateway restart -s MyService -g MyResourceGroup

Required Parameters

--resource-group -g

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

--service -s

The name of Azure Spring Apps instance, you can configure the default service using az configure --defaults spring=<name>.

Optional Parameters

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

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--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.

--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 spring gateway show

Show the settings, provisioning status and runtime status of gateway.

az spring gateway show --resource-group
                       --service

Required Parameters

--resource-group -g

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

--service -s

The name of Azure Spring Apps instance, you can configure the default service using az configure --defaults spring=<name>.

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 spring gateway sync-cert

Sync certificate of gateway.

az spring gateway sync-cert --resource-group
                            --service
                            [--no-wait]
                            [--yes]

Examples

Sync certificate of gateway.

az spring gateway sync-cert -s MyService -g MyResourceGroup

Required Parameters

--resource-group -g

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

--service -s

The name of Azure Spring Apps instance, you can configure the default service using az configure --defaults spring=<name>.

Optional Parameters

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

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--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.

--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 spring gateway update

Update an existing gateway properties.

az spring gateway update --resource-group
                         --service
                         [--addon-configs-file]
                         [--addon-configs-json]
                         [--allow-credentials {false, true}]
                         [--allow-origin-patterns --allowed-origin-patterns]
                         [--allowed-headers]
                         [--allowed-methods]
                         [--allowed-origins]
                         [--api-description]
                         [--api-doc-___location]
                         [--api-title]
                         [--api-version]
                         [--apm-types]
                         [--apms]
                         [--assign-endpoint {false, true}]
                         [--certificate-names]
                         [--client-id]
                         [--client-secret]
                         [--cpu]
                         [--enable-cert-verify --enable-certificate-verification {false, true}]
                         [--enable-response-cache {false, true}]
                         [--exposed-headers]
                         [--https-only {false, true}]
                         [--instance-count]
                         [--issuer-uri]
                         [--max-age]
                         [--memory]
                         [--no-wait]
                         [--properties]
                         [--response-cache-scope]
                         [--response-cache-size]
                         [--response-cache-ttl]
                         [--scope]
                         [--secrets]
                         [--server-url]

Examples

Update gateway property.

az spring gateway update -s MyService -g MyResourceGroup --assign-endpoint true --https-only true

Enable and configure response cache at Route level and set ttl to 5 minutes.

az spring gateway update -s MyService -g MyResourceGroup --enable-response-cache --response-cache-scope Route --response-cache-ttl 5m

When response cache is enabled, update ttl to 3 minutes.

az spring gateway update -s MyService -g MyResourceGroup --response-cache-ttl 3m

Disable response cache.

az spring gateway update -s MyService -g MyResourceGroup --enable-response-cache false

Required Parameters

--resource-group -g

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

--service -s

The name of Azure Spring Apps instance, you can configure the default service using az configure --defaults spring=<name>.

Optional Parameters

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

--addon-configs-file

The file path of JSON string of add-on configurations.

Property Value
Parameter group: Add-on Configurations Arguments
--addon-configs-json

JSON string of add-on configurations.

Property Value
Parameter group: Add-on Configurations Arguments
--allow-credentials

Whether user credentials are supported on cross-site requests.

Property Value
Parameter group: Cross-origin Resource Sharing (CORS) Arguments
Accepted values: false, true
--allow-origin-patterns --allowed-origin-patterns

Comma-separated list of allowed origin patterns to make cross-site requests.

Property Value
Parameter group: Cross-origin Resource Sharing (CORS) Arguments
--allowed-headers

Comma-separated list of allowed headers in cross-site requests. The special value * allows actual requests to send any header.

Property Value
Parameter group: Cross-origin Resource Sharing (CORS) Arguments
--allowed-methods

Comma-separated list of allowed HTTP methods on cross-site requests. The special value * allows all methods.

Property Value
Parameter group: Cross-origin Resource Sharing (CORS) Arguments
--allowed-origins

Comma-separated list of allowed origins to make cross-site requests. The special value * allows all domains.

Property Value
Parameter group: Cross-origin Resource Sharing (CORS) Arguments
--api-description

Detailed description of the APIs available on the Gateway instance.

Property Value
Parameter group: API metadata Arguments
--api-doc-___location

Location of additional documentation for the APIs available on the Gateway instance.

Property Value
Parameter group: API metadata Arguments
--api-title

Title describing the context of the APIs available on the Gateway instance.

Property Value
Parameter group: API metadata Arguments
--api-version

Version of APIs available on this Gateway instance.

Property Value
Parameter group: API metadata Arguments
--apm-types

Space-separated list of APM integrated with Gateway. Allowed values are: ApplicationInsights, AppDynamics, Dynatrace, NewRelic, ElasticAPM.

Property Value
Parameter group: APM Arguments
--apms

Space-separated list of APM reference names in Azure Spring Apps to integrate with Gateway.

Property Value
Parameter group: APM Arguments
--assign-endpoint

If true, assign endpoint URL for direct access.

Property Value
Accepted values: false, true
--certificate-names

Comma-separated list of certificate names in Azure Spring Apps.

Property Value
Parameter group: Client Certificate Authentication Arguments
--client-id

The public identifier for the application.

Property Value
Parameter group: Single Sign On (SSO) Arguments
--client-secret

The secret known only to the application and the authorization server.

Property Value
Parameter group: Single Sign On (SSO) Arguments
--cpu

CPU resource quantity. Should be 500m or number of CPU cores.

--enable-cert-verify --enable-certificate-verification

If true, will verify certificate in TLS connection from gateway to app.

Property Value
Parameter group: Client Certificate Authentication Arguments
Accepted values: false, true
--enable-response-cache

Enable response cache settings in Spring Cloud Gateway.

Property Value
Parameter group: Response Cache Arguments
Accepted values: false, true
--exposed-headers

Comma-separated list of HTTP response headers to expose for cross-site requests.

Property Value
Parameter group: Cross-origin Resource Sharing (CORS) Arguments
--https-only

If true, access endpoint via https.

Property Value
Accepted values: false, true
--instance-count

Number of instance.

--issuer-uri

The URI of Issuer Identifier.

Property Value
Parameter group: Single Sign On (SSO) Arguments
--max-age

How long, in seconds, the response from a pre-flight request can be cached by clients.

Property Value
Parameter group: Cross-origin Resource Sharing (CORS) Arguments
--memory

Memory resource quantity. Should be 512Mi or #Gi, e.g., 1Gi, 3Gi.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--properties

Non-sensitive properties for environment variables. Format "key[=value]" and separated by space.

--response-cache-scope

Scope for response cache, available values are [Route, Instance].

Property Value
Parameter group: Response Cache Arguments
--response-cache-size

Maximum size of the cache that determines whether the cache needs to evict some entries. Examples are [1GB, 10MB, 100KB]. Use "default" to reset, and Gateway will manage this property.

Property Value
Parameter group: Response Cache Arguments
--response-cache-ttl

Time before a cached entry expires. Examples are [1h, 30m, 50s]. Use "default" to reset, and Gateway will manage this property.

Property Value
Parameter group: Response Cache Arguments
--scope

Comma-separated list of the specific actions applications can be allowed to do on a user's behalf.

Property Value
Parameter group: Single Sign On (SSO) Arguments
--secrets

Sensitive properties for environment variables. Once put, it will be encrypted and not returned.Format "key[=value]" and separated by space.

--server-url

Base URL that API consumers will use to access APIs on the Gateway instance.

Property Value
Parameter group: API metadata 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