Aracılığıyla paylaş


Gateway Route Configs - Create Or Update

Varsayılan Spring Cloud Gateway yol yapılandırmalarını oluşturun veya mevcut Spring Cloud Gateway yol yapılandırmalarını güncelleştirin.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/routeConfigs/{routeConfigName}?api-version=2023-12-01

URI Parametreleri

Name İçinde Gerekli Tür Description
gatewayName
path True

string

pattern: ^[a-z][a-z0-9]*$

Spring Cloud Gateway adı.

resourceGroupName
path True

string

Kaynağı içeren kaynak grubunun adı. Bu değeri Azure Resource Manager API'sinden veya portaldan alabilirsiniz.

routeConfigName
path True

string

Spring Cloud Gateway yol yapılandırmasının adı.

serviceName
path True

string

pattern: ^[a-z][a-z0-9-]*[a-z0-9]$

Hizmet kaynağının adı.

subscriptionId
path True

string

Microsoft Azure aboneliğini benzersiz olarak tanımlayan abonelik kimliğini alır. Abonelik kimliği, her hizmet çağrısı için URI'nin bir parçasını oluşturur.

api-version
query True

string

minLength: 1

Bu işlem için kullanılacak API sürümü.

İstek Gövdesi

Name Tür Description
properties

GatewayRouteConfigProperties

Spring Cloud Gateway'in API yol yapılandırması

Yanıtlar

Name Tür Description
200 OK

GatewayRouteConfigResource

Başarı. Yanıt, güncelleştirilmiş Spring Cloud Gateway yol yapılandırmalarını açıklar.

201 Created

GatewayRouteConfigResource

Oluşturulan. Yanıt, oluşturulan yeni Spring Cloud Gateway yol yapılandırmalarını açıklar ve işlem sonucunu sorgulamak için bir Azure-AsyncOperation üst bilgisi içerir.

Other Status Codes

CloudError

İşlemin neden başarısız olduğunu açıklayan hata yanıtı.

Güvenlik

azure_auth

Azure Active Directory OAuth2 Akışı

Tür: oauth2
Akış: implicit
Yetkilendirme URL’si: https://login.microsoftonline.com/common/oauth2/authorize

Kapsamlar

Name Description
user_impersonation kullanıcı hesabınızın kimliğine bürünme

Örnekler

GatewayRouteConfigs_CreateOrUpdate

Örnek isteği

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"
        ]
      }
    ]
  }
}

Örnek yanıt

{
  "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"
}

Tanımlar

Name Description
CloudError

Hizmetten bir hata yanıtı.

CloudErrorBody

Hizmetten bir hata yanıtı.

createdByType

Kaynağı oluşturan kimliğin türü.

GatewayApiRoute

Spring Cloud Gateway'in API yol yapılandırması

GatewayProvisioningState

Spring Cloud Gateway'in durumu.

GatewayRouteConfigOpenApiProperties

Spring Cloud Gateway yol yapılandırmasının OpenAPI özellikleri.

GatewayRouteConfigProperties

Spring Cloud Gateway'in API yol yapılandırması

GatewayRouteConfigProtocol

Yönlendirilen Azure Spring Apps uygulamalarının protokolü.

GatewayRouteConfigResource

Spring Cloud Gateway rota yapılandırma kaynağı

lastModifiedByType

Kaynağı en son değiştiren kimlik türü.

SystemData

Kaynağın oluşturulması ve son değiştirilmesiyle ilgili meta veriler.

CloudError

Hizmetten bir hata yanıtı.

Name Tür Description
error

CloudErrorBody

Hizmetten bir hata yanıtı.

CloudErrorBody

Hizmetten bir hata yanıtı.

Name Tür Description
code

string

Hatanın tanımlayıcısı. Kodlar sabittir ve program aracılığıyla kullanılması amaçlanmıştır.

details

CloudErrorBody[]

Hatayla ilgili ek ayrıntıların listesi.

message

string

Hatayı açıklayan ve kullanıcı arabiriminde görüntülenmeye uygun olması amaçlanan bir ileti.

target

string

Belirli bir hatanın hedefi. Örneğin, özelliğin adı hatalı.

createdByType

Kaynağı oluşturan kimliğin türü.

Değer Description
User
Application
ManagedIdentity
Key

GatewayApiRoute

Spring Cloud Gateway'in API yol yapılandırması

Name Tür Description
description

string

Oluşturulan OpenAPI belgelerindeki yöntemlere bir açıklama uygulanır.

filters

string[]

İsteği hedef uç noktaya veya alınan yanıta göndermeden önce değiştirmek için.

order

integer (int32)

Rota işleme sırası.

predicates

string[]

Her istek için bir yolu değerlendirmek için bir dizi koşul. Her koşul istek üst bilgilerine ve parametre değerlerine göre değerlendirilebilir. Yolun istekle eşleşmesi için bir yolla ilişkili tüm koşulların true olarak değerlendirilmesi gerekir.

ssoEnabled

boolean

Sso doğrulamasını etkinleştirin.

tags

string[]

Sınıflandırma etiketleri, oluşturulan OpenAPI belgelerindeki yöntemlere uygulanır.

title

string

Oluşturulan OpenAPI belgelerindeki yöntemlere bir başlık uygulanır.

tokenRelay

boolean

Şu anda kimliği doğrulanmış kullanıcının kimlik belirtecini uygulama hizmetine geçirin; varsayılan değer 'false'

uri

string

Tam uri, appNamegeçersiz kılar.

GatewayProvisioningState

Spring Cloud Gateway'in durumu.

Değer Description
Creating
Updating
Succeeded
Failed
Deleting

GatewayRouteConfigOpenApiProperties

Spring Cloud Gateway yol yapılandırmasının OpenAPI özellikleri.

Name Tür Description
uri

string

OpenAPI belirtiminin URI'si.

GatewayRouteConfigProperties

Spring Cloud Gateway'in API yol yapılandırması

Name Tür Default value Description
appResourceId

string

Azure Spring Apps uygulamasının kaynak kimliği, yol uritanımlanmadığı sürece gereklidir.

filters

string[]

İsteği hedef uç noktaya göndermeden önce veya uygulama düzeyinde alınan yanıtta değişiklik yapmak için.

openApi

GatewayRouteConfigOpenApiProperties

Spring Cloud Gateway yol yapılandırmasının OpenAPI özellikleri.

predicates

string[]

Uygulama düzeyinde her istek için bir yolu değerlendirmek için bir dizi koşul. Her koşul istek üst bilgilerine ve parametre değerlerine göre değerlendirilebilir. Yolun istekle eşleşmesi için bir yolla ilişkili tüm koşulların true olarak değerlendirilmesi gerekir.

protocol

GatewayRouteConfigProtocol

HTTP

Yönlendirilen Azure Spring Apps uygulamalarının protokolü.

provisioningState

GatewayProvisioningState

Spring Cloud Gateway yol yapılandırmasının durumu.

routes

GatewayApiRoute[]

API yolları dizisi, her yol title, uri, ssoEnabled, predicates, filtersgibi özellikler içerir.

ssoEnabled

boolean

Uygulama düzeyinde Tek Sign-On'yi etkinleştirin.

GatewayRouteConfigProtocol

Yönlendirilen Azure Spring Apps uygulamalarının protokolü.

Değer Description
HTTP
HTTPS

GatewayRouteConfigResource

Spring Cloud Gateway rota yapılandırma kaynağı

Name Tür Description
id

string

Kaynağın tam kaynak kimliği.

name

string

Kaynağın adı.

properties

GatewayRouteConfigProperties

Spring Cloud Gateway'in API yol yapılandırması

systemData

SystemData

Kaynağın oluşturulması ve son değiştirilmesiyle ilgili meta veriler.

type

string

Kaynağın türü.

lastModifiedByType

Kaynağı en son değiştiren kimlik türü.

Değer Description
User
Application
ManagedIdentity
Key

SystemData

Kaynağın oluşturulması ve son değiştirilmesiyle ilgili meta veriler.

Name Tür Description
createdAt

string (date-time)

Kaynak oluşturma (UTC) zaman damgası.

createdBy

string

Kaynağı oluşturan kimlik.

createdByType

createdByType

Kaynağı oluşturan kimliğin türü.

lastModifiedAt

string (date-time)

Kaynak değişikliğinin zaman damgası (UTC).

lastModifiedBy

string

Kaynağı en son değiştiren kimlik.

lastModifiedByType

lastModifiedByType

Kaynağı en son değiştiren kimlik türü.