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

The Service Connect service object configuration. For more information, see * Service * Connect in the Amazon Elastic Container Service Developer * Guide.

See Also:

AWS * API Reference

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

The portName must match the name of one of the * portMappings from all the containers in the task definition of this * Amazon ECS service.

*/ inline const Aws::String& GetPortName() const{ return m_portName; } /** *

The portName must match the name of one of the * portMappings from all the containers in the task definition of this * Amazon ECS service.

*/ inline bool PortNameHasBeenSet() const { return m_portNameHasBeenSet; } /** *

The portName must match the name of one of the * portMappings from all the containers in the task definition of this * Amazon ECS service.

*/ inline void SetPortName(const Aws::String& value) { m_portNameHasBeenSet = true; m_portName = value; } /** *

The portName must match the name of one of the * portMappings from all the containers in the task definition of this * Amazon ECS service.

*/ inline void SetPortName(Aws::String&& value) { m_portNameHasBeenSet = true; m_portName = std::move(value); } /** *

The portName must match the name of one of the * portMappings from all the containers in the task definition of this * Amazon ECS service.

*/ inline void SetPortName(const char* value) { m_portNameHasBeenSet = true; m_portName.assign(value); } /** *

The portName must match the name of one of the * portMappings from all the containers in the task definition of this * Amazon ECS service.

*/ inline ServiceConnectService& WithPortName(const Aws::String& value) { SetPortName(value); return *this;} /** *

The portName must match the name of one of the * portMappings from all the containers in the task definition of this * Amazon ECS service.

*/ inline ServiceConnectService& WithPortName(Aws::String&& value) { SetPortName(std::move(value)); return *this;} /** *

The portName must match the name of one of the * portMappings from all the containers in the task definition of this * Amazon ECS service.

*/ inline ServiceConnectService& WithPortName(const char* value) { SetPortName(value); return *this;} /** *

The discoveryName is the name of the new Cloud Map service that * Amazon ECS creates for this Amazon ECS service. This must be unique within the * Cloud Map namespace. The name can contain up to 64 characters. The name can * include lowercase letters, numbers, underscores (_), and hyphens (-). The name * can't start with a hyphen.

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

*/ inline const Aws::String& GetDiscoveryName() const{ return m_discoveryName; } /** *

The discoveryName is the name of the new Cloud Map service that * Amazon ECS creates for this Amazon ECS service. This must be unique within the * Cloud Map namespace. The name can contain up to 64 characters. The name can * include lowercase letters, numbers, underscores (_), and hyphens (-). The name * can't start with a hyphen.

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

*/ inline bool DiscoveryNameHasBeenSet() const { return m_discoveryNameHasBeenSet; } /** *

The discoveryName is the name of the new Cloud Map service that * Amazon ECS creates for this Amazon ECS service. This must be unique within the * Cloud Map namespace. The name can contain up to 64 characters. The name can * include lowercase letters, numbers, underscores (_), and hyphens (-). The name * can't start with a hyphen.

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

*/ inline void SetDiscoveryName(const Aws::String& value) { m_discoveryNameHasBeenSet = true; m_discoveryName = value; } /** *

The discoveryName is the name of the new Cloud Map service that * Amazon ECS creates for this Amazon ECS service. This must be unique within the * Cloud Map namespace. The name can contain up to 64 characters. The name can * include lowercase letters, numbers, underscores (_), and hyphens (-). The name * can't start with a hyphen.

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

*/ inline void SetDiscoveryName(Aws::String&& value) { m_discoveryNameHasBeenSet = true; m_discoveryName = std::move(value); } /** *

The discoveryName is the name of the new Cloud Map service that * Amazon ECS creates for this Amazon ECS service. This must be unique within the * Cloud Map namespace. The name can contain up to 64 characters. The name can * include lowercase letters, numbers, underscores (_), and hyphens (-). The name * can't start with a hyphen.

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

*/ inline void SetDiscoveryName(const char* value) { m_discoveryNameHasBeenSet = true; m_discoveryName.assign(value); } /** *

The discoveryName is the name of the new Cloud Map service that * Amazon ECS creates for this Amazon ECS service. This must be unique within the * Cloud Map namespace. The name can contain up to 64 characters. The name can * include lowercase letters, numbers, underscores (_), and hyphens (-). The name * can't start with a hyphen.

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

*/ inline ServiceConnectService& WithDiscoveryName(const Aws::String& value) { SetDiscoveryName(value); return *this;} /** *

The discoveryName is the name of the new Cloud Map service that * Amazon ECS creates for this Amazon ECS service. This must be unique within the * Cloud Map namespace. The name can contain up to 64 characters. The name can * include lowercase letters, numbers, underscores (_), and hyphens (-). The name * can't start with a hyphen.

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

*/ inline ServiceConnectService& WithDiscoveryName(Aws::String&& value) { SetDiscoveryName(std::move(value)); return *this;} /** *

The discoveryName is the name of the new Cloud Map service that * Amazon ECS creates for this Amazon ECS service. This must be unique within the * Cloud Map namespace. The name can contain up to 64 characters. The name can * include lowercase letters, numbers, underscores (_), and hyphens (-). The name * can't start with a hyphen.

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

*/ inline ServiceConnectService& WithDiscoveryName(const char* value) { SetDiscoveryName(value); return *this;} /** *

The list of client aliases for this Service Connect service. You use these to * assign names that can be used by client applications. The maximum number of * client aliases that you can have in this list is 1.

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

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

For each * ServiceConnectService, you must provide at least one * clientAlias with one port.

*/ inline const Aws::Vector& GetClientAliases() const{ return m_clientAliases; } /** *

The list of client aliases for this Service Connect service. You use these to * assign names that can be used by client applications. The maximum number of * client aliases that you can have in this list is 1.

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

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

For each * ServiceConnectService, you must provide at least one * clientAlias with one port.

*/ inline bool ClientAliasesHasBeenSet() const { return m_clientAliasesHasBeenSet; } /** *

The list of client aliases for this Service Connect service. You use these to * assign names that can be used by client applications. The maximum number of * client aliases that you can have in this list is 1.

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

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

For each * ServiceConnectService, you must provide at least one * clientAlias with one port.

*/ inline void SetClientAliases(const Aws::Vector& value) { m_clientAliasesHasBeenSet = true; m_clientAliases = value; } /** *

The list of client aliases for this Service Connect service. You use these to * assign names that can be used by client applications. The maximum number of * client aliases that you can have in this list is 1.

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

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

For each * ServiceConnectService, you must provide at least one * clientAlias with one port.

*/ inline void SetClientAliases(Aws::Vector&& value) { m_clientAliasesHasBeenSet = true; m_clientAliases = std::move(value); } /** *

The list of client aliases for this Service Connect service. You use these to * assign names that can be used by client applications. The maximum number of * client aliases that you can have in this list is 1.

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

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

For each * ServiceConnectService, you must provide at least one * clientAlias with one port.

*/ inline ServiceConnectService& WithClientAliases(const Aws::Vector& value) { SetClientAliases(value); return *this;} /** *

The list of client aliases for this Service Connect service. You use these to * assign names that can be used by client applications. The maximum number of * client aliases that you can have in this list is 1.

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

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

For each * ServiceConnectService, you must provide at least one * clientAlias with one port.

*/ inline ServiceConnectService& WithClientAliases(Aws::Vector&& value) { SetClientAliases(std::move(value)); return *this;} /** *

The list of client aliases for this Service Connect service. You use these to * assign names that can be used by client applications. The maximum number of * client aliases that you can have in this list is 1.

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

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

For each * ServiceConnectService, you must provide at least one * clientAlias with one port.

*/ inline ServiceConnectService& AddClientAliases(const ServiceConnectClientAlias& value) { m_clientAliasesHasBeenSet = true; m_clientAliases.push_back(value); return *this; } /** *

The list of client aliases for this Service Connect service. You use these to * assign names that can be used by client applications. The maximum number of * client aliases that you can have in this list is 1.

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

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

For each * ServiceConnectService, you must provide at least one * clientAlias with one port.

*/ inline ServiceConnectService& AddClientAliases(ServiceConnectClientAlias&& value) { m_clientAliasesHasBeenSet = true; m_clientAliases.push_back(std::move(value)); return *this; } /** *

The port number for the Service Connect proxy to listen on.

Use the * value of this field to bypass the proxy for traffic on the port number specified * in the named portMapping in the task definition of this * application, and then use it in your VPC security groups to allow traffic into * the proxy for this Amazon ECS service.

In awsvpc mode and * Fargate, the default value is the container port number. The container port * number is in the portMapping in the task definition. In bridge * mode, the default value is the ephemeral port of the Service Connect proxy.

*/ inline int GetIngressPortOverride() const{ return m_ingressPortOverride; } /** *

The port number for the Service Connect proxy to listen on.

Use the * value of this field to bypass the proxy for traffic on the port number specified * in the named portMapping in the task definition of this * application, and then use it in your VPC security groups to allow traffic into * the proxy for this Amazon ECS service.

In awsvpc mode and * Fargate, the default value is the container port number. The container port * number is in the portMapping in the task definition. In bridge * mode, the default value is the ephemeral port of the Service Connect proxy.

*/ inline bool IngressPortOverrideHasBeenSet() const { return m_ingressPortOverrideHasBeenSet; } /** *

The port number for the Service Connect proxy to listen on.

Use the * value of this field to bypass the proxy for traffic on the port number specified * in the named portMapping in the task definition of this * application, and then use it in your VPC security groups to allow traffic into * the proxy for this Amazon ECS service.

In awsvpc mode and * Fargate, the default value is the container port number. The container port * number is in the portMapping in the task definition. In bridge * mode, the default value is the ephemeral port of the Service Connect proxy.

*/ inline void SetIngressPortOverride(int value) { m_ingressPortOverrideHasBeenSet = true; m_ingressPortOverride = value; } /** *

The port number for the Service Connect proxy to listen on.

Use the * value of this field to bypass the proxy for traffic on the port number specified * in the named portMapping in the task definition of this * application, and then use it in your VPC security groups to allow traffic into * the proxy for this Amazon ECS service.

In awsvpc mode and * Fargate, the default value is the container port number. The container port * number is in the portMapping in the task definition. In bridge * mode, the default value is the ephemeral port of the Service Connect proxy.

*/ inline ServiceConnectService& WithIngressPortOverride(int value) { SetIngressPortOverride(value); return *this;} private: Aws::String m_portName; bool m_portNameHasBeenSet = false; Aws::String m_discoveryName; bool m_discoveryNameHasBeenSet = false; Aws::Vector m_clientAliases; bool m_clientAliasesHasBeenSet = false; int m_ingressPortOverride; bool m_ingressPortOverrideHasBeenSet = false; }; } // namespace Model } // namespace ECS } // namespace Aws