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

Each alias ("endpoint") is a fully-qualified name and port number that other * tasks ("clients") can use to connect to this service.

Each name and port * mapping must be unique within the namespace.

Tasks that run in a * namespace can use short names to connect to services in the namespace. Tasks can * connect to services across all of the clusters in the namespace. Tasks connect * through a managed proxy container that collects logs and metrics for increased * visibility. Only the tasks that Amazon ECS services create are supported with * Service Connect. For more information, see Service * Connect in the Amazon Elastic Container Service Developer * Guide.

See Also:

AWS * API Reference

*/ class ServiceConnectClientAlias { public: AWS_ECS_API ServiceConnectClientAlias(); AWS_ECS_API ServiceConnectClientAlias(Aws::Utils::Json::JsonView jsonValue); AWS_ECS_API ServiceConnectClientAlias& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_ECS_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The listening port number for the Service Connect proxy. This port is * available inside of all of the tasks within the same namespace.

To avoid * changing your applications in client Amazon ECS services, set this to the same * port that the client application uses by default. For more information, see Service * Connect in the Amazon Elastic Container Service Developer Guide.

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

The listening port number for the Service Connect proxy. This port is * available inside of all of the tasks within the same namespace.

To avoid * changing your applications in client Amazon ECS services, set this to the same * port that the client application uses by default. For more information, see Service * Connect in the Amazon Elastic Container Service Developer Guide.

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

The listening port number for the Service Connect proxy. This port is * available inside of all of the tasks within the same namespace.

To avoid * changing your applications in client Amazon ECS services, set this to the same * port that the client application uses by default. For more information, see Service * Connect in the Amazon Elastic Container Service Developer Guide.

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

The listening port number for the Service Connect proxy. This port is * available inside of all of the tasks within the same namespace.

To avoid * changing your applications in client Amazon ECS services, set this to the same * port that the client application uses by default. For more information, see Service * Connect in the Amazon Elastic Container Service Developer Guide.

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

The dnsName is the name that you use in the applications of * client tasks to connect to this service. The name must be a valid DNS name but * doesn't need to be fully-qualified. The name can include up to 127 characters. * The name can include lowercase letters, numbers, underscores (_), hyphens (-), * and periods (.). The name can't start with a hyphen.

If this parameter * isn't specified, the default value of discoveryName.namespace is * used. If the discoveryName isn't specified, the port mapping name * from the task definition is used in portName.namespace.

To * avoid changing your applications in client Amazon ECS services, set this to the * same name that the client application uses by default. For example, a few common * names are database, db, or the lowercase name of a * database, such as mysql or redis. For more * information, see Service * Connect in the Amazon Elastic Container Service Developer Guide.

*/ inline const Aws::String& GetDnsName() const{ return m_dnsName; } /** *

The dnsName is the name that you use in the applications of * client tasks to connect to this service. The name must be a valid DNS name but * doesn't need to be fully-qualified. The name can include up to 127 characters. * The name can include lowercase letters, numbers, underscores (_), hyphens (-), * and periods (.). The name can't start with a hyphen.

If this parameter * isn't specified, the default value of discoveryName.namespace is * used. If the discoveryName isn't specified, the port mapping name * from the task definition is used in portName.namespace.

To * avoid changing your applications in client Amazon ECS services, set this to the * same name that the client application uses by default. For example, a few common * names are database, db, or the lowercase name of a * database, such as mysql or redis. For more * information, see Service * Connect in the Amazon Elastic Container Service Developer Guide.

*/ inline bool DnsNameHasBeenSet() const { return m_dnsNameHasBeenSet; } /** *

The dnsName is the name that you use in the applications of * client tasks to connect to this service. The name must be a valid DNS name but * doesn't need to be fully-qualified. The name can include up to 127 characters. * The name can include lowercase letters, numbers, underscores (_), hyphens (-), * and periods (.). The name can't start with a hyphen.

If this parameter * isn't specified, the default value of discoveryName.namespace is * used. If the discoveryName isn't specified, the port mapping name * from the task definition is used in portName.namespace.

To * avoid changing your applications in client Amazon ECS services, set this to the * same name that the client application uses by default. For example, a few common * names are database, db, or the lowercase name of a * database, such as mysql or redis. For more * information, see Service * Connect in the Amazon Elastic Container Service Developer Guide.

*/ inline void SetDnsName(const Aws::String& value) { m_dnsNameHasBeenSet = true; m_dnsName = value; } /** *

The dnsName is the name that you use in the applications of * client tasks to connect to this service. The name must be a valid DNS name but * doesn't need to be fully-qualified. The name can include up to 127 characters. * The name can include lowercase letters, numbers, underscores (_), hyphens (-), * and periods (.). The name can't start with a hyphen.

If this parameter * isn't specified, the default value of discoveryName.namespace is * used. If the discoveryName isn't specified, the port mapping name * from the task definition is used in portName.namespace.

To * avoid changing your applications in client Amazon ECS services, set this to the * same name that the client application uses by default. For example, a few common * names are database, db, or the lowercase name of a * database, such as mysql or redis. For more * information, see Service * Connect in the Amazon Elastic Container Service Developer Guide.

*/ inline void SetDnsName(Aws::String&& value) { m_dnsNameHasBeenSet = true; m_dnsName = std::move(value); } /** *

The dnsName is the name that you use in the applications of * client tasks to connect to this service. The name must be a valid DNS name but * doesn't need to be fully-qualified. The name can include up to 127 characters. * The name can include lowercase letters, numbers, underscores (_), hyphens (-), * and periods (.). The name can't start with a hyphen.

If this parameter * isn't specified, the default value of discoveryName.namespace is * used. If the discoveryName isn't specified, the port mapping name * from the task definition is used in portName.namespace.

To * avoid changing your applications in client Amazon ECS services, set this to the * same name that the client application uses by default. For example, a few common * names are database, db, or the lowercase name of a * database, such as mysql or redis. For more * information, see Service * Connect in the Amazon Elastic Container Service Developer Guide.

*/ inline void SetDnsName(const char* value) { m_dnsNameHasBeenSet = true; m_dnsName.assign(value); } /** *

The dnsName is the name that you use in the applications of * client tasks to connect to this service. The name must be a valid DNS name but * doesn't need to be fully-qualified. The name can include up to 127 characters. * The name can include lowercase letters, numbers, underscores (_), hyphens (-), * and periods (.). The name can't start with a hyphen.

If this parameter * isn't specified, the default value of discoveryName.namespace is * used. If the discoveryName isn't specified, the port mapping name * from the task definition is used in portName.namespace.

To * avoid changing your applications in client Amazon ECS services, set this to the * same name that the client application uses by default. For example, a few common * names are database, db, or the lowercase name of a * database, such as mysql or redis. For more * information, see Service * Connect in the Amazon Elastic Container Service Developer Guide.

*/ inline ServiceConnectClientAlias& WithDnsName(const Aws::String& value) { SetDnsName(value); return *this;} /** *

The dnsName is the name that you use in the applications of * client tasks to connect to this service. The name must be a valid DNS name but * doesn't need to be fully-qualified. The name can include up to 127 characters. * The name can include lowercase letters, numbers, underscores (_), hyphens (-), * and periods (.). The name can't start with a hyphen.

If this parameter * isn't specified, the default value of discoveryName.namespace is * used. If the discoveryName isn't specified, the port mapping name * from the task definition is used in portName.namespace.

To * avoid changing your applications in client Amazon ECS services, set this to the * same name that the client application uses by default. For example, a few common * names are database, db, or the lowercase name of a * database, such as mysql or redis. For more * information, see Service * Connect in the Amazon Elastic Container Service Developer Guide.

*/ inline ServiceConnectClientAlias& WithDnsName(Aws::String&& value) { SetDnsName(std::move(value)); return *this;} /** *

The dnsName is the name that you use in the applications of * client tasks to connect to this service. The name must be a valid DNS name but * doesn't need to be fully-qualified. The name can include up to 127 characters. * The name can include lowercase letters, numbers, underscores (_), hyphens (-), * and periods (.). The name can't start with a hyphen.

If this parameter * isn't specified, the default value of discoveryName.namespace is * used. If the discoveryName isn't specified, the port mapping name * from the task definition is used in portName.namespace.

To * avoid changing your applications in client Amazon ECS services, set this to the * same name that the client application uses by default. For example, a few common * names are database, db, or the lowercase name of a * database, such as mysql or redis. For more * information, see Service * Connect in the Amazon Elastic Container Service Developer Guide.

*/ inline ServiceConnectClientAlias& WithDnsName(const char* value) { SetDnsName(value); return *this;} private: int m_port; bool m_portHasBeenSet = false; Aws::String m_dnsName; bool m_dnsNameHasBeenSet = false; }; } // namespace Model } // namespace ECS } // namespace Aws