/** * 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 ECS { namespace Model { /** */ class ListTasksRequest : public ECSRequest { public: AWS_ECS_API ListTasksRequest(); // 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 "ListTasks"; } AWS_ECS_API Aws::String SerializePayload() const override; AWS_ECS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The short name or full Amazon Resource Name (ARN) of the cluster to use when * filtering the ListTasks results. If you do not specify a cluster, * the default cluster is assumed.

*/ inline const Aws::String& GetCluster() const{ return m_cluster; } /** *

The short name or full Amazon Resource Name (ARN) of the cluster to use when * filtering the ListTasks results. If you do not specify a cluster, * the default cluster is assumed.

*/ inline bool ClusterHasBeenSet() const { return m_clusterHasBeenSet; } /** *

The short name or full Amazon Resource Name (ARN) of the cluster to use when * filtering the ListTasks results. If you do not specify a cluster, * the default cluster is assumed.

*/ inline void SetCluster(const Aws::String& value) { m_clusterHasBeenSet = true; m_cluster = value; } /** *

The short name or full Amazon Resource Name (ARN) of the cluster to use when * filtering the ListTasks results. If you do not specify a cluster, * the default cluster is assumed.

*/ inline void SetCluster(Aws::String&& value) { m_clusterHasBeenSet = true; m_cluster = std::move(value); } /** *

The short name or full Amazon Resource Name (ARN) of the cluster to use when * filtering the ListTasks results. If you do not specify a cluster, * the default cluster is assumed.

*/ inline void SetCluster(const char* value) { m_clusterHasBeenSet = true; m_cluster.assign(value); } /** *

The short name or full Amazon Resource Name (ARN) of the cluster to use when * filtering the ListTasks results. If you do not specify a cluster, * the default cluster is assumed.

*/ inline ListTasksRequest& WithCluster(const Aws::String& value) { SetCluster(value); return *this;} /** *

The short name or full Amazon Resource Name (ARN) of the cluster to use when * filtering the ListTasks results. If you do not specify a cluster, * the default cluster is assumed.

*/ inline ListTasksRequest& WithCluster(Aws::String&& value) { SetCluster(std::move(value)); return *this;} /** *

The short name or full Amazon Resource Name (ARN) of the cluster to use when * filtering the ListTasks results. If you do not specify a cluster, * the default cluster is assumed.

*/ inline ListTasksRequest& WithCluster(const char* value) { SetCluster(value); return *this;} /** *

The container instance ID or full ARN of the container instance to use when * filtering the ListTasks results. Specifying a * containerInstance limits the results to tasks that belong to that * container instance.

*/ inline const Aws::String& GetContainerInstance() const{ return m_containerInstance; } /** *

The container instance ID or full ARN of the container instance to use when * filtering the ListTasks results. Specifying a * containerInstance limits the results to tasks that belong to that * container instance.

*/ inline bool ContainerInstanceHasBeenSet() const { return m_containerInstanceHasBeenSet; } /** *

The container instance ID or full ARN of the container instance to use when * filtering the ListTasks results. Specifying a * containerInstance limits the results to tasks that belong to that * container instance.

*/ inline void SetContainerInstance(const Aws::String& value) { m_containerInstanceHasBeenSet = true; m_containerInstance = value; } /** *

The container instance ID or full ARN of the container instance to use when * filtering the ListTasks results. Specifying a * containerInstance limits the results to tasks that belong to that * container instance.

*/ inline void SetContainerInstance(Aws::String&& value) { m_containerInstanceHasBeenSet = true; m_containerInstance = std::move(value); } /** *

The container instance ID or full ARN of the container instance to use when * filtering the ListTasks results. Specifying a * containerInstance limits the results to tasks that belong to that * container instance.

*/ inline void SetContainerInstance(const char* value) { m_containerInstanceHasBeenSet = true; m_containerInstance.assign(value); } /** *

The container instance ID or full ARN of the container instance to use when * filtering the ListTasks results. Specifying a * containerInstance limits the results to tasks that belong to that * container instance.

*/ inline ListTasksRequest& WithContainerInstance(const Aws::String& value) { SetContainerInstance(value); return *this;} /** *

The container instance ID or full ARN of the container instance to use when * filtering the ListTasks results. Specifying a * containerInstance limits the results to tasks that belong to that * container instance.

*/ inline ListTasksRequest& WithContainerInstance(Aws::String&& value) { SetContainerInstance(std::move(value)); return *this;} /** *

The container instance ID or full ARN of the container instance to use when * filtering the ListTasks results. Specifying a * containerInstance limits the results to tasks that belong to that * container instance.

*/ inline ListTasksRequest& WithContainerInstance(const char* value) { SetContainerInstance(value); return *this;} /** *

The name of the task definition family to use when filtering the * ListTasks results. Specifying a family limits the * results to tasks that belong to that family.

*/ inline const Aws::String& GetFamily() const{ return m_family; } /** *

The name of the task definition family to use when filtering the * ListTasks results. Specifying a family limits the * results to tasks that belong to that family.

*/ inline bool FamilyHasBeenSet() const { return m_familyHasBeenSet; } /** *

The name of the task definition family to use when filtering the * ListTasks results. Specifying a family limits the * results to tasks that belong to that family.

*/ inline void SetFamily(const Aws::String& value) { m_familyHasBeenSet = true; m_family = value; } /** *

The name of the task definition family to use when filtering the * ListTasks results. Specifying a family limits the * results to tasks that belong to that family.

*/ inline void SetFamily(Aws::String&& value) { m_familyHasBeenSet = true; m_family = std::move(value); } /** *

The name of the task definition family to use when filtering the * ListTasks results. Specifying a family limits the * results to tasks that belong to that family.

*/ inline void SetFamily(const char* value) { m_familyHasBeenSet = true; m_family.assign(value); } /** *

The name of the task definition family to use when filtering the * ListTasks results. Specifying a family limits the * results to tasks that belong to that family.

*/ inline ListTasksRequest& WithFamily(const Aws::String& value) { SetFamily(value); return *this;} /** *

The name of the task definition family to use when filtering the * ListTasks results. Specifying a family limits the * results to tasks that belong to that family.

*/ inline ListTasksRequest& WithFamily(Aws::String&& value) { SetFamily(std::move(value)); return *this;} /** *

The name of the task definition family to use when filtering the * ListTasks results. Specifying a family limits the * results to tasks that belong to that family.

*/ inline ListTasksRequest& WithFamily(const char* value) { SetFamily(value); return *this;} /** *

The nextToken value returned from a ListTasks * request indicating that more results are available to fulfill the request and * further calls will be needed. If maxResults was provided, it's * possible the number of results to be fewer than maxResults.

*

This token should be treated as an opaque identifier that is only used * to retrieve the next items in a list and not for other programmatic * purposes.

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

The nextToken value returned from a ListTasks * request indicating that more results are available to fulfill the request and * further calls will be needed. If maxResults was provided, it's * possible the number of results to be fewer than maxResults.

*

This token should be treated as an opaque identifier that is only used * to retrieve the next items in a list and not for other programmatic * purposes.

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

The nextToken value returned from a ListTasks * request indicating that more results are available to fulfill the request and * further calls will be needed. If maxResults was provided, it's * possible the number of results to be fewer than maxResults.

*

This token should be treated as an opaque identifier that is only used * to retrieve the next items in a list and not for other programmatic * purposes.

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

The nextToken value returned from a ListTasks * request indicating that more results are available to fulfill the request and * further calls will be needed. If maxResults was provided, it's * possible the number of results to be fewer than maxResults.

*

This token should be treated as an opaque identifier that is only used * to retrieve the next items in a list and not for other programmatic * purposes.

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

The nextToken value returned from a ListTasks * request indicating that more results are available to fulfill the request and * further calls will be needed. If maxResults was provided, it's * possible the number of results to be fewer than maxResults.

*

This token should be treated as an opaque identifier that is only used * to retrieve the next items in a list and not for other programmatic * purposes.

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

The nextToken value returned from a ListTasks * request indicating that more results are available to fulfill the request and * further calls will be needed. If maxResults was provided, it's * possible the number of results to be fewer than maxResults.

*

This token should be treated as an opaque identifier that is only used * to retrieve the next items in a list and not for other programmatic * purposes.

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

The nextToken value returned from a ListTasks * request indicating that more results are available to fulfill the request and * further calls will be needed. If maxResults was provided, it's * possible the number of results to be fewer than maxResults.

*

This token should be treated as an opaque identifier that is only used * to retrieve the next items in a list and not for other programmatic * purposes.

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

The nextToken value returned from a ListTasks * request indicating that more results are available to fulfill the request and * further calls will be needed. If maxResults was provided, it's * possible the number of results to be fewer than maxResults.

*

This token should be treated as an opaque identifier that is only used * to retrieve the next items in a list and not for other programmatic * purposes.

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

The maximum number of task results that ListTasks returned in * paginated output. When this parameter is used, ListTasks only * returns maxResults results in a single page along with a * nextToken response element. The remaining results of the initial * request can be seen by sending another ListTasks request with the * returned nextToken value. This value can be between 1 and 100. If * this parameter isn't used, then ListTasks returns up to 100 results * and a nextToken value if applicable.

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

The maximum number of task results that ListTasks returned in * paginated output. When this parameter is used, ListTasks only * returns maxResults results in a single page along with a * nextToken response element. The remaining results of the initial * request can be seen by sending another ListTasks request with the * returned nextToken value. This value can be between 1 and 100. If * this parameter isn't used, then ListTasks returns up to 100 results * and a nextToken value if applicable.

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

The maximum number of task results that ListTasks returned in * paginated output. When this parameter is used, ListTasks only * returns maxResults results in a single page along with a * nextToken response element. The remaining results of the initial * request can be seen by sending another ListTasks request with the * returned nextToken value. This value can be between 1 and 100. If * this parameter isn't used, then ListTasks returns up to 100 results * and a nextToken value if applicable.

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

The maximum number of task results that ListTasks returned in * paginated output. When this parameter is used, ListTasks only * returns maxResults results in a single page along with a * nextToken response element. The remaining results of the initial * request can be seen by sending another ListTasks request with the * returned nextToken value. This value can be between 1 and 100. If * this parameter isn't used, then ListTasks returns up to 100 results * and a nextToken value if applicable.

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

The startedBy value to filter the task results with. Specifying * a startedBy value limits the results to tasks that were started * with that value.

When you specify startedBy as the filter, * it must be the only filter that you use.

*/ inline const Aws::String& GetStartedBy() const{ return m_startedBy; } /** *

The startedBy value to filter the task results with. Specifying * a startedBy value limits the results to tasks that were started * with that value.

When you specify startedBy as the filter, * it must be the only filter that you use.

*/ inline bool StartedByHasBeenSet() const { return m_startedByHasBeenSet; } /** *

The startedBy value to filter the task results with. Specifying * a startedBy value limits the results to tasks that were started * with that value.

When you specify startedBy as the filter, * it must be the only filter that you use.

*/ inline void SetStartedBy(const Aws::String& value) { m_startedByHasBeenSet = true; m_startedBy = value; } /** *

The startedBy value to filter the task results with. Specifying * a startedBy value limits the results to tasks that were started * with that value.

When you specify startedBy as the filter, * it must be the only filter that you use.

*/ inline void SetStartedBy(Aws::String&& value) { m_startedByHasBeenSet = true; m_startedBy = std::move(value); } /** *

The startedBy value to filter the task results with. Specifying * a startedBy value limits the results to tasks that were started * with that value.

When you specify startedBy as the filter, * it must be the only filter that you use.

*/ inline void SetStartedBy(const char* value) { m_startedByHasBeenSet = true; m_startedBy.assign(value); } /** *

The startedBy value to filter the task results with. Specifying * a startedBy value limits the results to tasks that were started * with that value.

When you specify startedBy as the filter, * it must be the only filter that you use.

*/ inline ListTasksRequest& WithStartedBy(const Aws::String& value) { SetStartedBy(value); return *this;} /** *

The startedBy value to filter the task results with. Specifying * a startedBy value limits the results to tasks that were started * with that value.

When you specify startedBy as the filter, * it must be the only filter that you use.

*/ inline ListTasksRequest& WithStartedBy(Aws::String&& value) { SetStartedBy(std::move(value)); return *this;} /** *

The startedBy value to filter the task results with. Specifying * a startedBy value limits the results to tasks that were started * with that value.

When you specify startedBy as the filter, * it must be the only filter that you use.

*/ inline ListTasksRequest& WithStartedBy(const char* value) { SetStartedBy(value); return *this;} /** *

The name of the service to use when filtering the ListTasks * results. Specifying a serviceName limits the results to tasks that * belong to that service.

*/ inline const Aws::String& GetServiceName() const{ return m_serviceName; } /** *

The name of the service to use when filtering the ListTasks * results. Specifying a serviceName limits the results to tasks that * belong to that service.

*/ inline bool ServiceNameHasBeenSet() const { return m_serviceNameHasBeenSet; } /** *

The name of the service to use when filtering the ListTasks * results. Specifying a serviceName limits the results to tasks that * belong to that service.

*/ inline void SetServiceName(const Aws::String& value) { m_serviceNameHasBeenSet = true; m_serviceName = value; } /** *

The name of the service to use when filtering the ListTasks * results. Specifying a serviceName limits the results to tasks that * belong to that service.

*/ inline void SetServiceName(Aws::String&& value) { m_serviceNameHasBeenSet = true; m_serviceName = std::move(value); } /** *

The name of the service to use when filtering the ListTasks * results. Specifying a serviceName limits the results to tasks that * belong to that service.

*/ inline void SetServiceName(const char* value) { m_serviceNameHasBeenSet = true; m_serviceName.assign(value); } /** *

The name of the service to use when filtering the ListTasks * results. Specifying a serviceName limits the results to tasks that * belong to that service.

*/ inline ListTasksRequest& WithServiceName(const Aws::String& value) { SetServiceName(value); return *this;} /** *

The name of the service to use when filtering the ListTasks * results. Specifying a serviceName limits the results to tasks that * belong to that service.

*/ inline ListTasksRequest& WithServiceName(Aws::String&& value) { SetServiceName(std::move(value)); return *this;} /** *

The name of the service to use when filtering the ListTasks * results. Specifying a serviceName limits the results to tasks that * belong to that service.

*/ inline ListTasksRequest& WithServiceName(const char* value) { SetServiceName(value); return *this;} /** *

The task desired status to use when filtering the ListTasks * results. Specifying a desiredStatus of STOPPED limits * the results to tasks that Amazon ECS has set the desired status to * STOPPED. This can be useful for debugging tasks that aren't * starting properly or have died or finished. The default status filter is * RUNNING, which shows tasks that Amazon ECS has set the desired * status to RUNNING.

Although you can filter results * based on a desired status of PENDING, this doesn't return any * results. Amazon ECS never sets the desired status of a task to that value (only * a task's lastStatus may have a value of PENDING).

* */ inline const DesiredStatus& GetDesiredStatus() const{ return m_desiredStatus; } /** *

The task desired status to use when filtering the ListTasks * results. Specifying a desiredStatus of STOPPED limits * the results to tasks that Amazon ECS has set the desired status to * STOPPED. This can be useful for debugging tasks that aren't * starting properly or have died or finished. The default status filter is * RUNNING, which shows tasks that Amazon ECS has set the desired * status to RUNNING.

Although you can filter results * based on a desired status of PENDING, this doesn't return any * results. Amazon ECS never sets the desired status of a task to that value (only * a task's lastStatus may have a value of PENDING).

* */ inline bool DesiredStatusHasBeenSet() const { return m_desiredStatusHasBeenSet; } /** *

The task desired status to use when filtering the ListTasks * results. Specifying a desiredStatus of STOPPED limits * the results to tasks that Amazon ECS has set the desired status to * STOPPED. This can be useful for debugging tasks that aren't * starting properly or have died or finished. The default status filter is * RUNNING, which shows tasks that Amazon ECS has set the desired * status to RUNNING.

Although you can filter results * based on a desired status of PENDING, this doesn't return any * results. Amazon ECS never sets the desired status of a task to that value (only * a task's lastStatus may have a value of PENDING).

* */ inline void SetDesiredStatus(const DesiredStatus& value) { m_desiredStatusHasBeenSet = true; m_desiredStatus = value; } /** *

The task desired status to use when filtering the ListTasks * results. Specifying a desiredStatus of STOPPED limits * the results to tasks that Amazon ECS has set the desired status to * STOPPED. This can be useful for debugging tasks that aren't * starting properly or have died or finished. The default status filter is * RUNNING, which shows tasks that Amazon ECS has set the desired * status to RUNNING.

Although you can filter results * based on a desired status of PENDING, this doesn't return any * results. Amazon ECS never sets the desired status of a task to that value (only * a task's lastStatus may have a value of PENDING).

* */ inline void SetDesiredStatus(DesiredStatus&& value) { m_desiredStatusHasBeenSet = true; m_desiredStatus = std::move(value); } /** *

The task desired status to use when filtering the ListTasks * results. Specifying a desiredStatus of STOPPED limits * the results to tasks that Amazon ECS has set the desired status to * STOPPED. This can be useful for debugging tasks that aren't * starting properly or have died or finished. The default status filter is * RUNNING, which shows tasks that Amazon ECS has set the desired * status to RUNNING.

Although you can filter results * based on a desired status of PENDING, this doesn't return any * results. Amazon ECS never sets the desired status of a task to that value (only * a task's lastStatus may have a value of PENDING).

* */ inline ListTasksRequest& WithDesiredStatus(const DesiredStatus& value) { SetDesiredStatus(value); return *this;} /** *

The task desired status to use when filtering the ListTasks * results. Specifying a desiredStatus of STOPPED limits * the results to tasks that Amazon ECS has set the desired status to * STOPPED. This can be useful for debugging tasks that aren't * starting properly or have died or finished. The default status filter is * RUNNING, which shows tasks that Amazon ECS has set the desired * status to RUNNING.

Although you can filter results * based on a desired status of PENDING, this doesn't return any * results. Amazon ECS never sets the desired status of a task to that value (only * a task's lastStatus may have a value of PENDING).

* */ inline ListTasksRequest& WithDesiredStatus(DesiredStatus&& value) { SetDesiredStatus(std::move(value)); return *this;} /** *

The launch type to use when filtering the ListTasks results.

*/ inline const LaunchType& GetLaunchType() const{ return m_launchType; } /** *

The launch type to use when filtering the ListTasks results.

*/ inline bool LaunchTypeHasBeenSet() const { return m_launchTypeHasBeenSet; } /** *

The launch type to use when filtering the ListTasks results.

*/ inline void SetLaunchType(const LaunchType& value) { m_launchTypeHasBeenSet = true; m_launchType = value; } /** *

The launch type to use when filtering the ListTasks results.

*/ inline void SetLaunchType(LaunchType&& value) { m_launchTypeHasBeenSet = true; m_launchType = std::move(value); } /** *

The launch type to use when filtering the ListTasks results.

*/ inline ListTasksRequest& WithLaunchType(const LaunchType& value) { SetLaunchType(value); return *this;} /** *

The launch type to use when filtering the ListTasks results.

*/ inline ListTasksRequest& WithLaunchType(LaunchType&& value) { SetLaunchType(std::move(value)); return *this;} private: Aws::String m_cluster; bool m_clusterHasBeenSet = false; Aws::String m_containerInstance; bool m_containerInstanceHasBeenSet = false; Aws::String m_family; bool m_familyHasBeenSet = false; Aws::String m_nextToken; bool m_nextTokenHasBeenSet = false; int m_maxResults; bool m_maxResultsHasBeenSet = false; Aws::String m_startedBy; bool m_startedByHasBeenSet = false; Aws::String m_serviceName; bool m_serviceNameHasBeenSet = false; DesiredStatus m_desiredStatus; bool m_desiredStatusHasBeenSet = false; LaunchType m_launchType; bool m_launchTypeHasBeenSet = false; }; } // namespace Model } // namespace ECS } // namespace Aws