/
getDevEnvironment.go
226 lines (197 loc) · 10.5 KB
/
getDevEnvironment.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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package codecatalyst
import (
"context"
"reflect"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Data source for managing an AWS CodeCatalyst Dev Environment.
//
// ## Example Usage
//
// ### Basic Usage
//
// <!--Start PulumiCodeChooser -->
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codecatalyst"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := codecatalyst.LookupDevEnvironment(ctx, &codecatalyst.LookupDevEnvironmentArgs{
// SpaceName: "myspace",
// ProjectName: "myproject",
// EnvId: exampleAwsCodecatalystDevEnvironment.Id,
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
// <!--End PulumiCodeChooser -->
func LookupDevEnvironment(ctx *pulumi.Context, args *LookupDevEnvironmentArgs, opts ...pulumi.InvokeOption) (*LookupDevEnvironmentResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupDevEnvironmentResult
err := ctx.Invoke("aws:codecatalyst/getDevEnvironment:getDevEnvironment", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getDevEnvironment.
type LookupDevEnvironmentArgs struct {
// The user-specified alias for the Dev Environment.
Alias *string `pulumi:"alias"`
// The system-generated unique ID of the user who created the Dev Environment.
CreatorId *string `pulumi:"creatorId"`
// - (Required) The system-generated unique ID of the Dev Environment for which you want to view information. To retrieve a list of Dev Environment IDs, use [ListDevEnvironments](https://docs.aws.amazon.com/codecatalyst/latest/APIReference/API_ListDevEnvironments.html).
EnvId string `pulumi:"envId"`
// The name of the project in the space.
ProjectName string `pulumi:"projectName"`
// The source repository that contains the branch to clone into the Dev Environment.
Repositories []GetDevEnvironmentRepository `pulumi:"repositories"`
// The name of the space.
SpaceName string `pulumi:"spaceName"`
Tags map[string]string `pulumi:"tags"`
}
// A collection of values returned by getDevEnvironment.
type LookupDevEnvironmentResult struct {
// The user-specified alias for the Dev Environment.
Alias *string `pulumi:"alias"`
// The system-generated unique ID of the user who created the Dev Environment.
CreatorId *string `pulumi:"creatorId"`
EnvId string `pulumi:"envId"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// Information about the integrated development environment (IDE) configured for a Dev Environment.
Ides []GetDevEnvironmentIde `pulumi:"ides"`
// The amount of time the Dev Environment will run without any activity detected before stopping, in minutes. Only whole integers are allowed. Dev Environments consume compute minutes when running.
InactivityTimeoutMinutes int `pulumi:"inactivityTimeoutMinutes"`
// The Amazon EC2 instace type to use for the Dev Environment.
InstanceType string `pulumi:"instanceType"`
// The time when the Dev Environment was last updated, in coordinated universal time (UTC) timestamp format as specified in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339#section-5.6).
LastUpdatedTime string `pulumi:"lastUpdatedTime"`
// Information about the amount of storage allocated to the Dev Environment.
PersistentStorages []GetDevEnvironmentPersistentStorage `pulumi:"persistentStorages"`
ProjectName string `pulumi:"projectName"`
// The source repository that contains the branch to clone into the Dev Environment.
Repositories []GetDevEnvironmentRepository `pulumi:"repositories"`
SpaceName string `pulumi:"spaceName"`
// The current status of the Dev Environment. From: PENDING | RUNNING | STARTING | STOPPING | STOPPED | FAILED | DELETING | DELETED.
Status string `pulumi:"status"`
// The reason for the status.
StatusReason string `pulumi:"statusReason"`
Tags map[string]string `pulumi:"tags"`
}
func LookupDevEnvironmentOutput(ctx *pulumi.Context, args LookupDevEnvironmentOutputArgs, opts ...pulumi.InvokeOption) LookupDevEnvironmentResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupDevEnvironmentResult, error) {
args := v.(LookupDevEnvironmentArgs)
r, err := LookupDevEnvironment(ctx, &args, opts...)
var s LookupDevEnvironmentResult
if r != nil {
s = *r
}
return s, err
}).(LookupDevEnvironmentResultOutput)
}
// A collection of arguments for invoking getDevEnvironment.
type LookupDevEnvironmentOutputArgs struct {
// The user-specified alias for the Dev Environment.
Alias pulumi.StringPtrInput `pulumi:"alias"`
// The system-generated unique ID of the user who created the Dev Environment.
CreatorId pulumi.StringPtrInput `pulumi:"creatorId"`
// - (Required) The system-generated unique ID of the Dev Environment for which you want to view information. To retrieve a list of Dev Environment IDs, use [ListDevEnvironments](https://docs.aws.amazon.com/codecatalyst/latest/APIReference/API_ListDevEnvironments.html).
EnvId pulumi.StringInput `pulumi:"envId"`
// The name of the project in the space.
ProjectName pulumi.StringInput `pulumi:"projectName"`
// The source repository that contains the branch to clone into the Dev Environment.
Repositories GetDevEnvironmentRepositoryArrayInput `pulumi:"repositories"`
// The name of the space.
SpaceName pulumi.StringInput `pulumi:"spaceName"`
Tags pulumi.StringMapInput `pulumi:"tags"`
}
func (LookupDevEnvironmentOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDevEnvironmentArgs)(nil)).Elem()
}
// A collection of values returned by getDevEnvironment.
type LookupDevEnvironmentResultOutput struct{ *pulumi.OutputState }
func (LookupDevEnvironmentResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDevEnvironmentResult)(nil)).Elem()
}
func (o LookupDevEnvironmentResultOutput) ToLookupDevEnvironmentResultOutput() LookupDevEnvironmentResultOutput {
return o
}
func (o LookupDevEnvironmentResultOutput) ToLookupDevEnvironmentResultOutputWithContext(ctx context.Context) LookupDevEnvironmentResultOutput {
return o
}
// The user-specified alias for the Dev Environment.
func (o LookupDevEnvironmentResultOutput) Alias() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupDevEnvironmentResult) *string { return v.Alias }).(pulumi.StringPtrOutput)
}
// The system-generated unique ID of the user who created the Dev Environment.
func (o LookupDevEnvironmentResultOutput) CreatorId() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupDevEnvironmentResult) *string { return v.CreatorId }).(pulumi.StringPtrOutput)
}
func (o LookupDevEnvironmentResultOutput) EnvId() pulumi.StringOutput {
return o.ApplyT(func(v LookupDevEnvironmentResult) string { return v.EnvId }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupDevEnvironmentResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupDevEnvironmentResult) string { return v.Id }).(pulumi.StringOutput)
}
// Information about the integrated development environment (IDE) configured for a Dev Environment.
func (o LookupDevEnvironmentResultOutput) Ides() GetDevEnvironmentIdeArrayOutput {
return o.ApplyT(func(v LookupDevEnvironmentResult) []GetDevEnvironmentIde { return v.Ides }).(GetDevEnvironmentIdeArrayOutput)
}
// The amount of time the Dev Environment will run without any activity detected before stopping, in minutes. Only whole integers are allowed. Dev Environments consume compute minutes when running.
func (o LookupDevEnvironmentResultOutput) InactivityTimeoutMinutes() pulumi.IntOutput {
return o.ApplyT(func(v LookupDevEnvironmentResult) int { return v.InactivityTimeoutMinutes }).(pulumi.IntOutput)
}
// The Amazon EC2 instace type to use for the Dev Environment.
func (o LookupDevEnvironmentResultOutput) InstanceType() pulumi.StringOutput {
return o.ApplyT(func(v LookupDevEnvironmentResult) string { return v.InstanceType }).(pulumi.StringOutput)
}
// The time when the Dev Environment was last updated, in coordinated universal time (UTC) timestamp format as specified in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339#section-5.6).
func (o LookupDevEnvironmentResultOutput) LastUpdatedTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupDevEnvironmentResult) string { return v.LastUpdatedTime }).(pulumi.StringOutput)
}
// Information about the amount of storage allocated to the Dev Environment.
func (o LookupDevEnvironmentResultOutput) PersistentStorages() GetDevEnvironmentPersistentStorageArrayOutput {
return o.ApplyT(func(v LookupDevEnvironmentResult) []GetDevEnvironmentPersistentStorage { return v.PersistentStorages }).(GetDevEnvironmentPersistentStorageArrayOutput)
}
func (o LookupDevEnvironmentResultOutput) ProjectName() pulumi.StringOutput {
return o.ApplyT(func(v LookupDevEnvironmentResult) string { return v.ProjectName }).(pulumi.StringOutput)
}
// The source repository that contains the branch to clone into the Dev Environment.
func (o LookupDevEnvironmentResultOutput) Repositories() GetDevEnvironmentRepositoryArrayOutput {
return o.ApplyT(func(v LookupDevEnvironmentResult) []GetDevEnvironmentRepository { return v.Repositories }).(GetDevEnvironmentRepositoryArrayOutput)
}
func (o LookupDevEnvironmentResultOutput) SpaceName() pulumi.StringOutput {
return o.ApplyT(func(v LookupDevEnvironmentResult) string { return v.SpaceName }).(pulumi.StringOutput)
}
// The current status of the Dev Environment. From: PENDING | RUNNING | STARTING | STOPPING | STOPPED | FAILED | DELETING | DELETED.
func (o LookupDevEnvironmentResultOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v LookupDevEnvironmentResult) string { return v.Status }).(pulumi.StringOutput)
}
// The reason for the status.
func (o LookupDevEnvironmentResultOutput) StatusReason() pulumi.StringOutput {
return o.ApplyT(func(v LookupDevEnvironmentResult) string { return v.StatusReason }).(pulumi.StringOutput)
}
func (o LookupDevEnvironmentResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupDevEnvironmentResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(LookupDevEnvironmentResultOutput{})
}