Bicep resource definition
The containerApps/resiliencyPolicies resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.App/containerApps/resiliencyPolicies resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.App/containerApps/resiliencyPolicies@2024-10-02-preview' = {
parent: resourceSymbolicName
name: 'string'
properties: {
circuitBreakerPolicy: {
consecutiveErrors: int
intervalInSeconds: int
maxEjectionPercent: int
}
httpConnectionPool: {
http1MaxPendingRequests: int
http2MaxRequests: int
}
httpRetryPolicy: {
matches: {
errors: [
'string'
]
headers: [
{
header: 'string'
match: {
exactMatch: 'string'
prefixMatch: 'string'
regexMatch: 'string'
suffixMatch: 'string'
}
}
]
httpStatusCodes: [
int
]
}
maxRetries: int
retryBackOff: {
initialDelayInMilliseconds: int
maxIntervalInMilliseconds: int
}
}
tcpConnectionPool: {
maxConnections: int
}
tcpRetryPolicy: {
maxConnectAttempts: int
}
timeoutPolicy: {
connectionTimeoutInSeconds: int
responseTimeoutInSeconds: int
}
}
}
Property Values
Microsoft.App/containerApps/resiliencyPolicies
| Name |
Description |
Value |
| name |
The resource name |
string
Constraints: Pattern = ^[-\w\._\(\)]+$ (required) |
| parent |
In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.
For more information, see Child resource outside parent resource. |
Symbolic name for resource of type: containerApps |
| properties |
App Resiliency resource specific properties |
AppResiliencyProperties |
AppResiliencyProperties
| Name |
Description |
Value |
| circuitBreakerPolicy |
Policy that defines circuit breaker conditions |
CircuitBreakerPolicy |
| httpConnectionPool |
Defines parameters for http connection pooling |
HttpConnectionPool |
| httpRetryPolicy |
Policy that defines http request retry conditions |
HttpRetryPolicy |
| tcpConnectionPool |
Defines parameters for tcp connection pooling |
TcpConnectionPool |
| tcpRetryPolicy |
Policy that defines tcp request retry conditions |
TcpRetryPolicy |
| timeoutPolicy |
Policy to set request timeouts |
TimeoutPolicy |
CircuitBreakerPolicy
| Name |
Description |
Value |
| consecutiveErrors |
Number of consecutive errors before the circuit breaker opens |
int |
| intervalInSeconds |
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. |
int |
| maxEjectionPercent |
Maximum percentage of hosts that will be ejected after failure threshold has been met |
int |
| Name |
Description |
Value |
| header |
Name of the header |
string |
| match |
Type of match to perform |
HeaderMatchMatch |
| Name |
Description |
Value |
| exactMatch |
Exact value of the header |
string |
| prefixMatch |
Prefix value of the header |
string |
| regexMatch |
Regex value of the header |
string |
| suffixMatch |
Suffix value of the header |
string |
HttpConnectionPool
| Name |
Description |
Value |
| http1MaxPendingRequests |
Maximum number of pending http1 requests allowed |
int |
| http2MaxRequests |
Maximum number of http2 requests allowed |
int |
HttpRetryPolicy
| Name |
Description |
Value |
| matches |
Conditions that must be met for a request to be retried |
HttpRetryPolicyMatches |
| maxRetries |
Maximum number of times a request will retry |
int |
| retryBackOff |
Settings for retry backoff characteristics |
HttpRetryPolicyRetryBackOff |
HttpRetryPolicyMatches
| Name |
Description |
Value |
| errors |
Errors that can trigger a retry |
string[] |
| headers |
Headers that must be present for a request to be retried |
HeaderMatch[] |
| httpStatusCodes |
Additional http status codes that can trigger a retry |
int[] |
HttpRetryPolicyRetryBackOff
| Name |
Description |
Value |
| initialDelayInMilliseconds |
Initial delay, in milliseconds, before retrying a request |
int |
| maxIntervalInMilliseconds |
Maximum interval, in milliseconds, between retries |
int |
TcpConnectionPool
| Name |
Description |
Value |
| maxConnections |
Maximum number of tcp connections allowed |
int |
TcpRetryPolicy
| Name |
Description |
Value |
| maxConnectAttempts |
Maximum number of attempts to connect to the tcp service |
int |
TimeoutPolicy
| Name |
Description |
Value |
| connectionTimeoutInSeconds |
Timeout, in seconds, for a request to initiate a connection |
int |
| responseTimeoutInSeconds |
Timeout, in seconds, for a request to respond |
int |
ARM template resource definition
The containerApps/resiliencyPolicies resource type can be deployed with operations that target:
Usage Examples
To create a Microsoft.App/containerApps/resiliencyPolicies resource, add the following JSON to your template.
{
"type": "Microsoft.App/containerApps/resiliencyPolicies",
"apiVersion": "2024-10-02-preview",
"name": "string",
"properties": {
"circuitBreakerPolicy": {
"consecutiveErrors": "int",
"intervalInSeconds": "int",
"maxEjectionPercent": "int"
},
"httpConnectionPool": {
"http1MaxPendingRequests": "int",
"http2MaxRequests": "int"
},
"httpRetryPolicy": {
"matches": {
"errors": [ "string" ],
"headers": [
{
"header": "string",
"match": {
"exactMatch": "string",
"prefixMatch": "string",
"regexMatch": "string",
"suffixMatch": "string"
}
}
],
"httpStatusCodes": [ "int" ]
},
"maxRetries": "int",
"retryBackOff": {
"initialDelayInMilliseconds": "int",
"maxIntervalInMilliseconds": "int"
}
},
"tcpConnectionPool": {
"maxConnections": "int"
},
"tcpRetryPolicy": {
"maxConnectAttempts": "int"
},
"timeoutPolicy": {
"connectionTimeoutInSeconds": "int",
"responseTimeoutInSeconds": "int"
}
}
}
Property Values
Microsoft.App/containerApps/resiliencyPolicies
| Name |
Description |
Value |
| apiVersion |
The api version |
'2024-10-02-preview' |
| name |
The resource name |
string
Constraints: Pattern = ^[-\w\._\(\)]+$ (required) |
| properties |
App Resiliency resource specific properties |
AppResiliencyProperties |
| type |
The resource type |
'Microsoft.App/containerApps/resiliencyPolicies' |
AppResiliencyProperties
| Name |
Description |
Value |
| circuitBreakerPolicy |
Policy that defines circuit breaker conditions |
CircuitBreakerPolicy |
| httpConnectionPool |
Defines parameters for http connection pooling |
HttpConnectionPool |
| httpRetryPolicy |
Policy that defines http request retry conditions |
HttpRetryPolicy |
| tcpConnectionPool |
Defines parameters for tcp connection pooling |
TcpConnectionPool |
| tcpRetryPolicy |
Policy that defines tcp request retry conditions |
TcpRetryPolicy |
| timeoutPolicy |
Policy to set request timeouts |
TimeoutPolicy |
CircuitBreakerPolicy
| Name |
Description |
Value |
| consecutiveErrors |
Number of consecutive errors before the circuit breaker opens |
int |
| intervalInSeconds |
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. |
int |
| maxEjectionPercent |
Maximum percentage of hosts that will be ejected after failure threshold has been met |
int |
| Name |
Description |
Value |
| header |
Name of the header |
string |
| match |
Type of match to perform |
HeaderMatchMatch |
| Name |
Description |
Value |
| exactMatch |
Exact value of the header |
string |
| prefixMatch |
Prefix value of the header |
string |
| regexMatch |
Regex value of the header |
string |
| suffixMatch |
Suffix value of the header |
string |
HttpConnectionPool
| Name |
Description |
Value |
| http1MaxPendingRequests |
Maximum number of pending http1 requests allowed |
int |
| http2MaxRequests |
Maximum number of http2 requests allowed |
int |
HttpRetryPolicy
| Name |
Description |
Value |
| matches |
Conditions that must be met for a request to be retried |
HttpRetryPolicyMatches |
| maxRetries |
Maximum number of times a request will retry |
int |
| retryBackOff |
Settings for retry backoff characteristics |
HttpRetryPolicyRetryBackOff |
HttpRetryPolicyMatches
| Name |
Description |
Value |
| errors |
Errors that can trigger a retry |
string[] |
| headers |
Headers that must be present for a request to be retried |
HeaderMatch[] |
| httpStatusCodes |
Additional http status codes that can trigger a retry |
int[] |
HttpRetryPolicyRetryBackOff
| Name |
Description |
Value |
| initialDelayInMilliseconds |
Initial delay, in milliseconds, before retrying a request |
int |
| maxIntervalInMilliseconds |
Maximum interval, in milliseconds, between retries |
int |
TcpConnectionPool
| Name |
Description |
Value |
| maxConnections |
Maximum number of tcp connections allowed |
int |
TcpRetryPolicy
| Name |
Description |
Value |
| maxConnectAttempts |
Maximum number of attempts to connect to the tcp service |
int |
TimeoutPolicy
| Name |
Description |
Value |
| connectionTimeoutInSeconds |
Timeout, in seconds, for a request to initiate a connection |
int |
| responseTimeoutInSeconds |
Timeout, in seconds, for a request to respond |
int |
The containerApps/resiliencyPolicies resource type can be deployed with operations that target:
- Resource groups
For a list of changed properties in each API version, see change log.
To create a Microsoft.App/containerApps/resiliencyPolicies resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.App/containerApps/resiliencyPolicies@2024-10-02-preview"
name = "string"
parent_id = "string"
body = {
properties = {
circuitBreakerPolicy = {
consecutiveErrors = int
intervalInSeconds = int
maxEjectionPercent = int
}
httpConnectionPool = {
http1MaxPendingRequests = int
http2MaxRequests = int
}
httpRetryPolicy = {
matches = {
errors = [
"string"
]
headers = [
{
header = "string"
match = {
exactMatch = "string"
prefixMatch = "string"
regexMatch = "string"
suffixMatch = "string"
}
}
]
httpStatusCodes = [
int
]
}
maxRetries = int
retryBackOff = {
initialDelayInMilliseconds = int
maxIntervalInMilliseconds = int
}
}
tcpConnectionPool = {
maxConnections = int
}
tcpRetryPolicy = {
maxConnectAttempts = int
}
timeoutPolicy = {
connectionTimeoutInSeconds = int
responseTimeoutInSeconds = int
}
}
}
}
Property Values
Microsoft.App/containerApps/resiliencyPolicies
| Name |
Description |
Value |
| name |
The resource name |
string
Constraints: Pattern = ^[-\w\._\(\)]+$ (required) |
| parent_id |
The ID of the resource that is the parent for this resource. |
ID for resource of type: containerApps |
| properties |
App Resiliency resource specific properties |
AppResiliencyProperties |
| type |
The resource type |
"Microsoft.App/containerApps/resiliencyPolicies@2024-10-02-preview" |
AppResiliencyProperties
| Name |
Description |
Value |
| circuitBreakerPolicy |
Policy that defines circuit breaker conditions |
CircuitBreakerPolicy |
| httpConnectionPool |
Defines parameters for http connection pooling |
HttpConnectionPool |
| httpRetryPolicy |
Policy that defines http request retry conditions |
HttpRetryPolicy |
| tcpConnectionPool |
Defines parameters for tcp connection pooling |
TcpConnectionPool |
| tcpRetryPolicy |
Policy that defines tcp request retry conditions |
TcpRetryPolicy |
| timeoutPolicy |
Policy to set request timeouts |
TimeoutPolicy |
CircuitBreakerPolicy
| Name |
Description |
Value |
| consecutiveErrors |
Number of consecutive errors before the circuit breaker opens |
int |
| intervalInSeconds |
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. |
int |
| maxEjectionPercent |
Maximum percentage of hosts that will be ejected after failure threshold has been met |
int |
| Name |
Description |
Value |
| header |
Name of the header |
string |
| match |
Type of match to perform |
HeaderMatchMatch |
| Name |
Description |
Value |
| exactMatch |
Exact value of the header |
string |
| prefixMatch |
Prefix value of the header |
string |
| regexMatch |
Regex value of the header |
string |
| suffixMatch |
Suffix value of the header |
string |
HttpConnectionPool
| Name |
Description |
Value |
| http1MaxPendingRequests |
Maximum number of pending http1 requests allowed |
int |
| http2MaxRequests |
Maximum number of http2 requests allowed |
int |
HttpRetryPolicy
| Name |
Description |
Value |
| matches |
Conditions that must be met for a request to be retried |
HttpRetryPolicyMatches |
| maxRetries |
Maximum number of times a request will retry |
int |
| retryBackOff |
Settings for retry backoff characteristics |
HttpRetryPolicyRetryBackOff |
HttpRetryPolicyMatches
| Name |
Description |
Value |
| errors |
Errors that can trigger a retry |
string[] |
| headers |
Headers that must be present for a request to be retried |
HeaderMatch[] |
| httpStatusCodes |
Additional http status codes that can trigger a retry |
int[] |
HttpRetryPolicyRetryBackOff
| Name |
Description |
Value |
| initialDelayInMilliseconds |
Initial delay, in milliseconds, before retrying a request |
int |
| maxIntervalInMilliseconds |
Maximum interval, in milliseconds, between retries |
int |
TcpConnectionPool
| Name |
Description |
Value |
| maxConnections |
Maximum number of tcp connections allowed |
int |
TcpRetryPolicy
| Name |
Description |
Value |
| maxConnectAttempts |
Maximum number of attempts to connect to the tcp service |
int |
TimeoutPolicy
| Name |
Description |
Value |
| connectionTimeoutInSeconds |
Timeout, in seconds, for a request to initiate a connection |
int |
| responseTimeoutInSeconds |
Timeout, in seconds, for a request to respond |
int |