/*
* Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.ec2.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.Request;
import com.amazonaws.services.ec2.model.transform.CreateInstanceEventWindowRequestMarshaller;
/**
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateInstanceEventWindowRequest extends AmazonWebServiceRequest implements Serializable, Cloneable,
DryRunSupportedRequest
* The name of the event window.
*
* The time range for the event window. If you specify a time range, you can't specify a cron expression.
*
* The cron expression for the event window, for example,
* Constraints:
*
* Only hour and day of the week values are supported.
*
* For day of the week values, you can specify either integers
* The minute, month, and year must be specified by
* The hour value must be one or a multiple range, for example,
* Each hour range must be >= 2 hours, for example,
* The event window must be >= 4 hours. The combined total time ranges in the event window must be >= 4 hours.
*
* For more information about cron expressions, see cron on the
* Wikipedia website.
*
* The tags to apply to the event window.
*
* The name of the event window.
*
* The name of the event window.
*
* The name of the event window.
*
* The time range for the event window. If you specify a time range, you can't specify a cron expression.
*
* The time range for the event window. If you specify a time range, you can't specify a cron expression.
*
* The time range for the event window. If you specify a time range, you can't specify a cron expression.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTimeRanges(java.util.Collection)} or {@link #withTimeRanges(java.util.Collection)} if you want to
* override the existing values.
*
* The time range for the event window. If you specify a time range, you can't specify a cron expression.
*
* The cron expression for the event window, for example,
* Constraints:
*
* Only hour and day of the week values are supported.
*
* For day of the week values, you can specify either integers
* The minute, month, and year must be specified by
* The hour value must be one or a multiple range, for example,
* Each hour range must be >= 2 hours, for example,
* The event window must be >= 4 hours. The combined total time ranges in the event window must be >= 4 hours.
*
* For more information about cron expressions, see cron on the
* Wikipedia website.
* * 0-4,20-23 * * 1,5
. If you specify a cron
* expression, you can't specify a time range.
*
*
* 0
through 6
, or alternative
* single values SUN
through SAT
.
* *
.
* 0-4
or 0-4,20-23
.
* 0-2
or 20-23
.
* * 0-4,20-23 * * 1,5
. If you specify a cron
* expression, you can't specify a time range.
*
*
* 0
through 6
, or alternative
* single values SUN
through SAT
.
* *
.
* 0-4
or 0-4,20-23
.
* 0-2
or 20-23
.
* * 0-4,20-23 * * 1,5
. If you specify a
* cron expression, you can't specify a time range.
* Constraints: *
** Only hour and day of the week values are supported. *
*
* For day of the week values, you can specify either integers 0
through 6
, or
* alternative single values SUN
through SAT
.
*
* The minute, month, and year must be specified by *
.
*
* The hour value must be one or a multiple range, for example, 0-4
or 0-4,20-23
.
*
* Each hour range must be >= 2 hours, for example, 0-2
or 20-23
.
*
* The event window must be >= 4 hours. The combined total time ranges in the event window must be >= 4 * hours. *
** For more information about cron expressions, see cron on * the Wikipedia website. */ public void setCronExpression(String cronExpression) { this.cronExpression = cronExpression; } /** *
* The cron expression for the event window, for example, * 0-4,20-23 * * 1,5
. If you specify a cron
* expression, you can't specify a time range.
*
* Constraints: *
** Only hour and day of the week values are supported. *
*
* For day of the week values, you can specify either integers 0
through 6
, or alternative
* single values SUN
through SAT
.
*
* The minute, month, and year must be specified by *
.
*
* The hour value must be one or a multiple range, for example, 0-4
or 0-4,20-23
.
*
* Each hour range must be >= 2 hours, for example, 0-2
or 20-23
.
*
* The event window must be >= 4 hours. The combined total time ranges in the event window must be >= 4 hours. *
** For more information about cron expressions, see cron on the * Wikipedia website. *
* * @return The cron expression for the event window, for example,* 0-4,20-23 * * 1,5
. If you specify a
* cron expression, you can't specify a time range.
* * Constraints: *
** Only hour and day of the week values are supported. *
*
* For day of the week values, you can specify either integers 0
through 6
, or
* alternative single values SUN
through SAT
.
*
* The minute, month, and year must be specified by *
.
*
* The hour value must be one or a multiple range, for example, 0-4
or 0-4,20-23
.
*
* Each hour range must be >= 2 hours, for example, 0-2
or 20-23
.
*
* The event window must be >= 4 hours. The combined total time ranges in the event window must be >= * 4 hours. *
** For more information about cron expressions, see cron on * the Wikipedia website. */ public String getCronExpression() { return this.cronExpression; } /** *
* The cron expression for the event window, for example, * 0-4,20-23 * * 1,5
. If you specify a cron
* expression, you can't specify a time range.
*
* Constraints: *
** Only hour and day of the week values are supported. *
*
* For day of the week values, you can specify either integers 0
through 6
, or alternative
* single values SUN
through SAT
.
*
* The minute, month, and year must be specified by *
.
*
* The hour value must be one or a multiple range, for example, 0-4
or 0-4,20-23
.
*
* Each hour range must be >= 2 hours, for example, 0-2
or 20-23
.
*
* The event window must be >= 4 hours. The combined total time ranges in the event window must be >= 4 hours. *
** For more information about cron expressions, see cron on the * Wikipedia website. *
* * @param cronExpression * The cron expression for the event window, for example,* 0-4,20-23 * * 1,5
. If you specify a
* cron expression, you can't specify a time range.
* * Constraints: *
** Only hour and day of the week values are supported. *
*
* For day of the week values, you can specify either integers 0
through 6
, or
* alternative single values SUN
through SAT
.
*
* The minute, month, and year must be specified by *
.
*
* The hour value must be one or a multiple range, for example, 0-4
or 0-4,20-23
.
*
* Each hour range must be >= 2 hours, for example, 0-2
or 20-23
.
*
* The event window must be >= 4 hours. The combined total time ranges in the event window must be >= 4 * hours. *
** For more information about cron expressions, see cron on * the Wikipedia website. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateInstanceEventWindowRequest withCronExpression(String cronExpression) { setCronExpression(cronExpression); return this; } /** *
* The tags to apply to the event window. *
* * @return The tags to apply to the event window. */ public java.util.List* The tags to apply to the event window. *
* * @param tagSpecifications * The tags to apply to the event window. */ public void setTagSpecifications(java.util.Collection* The tags to apply to the event window. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTagSpecifications(java.util.Collection)} or {@link #withTagSpecifications(java.util.Collection)} if * you want to override the existing values. *
* * @param tagSpecifications * The tags to apply to the event window. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateInstanceEventWindowRequest withTagSpecifications(TagSpecification... tagSpecifications) { if (this.tagSpecifications == null) { setTagSpecifications(new com.amazonaws.internal.SdkInternalList* The tags to apply to the event window. *
* * @param tagSpecifications * The tags to apply to the event window. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateInstanceEventWindowRequest withTagSpecifications(java.util.Collection