interface ExistingCloudMapNamespaceOptions
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.ECS.ExistingCloudMapNamespaceOptions |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsecs#ExistingCloudMapNamespaceOptions |
Java | software.amazon.awscdk.services.ecs.ExistingCloudMapNamespaceOptions |
Python | aws_cdk.aws_ecs.ExistingCloudMapNamespaceOptions |
TypeScript (source) | aws-cdk-lib » aws_ecs » ExistingCloudMapNamespaceOptions |
Implements
Cloud
The options for using an existing AWS Cloud Map namespace as the default namespace of a cluster.
Example
declare const vpc: ec2.Vpc;
// Create or reference an existing namespace
const existingNamespace = new cloudmap.PrivateDnsNamespace(this, 'Namespace', {
name: 'example.local',
vpc,
});
const cluster = new ecs.Cluster(this, 'Cluster', { vpc });
// Use the existing namespace as the default
cluster.addExistingDefaultCloudMapNamespace({
namespace: existingNamespace,
useForServiceConnect: true,
});
Properties
| Name | Type | Description |
|---|---|---|
| namespace | INamespace | The existing Cloud Map namespace to use as the cluster's default namespace. |
| use | boolean | This property specifies whether to set the provided namespace as the service connect default in the cluster properties. |
namespace
Type:
INamespace
The existing Cloud Map namespace to use as the cluster's default namespace.
The full INamespace is required (rather than a ref) because the cluster needs the
namespace name, ARN and type to wire up Service Discovery and Service Connect.
[disable-awslint:prefer-ref-interface]
useForServiceConnect?
Type:
boolean
(optional, default: false)
This property specifies whether to set the provided namespace as the service connect default in the cluster properties.

.NET
Go
Java
Python
TypeScript (