/* * 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.applicationautoscaling.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class PutScheduledActionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own * application or service, use custom-resource instead. *

*/ private String serviceNamespace; /** *

* The schedule for this action. The following formats are supported: *

* *

* At expressions are useful for one-time schedules. Cron expressions are useful for scheduled actions that run * periodically at a specified date and time, and rate expressions are useful for scheduled actions that run at a * regular interval. *

*

* At and cron expressions use Universal Coordinated Time (UTC) by default. *

*

* The cron format consists of six fields separated by white spaces: [Minutes] [Hours] [Day_of_Month] [Month] * [Day_of_Week] [Year]. *

*

* For rate expressions, value is a positive integer and unit is minute | * minutes | hour | hours | day | days. *

*

* For more information and examples, see Example * scheduled actions for Application Auto Scaling in the Application Auto Scaling User Guide. *

*/ private String schedule; /** *

* Specifies the time zone used when setting a scheduled action by using an at or cron expression. If a time zone is * not provided, UTC is used by default. *

*

* Valid values are the canonical names of the IANA time zones supported by Joda-Time (such as * Etc/GMT+9 or Pacific/Tahiti). For more information, see https://www.joda.org/joda-time/timezones.html. *

*/ private String timezone; /** *

* The name of the scheduled action. This name must be unique among all other scheduled actions on the specified * scalable target. *

*/ private String scheduledActionName; /** *

* The identifier of the resource associated with the scheduled action. This string consists of the resource type * and unique identifier. *

* */ private String resourceId; /** *

* The scalable dimension. This string consists of the service namespace, resource type, and scaling property. *

* */ private String scalableDimension; /** *

* The date and time for this scheduled action to start, in UTC. *

*/ private java.util.Date startTime; /** *

* The date and time for the recurring schedule to end, in UTC. *

*/ private java.util.Date endTime; /** *

* The new minimum and maximum capacity. You can set both values or just one. At the scheduled time, if the current * capacity is below the minimum capacity, Application Auto Scaling scales out to the minimum capacity. If the * current capacity is above the maximum capacity, Application Auto Scaling scales in to the maximum capacity. *

*/ private ScalableTargetAction scalableTargetAction; /** *

* The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own * application or service, use custom-resource instead. *

* * @param serviceNamespace * The namespace of the Amazon Web Services service that provides the resource. For a resource provided by * your own application or service, use custom-resource instead. * @see ServiceNamespace */ public void setServiceNamespace(String serviceNamespace) { this.serviceNamespace = serviceNamespace; } /** *

* The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own * application or service, use custom-resource instead. *

* * @return The namespace of the Amazon Web Services service that provides the resource. For a resource provided by * your own application or service, use custom-resource instead. * @see ServiceNamespace */ public String getServiceNamespace() { return this.serviceNamespace; } /** *

* The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own * application or service, use custom-resource instead. *

* * @param serviceNamespace * The namespace of the Amazon Web Services service that provides the resource. For a resource provided by * your own application or service, use custom-resource instead. * @return Returns a reference to this object so that method calls can be chained together. * @see ServiceNamespace */ public PutScheduledActionRequest withServiceNamespace(String serviceNamespace) { setServiceNamespace(serviceNamespace); return this; } /** *

* The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own * application or service, use custom-resource instead. *

* * @param serviceNamespace * The namespace of the Amazon Web Services service that provides the resource. For a resource provided by * your own application or service, use custom-resource instead. * @return Returns a reference to this object so that method calls can be chained together. * @see ServiceNamespace */ public PutScheduledActionRequest withServiceNamespace(ServiceNamespace serviceNamespace) { this.serviceNamespace = serviceNamespace.toString(); return this; } /** *

* The schedule for this action. The following formats are supported: *

* *

* At expressions are useful for one-time schedules. Cron expressions are useful for scheduled actions that run * periodically at a specified date and time, and rate expressions are useful for scheduled actions that run at a * regular interval. *

*

* At and cron expressions use Universal Coordinated Time (UTC) by default. *

*

* The cron format consists of six fields separated by white spaces: [Minutes] [Hours] [Day_of_Month] [Month] * [Day_of_Week] [Year]. *

*

* For rate expressions, value is a positive integer and unit is minute | * minutes | hour | hours | day | days. *

*

* For more information and examples, see Example * scheduled actions for Application Auto Scaling in the Application Auto Scaling User Guide. *

* * @param schedule * The schedule for this action. The following formats are supported:

* *

* At expressions are useful for one-time schedules. Cron expressions are useful for scheduled actions that * run periodically at a specified date and time, and rate expressions are useful for scheduled actions that * run at a regular interval. *

*

* At and cron expressions use Universal Coordinated Time (UTC) by default. *

*

* The cron format consists of six fields separated by white spaces: [Minutes] [Hours] [Day_of_Month] [Month] * [Day_of_Week] [Year]. *

*

* For rate expressions, value is a positive integer and unit is minute | * minutes | hour | hours | day | days. *

*

* For more information and examples, see Example scheduled actions for Application Auto Scaling in the Application Auto Scaling User * Guide. */ public void setSchedule(String schedule) { this.schedule = schedule; } /** *

* The schedule for this action. The following formats are supported: *

* *

* At expressions are useful for one-time schedules. Cron expressions are useful for scheduled actions that run * periodically at a specified date and time, and rate expressions are useful for scheduled actions that run at a * regular interval. *

*

* At and cron expressions use Universal Coordinated Time (UTC) by default. *

*

* The cron format consists of six fields separated by white spaces: [Minutes] [Hours] [Day_of_Month] [Month] * [Day_of_Week] [Year]. *

*

* For rate expressions, value is a positive integer and unit is minute | * minutes | hour | hours | day | days. *

*

* For more information and examples, see Example * scheduled actions for Application Auto Scaling in the Application Auto Scaling User Guide. *

* * @return The schedule for this action. The following formats are supported:

* *

* At expressions are useful for one-time schedules. Cron expressions are useful for scheduled actions that * run periodically at a specified date and time, and rate expressions are useful for scheduled actions that * run at a regular interval. *

*

* At and cron expressions use Universal Coordinated Time (UTC) by default. *

*

* The cron format consists of six fields separated by white spaces: [Minutes] [Hours] [Day_of_Month] * [Month] [Day_of_Week] [Year]. *

*

* For rate expressions, value is a positive integer and unit is minute | * minutes | hour | hours | day | days. *

*

* For more information and examples, see Example scheduled actions for Application Auto Scaling in the Application Auto Scaling User * Guide. */ public String getSchedule() { return this.schedule; } /** *

* The schedule for this action. The following formats are supported: *

* *

* At expressions are useful for one-time schedules. Cron expressions are useful for scheduled actions that run * periodically at a specified date and time, and rate expressions are useful for scheduled actions that run at a * regular interval. *

*

* At and cron expressions use Universal Coordinated Time (UTC) by default. *

*

* The cron format consists of six fields separated by white spaces: [Minutes] [Hours] [Day_of_Month] [Month] * [Day_of_Week] [Year]. *

*

* For rate expressions, value is a positive integer and unit is minute | * minutes | hour | hours | day | days. *

*

* For more information and examples, see Example * scheduled actions for Application Auto Scaling in the Application Auto Scaling User Guide. *

* * @param schedule * The schedule for this action. The following formats are supported:

* *

* At expressions are useful for one-time schedules. Cron expressions are useful for scheduled actions that * run periodically at a specified date and time, and rate expressions are useful for scheduled actions that * run at a regular interval. *

*

* At and cron expressions use Universal Coordinated Time (UTC) by default. *

*

* The cron format consists of six fields separated by white spaces: [Minutes] [Hours] [Day_of_Month] [Month] * [Day_of_Week] [Year]. *

*

* For rate expressions, value is a positive integer and unit is minute | * minutes | hour | hours | day | days. *

*

* For more information and examples, see Example scheduled actions for Application Auto Scaling in the Application Auto Scaling User * Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public PutScheduledActionRequest withSchedule(String schedule) { setSchedule(schedule); return this; } /** *

* Specifies the time zone used when setting a scheduled action by using an at or cron expression. If a time zone is * not provided, UTC is used by default. *

*

* Valid values are the canonical names of the IANA time zones supported by Joda-Time (such as * Etc/GMT+9 or Pacific/Tahiti). For more information, see https://www.joda.org/joda-time/timezones.html. *

* * @param timezone * Specifies the time zone used when setting a scheduled action by using an at or cron expression. If a time * zone is not provided, UTC is used by default.

*

* Valid values are the canonical names of the IANA time zones supported by Joda-Time (such as * Etc/GMT+9 or Pacific/Tahiti). For more information, see https://www.joda.org/joda-time/timezones.html. */ public void setTimezone(String timezone) { this.timezone = timezone; } /** *

* Specifies the time zone used when setting a scheduled action by using an at or cron expression. If a time zone is * not provided, UTC is used by default. *

*

* Valid values are the canonical names of the IANA time zones supported by Joda-Time (such as * Etc/GMT+9 or Pacific/Tahiti). For more information, see https://www.joda.org/joda-time/timezones.html. *

* * @return Specifies the time zone used when setting a scheduled action by using an at or cron expression. If a time * zone is not provided, UTC is used by default.

*

* Valid values are the canonical names of the IANA time zones supported by Joda-Time (such as * Etc/GMT+9 or Pacific/Tahiti). For more information, see https://www.joda.org/joda-time/timezones.html. */ public String getTimezone() { return this.timezone; } /** *

* Specifies the time zone used when setting a scheduled action by using an at or cron expression. If a time zone is * not provided, UTC is used by default. *

*

* Valid values are the canonical names of the IANA time zones supported by Joda-Time (such as * Etc/GMT+9 or Pacific/Tahiti). For more information, see https://www.joda.org/joda-time/timezones.html. *

* * @param timezone * Specifies the time zone used when setting a scheduled action by using an at or cron expression. If a time * zone is not provided, UTC is used by default.

*

* Valid values are the canonical names of the IANA time zones supported by Joda-Time (such as * Etc/GMT+9 or Pacific/Tahiti). For more information, see https://www.joda.org/joda-time/timezones.html. * @return Returns a reference to this object so that method calls can be chained together. */ public PutScheduledActionRequest withTimezone(String timezone) { setTimezone(timezone); return this; } /** *

* The name of the scheduled action. This name must be unique among all other scheduled actions on the specified * scalable target. *

* * @param scheduledActionName * The name of the scheduled action. This name must be unique among all other scheduled actions on the * specified scalable target. */ public void setScheduledActionName(String scheduledActionName) { this.scheduledActionName = scheduledActionName; } /** *

* The name of the scheduled action. This name must be unique among all other scheduled actions on the specified * scalable target. *

* * @return The name of the scheduled action. This name must be unique among all other scheduled actions on the * specified scalable target. */ public String getScheduledActionName() { return this.scheduledActionName; } /** *

* The name of the scheduled action. This name must be unique among all other scheduled actions on the specified * scalable target. *

* * @param scheduledActionName * The name of the scheduled action. This name must be unique among all other scheduled actions on the * specified scalable target. * @return Returns a reference to this object so that method calls can be chained together. */ public PutScheduledActionRequest withScheduledActionName(String scheduledActionName) { setScheduledActionName(scheduledActionName); return this; } /** *

* The identifier of the resource associated with the scheduled action. This string consists of the resource type * and unique identifier. *

* * * @param resourceId * The identifier of the resource associated with the scheduled action. This string consists of the resource * type and unique identifier.

*