/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace DocDB { namespace Model { /** *

Represents the input to FailoverDBCluster.

See Also:

* AWS * API Reference

*/ class FailoverDBClusterRequest : public DocDBRequest { public: AWS_DOCDB_API FailoverDBClusterRequest(); // 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 "FailoverDBCluster"; } AWS_DOCDB_API Aws::String SerializePayload() const override; protected: AWS_DOCDB_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

A cluster identifier to force a failover for. This parameter is not case * sensitive.

Constraints:

  • Must match the identifier of an * existing DBCluster.

*/ inline const Aws::String& GetDBClusterIdentifier() const{ return m_dBClusterIdentifier; } /** *

A cluster identifier to force a failover for. This parameter is not case * sensitive.

Constraints:

  • Must match the identifier of an * existing DBCluster.

*/ inline bool DBClusterIdentifierHasBeenSet() const { return m_dBClusterIdentifierHasBeenSet; } /** *

A cluster identifier to force a failover for. This parameter is not case * sensitive.

Constraints:

  • Must match the identifier of an * existing DBCluster.

*/ inline void SetDBClusterIdentifier(const Aws::String& value) { m_dBClusterIdentifierHasBeenSet = true; m_dBClusterIdentifier = value; } /** *

A cluster identifier to force a failover for. This parameter is not case * sensitive.

Constraints:

  • Must match the identifier of an * existing DBCluster.

*/ inline void SetDBClusterIdentifier(Aws::String&& value) { m_dBClusterIdentifierHasBeenSet = true; m_dBClusterIdentifier = std::move(value); } /** *

A cluster identifier to force a failover for. This parameter is not case * sensitive.

Constraints:

  • Must match the identifier of an * existing DBCluster.

*/ inline void SetDBClusterIdentifier(const char* value) { m_dBClusterIdentifierHasBeenSet = true; m_dBClusterIdentifier.assign(value); } /** *

A cluster identifier to force a failover for. This parameter is not case * sensitive.

Constraints:

  • Must match the identifier of an * existing DBCluster.

*/ inline FailoverDBClusterRequest& WithDBClusterIdentifier(const Aws::String& value) { SetDBClusterIdentifier(value); return *this;} /** *

A cluster identifier to force a failover for. This parameter is not case * sensitive.

Constraints:

  • Must match the identifier of an * existing DBCluster.

*/ inline FailoverDBClusterRequest& WithDBClusterIdentifier(Aws::String&& value) { SetDBClusterIdentifier(std::move(value)); return *this;} /** *

A cluster identifier to force a failover for. This parameter is not case * sensitive.

Constraints:

  • Must match the identifier of an * existing DBCluster.

*/ inline FailoverDBClusterRequest& WithDBClusterIdentifier(const char* value) { SetDBClusterIdentifier(value); return *this;} /** *

The name of the instance to promote to the primary instance.

You must * specify the instance identifier for an Amazon DocumentDB replica in the cluster. * For example, mydbcluster-replica1.

*/ inline const Aws::String& GetTargetDBInstanceIdentifier() const{ return m_targetDBInstanceIdentifier; } /** *

The name of the instance to promote to the primary instance.

You must * specify the instance identifier for an Amazon DocumentDB replica in the cluster. * For example, mydbcluster-replica1.

*/ inline bool TargetDBInstanceIdentifierHasBeenSet() const { return m_targetDBInstanceIdentifierHasBeenSet; } /** *

The name of the instance to promote to the primary instance.

You must * specify the instance identifier for an Amazon DocumentDB replica in the cluster. * For example, mydbcluster-replica1.

*/ inline void SetTargetDBInstanceIdentifier(const Aws::String& value) { m_targetDBInstanceIdentifierHasBeenSet = true; m_targetDBInstanceIdentifier = value; } /** *

The name of the instance to promote to the primary instance.

You must * specify the instance identifier for an Amazon DocumentDB replica in the cluster. * For example, mydbcluster-replica1.

*/ inline void SetTargetDBInstanceIdentifier(Aws::String&& value) { m_targetDBInstanceIdentifierHasBeenSet = true; m_targetDBInstanceIdentifier = std::move(value); } /** *

The name of the instance to promote to the primary instance.

You must * specify the instance identifier for an Amazon DocumentDB replica in the cluster. * For example, mydbcluster-replica1.

*/ inline void SetTargetDBInstanceIdentifier(const char* value) { m_targetDBInstanceIdentifierHasBeenSet = true; m_targetDBInstanceIdentifier.assign(value); } /** *

The name of the instance to promote to the primary instance.

You must * specify the instance identifier for an Amazon DocumentDB replica in the cluster. * For example, mydbcluster-replica1.

*/ inline FailoverDBClusterRequest& WithTargetDBInstanceIdentifier(const Aws::String& value) { SetTargetDBInstanceIdentifier(value); return *this;} /** *

The name of the instance to promote to the primary instance.

You must * specify the instance identifier for an Amazon DocumentDB replica in the cluster. * For example, mydbcluster-replica1.

*/ inline FailoverDBClusterRequest& WithTargetDBInstanceIdentifier(Aws::String&& value) { SetTargetDBInstanceIdentifier(std::move(value)); return *this;} /** *

The name of the instance to promote to the primary instance.

You must * specify the instance identifier for an Amazon DocumentDB replica in the cluster. * For example, mydbcluster-replica1.

*/ inline FailoverDBClusterRequest& WithTargetDBInstanceIdentifier(const char* value) { SetTargetDBInstanceIdentifier(value); return *this;} private: Aws::String m_dBClusterIdentifier; bool m_dBClusterIdentifierHasBeenSet = false; Aws::String m_targetDBInstanceIdentifier; bool m_targetDBInstanceIdentifierHasBeenSet = false; }; } // namespace Model } // namespace DocDB } // namespace Aws