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

Microsoft.ContainerService managedClusters/maintenanceConfigurations 2023-10-02-预览版

Bicep 资源定义

可以使用目标作部署 managedClusters/maintenanceConfigurations 资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志。

用法示例

Azure 验证模块

以下 Azure 验证模块 可用于部署此资源类型。

模块 Description
Azure Kubernetes Service (AKS) Managed Cluster - Maintenance Config AVM Child Module for Azure Kubernetes Service (AKS) Managed Cluster - Maintenance Config

资源格式

若要创建 Microsoft.ContainerService/managedClusters/maintenanceConfigurations 资源,请将以下 Bicep 添加到模板。

resource symbolicname 'Microsoft.ContainerService/managedClusters/maintenanceConfigurations@2023-10-02-preview' = {
  parent: resourceSymbolicName
  name: 'string'
  properties: {
    maintenanceWindow: {
      durationHours: int
      notAllowedDates: [
        {
          end: 'string'
          start: 'string'
        }
      ]
      schedule: {
        absoluteMonthly: {
          dayOfMonth: int
          intervalMonths: int
        }
        daily: {
          intervalDays: int
        }
        relativeMonthly: {
          dayOfWeek: 'string'
          intervalMonths: int
          weekIndex: 'string'
        }
        weekly: {
          dayOfWeek: 'string'
          intervalWeeks: int
        }
      }
      startDate: 'string'
      startTime: 'string'
      utcOffset: 'string'
    }
    notAllowedTime: [
      {
        end: 'string'
        start: 'string'
      }
    ]
    timeInWeek: [
      {
        day: 'string'
        hourSlots: [
          int
        ]
      }
    ]
  }
}

属性值

Microsoft.ContainerService/managedClusters/maintenanceConfigurations

Name Description Value
name 资源名称 string (必需)
父级 在 Bicep 中,可以为子资源指定父资源。 仅当子资源在父资源外部声明时,才需要添加此属性。

有关详细信息,请参阅 父资源外部的子资源。
类型为:managedClusters 的资源的符号名称
properties 默认维护配置的属性。 MaintenanceConfigurationProperties

AbsoluteMonthlySchedule

Name Description Value
dayOfMonth 月份的日期。 int

Constraints:
最小值 = 1
最大值 = 31 (必需)
intervalMonths 指定每个匹配项集之间的月数。 int

Constraints:
最小值 = 1
最大值 = 6 (必需)

DailySchedule

Name Description Value
intervalDays 指定每个匹配项集之间的天数。 int

Constraints:
最小值 = 1
最大值 = 7 (必需)

DateSpan

Name Description Value
end 日期范围的结束日期。 string (必需)
start 日期范围的开始日期。 string (必需)

MaintenanceConfigurationProperties

Name Description Value
maintenanceWindow 维护配置的维护时段。 MaintenanceWindow
notAllowedTime 不允许升级的时间段。 TimeSpan[]
timeInWeek 如果两个数组条目指定一周中的同一天,则应用的配置是这两个条目中的时间联合。 TimeInWeek[]

MaintenanceWindow

Name Description Value
durationHours 维护时段的长度从 4 小时到 24 小时不等。 int

Constraints:
最小值 = 4
最大值 = 24 (必需)
notAllowedDates 不允许升级的日期范围。 “utcOffset”适用于此字段。 例如,将“utcOffset: +02:00”和“dateSpan”设置为“2022-12-23”到“2023-01-03”, 在 UTC 时间,维护将被阻止从“2022-12-22 22:00”到“2023-01-03 22:00”。 DateSpan[]
schedule 维护时段的定期计划。 时间表 (必填)
startDate 维护时段激活的日期。 如果当前日期在此日期之前,则维护时段处于非活动状态,不会用于升级。 如果未指定,则维护时段将立即处于活动状态。 字符串
startTime 维护时段的开始时间。 接受的值从“00:00”到“23:59”。 “utcOffset”适用于此字段。 例如:带有“utcOffset: +02:00”的“02:00”表示 UTC 时间“00:00”。 string

Constraints:
模式 = ^\d{2}:\d{2}$ (必需)
utcOffset 格式为 +/-HH:mm 的 UTC 偏移量。 例如,IST 的“+05:30”和 PST 的“-07:00”。 如果未指定,则默认值为“+00:00”。 string

Constraints:
图案 = ^(-|\+)[0-9]{2}:[0-9]{2}$

RelativeMonthlySchedule

Name Description Value
dayOfWeek 指定发生维护的星期几。 'Friday'
'Monday'
'Saturday'
'Sunday'
'Thursday'
'Tuesday'
“星期三”(必填)
intervalMonths 指定每个匹配项集之间的月数。 int

Constraints:
最小值 = 1
最大值 = 6 (必需)
weekIndex 指定在 DaysOfWeek 中指定的允许天数的实例发生维护。 'First'
'Fourth'
'Last'
'Second'
“第三”(必填)

Schedule

Name Description Value
absoluteMonthly 对于计划,例如:“15 日每月递归”或“20 日每 3 个月递归一次”。 AbsoluteMonthlySchedule
daily 对于计划,例如:“每天递归”或“每 3 天递归一次”。 DailySchedule
relativeMonthly 对于计划,例如:“在第一个星期一每月递归”或“上周五每 3 个月递归一次”。 RelativeMonthlySchedule
weekly 对于计划,例如:“每周一递归”或“周三每 3 周重复一次”。 WeeklySchedule

TimeInWeek

Name Description Value
day 一周中的一天。 'Friday'
'Monday'
'Saturday'
'Sunday'
'Thursday'
'Tuesday'
'Wednesday'
hourSlots 每个整数小时表示一个时间范围,从下一小时结束的小时后 0 米(非含)。 0 对应于 00:00 UTC,23 对应于 23:00 UTC。 指定 [0, 1] 表示 00:00 - 02:00 UTC 时间范围。 int

Constraints:
最小值 = 0
最大值 = 23[]

TimeSpan

Name Description Value
end 时间跨度结束 字符串
start 时间跨度的开始 字符串

WeeklySchedule

Name Description Value
dayOfWeek 指定发生维护的星期几。 'Friday'
'Monday'
'Saturday'
'Sunday'
'Thursday'
'Tuesday'
“星期三”(必填)
intervalWeeks 指定每组重复间隔的周数。 int

Constraints:
最小值 = 1
最大值 = 4 (必需)

ARM 模板资源定义

可以使用目标作部署 managedClusters/maintenanceConfigurations 资源类型:

用法示例

资源格式

若要创建 Microsoft.ContainerService/managedClusters/maintenanceConfigurations 资源,请将以下 JSON 添加到模板。

{
  "type": "Microsoft.ContainerService/managedClusters/maintenanceConfigurations",
  "apiVersion": "2023-10-02-preview",
  "name": "string",
  "properties": {
    "maintenanceWindow": {
      "durationHours": "int",
      "notAllowedDates": [
        {
          "end": "string",
          "start": "string"
        }
      ],
      "schedule": {
        "absoluteMonthly": {
          "dayOfMonth": "int",
          "intervalMonths": "int"
        },
        "daily": {
          "intervalDays": "int"
        },
        "relativeMonthly": {
          "dayOfWeek": "string",
          "intervalMonths": "int",
          "weekIndex": "string"
        },
        "weekly": {
          "dayOfWeek": "string",
          "intervalWeeks": "int"
        }
      },
      "startDate": "string",
      "startTime": "string",
      "utcOffset": "string"
    },
    "notAllowedTime": [
      {
        "end": "string",
        "start": "string"
      }
    ],
    "timeInWeek": [
      {
        "day": "string",
        "hourSlots": [ "int" ]
      }
    ]
  }
}

属性值

Microsoft.ContainerService/managedClusters/maintenanceConfigurations

Name Description Value
apiVersion API 版本 '2023-10-02-preview'
name 资源名称 string (必需)
properties 默认维护配置的属性。 MaintenanceConfigurationProperties
类型 资源类型 'Microsoft.ContainerService/managedClusters/maintenanceConfigurations'

AbsoluteMonthlySchedule

Name Description Value
dayOfMonth 月份的日期。 int

Constraints:
最小值 = 1
最大值 = 31 (必需)
intervalMonths 指定每个匹配项集之间的月数。 int

Constraints:
最小值 = 1
最大值 = 6 (必需)

DailySchedule

Name Description Value
intervalDays 指定每个匹配项集之间的天数。 int

Constraints:
最小值 = 1
最大值 = 7 (必需)

DateSpan

Name Description Value
end 日期范围的结束日期。 string (必需)
start 日期范围的开始日期。 string (必需)

MaintenanceConfigurationProperties

Name Description Value
maintenanceWindow 维护配置的维护时段。 MaintenanceWindow
notAllowedTime 不允许升级的时间段。 TimeSpan[]
timeInWeek 如果两个数组条目指定一周中的同一天,则应用的配置是这两个条目中的时间联合。 TimeInWeek[]

MaintenanceWindow

Name Description Value
durationHours 维护时段的长度从 4 小时到 24 小时不等。 int

Constraints:
最小值 = 4
最大值 = 24 (必需)
notAllowedDates 不允许升级的日期范围。 “utcOffset”适用于此字段。 例如,将“utcOffset: +02:00”和“dateSpan”设置为“2022-12-23”到“2023-01-03”, 在 UTC 时间,维护将被阻止从“2022-12-22 22:00”到“2023-01-03 22:00”。 DateSpan[]
schedule 维护时段的定期计划。 时间表 (必填)
startDate 维护时段激活的日期。 如果当前日期在此日期之前,则维护时段处于非活动状态,不会用于升级。 如果未指定,则维护时段将立即处于活动状态。 字符串
startTime 维护时段的开始时间。 接受的值从“00:00”到“23:59”。 “utcOffset”适用于此字段。 例如:带有“utcOffset: +02:00”的“02:00”表示 UTC 时间“00:00”。 string

Constraints:
模式 = ^\d{2}:\d{2}$ (必需)
utcOffset 格式为 +/-HH:mm 的 UTC 偏移量。 例如,IST 的“+05:30”和 PST 的“-07:00”。 如果未指定,则默认值为“+00:00”。 string

Constraints:
图案 = ^(-|\+)[0-9]{2}:[0-9]{2}$

RelativeMonthlySchedule

Name Description Value
dayOfWeek 指定发生维护的星期几。 'Friday'
'Monday'
'Saturday'
'Sunday'
'Thursday'
'Tuesday'
“星期三”(必填)
intervalMonths 指定每个匹配项集之间的月数。 int

Constraints:
最小值 = 1
最大值 = 6 (必需)
weekIndex 指定在 DaysOfWeek 中指定的允许天数的实例发生维护。 'First'
'Fourth'
'Last'
'Second'
“第三”(必填)

Schedule

Name Description Value
absoluteMonthly 对于计划,例如:“15 日每月递归”或“20 日每 3 个月递归一次”。 AbsoluteMonthlySchedule
daily 对于计划,例如:“每天递归”或“每 3 天递归一次”。 DailySchedule
relativeMonthly 对于计划,例如:“在第一个星期一每月递归”或“上周五每 3 个月递归一次”。 RelativeMonthlySchedule
weekly 对于计划,例如:“每周一递归”或“周三每 3 周重复一次”。 WeeklySchedule

TimeInWeek

Name Description Value
day 一周中的一天。 'Friday'
'Monday'
'Saturday'
'Sunday'
'Thursday'
'Tuesday'
'Wednesday'
hourSlots 每个整数小时表示一个时间范围,从下一小时结束的小时后 0 米(非含)。 0 对应于 00:00 UTC,23 对应于 23:00 UTC。 指定 [0, 1] 表示 00:00 - 02:00 UTC 时间范围。 int

Constraints:
最小值 = 0
最大值 = 23[]

TimeSpan

Name Description Value
end 时间跨度结束 字符串
start 时间跨度的开始 字符串

WeeklySchedule

Name Description Value
dayOfWeek 指定发生维护的星期几。 'Friday'
'Monday'
'Saturday'
'Sunday'
'Thursday'
'Tuesday'
“星期三”(必填)
intervalWeeks 指定每组重复间隔的周数。 int

Constraints:
最小值 = 1
最大值 = 4 (必需)

Terraform (AzAPI 提供程序)资源定义

可以使用目标作部署 managedClusters/maintenanceConfigurations 资源类型:

  • 资源组 关于每个API版本中变更属性的列表,请参见 更改日志。

资源格式

若要创建 Microsoft.ContainerService/managedClusters/maintenanceConfigurations 资源,请将以下 Terraform 添加到模板。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.ContainerService/managedClusters/maintenanceConfigurations@2023-10-02-preview"
  name = "string"
  parent_id = "string"
  body = {
    properties = {
      maintenanceWindow = {
        durationHours = int
        notAllowedDates = [
          {
            end = "string"
            start = "string"
          }
        ]
        schedule = {
          absoluteMonthly = {
            dayOfMonth = int
            intervalMonths = int
          }
          daily = {
            intervalDays = int
          }
          relativeMonthly = {
            dayOfWeek = "string"
            intervalMonths = int
            weekIndex = "string"
          }
          weekly = {
            dayOfWeek = "string"
            intervalWeeks = int
          }
        }
        startDate = "string"
        startTime = "string"
        utcOffset = "string"
      }
      notAllowedTime = [
        {
          end = "string"
          start = "string"
        }
      ]
      timeInWeek = [
        {
          day = "string"
          hourSlots = [
            int
          ]
        }
      ]
    }
  }
}

属性值

Microsoft.ContainerService/managedClusters/maintenanceConfigurations

Name Description Value
name 资源名称 string (必需)
parent_id 此资源的父资源的 ID。 类型为:managedClusters 的资源的 ID
properties 默认维护配置的属性。 MaintenanceConfigurationProperties
类型 资源类型 "Microsoft.ContainerService/managedClusters/maintenanceConfigurations@2023-10-02-preview"

AbsoluteMonthlySchedule

Name Description Value
dayOfMonth 月份的日期。 int

Constraints:
最小值 = 1
最大值 = 31 (必需)
intervalMonths 指定每个匹配项集之间的月数。 int

Constraints:
最小值 = 1
最大值 = 6 (必需)

DailySchedule

Name Description Value
intervalDays 指定每个匹配项集之间的天数。 int

Constraints:
最小值 = 1
最大值 = 7 (必需)

DateSpan

Name Description Value
end 日期范围的结束日期。 string (必需)
start 日期范围的开始日期。 string (必需)

MaintenanceConfigurationProperties

Name Description Value
maintenanceWindow 维护配置的维护时段。 MaintenanceWindow
notAllowedTime 不允许升级的时间段。 TimeSpan[]
timeInWeek 如果两个数组条目指定一周中的同一天,则应用的配置是这两个条目中的时间联合。 TimeInWeek[]

MaintenanceWindow

Name Description Value
durationHours 维护时段的长度从 4 小时到 24 小时不等。 int

Constraints:
最小值 = 4
最大值 = 24 (必需)
notAllowedDates 不允许升级的日期范围。 “utcOffset”适用于此字段。 例如,将“utcOffset: +02:00”和“dateSpan”设置为“2022-12-23”到“2023-01-03”, 在 UTC 时间,维护将被阻止从“2022-12-22 22:00”到“2023-01-03 22:00”。 DateSpan[]
schedule 维护时段的定期计划。 时间表 (必填)
startDate 维护时段激活的日期。 如果当前日期在此日期之前,则维护时段处于非活动状态,不会用于升级。 如果未指定,则维护时段将立即处于活动状态。 字符串
startTime 维护时段的开始时间。 接受的值从“00:00”到“23:59”。 “utcOffset”适用于此字段。 例如:带有“utcOffset: +02:00”的“02:00”表示 UTC 时间“00:00”。 string

Constraints:
模式 = ^\d{2}:\d{2}$ (必需)
utcOffset 格式为 +/-HH:mm 的 UTC 偏移量。 例如,IST 的“+05:30”和 PST 的“-07:00”。 如果未指定,则默认值为“+00:00”。 string

Constraints:
图案 = ^(-|\+)[0-9]{2}:[0-9]{2}$

RelativeMonthlySchedule

Name Description Value
dayOfWeek 指定发生维护的星期几。 'Friday'
'Monday'
'Saturday'
'Sunday'
'Thursday'
'Tuesday'
“星期三”(必填)
intervalMonths 指定每个匹配项集之间的月数。 int

Constraints:
最小值 = 1
最大值 = 6 (必需)
weekIndex 指定在 DaysOfWeek 中指定的允许天数的实例发生维护。 'First'
'Fourth'
'Last'
'Second'
“第三”(必填)

Schedule

Name Description Value
absoluteMonthly 对于计划,例如:“15 日每月递归”或“20 日每 3 个月递归一次”。 AbsoluteMonthlySchedule
daily 对于计划,例如:“每天递归”或“每 3 天递归一次”。 DailySchedule
relativeMonthly 对于计划,例如:“在第一个星期一每月递归”或“上周五每 3 个月递归一次”。 RelativeMonthlySchedule
weekly 对于计划,例如:“每周一递归”或“周三每 3 周重复一次”。 WeeklySchedule

TimeInWeek

Name Description Value
day 一周中的一天。 'Friday'
'Monday'
'Saturday'
'Sunday'
'Thursday'
'Tuesday'
'Wednesday'
hourSlots 每个整数小时表示一个时间范围,从下一小时结束的小时后 0 米(非含)。 0 对应于 00:00 UTC,23 对应于 23:00 UTC。 指定 [0, 1] 表示 00:00 - 02:00 UTC 时间范围。 int

Constraints:
最小值 = 0
最大值 = 23[]

TimeSpan

Name Description Value
end 时间跨度结束 字符串
start 时间跨度的开始 字符串

WeeklySchedule

Name Description Value
dayOfWeek 指定发生维护的星期几。 'Friday'
'Monday'
'Saturday'
'Sunday'
'Thursday'
'Tuesday'
“星期三”(必填)
intervalWeeks 指定每组重复间隔的周数。 int

Constraints:
最小值 = 1
最大值 = 4 (必需)