/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace EC2 { namespace Model { /** */ class CreateInstanceEventWindowRequest : public EC2Request { public: AWS_EC2_API CreateInstanceEventWindowRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateInstanceEventWindow"; } AWS_EC2_API Aws::String SerializePayload() const override; protected: AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool GetDryRun() const{ return m_dryRun; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline CreateInstanceEventWindowRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} /** *

The name of the event window.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the event window.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the event window.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the event window.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the event window.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the event window.

*/ inline CreateInstanceEventWindowRequest& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the event window.

*/ inline CreateInstanceEventWindowRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the event window.

*/ inline CreateInstanceEventWindowRequest& WithName(const char* value) { SetName(value); return *this;} /** *

The time range for the event window. If you specify a time range, you can't * specify a cron expression.

*/ inline const Aws::Vector& GetTimeRanges() const{ return m_timeRanges; } /** *

The time range for the event window. If you specify a time range, you can't * specify a cron expression.

*/ inline bool TimeRangesHasBeenSet() const { return m_timeRangesHasBeenSet; } /** *

The time range for the event window. If you specify a time range, you can't * specify a cron expression.

*/ inline void SetTimeRanges(const Aws::Vector& value) { m_timeRangesHasBeenSet = true; m_timeRanges = value; } /** *

The time range for the event window. If you specify a time range, you can't * specify a cron expression.

*/ inline void SetTimeRanges(Aws::Vector&& value) { m_timeRangesHasBeenSet = true; m_timeRanges = std::move(value); } /** *

The time range for the event window. If you specify a time range, you can't * specify a cron expression.

*/ inline CreateInstanceEventWindowRequest& WithTimeRanges(const Aws::Vector& value) { SetTimeRanges(value); return *this;} /** *

The time range for the event window. If you specify a time range, you can't * specify a cron expression.

*/ inline CreateInstanceEventWindowRequest& WithTimeRanges(Aws::Vector&& value) { SetTimeRanges(std::move(value)); return *this;} /** *

The time range for the event window. If you specify a time range, you can't * specify a cron expression.

*/ inline CreateInstanceEventWindowRequest& AddTimeRanges(const InstanceEventWindowTimeRangeRequest& value) { m_timeRangesHasBeenSet = true; m_timeRanges.push_back(value); return *this; } /** *

The time range for the event window. If you specify a time range, you can't * specify a cron expression.

*/ inline CreateInstanceEventWindowRequest& AddTimeRanges(InstanceEventWindowTimeRangeRequest&& value) { m_timeRangesHasBeenSet = true; m_timeRanges.push_back(std::move(value)); return *this; } /** *

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.

*/ inline const Aws::String& GetCronExpression() const{ return m_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.

*/ inline bool CronExpressionHasBeenSet() const { return m_cronExpressionHasBeenSet; } /** *

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.

*/ inline void SetCronExpression(const Aws::String& value) { m_cronExpressionHasBeenSet = true; m_cronExpression = value; } /** *

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.

*/ inline void SetCronExpression(Aws::String&& value) { m_cronExpressionHasBeenSet = true; m_cronExpression = std::move(value); } /** *

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.

*/ inline void SetCronExpression(const char* value) { m_cronExpressionHasBeenSet = true; m_cronExpression.assign(value); } /** *

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.

*/ inline CreateInstanceEventWindowRequest& WithCronExpression(const Aws::String& value) { SetCronExpression(value); return *this;} /** *

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.

*/ inline CreateInstanceEventWindowRequest& WithCronExpression(Aws::String&& value) { SetCronExpression(std::move(value)); return *this;} /** *

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.

*/ inline CreateInstanceEventWindowRequest& WithCronExpression(const char* value) { SetCronExpression(value); return *this;} /** *

The tags to apply to the event window.

*/ inline const Aws::Vector& GetTagSpecifications() const{ return m_tagSpecifications; } /** *

The tags to apply to the event window.

*/ inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; } /** *

The tags to apply to the event window.

*/ inline void SetTagSpecifications(const Aws::Vector& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = value; } /** *

The tags to apply to the event window.

*/ inline void SetTagSpecifications(Aws::Vector&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::move(value); } /** *

The tags to apply to the event window.

*/ inline CreateInstanceEventWindowRequest& WithTagSpecifications(const Aws::Vector& value) { SetTagSpecifications(value); return *this;} /** *

The tags to apply to the event window.

*/ inline CreateInstanceEventWindowRequest& WithTagSpecifications(Aws::Vector&& value) { SetTagSpecifications(std::move(value)); return *this;} /** *

The tags to apply to the event window.

*/ inline CreateInstanceEventWindowRequest& AddTagSpecifications(const TagSpecification& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(value); return *this; } /** *

The tags to apply to the event window.

*/ inline CreateInstanceEventWindowRequest& AddTagSpecifications(TagSpecification&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(std::move(value)); return *this; } private: bool m_dryRun; bool m_dryRunHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; Aws::Vector m_timeRanges; bool m_timeRangesHasBeenSet = false; Aws::String m_cronExpression; bool m_cronExpressionHasBeenSet = false; Aws::Vector m_tagSpecifications; bool m_tagSpecificationsHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws