/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace EC2 { namespace Model { /** */ class ModifyInstanceEventWindowRequest : public EC2Request { public: AWS_EC2_API ModifyInstanceEventWindowRequest(); // 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 "ModifyInstanceEventWindow"; } 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 ModifyInstanceEventWindowRequest& 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 ModifyInstanceEventWindowRequest& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the event window.

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

The name of the event window.

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

The ID of the event window.

*/ inline const Aws::String& GetInstanceEventWindowId() const{ return m_instanceEventWindowId; } /** *

The ID of the event window.

*/ inline bool InstanceEventWindowIdHasBeenSet() const { return m_instanceEventWindowIdHasBeenSet; } /** *

The ID of the event window.

*/ inline void SetInstanceEventWindowId(const Aws::String& value) { m_instanceEventWindowIdHasBeenSet = true; m_instanceEventWindowId = value; } /** *

The ID of the event window.

*/ inline void SetInstanceEventWindowId(Aws::String&& value) { m_instanceEventWindowIdHasBeenSet = true; m_instanceEventWindowId = std::move(value); } /** *

The ID of the event window.

*/ inline void SetInstanceEventWindowId(const char* value) { m_instanceEventWindowIdHasBeenSet = true; m_instanceEventWindowId.assign(value); } /** *

The ID of the event window.

*/ inline ModifyInstanceEventWindowRequest& WithInstanceEventWindowId(const Aws::String& value) { SetInstanceEventWindowId(value); return *this;} /** *

The ID of the event window.

*/ inline ModifyInstanceEventWindowRequest& WithInstanceEventWindowId(Aws::String&& value) { SetInstanceEventWindowId(std::move(value)); return *this;} /** *

The ID of the event window.

*/ inline ModifyInstanceEventWindowRequest& WithInstanceEventWindowId(const char* value) { SetInstanceEventWindowId(value); return *this;} /** *

The time ranges of the event window.

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

The time ranges of the event window.

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

The time ranges of the event window.

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

The time ranges of the event window.

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

The time ranges of the event window.

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

The time ranges of the event window.

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

The time ranges of the event window.

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

The time ranges of the event window.

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

The cron expression of the event window, for example, * 0-4,20-23 * * * 1,5.

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 of the event window, for example, * 0-4,20-23 * * * 1,5.

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 of the event window, for example, * 0-4,20-23 * * * 1,5.

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 of the event window, for example, * 0-4,20-23 * * * 1,5.

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 of the event window, for example, * 0-4,20-23 * * * 1,5.

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 of the event window, for example, * 0-4,20-23 * * * 1,5.

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 ModifyInstanceEventWindowRequest& WithCronExpression(const Aws::String& value) { SetCronExpression(value); return *this;} /** *

The cron expression of the event window, for example, * 0-4,20-23 * * * 1,5.

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 ModifyInstanceEventWindowRequest& WithCronExpression(Aws::String&& value) { SetCronExpression(std::move(value)); return *this;} /** *

The cron expression of the event window, for example, * 0-4,20-23 * * * 1,5.

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 ModifyInstanceEventWindowRequest& WithCronExpression(const char* value) { SetCronExpression(value); return *this;} private: bool m_dryRun; bool m_dryRunHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_instanceEventWindowId; bool m_instanceEventWindowIdHasBeenSet = false; Aws::Vector m_timeRanges; bool m_timeRangesHasBeenSet = false; Aws::String m_cronExpression; bool m_cronExpressionHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws