/** * 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 DescribeInstanceStatusRequest : public EC2Request { public: AWS_EC2_API DescribeInstanceStatusRequest(); // 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 "DescribeInstanceStatus"; } AWS_EC2_API Aws::String SerializePayload() const override; protected: AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The filters.

  • availability-zone - The * Availability Zone of the instance.

  • event.code - * The code for the scheduled event (instance-reboot | * system-reboot | system-maintenance | * instance-retirement | instance-stop).

  • *

    event.description - A description of the event.

  • *

    event.instance-event-id - The ID of the event whose date and * time you are modifying.

  • event.not-after - The * latest end time for the scheduled event (for example, * 2014-09-15T17:15:20.000Z).

  • * event.not-before - The earliest start time for the scheduled event * (for example, 2014-09-15T17:15:20.000Z).

  • * event.not-before-deadline - The deadline for starting the event * (for example, 2014-09-15T17:15:20.000Z).

  • * instance-state-code - The code for the instance state, as a 16-bit * unsigned integer. The high byte is used for internal purposes and should be * ignored. The low byte is set based on the state represented. The valid values * are 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 * (stopping), and 80 (stopped).

  • * instance-state-name - The state of the instance * (pending | running | shutting-down | * terminated | stopping | stopped).

    *
  • instance-status.reachability - Filters on instance * status where the name is reachability (passed | * failed | initializing | * insufficient-data).

  • * instance-status.status - The status of the instance * (ok | impaired | initializing | * insufficient-data | not-applicable).

  • *

    system-status.reachability - Filters on system status where the * name is reachability (passed | failed | * initializing | insufficient-data).

  • * system-status.status - The system status of the instance * (ok | impaired | initializing | * insufficient-data | not-applicable).

*/ inline const Aws::Vector& GetFilters() const{ return m_filters; } /** *

The filters.

  • availability-zone - The * Availability Zone of the instance.

  • event.code - * The code for the scheduled event (instance-reboot | * system-reboot | system-maintenance | * instance-retirement | instance-stop).

  • *

    event.description - A description of the event.

  • *

    event.instance-event-id - The ID of the event whose date and * time you are modifying.

  • event.not-after - The * latest end time for the scheduled event (for example, * 2014-09-15T17:15:20.000Z).

  • * event.not-before - The earliest start time for the scheduled event * (for example, 2014-09-15T17:15:20.000Z).

  • * event.not-before-deadline - The deadline for starting the event * (for example, 2014-09-15T17:15:20.000Z).

  • * instance-state-code - The code for the instance state, as a 16-bit * unsigned integer. The high byte is used for internal purposes and should be * ignored. The low byte is set based on the state represented. The valid values * are 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 * (stopping), and 80 (stopped).

  • * instance-state-name - The state of the instance * (pending | running | shutting-down | * terminated | stopping | stopped).

    *
  • instance-status.reachability - Filters on instance * status where the name is reachability (passed | * failed | initializing | * insufficient-data).

  • * instance-status.status - The status of the instance * (ok | impaired | initializing | * insufficient-data | not-applicable).

  • *

    system-status.reachability - Filters on system status where the * name is reachability (passed | failed | * initializing | insufficient-data).

  • * system-status.status - The system status of the instance * (ok | impaired | initializing | * insufficient-data | not-applicable).

*/ inline bool FiltersHasBeenSet() const { return m_filtersHasBeenSet; } /** *

The filters.

  • availability-zone - The * Availability Zone of the instance.

  • event.code - * The code for the scheduled event (instance-reboot | * system-reboot | system-maintenance | * instance-retirement | instance-stop).

  • *

    event.description - A description of the event.

  • *

    event.instance-event-id - The ID of the event whose date and * time you are modifying.

  • event.not-after - The * latest end time for the scheduled event (for example, * 2014-09-15T17:15:20.000Z).

  • * event.not-before - The earliest start time for the scheduled event * (for example, 2014-09-15T17:15:20.000Z).

  • * event.not-before-deadline - The deadline for starting the event * (for example, 2014-09-15T17:15:20.000Z).

  • * instance-state-code - The code for the instance state, as a 16-bit * unsigned integer. The high byte is used for internal purposes and should be * ignored. The low byte is set based on the state represented. The valid values * are 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 * (stopping), and 80 (stopped).

  • * instance-state-name - The state of the instance * (pending | running | shutting-down | * terminated | stopping | stopped).

    *
  • instance-status.reachability - Filters on instance * status where the name is reachability (passed | * failed | initializing | * insufficient-data).

  • * instance-status.status - The status of the instance * (ok | impaired | initializing | * insufficient-data | not-applicable).

  • *

    system-status.reachability - Filters on system status where the * name is reachability (passed | failed | * initializing | insufficient-data).

  • * system-status.status - The system status of the instance * (ok | impaired | initializing | * insufficient-data | not-applicable).

*/ inline void SetFilters(const Aws::Vector& value) { m_filtersHasBeenSet = true; m_filters = value; } /** *

The filters.

  • availability-zone - The * Availability Zone of the instance.

  • event.code - * The code for the scheduled event (instance-reboot | * system-reboot | system-maintenance | * instance-retirement | instance-stop).

  • *

    event.description - A description of the event.

  • *

    event.instance-event-id - The ID of the event whose date and * time you are modifying.

  • event.not-after - The * latest end time for the scheduled event (for example, * 2014-09-15T17:15:20.000Z).

  • * event.not-before - The earliest start time for the scheduled event * (for example, 2014-09-15T17:15:20.000Z).

  • * event.not-before-deadline - The deadline for starting the event * (for example, 2014-09-15T17:15:20.000Z).

  • * instance-state-code - The code for the instance state, as a 16-bit * unsigned integer. The high byte is used for internal purposes and should be * ignored. The low byte is set based on the state represented. The valid values * are 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 * (stopping), and 80 (stopped).

  • * instance-state-name - The state of the instance * (pending | running | shutting-down | * terminated | stopping | stopped).

    *
  • instance-status.reachability - Filters on instance * status where the name is reachability (passed | * failed | initializing | * insufficient-data).

  • * instance-status.status - The status of the instance * (ok | impaired | initializing | * insufficient-data | not-applicable).

  • *

    system-status.reachability - Filters on system status where the * name is reachability (passed | failed | * initializing | insufficient-data).

  • * system-status.status - The system status of the instance * (ok | impaired | initializing | * insufficient-data | not-applicable).

*/ inline void SetFilters(Aws::Vector&& value) { m_filtersHasBeenSet = true; m_filters = std::move(value); } /** *

The filters.

  • availability-zone - The * Availability Zone of the instance.

  • event.code - * The code for the scheduled event (instance-reboot | * system-reboot | system-maintenance | * instance-retirement | instance-stop).

  • *

    event.description - A description of the event.

  • *

    event.instance-event-id - The ID of the event whose date and * time you are modifying.

  • event.not-after - The * latest end time for the scheduled event (for example, * 2014-09-15T17:15:20.000Z).

  • * event.not-before - The earliest start time for the scheduled event * (for example, 2014-09-15T17:15:20.000Z).

  • * event.not-before-deadline - The deadline for starting the event * (for example, 2014-09-15T17:15:20.000Z).

  • * instance-state-code - The code for the instance state, as a 16-bit * unsigned integer. The high byte is used for internal purposes and should be * ignored. The low byte is set based on the state represented. The valid values * are 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 * (stopping), and 80 (stopped).

  • * instance-state-name - The state of the instance * (pending | running | shutting-down | * terminated | stopping | stopped).

    *
  • instance-status.reachability - Filters on instance * status where the name is reachability (passed | * failed | initializing | * insufficient-data).

  • * instance-status.status - The status of the instance * (ok | impaired | initializing | * insufficient-data | not-applicable).

  • *

    system-status.reachability - Filters on system status where the * name is reachability (passed | failed | * initializing | insufficient-data).

  • * system-status.status - The system status of the instance * (ok | impaired | initializing | * insufficient-data | not-applicable).

*/ inline DescribeInstanceStatusRequest& WithFilters(const Aws::Vector& value) { SetFilters(value); return *this;} /** *

The filters.

  • availability-zone - The * Availability Zone of the instance.

  • event.code - * The code for the scheduled event (instance-reboot | * system-reboot | system-maintenance | * instance-retirement | instance-stop).

  • *

    event.description - A description of the event.

  • *

    event.instance-event-id - The ID of the event whose date and * time you are modifying.

  • event.not-after - The * latest end time for the scheduled event (for example, * 2014-09-15T17:15:20.000Z).

  • * event.not-before - The earliest start time for the scheduled event * (for example, 2014-09-15T17:15:20.000Z).

  • * event.not-before-deadline - The deadline for starting the event * (for example, 2014-09-15T17:15:20.000Z).

  • * instance-state-code - The code for the instance state, as a 16-bit * unsigned integer. The high byte is used for internal purposes and should be * ignored. The low byte is set based on the state represented. The valid values * are 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 * (stopping), and 80 (stopped).

  • * instance-state-name - The state of the instance * (pending | running | shutting-down | * terminated | stopping | stopped).

    *
  • instance-status.reachability - Filters on instance * status where the name is reachability (passed | * failed | initializing | * insufficient-data).

  • * instance-status.status - The status of the instance * (ok | impaired | initializing | * insufficient-data | not-applicable).

  • *

    system-status.reachability - Filters on system status where the * name is reachability (passed | failed | * initializing | insufficient-data).

  • * system-status.status - The system status of the instance * (ok | impaired | initializing | * insufficient-data | not-applicable).

*/ inline DescribeInstanceStatusRequest& WithFilters(Aws::Vector&& value) { SetFilters(std::move(value)); return *this;} /** *

The filters.

  • availability-zone - The * Availability Zone of the instance.

  • event.code - * The code for the scheduled event (instance-reboot | * system-reboot | system-maintenance | * instance-retirement | instance-stop).

  • *

    event.description - A description of the event.

  • *

    event.instance-event-id - The ID of the event whose date and * time you are modifying.

  • event.not-after - The * latest end time for the scheduled event (for example, * 2014-09-15T17:15:20.000Z).

  • * event.not-before - The earliest start time for the scheduled event * (for example, 2014-09-15T17:15:20.000Z).

  • * event.not-before-deadline - The deadline for starting the event * (for example, 2014-09-15T17:15:20.000Z).

  • * instance-state-code - The code for the instance state, as a 16-bit * unsigned integer. The high byte is used for internal purposes and should be * ignored. The low byte is set based on the state represented. The valid values * are 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 * (stopping), and 80 (stopped).

  • * instance-state-name - The state of the instance * (pending | running | shutting-down | * terminated | stopping | stopped).

    *
  • instance-status.reachability - Filters on instance * status where the name is reachability (passed | * failed | initializing | * insufficient-data).

  • * instance-status.status - The status of the instance * (ok | impaired | initializing | * insufficient-data | not-applicable).

  • *

    system-status.reachability - Filters on system status where the * name is reachability (passed | failed | * initializing | insufficient-data).

  • * system-status.status - The system status of the instance * (ok | impaired | initializing | * insufficient-data | not-applicable).

*/ inline DescribeInstanceStatusRequest& AddFilters(const Filter& value) { m_filtersHasBeenSet = true; m_filters.push_back(value); return *this; } /** *

The filters.

  • availability-zone - The * Availability Zone of the instance.

  • event.code - * The code for the scheduled event (instance-reboot | * system-reboot | system-maintenance | * instance-retirement | instance-stop).

  • *

    event.description - A description of the event.

  • *

    event.instance-event-id - The ID of the event whose date and * time you are modifying.

  • event.not-after - The * latest end time for the scheduled event (for example, * 2014-09-15T17:15:20.000Z).

  • * event.not-before - The earliest start time for the scheduled event * (for example, 2014-09-15T17:15:20.000Z).

  • * event.not-before-deadline - The deadline for starting the event * (for example, 2014-09-15T17:15:20.000Z).

  • * instance-state-code - The code for the instance state, as a 16-bit * unsigned integer. The high byte is used for internal purposes and should be * ignored. The low byte is set based on the state represented. The valid values * are 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 * (stopping), and 80 (stopped).

  • * instance-state-name - The state of the instance * (pending | running | shutting-down | * terminated | stopping | stopped).

    *
  • instance-status.reachability - Filters on instance * status where the name is reachability (passed | * failed | initializing | * insufficient-data).

  • * instance-status.status - The status of the instance * (ok | impaired | initializing | * insufficient-data | not-applicable).

  • *

    system-status.reachability - Filters on system status where the * name is reachability (passed | failed | * initializing | insufficient-data).

  • * system-status.status - The system status of the instance * (ok | impaired | initializing | * insufficient-data | not-applicable).

*/ inline DescribeInstanceStatusRequest& AddFilters(Filter&& value) { m_filtersHasBeenSet = true; m_filters.push_back(std::move(value)); return *this; } /** *

The instance IDs.

Default: Describes all your instances.

*

Constraints: Maximum 100 explicitly specified instance IDs.

*/ inline const Aws::Vector& GetInstanceIds() const{ return m_instanceIds; } /** *

The instance IDs.

Default: Describes all your instances.

*

Constraints: Maximum 100 explicitly specified instance IDs.

*/ inline bool InstanceIdsHasBeenSet() const { return m_instanceIdsHasBeenSet; } /** *

The instance IDs.

Default: Describes all your instances.

*

Constraints: Maximum 100 explicitly specified instance IDs.

*/ inline void SetInstanceIds(const Aws::Vector& value) { m_instanceIdsHasBeenSet = true; m_instanceIds = value; } /** *

The instance IDs.

Default: Describes all your instances.

*

Constraints: Maximum 100 explicitly specified instance IDs.

*/ inline void SetInstanceIds(Aws::Vector&& value) { m_instanceIdsHasBeenSet = true; m_instanceIds = std::move(value); } /** *

The instance IDs.

Default: Describes all your instances.

*

Constraints: Maximum 100 explicitly specified instance IDs.

*/ inline DescribeInstanceStatusRequest& WithInstanceIds(const Aws::Vector& value) { SetInstanceIds(value); return *this;} /** *

The instance IDs.

Default: Describes all your instances.

*

Constraints: Maximum 100 explicitly specified instance IDs.

*/ inline DescribeInstanceStatusRequest& WithInstanceIds(Aws::Vector&& value) { SetInstanceIds(std::move(value)); return *this;} /** *

The instance IDs.

Default: Describes all your instances.

*

Constraints: Maximum 100 explicitly specified instance IDs.

*/ inline DescribeInstanceStatusRequest& AddInstanceIds(const Aws::String& value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(value); return *this; } /** *

The instance IDs.

Default: Describes all your instances.

*

Constraints: Maximum 100 explicitly specified instance IDs.

*/ inline DescribeInstanceStatusRequest& AddInstanceIds(Aws::String&& value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(std::move(value)); return *this; } /** *

The instance IDs.

Default: Describes all your instances.

*

Constraints: Maximum 100 explicitly specified instance IDs.

*/ inline DescribeInstanceStatusRequest& AddInstanceIds(const char* value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(value); return *this; } /** *

The maximum number of items to return for this request. To get the next page * of items, make another request with the token returned in the output. For more * information, see Pagination.

*

You cannot specify this parameter and the instance IDs parameter in the same * request.

*/ inline int GetMaxResults() const{ return m_maxResults; } /** *

The maximum number of items to return for this request. To get the next page * of items, make another request with the token returned in the output. For more * information, see Pagination.

*

You cannot specify this parameter and the instance IDs parameter in the same * request.

*/ inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; } /** *

The maximum number of items to return for this request. To get the next page * of items, make another request with the token returned in the output. For more * information, see Pagination.

*

You cannot specify this parameter and the instance IDs parameter in the same * request.

*/ inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; } /** *

The maximum number of items to return for this request. To get the next page * of items, make another request with the token returned in the output. For more * information, see Pagination.

*

You cannot specify this parameter and the instance IDs parameter in the same * request.

*/ inline DescribeInstanceStatusRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;} /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline const Aws::String& GetNextToken() const{ return m_nextToken; } /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; } /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; } /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); } /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); } /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline DescribeInstanceStatusRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;} /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline DescribeInstanceStatusRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;} /** *

The token returned from a previous paginated request. Pagination continues * from the end of the items returned by the previous request.

*/ inline DescribeInstanceStatusRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;} /** *

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 DescribeInstanceStatusRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} /** *

When true, includes the health status for all instances. When * false, includes the health status for running instances only.

*

Default: false

*/ inline bool GetIncludeAllInstances() const{ return m_includeAllInstances; } /** *

When true, includes the health status for all instances. When * false, includes the health status for running instances only.

*

Default: false

*/ inline bool IncludeAllInstancesHasBeenSet() const { return m_includeAllInstancesHasBeenSet; } /** *

When true, includes the health status for all instances. When * false, includes the health status for running instances only.

*

Default: false

*/ inline void SetIncludeAllInstances(bool value) { m_includeAllInstancesHasBeenSet = true; m_includeAllInstances = value; } /** *

When true, includes the health status for all instances. When * false, includes the health status for running instances only.

*

Default: false

*/ inline DescribeInstanceStatusRequest& WithIncludeAllInstances(bool value) { SetIncludeAllInstances(value); return *this;} private: Aws::Vector m_filters; bool m_filtersHasBeenSet = false; Aws::Vector m_instanceIds; bool m_instanceIdsHasBeenSet = false; int m_maxResults; bool m_maxResultsHasBeenSet = false; Aws::String m_nextToken; bool m_nextTokenHasBeenSet = false; bool m_dryRun; bool m_dryRunHasBeenSet = false; bool m_includeAllInstances; bool m_includeAllInstancesHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws