Class MaintenanceWindow


  • public class MaintenanceWindow
    extends com.pulumi.resources.CustomResource
    Provides an SSM Maintenance Window resource ## Example Usage
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.ssm.MaintenanceWindow;
     import com.pulumi.aws.ssm.MaintenanceWindowArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     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 production = new MaintenanceWindow("production", MaintenanceWindowArgs.builder()
                 .name("maintenance-window-application")
                 .schedule("cron(0 16 ? * TUE *)")
                 .duration(3)
                 .cutoff(1)
                 .build());
     
         }
     }
     
     
    ## Import ### Identity Schema #### Required * `id` - (String) ID of the maintenance window. #### Optional * `accountId` (String) AWS Account where this resource is managed. * `region` (String) Region where this resource is managed. Using `pulumi import`, import SSM Maintenance Windows using the maintenance window `id`. For example: ```sh $ pulumi import aws:ssm/maintenanceWindow:MaintenanceWindow example mw-0123456789 ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> allowUnassociatedTargets()  
      com.pulumi.core.Output<java.lang.Integer> cutoff()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()  
      com.pulumi.core.Output<java.lang.Integer> duration()  
      com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> enabled()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> endDate()  
      static MaintenanceWindow get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, MaintenanceWindowState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.lang.String> name()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.lang.String> schedule()  
      com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> scheduleOffset()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> scheduleTimezone()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> startDate()  
      com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()  
      com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MaintenanceWindow

        public MaintenanceWindow​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • MaintenanceWindow

        public MaintenanceWindow​(java.lang.String name,
                                 MaintenanceWindowArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • MaintenanceWindow

        public MaintenanceWindow​(java.lang.String name,
                                 MaintenanceWindowArgs args,
                                 @Nullable
                                 com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • allowUnassociatedTargets

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> allowUnassociatedTargets()
        Returns:
        Whether targets must be registered with the Maintenance Window before tasks can be defined for those targets.
      • cutoff

        public com.pulumi.core.Output<java.lang.Integer> cutoff()
        Returns:
        The number of hours before the end of the Maintenance Window that Systems Manager stops scheduling new tasks for execution.
      • description

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
        Returns:
        A description for the maintenance window.
      • duration

        public com.pulumi.core.Output<java.lang.Integer> duration()
        Returns:
        The duration of the Maintenance Window in hours.
      • enabled

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> enabled()
        Returns:
        Whether the maintenance window is enabled. Default: `true`.
      • endDate

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> endDate()
        Returns:
        Timestamp in [ISO-8601 extended format](https://www.iso.org/iso-8601-date-and-time-format.html) when to no longer run the maintenance window.
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        The name of the maintenance window.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
      • schedule

        public com.pulumi.core.Output<java.lang.String> schedule()
        Returns:
        The schedule of the Maintenance Window in the form of a [cron or rate expression](https://docs.aws.amazon.com/systems-manager/latest/userguide/reference-cron-and-rate-expressions.html).
      • scheduleOffset

        public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> scheduleOffset()
        Returns:
        The number of days to wait after the date and time specified by a CRON expression before running the maintenance window. Valid range is `1` to `6`.
      • scheduleTimezone

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> scheduleTimezone()
        Returns:
        Timezone for schedule in [Internet Assigned Numbers Authority (IANA) Time Zone Database format](https://www.iana.org/time-zones). For example: `America/Los_Angeles`, `etc/UTC`, or `Asia/Seoul`.
      • startDate

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> startDate()
        Returns:
        Timestamp in [ISO-8601 extended format](https://www.iso.org/iso-8601-date-and-time-format.html) when to begin the maintenance window.
      • tags

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()
        Returns:
        A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
      • tagsAll

        public com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()
        Returns:
        A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
      • get

        public static MaintenanceWindow get​(java.lang.String name,
                                            com.pulumi.core.Output<java.lang.String> id,
                                            @Nullable
                                            MaintenanceWindowState state,
                                            @Nullable
                                            com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.