-
Notifications
You must be signed in to change notification settings - Fork 17
/
Names.go
101 lines (84 loc) · 2.74 KB
/
Names.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
99
100
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"
)
// Functions for devising unique names for constructs.
//
// For example, those can be
// used to allocate unique physical names for resources.
type Names interface {
}
// The jsii proxy struct for Names
type jsiiProxy_Names struct {
_ byte // padding
}
// Returns a CloudFormation-compatible unique identifier for a construct based on its path.
//
// The identifier includes a human readable portion rendered
// from the path components and a hash suffix.
//
// TODO (v2): replace with API to use `constructs.Node`.
//
// Returns: a unique id based on the construct path.
func Names_NodeUniqueId(node constructs.Node) *string {
_init_.Initialize()
if err := validateNames_NodeUniqueIdParameters(node); err != nil {
panic(err)
}
var returns *string
_jsii_.StaticInvoke(
"aws-cdk-lib.Names",
"nodeUniqueId",
[]interface{}{node},
&returns,
)
return returns
}
// Returns a CloudFormation-compatible unique identifier for a construct based on its path.
//
// The identifier includes a human readable portion rendered
// from the path components and a hash suffix. uniqueId is not unique if multiple
// copies of the stack are deployed. Prefer using uniqueResourceName().
//
// Returns: a unique id based on the construct path.
func Names_UniqueId(construct constructs.IConstruct) *string {
_init_.Initialize()
if err := validateNames_UniqueIdParameters(construct); err != nil {
panic(err)
}
var returns *string
_jsii_.StaticInvoke(
"aws-cdk-lib.Names",
"uniqueId",
[]interface{}{construct},
&returns,
)
return returns
}
// Returns a CloudFormation-compatible unique identifier for a construct based on its path.
//
// This function finds the stackName of the parent stack (non-nested)
// to the construct, and the ids of the components in the construct path.
//
// The user can define allowed special characters, a separator between the elements,
// and the maximum length of the resource name. The name includes a human readable portion rendered
// from the path components, with or without user defined separators, and a hash suffix.
// If the resource name is longer than the maximum length, it is trimmed in the middle.
//
// Returns: a unique resource name based on the construct path.
func Names_UniqueResourceName(construct constructs.IConstruct, options *UniqueResourceNameOptions) *string {
_init_.Initialize()
if err := validateNames_UniqueResourceNameParameters(construct, options); err != nil {
panic(err)
}
var returns *string
_jsii_.StaticInvoke(
"aws-cdk-lib.Names",
"uniqueResourceName",
[]interface{}{construct, options},
&returns,
)
return returns
}