AWS SDK for C++  1.9.129
AWS SDK for C++
DescribeInstancesRequest.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/ec2/EC2_EXPORTS.h>
8 #include <aws/ec2/EC2Request.h>
11 #include <aws/ec2/model/Filter.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace EC2
17 {
18 namespace Model
19 {
20 
24  {
25  public:
27 
28  // Service request name is the Operation name which will send this request out,
29  // each operation should has unique request name, so that we can get operation's name from this request.
30  // Note: this is not true for response, multiple operations may have the same response name,
31  // so we can not get operation's name from response.
32  inline virtual const char* GetServiceRequestName() const override { return "DescribeInstances"; }
33 
34  Aws::String SerializePayload() const override;
35 
36  protected:
37  void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
38 
39  public:
40 
220  inline const Aws::Vector<Filter>& GetFilters() const{ return m_filters; }
221 
401  inline bool FiltersHasBeenSet() const { return m_filtersHasBeenSet; }
402 
582  inline void SetFilters(const Aws::Vector<Filter>& value) { m_filtersHasBeenSet = true; m_filters = value; }
583 
763  inline void SetFilters(Aws::Vector<Filter>&& value) { m_filtersHasBeenSet = true; m_filters = std::move(value); }
764 
944  inline DescribeInstancesRequest& WithFilters(const Aws::Vector<Filter>& value) { SetFilters(value); return *this;}
945 
1125  inline DescribeInstancesRequest& WithFilters(Aws::Vector<Filter>&& value) { SetFilters(std::move(value)); return *this;}
1126 
1306  inline DescribeInstancesRequest& AddFilters(const Filter& value) { m_filtersHasBeenSet = true; m_filters.push_back(value); return *this; }
1307 
1487  inline DescribeInstancesRequest& AddFilters(Filter&& value) { m_filtersHasBeenSet = true; m_filters.push_back(std::move(value)); return *this; }
1488 
1489 
1493  inline const Aws::Vector<Aws::String>& GetInstanceIds() const{ return m_instanceIds; }
1494 
1498  inline bool InstanceIdsHasBeenSet() const { return m_instanceIdsHasBeenSet; }
1499 
1503  inline void SetInstanceIds(const Aws::Vector<Aws::String>& value) { m_instanceIdsHasBeenSet = true; m_instanceIds = value; }
1504 
1508  inline void SetInstanceIds(Aws::Vector<Aws::String>&& value) { m_instanceIdsHasBeenSet = true; m_instanceIds = std::move(value); }
1509 
1513  inline DescribeInstancesRequest& WithInstanceIds(const Aws::Vector<Aws::String>& value) { SetInstanceIds(value); return *this;}
1514 
1518  inline DescribeInstancesRequest& WithInstanceIds(Aws::Vector<Aws::String>&& value) { SetInstanceIds(std::move(value)); return *this;}
1519 
1523  inline DescribeInstancesRequest& AddInstanceIds(const Aws::String& value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(value); return *this; }
1524 
1528  inline DescribeInstancesRequest& AddInstanceIds(Aws::String&& value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(std::move(value)); return *this; }
1529 
1533  inline DescribeInstancesRequest& AddInstanceIds(const char* value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(value); return *this; }
1534 
1535 
1542  inline bool GetDryRun() const{ return m_dryRun; }
1543 
1550  inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
1551 
1558  inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
1559 
1566  inline DescribeInstancesRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
1567 
1568 
1575  inline int GetMaxResults() const{ return m_maxResults; }
1576 
1583  inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
1584 
1591  inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }
1592 
1599  inline DescribeInstancesRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}
1600 
1601 
1605  inline const Aws::String& GetNextToken() const{ return m_nextToken; }
1606 
1610  inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
1611 
1615  inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
1616 
1620  inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }
1621 
1625  inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
1626 
1630  inline DescribeInstancesRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
1631 
1635  inline DescribeInstancesRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
1636 
1640  inline DescribeInstancesRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
1641 
1642  private:
1643 
1644  Aws::Vector<Filter> m_filters;
1645  bool m_filtersHasBeenSet;
1646 
1647  Aws::Vector<Aws::String> m_instanceIds;
1648  bool m_instanceIdsHasBeenSet;
1649 
1650  bool m_dryRun;
1651  bool m_dryRunHasBeenSet;
1652 
1653  int m_maxResults;
1654  bool m_maxResultsHasBeenSet;
1655 
1656  Aws::String m_nextToken;
1657  bool m_nextTokenHasBeenSet;
1658  };
1659 
1660 } // namespace Model
1661 } // namespace EC2
1662 } // namespace Aws
Aws::EC2::Model::DescribeInstancesRequest::DescribeInstancesRequest
DescribeInstancesRequest()
Aws::EC2::Model::DescribeInstancesRequest::WithInstanceIds
DescribeInstancesRequest & WithInstanceIds(const Aws::Vector< Aws::String > &value)
Definition: DescribeInstancesRequest.h:1513
Aws::Http::URI
Definition: URI.h:32
Aws::EC2::Model::DescribeInstancesRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: DescribeInstancesRequest.h:32
Aws::EC2::Model::DescribeInstancesRequest::WithMaxResults
DescribeInstancesRequest & WithMaxResults(int value)
Definition: DescribeInstancesRequest.h:1599
Aws::EC2::Model::DescribeInstancesRequest::AddInstanceIds
DescribeInstancesRequest & AddInstanceIds(const Aws::String &value)
Definition: DescribeInstancesRequest.h:1523
Aws::EC2::Model::DescribeInstancesRequest::AddInstanceIds
DescribeInstancesRequest & AddInstanceIds(const char *value)
Definition: DescribeInstancesRequest.h:1533
Aws::EC2::Model::DescribeInstancesRequest::SetInstanceIds
void SetInstanceIds(Aws::Vector< Aws::String > &&value)
Definition: DescribeInstancesRequest.h:1508
Aws::EC2::Model::DescribeInstancesRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::EC2::Model::DescribeInstancesRequest::NextTokenHasBeenSet
bool NextTokenHasBeenSet() const
Definition: DescribeInstancesRequest.h:1610
Aws::EC2::Model::DescribeInstancesRequest::GetInstanceIds
const Aws::Vector< Aws::String > & GetInstanceIds() const
Definition: DescribeInstancesRequest.h:1493
AWS_EC2_API
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:28
Aws::EC2::Model::DescribeInstancesRequest::AddInstanceIds
DescribeInstancesRequest & AddInstanceIds(Aws::String &&value)
Definition: DescribeInstancesRequest.h:1528
Aws::EC2::Model::Filter
Definition: Filter.h:36
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::EC2::Model::DescribeInstancesRequest::DumpBodyToUrl
void DumpBodyToUrl(Aws::Http::URI &uri) const override
AWSVector.h
Filter.h
Aws::EC2::Model::DescribeInstancesRequest::InstanceIdsHasBeenSet
bool InstanceIdsHasBeenSet() const
Definition: DescribeInstancesRequest.h:1498
Aws::EC2::Model::DescribeInstancesRequest::SetNextToken
void SetNextToken(Aws::String &&value)
Definition: DescribeInstancesRequest.h:1620
Aws::EC2::Model::DescribeInstancesRequest
Definition: DescribeInstancesRequest.h:24
Aws::EC2::Model::DescribeInstancesRequest::WithFilters
DescribeInstancesRequest & WithFilters(const Aws::Vector< Filter > &value)
Definition: DescribeInstancesRequest.h:944
Aws::EC2::Model::DescribeInstancesRequest::SetNextToken
void SetNextToken(const char *value)
Definition: DescribeInstancesRequest.h:1625
Aws::EC2::Model::DescribeInstancesRequest::GetFilters
const Aws::Vector< Filter > & GetFilters() const
Definition: DescribeInstancesRequest.h:220
Aws::EC2::Model::DescribeInstancesRequest::GetDryRun
bool GetDryRun() const
Definition: DescribeInstancesRequest.h:1542
Aws::EC2::Model::DescribeInstancesRequest::WithNextToken
DescribeInstancesRequest & WithNextToken(const char *value)
Definition: DescribeInstancesRequest.h:1640
EC2Request.h
AWSString.h
Aws::EC2::Model::DescribeInstancesRequest::WithDryRun
DescribeInstancesRequest & WithDryRun(bool value)
Definition: DescribeInstancesRequest.h:1566
Aws::EC2::Model::DescribeInstancesRequest::WithFilters
DescribeInstancesRequest & WithFilters(Aws::Vector< Filter > &&value)
Definition: DescribeInstancesRequest.h:1125
Aws::EC2::Model::DescribeInstancesRequest::SetDryRun
void SetDryRun(bool value)
Definition: DescribeInstancesRequest.h:1558
Aws::EC2::Model::DescribeInstancesRequest::AddFilters
DescribeInstancesRequest & AddFilters(const Filter &value)
Definition: DescribeInstancesRequest.h:1306
Aws::EC2::Model::DescribeInstancesRequest::MaxResultsHasBeenSet
bool MaxResultsHasBeenSet() const
Definition: DescribeInstancesRequest.h:1583
Aws::EC2::Model::DescribeInstancesRequest::SetMaxResults
void SetMaxResults(int value)
Definition: DescribeInstancesRequest.h:1591
Aws::EC2::Model::DescribeInstancesRequest::SetInstanceIds
void SetInstanceIds(const Aws::Vector< Aws::String > &value)
Definition: DescribeInstancesRequest.h:1503
Aws::EC2::Model::DescribeInstancesRequest::WithNextToken
DescribeInstancesRequest & WithNextToken(Aws::String &&value)
Definition: DescribeInstancesRequest.h:1635
Aws
Definition: AccessManagementClient.h:15
Aws::EC2::Model::DescribeInstancesRequest::FiltersHasBeenSet
bool FiltersHasBeenSet() const
Definition: DescribeInstancesRequest.h:401
Aws::EC2::Model::DescribeInstancesRequest::DryRunHasBeenSet
bool DryRunHasBeenSet() const
Definition: DescribeInstancesRequest.h:1550
Aws::EC2::Model::DescribeInstancesRequest::WithInstanceIds
DescribeInstancesRequest & WithInstanceIds(Aws::Vector< Aws::String > &&value)
Definition: DescribeInstancesRequest.h:1518
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::EC2::Model::DescribeInstancesRequest::SetFilters
void SetFilters(const Aws::Vector< Filter > &value)
Definition: DescribeInstancesRequest.h:582
Aws::EC2::Model::DescribeInstancesRequest::SetFilters
void SetFilters(Aws::Vector< Filter > &&value)
Definition: DescribeInstancesRequest.h:763
Aws::EC2::EC2Request
Definition: EC2Request.h:17
Aws::EC2::Model::DescribeInstancesRequest::GetNextToken
const Aws::String & GetNextToken() const
Definition: DescribeInstancesRequest.h:1605
Aws::EC2::Model::DescribeInstancesRequest::GetMaxResults
int GetMaxResults() const
Definition: DescribeInstancesRequest.h:1575
Aws::EC2::Model::DescribeInstancesRequest::WithNextToken
DescribeInstancesRequest & WithNextToken(const Aws::String &value)
Definition: DescribeInstancesRequest.h:1630
EC2_EXPORTS.h
Aws::EC2::Model::DescribeInstancesRequest::SetNextToken
void SetNextToken(const Aws::String &value)
Definition: DescribeInstancesRequest.h:1615
Aws::EC2::Model::DescribeInstancesRequest::AddFilters
DescribeInstancesRequest & AddFilters(Filter &&value)
Definition: DescribeInstancesRequest.h:1487