aws-cdk-lib.aws_servicediscovery.HttpNamespaceProps

interface HttpNamespaceProps

LanguageType name
.NETAmazon.CDK.AWS.ServiceDiscovery.HttpNamespaceProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsservicediscovery#HttpNamespaceProps
Javasoftware.amazon.awscdk.services.servicediscovery.HttpNamespaceProps
Pythonaws_cdk.aws_servicediscovery.HttpNamespaceProps
TypeScript (source)aws-cdk-lib » aws_servicediscovery » HttpNamespaceProps

Example

import * as cdk from '../../core';
import * as servicediscovery from '../lib';

const app = new cdk.App();
const stack = new cdk.Stack(app, 'aws-servicediscovery-integ');

const namespace = new servicediscovery.HttpNamespace(stack, 'MyNamespace', {
  name: 'MyHTTPNamespace',
});

const service1 = namespace.createService('NonIpService', {
  description: 'service registering non-ip instances',
});

service1.registerNonIpInstance('NonIpInstance', {
  customAttributes: { arn: 'arn:aws:s3:::mybucket' },
});

const service2 = namespace.createService('IpService', {
  description: 'service registering ip instances',
  healthCheck: {
    type: servicediscovery.HealthCheckType.HTTP,
    resourcePath: '/check',
  },
});

service2.registerIpInstance('IpInstance', {
  ipv4: '54.239.25.192',
});

app.synth();

Properties

NameTypeDescription
namestringA name for the Namespace.
description?stringA description of the Namespace.

name

Type: string

A name for the Namespace.


description?

Type: string (optional, default: none)

A description of the Namespace.