你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Microsoft.DeploymentManager 步骤
Bicep 资源定义
可将步骤资源类型部署到:
- 资源组 - 请参阅 资源组部署命令
有关每个 API 版本中已更改属性的列表,请参阅 更改日志。
资源格式
若要创建 Microsoft.DeploymentManager/steps 资源,请将以下 Bicep 添加到模板。
resource symbolicname 'Microsoft.DeploymentManager/steps@2019-11-01-preview' = {
name: 'string'
location: 'string'
tags: {
tagName1: 'tagValue1'
tagName2: 'tagValue2'
}
properties: {
stepType: 'string'
// For remaining properties, see StepProperties objects
}
}
StepProperties 对象
设置 stepType 属性以指定对象的类型。
对于 HealthCheck,请使用:
stepType: 'HealthCheck'
attributes: {
healthyStateDuration: 'string'
maxElasticDuration: 'string'
waitDuration: 'string'
type: 'string'
// For remaining properties, see HealthCheckStepAttributes objects
}
对于 “等待”,请使用:
stepType: 'Wait'
attributes: {
duration: 'string'
}
HealthCheckStepAttributes 对象
设置 type 属性以指定对象的类型。
对于 REST,请使用:
type: 'REST'
properties: {
healthChecks: [
{
name: 'string'
request: {
authentication: {
type: 'string'
// For remaining properties, see RestRequestAuthentication objects
}
method: 'string'
uri: 'string'
}
response: {
regex: {
matches: [
'string'
]
matchQuantifier: 'string'
}
successStatusCodes: [
'string'
]
}
}
]
}
RestRequestAuthentication 对象
设置 type 属性以指定对象的类型。
对于 ApiKey,请使用:
type: 'ApiKey'
in: 'string'
name: 'string'
value: 'string'
对于 RolloutIdentity,请使用:
type: 'RolloutIdentity'
属性值
steps
名称 | 说明 | Value |
---|---|---|
name | 资源名称 | 字符串 (必需) |
location | 资源所在的地理位置 | 字符串 (必需) |
标记 | 资源标记。 | 标记名称和值的字典。 请参阅 模板中的标记 |
properties | 定义步骤的属性。 | StepProperties (必需) |
StepProperties
名称 | 说明 | Value |
---|---|---|
stepType | 设置对象类型 | HealthCheck 需要等待 () |
HealthCheckStepProperties
名称 | 说明 | Value |
---|---|---|
stepType | 步骤的类型。 | “HealthCheck” (必需) |
attributes | 运行状况检查步骤属性 | HealthCheckStepAttributes (必需) |
HealthCheckStepAttributes
名称 | 说明 | Value |
---|---|---|
healthyStateDuration | 资源预期持续正常运行的 ISO 8601 格式的持续时间。 如果指定了 maxElasticDuration,则会在检测到第一个正常信号后强制实施正常状态持续时间。 | 字符串 (必需) |
maxElasticDuration | 运行状况检查等待资源正常运行的持续时间(ISO 8601 格式)。 如果运行状况检查未通过,则失败。 运行状况检查开始在资源正常运行后强制实施 healthyStateDuration。 | 字符串 |
waitDuration | 以 ISO 8601 格式表示的持续时间,其中运行状况检查在没有任何检查的情况下等待。 | 字符串 |
type | 设置对象类型 | 需要 REST () |
RestHealthCheckStepAttributes
名称 | 说明 | Value |
---|---|---|
type | 运行状况检查的类型。 | “REST” (必需) |
properties | REST 运行状况检查参数。 | RestParameters |
RestParameters
名称 | 说明 | Value |
---|---|---|
healthChecks | 构成运行状况检查步骤的检查列表。 | RestHealthCheck[] (必需) |
RestHealthCheck
名称 | 说明 | Value |
---|---|---|
name | 此检查的唯一名称。 | 字符串 (必需) |
request | 对运行状况提供程序的请求。 | 需要 restRequest () |
响应 | 运行状况提供程序的预期响应。 如果未提供预期的响应,则默认要求收到的响应的 HTTP 状态代码为 200 OK。 | RestResponse |
RestRequest
名称 | 说明 | Value |
---|---|---|
身份验证 | 向运行状况提供程序的请求中所需的身份验证信息。 | 需要 restRequestAuthentication () |
method | 用于请求的 HTTP 方法。 | “GET” “POST” (必需的) |
uri | 要用于请求的 HTTP URI。 | 字符串 (必需) |
RestRequestAuthentication
名称 | 说明 | Value |
---|---|---|
type | 设置对象类型 | ApiKey 需要 RolloutIdentity () |
ApiKeyAuthentication
名称 | 说明 | Value |
---|---|---|
type | 身份验证类型。 | “ApiKey” (必需) |
in | 身份验证密钥/值对在请求中的位置。 | “Header” “Query” (必需) |
name | 身份验证密钥/值对的密钥名称。 | 字符串 (必需) |
value | 身份验证密钥/值对的值。 | 字符串 (必需) |
RolloutIdentityAuthentication
名称 | 说明 | Value |
---|---|---|
type | 身份验证类型。 | 需要“RolloutIdentity” () |
RestResponse
名称 | 说明 | Value |
---|---|---|
regex | 要与响应内容匹配的正则表达式。 | RestResponseRegex |
successStatusCodes | 成功的运行状况检查响应中预期的 HTTP 状态代码。 响应应与给定状态代码之一匹配。 如果未提供预期的状态代码,则默认的预期状态代码为 200 正常。 | string[] |
RestResponseRegex
名称 | 说明 | Value |
---|---|---|
matches | 正则表达式的列表。 | string[] |
matchQuantifier | 指示任何或所有表达式是否应与响应内容匹配。 | “All” “Any” |
WaitStepProperties
名称 | 说明 | Value |
---|---|---|
stepType | 步骤的类型。 | “等待” (必需) |
attributes | Wait 属性 | WaitStepAttributes (必需) |
WaitStepAttributes
名称 | 说明 | Value |
---|---|---|
duration | 以 ISO 8601 格式表示等待时间的持续时间。 | 字符串 (必需) |
ARM 模板资源定义
可将资源类型部署到的步骤:
- 资源组 - 请参阅 资源组部署命令
有关每个 API 版本中更改的属性的列表,请参阅 更改日志。
资源格式
若要创建 Microsoft.DeploymentManager/steps 资源,请将以下 JSON 添加到模板。
{
"type": "Microsoft.DeploymentManager/steps",
"apiVersion": "2019-11-01-preview",
"name": "string",
"location": "string",
"tags": {
"tagName1": "tagValue1",
"tagName2": "tagValue2"
},
"properties": {
"stepType": "string"
// For remaining properties, see StepProperties objects
}
}
StepProperties 对象
设置 stepType 属性以指定对象的类型。
对于 HealthCheck,请使用:
"stepType": "HealthCheck",
"attributes": {
"healthyStateDuration": "string",
"maxElasticDuration": "string",
"waitDuration": "string",
"type": "string"
// For remaining properties, see HealthCheckStepAttributes objects
}
对于 “等待”,请使用:
"stepType": "Wait",
"attributes": {
"duration": "string"
}
HealthCheckStepAttributes 对象
设置 type 属性以指定对象的类型。
对于 REST,请使用:
"type": "REST",
"properties": {
"healthChecks": [
{
"name": "string",
"request": {
"authentication": {
"type": "string"
// For remaining properties, see RestRequestAuthentication objects
},
"method": "string",
"uri": "string"
},
"response": {
"regex": {
"matches": [ "string" ],
"matchQuantifier": "string"
},
"successStatusCodes": [ "string" ]
}
}
]
}
RestRequestAuthentication 对象
设置 type 属性以指定对象的类型。
对于 ApiKey,请使用:
"type": "ApiKey",
"in": "string",
"name": "string",
"value": "string"
对于 RolloutIdentity,请使用:
"type": "RolloutIdentity"
属性值
steps
名称 | 说明 | Value |
---|---|---|
type | 资源类型 | “Microsoft.DeploymentManager/steps” |
apiVersion | 资源 API 版本 | “2019-11-01-preview” |
name | 资源名称 | 字符串 (必需) |
location | 资源所在的地理位置 | 字符串 (必需) |
标记 | 资源标记。 | 标记名称和值的字典。 请参阅 模板中的标记 |
properties | 定义步骤的属性。 | StepProperties (必需) |
StepProperties
名称 | 说明 | Value |
---|---|---|
stepType | 设置对象类型 | HealthCheck 需要等待 () |
HealthCheckStepProperties
名称 | 说明 | Value |
---|---|---|
stepType | 步骤的类型。 | “HealthCheck” (必需) |
attributes | 运行状况检查步骤属性 | HealthCheckStepAttributes (必需的) |
HealthCheckStepAttributes
名称 | 说明 | Value |
---|---|---|
healthyStateDuration | 资源应持续正常运行的 ISO 8601 格式的持续时间。 如果指定了 maxElasticDuration,则会在检测到第一个正常信号后强制实施正常状态持续时间。 | 字符串 (必需) |
maxElasticDuration | 运行状况检查等待资源正常运行的 ISO 8601 格式的持续时间。 如果未进行运行状况检查,则失败。 运行状况检查开始在资源正常后强制实施 healthyStateDuration。 | 字符串 |
waitDuration | 以 ISO 8601 格式表示的持续时间,其中运行状况检查在没有任何检查的情况下会无所事事地等待。 | 字符串 |
type | 设置对象类型 | 需要 REST () |
RestHealthCheckStepAttributes
名称 | 说明 | Value |
---|---|---|
type | 运行状况检查的类型。 | “REST” (必需) |
properties | REST 运行状况检查参数。 | RestParameters |
RestParameters
名称 | 说明 | Value |
---|---|---|
healthChecks | 构成运行状况检查步骤的检查列表。 | RestHealthCheck[] (必需) |
RestHealthCheck
名称 | 说明 | Value |
---|---|---|
name | 此检查的唯一名称。 | 字符串 (必需) |
request | 对运行状况提供程序的请求。 | 需要 restRequest () |
响应 | 运行状况提供程序的预期响应。 如果未提供预期的响应,则默认要求收到的响应的 HTTP 状态代码为 200 OK。 | RestResponse |
RestRequest
名称 | 说明 | Value |
---|---|---|
身份验证 | 向运行状况提供程序的请求中所需的身份验证信息。 | 需要 restRequestAuthentication () |
method | 用于请求的 HTTP 方法。 | “GET” “POST” (必需的) |
uri | 要用于请求的 HTTP URI。 | 字符串 (必需) |
RestRequestAuthentication
名称 | 说明 | Value |
---|---|---|
type | 设置对象类型 | ApiKey 需要 RolloutIdentity () |
ApiKeyAuthentication
名称 | 说明 | Value |
---|---|---|
type | 身份验证类型。 | “ApiKey” (必需) |
in | 身份验证密钥/值对在请求中的位置。 | “Header” “Query” (必需) |
name | 身份验证密钥/值对的密钥名称。 | 字符串 (必需) |
value | 身份验证密钥/值对的值。 | 字符串 (必需) |
RolloutIdentityAuthentication
名称 | 说明 | Value |
---|---|---|
type | 身份验证类型。 | 需要“RolloutIdentity” () |
RestResponse
名称 | 说明 | Value |
---|---|---|
regex | 要与响应内容匹配的正则表达式。 | RestResponseRegex |
successStatusCodes | 成功的运行状况检查响应中预期的 HTTP 状态代码。 响应应与给定状态代码之一匹配。 如果未提供预期的状态代码,则默认的预期状态代码为 200 正常。 | string[] |
RestResponseRegex
名称 | 说明 | Value |
---|---|---|
matches | 正则表达式的列表。 | string[] |
matchQuantifier | 指示任何或所有表达式是否应与响应内容匹配。 | “All” “Any” |
WaitStepProperties
名称 | 说明 | Value |
---|---|---|
stepType | 步骤的类型。 | “等待” (必需) |
attributes | Wait 属性 | WaitStepAttributes (必需) |
WaitStepAttributes
名称 | 说明 | Value |
---|---|---|
duration | 以 ISO 8601 格式表示等待时间的持续时间。 | 字符串 (必需) |
Terraform (AzAPI 提供程序) 资源定义
可将资源类型部署到的步骤:
- 资源组
有关每个 API 版本中更改的属性的列表,请参阅 更改日志。
资源格式
若要创建 Microsoft.DeploymentManager/steps 资源,请将以下 Terraform 添加到模板。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.DeploymentManager/steps@2019-11-01-preview"
name = "string"
location = "string"
parent_id = "string"
tags = {
tagName1 = "tagValue1"
tagName2 = "tagValue2"
}
body = jsonencode({
properties = {
stepType = "string"
// For remaining properties, see StepProperties objects
}
})
}
StepProperties 对象
设置 stepType 属性以指定对象的类型。
对于 HealthCheck,请使用:
stepType = "HealthCheck"
attributes = {
healthyStateDuration = "string"
maxElasticDuration = "string"
waitDuration = "string"
type = "string"
// For remaining properties, see HealthCheckStepAttributes objects
}
对于 “等待”,请使用:
stepType = "Wait"
attributes = {
duration = "string"
}
HealthCheckStepAttributes 对象
设置 type 属性以指定对象的类型。
对于 REST,请使用:
type = "REST"
properties = {
healthChecks = [
{
name = "string"
request = {
authentication = {
type = "string"
// For remaining properties, see RestRequestAuthentication objects
}
method = "string"
uri = "string"
}
response = {
regex = {
matches = [
"string"
]
matchQuantifier = "string"
}
successStatusCodes = [
"string"
]
}
}
]
}
RestRequestAuthentication 对象
设置 type 属性以指定对象的类型。
对于 ApiKey,请使用:
type = "ApiKey"
in = "string"
name = "string"
value = "string"
对于 RolloutIdentity,请使用:
type = "RolloutIdentity"
属性值
steps
名称 | 说明 | Value |
---|---|---|
type | 资源类型 | “Microsoft.DeploymentManager/steps@2019-11-01-preview” |
name | 资源名称 | 字符串 (必需) |
location | 资源所在的地理位置 | 字符串 (必需) |
parent_id | 若要部署到资源组,请使用该资源组的 ID。 | 字符串 (必需) |
标记 | 资源标记。 | 标记名称和值的字典。 |
properties | 定义步骤的属性。 | StepProperties (必需) |
StepProperties
名称 | 说明 | Value |
---|---|---|
stepType | 设置对象类型 | HealthCheck 需要等待 () |
HealthCheckStepProperties
名称 | 说明 | Value |
---|---|---|
stepType | 步骤的类型。 | “HealthCheck” (必需) |
attributes | 运行状况检查步骤属性 | HealthCheckStepAttributes (必需的) |
HealthCheckStepAttributes
名称 | 说明 | Value |
---|---|---|
healthyStateDuration | 资源应持续正常运行的 ISO 8601 格式的持续时间。 如果指定了 maxElasticDuration,则会在检测到第一个正常信号后强制实施正常状态持续时间。 | 字符串 (必需) |
maxElasticDuration | 运行状况检查等待资源正常运行的 ISO 8601 格式的持续时间。 如果未进行运行状况检查,则失败。 运行状况检查开始在资源正常后强制实施 healthyStateDuration。 | 字符串 |
waitDuration | 以 ISO 8601 格式表示的持续时间,其中运行状况检查在没有任何检查的情况下会无所事事地等待。 | 字符串 |
type | 设置对象类型 | 需要 REST () |
RestHealthCheckStepAttributes
名称 | 说明 | Value |
---|---|---|
type | 运行状况检查的类型。 | “REST” (必需) |
properties | REST 运行状况检查参数。 | RestParameters |
RestParameters
名称 | 说明 | Value |
---|---|---|
healthChecks | 构成运行状况检查步骤的检查列表。 | RestHealthCheck[] (必需) |
RestHealthCheck
名称 | 说明 | Value |
---|---|---|
name | 此检查的唯一名称。 | 字符串 (必需) |
request | 对运行状况提供程序的请求。 | 需要 restRequest () |
响应 | 运行状况提供程序的预期响应。 如果未提供预期的响应,则默认要求收到的响应的 HTTP 状态代码为 200 OK。 | RestResponse |
RestRequest
名称 | 说明 | Value |
---|---|---|
身份验证 | 向运行状况提供程序请求时所需的身份验证信息。 | 需要 restRequestAuthentication () |
method | 要用于请求的 HTTP 方法。 | "GET" “POST” () |
uri | 要用于请求的 HTTP URI。 | 字符串 (必需) |
RestRequestAuthentication
名称 | 说明 | Value |
---|---|---|
type | 设置对象类型 | ApiKey 需要 rolloutIdentity () |
ApiKeyAuthentication
名称 | 说明 | Value |
---|---|---|
type | 身份验证类型。 | “ApiKey” (必需) |
in | 身份验证密钥/值对在请求中的位置。 | “标头” “查询” (必需) |
name | 身份验证密钥/值对的密钥名称。 | 字符串 (必需) |
value | 身份验证密钥/值对的值。 | 字符串 (必需) |
RolloutIdentityAuthentication
名称 | 说明 | Value |
---|---|---|
type | 身份验证类型。 | 需要“RolloutIdentity” () |
RestResponse
名称 | 说明 | Value |
---|---|---|
regex | 要与响应内容匹配的正则表达式。 | RestResponseRegex |
successStatusCodes | 成功的运行状况检查响应中预期的 HTTP 状态代码。 响应应与给定状态代码之一匹配。 如果未提供预期的状态代码,则默认的预期状态代码为 200 正常。 | string[] |
RestResponseRegex
名称 | 说明 | Value |
---|---|---|
matches | 正则表达式的列表。 | string[] |
matchQuantifier | 指示任何或所有表达式是否应与响应内容匹配。 | “全部” “Any” |
WaitStepProperties
名称 | 说明 | Value |
---|---|---|
stepType | 步骤的类型。 | 需要“等待” () |
attributes | Wait 属性 | WaitStepAttributes (必需) |
WaitStepAttributes
名称 | 说明 | Value |
---|---|---|
duration | 以 ISO 8601 格式表示等待的持续时间。 | 字符串 (必需) |
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈