/** * 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 { /** *

The Service Connect resource. Each configuration maps a discovery name to a * Cloud Map service name. The data is stored in Cloud Map as part of the Service * Connect configuration for each discovery name of this Amazon ECS service.

*

A task can resolve the dnsName for each of the * clientAliases of a service. However a task can't resolve the * discovery names. If you want to connect to a service, refer to the * ServiceConnectConfiguration of that service for the list of * clientAliases that you can use.

See Also:

AWS * API Reference

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

The discovery name of this Service Connect resource.

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 discovery name of this Service Connect resource.

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 discovery name of this Service Connect resource.

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 discovery name of this Service Connect resource.

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 discovery name of this Service Connect resource.

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 discovery name of this Service Connect resource.

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 ServiceConnectServiceResource& WithDiscoveryName(const Aws::String& value) { SetDiscoveryName(value); return *this;} /** *

The discovery name of this Service Connect resource.

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 ServiceConnectServiceResource& WithDiscoveryName(Aws::String&& value) { SetDiscoveryName(std::move(value)); return *this;} /** *

The discovery name of this Service Connect resource.

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 ServiceConnectServiceResource& WithDiscoveryName(const char* value) { SetDiscoveryName(value); return *this;} /** *

The Amazon Resource Name (ARN) for the namespace in Cloud Map that matches * the discovery name for this Service Connect resource. You can use this ARN in * other integrations with Cloud Map. However, Service Connect can't ensure * connectivity outside of Amazon ECS.

*/ inline const Aws::String& GetDiscoveryArn() const{ return m_discoveryArn; } /** *

The Amazon Resource Name (ARN) for the namespace in Cloud Map that matches * the discovery name for this Service Connect resource. You can use this ARN in * other integrations with Cloud Map. However, Service Connect can't ensure * connectivity outside of Amazon ECS.

*/ inline bool DiscoveryArnHasBeenSet() const { return m_discoveryArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) for the namespace in Cloud Map that matches * the discovery name for this Service Connect resource. You can use this ARN in * other integrations with Cloud Map. However, Service Connect can't ensure * connectivity outside of Amazon ECS.

*/ inline void SetDiscoveryArn(const Aws::String& value) { m_discoveryArnHasBeenSet = true; m_discoveryArn = value; } /** *

The Amazon Resource Name (ARN) for the namespace in Cloud Map that matches * the discovery name for this Service Connect resource. You can use this ARN in * other integrations with Cloud Map. However, Service Connect can't ensure * connectivity outside of Amazon ECS.

*/ inline void SetDiscoveryArn(Aws::String&& value) { m_discoveryArnHasBeenSet = true; m_discoveryArn = std::move(value); } /** *

The Amazon Resource Name (ARN) for the namespace in Cloud Map that matches * the discovery name for this Service Connect resource. You can use this ARN in * other integrations with Cloud Map. However, Service Connect can't ensure * connectivity outside of Amazon ECS.

*/ inline void SetDiscoveryArn(const char* value) { m_discoveryArnHasBeenSet = true; m_discoveryArn.assign(value); } /** *

The Amazon Resource Name (ARN) for the namespace in Cloud Map that matches * the discovery name for this Service Connect resource. You can use this ARN in * other integrations with Cloud Map. However, Service Connect can't ensure * connectivity outside of Amazon ECS.

*/ inline ServiceConnectServiceResource& WithDiscoveryArn(const Aws::String& value) { SetDiscoveryArn(value); return *this;} /** *

The Amazon Resource Name (ARN) for the namespace in Cloud Map that matches * the discovery name for this Service Connect resource. You can use this ARN in * other integrations with Cloud Map. However, Service Connect can't ensure * connectivity outside of Amazon ECS.

*/ inline ServiceConnectServiceResource& WithDiscoveryArn(Aws::String&& value) { SetDiscoveryArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) for the namespace in Cloud Map that matches * the discovery name for this Service Connect resource. You can use this ARN in * other integrations with Cloud Map. However, Service Connect can't ensure * connectivity outside of Amazon ECS.

*/ inline ServiceConnectServiceResource& WithDiscoveryArn(const char* value) { SetDiscoveryArn(value); return *this;} private: Aws::String m_discoveryName; bool m_discoveryNameHasBeenSet = false; Aws::String m_discoveryArn; bool m_discoveryArnHasBeenSet = false; }; } // namespace Model } // namespace ECS } // namespace Aws