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

Optional Parameters

--no-wait

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

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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

Optional Parameters

--instance-count

Number of instance.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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

Optional Parameters

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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

Optional Parameters

--no-wait

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

Default value: False
--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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

Optional Parameters

--no-wait

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

Default value: False
--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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

Optional Parameters

--addon-configs-file

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

--addon-configs-json

JSON string of add-on configurations.

--allow-credentials

Whether user credentials are supported on cross-site requests.

Accepted values: false, true
--allow-origin-patterns --allowed-origin-patterns

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

--allowed-headers

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

--allowed-methods

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

--allowed-origins

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

--api-description

Detailed description of the APIs available on the Gateway instance.

--api-doc-location

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

--api-title

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

--api-version

Version of APIs available on this Gateway instance.

--apm-types

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

--apms

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

--assign-endpoint

If true, assign endpoint URL for direct access.

Accepted values: false, true
--certificate-names

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

--client-id

The public identifier for the application.

--client-secret

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

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

Accepted values: false, true
--enable-response-cache

Enable response cache settings in Spring Cloud Gateway.

Accepted values: false, true
--exposed-headers

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

--https-only

If true, access endpoint via https.

Accepted values: false, true
--instance-count

Number of instance.

--issuer-uri

The URI of Issuer Identifier.

--max-age

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

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

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

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

--response-cache-ttl

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

--scope

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

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.