Microsoft.App containerApps/resiliencyPolicies 2024-08-02-preview
Bicep 資源定義
containerApps/resiliencyPolicies 資源類型可以使用目標作業來部署:
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
若要建立 Microsoft.App/containerApps/resiliencyPolicies 資源,請將下列 Bicep 新增至您的範本。
resource symbolicname 'Microsoft.App/containerApps/resiliencyPolicies@2024-08-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
}
}
}
屬性值
AppResiliencyProperties
CircuitBreakerPolicy
名字 |
描述 |
價值 |
consecutiveErrors |
斷路器開啟之前的連續錯誤數目 |
int |
intervalInSeconds |
端點檢查之間的時間間隔,以秒為單位。 如果檢查失敗,以及如果檢查成功,關閉斷路器,這可能會導致開啟斷路器。 預設值為 10s。 |
int |
maxEjectionPercent |
符合失敗閾值後將會退出的主機百分比上限 |
int |
名字 |
描述 |
價值 |
exactMatch |
標頭的確切值 |
字串 |
prefixMatch |
標頭的前置詞值 |
字串 |
regexMatch |
標頭的 Regex 值 |
字串 |
suffixMatch |
標頭的後綴值 |
字串 |
HttpConnectionPool
名字 |
描述 |
價值 |
http1MaxPendingRequests |
允許的暫止 HTTP1 要求數目上限 |
int |
http2MaxRequests |
允許的 HTTP2 要求數目上限 |
int |
HttpRetryPolicy
HttpRetryPolicyMatches
名字 |
描述 |
價值 |
錯誤 |
可以觸發重試的錯誤 |
string[] |
頭 |
必須存在的標頭,才能重試要求 |
HeaderMatch[] |
httpStatusCodes |
可觸發重試的其他 HTTP 狀態代碼 |
int[] |
HttpRetryPolicyRetryBackOff
名字 |
描述 |
價值 |
initialDelayInMilliseconds |
在重試要求之前,以毫秒為單位的初始延遲 |
int |
maxIntervalInMilliseconds |
重試之間的間隔上限,以毫秒為單位 |
int |
Microsoft.App/containerApps/resiliencyPolicies
TcpConnectionPool
名字 |
描述 |
價值 |
maxConnections |
允許的 TCP 連線數目上限 |
int |
TcpRetryPolicy
名字 |
描述 |
價值 |
maxConnectAttempts |
線上到 tcp 服務的嘗試次數上限 |
int |
TimeoutPolicy
名字 |
描述 |
價值 |
connectionTimeoutInSeconds |
逾時,以秒為單位,要求起始連接 |
int |
responseTimeoutInSeconds |
要求回應的逾時,以秒為單位 |
int |
ARM 樣本資源定義
containerApps/resiliencyPolicies 資源類型可以使用目標作業來部署:
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
若要建立 Microsoft.App/containerApps/resiliencyPolicies 資源,請將下列 JSON 新增至範本。
{
"type": "Microsoft.App/containerApps/resiliencyPolicies",
"apiVersion": "2024-08-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"
}
}
}
屬性值
AppResiliencyProperties
CircuitBreakerPolicy
名字 |
描述 |
價值 |
consecutiveErrors |
斷路器開啟之前的連續錯誤數目 |
int |
intervalInSeconds |
端點檢查之間的時間間隔,以秒為單位。 如果檢查失敗,以及如果檢查成功,關閉斷路器,這可能會導致開啟斷路器。 預設值為 10s。 |
int |
maxEjectionPercent |
符合失敗閾值後將會退出的主機百分比上限 |
int |
名字 |
描述 |
價值 |
exactMatch |
標頭的確切值 |
字串 |
prefixMatch |
標頭的前置詞值 |
字串 |
regexMatch |
標頭的 Regex 值 |
字串 |
suffixMatch |
標頭的後綴值 |
字串 |
HttpConnectionPool
名字 |
描述 |
價值 |
http1MaxPendingRequests |
允許的暫止 HTTP1 要求數目上限 |
int |
http2MaxRequests |
允許的 HTTP2 要求數目上限 |
int |
HttpRetryPolicy
HttpRetryPolicyMatches
名字 |
描述 |
價值 |
錯誤 |
可以觸發重試的錯誤 |
string[] |
頭 |
必須存在的標頭,才能重試要求 |
HeaderMatch[] |
httpStatusCodes |
可觸發重試的其他 HTTP 狀態代碼 |
int[] |
HttpRetryPolicyRetryBackOff
名字 |
描述 |
價值 |
initialDelayInMilliseconds |
在重試要求之前,以毫秒為單位的初始延遲 |
int |
maxIntervalInMilliseconds |
重試之間的間隔上限,以毫秒為單位 |
int |
Microsoft.App/containerApps/resiliencyPolicies
名字 |
描述 |
價值 |
apiVersion |
API 版本 |
'2024-08-02-preview' |
名字 |
資源名稱 |
字串
約束: 模式 = ^[-\w\._\(\)]+$ (必要) |
性能 |
應用程式復原資源特定屬性 |
AppResiliencyProperties |
類型 |
資源類型 |
'Microsoft.App/containerApps/resiliencyPolicies' |
TcpConnectionPool
名字 |
描述 |
價值 |
maxConnections |
允許的 TCP 連線數目上限 |
int |
TcpRetryPolicy
名字 |
描述 |
價值 |
maxConnectAttempts |
線上到 tcp 服務的嘗試次數上限 |
int |
TimeoutPolicy
名字 |
描述 |
價值 |
connectionTimeoutInSeconds |
逾時,以秒為單位,要求起始連接 |
int |
responseTimeoutInSeconds |
要求回應的逾時,以秒為單位 |
int |
containerApps/resiliencyPolicies 資源類型可以使用目標作業來部署:
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
若要建立 Microsoft.App/containerApps/resiliencyPolicies 資源,請將下列 Terraform 新增至範本。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.App/containerApps/resiliencyPolicies@2024-08-02-preview"
name = "string"
body = jsonencode({
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
}
}
})
}
屬性值
AppResiliencyProperties
CircuitBreakerPolicy
名字 |
描述 |
價值 |
consecutiveErrors |
斷路器開啟之前的連續錯誤數目 |
int |
intervalInSeconds |
端點檢查之間的時間間隔,以秒為單位。 如果檢查失敗,以及如果檢查成功,關閉斷路器,這可能會導致開啟斷路器。 預設值為 10s。 |
int |
maxEjectionPercent |
符合失敗閾值後將會退出的主機百分比上限 |
int |
名字 |
描述 |
價值 |
exactMatch |
標頭的確切值 |
字串 |
prefixMatch |
標頭的前置詞值 |
字串 |
regexMatch |
標頭的 Regex 值 |
字串 |
suffixMatch |
標頭的後綴值 |
字串 |
HttpConnectionPool
名字 |
描述 |
價值 |
http1MaxPendingRequests |
允許的暫止 HTTP1 要求數目上限 |
int |
http2MaxRequests |
允許的 HTTP2 要求數目上限 |
int |
HttpRetryPolicy
HttpRetryPolicyMatches
名字 |
描述 |
價值 |
錯誤 |
可以觸發重試的錯誤 |
string[] |
頭 |
必須存在的標頭,才能重試要求 |
HeaderMatch[] |
httpStatusCodes |
可觸發重試的其他 HTTP 狀態代碼 |
int[] |
HttpRetryPolicyRetryBackOff
名字 |
描述 |
價值 |
initialDelayInMilliseconds |
在重試要求之前,以毫秒為單位的初始延遲 |
int |
maxIntervalInMilliseconds |
重試之間的間隔上限,以毫秒為單位 |
int |
Microsoft.App/containerApps/resiliencyPolicies
名字 |
描述 |
價值 |
名字 |
資源名稱 |
字串
約束: 模式 = ^[-\w\._\(\)]+$ (必要) |
parent_id |
此資源為父系之資源的標識碼。 |
類型資源的標識碼:containerApps |
性能 |
應用程式復原資源特定屬性 |
AppResiliencyProperties |
類型 |
資源類型 |
“Microsoft.App/containerApps/resiliencyPolicies@2024-08-02-preview” |
TcpConnectionPool
名字 |
描述 |
價值 |
maxConnections |
允許的 TCP 連線數目上限 |
int |
TcpRetryPolicy
名字 |
描述 |
價值 |
maxConnectAttempts |
線上到 tcp 服務的嘗試次數上限 |
int |
TimeoutPolicy
名字 |
描述 |
價值 |
connectionTimeoutInSeconds |
逾時,以秒為單位,要求起始連接 |
int |
responseTimeoutInSeconds |
要求回應的逾時,以秒為單位 |
int |