github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/codecatalyst/getDevEnvironment.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package codecatalyst 5 6 import ( 7 "context" 8 "reflect" 9 10 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // Data source for managing an AWS CodeCatalyst Dev Environment. 15 // 16 // ## Example Usage 17 // 18 // ### Basic Usage 19 // 20 // <!--Start PulumiCodeChooser --> 21 // ```go 22 // package main 23 // 24 // import ( 25 // 26 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codecatalyst" 27 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 28 // 29 // ) 30 // 31 // func main() { 32 // pulumi.Run(func(ctx *pulumi.Context) error { 33 // _, err := codecatalyst.LookupDevEnvironment(ctx, &codecatalyst.LookupDevEnvironmentArgs{ 34 // SpaceName: "myspace", 35 // ProjectName: "myproject", 36 // EnvId: exampleAwsCodecatalystDevEnvironment.Id, 37 // }, nil) 38 // if err != nil { 39 // return err 40 // } 41 // return nil 42 // }) 43 // } 44 // 45 // ``` 46 // <!--End PulumiCodeChooser --> 47 func LookupDevEnvironment(ctx *pulumi.Context, args *LookupDevEnvironmentArgs, opts ...pulumi.InvokeOption) (*LookupDevEnvironmentResult, error) { 48 opts = internal.PkgInvokeDefaultOpts(opts) 49 var rv LookupDevEnvironmentResult 50 err := ctx.Invoke("aws:codecatalyst/getDevEnvironment:getDevEnvironment", args, &rv, opts...) 51 if err != nil { 52 return nil, err 53 } 54 return &rv, nil 55 } 56 57 // A collection of arguments for invoking getDevEnvironment. 58 type LookupDevEnvironmentArgs struct { 59 // The user-specified alias for the Dev Environment. 60 Alias *string `pulumi:"alias"` 61 // The system-generated unique ID of the user who created the Dev Environment. 62 CreatorId *string `pulumi:"creatorId"` 63 // - (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). 64 EnvId string `pulumi:"envId"` 65 // The name of the project in the space. 66 ProjectName string `pulumi:"projectName"` 67 // The source repository that contains the branch to clone into the Dev Environment. 68 Repositories []GetDevEnvironmentRepository `pulumi:"repositories"` 69 // The name of the space. 70 SpaceName string `pulumi:"spaceName"` 71 Tags map[string]string `pulumi:"tags"` 72 } 73 74 // A collection of values returned by getDevEnvironment. 75 type LookupDevEnvironmentResult struct { 76 // The user-specified alias for the Dev Environment. 77 Alias *string `pulumi:"alias"` 78 // The system-generated unique ID of the user who created the Dev Environment. 79 CreatorId *string `pulumi:"creatorId"` 80 EnvId string `pulumi:"envId"` 81 // The provider-assigned unique ID for this managed resource. 82 Id string `pulumi:"id"` 83 // Information about the integrated development environment (IDE) configured for a Dev Environment. 84 Ides []GetDevEnvironmentIde `pulumi:"ides"` 85 // 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. 86 InactivityTimeoutMinutes int `pulumi:"inactivityTimeoutMinutes"` 87 // The Amazon EC2 instace type to use for the Dev Environment. 88 InstanceType string `pulumi:"instanceType"` 89 // 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). 90 LastUpdatedTime string `pulumi:"lastUpdatedTime"` 91 // Information about the amount of storage allocated to the Dev Environment. 92 PersistentStorages []GetDevEnvironmentPersistentStorage `pulumi:"persistentStorages"` 93 ProjectName string `pulumi:"projectName"` 94 // The source repository that contains the branch to clone into the Dev Environment. 95 Repositories []GetDevEnvironmentRepository `pulumi:"repositories"` 96 SpaceName string `pulumi:"spaceName"` 97 // The current status of the Dev Environment. From: PENDING | RUNNING | STARTING | STOPPING | STOPPED | FAILED | DELETING | DELETED. 98 Status string `pulumi:"status"` 99 // The reason for the status. 100 StatusReason string `pulumi:"statusReason"` 101 Tags map[string]string `pulumi:"tags"` 102 } 103 104 func LookupDevEnvironmentOutput(ctx *pulumi.Context, args LookupDevEnvironmentOutputArgs, opts ...pulumi.InvokeOption) LookupDevEnvironmentResultOutput { 105 return pulumi.ToOutputWithContext(context.Background(), args). 106 ApplyT(func(v interface{}) (LookupDevEnvironmentResult, error) { 107 args := v.(LookupDevEnvironmentArgs) 108 r, err := LookupDevEnvironment(ctx, &args, opts...) 109 var s LookupDevEnvironmentResult 110 if r != nil { 111 s = *r 112 } 113 return s, err 114 }).(LookupDevEnvironmentResultOutput) 115 } 116 117 // A collection of arguments for invoking getDevEnvironment. 118 type LookupDevEnvironmentOutputArgs struct { 119 // The user-specified alias for the Dev Environment. 120 Alias pulumi.StringPtrInput `pulumi:"alias"` 121 // The system-generated unique ID of the user who created the Dev Environment. 122 CreatorId pulumi.StringPtrInput `pulumi:"creatorId"` 123 // - (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). 124 EnvId pulumi.StringInput `pulumi:"envId"` 125 // The name of the project in the space. 126 ProjectName pulumi.StringInput `pulumi:"projectName"` 127 // The source repository that contains the branch to clone into the Dev Environment. 128 Repositories GetDevEnvironmentRepositoryArrayInput `pulumi:"repositories"` 129 // The name of the space. 130 SpaceName pulumi.StringInput `pulumi:"spaceName"` 131 Tags pulumi.StringMapInput `pulumi:"tags"` 132 } 133 134 func (LookupDevEnvironmentOutputArgs) ElementType() reflect.Type { 135 return reflect.TypeOf((*LookupDevEnvironmentArgs)(nil)).Elem() 136 } 137 138 // A collection of values returned by getDevEnvironment. 139 type LookupDevEnvironmentResultOutput struct{ *pulumi.OutputState } 140 141 func (LookupDevEnvironmentResultOutput) ElementType() reflect.Type { 142 return reflect.TypeOf((*LookupDevEnvironmentResult)(nil)).Elem() 143 } 144 145 func (o LookupDevEnvironmentResultOutput) ToLookupDevEnvironmentResultOutput() LookupDevEnvironmentResultOutput { 146 return o 147 } 148 149 func (o LookupDevEnvironmentResultOutput) ToLookupDevEnvironmentResultOutputWithContext(ctx context.Context) LookupDevEnvironmentResultOutput { 150 return o 151 } 152 153 // The user-specified alias for the Dev Environment. 154 func (o LookupDevEnvironmentResultOutput) Alias() pulumi.StringPtrOutput { 155 return o.ApplyT(func(v LookupDevEnvironmentResult) *string { return v.Alias }).(pulumi.StringPtrOutput) 156 } 157 158 // The system-generated unique ID of the user who created the Dev Environment. 159 func (o LookupDevEnvironmentResultOutput) CreatorId() pulumi.StringPtrOutput { 160 return o.ApplyT(func(v LookupDevEnvironmentResult) *string { return v.CreatorId }).(pulumi.StringPtrOutput) 161 } 162 163 func (o LookupDevEnvironmentResultOutput) EnvId() pulumi.StringOutput { 164 return o.ApplyT(func(v LookupDevEnvironmentResult) string { return v.EnvId }).(pulumi.StringOutput) 165 } 166 167 // The provider-assigned unique ID for this managed resource. 168 func (o LookupDevEnvironmentResultOutput) Id() pulumi.StringOutput { 169 return o.ApplyT(func(v LookupDevEnvironmentResult) string { return v.Id }).(pulumi.StringOutput) 170 } 171 172 // Information about the integrated development environment (IDE) configured for a Dev Environment. 173 func (o LookupDevEnvironmentResultOutput) Ides() GetDevEnvironmentIdeArrayOutput { 174 return o.ApplyT(func(v LookupDevEnvironmentResult) []GetDevEnvironmentIde { return v.Ides }).(GetDevEnvironmentIdeArrayOutput) 175 } 176 177 // 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. 178 func (o LookupDevEnvironmentResultOutput) InactivityTimeoutMinutes() pulumi.IntOutput { 179 return o.ApplyT(func(v LookupDevEnvironmentResult) int { return v.InactivityTimeoutMinutes }).(pulumi.IntOutput) 180 } 181 182 // The Amazon EC2 instace type to use for the Dev Environment. 183 func (o LookupDevEnvironmentResultOutput) InstanceType() pulumi.StringOutput { 184 return o.ApplyT(func(v LookupDevEnvironmentResult) string { return v.InstanceType }).(pulumi.StringOutput) 185 } 186 187 // 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). 188 func (o LookupDevEnvironmentResultOutput) LastUpdatedTime() pulumi.StringOutput { 189 return o.ApplyT(func(v LookupDevEnvironmentResult) string { return v.LastUpdatedTime }).(pulumi.StringOutput) 190 } 191 192 // Information about the amount of storage allocated to the Dev Environment. 193 func (o LookupDevEnvironmentResultOutput) PersistentStorages() GetDevEnvironmentPersistentStorageArrayOutput { 194 return o.ApplyT(func(v LookupDevEnvironmentResult) []GetDevEnvironmentPersistentStorage { return v.PersistentStorages }).(GetDevEnvironmentPersistentStorageArrayOutput) 195 } 196 197 func (o LookupDevEnvironmentResultOutput) ProjectName() pulumi.StringOutput { 198 return o.ApplyT(func(v LookupDevEnvironmentResult) string { return v.ProjectName }).(pulumi.StringOutput) 199 } 200 201 // The source repository that contains the branch to clone into the Dev Environment. 202 func (o LookupDevEnvironmentResultOutput) Repositories() GetDevEnvironmentRepositoryArrayOutput { 203 return o.ApplyT(func(v LookupDevEnvironmentResult) []GetDevEnvironmentRepository { return v.Repositories }).(GetDevEnvironmentRepositoryArrayOutput) 204 } 205 206 func (o LookupDevEnvironmentResultOutput) SpaceName() pulumi.StringOutput { 207 return o.ApplyT(func(v LookupDevEnvironmentResult) string { return v.SpaceName }).(pulumi.StringOutput) 208 } 209 210 // The current status of the Dev Environment. From: PENDING | RUNNING | STARTING | STOPPING | STOPPED | FAILED | DELETING | DELETED. 211 func (o LookupDevEnvironmentResultOutput) Status() pulumi.StringOutput { 212 return o.ApplyT(func(v LookupDevEnvironmentResult) string { return v.Status }).(pulumi.StringOutput) 213 } 214 215 // The reason for the status. 216 func (o LookupDevEnvironmentResultOutput) StatusReason() pulumi.StringOutput { 217 return o.ApplyT(func(v LookupDevEnvironmentResult) string { return v.StatusReason }).(pulumi.StringOutput) 218 } 219 220 func (o LookupDevEnvironmentResultOutput) Tags() pulumi.StringMapOutput { 221 return o.ApplyT(func(v LookupDevEnvironmentResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 222 } 223 224 func init() { 225 pulumi.RegisterOutputType(LookupDevEnvironmentResultOutput{}) 226 }