From 779d84d21bf9334a8949f60640ef3a4af1cb40f3 Mon Sep 17 00:00:00 2001 From: Mahsa Sadi Date: Thu, 6 Mar 2025 16:04:40 -0800 Subject: [PATCH 1/5] add failure response to cb and pool contracts --- .../2024-10-01-preview/definitions.json | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2024-10-01-preview/definitions.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2024-10-01-preview/definitions.json index c64233344371..286f6b174fda 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2024-10-01-preview/definitions.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2024-10-01-preview/definitions.json @@ -2353,6 +2353,23 @@ "acceptRetryAfter": { "type": "boolean", "description": "flag to accept Retry-After header from the backend." + }, + "failureResponse": { + "$ref": "#/definitions/BackendFailureResponse", + "description": "The response of the backend when the circuit breaker gets open." + } + } + }, + "BackendFailureResponse": { + "type": "object", + "description": "The response to be returned when a backend fails to respond", + "properties": { + "statusCode": { + "type": "integer", + "format": "int32", + "description": "The status code of the response.", + "minimum": 100, + "maximum": 599 } } }, @@ -2431,6 +2448,10 @@ "example": { "services": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends" } + }, + "failureResponse": { + "$ref": "#/definitions/BackendFailureResponse", + "description": "The response of the backend when the circuit breaker gets open." } } }, From e3be193c2b6c99c6797831c629e045ef66bc87fc Mon Sep 17 00:00:00 2001 From: Mahsa Sadi Date: Thu, 6 Mar 2025 16:11:29 -0800 Subject: [PATCH 2/5] fix description --- .../preview/2024-10-01-preview/definitions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2024-10-01-preview/definitions.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2024-10-01-preview/definitions.json index 286f6b174fda..cc4ea7ed1977 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2024-10-01-preview/definitions.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2024-10-01-preview/definitions.json @@ -2451,7 +2451,7 @@ }, "failureResponse": { "$ref": "#/definitions/BackendFailureResponse", - "description": "The response of the backend when the circuit breaker gets open." + "description": "The response to be returned when all the backends in the pool are inactive." } } }, From 9016752fb8bd8ba234e2fa96587c1f7830866119 Mon Sep 17 00:00:00 2001 From: Mahsa Sadi Date: Fri, 4 Apr 2025 12:13:02 -0700 Subject: [PATCH 3/5] expand contract --- .../2024-10-01-preview/definitions.json | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2024-10-01-preview/definitions.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2024-10-01-preview/definitions.json index cc4ea7ed1977..968504a556d2 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2024-10-01-preview/definitions.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2024-10-01-preview/definitions.json @@ -2452,6 +2452,10 @@ "failureResponse": { "$ref": "#/definitions/BackendFailureResponse", "description": "The response to be returned when all the backends in the pool are inactive." + }, + "sessionAffinity": { + "$ref": "#/definitions/BackendSessionAffinity", + "description": "The session stickiness properties of the backend pool." } } }, @@ -2492,6 +2496,46 @@ "id" ] }, + "BackendSessionAffinity": { + "type": "object", + "description": "The session stickiness properties of the backend pool.", + "properties": { + "sessionId": { + "$ref": "#/definitions/BackendSessionId", + "description": "The id that identifies the requests belonging to the same session." + } + } + }, + "BackendSessionId": { + "type": "object", + "description": "The properties of the id that identifies the requests belonging to the same session.", + "properties": { + "source": { + "$ref": "#/definitions/BackendSessionIdSource", + "description": "Source from where the session id is extracted." + } + }, + "name": { + "type": "string", + "description": "Name of the variable that refers to the session id." + } + }, + "BackendSessionIdSource": { + "type": "string", + "enum": [ + "cookie" + ], + "x-ms-enum": { + "modelAsString": true, + "name": "backend-sessionId-source", + "values": [ + { + "value": "cookie", + "description": "The session id is set by APIM gateway in a cookie and is extracted from the cookies in client requests." + } + ] + } + }, "BearerTokenSendingMethodsContract": { "type": "string", "description": "Form of an authorization grant, which the client uses to request the access token.", From 37de15b952af55244b079744a248d7f037096e7b Mon Sep 17 00:00:00 2001 From: Mahsa Sadi Date: Fri, 4 Apr 2025 12:20:58 -0700 Subject: [PATCH 4/5] reformat --- .../preview/2024-10-01-preview/definitions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2024-10-01-preview/definitions.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2024-10-01-preview/definitions.json index 968504a556d2..01a3bca5e5c9 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2024-10-01-preview/definitions.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2024-10-01-preview/definitions.json @@ -2535,7 +2535,7 @@ } ] } - }, + }, "BearerTokenSendingMethodsContract": { "type": "string", "description": "Form of an authorization grant, which the client uses to request the access token.", From 8ff859dc68925839dbcc4cf670a509b0e99d83a3 Mon Sep 17 00:00:00 2001 From: Mahsa Sadi Date: Fri, 4 Apr 2025 12:26:34 -0700 Subject: [PATCH 5/5] fix --- .../preview/2024-10-01-preview/definitions.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2024-10-01-preview/definitions.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2024-10-01-preview/definitions.json index 01a3bca5e5c9..23a61dabcd1c 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2024-10-01-preview/definitions.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2024-10-01-preview/definitions.json @@ -2513,11 +2513,11 @@ "source": { "$ref": "#/definitions/BackendSessionIdSource", "description": "Source from where the session id is extracted." + }, + "name": { + "type": "string", + "description": "Name of the variable that refers to the session id." } - }, - "name": { - "type": "string", - "description": "Name of the variable that refers to the session id." } }, "BackendSessionIdSource": {