github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ec2/getLaunchConfiguration.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 ec2 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 // Provides information about a Launch Configuration. 15 // 16 // ## Example Usage 17 // 18 // <!--Start PulumiCodeChooser --> 19 // ```go 20 // package main 21 // 22 // import ( 23 // 24 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 25 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 26 // 27 // ) 28 // 29 // func main() { 30 // pulumi.Run(func(ctx *pulumi.Context) error { 31 // _, err := ec2.LookupLaunchConfiguration(ctx, &ec2.LookupLaunchConfigurationArgs{ 32 // Name: "test-launch-config", 33 // }, nil) 34 // if err != nil { 35 // return err 36 // } 37 // return nil 38 // }) 39 // } 40 // 41 // ``` 42 // <!--End PulumiCodeChooser --> 43 func LookupLaunchConfiguration(ctx *pulumi.Context, args *LookupLaunchConfigurationArgs, opts ...pulumi.InvokeOption) (*LookupLaunchConfigurationResult, error) { 44 opts = internal.PkgInvokeDefaultOpts(opts) 45 var rv LookupLaunchConfigurationResult 46 err := ctx.Invoke("aws:ec2/getLaunchConfiguration:getLaunchConfiguration", args, &rv, opts...) 47 if err != nil { 48 return nil, err 49 } 50 return &rv, nil 51 } 52 53 // A collection of arguments for invoking getLaunchConfiguration. 54 type LookupLaunchConfigurationArgs struct { 55 // Name of the launch configuration. 56 Name string `pulumi:"name"` 57 } 58 59 // A collection of values returned by getLaunchConfiguration. 60 type LookupLaunchConfigurationResult struct { 61 // Amazon Resource Name of the launch configuration. 62 Arn string `pulumi:"arn"` 63 // Whether a Public IP address is associated with the instance. 64 AssociatePublicIpAddress bool `pulumi:"associatePublicIpAddress"` 65 // EBS Block Devices attached to the instance. 66 EbsBlockDevices []GetLaunchConfigurationEbsBlockDevice `pulumi:"ebsBlockDevices"` 67 // Whether the launched EC2 instance will be EBS-optimized. 68 EbsOptimized bool `pulumi:"ebsOptimized"` 69 // Whether Detailed Monitoring is Enabled. 70 EnableMonitoring bool `pulumi:"enableMonitoring"` 71 // The Ephemeral volumes on the instance. 72 EphemeralBlockDevices []GetLaunchConfigurationEphemeralBlockDevice `pulumi:"ephemeralBlockDevices"` 73 // The IAM Instance Profile to associate with launched instances. 74 IamInstanceProfile string `pulumi:"iamInstanceProfile"` 75 // The provider-assigned unique ID for this managed resource. 76 Id string `pulumi:"id"` 77 // EC2 Image ID of the instance. 78 ImageId string `pulumi:"imageId"` 79 // Instance Type of the instance to launch. 80 InstanceType string `pulumi:"instanceType"` 81 // Key Name that should be used for the instance. 82 KeyName string `pulumi:"keyName"` 83 // Metadata options for the instance. 84 MetadataOptions []GetLaunchConfigurationMetadataOption `pulumi:"metadataOptions"` 85 // Name of the launch configuration. 86 Name string `pulumi:"name"` 87 // Tenancy of the instance. 88 PlacementTenancy string `pulumi:"placementTenancy"` 89 // Root Block Device of the instance. 90 RootBlockDevices []GetLaunchConfigurationRootBlockDevice `pulumi:"rootBlockDevices"` 91 // List of associated Security Group IDS. 92 SecurityGroups []string `pulumi:"securityGroups"` 93 // Price to use for reserving Spot instances. 94 SpotPrice string `pulumi:"spotPrice"` 95 // User Data of the instance. 96 UserData string `pulumi:"userData"` 97 } 98 99 func LookupLaunchConfigurationOutput(ctx *pulumi.Context, args LookupLaunchConfigurationOutputArgs, opts ...pulumi.InvokeOption) LookupLaunchConfigurationResultOutput { 100 return pulumi.ToOutputWithContext(context.Background(), args). 101 ApplyT(func(v interface{}) (LookupLaunchConfigurationResult, error) { 102 args := v.(LookupLaunchConfigurationArgs) 103 r, err := LookupLaunchConfiguration(ctx, &args, opts...) 104 var s LookupLaunchConfigurationResult 105 if r != nil { 106 s = *r 107 } 108 return s, err 109 }).(LookupLaunchConfigurationResultOutput) 110 } 111 112 // A collection of arguments for invoking getLaunchConfiguration. 113 type LookupLaunchConfigurationOutputArgs struct { 114 // Name of the launch configuration. 115 Name pulumi.StringInput `pulumi:"name"` 116 } 117 118 func (LookupLaunchConfigurationOutputArgs) ElementType() reflect.Type { 119 return reflect.TypeOf((*LookupLaunchConfigurationArgs)(nil)).Elem() 120 } 121 122 // A collection of values returned by getLaunchConfiguration. 123 type LookupLaunchConfigurationResultOutput struct{ *pulumi.OutputState } 124 125 func (LookupLaunchConfigurationResultOutput) ElementType() reflect.Type { 126 return reflect.TypeOf((*LookupLaunchConfigurationResult)(nil)).Elem() 127 } 128 129 func (o LookupLaunchConfigurationResultOutput) ToLookupLaunchConfigurationResultOutput() LookupLaunchConfigurationResultOutput { 130 return o 131 } 132 133 func (o LookupLaunchConfigurationResultOutput) ToLookupLaunchConfigurationResultOutputWithContext(ctx context.Context) LookupLaunchConfigurationResultOutput { 134 return o 135 } 136 137 // Amazon Resource Name of the launch configuration. 138 func (o LookupLaunchConfigurationResultOutput) Arn() pulumi.StringOutput { 139 return o.ApplyT(func(v LookupLaunchConfigurationResult) string { return v.Arn }).(pulumi.StringOutput) 140 } 141 142 // Whether a Public IP address is associated with the instance. 143 func (o LookupLaunchConfigurationResultOutput) AssociatePublicIpAddress() pulumi.BoolOutput { 144 return o.ApplyT(func(v LookupLaunchConfigurationResult) bool { return v.AssociatePublicIpAddress }).(pulumi.BoolOutput) 145 } 146 147 // EBS Block Devices attached to the instance. 148 func (o LookupLaunchConfigurationResultOutput) EbsBlockDevices() GetLaunchConfigurationEbsBlockDeviceArrayOutput { 149 return o.ApplyT(func(v LookupLaunchConfigurationResult) []GetLaunchConfigurationEbsBlockDevice { 150 return v.EbsBlockDevices 151 }).(GetLaunchConfigurationEbsBlockDeviceArrayOutput) 152 } 153 154 // Whether the launched EC2 instance will be EBS-optimized. 155 func (o LookupLaunchConfigurationResultOutput) EbsOptimized() pulumi.BoolOutput { 156 return o.ApplyT(func(v LookupLaunchConfigurationResult) bool { return v.EbsOptimized }).(pulumi.BoolOutput) 157 } 158 159 // Whether Detailed Monitoring is Enabled. 160 func (o LookupLaunchConfigurationResultOutput) EnableMonitoring() pulumi.BoolOutput { 161 return o.ApplyT(func(v LookupLaunchConfigurationResult) bool { return v.EnableMonitoring }).(pulumi.BoolOutput) 162 } 163 164 // The Ephemeral volumes on the instance. 165 func (o LookupLaunchConfigurationResultOutput) EphemeralBlockDevices() GetLaunchConfigurationEphemeralBlockDeviceArrayOutput { 166 return o.ApplyT(func(v LookupLaunchConfigurationResult) []GetLaunchConfigurationEphemeralBlockDevice { 167 return v.EphemeralBlockDevices 168 }).(GetLaunchConfigurationEphemeralBlockDeviceArrayOutput) 169 } 170 171 // The IAM Instance Profile to associate with launched instances. 172 func (o LookupLaunchConfigurationResultOutput) IamInstanceProfile() pulumi.StringOutput { 173 return o.ApplyT(func(v LookupLaunchConfigurationResult) string { return v.IamInstanceProfile }).(pulumi.StringOutput) 174 } 175 176 // The provider-assigned unique ID for this managed resource. 177 func (o LookupLaunchConfigurationResultOutput) Id() pulumi.StringOutput { 178 return o.ApplyT(func(v LookupLaunchConfigurationResult) string { return v.Id }).(pulumi.StringOutput) 179 } 180 181 // EC2 Image ID of the instance. 182 func (o LookupLaunchConfigurationResultOutput) ImageId() pulumi.StringOutput { 183 return o.ApplyT(func(v LookupLaunchConfigurationResult) string { return v.ImageId }).(pulumi.StringOutput) 184 } 185 186 // Instance Type of the instance to launch. 187 func (o LookupLaunchConfigurationResultOutput) InstanceType() pulumi.StringOutput { 188 return o.ApplyT(func(v LookupLaunchConfigurationResult) string { return v.InstanceType }).(pulumi.StringOutput) 189 } 190 191 // Key Name that should be used for the instance. 192 func (o LookupLaunchConfigurationResultOutput) KeyName() pulumi.StringOutput { 193 return o.ApplyT(func(v LookupLaunchConfigurationResult) string { return v.KeyName }).(pulumi.StringOutput) 194 } 195 196 // Metadata options for the instance. 197 func (o LookupLaunchConfigurationResultOutput) MetadataOptions() GetLaunchConfigurationMetadataOptionArrayOutput { 198 return o.ApplyT(func(v LookupLaunchConfigurationResult) []GetLaunchConfigurationMetadataOption { 199 return v.MetadataOptions 200 }).(GetLaunchConfigurationMetadataOptionArrayOutput) 201 } 202 203 // Name of the launch configuration. 204 func (o LookupLaunchConfigurationResultOutput) Name() pulumi.StringOutput { 205 return o.ApplyT(func(v LookupLaunchConfigurationResult) string { return v.Name }).(pulumi.StringOutput) 206 } 207 208 // Tenancy of the instance. 209 func (o LookupLaunchConfigurationResultOutput) PlacementTenancy() pulumi.StringOutput { 210 return o.ApplyT(func(v LookupLaunchConfigurationResult) string { return v.PlacementTenancy }).(pulumi.StringOutput) 211 } 212 213 // Root Block Device of the instance. 214 func (o LookupLaunchConfigurationResultOutput) RootBlockDevices() GetLaunchConfigurationRootBlockDeviceArrayOutput { 215 return o.ApplyT(func(v LookupLaunchConfigurationResult) []GetLaunchConfigurationRootBlockDevice { 216 return v.RootBlockDevices 217 }).(GetLaunchConfigurationRootBlockDeviceArrayOutput) 218 } 219 220 // List of associated Security Group IDS. 221 func (o LookupLaunchConfigurationResultOutput) SecurityGroups() pulumi.StringArrayOutput { 222 return o.ApplyT(func(v LookupLaunchConfigurationResult) []string { return v.SecurityGroups }).(pulumi.StringArrayOutput) 223 } 224 225 // Price to use for reserving Spot instances. 226 func (o LookupLaunchConfigurationResultOutput) SpotPrice() pulumi.StringOutput { 227 return o.ApplyT(func(v LookupLaunchConfigurationResult) string { return v.SpotPrice }).(pulumi.StringOutput) 228 } 229 230 // User Data of the instance. 231 func (o LookupLaunchConfigurationResultOutput) UserData() pulumi.StringOutput { 232 return o.ApplyT(func(v LookupLaunchConfigurationResult) string { return v.UserData }).(pulumi.StringOutput) 233 } 234 235 func init() { 236 pulumi.RegisterOutputType(LookupLaunchConfigurationResultOutput{}) 237 }