你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

App Resiliency - Get

Get an application's resiliency policy.
Get container app resiliency policy.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name}?api-version=2024-02-02-preview

URI Parameters

Name In Required Type Description
appName
path True

string

Name of the Container App.

Regex pattern: ^[-\w\._\(\)]+$

name
path True

string

Name of the resiliency policy.

Regex pattern: ^[-\w\._\(\)]+$

resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string

uuid

The ID of the target subscription. The value must be an UUID.

api-version
query True

string

The API version to use for this operation.

Responses

Name Type Description
200 OK

AppResiliency

OK

Other Status Codes

DefaultErrorResponse

Common error response.

Examples

Get App Resiliency

Sample request

GET https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/testcontainerApp0/resiliencyPolicies/resiliency-policy-1?api-version=2024-02-02-preview

Sample response

{
  "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/testcontainerApp0/resiliencyPolicies/resiliency-policy-1",
  "name": "resiliency-policy-1",
  "type": "Microsoft.App/containerApps/resiliencyPolicies",
  "properties": {
    "timeoutPolicy": {
      "responseTimeoutInSeconds": 15,
      "connectionTimeoutInSeconds": 5
    },
    "httpRetryPolicy": {
      "maxRetries": 5,
      "retryBackOff": {
        "initialDelayInMilliseconds": 1000,
        "maxIntervalInMilliseconds": 10000
      },
      "matches": {
        "headers": [
          {
            "header": "X-Content-Type",
            "match": {
              "prefixMatch": "GOATS"
            }
          }
        ],
        "httpStatusCodes": [
          502,
          503
        ],
        "errors": [
          "5xx",
          "connect-failure",
          "reset",
          "retriable-headers",
          "retriable-status-codes"
        ]
      }
    },
    "tcpRetryPolicy": {
      "maxConnectAttempts": 3
    },
    "circuitBreakerPolicy": {
      "consecutiveErrors": 5,
      "intervalInSeconds": 10,
      "maxEjectionPercent": 50
    },
    "tcpConnectionPool": {
      "maxConnections": 100
    },
    "httpConnectionPool": {
      "http1MaxPendingRequests": 1024,
      "http2MaxRequests": 1024
    }
  }
}

Definitions

Name Description
AppResiliency

Configuration to setup App Resiliency

CircuitBreakerPolicy

Policy that defines circuit breaker conditions

createdByType

The type of identity that created the resource.

DefaultErrorResponse

App Service error response.

Details

Details or the error

Error

Error model.

HeaderMatch

Conditions required to match a header

HttpConnectionPool

Defines parameters for http connection pooling

systemData

Metadata pertaining to creation and last modification of the resource.

TcpConnectionPool

Defines parameters for tcp connection pooling

TcpRetryPolicy

Policy that defines tcp request retry conditions

TimeoutPolicy

Policy to set request timeouts

AppResiliency

Configuration to setup App Resiliency

Name Type Description
id

string

Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

name

string

The name of the resource

properties.circuitBreakerPolicy

CircuitBreakerPolicy

Policy that defines circuit breaker conditions

properties.httpConnectionPool

HttpConnectionPool

Defines parameters for http connection pooling

properties.httpRetryPolicy.matches.errors

string[]

Errors that can trigger a retry

properties.httpRetryPolicy.matches.headers

HeaderMatch[]

Headers that must be present for a request to be retried

properties.httpRetryPolicy.matches.httpStatusCodes

integer[]

Additional http status codes that can trigger a retry

properties.httpRetryPolicy.maxRetries

integer

Maximum number of times a request will retry

properties.httpRetryPolicy.retryBackOff.initialDelayInMilliseconds

integer

Initial delay, in milliseconds, before retrying a request

properties.httpRetryPolicy.retryBackOff.maxIntervalInMilliseconds

integer

Maximum interval, in milliseconds, between retries

properties.tcpConnectionPool

TcpConnectionPool

Defines parameters for tcp connection pooling

properties.tcpRetryPolicy

TcpRetryPolicy

Policy that defines tcp request retry conditions

properties.timeoutPolicy

TimeoutPolicy

Policy to set request timeouts

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

CircuitBreakerPolicy

Policy that defines circuit breaker conditions

Name Type Description
consecutiveErrors

integer

Number of consecutive errors before the circuit breaker opens

intervalInSeconds

integer

The time interval, in seconds, between endpoint checks. This can result in opening the circuit breaker if the check fails as well as closing the circuit breaker if the check succeeds. Defaults to 10s.

maxEjectionPercent

integer

Maximum percentage of hosts that will be ejected after failure threshold has been met

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

DefaultErrorResponse

App Service error response.

Name Type Description
error

Error

Error model.

Details

Details or the error

Name Type Description
code

string

Standardized string to programmatically identify the error.

message

string

Detailed error description and debugging information.

target

string

Detailed error description and debugging information.

Error

Error model.

Name Type Description
code

string

Standardized string to programmatically identify the error.

details

Details[]

Details or the error

innererror

string

More information to debug error.

message

string

Detailed error description and debugging information.

target

string

Detailed error description and debugging information.

HeaderMatch

Conditions required to match a header

Name Type Description
header

string

Name of the header

match.exactMatch

string

Exact value of the header

match.prefixMatch

string

Prefix value of the header

match.regexMatch

string

Regex value of the header

match.suffixMatch

string

Suffix value of the header

HttpConnectionPool

Defines parameters for http connection pooling

Name Type Description
http1MaxPendingRequests

integer

Maximum number of pending http1 requests allowed

http2MaxRequests

integer

Maximum number of http2 requests allowed

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.

TcpConnectionPool

Defines parameters for tcp connection pooling

Name Type Description
maxConnections

integer

Maximum number of tcp connections allowed

TcpRetryPolicy

Policy that defines tcp request retry conditions

Name Type Description
maxConnectAttempts

integer

Maximum number of attempts to connect to the tcp service

TimeoutPolicy

Policy to set request timeouts

Name Type Description
connectionTimeoutInSeconds

integer

Timeout, in seconds, for a request to initiate a connection

responseTimeoutInSeconds

integer

Timeout, in seconds, for a request to respond