Skip to content
v2.273.0

PrivateDnsNamespaceAttributes Struct ​

Example ​

ts
declare const vpc: ec2.Vpc;

const importedNamespace = cloudmap.PrivateDnsNamespace.fromPrivateDnsNamespaceAttributes(
  this, 'ImportedNamespace', {
    namespaceId: 'ns-xxxxxxxxxxxxx',
    namespaceArn: 'arn:aws:servicediscovery:us-east-1:123456789012:namespace/ns-xxxxxxxxxxxxx',
    namespaceName: 'example.local',
  }
);

const cluster = new ecs.Cluster(this, 'Cluster', { vpc });

cluster.addExistingDefaultCloudMapNamespace({
  namespace: importedNamespace,
});

Properties ​

namespaceArnstringnamespace_arnstrnamespaceArnStringNamespaceArnstringNamespaceArn*stringrequired#
Namespace ARN for the Namespace.
namespaceIdstringnamespace_idstrnamespaceIdStringNamespaceIdstringNamespaceId*stringrequired#
Namespace Id for the Namespace.
namespaceNamestringnamespace_namestrnamespaceNameStringNamespaceNamestringNamespaceName*stringrequired#
A name for the Namespace.