HttpNamespaceProps¶
-
class
aws_cdk.aws_servicediscovery.
HttpNamespaceProps
(*, name, description=None)¶ Bases:
aws_cdk.aws_servicediscovery.BaseNamespaceProps
- Parameters
name (
str
) – A name for the Namespace.description (
Optional
[str
]) – A description of the Namespace. Default: none
- ExampleMetadata
lit=test/integ.service-with-http-namespace.lit.ts infused
Example:
import aws_cdk.core as cdk import aws_cdk.aws_servicediscovery as servicediscovery app = cdk.App() stack = cdk.Stack(app, "aws-servicediscovery-integ") namespace = servicediscovery.HttpNamespace(stack, "MyNamespace", name="covfefe" ) service1 = namespace.create_service("NonIpService", description="service registering non-ip instances" ) service1.register_non_ip_instance("NonIpInstance", custom_attributes={"arn": "arn:aws:s3:::mybucket"} ) service2 = namespace.create_service("IpService", description="service registering ip instances", health_check=servicediscovery.HealthCheckConfig( type=servicediscovery.HealthCheckType.HTTP, resource_path="/check" ) ) service2.register_ip_instance("IpInstance", ipv4="54.239.25.192" ) app.synth()
Attributes
-
description
¶ A description of the Namespace.
- Default
none
- Return type
Optional
[str
]
-
name
¶ A name for the Namespace.
- Return type
str