github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/imagebuilder/getInfrastructureConfiguration.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 imagebuilder
     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 details about an Image Builder Infrastructure 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/imagebuilder"
    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 := imagebuilder.LookupInfrastructureConfiguration(ctx, &imagebuilder.LookupInfrastructureConfigurationArgs{
    32  //				Arn: "arn:aws:imagebuilder:us-west-2:aws:infrastructure-configuration/example",
    33  //			}, nil)
    34  //			if err != nil {
    35  //				return err
    36  //			}
    37  //			return nil
    38  //		})
    39  //	}
    40  //
    41  // ```
    42  // <!--End PulumiCodeChooser -->
    43  func LookupInfrastructureConfiguration(ctx *pulumi.Context, args *LookupInfrastructureConfigurationArgs, opts ...pulumi.InvokeOption) (*LookupInfrastructureConfigurationResult, error) {
    44  	opts = internal.PkgInvokeDefaultOpts(opts)
    45  	var rv LookupInfrastructureConfigurationResult
    46  	err := ctx.Invoke("aws:imagebuilder/getInfrastructureConfiguration:getInfrastructureConfiguration", 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 getInfrastructureConfiguration.
    54  type LookupInfrastructureConfigurationArgs struct {
    55  	// ARN of the infrastructure configuration.
    56  	Arn string `pulumi:"arn"`
    57  	// Key-value map of resource tags for the infrastructure created by the infrastructure configuration.
    58  	ResourceTags map[string]string `pulumi:"resourceTags"`
    59  	// Key-value map of resource tags for the infrastructure configuration.
    60  	Tags map[string]string `pulumi:"tags"`
    61  }
    62  
    63  // A collection of values returned by getInfrastructureConfiguration.
    64  type LookupInfrastructureConfigurationResult struct {
    65  	Arn string `pulumi:"arn"`
    66  	// Date the infrastructure configuration was updated.
    67  	DateCreated string `pulumi:"dateCreated"`
    68  	DateUpdated string `pulumi:"dateUpdated"`
    69  	// Description of the infrastructure configuration.
    70  	Description string `pulumi:"description"`
    71  	// The provider-assigned unique ID for this managed resource.
    72  	Id string `pulumi:"id"`
    73  	// Nested list of instance metadata options for the HTTP requests that pipeline builds use to launch EC2 build and test instances.
    74  	InstanceMetadataOptions []GetInfrastructureConfigurationInstanceMetadataOption `pulumi:"instanceMetadataOptions"`
    75  	// Name of the IAM Instance Profile associated with the configuration.
    76  	InstanceProfileName string `pulumi:"instanceProfileName"`
    77  	// Set of EC2 Instance Types associated with the configuration.
    78  	InstanceTypes []string `pulumi:"instanceTypes"`
    79  	// Name of the EC2 Key Pair associated with the configuration.
    80  	KeyPair string `pulumi:"keyPair"`
    81  	// Nested list of logging settings.
    82  	Loggings []GetInfrastructureConfigurationLogging `pulumi:"loggings"`
    83  	// Name of the infrastructure configuration.
    84  	Name string `pulumi:"name"`
    85  	// Key-value map of resource tags for the infrastructure created by the infrastructure configuration.
    86  	ResourceTags map[string]string `pulumi:"resourceTags"`
    87  	// Set of EC2 Security Group identifiers associated with the configuration.
    88  	SecurityGroupIds []string `pulumi:"securityGroupIds"`
    89  	// ARN of the SNS Topic associated with the configuration.
    90  	SnsTopicArn string `pulumi:"snsTopicArn"`
    91  	// Identifier of the EC2 Subnet associated with the configuration.
    92  	SubnetId string `pulumi:"subnetId"`
    93  	// Key-value map of resource tags for the infrastructure configuration.
    94  	Tags map[string]string `pulumi:"tags"`
    95  	// Whether instances are terminated on failure.
    96  	TerminateInstanceOnFailure bool `pulumi:"terminateInstanceOnFailure"`
    97  }
    98  
    99  func LookupInfrastructureConfigurationOutput(ctx *pulumi.Context, args LookupInfrastructureConfigurationOutputArgs, opts ...pulumi.InvokeOption) LookupInfrastructureConfigurationResultOutput {
   100  	return pulumi.ToOutputWithContext(context.Background(), args).
   101  		ApplyT(func(v interface{}) (LookupInfrastructureConfigurationResult, error) {
   102  			args := v.(LookupInfrastructureConfigurationArgs)
   103  			r, err := LookupInfrastructureConfiguration(ctx, &args, opts...)
   104  			var s LookupInfrastructureConfigurationResult
   105  			if r != nil {
   106  				s = *r
   107  			}
   108  			return s, err
   109  		}).(LookupInfrastructureConfigurationResultOutput)
   110  }
   111  
   112  // A collection of arguments for invoking getInfrastructureConfiguration.
   113  type LookupInfrastructureConfigurationOutputArgs struct {
   114  	// ARN of the infrastructure configuration.
   115  	Arn pulumi.StringInput `pulumi:"arn"`
   116  	// Key-value map of resource tags for the infrastructure created by the infrastructure configuration.
   117  	ResourceTags pulumi.StringMapInput `pulumi:"resourceTags"`
   118  	// Key-value map of resource tags for the infrastructure configuration.
   119  	Tags pulumi.StringMapInput `pulumi:"tags"`
   120  }
   121  
   122  func (LookupInfrastructureConfigurationOutputArgs) ElementType() reflect.Type {
   123  	return reflect.TypeOf((*LookupInfrastructureConfigurationArgs)(nil)).Elem()
   124  }
   125  
   126  // A collection of values returned by getInfrastructureConfiguration.
   127  type LookupInfrastructureConfigurationResultOutput struct{ *pulumi.OutputState }
   128  
   129  func (LookupInfrastructureConfigurationResultOutput) ElementType() reflect.Type {
   130  	return reflect.TypeOf((*LookupInfrastructureConfigurationResult)(nil)).Elem()
   131  }
   132  
   133  func (o LookupInfrastructureConfigurationResultOutput) ToLookupInfrastructureConfigurationResultOutput() LookupInfrastructureConfigurationResultOutput {
   134  	return o
   135  }
   136  
   137  func (o LookupInfrastructureConfigurationResultOutput) ToLookupInfrastructureConfigurationResultOutputWithContext(ctx context.Context) LookupInfrastructureConfigurationResultOutput {
   138  	return o
   139  }
   140  
   141  func (o LookupInfrastructureConfigurationResultOutput) Arn() pulumi.StringOutput {
   142  	return o.ApplyT(func(v LookupInfrastructureConfigurationResult) string { return v.Arn }).(pulumi.StringOutput)
   143  }
   144  
   145  // Date the infrastructure configuration was updated.
   146  func (o LookupInfrastructureConfigurationResultOutput) DateCreated() pulumi.StringOutput {
   147  	return o.ApplyT(func(v LookupInfrastructureConfigurationResult) string { return v.DateCreated }).(pulumi.StringOutput)
   148  }
   149  
   150  func (o LookupInfrastructureConfigurationResultOutput) DateUpdated() pulumi.StringOutput {
   151  	return o.ApplyT(func(v LookupInfrastructureConfigurationResult) string { return v.DateUpdated }).(pulumi.StringOutput)
   152  }
   153  
   154  // Description of the infrastructure configuration.
   155  func (o LookupInfrastructureConfigurationResultOutput) Description() pulumi.StringOutput {
   156  	return o.ApplyT(func(v LookupInfrastructureConfigurationResult) string { return v.Description }).(pulumi.StringOutput)
   157  }
   158  
   159  // The provider-assigned unique ID for this managed resource.
   160  func (o LookupInfrastructureConfigurationResultOutput) Id() pulumi.StringOutput {
   161  	return o.ApplyT(func(v LookupInfrastructureConfigurationResult) string { return v.Id }).(pulumi.StringOutput)
   162  }
   163  
   164  // Nested list of instance metadata options for the HTTP requests that pipeline builds use to launch EC2 build and test instances.
   165  func (o LookupInfrastructureConfigurationResultOutput) InstanceMetadataOptions() GetInfrastructureConfigurationInstanceMetadataOptionArrayOutput {
   166  	return o.ApplyT(func(v LookupInfrastructureConfigurationResult) []GetInfrastructureConfigurationInstanceMetadataOption {
   167  		return v.InstanceMetadataOptions
   168  	}).(GetInfrastructureConfigurationInstanceMetadataOptionArrayOutput)
   169  }
   170  
   171  // Name of the IAM Instance Profile associated with the configuration.
   172  func (o LookupInfrastructureConfigurationResultOutput) InstanceProfileName() pulumi.StringOutput {
   173  	return o.ApplyT(func(v LookupInfrastructureConfigurationResult) string { return v.InstanceProfileName }).(pulumi.StringOutput)
   174  }
   175  
   176  // Set of EC2 Instance Types associated with the configuration.
   177  func (o LookupInfrastructureConfigurationResultOutput) InstanceTypes() pulumi.StringArrayOutput {
   178  	return o.ApplyT(func(v LookupInfrastructureConfigurationResult) []string { return v.InstanceTypes }).(pulumi.StringArrayOutput)
   179  }
   180  
   181  // Name of the EC2 Key Pair associated with the configuration.
   182  func (o LookupInfrastructureConfigurationResultOutput) KeyPair() pulumi.StringOutput {
   183  	return o.ApplyT(func(v LookupInfrastructureConfigurationResult) string { return v.KeyPair }).(pulumi.StringOutput)
   184  }
   185  
   186  // Nested list of logging settings.
   187  func (o LookupInfrastructureConfigurationResultOutput) Loggings() GetInfrastructureConfigurationLoggingArrayOutput {
   188  	return o.ApplyT(func(v LookupInfrastructureConfigurationResult) []GetInfrastructureConfigurationLogging {
   189  		return v.Loggings
   190  	}).(GetInfrastructureConfigurationLoggingArrayOutput)
   191  }
   192  
   193  // Name of the infrastructure configuration.
   194  func (o LookupInfrastructureConfigurationResultOutput) Name() pulumi.StringOutput {
   195  	return o.ApplyT(func(v LookupInfrastructureConfigurationResult) string { return v.Name }).(pulumi.StringOutput)
   196  }
   197  
   198  // Key-value map of resource tags for the infrastructure created by the infrastructure configuration.
   199  func (o LookupInfrastructureConfigurationResultOutput) ResourceTags() pulumi.StringMapOutput {
   200  	return o.ApplyT(func(v LookupInfrastructureConfigurationResult) map[string]string { return v.ResourceTags }).(pulumi.StringMapOutput)
   201  }
   202  
   203  // Set of EC2 Security Group identifiers associated with the configuration.
   204  func (o LookupInfrastructureConfigurationResultOutput) SecurityGroupIds() pulumi.StringArrayOutput {
   205  	return o.ApplyT(func(v LookupInfrastructureConfigurationResult) []string { return v.SecurityGroupIds }).(pulumi.StringArrayOutput)
   206  }
   207  
   208  // ARN of the SNS Topic associated with the configuration.
   209  func (o LookupInfrastructureConfigurationResultOutput) SnsTopicArn() pulumi.StringOutput {
   210  	return o.ApplyT(func(v LookupInfrastructureConfigurationResult) string { return v.SnsTopicArn }).(pulumi.StringOutput)
   211  }
   212  
   213  // Identifier of the EC2 Subnet associated with the configuration.
   214  func (o LookupInfrastructureConfigurationResultOutput) SubnetId() pulumi.StringOutput {
   215  	return o.ApplyT(func(v LookupInfrastructureConfigurationResult) string { return v.SubnetId }).(pulumi.StringOutput)
   216  }
   217  
   218  // Key-value map of resource tags for the infrastructure configuration.
   219  func (o LookupInfrastructureConfigurationResultOutput) Tags() pulumi.StringMapOutput {
   220  	return o.ApplyT(func(v LookupInfrastructureConfigurationResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
   221  }
   222  
   223  // Whether instances are terminated on failure.
   224  func (o LookupInfrastructureConfigurationResultOutput) TerminateInstanceOnFailure() pulumi.BoolOutput {
   225  	return o.ApplyT(func(v LookupInfrastructureConfigurationResult) bool { return v.TerminateInstanceOnFailure }).(pulumi.BoolOutput)
   226  }
   227  
   228  func init() {
   229  	pulumi.RegisterOutputType(LookupInfrastructureConfigurationResultOutput{})
   230  }