1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. KubernetesGlobalMaintenanceWindowAndExclusion
Viewing docs for tencentcloud 1.82.79
published on Friday, Mar 27, 2026 by tencentcloudstack
tencentcloud logo
Viewing docs for tencentcloud 1.82.79
published on Friday, Mar 27, 2026 by tencentcloudstack

    Provides a resource to create a TKE kubernetes global maintenance window and exclusion

    NOTE: If the target_regions is *, global maintenance window with all region cannot be deleted

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.KubernetesGlobalMaintenanceWindowAndExclusion("example", {
        maintenanceTime: "02:00:00",
        duration: 4,
        dayOfWeeks: [
            "MO",
            "TU",
            "WE",
            "TH",
            "FR",
        ],
        targetRegions: ["ap-guangzhou"],
        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.KubernetesGlobalMaintenanceWindowAndExclusion("example",
        maintenance_time="02:00:00",
        duration=4,
        day_of_weeks=[
            "MO",
            "TU",
            "WE",
            "TH",
            "FR",
        ],
        target_regions=["ap-guangzhou"],
        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.NewKubernetesGlobalMaintenanceWindowAndExclusion(ctx, "example", &tencentcloud.KubernetesGlobalMaintenanceWindowAndExclusionArgs{
    			MaintenanceTime: pulumi.String("02:00:00"),
    			Duration:        pulumi.Float64(4),
    			DayOfWeeks: pulumi.StringArray{
    				pulumi.String("MO"),
    				pulumi.String("TU"),
    				pulumi.String("WE"),
    				pulumi.String("TH"),
    				pulumi.String("FR"),
    			},
    			TargetRegions: pulumi.StringArray{
    				pulumi.String("ap-guangzhou"),
    			},
    			Exclusions: tencentcloud.KubernetesGlobalMaintenanceWindowAndExclusionExclusionArray{
    				&tencentcloud.KubernetesGlobalMaintenanceWindowAndExclusionExclusionArgs{
    					Name:    pulumi.String("name1"),
    					StartAt: pulumi.String("2026-03-01 23:59:59"),
    					EndAt:   pulumi.String("2026-03-07 23:59:59"),
    				},
    				&tencentcloud.KubernetesGlobalMaintenanceWindowAndExclusionExclusionArgs{
    					Name:    pulumi.String("name2"),
    					StartAt: pulumi.String("2026-03-01 23:59:59"),
    					EndAt:   pulumi.String("2026-03-07 23:59:59"),
    				},
    				&tencentcloud.KubernetesGlobalMaintenanceWindowAndExclusionExclusionArgs{
    					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.KubernetesGlobalMaintenanceWindowAndExclusion("example", new()
        {
            MaintenanceTime = "02:00:00",
            Duration = 4,
            DayOfWeeks = new[]
            {
                "MO",
                "TU",
                "WE",
                "TH",
                "FR",
            },
            TargetRegions = new[]
            {
                "ap-guangzhou",
            },
            Exclusions = new[]
            {
                new Tencentcloud.Inputs.KubernetesGlobalMaintenanceWindowAndExclusionExclusionArgs
                {
                    Name = "name1",
                    StartAt = "2026-03-01 23:59:59",
                    EndAt = "2026-03-07 23:59:59",
                },
                new Tencentcloud.Inputs.KubernetesGlobalMaintenanceWindowAndExclusionExclusionArgs
                {
                    Name = "name2",
                    StartAt = "2026-03-01 23:59:59",
                    EndAt = "2026-03-07 23:59:59",
                },
                new Tencentcloud.Inputs.KubernetesGlobalMaintenanceWindowAndExclusionExclusionArgs
                {
                    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.KubernetesGlobalMaintenanceWindowAndExclusion;
    import com.pulumi.tencentcloud.KubernetesGlobalMaintenanceWindowAndExclusionArgs;
    import com.pulumi.tencentcloud.inputs.KubernetesGlobalMaintenanceWindowAndExclusionExclusionArgs;
    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 KubernetesGlobalMaintenanceWindowAndExclusion("example", KubernetesGlobalMaintenanceWindowAndExclusionArgs.builder()
                .maintenanceTime("02:00:00")
                .duration(4.0)
                .dayOfWeeks(            
                    "MO",
                    "TU",
                    "WE",
                    "TH",
                    "FR")
                .targetRegions("ap-guangzhou")
                .exclusions(            
                    KubernetesGlobalMaintenanceWindowAndExclusionExclusionArgs.builder()
                        .name("name1")
                        .startAt("2026-03-01 23:59:59")
                        .endAt("2026-03-07 23:59:59")
                        .build(),
                    KubernetesGlobalMaintenanceWindowAndExclusionExclusionArgs.builder()
                        .name("name2")
                        .startAt("2026-03-01 23:59:59")
                        .endAt("2026-03-07 23:59:59")
                        .build(),
                    KubernetesGlobalMaintenanceWindowAndExclusionExclusionArgs.builder()
                        .name("name3")
                        .startAt("2026-03-01 23:59:59")
                        .endAt("2026-03-07 23:59:59")
                        .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:KubernetesGlobalMaintenanceWindowAndExclusion
        properties:
          maintenanceTime: 02:00:00
          duration: 4
          dayOfWeeks:
            - MO
            - TU
            - WE
            - TH
            - FR
          targetRegions:
            - ap-guangzhou
          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 KubernetesGlobalMaintenanceWindowAndExclusion Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new KubernetesGlobalMaintenanceWindowAndExclusion(name: string, args: KubernetesGlobalMaintenanceWindowAndExclusionArgs, opts?: CustomResourceOptions);
    @overload
    def KubernetesGlobalMaintenanceWindowAndExclusion(resource_name: str,
                                                      args: KubernetesGlobalMaintenanceWindowAndExclusionArgs,
                                                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def KubernetesGlobalMaintenanceWindowAndExclusion(resource_name: str,
                                                      opts: Optional[ResourceOptions] = None,
                                                      day_of_weeks: Optional[Sequence[str]] = None,
                                                      duration: Optional[float] = None,
                                                      maintenance_time: Optional[str] = None,
                                                      target_regions: Optional[Sequence[str]] = None,
                                                      exclusions: Optional[Sequence[KubernetesGlobalMaintenanceWindowAndExclusionExclusionArgs]] = None,
                                                      kubernetes_global_maintenance_window_and_exclusion_id: Optional[str] = None)
    func NewKubernetesGlobalMaintenanceWindowAndExclusion(ctx *Context, name string, args KubernetesGlobalMaintenanceWindowAndExclusionArgs, opts ...ResourceOption) (*KubernetesGlobalMaintenanceWindowAndExclusion, error)
    public KubernetesGlobalMaintenanceWindowAndExclusion(string name, KubernetesGlobalMaintenanceWindowAndExclusionArgs args, CustomResourceOptions? opts = null)
    public KubernetesGlobalMaintenanceWindowAndExclusion(String name, KubernetesGlobalMaintenanceWindowAndExclusionArgs args)
    public KubernetesGlobalMaintenanceWindowAndExclusion(String name, KubernetesGlobalMaintenanceWindowAndExclusionArgs args, CustomResourceOptions options)
    
    type: tencentcloud:KubernetesGlobalMaintenanceWindowAndExclusion
    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 KubernetesGlobalMaintenanceWindowAndExclusionArgs
    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 KubernetesGlobalMaintenanceWindowAndExclusionArgs
    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 KubernetesGlobalMaintenanceWindowAndExclusionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args KubernetesGlobalMaintenanceWindowAndExclusionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args KubernetesGlobalMaintenanceWindowAndExclusionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    KubernetesGlobalMaintenanceWindowAndExclusion 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 KubernetesGlobalMaintenanceWindowAndExclusion resource accepts the following input properties:

    DayOfWeeks List<string>
    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).
    MaintenanceTime string
    Maintenance start time.
    TargetRegions List<string>
    Regions.
    Exclusions List<KubernetesGlobalMaintenanceWindowAndExclusionExclusion>
    Maintenance exclusions.
    KubernetesGlobalMaintenanceWindowAndExclusionId string
    ID of the resource.
    DayOfWeeks []string
    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).
    MaintenanceTime string
    Maintenance start time.
    TargetRegions []string
    Regions.
    Exclusions []KubernetesGlobalMaintenanceWindowAndExclusionExclusionArgs
    Maintenance exclusions.
    KubernetesGlobalMaintenanceWindowAndExclusionId string
    ID of the resource.
    dayOfWeeks List<String>
    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).
    maintenanceTime String
    Maintenance start time.
    targetRegions List<String>
    Regions.
    exclusions List<KubernetesGlobalMaintenanceWindowAndExclusionExclusion>
    Maintenance exclusions.
    kubernetesGlobalMaintenanceWindowAndExclusionId String
    ID of the resource.
    dayOfWeeks string[]
    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).
    maintenanceTime string
    Maintenance start time.
    targetRegions string[]
    Regions.
    exclusions KubernetesGlobalMaintenanceWindowAndExclusionExclusion[]
    Maintenance exclusions.
    kubernetesGlobalMaintenanceWindowAndExclusionId string
    ID of the resource.
    day_of_weeks Sequence[str]
    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.
    target_regions Sequence[str]
    Regions.
    exclusions Sequence[KubernetesGlobalMaintenanceWindowAndExclusionExclusionArgs]
    Maintenance exclusions.
    kubernetes_global_maintenance_window_and_exclusion_id str
    ID of the resource.
    dayOfWeeks List<String>
    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).
    maintenanceTime String
    Maintenance start time.
    targetRegions List<String>
    Regions.
    exclusions List<Property Map>
    Maintenance exclusions.
    kubernetesGlobalMaintenanceWindowAndExclusionId String
    ID of the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the KubernetesGlobalMaintenanceWindowAndExclusion 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 KubernetesGlobalMaintenanceWindowAndExclusion Resource

    Get an existing KubernetesGlobalMaintenanceWindowAndExclusion 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?: KubernetesGlobalMaintenanceWindowAndExclusionState, opts?: CustomResourceOptions): KubernetesGlobalMaintenanceWindowAndExclusion
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            day_of_weeks: Optional[Sequence[str]] = None,
            duration: Optional[float] = None,
            exclusions: Optional[Sequence[KubernetesGlobalMaintenanceWindowAndExclusionExclusionArgs]] = None,
            kubernetes_global_maintenance_window_and_exclusion_id: Optional[str] = None,
            maintenance_time: Optional[str] = None,
            target_regions: Optional[Sequence[str]] = None) -> KubernetesGlobalMaintenanceWindowAndExclusion
    func GetKubernetesGlobalMaintenanceWindowAndExclusion(ctx *Context, name string, id IDInput, state *KubernetesGlobalMaintenanceWindowAndExclusionState, opts ...ResourceOption) (*KubernetesGlobalMaintenanceWindowAndExclusion, error)
    public static KubernetesGlobalMaintenanceWindowAndExclusion Get(string name, Input<string> id, KubernetesGlobalMaintenanceWindowAndExclusionState? state, CustomResourceOptions? opts = null)
    public static KubernetesGlobalMaintenanceWindowAndExclusion get(String name, Output<String> id, KubernetesGlobalMaintenanceWindowAndExclusionState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:KubernetesGlobalMaintenanceWindowAndExclusion    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.
    The following state arguments are supported:
    DayOfWeeks List<string>
    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<KubernetesGlobalMaintenanceWindowAndExclusionExclusion>
    Maintenance exclusions.
    KubernetesGlobalMaintenanceWindowAndExclusionId string
    ID of the resource.
    MaintenanceTime string
    Maintenance start time.
    TargetRegions List<string>
    Regions.
    DayOfWeeks []string
    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 []KubernetesGlobalMaintenanceWindowAndExclusionExclusionArgs
    Maintenance exclusions.
    KubernetesGlobalMaintenanceWindowAndExclusionId string
    ID of the resource.
    MaintenanceTime string
    Maintenance start time.
    TargetRegions []string
    Regions.
    dayOfWeeks List<String>
    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<KubernetesGlobalMaintenanceWindowAndExclusionExclusion>
    Maintenance exclusions.
    kubernetesGlobalMaintenanceWindowAndExclusionId String
    ID of the resource.
    maintenanceTime String
    Maintenance start time.
    targetRegions List<String>
    Regions.
    dayOfWeeks string[]
    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 KubernetesGlobalMaintenanceWindowAndExclusionExclusion[]
    Maintenance exclusions.
    kubernetesGlobalMaintenanceWindowAndExclusionId string
    ID of the resource.
    maintenanceTime string
    Maintenance start time.
    targetRegions string[]
    Regions.
    day_of_weeks Sequence[str]
    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[KubernetesGlobalMaintenanceWindowAndExclusionExclusionArgs]
    Maintenance exclusions.
    kubernetes_global_maintenance_window_and_exclusion_id str
    ID of the resource.
    maintenance_time str
    Maintenance start time.
    target_regions Sequence[str]
    Regions.
    dayOfWeeks List<String>
    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.
    kubernetesGlobalMaintenanceWindowAndExclusionId String
    ID of the resource.
    maintenanceTime String
    Maintenance start time.
    targetRegions List<String>
    Regions.

    Supporting Types

    KubernetesGlobalMaintenanceWindowAndExclusionExclusion, KubernetesGlobalMaintenanceWindowAndExclusionExclusionArgs

    EndAt string
    Maintenance exclusion end time.
    Name string
    Maintenance exclusion name.
    StartAt string
    Maintenance exclusion start time.
    Id double
    ID of the resource.
    EndAt string
    Maintenance exclusion end time.
    Name string
    Maintenance exclusion name.
    StartAt string
    Maintenance exclusion start time.
    Id float64
    ID of the resource.
    endAt String
    Maintenance exclusion end time.
    name String
    Maintenance exclusion name.
    startAt String
    Maintenance exclusion start time.
    id Double
    ID of the resource.
    endAt string
    Maintenance exclusion end time.
    name string
    Maintenance exclusion name.
    startAt string
    Maintenance exclusion start time.
    id number
    ID of the resource.
    end_at str
    Maintenance exclusion end time.
    name str
    Maintenance exclusion name.
    start_at str
    Maintenance exclusion start time.
    id float
    ID of the resource.
    endAt String
    Maintenance exclusion end time.
    name String
    Maintenance exclusion name.
    startAt String
    Maintenance exclusion start time.
    id Number
    ID of the resource.

    Import

    TKE kubernetes global maintenance window and exclusion can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/kubernetesGlobalMaintenanceWindowAndExclusion:KubernetesGlobalMaintenanceWindowAndExclusion example 55
    

    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 tencentcloud Terraform Provider.
    tencentcloud logo
    Viewing docs for tencentcloud 1.82.79
    published on Friday, Mar 27, 2026 by tencentcloudstack
      Try Pulumi Cloud free. Your team will thank you.