/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace RDS { namespace Model { /** *

Contains the details for an RDS Proxy target. It represents an RDS DB * instance or Aurora DB cluster that the proxy can connect to. One or more targets * are associated with an RDS Proxy target group.

This data type is used as * a response element in the DescribeDBProxyTargets * action.

See Also:

AWS * API Reference

*/ class DBProxyTarget { public: AWS_RDS_API DBProxyTarget(); AWS_RDS_API DBProxyTarget(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_RDS_API DBProxyTarget& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_RDS_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_RDS_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The Amazon Resource Name (ARN) for the RDS DB instance or Aurora DB * cluster.

*/ inline const Aws::String& GetTargetArn() const{ return m_targetArn; } /** *

The Amazon Resource Name (ARN) for the RDS DB instance or Aurora DB * cluster.

*/ inline bool TargetArnHasBeenSet() const { return m_targetArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) for the RDS DB instance or Aurora DB * cluster.

*/ inline void SetTargetArn(const Aws::String& value) { m_targetArnHasBeenSet = true; m_targetArn = value; } /** *

The Amazon Resource Name (ARN) for the RDS DB instance or Aurora DB * cluster.

*/ inline void SetTargetArn(Aws::String&& value) { m_targetArnHasBeenSet = true; m_targetArn = std::move(value); } /** *

The Amazon Resource Name (ARN) for the RDS DB instance or Aurora DB * cluster.

*/ inline void SetTargetArn(const char* value) { m_targetArnHasBeenSet = true; m_targetArn.assign(value); } /** *

The Amazon Resource Name (ARN) for the RDS DB instance or Aurora DB * cluster.

*/ inline DBProxyTarget& WithTargetArn(const Aws::String& value) { SetTargetArn(value); return *this;} /** *

The Amazon Resource Name (ARN) for the RDS DB instance or Aurora DB * cluster.

*/ inline DBProxyTarget& WithTargetArn(Aws::String&& value) { SetTargetArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) for the RDS DB instance or Aurora DB * cluster.

*/ inline DBProxyTarget& WithTargetArn(const char* value) { SetTargetArn(value); return *this;} /** *

The writer endpoint for the RDS DB instance or Aurora DB cluster.

*/ inline const Aws::String& GetEndpoint() const{ return m_endpoint; } /** *

The writer endpoint for the RDS DB instance or Aurora DB cluster.

*/ inline bool EndpointHasBeenSet() const { return m_endpointHasBeenSet; } /** *

The writer endpoint for the RDS DB instance or Aurora DB cluster.

*/ inline void SetEndpoint(const Aws::String& value) { m_endpointHasBeenSet = true; m_endpoint = value; } /** *

The writer endpoint for the RDS DB instance or Aurora DB cluster.

*/ inline void SetEndpoint(Aws::String&& value) { m_endpointHasBeenSet = true; m_endpoint = std::move(value); } /** *

The writer endpoint for the RDS DB instance or Aurora DB cluster.

*/ inline void SetEndpoint(const char* value) { m_endpointHasBeenSet = true; m_endpoint.assign(value); } /** *

The writer endpoint for the RDS DB instance or Aurora DB cluster.

*/ inline DBProxyTarget& WithEndpoint(const Aws::String& value) { SetEndpoint(value); return *this;} /** *

The writer endpoint for the RDS DB instance or Aurora DB cluster.

*/ inline DBProxyTarget& WithEndpoint(Aws::String&& value) { SetEndpoint(std::move(value)); return *this;} /** *

The writer endpoint for the RDS DB instance or Aurora DB cluster.

*/ inline DBProxyTarget& WithEndpoint(const char* value) { SetEndpoint(value); return *this;} /** *

The DB cluster identifier when the target represents an Aurora DB cluster. * This field is blank when the target represents an RDS DB instance.

*/ inline const Aws::String& GetTrackedClusterId() const{ return m_trackedClusterId; } /** *

The DB cluster identifier when the target represents an Aurora DB cluster. * This field is blank when the target represents an RDS DB instance.

*/ inline bool TrackedClusterIdHasBeenSet() const { return m_trackedClusterIdHasBeenSet; } /** *

The DB cluster identifier when the target represents an Aurora DB cluster. * This field is blank when the target represents an RDS DB instance.

*/ inline void SetTrackedClusterId(const Aws::String& value) { m_trackedClusterIdHasBeenSet = true; m_trackedClusterId = value; } /** *

The DB cluster identifier when the target represents an Aurora DB cluster. * This field is blank when the target represents an RDS DB instance.

*/ inline void SetTrackedClusterId(Aws::String&& value) { m_trackedClusterIdHasBeenSet = true; m_trackedClusterId = std::move(value); } /** *

The DB cluster identifier when the target represents an Aurora DB cluster. * This field is blank when the target represents an RDS DB instance.

*/ inline void SetTrackedClusterId(const char* value) { m_trackedClusterIdHasBeenSet = true; m_trackedClusterId.assign(value); } /** *

The DB cluster identifier when the target represents an Aurora DB cluster. * This field is blank when the target represents an RDS DB instance.

*/ inline DBProxyTarget& WithTrackedClusterId(const Aws::String& value) { SetTrackedClusterId(value); return *this;} /** *

The DB cluster identifier when the target represents an Aurora DB cluster. * This field is blank when the target represents an RDS DB instance.

*/ inline DBProxyTarget& WithTrackedClusterId(Aws::String&& value) { SetTrackedClusterId(std::move(value)); return *this;} /** *

The DB cluster identifier when the target represents an Aurora DB cluster. * This field is blank when the target represents an RDS DB instance.

*/ inline DBProxyTarget& WithTrackedClusterId(const char* value) { SetTrackedClusterId(value); return *this;} /** *

The identifier representing the target. It can be the instance identifier for * an RDS DB instance, or the cluster identifier for an Aurora DB cluster.

*/ inline const Aws::String& GetRdsResourceId() const{ return m_rdsResourceId; } /** *

The identifier representing the target. It can be the instance identifier for * an RDS DB instance, or the cluster identifier for an Aurora DB cluster.

*/ inline bool RdsResourceIdHasBeenSet() const { return m_rdsResourceIdHasBeenSet; } /** *

The identifier representing the target. It can be the instance identifier for * an RDS DB instance, or the cluster identifier for an Aurora DB cluster.

*/ inline void SetRdsResourceId(const Aws::String& value) { m_rdsResourceIdHasBeenSet = true; m_rdsResourceId = value; } /** *

The identifier representing the target. It can be the instance identifier for * an RDS DB instance, or the cluster identifier for an Aurora DB cluster.

*/ inline void SetRdsResourceId(Aws::String&& value) { m_rdsResourceIdHasBeenSet = true; m_rdsResourceId = std::move(value); } /** *

The identifier representing the target. It can be the instance identifier for * an RDS DB instance, or the cluster identifier for an Aurora DB cluster.

*/ inline void SetRdsResourceId(const char* value) { m_rdsResourceIdHasBeenSet = true; m_rdsResourceId.assign(value); } /** *

The identifier representing the target. It can be the instance identifier for * an RDS DB instance, or the cluster identifier for an Aurora DB cluster.

*/ inline DBProxyTarget& WithRdsResourceId(const Aws::String& value) { SetRdsResourceId(value); return *this;} /** *

The identifier representing the target. It can be the instance identifier for * an RDS DB instance, or the cluster identifier for an Aurora DB cluster.

*/ inline DBProxyTarget& WithRdsResourceId(Aws::String&& value) { SetRdsResourceId(std::move(value)); return *this;} /** *

The identifier representing the target. It can be the instance identifier for * an RDS DB instance, or the cluster identifier for an Aurora DB cluster.

*/ inline DBProxyTarget& WithRdsResourceId(const char* value) { SetRdsResourceId(value); return *this;} /** *

The port that the RDS Proxy uses to connect to the target RDS DB instance or * Aurora DB cluster.

*/ inline int GetPort() const{ return m_port; } /** *

The port that the RDS Proxy uses to connect to the target RDS DB instance or * Aurora DB cluster.

*/ inline bool PortHasBeenSet() const { return m_portHasBeenSet; } /** *

The port that the RDS Proxy uses to connect to the target RDS DB instance or * Aurora DB cluster.

*/ inline void SetPort(int value) { m_portHasBeenSet = true; m_port = value; } /** *

The port that the RDS Proxy uses to connect to the target RDS DB instance or * Aurora DB cluster.

*/ inline DBProxyTarget& WithPort(int value) { SetPort(value); return *this;} /** *

Specifies the kind of database, such as an RDS DB instance or an Aurora DB * cluster, that the target represents.

*/ inline const TargetType& GetType() const{ return m_type; } /** *

Specifies the kind of database, such as an RDS DB instance or an Aurora DB * cluster, that the target represents.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

Specifies the kind of database, such as an RDS DB instance or an Aurora DB * cluster, that the target represents.

*/ inline void SetType(const TargetType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

Specifies the kind of database, such as an RDS DB instance or an Aurora DB * cluster, that the target represents.

*/ inline void SetType(TargetType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

Specifies the kind of database, such as an RDS DB instance or an Aurora DB * cluster, that the target represents.

*/ inline DBProxyTarget& WithType(const TargetType& value) { SetType(value); return *this;} /** *

Specifies the kind of database, such as an RDS DB instance or an Aurora DB * cluster, that the target represents.

*/ inline DBProxyTarget& WithType(TargetType&& value) { SetType(std::move(value)); return *this;} /** *

A value that indicates whether the target of the proxy can be used for * read/write or read-only operations.

*/ inline const TargetRole& GetRole() const{ return m_role; } /** *

A value that indicates whether the target of the proxy can be used for * read/write or read-only operations.

*/ inline bool RoleHasBeenSet() const { return m_roleHasBeenSet; } /** *

A value that indicates whether the target of the proxy can be used for * read/write or read-only operations.

*/ inline void SetRole(const TargetRole& value) { m_roleHasBeenSet = true; m_role = value; } /** *

A value that indicates whether the target of the proxy can be used for * read/write or read-only operations.

*/ inline void SetRole(TargetRole&& value) { m_roleHasBeenSet = true; m_role = std::move(value); } /** *

A value that indicates whether the target of the proxy can be used for * read/write or read-only operations.

*/ inline DBProxyTarget& WithRole(const TargetRole& value) { SetRole(value); return *this;} /** *

A value that indicates whether the target of the proxy can be used for * read/write or read-only operations.

*/ inline DBProxyTarget& WithRole(TargetRole&& value) { SetRole(std::move(value)); return *this;} /** *

Information about the connection health of the RDS Proxy target.

*/ inline const TargetHealth& GetTargetHealth() const{ return m_targetHealth; } /** *

Information about the connection health of the RDS Proxy target.

*/ inline bool TargetHealthHasBeenSet() const { return m_targetHealthHasBeenSet; } /** *

Information about the connection health of the RDS Proxy target.

*/ inline void SetTargetHealth(const TargetHealth& value) { m_targetHealthHasBeenSet = true; m_targetHealth = value; } /** *

Information about the connection health of the RDS Proxy target.

*/ inline void SetTargetHealth(TargetHealth&& value) { m_targetHealthHasBeenSet = true; m_targetHealth = std::move(value); } /** *

Information about the connection health of the RDS Proxy target.

*/ inline DBProxyTarget& WithTargetHealth(const TargetHealth& value) { SetTargetHealth(value); return *this;} /** *

Information about the connection health of the RDS Proxy target.

*/ inline DBProxyTarget& WithTargetHealth(TargetHealth&& value) { SetTargetHealth(std::move(value)); return *this;} private: Aws::String m_targetArn; bool m_targetArnHasBeenSet = false; Aws::String m_endpoint; bool m_endpointHasBeenSet = false; Aws::String m_trackedClusterId; bool m_trackedClusterIdHasBeenSet = false; Aws::String m_rdsResourceId; bool m_rdsResourceIdHasBeenSet = false; int m_port; bool m_portHasBeenSet = false; TargetType m_type; bool m_typeHasBeenSet = false; TargetRole m_role; bool m_roleHasBeenSet = false; TargetHealth m_targetHealth; bool m_targetHealthHasBeenSet = false; }; } // namespace Model } // namespace RDS } // namespace Aws