-
Notifications
You must be signed in to change notification settings - Fork 17
/
PrivateDnsNamespaceProps.go
40 lines (37 loc) · 1.44 KB
/
PrivateDnsNamespaceProps.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package awsservicediscovery
import (
"github.com/aws/aws-cdk-go/awscdk/v2/awsec2"
)
// Example:
// var mesh mesh
// // Cloud Map service discovery is currently required for host ejection by outlier detection
// vpc := ec2.NewVpc(this, jsii.String("vpc"))
// namespace := cloudmap.NewPrivateDnsNamespace(this, jsii.String("test-namespace"), &PrivateDnsNamespaceProps{
// Vpc: Vpc,
// Name: jsii.String("domain.local"),
// })
// service := namespace.CreateService(jsii.String("Svc"))
// node := mesh.addVirtualNode(jsii.String("virtual-node"), &VirtualNodeBaseProps{
// ServiceDiscovery: appmesh.ServiceDiscovery_CloudMap(service),
// Listeners: []virtualNodeListener{
// appmesh.*virtualNodeListener_Http(&HttpVirtualNodeListenerOptions{
// OutlierDetection: &OutlierDetection{
// BaseEjectionDuration: awscdk.Duration_Seconds(jsii.Number(10)),
// Interval: awscdk.Duration_*Seconds(jsii.Number(30)),
// MaxEjectionPercent: jsii.Number(50),
// MaxServerErrors: jsii.Number(5),
// },
// }),
// },
// })
//
type PrivateDnsNamespaceProps struct {
// A name for the Namespace.
Name *string `field:"required" json:"name" yaml:"name"`
// A description of the Namespace.
// Default: none.
//
Description *string `field:"optional" json:"description" yaml:"description"`
// The Amazon VPC that you want to associate the namespace with.
Vpc awsec2.IVpc `field:"required" json:"vpc" yaml:"vpc"`
}