1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/ecs/ECS_EXPORTS.h> 8 #include <aws/ecs/ECSRequest.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/ecs/model/ContainerInstanceStatus.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace ECS 16 { 17 namespace Model 18 { 19 20 /** 21 */ 22 class AWS_ECS_API ListContainerInstancesRequest : public ECSRequest 23 { 24 public: 25 ListContainerInstancesRequest(); 26 27 // Service request name is the Operation name which will send this request out, 28 // each operation should has unique request name, so that we can get operation's name from this request. 29 // Note: this is not true for response, multiple operations may have the same response name, 30 // so we can not get operation's name from response. GetServiceRequestName()31 inline virtual const char* GetServiceRequestName() const override { return "ListContainerInstances"; } 32 33 Aws::String SerializePayload() const override; 34 35 Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; 36 37 38 /** 39 * <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts 40 * the container instances to list. If you do not specify a cluster, the default 41 * cluster is assumed.</p> 42 */ GetCluster()43 inline const Aws::String& GetCluster() const{ return m_cluster; } 44 45 /** 46 * <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts 47 * the container instances to list. If you do not specify a cluster, the default 48 * cluster is assumed.</p> 49 */ ClusterHasBeenSet()50 inline bool ClusterHasBeenSet() const { return m_clusterHasBeenSet; } 51 52 /** 53 * <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts 54 * the container instances to list. If you do not specify a cluster, the default 55 * cluster is assumed.</p> 56 */ SetCluster(const Aws::String & value)57 inline void SetCluster(const Aws::String& value) { m_clusterHasBeenSet = true; m_cluster = value; } 58 59 /** 60 * <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts 61 * the container instances to list. If you do not specify a cluster, the default 62 * cluster is assumed.</p> 63 */ SetCluster(Aws::String && value)64 inline void SetCluster(Aws::String&& value) { m_clusterHasBeenSet = true; m_cluster = std::move(value); } 65 66 /** 67 * <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts 68 * the container instances to list. If you do not specify a cluster, the default 69 * cluster is assumed.</p> 70 */ SetCluster(const char * value)71 inline void SetCluster(const char* value) { m_clusterHasBeenSet = true; m_cluster.assign(value); } 72 73 /** 74 * <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts 75 * the container instances to list. If you do not specify a cluster, the default 76 * cluster is assumed.</p> 77 */ WithCluster(const Aws::String & value)78 inline ListContainerInstancesRequest& WithCluster(const Aws::String& value) { SetCluster(value); return *this;} 79 80 /** 81 * <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts 82 * the container instances to list. If you do not specify a cluster, the default 83 * cluster is assumed.</p> 84 */ WithCluster(Aws::String && value)85 inline ListContainerInstancesRequest& WithCluster(Aws::String&& value) { SetCluster(std::move(value)); return *this;} 86 87 /** 88 * <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts 89 * the container instances to list. If you do not specify a cluster, the default 90 * cluster is assumed.</p> 91 */ WithCluster(const char * value)92 inline ListContainerInstancesRequest& WithCluster(const char* value) { SetCluster(value); return *this;} 93 94 95 /** 96 * <p>You can filter the results of a <code>ListContainerInstances</code> operation 97 * with cluster query language statements. For more information, see <a 98 * href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html">Cluster 99 * Query Language</a> in the <i>Amazon Elastic Container Service Developer 100 * Guide</i>.</p> 101 */ GetFilter()102 inline const Aws::String& GetFilter() const{ return m_filter; } 103 104 /** 105 * <p>You can filter the results of a <code>ListContainerInstances</code> operation 106 * with cluster query language statements. For more information, see <a 107 * href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html">Cluster 108 * Query Language</a> in the <i>Amazon Elastic Container Service Developer 109 * Guide</i>.</p> 110 */ FilterHasBeenSet()111 inline bool FilterHasBeenSet() const { return m_filterHasBeenSet; } 112 113 /** 114 * <p>You can filter the results of a <code>ListContainerInstances</code> operation 115 * with cluster query language statements. For more information, see <a 116 * href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html">Cluster 117 * Query Language</a> in the <i>Amazon Elastic Container Service Developer 118 * Guide</i>.</p> 119 */ SetFilter(const Aws::String & value)120 inline void SetFilter(const Aws::String& value) { m_filterHasBeenSet = true; m_filter = value; } 121 122 /** 123 * <p>You can filter the results of a <code>ListContainerInstances</code> operation 124 * with cluster query language statements. For more information, see <a 125 * href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html">Cluster 126 * Query Language</a> in the <i>Amazon Elastic Container Service Developer 127 * Guide</i>.</p> 128 */ SetFilter(Aws::String && value)129 inline void SetFilter(Aws::String&& value) { m_filterHasBeenSet = true; m_filter = std::move(value); } 130 131 /** 132 * <p>You can filter the results of a <code>ListContainerInstances</code> operation 133 * with cluster query language statements. For more information, see <a 134 * href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html">Cluster 135 * Query Language</a> in the <i>Amazon Elastic Container Service Developer 136 * Guide</i>.</p> 137 */ SetFilter(const char * value)138 inline void SetFilter(const char* value) { m_filterHasBeenSet = true; m_filter.assign(value); } 139 140 /** 141 * <p>You can filter the results of a <code>ListContainerInstances</code> operation 142 * with cluster query language statements. For more information, see <a 143 * href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html">Cluster 144 * Query Language</a> in the <i>Amazon Elastic Container Service Developer 145 * Guide</i>.</p> 146 */ WithFilter(const Aws::String & value)147 inline ListContainerInstancesRequest& WithFilter(const Aws::String& value) { SetFilter(value); return *this;} 148 149 /** 150 * <p>You can filter the results of a <code>ListContainerInstances</code> operation 151 * with cluster query language statements. For more information, see <a 152 * href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html">Cluster 153 * Query Language</a> in the <i>Amazon Elastic Container Service Developer 154 * Guide</i>.</p> 155 */ WithFilter(Aws::String && value)156 inline ListContainerInstancesRequest& WithFilter(Aws::String&& value) { SetFilter(std::move(value)); return *this;} 157 158 /** 159 * <p>You can filter the results of a <code>ListContainerInstances</code> operation 160 * with cluster query language statements. For more information, see <a 161 * href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html">Cluster 162 * Query Language</a> in the <i>Amazon Elastic Container Service Developer 163 * Guide</i>.</p> 164 */ WithFilter(const char * value)165 inline ListContainerInstancesRequest& WithFilter(const char* value) { SetFilter(value); return *this;} 166 167 168 /** 169 * <p>The <code>nextToken</code> value returned from a 170 * <code>ListContainerInstances</code> request indicating that more results are 171 * available to fulfill the request and further calls will be needed. If 172 * <code>maxResults</code> was provided, it is possible the number of results to be 173 * fewer than <code>maxResults</code>.</p> <p>This token should be treated 174 * as an opaque identifier that is only used to retrieve the next items in a list 175 * and not for other programmatic purposes.</p> 176 */ GetNextToken()177 inline const Aws::String& GetNextToken() const{ return m_nextToken; } 178 179 /** 180 * <p>The <code>nextToken</code> value returned from a 181 * <code>ListContainerInstances</code> request indicating that more results are 182 * available to fulfill the request and further calls will be needed. If 183 * <code>maxResults</code> was provided, it is possible the number of results to be 184 * fewer than <code>maxResults</code>.</p> <p>This token should be treated 185 * as an opaque identifier that is only used to retrieve the next items in a list 186 * and not for other programmatic purposes.</p> 187 */ NextTokenHasBeenSet()188 inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; } 189 190 /** 191 * <p>The <code>nextToken</code> value returned from a 192 * <code>ListContainerInstances</code> request indicating that more results are 193 * available to fulfill the request and further calls will be needed. If 194 * <code>maxResults</code> was provided, it is possible the number of results to be 195 * fewer than <code>maxResults</code>.</p> <p>This token should be treated 196 * as an opaque identifier that is only used to retrieve the next items in a list 197 * and not for other programmatic purposes.</p> 198 */ SetNextToken(const Aws::String & value)199 inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; } 200 201 /** 202 * <p>The <code>nextToken</code> value returned from a 203 * <code>ListContainerInstances</code> request indicating that more results are 204 * available to fulfill the request and further calls will be needed. If 205 * <code>maxResults</code> was provided, it is possible the number of results to be 206 * fewer than <code>maxResults</code>.</p> <p>This token should be treated 207 * as an opaque identifier that is only used to retrieve the next items in a list 208 * and not for other programmatic purposes.</p> 209 */ SetNextToken(Aws::String && value)210 inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); } 211 212 /** 213 * <p>The <code>nextToken</code> value returned from a 214 * <code>ListContainerInstances</code> request indicating that more results are 215 * available to fulfill the request and further calls will be needed. If 216 * <code>maxResults</code> was provided, it is possible the number of results to be 217 * fewer than <code>maxResults</code>.</p> <p>This token should be treated 218 * as an opaque identifier that is only used to retrieve the next items in a list 219 * and not for other programmatic purposes.</p> 220 */ SetNextToken(const char * value)221 inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); } 222 223 /** 224 * <p>The <code>nextToken</code> value returned from a 225 * <code>ListContainerInstances</code> request indicating that more results are 226 * available to fulfill the request and further calls will be needed. If 227 * <code>maxResults</code> was provided, it is possible the number of results to be 228 * fewer than <code>maxResults</code>.</p> <p>This token should be treated 229 * as an opaque identifier that is only used to retrieve the next items in a list 230 * and not for other programmatic purposes.</p> 231 */ WithNextToken(const Aws::String & value)232 inline ListContainerInstancesRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;} 233 234 /** 235 * <p>The <code>nextToken</code> value returned from a 236 * <code>ListContainerInstances</code> request indicating that more results are 237 * available to fulfill the request and further calls will be needed. If 238 * <code>maxResults</code> was provided, it is possible the number of results to be 239 * fewer than <code>maxResults</code>.</p> <p>This token should be treated 240 * as an opaque identifier that is only used to retrieve the next items in a list 241 * and not for other programmatic purposes.</p> 242 */ WithNextToken(Aws::String && value)243 inline ListContainerInstancesRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;} 244 245 /** 246 * <p>The <code>nextToken</code> value returned from a 247 * <code>ListContainerInstances</code> request indicating that more results are 248 * available to fulfill the request and further calls will be needed. If 249 * <code>maxResults</code> was provided, it is possible the number of results to be 250 * fewer than <code>maxResults</code>.</p> <p>This token should be treated 251 * as an opaque identifier that is only used to retrieve the next items in a list 252 * and not for other programmatic purposes.</p> 253 */ WithNextToken(const char * value)254 inline ListContainerInstancesRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;} 255 256 257 /** 258 * <p>The maximum number of container instance results returned by 259 * <code>ListContainerInstances</code> in paginated output. When this parameter is 260 * used, <code>ListContainerInstances</code> only returns <code>maxResults</code> 261 * results in a single page along with a <code>nextToken</code> response element. 262 * The remaining results of the initial request can be seen by sending another 263 * <code>ListContainerInstances</code> request with the returned 264 * <code>nextToken</code> value. This value can be between 1 and 100. If this 265 * parameter is not used, then <code>ListContainerInstances</code> returns up to 266 * 100 results and a <code>nextToken</code> value if applicable.</p> 267 */ GetMaxResults()268 inline int GetMaxResults() const{ return m_maxResults; } 269 270 /** 271 * <p>The maximum number of container instance results returned by 272 * <code>ListContainerInstances</code> in paginated output. When this parameter is 273 * used, <code>ListContainerInstances</code> only returns <code>maxResults</code> 274 * results in a single page along with a <code>nextToken</code> response element. 275 * The remaining results of the initial request can be seen by sending another 276 * <code>ListContainerInstances</code> request with the returned 277 * <code>nextToken</code> value. This value can be between 1 and 100. If this 278 * parameter is not used, then <code>ListContainerInstances</code> returns up to 279 * 100 results and a <code>nextToken</code> value if applicable.</p> 280 */ MaxResultsHasBeenSet()281 inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; } 282 283 /** 284 * <p>The maximum number of container instance results returned by 285 * <code>ListContainerInstances</code> in paginated output. When this parameter is 286 * used, <code>ListContainerInstances</code> only returns <code>maxResults</code> 287 * results in a single page along with a <code>nextToken</code> response element. 288 * The remaining results of the initial request can be seen by sending another 289 * <code>ListContainerInstances</code> request with the returned 290 * <code>nextToken</code> value. This value can be between 1 and 100. If this 291 * parameter is not used, then <code>ListContainerInstances</code> returns up to 292 * 100 results and a <code>nextToken</code> value if applicable.</p> 293 */ SetMaxResults(int value)294 inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; } 295 296 /** 297 * <p>The maximum number of container instance results returned by 298 * <code>ListContainerInstances</code> in paginated output. When this parameter is 299 * used, <code>ListContainerInstances</code> only returns <code>maxResults</code> 300 * results in a single page along with a <code>nextToken</code> response element. 301 * The remaining results of the initial request can be seen by sending another 302 * <code>ListContainerInstances</code> request with the returned 303 * <code>nextToken</code> value. This value can be between 1 and 100. If this 304 * parameter is not used, then <code>ListContainerInstances</code> returns up to 305 * 100 results and a <code>nextToken</code> value if applicable.</p> 306 */ WithMaxResults(int value)307 inline ListContainerInstancesRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;} 308 309 310 /** 311 * <p>Filters the container instances by status. For example, if you specify the 312 * <code>DRAINING</code> status, the results include only container instances that 313 * have been set to <code>DRAINING</code> using 314 * <a>UpdateContainerInstancesState</a>. If you do not specify this parameter, the 315 * default is to include container instances set to all states other than 316 * <code>INACTIVE</code>.</p> 317 */ GetStatus()318 inline const ContainerInstanceStatus& GetStatus() const{ return m_status; } 319 320 /** 321 * <p>Filters the container instances by status. For example, if you specify the 322 * <code>DRAINING</code> status, the results include only container instances that 323 * have been set to <code>DRAINING</code> using 324 * <a>UpdateContainerInstancesState</a>. If you do not specify this parameter, the 325 * default is to include container instances set to all states other than 326 * <code>INACTIVE</code>.</p> 327 */ StatusHasBeenSet()328 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } 329 330 /** 331 * <p>Filters the container instances by status. For example, if you specify the 332 * <code>DRAINING</code> status, the results include only container instances that 333 * have been set to <code>DRAINING</code> using 334 * <a>UpdateContainerInstancesState</a>. If you do not specify this parameter, the 335 * default is to include container instances set to all states other than 336 * <code>INACTIVE</code>.</p> 337 */ SetStatus(const ContainerInstanceStatus & value)338 inline void SetStatus(const ContainerInstanceStatus& value) { m_statusHasBeenSet = true; m_status = value; } 339 340 /** 341 * <p>Filters the container instances by status. For example, if you specify the 342 * <code>DRAINING</code> status, the results include only container instances that 343 * have been set to <code>DRAINING</code> using 344 * <a>UpdateContainerInstancesState</a>. If you do not specify this parameter, the 345 * default is to include container instances set to all states other than 346 * <code>INACTIVE</code>.</p> 347 */ SetStatus(ContainerInstanceStatus && value)348 inline void SetStatus(ContainerInstanceStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } 349 350 /** 351 * <p>Filters the container instances by status. For example, if you specify the 352 * <code>DRAINING</code> status, the results include only container instances that 353 * have been set to <code>DRAINING</code> using 354 * <a>UpdateContainerInstancesState</a>. If you do not specify this parameter, the 355 * default is to include container instances set to all states other than 356 * <code>INACTIVE</code>.</p> 357 */ WithStatus(const ContainerInstanceStatus & value)358 inline ListContainerInstancesRequest& WithStatus(const ContainerInstanceStatus& value) { SetStatus(value); return *this;} 359 360 /** 361 * <p>Filters the container instances by status. For example, if you specify the 362 * <code>DRAINING</code> status, the results include only container instances that 363 * have been set to <code>DRAINING</code> using 364 * <a>UpdateContainerInstancesState</a>. If you do not specify this parameter, the 365 * default is to include container instances set to all states other than 366 * <code>INACTIVE</code>.</p> 367 */ WithStatus(ContainerInstanceStatus && value)368 inline ListContainerInstancesRequest& WithStatus(ContainerInstanceStatus&& value) { SetStatus(std::move(value)); return *this;} 369 370 private: 371 372 Aws::String m_cluster; 373 bool m_clusterHasBeenSet; 374 375 Aws::String m_filter; 376 bool m_filterHasBeenSet; 377 378 Aws::String m_nextToken; 379 bool m_nextTokenHasBeenSet; 380 381 int m_maxResults; 382 bool m_maxResultsHasBeenSet; 383 384 ContainerInstanceStatus m_status; 385 bool m_statusHasBeenSet; 386 }; 387 388 } // namespace Model 389 } // namespace ECS 390 } // namespace Aws 391