/
getDbCluster.go
208 lines (176 loc) · 11.4 KB
/
getDbCluster.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
// Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package neptune
import (
"context"
"reflect"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// The AWS::Neptune::DBCluster resource creates an Amazon Neptune DB cluster.
func LookupDbCluster(ctx *pulumi.Context, args *LookupDbClusterArgs, opts ...pulumi.InvokeOption) (*LookupDbClusterResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupDbClusterResult
err := ctx.Invoke("aws-native:neptune:getDbCluster", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupDbClusterArgs struct {
// The DB cluster identifier. Contains a user-supplied DB cluster identifier. This identifier is the unique key that identifies a DB cluster stored as a lowercase string.
DbClusterIdentifier string `pulumi:"dbClusterIdentifier"`
}
type LookupDbClusterResult struct {
// Provides a list of the AWS Identity and Access Management (IAM) roles that are associated with the DB cluster. IAM roles that are associated with a DB cluster grant permission for the DB cluster to access other AWS services on your behalf.
AssociatedRoles []DbClusterDbClusterRole `pulumi:"associatedRoles"`
// Specifies the number of days for which automatic DB snapshots are retained.
BackupRetentionPeriod *int `pulumi:"backupRetentionPeriod"`
// The resource id for the DB cluster. For example: `cluster-ABCD1234EFGH5678IJKL90MNOP`. The cluster ID uniquely identifies the cluster and is used in things like IAM authentication policies.
ClusterResourceId *string `pulumi:"clusterResourceId"`
// A value that indicates whether to copy all tags from the DB cluster to snapshots of the DB cluster. The default behaviour is not to copy them.
CopyTagsToSnapshot *bool `pulumi:"copyTagsToSnapshot"`
// Provides the name of the DB cluster parameter group.
DbClusterParameterGroupName *string `pulumi:"dbClusterParameterGroupName"`
// The port number on which the DB instances in the DB cluster accept connections.
//
// If not specified, the default port used is `8182`.
//
// Note: `Port` property will soon be deprecated from this resource. Please update existing templates to rename it with new property `DBPort` having same functionalities.
DbPort *int `pulumi:"dbPort"`
// Indicates whether or not the DB cluster has deletion protection enabled. The database can't be deleted when deletion protection is enabled.
DeletionProtection *bool `pulumi:"deletionProtection"`
// Specifies a list of log types that are enabled for export to CloudWatch Logs.
EnableCloudwatchLogsExports []string `pulumi:"enableCloudwatchLogsExports"`
// The connection endpoint for the DB cluster. For example: `mystack-mydbcluster-1apw1j4phylrk.cg034hpkmmjt.us-east-2.rds.amazonaws.com`
Endpoint *string `pulumi:"endpoint"`
// Indicates the database engine version.
EngineVersion *string `pulumi:"engineVersion"`
// True if mapping of Amazon Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false.
IamAuthEnabled *bool `pulumi:"iamAuthEnabled"`
// The port number on which the DB cluster accepts connections. For example: `8182`.
Port *string `pulumi:"port"`
// Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the BackupRetentionPeriod.
PreferredBackupWindow *string `pulumi:"preferredBackupWindow"`
// Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
PreferredMaintenanceWindow *string `pulumi:"preferredMaintenanceWindow"`
// The reader endpoint for the DB cluster. For example: `mystack-mydbcluster-ro-1apw1j4phylrk.cg034hpkmmjt.us-east-2.rds.amazonaws.com`
ReadEndpoint *string `pulumi:"readEndpoint"`
// Contains the scaling configuration used by the Neptune Serverless Instances within this DB cluster.
ServerlessScalingConfiguration *DbClusterServerlessScalingConfiguration `pulumi:"serverlessScalingConfiguration"`
// The tags assigned to this cluster.
Tags []aws.Tag `pulumi:"tags"`
// Provides a list of VPC security groups that the DB cluster belongs to.
VpcSecurityGroupIds []string `pulumi:"vpcSecurityGroupIds"`
}
func LookupDbClusterOutput(ctx *pulumi.Context, args LookupDbClusterOutputArgs, opts ...pulumi.InvokeOption) LookupDbClusterResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupDbClusterResult, error) {
args := v.(LookupDbClusterArgs)
r, err := LookupDbCluster(ctx, &args, opts...)
var s LookupDbClusterResult
if r != nil {
s = *r
}
return s, err
}).(LookupDbClusterResultOutput)
}
type LookupDbClusterOutputArgs struct {
// The DB cluster identifier. Contains a user-supplied DB cluster identifier. This identifier is the unique key that identifies a DB cluster stored as a lowercase string.
DbClusterIdentifier pulumi.StringInput `pulumi:"dbClusterIdentifier"`
}
func (LookupDbClusterOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDbClusterArgs)(nil)).Elem()
}
type LookupDbClusterResultOutput struct{ *pulumi.OutputState }
func (LookupDbClusterResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDbClusterResult)(nil)).Elem()
}
func (o LookupDbClusterResultOutput) ToLookupDbClusterResultOutput() LookupDbClusterResultOutput {
return o
}
func (o LookupDbClusterResultOutput) ToLookupDbClusterResultOutputWithContext(ctx context.Context) LookupDbClusterResultOutput {
return o
}
// Provides a list of the AWS Identity and Access Management (IAM) roles that are associated with the DB cluster. IAM roles that are associated with a DB cluster grant permission for the DB cluster to access other AWS services on your behalf.
func (o LookupDbClusterResultOutput) AssociatedRoles() DbClusterDbClusterRoleArrayOutput {
return o.ApplyT(func(v LookupDbClusterResult) []DbClusterDbClusterRole { return v.AssociatedRoles }).(DbClusterDbClusterRoleArrayOutput)
}
// Specifies the number of days for which automatic DB snapshots are retained.
func (o LookupDbClusterResultOutput) BackupRetentionPeriod() pulumi.IntPtrOutput {
return o.ApplyT(func(v LookupDbClusterResult) *int { return v.BackupRetentionPeriod }).(pulumi.IntPtrOutput)
}
// The resource id for the DB cluster. For example: `cluster-ABCD1234EFGH5678IJKL90MNOP`. The cluster ID uniquely identifies the cluster and is used in things like IAM authentication policies.
func (o LookupDbClusterResultOutput) ClusterResourceId() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupDbClusterResult) *string { return v.ClusterResourceId }).(pulumi.StringPtrOutput)
}
// A value that indicates whether to copy all tags from the DB cluster to snapshots of the DB cluster. The default behaviour is not to copy them.
func (o LookupDbClusterResultOutput) CopyTagsToSnapshot() pulumi.BoolPtrOutput {
return o.ApplyT(func(v LookupDbClusterResult) *bool { return v.CopyTagsToSnapshot }).(pulumi.BoolPtrOutput)
}
// Provides the name of the DB cluster parameter group.
func (o LookupDbClusterResultOutput) DbClusterParameterGroupName() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupDbClusterResult) *string { return v.DbClusterParameterGroupName }).(pulumi.StringPtrOutput)
}
// The port number on which the DB instances in the DB cluster accept connections.
//
// If not specified, the default port used is `8182`.
//
// Note: `Port` property will soon be deprecated from this resource. Please update existing templates to rename it with new property `DBPort` having same functionalities.
func (o LookupDbClusterResultOutput) DbPort() pulumi.IntPtrOutput {
return o.ApplyT(func(v LookupDbClusterResult) *int { return v.DbPort }).(pulumi.IntPtrOutput)
}
// Indicates whether or not the DB cluster has deletion protection enabled. The database can't be deleted when deletion protection is enabled.
func (o LookupDbClusterResultOutput) DeletionProtection() pulumi.BoolPtrOutput {
return o.ApplyT(func(v LookupDbClusterResult) *bool { return v.DeletionProtection }).(pulumi.BoolPtrOutput)
}
// Specifies a list of log types that are enabled for export to CloudWatch Logs.
func (o LookupDbClusterResultOutput) EnableCloudwatchLogsExports() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupDbClusterResult) []string { return v.EnableCloudwatchLogsExports }).(pulumi.StringArrayOutput)
}
// The connection endpoint for the DB cluster. For example: `mystack-mydbcluster-1apw1j4phylrk.cg034hpkmmjt.us-east-2.rds.amazonaws.com`
func (o LookupDbClusterResultOutput) Endpoint() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupDbClusterResult) *string { return v.Endpoint }).(pulumi.StringPtrOutput)
}
// Indicates the database engine version.
func (o LookupDbClusterResultOutput) EngineVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupDbClusterResult) *string { return v.EngineVersion }).(pulumi.StringPtrOutput)
}
// True if mapping of Amazon Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false.
func (o LookupDbClusterResultOutput) IamAuthEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v LookupDbClusterResult) *bool { return v.IamAuthEnabled }).(pulumi.BoolPtrOutput)
}
// The port number on which the DB cluster accepts connections. For example: `8182`.
func (o LookupDbClusterResultOutput) Port() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupDbClusterResult) *string { return v.Port }).(pulumi.StringPtrOutput)
}
// Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the BackupRetentionPeriod.
func (o LookupDbClusterResultOutput) PreferredBackupWindow() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupDbClusterResult) *string { return v.PreferredBackupWindow }).(pulumi.StringPtrOutput)
}
// Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
func (o LookupDbClusterResultOutput) PreferredMaintenanceWindow() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupDbClusterResult) *string { return v.PreferredMaintenanceWindow }).(pulumi.StringPtrOutput)
}
// The reader endpoint for the DB cluster. For example: `mystack-mydbcluster-ro-1apw1j4phylrk.cg034hpkmmjt.us-east-2.rds.amazonaws.com`
func (o LookupDbClusterResultOutput) ReadEndpoint() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupDbClusterResult) *string { return v.ReadEndpoint }).(pulumi.StringPtrOutput)
}
// Contains the scaling configuration used by the Neptune Serverless Instances within this DB cluster.
func (o LookupDbClusterResultOutput) ServerlessScalingConfiguration() DbClusterServerlessScalingConfigurationPtrOutput {
return o.ApplyT(func(v LookupDbClusterResult) *DbClusterServerlessScalingConfiguration {
return v.ServerlessScalingConfiguration
}).(DbClusterServerlessScalingConfigurationPtrOutput)
}
// The tags assigned to this cluster.
func (o LookupDbClusterResultOutput) Tags() aws.TagArrayOutput {
return o.ApplyT(func(v LookupDbClusterResult) []aws.Tag { return v.Tags }).(aws.TagArrayOutput)
}
// Provides a list of VPC security groups that the DB cluster belongs to.
func (o LookupDbClusterResultOutput) VpcSecurityGroupIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupDbClusterResult) []string { return v.VpcSecurityGroupIds }).(pulumi.StringArrayOutput)
}
func init() {
pulumi.RegisterOutputType(LookupDbClusterResultOutput{})
}