AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
DescribeInstancesRequest.h
1
6#pragma once
7#include <aws/ec2/EC2_EXPORTS.h>
8#include <aws/ec2/EC2Request.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/ec2/model/Filter.h>
12#include <utility>
13
14namespace Aws
15{
16namespace EC2
17{
18namespace 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_EC2_API Aws::String SerializePayload() const override;
35
36 protected:
37 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
38
39 public:
40
42
45 inline const Aws::Vector<Aws::String>& GetInstanceIds() const{ return m_instanceIds; }
46 inline bool InstanceIdsHasBeenSet() const { return m_instanceIdsHasBeenSet; }
47 inline void SetInstanceIds(const Aws::Vector<Aws::String>& value) { m_instanceIdsHasBeenSet = true; m_instanceIds = value; }
48 inline void SetInstanceIds(Aws::Vector<Aws::String>&& value) { m_instanceIdsHasBeenSet = true; m_instanceIds = std::move(value); }
50 inline DescribeInstancesRequest& WithInstanceIds(Aws::Vector<Aws::String>&& value) { SetInstanceIds(std::move(value)); return *this;}
51 inline DescribeInstancesRequest& AddInstanceIds(const Aws::String& value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(value); return *this; }
52 inline DescribeInstancesRequest& AddInstanceIds(Aws::String&& value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(std::move(value)); return *this; }
53 inline DescribeInstancesRequest& AddInstanceIds(const char* value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(value); return *this; }
55
57
63 inline bool GetDryRun() const{ return m_dryRun; }
64 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
65 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
66 inline DescribeInstancesRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
68
70
364 inline const Aws::Vector<Filter>& GetFilters() const{ return m_filters; }
365 inline bool FiltersHasBeenSet() const { return m_filtersHasBeenSet; }
366 inline void SetFilters(const Aws::Vector<Filter>& value) { m_filtersHasBeenSet = true; m_filters = value; }
367 inline void SetFilters(Aws::Vector<Filter>&& value) { m_filtersHasBeenSet = true; m_filters = std::move(value); }
368 inline DescribeInstancesRequest& WithFilters(const Aws::Vector<Filter>& value) { SetFilters(value); return *this;}
369 inline DescribeInstancesRequest& WithFilters(Aws::Vector<Filter>&& value) { SetFilters(std::move(value)); return *this;}
370 inline DescribeInstancesRequest& AddFilters(const Filter& value) { m_filtersHasBeenSet = true; m_filters.push_back(value); return *this; }
371 inline DescribeInstancesRequest& AddFilters(Filter&& value) { m_filtersHasBeenSet = true; m_filters.push_back(std::move(value)); return *this; }
373
375
379 inline const Aws::String& GetNextToken() const{ return m_nextToken; }
380 inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
381 inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
382 inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }
383 inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
384 inline DescribeInstancesRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
385 inline DescribeInstancesRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
386 inline DescribeInstancesRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
388
390
398 inline int GetMaxResults() const{ return m_maxResults; }
399 inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
400 inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }
401 inline DescribeInstancesRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}
403 private:
404
405 Aws::Vector<Aws::String> m_instanceIds;
406 bool m_instanceIdsHasBeenSet = false;
407
408 bool m_dryRun;
409 bool m_dryRunHasBeenSet = false;
410
411 Aws::Vector<Filter> m_filters;
412 bool m_filtersHasBeenSet = false;
413
414 Aws::String m_nextToken;
415 bool m_nextTokenHasBeenSet = false;
416
417 int m_maxResults;
418 bool m_maxResultsHasBeenSet = false;
419 };
420
421} // namespace Model
422} // namespace EC2
423} // namespace Aws
DescribeInstancesRequest & WithInstanceIds(const Aws::Vector< Aws::String > &value)
DescribeInstancesRequest & AddInstanceIds(Aws::String &&value)
DescribeInstancesRequest & AddInstanceIds(const char *value)
DescribeInstancesRequest & AddFilters(Filter &&value)
DescribeInstancesRequest & WithInstanceIds(Aws::Vector< Aws::String > &&value)
const Aws::Vector< Filter > & GetFilters() const
void SetFilters(const Aws::Vector< Filter > &value)
DescribeInstancesRequest & WithDryRun(bool value)
DescribeInstancesRequest & WithNextToken(const char *value)
void SetFilters(Aws::Vector< Filter > &&value)
virtual const char * GetServiceRequestName() const override
DescribeInstancesRequest & WithFilters(Aws::Vector< Filter > &&value)
DescribeInstancesRequest & WithNextToken(const Aws::String &value)
DescribeInstancesRequest & AddFilters(const Filter &value)
const Aws::Vector< Aws::String > & GetInstanceIds() const
DescribeInstancesRequest & WithMaxResults(int value)
DescribeInstancesRequest & AddInstanceIds(const Aws::String &value)
AWS_EC2_API Aws::String SerializePayload() const override
DescribeInstancesRequest & WithFilters(const Aws::Vector< Filter > &value)
void SetInstanceIds(const Aws::Vector< Aws::String > &value)
void SetInstanceIds(Aws::Vector< Aws::String > &&value)
DescribeInstancesRequest & WithNextToken(Aws::String &&value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector