Gateway Route Configs - Create Or Update
Create the default Spring Cloud Gateway route configs or update the existing Spring Cloud Gateway route configs.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs/{routeConfigName}?api-version=2023-12-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
gateway
|
path | True |
string pattern: ^[a-z][a-z0-9]*$ |
The name of Spring Cloud Gateway. |
|
resource
|
path | True |
string |
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
|
route
|
path | True |
string |
The name of the Spring Cloud Gateway route config. |
|
service
|
path | True |
string pattern: ^[a-z][a-z0-9-]*[a-z0-9]$ |
The name of the Service resource. |
|
subscription
|
path | True |
string |
Gets subscription ID which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
| Name | Type | Description |
|---|---|---|
| properties |
API route config of the Spring Cloud Gateway |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Success. The response describes the updated Spring Cloud Gateway route configs. |
|
| 201 Created |
Created. The response describes the new created Spring Cloud Gateway route configs and contains an Azure-AsyncOperation header to query the operation result. |
|
| Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| user_impersonation | impersonate your user account |
Examples
GatewayRouteConfigs_CreateOrUpdate
Sample request
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/gateways/default/routeConfigs/myRouteConfig?api-version=2023-12-01
{
"properties": {
"appResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myApp",
"openApi": {
"uri": "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.json"
},
"protocol": "HTTPS",
"routes": [
{
"title": "myApp route config",
"ssoEnabled": true,
"predicates": [
"Path=/api5/customer/**"
],
"filters": [
"StripPrefix=2",
"RateLimit=1,1s"
]
}
]
}
}
Sample response
{
"properties": {
"provisioningState": "Succeeded",
"appResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myApp",
"protocol": "HTTPS",
"openApi": {
"uri": "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.json"
},
"routes": [
{
"title": "myApp route config",
"ssoEnabled": true,
"predicates": [
"Path=/api5/customer/**"
],
"filters": [
"StripPrefix=2",
"RateLimit=1,1s"
]
}
]
},
"systemData": {
"createdBy": "sample-user",
"createdByType": "User",
"createdAt": "2021-08-11T03:16:03.944Z",
"lastModifiedBy": "sample-user",
"lastModifiedByType": "User",
"lastModifiedAt": "2021-08-11T03:17:03.944Z"
},
"type": "Microsoft.AppPlatform/Spring/gateways/routeConfigs",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/gateways/default/routeConfigs/myRouteConfig",
"name": "myRouteConfig"
}
{
"properties": {
"appResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/myApp",
"protocol": "HTTPS",
"openApi": {
"uri": "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.json"
},
"routes": [
{
"title": "myApp route config",
"ssoEnabled": true,
"predicates": [
"Path=/api5/customer/**"
],
"filters": [
"StripPrefix=2",
"RateLimit=1,1s"
]
}
]
},
"systemData": {
"createdBy": "sample-user",
"createdByType": "User",
"createdAt": "2021-08-11T03:16:03.944Z",
"lastModifiedBy": "sample-user",
"lastModifiedByType": "User",
"lastModifiedAt": "2021-08-11T03:17:03.944Z"
},
"type": "Microsoft.AppPlatform/Spring/gateways/routeConfigs",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/gateways/default/routeConfigs/myRouteConfig",
"name": "myRouteConfig"
}
Definitions
| Name | Description |
|---|---|
|
Cloud |
An error response from the service. |
|
Cloud |
An error response from the service. |
|
created |
The type of identity that created the resource. |
|
Gateway |
API route config of the Spring Cloud Gateway |
|
Gateway |
State of the Spring Cloud Gateway. |
|
Gateway |
OpenAPI properties of Spring Cloud Gateway route config. |
|
Gateway |
API route config of the Spring Cloud Gateway |
|
Gateway |
Protocol of routed Azure Spring Apps applications. |
|
Gateway |
Spring Cloud Gateway route config resource |
|
last |
The type of identity that last modified the resource. |
|
System |
Metadata pertaining to creation and last modification of the resource. |
CloudError
An error response from the service.
| Name | Type | Description |
|---|---|---|
| error |
An error response from the service. |
CloudErrorBody
An error response from the service.
| Name | Type | Description |
|---|---|---|
| code |
string |
An identifier for the error. Codes are invariant and are intended to be consumed programmatically. |
| details |
A list of additional details about the error. |
|
| message |
string |
A message describing the error, intended to be suitable for display in a user interface. |
| target |
string |
The target of the particular error. For example, the name of the property in error. |
createdByType
The type of identity that created the resource.
| Value | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
GatewayApiRoute
API route config of the Spring Cloud Gateway
| Name | Type | Description |
|---|---|---|
| description |
string |
A description, will be applied to methods in the generated OpenAPI documentation. |
| filters |
string[] |
To modify the request before sending it to the target endpoint, or the received response. |
| order |
integer (int32) |
Route processing order. |
| predicates |
string[] |
A number of conditions to evaluate a route for each request. Each predicate may be evaluated against request headers and parameter values. All of the predicates associated with a route must evaluate to true for the route to be matched to the request. |
| ssoEnabled |
boolean |
Enable sso validation. |
| tags |
string[] |
Classification tags, will be applied to methods in the generated OpenAPI documentation. |
| title |
string |
A title, will be applied to methods in the generated OpenAPI documentation. |
| tokenRelay |
boolean |
Pass currently-authenticated user's identity token to application service, default is 'false' |
| uri |
string |
Full uri, will override |
GatewayProvisioningState
State of the Spring Cloud Gateway.
| Value | Description |
|---|---|
| Creating | |
| Updating | |
| Succeeded | |
| Failed | |
| Deleting |
GatewayRouteConfigOpenApiProperties
OpenAPI properties of Spring Cloud Gateway route config.
| Name | Type | Description |
|---|---|---|
| uri |
string |
The URI of OpenAPI specification. |
GatewayRouteConfigProperties
API route config of the Spring Cloud Gateway
| Name | Type | Default value | Description |
|---|---|---|---|
| appResourceId |
string |
The resource Id of the Azure Spring Apps app, required unless route defines |
|
| filters |
string[] |
To modify the request before sending it to the target endpoint, or the received response in app level. |
|
| openApi |
OpenAPI properties of Spring Cloud Gateway route config. |
||
| predicates |
string[] |
A number of conditions to evaluate a route for each request in app level. Each predicate may be evaluated against request headers and parameter values. All of the predicates associated with a route must evaluate to true for the route to be matched to the request. |
|
| protocol | HTTP |
Protocol of routed Azure Spring Apps applications. |
|
| provisioningState |
State of the Spring Cloud Gateway route config. |
||
| routes |
Array of API routes, each route contains properties such as |
||
| ssoEnabled |
boolean |
Enable Single Sign-On in app level. |
GatewayRouteConfigProtocol
Protocol of routed Azure Spring Apps applications.
| Value | Description |
|---|---|
| HTTP | |
| HTTPS |
GatewayRouteConfigResource
Spring Cloud Gateway route config resource
| Name | Type | Description |
|---|---|---|
| id |
string |
Fully qualified resource Id for the resource. |
| name |
string |
The name of the resource. |
| properties |
API route config of the Spring Cloud Gateway |
|
| systemData |
Metadata pertaining to creation and last modification of the resource. |
|
| type |
string |
The type of the resource. |
lastModifiedByType
The type of identity that last modified the resource.
| Value | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
SystemData
Metadata pertaining to creation and last modification of the resource.
| Name | Type | Description |
|---|---|---|
| createdAt |
string (date-time) |
The timestamp of resource creation (UTC). |
| createdBy |
string |
The identity that created the resource. |
| createdByType |
The type of identity that created the resource. |
|
| lastModifiedAt |
string (date-time) |
The timestamp of resource modification (UTC). |
| lastModifiedBy |
string |
The identity that last modified the resource. |
| lastModifiedByType |
The type of identity that last modified the resource. |