-
Notifications
You must be signed in to change notification settings - Fork 17
/
Tags.go
99 lines (88 loc) · 2.53 KB
/
Tags.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
package awscdk
import (
_init_ "github.com/aws/aws-cdk-go/awscdk/v2/jsii"
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
"github.com/aws/constructs-go/constructs/v10"
)
// Manages AWS tags for all resources within a construct scope.
//
// Example:
// var mesh mesh
// var service service
//
//
// node := appmesh.NewVirtualNode(this, jsii.String("node"), &VirtualNodeProps{
// Mesh: Mesh,
// ServiceDiscovery: appmesh.ServiceDiscovery_CloudMap(service),
// Listeners: []virtualNodeListener{
// appmesh.*virtualNodeListener_Http(&HttpVirtualNodeListenerOptions{
// Port: jsii.Number(8080),
// HealthCheck: appmesh.HealthCheck_Http(&HttpHealthCheckOptions{
// HealthyThreshold: jsii.Number(3),
// Interval: awscdk.Duration_Seconds(jsii.Number(5)),
// Path: jsii.String("/ping"),
// Timeout: awscdk.Duration_*Seconds(jsii.Number(2)),
// UnhealthyThreshold: jsii.Number(2),
// }),
// Timeout: &HttpTimeout{
// Idle: awscdk.Duration_*Seconds(jsii.Number(5)),
// },
// }),
// },
// BackendDefaults: &BackendDefaults{
// TlsClientPolicy: &TlsClientPolicy{
// Validation: &TlsValidation{
// Trust: appmesh.TlsValidationTrust_File(jsii.String("/keys/local_cert_chain.pem")),
// },
// },
// },
// AccessLog: appmesh.AccessLog_FromFilePath(jsii.String("/dev/stdout")),
// })
//
// cdk.Tags_Of(node).Add(jsii.String("Environment"), jsii.String("Dev"))
//
type Tags interface {
// add tags to the node of a construct and all its the taggable children.
Add(key *string, value *string, props *TagProps)
// remove tags to the node of a construct and all its the taggable children.
Remove(key *string, props *TagProps)
}
// The jsii proxy struct for Tags
type jsiiProxy_Tags struct {
_ byte // padding
}
// Returns the tags API for this scope.
func Tags_Of(scope constructs.IConstruct) Tags {
_init_.Initialize()
if err := validateTags_OfParameters(scope); err != nil {
panic(err)
}
var returns Tags
_jsii_.StaticInvoke(
"aws-cdk-lib.Tags",
"of",
[]interface{}{scope},
&returns,
)
return returns
}
func (t *jsiiProxy_Tags) Add(key *string, value *string, props *TagProps) {
if err := t.validateAddParameters(key, value, props); err != nil {
panic(err)
}
_jsii_.InvokeVoid(
t,
"add",
[]interface{}{key, value, props},
)
}
func (t *jsiiProxy_Tags) Remove(key *string, props *TagProps) {
if err := t.validateRemoveParameters(key, props); err != nil {
panic(err)
}
_jsii_.InvokeVoid(
t,
"remove",
[]interface{}{key, props},
)
}