EcsRequest Class

(QtAws::ECS::EcsRequest)

The EcsRequest class provides an interface for ECS requests. More...

Public Types

enum Action { CreateClusterAction, CreateServiceAction, DeleteAttributesAction, DeleteClusterAction, ..., UpdateServiceAction }
flags Actions

Public Functions

EcsRequest(const Action action)
EcsRequest(const EcsRequest &other)
Action action() const
QString actionString() const
QString apiVersion() const
void setAction(const Action action)
void setApiVersion(const QString &version)
EcsRequest &operator=(const EcsRequest &other)
virtual bool operator==(const EcsRequest &other) const

Protected Functions

EcsRequest(EcsRequestPrivate * const d)
int clearParameter(const QString &name)
void clearParameters()
QVariant parameter(const QString &name, const QVariant &defaultValue = QVariant()) const
const QVariantMap &parameters() const
void setParameter(const QString &name, const QVariant &value)
void setParameters(const QVariantMap &parameters)

Reimplemented Protected Functions

virtual QNetworkRequest unsignedRequest(const QUrl &endpoint) const override

Detailed Description

The EcsRequest class provides an interface for ECS requests.

Member Type Documentation

enum EcsRequest::Action
flags EcsRequest::Actions

This enum describes the actions that can be performed as ECS requests.

ConstantValueDescription
QtAws::ECS::EcsRequest::CreateClusterAction0ECS CreateCluster action.
QtAws::ECS::EcsRequest::CreateServiceAction1ECS CreateService action.
QtAws::ECS::EcsRequest::DeleteAttributesAction2ECS DeleteAttributes action.
QtAws::ECS::EcsRequest::DeleteClusterAction3ECS DeleteCluster action.
QtAws::ECS::EcsRequest::DeleteServiceAction4ECS DeleteService action.
QtAws::ECS::EcsRequest::DeregisterContainerInstanceAction5ECS DeregisterContainerInstance action.
QtAws::ECS::EcsRequest::DeregisterTaskDefinitionAction6ECS DeregisterTaskDefinition action.
QtAws::ECS::EcsRequest::DescribeClustersAction7ECS DescribeClusters action.
QtAws::ECS::EcsRequest::DescribeContainerInstancesAction8ECS DescribeContainerInstances action.
QtAws::ECS::EcsRequest::DescribeServicesAction9ECS DescribeServices action.
QtAws::ECS::EcsRequest::DescribeTaskDefinitionAction10ECS DescribeTaskDefinition action.
QtAws::ECS::EcsRequest::DescribeTasksAction11ECS DescribeTasks action.
QtAws::ECS::EcsRequest::DiscoverPollEndpointAction12ECS DiscoverPollEndpoint action.
QtAws::ECS::EcsRequest::ListAttributesAction13ECS ListAttributes action.
QtAws::ECS::EcsRequest::ListClustersAction14ECS ListClusters action.
QtAws::ECS::EcsRequest::ListContainerInstancesAction15ECS ListContainerInstances action.
QtAws::ECS::EcsRequest::ListServicesAction16ECS ListServices action.
QtAws::ECS::EcsRequest::ListTaskDefinitionFamiliesAction17ECS ListTaskDefinitionFamilies action.
QtAws::ECS::EcsRequest::ListTaskDefinitionsAction18ECS ListTaskDefinitions action.
QtAws::ECS::EcsRequest::ListTasksAction19ECS ListTasks action.
QtAws::ECS::EcsRequest::PutAttributesAction20ECS PutAttributes action.
QtAws::ECS::EcsRequest::RegisterContainerInstanceAction21ECS RegisterContainerInstance action.
QtAws::ECS::EcsRequest::RegisterTaskDefinitionAction22ECS RegisterTaskDefinition action.
QtAws::ECS::EcsRequest::RunTaskAction23ECS RunTask action.
QtAws::ECS::EcsRequest::StartTaskAction24ECS StartTask action.
QtAws::ECS::EcsRequest::StopTaskAction25ECS StopTask action.
QtAws::ECS::EcsRequest::SubmitContainerStateChangeAction26ECS SubmitContainerStateChange action.
QtAws::ECS::EcsRequest::SubmitTaskStateChangeAction27ECS SubmitTaskStateChange action.
QtAws::ECS::EcsRequest::UpdateContainerAgentAction28ECS UpdateContainerAgent action.
QtAws::ECS::EcsRequest::UpdateContainerInstancesStateAction29ECS UpdateContainerInstancesState action.
QtAws::ECS::EcsRequest::UpdateServiceAction30ECS UpdateService action.

The Actions type is a typedef for QFlags<Action>. It stores an OR combination of Action values.

Member Function Documentation

EcsRequest::EcsRequest(const Action action)

Constructs a EcsRequest object for ECS action.

EcsRequest::EcsRequest(const EcsRequest &other)

Constructs a copy of other.

[protected] EcsRequest::EcsRequest(EcsRequestPrivate * const d)

Constructs aa EcsRequest object with private implementation d.

This overload allows derived classes to provide their own private class implementation that inherits from EcsRequestPrivate.

Action EcsRequest::action() const

Returns the ECS action to be performed by this request.

See also setAction().

QString EcsRequest::actionString() const

Returns the name of the ECS action to be performed by this request.

QString EcsRequest::apiVersion() const

Returns the ECS API version implemented by this request.

See also setApiVersion().

[protected] int EcsRequest::clearParameter(const QString &name)

Removes the a name parameter from the request, then returns the number of paramters removed (typically 0 or 1).

[protected] void EcsRequest::clearParameters()

Removes all parameters from the request.

[protected] QVariant EcsRequest::parameter(const QString &name, const QVariant &defaultValue = QVariant()) const

Returns the value of the name pararemter if set; defaultValue otherwise.

See also setParameter().

[protected] const QVariantMap &EcsRequest::parameters() const

Returns the parameters included in this request.

See also setParameters().

void EcsRequest::setAction(const Action action)

Sets the ECS action to be performed by this request to action.

See also action().

void EcsRequest::setApiVersion(const QString &version)

Sets the ECS API version to include in this request to version.

See also apiVersion().

[protected] void EcsRequest::setParameter(const QString &name, const QVariant &value)

Sets the name parameter to value.

See also parameter().

[protected] void EcsRequest::setParameters(const QVariantMap &parameters)

Sets the paramters for this request to parameters. Any request parameters set previously will be discarded.

See also parameters().

[override virtual protected] QNetworkRequest EcsRequest::unsignedRequest(const QUrl &endpoint) const

Reimplemented from AwsAbstractRequest::unsignedRequest().

Returns a network request for the ECS request using the given endpoint.

This ECS implementation builds request URLs by combining the common query parameters (such as Action and Version), with any that have been added (via setParameter) by child classes.

EcsRequest &EcsRequest::operator=(const EcsRequest &other)

Sets the EcsRequest object to be equal to other.

[virtual] bool EcsRequest::operator==(const EcsRequest &other) const

Returns true if this request is equal to other; false otherwise.

Note, most derived *Request classes do not need to provider their own implementations of this function, since most such request classes rely on this class' parameters functionality for all request parameters, and that parameters map is already checked via this implementation.

© 2018 Paul Colby Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.