published on Friday, Mar 27, 2026 by tencentcloudstack
published on Friday, Mar 27, 2026 by tencentcloudstack
Provides a resource to create a TKE kubernetes cluster maintenance window and exclusion
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.KubernetesClusterMaintenanceWindowAndExclusion("example", {
clusterId: "cls-d2cit6no",
maintenanceTime: "01:00:00",
duration: 4,
dayOfWeeks: [
"MO",
"TU",
"WE",
"TH",
"FR",
],
exclusions: [
{
name: "name1",
startAt: "2026-03-01 23:59:59",
endAt: "2026-03-07 23:59:59",
},
{
name: "name2",
startAt: "2026-03-01 23:59:59",
endAt: "2026-03-07 23:59:59",
},
{
name: "name3",
startAt: "2026-03-01 23:59:59",
endAt: "2026-03-07 23:59:59",
},
],
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.KubernetesClusterMaintenanceWindowAndExclusion("example",
cluster_id="cls-d2cit6no",
maintenance_time="01:00:00",
duration=4,
day_of_weeks=[
"MO",
"TU",
"WE",
"TH",
"FR",
],
exclusions=[
{
"name": "name1",
"start_at": "2026-03-01 23:59:59",
"end_at": "2026-03-07 23:59:59",
},
{
"name": "name2",
"start_at": "2026-03-01 23:59:59",
"end_at": "2026-03-07 23:59:59",
},
{
"name": "name3",
"start_at": "2026-03-01 23:59:59",
"end_at": "2026-03-07 23:59:59",
},
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewKubernetesClusterMaintenanceWindowAndExclusion(ctx, "example", &tencentcloud.KubernetesClusterMaintenanceWindowAndExclusionArgs{
ClusterId: pulumi.String("cls-d2cit6no"),
MaintenanceTime: pulumi.String("01:00:00"),
Duration: pulumi.Float64(4),
DayOfWeeks: pulumi.StringArray{
pulumi.String("MO"),
pulumi.String("TU"),
pulumi.String("WE"),
pulumi.String("TH"),
pulumi.String("FR"),
},
Exclusions: tencentcloud.KubernetesClusterMaintenanceWindowAndExclusionExclusionArray{
&tencentcloud.KubernetesClusterMaintenanceWindowAndExclusionExclusionArgs{
Name: pulumi.String("name1"),
StartAt: pulumi.String("2026-03-01 23:59:59"),
EndAt: pulumi.String("2026-03-07 23:59:59"),
},
&tencentcloud.KubernetesClusterMaintenanceWindowAndExclusionExclusionArgs{
Name: pulumi.String("name2"),
StartAt: pulumi.String("2026-03-01 23:59:59"),
EndAt: pulumi.String("2026-03-07 23:59:59"),
},
&tencentcloud.KubernetesClusterMaintenanceWindowAndExclusionExclusionArgs{
Name: pulumi.String("name3"),
StartAt: pulumi.String("2026-03-01 23:59:59"),
EndAt: pulumi.String("2026-03-07 23:59:59"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var example = new Tencentcloud.KubernetesClusterMaintenanceWindowAndExclusion("example", new()
{
ClusterId = "cls-d2cit6no",
MaintenanceTime = "01:00:00",
Duration = 4,
DayOfWeeks = new[]
{
"MO",
"TU",
"WE",
"TH",
"FR",
},
Exclusions = new[]
{
new Tencentcloud.Inputs.KubernetesClusterMaintenanceWindowAndExclusionExclusionArgs
{
Name = "name1",
StartAt = "2026-03-01 23:59:59",
EndAt = "2026-03-07 23:59:59",
},
new Tencentcloud.Inputs.KubernetesClusterMaintenanceWindowAndExclusionExclusionArgs
{
Name = "name2",
StartAt = "2026-03-01 23:59:59",
EndAt = "2026-03-07 23:59:59",
},
new Tencentcloud.Inputs.KubernetesClusterMaintenanceWindowAndExclusionExclusionArgs
{
Name = "name3",
StartAt = "2026-03-01 23:59:59",
EndAt = "2026-03-07 23:59:59",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.KubernetesClusterMaintenanceWindowAndExclusion;
import com.pulumi.tencentcloud.KubernetesClusterMaintenanceWindowAndExclusionArgs;
import com.pulumi.tencentcloud.inputs.KubernetesClusterMaintenanceWindowAndExclusionExclusionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new KubernetesClusterMaintenanceWindowAndExclusion("example", KubernetesClusterMaintenanceWindowAndExclusionArgs.builder()
.clusterId("cls-d2cit6no")
.maintenanceTime("01:00:00")
.duration(4.0)
.dayOfWeeks(
"MO",
"TU",
"WE",
"TH",
"FR")
.exclusions(
KubernetesClusterMaintenanceWindowAndExclusionExclusionArgs.builder()
.name("name1")
.startAt("2026-03-01 23:59:59")
.endAt("2026-03-07 23:59:59")
.build(),
KubernetesClusterMaintenanceWindowAndExclusionExclusionArgs.builder()
.name("name2")
.startAt("2026-03-01 23:59:59")
.endAt("2026-03-07 23:59:59")
.build(),
KubernetesClusterMaintenanceWindowAndExclusionExclusionArgs.builder()
.name("name3")
.startAt("2026-03-01 23:59:59")
.endAt("2026-03-07 23:59:59")
.build())
.build());
}
}
resources:
example:
type: tencentcloud:KubernetesClusterMaintenanceWindowAndExclusion
properties:
clusterId: cls-d2cit6no
maintenanceTime: 01:00:00
duration: 4
dayOfWeeks:
- MO
- TU
- WE
- TH
- FR
exclusions:
- name: name1
startAt: 2026-03-01 23:59:59
endAt: 2026-03-07 23:59:59
- name: name2
startAt: 2026-03-01 23:59:59
endAt: 2026-03-07 23:59:59
- name: name3
startAt: 2026-03-01 23:59:59
endAt: 2026-03-07 23:59:59
Create KubernetesClusterMaintenanceWindowAndExclusion Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new KubernetesClusterMaintenanceWindowAndExclusion(name: string, args: KubernetesClusterMaintenanceWindowAndExclusionArgs, opts?: CustomResourceOptions);@overload
def KubernetesClusterMaintenanceWindowAndExclusion(resource_name: str,
args: KubernetesClusterMaintenanceWindowAndExclusionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def KubernetesClusterMaintenanceWindowAndExclusion(resource_name: str,
opts: Optional[ResourceOptions] = None,
cluster_id: Optional[str] = None,
day_of_weeks: Optional[Sequence[str]] = None,
duration: Optional[float] = None,
maintenance_time: Optional[str] = None,
exclusions: Optional[Sequence[KubernetesClusterMaintenanceWindowAndExclusionExclusionArgs]] = None,
kubernetes_cluster_maintenance_window_and_exclusion_id: Optional[str] = None)func NewKubernetesClusterMaintenanceWindowAndExclusion(ctx *Context, name string, args KubernetesClusterMaintenanceWindowAndExclusionArgs, opts ...ResourceOption) (*KubernetesClusterMaintenanceWindowAndExclusion, error)public KubernetesClusterMaintenanceWindowAndExclusion(string name, KubernetesClusterMaintenanceWindowAndExclusionArgs args, CustomResourceOptions? opts = null)
public KubernetesClusterMaintenanceWindowAndExclusion(String name, KubernetesClusterMaintenanceWindowAndExclusionArgs args)
public KubernetesClusterMaintenanceWindowAndExclusion(String name, KubernetesClusterMaintenanceWindowAndExclusionArgs args, CustomResourceOptions options)
type: tencentcloud:KubernetesClusterMaintenanceWindowAndExclusion
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args KubernetesClusterMaintenanceWindowAndExclusionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args KubernetesClusterMaintenanceWindowAndExclusionArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args KubernetesClusterMaintenanceWindowAndExclusionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args KubernetesClusterMaintenanceWindowAndExclusionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args KubernetesClusterMaintenanceWindowAndExclusionArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
KubernetesClusterMaintenanceWindowAndExclusion Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The KubernetesClusterMaintenanceWindowAndExclusion resource accepts the following input properties:
- Cluster
Id string - Cluster ID, can be obtained from the container service cluster console (https://console.cloud.tencent.com/tke2/cluster).
- Day
Of List<string>Weeks - 'Maintenance cycle (which days of the week), supported parameter values are as follows:
- MO: Monday
- TU: Tuesday
- WE: Wednesday
- TH: Thursday
- FR: Friday
- SA: Saturday
- SU: Sunday.
- Duration double
- Maintenance duration (hours).
- Maintenance
Time string - Maintenance start time.
- Exclusions
List<Kubernetes
Cluster Maintenance Window And Exclusion Exclusion> - Maintenance exclusions.
- Kubernetes
Cluster stringMaintenance Window And Exclusion Id - ID of the resource.
- Cluster
Id string - Cluster ID, can be obtained from the container service cluster console (https://console.cloud.tencent.com/tke2/cluster).
- Day
Of []stringWeeks - 'Maintenance cycle (which days of the week), supported parameter values are as follows:
- MO: Monday
- TU: Tuesday
- WE: Wednesday
- TH: Thursday
- FR: Friday
- SA: Saturday
- SU: Sunday.
- Duration float64
- Maintenance duration (hours).
- Maintenance
Time string - Maintenance start time.
- Exclusions
[]Kubernetes
Cluster Maintenance Window And Exclusion Exclusion Args - Maintenance exclusions.
- Kubernetes
Cluster stringMaintenance Window And Exclusion Id - ID of the resource.
- cluster
Id String - Cluster ID, can be obtained from the container service cluster console (https://console.cloud.tencent.com/tke2/cluster).
- day
Of List<String>Weeks - 'Maintenance cycle (which days of the week), supported parameter values are as follows:
- MO: Monday
- TU: Tuesday
- WE: Wednesday
- TH: Thursday
- FR: Friday
- SA: Saturday
- SU: Sunday.
- duration Double
- Maintenance duration (hours).
- maintenance
Time String - Maintenance start time.
- exclusions
List<Kubernetes
Cluster Maintenance Window And Exclusion Exclusion> - Maintenance exclusions.
- kubernetes
Cluster StringMaintenance Window And Exclusion Id - ID of the resource.
- cluster
Id string - Cluster ID, can be obtained from the container service cluster console (https://console.cloud.tencent.com/tke2/cluster).
- day
Of string[]Weeks - 'Maintenance cycle (which days of the week), supported parameter values are as follows:
- MO: Monday
- TU: Tuesday
- WE: Wednesday
- TH: Thursday
- FR: Friday
- SA: Saturday
- SU: Sunday.
- duration number
- Maintenance duration (hours).
- maintenance
Time string - Maintenance start time.
- exclusions
Kubernetes
Cluster Maintenance Window And Exclusion Exclusion[] - Maintenance exclusions.
- kubernetes
Cluster stringMaintenance Window And Exclusion Id - ID of the resource.
- cluster_
id str - Cluster ID, can be obtained from the container service cluster console (https://console.cloud.tencent.com/tke2/cluster).
- day_
of_ Sequence[str]weeks - 'Maintenance cycle (which days of the week), supported parameter values are as follows:
- MO: Monday
- TU: Tuesday
- WE: Wednesday
- TH: Thursday
- FR: Friday
- SA: Saturday
- SU: Sunday.
- duration float
- Maintenance duration (hours).
- maintenance_
time str - Maintenance start time.
- exclusions
Sequence[Kubernetes
Cluster Maintenance Window And Exclusion Exclusion Args] - Maintenance exclusions.
- kubernetes_
cluster_ strmaintenance_ window_ and_ exclusion_ id - ID of the resource.
- cluster
Id String - Cluster ID, can be obtained from the container service cluster console (https://console.cloud.tencent.com/tke2/cluster).
- day
Of List<String>Weeks - 'Maintenance cycle (which days of the week), supported parameter values are as follows:
- MO: Monday
- TU: Tuesday
- WE: Wednesday
- TH: Thursday
- FR: Friday
- SA: Saturday
- SU: Sunday.
- duration Number
- Maintenance duration (hours).
- maintenance
Time String - Maintenance start time.
- exclusions List<Property Map>
- Maintenance exclusions.
- kubernetes
Cluster StringMaintenance Window And Exclusion Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the KubernetesClusterMaintenanceWindowAndExclusion resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing KubernetesClusterMaintenanceWindowAndExclusion Resource
Get an existing KubernetesClusterMaintenanceWindowAndExclusion resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: KubernetesClusterMaintenanceWindowAndExclusionState, opts?: CustomResourceOptions): KubernetesClusterMaintenanceWindowAndExclusion@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cluster_id: Optional[str] = None,
day_of_weeks: Optional[Sequence[str]] = None,
duration: Optional[float] = None,
exclusions: Optional[Sequence[KubernetesClusterMaintenanceWindowAndExclusionExclusionArgs]] = None,
kubernetes_cluster_maintenance_window_and_exclusion_id: Optional[str] = None,
maintenance_time: Optional[str] = None) -> KubernetesClusterMaintenanceWindowAndExclusionfunc GetKubernetesClusterMaintenanceWindowAndExclusion(ctx *Context, name string, id IDInput, state *KubernetesClusterMaintenanceWindowAndExclusionState, opts ...ResourceOption) (*KubernetesClusterMaintenanceWindowAndExclusion, error)public static KubernetesClusterMaintenanceWindowAndExclusion Get(string name, Input<string> id, KubernetesClusterMaintenanceWindowAndExclusionState? state, CustomResourceOptions? opts = null)public static KubernetesClusterMaintenanceWindowAndExclusion get(String name, Output<String> id, KubernetesClusterMaintenanceWindowAndExclusionState state, CustomResourceOptions options)resources: _: type: tencentcloud:KubernetesClusterMaintenanceWindowAndExclusion get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Cluster
Id string - Cluster ID, can be obtained from the container service cluster console (https://console.cloud.tencent.com/tke2/cluster).
- Day
Of List<string>Weeks - 'Maintenance cycle (which days of the week), supported parameter values are as follows:
- MO: Monday
- TU: Tuesday
- WE: Wednesday
- TH: Thursday
- FR: Friday
- SA: Saturday
- SU: Sunday.
- Duration double
- Maintenance duration (hours).
- Exclusions
List<Kubernetes
Cluster Maintenance Window And Exclusion Exclusion> - Maintenance exclusions.
- Kubernetes
Cluster stringMaintenance Window And Exclusion Id - ID of the resource.
- Maintenance
Time string - Maintenance start time.
- Cluster
Id string - Cluster ID, can be obtained from the container service cluster console (https://console.cloud.tencent.com/tke2/cluster).
- Day
Of []stringWeeks - 'Maintenance cycle (which days of the week), supported parameter values are as follows:
- MO: Monday
- TU: Tuesday
- WE: Wednesday
- TH: Thursday
- FR: Friday
- SA: Saturday
- SU: Sunday.
- Duration float64
- Maintenance duration (hours).
- Exclusions
[]Kubernetes
Cluster Maintenance Window And Exclusion Exclusion Args - Maintenance exclusions.
- Kubernetes
Cluster stringMaintenance Window And Exclusion Id - ID of the resource.
- Maintenance
Time string - Maintenance start time.
- cluster
Id String - Cluster ID, can be obtained from the container service cluster console (https://console.cloud.tencent.com/tke2/cluster).
- day
Of List<String>Weeks - 'Maintenance cycle (which days of the week), supported parameter values are as follows:
- MO: Monday
- TU: Tuesday
- WE: Wednesday
- TH: Thursday
- FR: Friday
- SA: Saturday
- SU: Sunday.
- duration Double
- Maintenance duration (hours).
- exclusions
List<Kubernetes
Cluster Maintenance Window And Exclusion Exclusion> - Maintenance exclusions.
- kubernetes
Cluster StringMaintenance Window And Exclusion Id - ID of the resource.
- maintenance
Time String - Maintenance start time.
- cluster
Id string - Cluster ID, can be obtained from the container service cluster console (https://console.cloud.tencent.com/tke2/cluster).
- day
Of string[]Weeks - 'Maintenance cycle (which days of the week), supported parameter values are as follows:
- MO: Monday
- TU: Tuesday
- WE: Wednesday
- TH: Thursday
- FR: Friday
- SA: Saturday
- SU: Sunday.
- duration number
- Maintenance duration (hours).
- exclusions
Kubernetes
Cluster Maintenance Window And Exclusion Exclusion[] - Maintenance exclusions.
- kubernetes
Cluster stringMaintenance Window And Exclusion Id - ID of the resource.
- maintenance
Time string - Maintenance start time.
- cluster_
id str - Cluster ID, can be obtained from the container service cluster console (https://console.cloud.tencent.com/tke2/cluster).
- day_
of_ Sequence[str]weeks - 'Maintenance cycle (which days of the week), supported parameter values are as follows:
- MO: Monday
- TU: Tuesday
- WE: Wednesday
- TH: Thursday
- FR: Friday
- SA: Saturday
- SU: Sunday.
- duration float
- Maintenance duration (hours).
- exclusions
Sequence[Kubernetes
Cluster Maintenance Window And Exclusion Exclusion Args] - Maintenance exclusions.
- kubernetes_
cluster_ strmaintenance_ window_ and_ exclusion_ id - ID of the resource.
- maintenance_
time str - Maintenance start time.
- cluster
Id String - Cluster ID, can be obtained from the container service cluster console (https://console.cloud.tencent.com/tke2/cluster).
- day
Of List<String>Weeks - 'Maintenance cycle (which days of the week), supported parameter values are as follows:
- MO: Monday
- TU: Tuesday
- WE: Wednesday
- TH: Thursday
- FR: Friday
- SA: Saturday
- SU: Sunday.
- duration Number
- Maintenance duration (hours).
- exclusions List<Property Map>
- Maintenance exclusions.
- kubernetes
Cluster StringMaintenance Window And Exclusion Id - ID of the resource.
- maintenance
Time String - Maintenance start time.
Supporting Types
KubernetesClusterMaintenanceWindowAndExclusionExclusion, KubernetesClusterMaintenanceWindowAndExclusionExclusionArgs
Import
tke kubernetes_cluster_maintenance_window_and_exclusion can be imported using the id, e.g.
$ pulumi import tencentcloud:index/kubernetesClusterMaintenanceWindowAndExclusion:KubernetesClusterMaintenanceWindowAndExclusion example cls-d2cit6no
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloudTerraform Provider.
published on Friday, Mar 27, 2026 by tencentcloudstack
