github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/imagebuilder/getImagePipeline.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 Image Pipeline.
    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.LookupImagePipeline(ctx, &imagebuilder.LookupImagePipelineArgs{
    32  //				Arn: "arn:aws:imagebuilder:us-west-2:aws:image-pipeline/example",
    33  //			}, nil)
    34  //			if err != nil {
    35  //				return err
    36  //			}
    37  //			return nil
    38  //		})
    39  //	}
    40  //
    41  // ```
    42  // <!--End PulumiCodeChooser -->
    43  func LookupImagePipeline(ctx *pulumi.Context, args *LookupImagePipelineArgs, opts ...pulumi.InvokeOption) (*LookupImagePipelineResult, error) {
    44  	opts = internal.PkgInvokeDefaultOpts(opts)
    45  	var rv LookupImagePipelineResult
    46  	err := ctx.Invoke("aws:imagebuilder/getImagePipeline:getImagePipeline", 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 getImagePipeline.
    54  type LookupImagePipelineArgs struct {
    55  	// ARN of the image pipeline.
    56  	Arn string `pulumi:"arn"`
    57  	// Key-value map of resource tags for the image pipeline.
    58  	Tags map[string]string `pulumi:"tags"`
    59  }
    60  
    61  // A collection of values returned by getImagePipeline.
    62  type LookupImagePipelineResult struct {
    63  	Arn string `pulumi:"arn"`
    64  	// ARN of the container recipe.
    65  	ContainerRecipeArn string `pulumi:"containerRecipeArn"`
    66  	// Date the image pipeline was created.
    67  	DateCreated string `pulumi:"dateCreated"`
    68  	// Date the image pipeline was last run.
    69  	DateLastRun string `pulumi:"dateLastRun"`
    70  	// Date the image pipeline will run next.
    71  	DateNextRun string `pulumi:"dateNextRun"`
    72  	// Date the image pipeline was updated.
    73  	DateUpdated string `pulumi:"dateUpdated"`
    74  	// Description of the image pipeline.
    75  	Description string `pulumi:"description"`
    76  	// ARN of the Image Builder Distribution Configuration.
    77  	DistributionConfigurationArn string `pulumi:"distributionConfigurationArn"`
    78  	// Whether additional information about the image being created is collected.
    79  	EnhancedImageMetadataEnabled bool `pulumi:"enhancedImageMetadataEnabled"`
    80  	// The provider-assigned unique ID for this managed resource.
    81  	Id string `pulumi:"id"`
    82  	// ARN of the image recipe.
    83  	ImageRecipeArn              string                                       `pulumi:"imageRecipeArn"`
    84  	ImageScanningConfigurations []GetImagePipelineImageScanningConfiguration `pulumi:"imageScanningConfigurations"`
    85  	// List of an object with image tests configuration.
    86  	ImageTestsConfigurations []GetImagePipelineImageTestsConfiguration `pulumi:"imageTestsConfigurations"`
    87  	// ARN of the Image Builder Infrastructure Configuration.
    88  	InfrastructureConfigurationArn string `pulumi:"infrastructureConfigurationArn"`
    89  	// Name of the image pipeline.
    90  	Name string `pulumi:"name"`
    91  	// Platform of the image pipeline.
    92  	Platform string `pulumi:"platform"`
    93  	// List of an object with schedule settings.
    94  	Schedules []GetImagePipelineSchedule `pulumi:"schedules"`
    95  	// Status of the image pipeline.
    96  	Status string `pulumi:"status"`
    97  	// Key-value map of resource tags for the image pipeline.
    98  	Tags map[string]string `pulumi:"tags"`
    99  }
   100  
   101  func LookupImagePipelineOutput(ctx *pulumi.Context, args LookupImagePipelineOutputArgs, opts ...pulumi.InvokeOption) LookupImagePipelineResultOutput {
   102  	return pulumi.ToOutputWithContext(context.Background(), args).
   103  		ApplyT(func(v interface{}) (LookupImagePipelineResult, error) {
   104  			args := v.(LookupImagePipelineArgs)
   105  			r, err := LookupImagePipeline(ctx, &args, opts...)
   106  			var s LookupImagePipelineResult
   107  			if r != nil {
   108  				s = *r
   109  			}
   110  			return s, err
   111  		}).(LookupImagePipelineResultOutput)
   112  }
   113  
   114  // A collection of arguments for invoking getImagePipeline.
   115  type LookupImagePipelineOutputArgs struct {
   116  	// ARN of the image pipeline.
   117  	Arn pulumi.StringInput `pulumi:"arn"`
   118  	// Key-value map of resource tags for the image pipeline.
   119  	Tags pulumi.StringMapInput `pulumi:"tags"`
   120  }
   121  
   122  func (LookupImagePipelineOutputArgs) ElementType() reflect.Type {
   123  	return reflect.TypeOf((*LookupImagePipelineArgs)(nil)).Elem()
   124  }
   125  
   126  // A collection of values returned by getImagePipeline.
   127  type LookupImagePipelineResultOutput struct{ *pulumi.OutputState }
   128  
   129  func (LookupImagePipelineResultOutput) ElementType() reflect.Type {
   130  	return reflect.TypeOf((*LookupImagePipelineResult)(nil)).Elem()
   131  }
   132  
   133  func (o LookupImagePipelineResultOutput) ToLookupImagePipelineResultOutput() LookupImagePipelineResultOutput {
   134  	return o
   135  }
   136  
   137  func (o LookupImagePipelineResultOutput) ToLookupImagePipelineResultOutputWithContext(ctx context.Context) LookupImagePipelineResultOutput {
   138  	return o
   139  }
   140  
   141  func (o LookupImagePipelineResultOutput) Arn() pulumi.StringOutput {
   142  	return o.ApplyT(func(v LookupImagePipelineResult) string { return v.Arn }).(pulumi.StringOutput)
   143  }
   144  
   145  // ARN of the container recipe.
   146  func (o LookupImagePipelineResultOutput) ContainerRecipeArn() pulumi.StringOutput {
   147  	return o.ApplyT(func(v LookupImagePipelineResult) string { return v.ContainerRecipeArn }).(pulumi.StringOutput)
   148  }
   149  
   150  // Date the image pipeline was created.
   151  func (o LookupImagePipelineResultOutput) DateCreated() pulumi.StringOutput {
   152  	return o.ApplyT(func(v LookupImagePipelineResult) string { return v.DateCreated }).(pulumi.StringOutput)
   153  }
   154  
   155  // Date the image pipeline was last run.
   156  func (o LookupImagePipelineResultOutput) DateLastRun() pulumi.StringOutput {
   157  	return o.ApplyT(func(v LookupImagePipelineResult) string { return v.DateLastRun }).(pulumi.StringOutput)
   158  }
   159  
   160  // Date the image pipeline will run next.
   161  func (o LookupImagePipelineResultOutput) DateNextRun() pulumi.StringOutput {
   162  	return o.ApplyT(func(v LookupImagePipelineResult) string { return v.DateNextRun }).(pulumi.StringOutput)
   163  }
   164  
   165  // Date the image pipeline was updated.
   166  func (o LookupImagePipelineResultOutput) DateUpdated() pulumi.StringOutput {
   167  	return o.ApplyT(func(v LookupImagePipelineResult) string { return v.DateUpdated }).(pulumi.StringOutput)
   168  }
   169  
   170  // Description of the image pipeline.
   171  func (o LookupImagePipelineResultOutput) Description() pulumi.StringOutput {
   172  	return o.ApplyT(func(v LookupImagePipelineResult) string { return v.Description }).(pulumi.StringOutput)
   173  }
   174  
   175  // ARN of the Image Builder Distribution Configuration.
   176  func (o LookupImagePipelineResultOutput) DistributionConfigurationArn() pulumi.StringOutput {
   177  	return o.ApplyT(func(v LookupImagePipelineResult) string { return v.DistributionConfigurationArn }).(pulumi.StringOutput)
   178  }
   179  
   180  // Whether additional information about the image being created is collected.
   181  func (o LookupImagePipelineResultOutput) EnhancedImageMetadataEnabled() pulumi.BoolOutput {
   182  	return o.ApplyT(func(v LookupImagePipelineResult) bool { return v.EnhancedImageMetadataEnabled }).(pulumi.BoolOutput)
   183  }
   184  
   185  // The provider-assigned unique ID for this managed resource.
   186  func (o LookupImagePipelineResultOutput) Id() pulumi.StringOutput {
   187  	return o.ApplyT(func(v LookupImagePipelineResult) string { return v.Id }).(pulumi.StringOutput)
   188  }
   189  
   190  // ARN of the image recipe.
   191  func (o LookupImagePipelineResultOutput) ImageRecipeArn() pulumi.StringOutput {
   192  	return o.ApplyT(func(v LookupImagePipelineResult) string { return v.ImageRecipeArn }).(pulumi.StringOutput)
   193  }
   194  
   195  func (o LookupImagePipelineResultOutput) ImageScanningConfigurations() GetImagePipelineImageScanningConfigurationArrayOutput {
   196  	return o.ApplyT(func(v LookupImagePipelineResult) []GetImagePipelineImageScanningConfiguration {
   197  		return v.ImageScanningConfigurations
   198  	}).(GetImagePipelineImageScanningConfigurationArrayOutput)
   199  }
   200  
   201  // List of an object with image tests configuration.
   202  func (o LookupImagePipelineResultOutput) ImageTestsConfigurations() GetImagePipelineImageTestsConfigurationArrayOutput {
   203  	return o.ApplyT(func(v LookupImagePipelineResult) []GetImagePipelineImageTestsConfiguration {
   204  		return v.ImageTestsConfigurations
   205  	}).(GetImagePipelineImageTestsConfigurationArrayOutput)
   206  }
   207  
   208  // ARN of the Image Builder Infrastructure Configuration.
   209  func (o LookupImagePipelineResultOutput) InfrastructureConfigurationArn() pulumi.StringOutput {
   210  	return o.ApplyT(func(v LookupImagePipelineResult) string { return v.InfrastructureConfigurationArn }).(pulumi.StringOutput)
   211  }
   212  
   213  // Name of the image pipeline.
   214  func (o LookupImagePipelineResultOutput) Name() pulumi.StringOutput {
   215  	return o.ApplyT(func(v LookupImagePipelineResult) string { return v.Name }).(pulumi.StringOutput)
   216  }
   217  
   218  // Platform of the image pipeline.
   219  func (o LookupImagePipelineResultOutput) Platform() pulumi.StringOutput {
   220  	return o.ApplyT(func(v LookupImagePipelineResult) string { return v.Platform }).(pulumi.StringOutput)
   221  }
   222  
   223  // List of an object with schedule settings.
   224  func (o LookupImagePipelineResultOutput) Schedules() GetImagePipelineScheduleArrayOutput {
   225  	return o.ApplyT(func(v LookupImagePipelineResult) []GetImagePipelineSchedule { return v.Schedules }).(GetImagePipelineScheduleArrayOutput)
   226  }
   227  
   228  // Status of the image pipeline.
   229  func (o LookupImagePipelineResultOutput) Status() pulumi.StringOutput {
   230  	return o.ApplyT(func(v LookupImagePipelineResult) string { return v.Status }).(pulumi.StringOutput)
   231  }
   232  
   233  // Key-value map of resource tags for the image pipeline.
   234  func (o LookupImagePipelineResultOutput) Tags() pulumi.StringMapOutput {
   235  	return o.ApplyT(func(v LookupImagePipelineResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
   236  }
   237  
   238  func init() {
   239  	pulumi.RegisterOutputType(LookupImagePipelineResultOutput{})
   240  }