-
Notifications
You must be signed in to change notification settings - Fork 17
/
SecureStringParameterAttributes.go
64 lines (61 loc) · 2.79 KB
/
SecureStringParameterAttributes.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
package awsssm
import (
"github.com/aws/aws-cdk-go/awscdk/v2/awskms"
)
// Attributes for secure string parameters.
//
// Example:
// parameterVersion := awscdk.Token_AsNumber(map[string]*string{
// "Ref": jsii.String("MyParameter"),
// })
//
// // Retrieve the latest value of the non-secret parameter
// // with name "/My/String/Parameter".
// stringValue := ssm.StringParameter_FromStringParameterAttributes(this, jsii.String("MyValue"), &StringParameterAttributes{
// ParameterName: jsii.String("/My/Public/Parameter"),
// }).StringValue
// stringValueVersionFromToken := ssm.StringParameter_FromStringParameterAttributes(this, jsii.String("MyValueVersionFromToken"), &StringParameterAttributes{
// ParameterName: jsii.String("/My/Public/Parameter"),
// // parameter version from token
// Version: parameterVersion,
// }).StringValue
//
// // Retrieve a specific version of the secret (SecureString) parameter.
// // 'version' is always required.
// secretValue := ssm.StringParameter_FromSecureStringParameterAttributes(this, jsii.String("MySecureValue"), &SecureStringParameterAttributes{
// ParameterName: jsii.String("/My/Secret/Parameter"),
// Version: jsii.Number(5),
// })
// secretValueVersionFromToken := ssm.StringParameter_FromSecureStringParameterAttributes(this, jsii.String("MySecureValueVersionFromToken"), &SecureStringParameterAttributes{
// ParameterName: jsii.String("/My/Secret/Parameter"),
// // parameter version from token
// Version: parameterVersion,
// })
//
type SecureStringParameterAttributes struct {
// The name of the parameter store value.
//
// This value can be a token or a concrete string. If it is a concrete string
// and includes "/" it must also be prefixed with a "/" (fully-qualified).
ParameterName *string `field:"required" json:"parameterName" yaml:"parameterName"`
// Indicates if the parameter name is a simple name (i.e. does not include "/" separators).
//
// This is required only if `parameterName` is a token, which means we
// are unable to detect if the name is simple or "path-like" for the purpose
// of rendering SSM parameter ARNs.
//
// If `parameterName` is not specified, `simpleName` must be `true` (or
// undefined) since the name generated by AWS CloudFormation is always a
// simple name.
// Default: - auto-detect based on `parameterName`.
//
SimpleName *bool `field:"optional" json:"simpleName" yaml:"simpleName"`
// The encryption key that is used to encrypt this parameter.
// Default: - default master key.
//
EncryptionKey awskms.IKey `field:"optional" json:"encryptionKey" yaml:"encryptionKey"`
// The version number of the value you wish to retrieve.
// Default: - AWS CloudFormation uses the latest version of the parameter.
//
Version *float64 `field:"optional" json:"version" yaml:"version"`
}