github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/imagebuilder/getContainerRecipe.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 Container Recipe.
    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.LookupContainerRecipe(ctx, &imagebuilder.LookupContainerRecipeArgs{
    32  //				Arn: "arn:aws:imagebuilder:us-east-1:aws:container-recipe/example/1.0.0",
    33  //			}, nil)
    34  //			if err != nil {
    35  //				return err
    36  //			}
    37  //			return nil
    38  //		})
    39  //	}
    40  //
    41  // ```
    42  // <!--End PulumiCodeChooser -->
    43  func LookupContainerRecipe(ctx *pulumi.Context, args *LookupContainerRecipeArgs, opts ...pulumi.InvokeOption) (*LookupContainerRecipeResult, error) {
    44  	opts = internal.PkgInvokeDefaultOpts(opts)
    45  	var rv LookupContainerRecipeResult
    46  	err := ctx.Invoke("aws:imagebuilder/getContainerRecipe:getContainerRecipe", 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 getContainerRecipe.
    54  type LookupContainerRecipeArgs struct {
    55  	// ARN of the container recipe.
    56  	Arn string `pulumi:"arn"`
    57  	// Key-value map of resource tags for the container recipe.
    58  	Tags map[string]string `pulumi:"tags"`
    59  }
    60  
    61  // A collection of values returned by getContainerRecipe.
    62  type LookupContainerRecipeResult struct {
    63  	Arn string `pulumi:"arn"`
    64  	// List of objects with components for the container recipe.
    65  	Components []GetContainerRecipeComponent `pulumi:"components"`
    66  	// Type of the container.
    67  	ContainerType string `pulumi:"containerType"`
    68  	// Date the container recipe was created.
    69  	DateCreated string `pulumi:"dateCreated"`
    70  	// Description of the container recipe.
    71  	Description string `pulumi:"description"`
    72  	// Dockerfile template used to build the image.
    73  	DockerfileTemplateData string `pulumi:"dockerfileTemplateData"`
    74  	// Whether to encrypt the volume. Defaults to unset, which is the value inherited from the parent image.
    75  	Encrypted bool `pulumi:"encrypted"`
    76  	// The provider-assigned unique ID for this managed resource.
    77  	Id string `pulumi:"id"`
    78  	// List of objects with instance configurations for building and testing container images.
    79  	InstanceConfigurations []GetContainerRecipeInstanceConfiguration `pulumi:"instanceConfigurations"`
    80  	// KMS key used to encrypt the container image.
    81  	KmsKeyId string `pulumi:"kmsKeyId"`
    82  	// Name of the container recipe.
    83  	Name string `pulumi:"name"`
    84  	// Owner of the container recipe.
    85  	Owner string `pulumi:"owner"`
    86  	// Base image for the container recipe.
    87  	ParentImage string `pulumi:"parentImage"`
    88  	// Platform of the container recipe.
    89  	Platform string `pulumi:"platform"`
    90  	// Key-value map of resource tags for the container recipe.
    91  	Tags map[string]string `pulumi:"tags"`
    92  	// Destination repository for the container image.
    93  	TargetRepositories []GetContainerRecipeTargetRepository `pulumi:"targetRepositories"`
    94  	// Version of the container recipe.
    95  	Version string `pulumi:"version"`
    96  	// Working directory used during build and test workflows.
    97  	WorkingDirectory string `pulumi:"workingDirectory"`
    98  }
    99  
   100  func LookupContainerRecipeOutput(ctx *pulumi.Context, args LookupContainerRecipeOutputArgs, opts ...pulumi.InvokeOption) LookupContainerRecipeResultOutput {
   101  	return pulumi.ToOutputWithContext(context.Background(), args).
   102  		ApplyT(func(v interface{}) (LookupContainerRecipeResult, error) {
   103  			args := v.(LookupContainerRecipeArgs)
   104  			r, err := LookupContainerRecipe(ctx, &args, opts...)
   105  			var s LookupContainerRecipeResult
   106  			if r != nil {
   107  				s = *r
   108  			}
   109  			return s, err
   110  		}).(LookupContainerRecipeResultOutput)
   111  }
   112  
   113  // A collection of arguments for invoking getContainerRecipe.
   114  type LookupContainerRecipeOutputArgs struct {
   115  	// ARN of the container recipe.
   116  	Arn pulumi.StringInput `pulumi:"arn"`
   117  	// Key-value map of resource tags for the container recipe.
   118  	Tags pulumi.StringMapInput `pulumi:"tags"`
   119  }
   120  
   121  func (LookupContainerRecipeOutputArgs) ElementType() reflect.Type {
   122  	return reflect.TypeOf((*LookupContainerRecipeArgs)(nil)).Elem()
   123  }
   124  
   125  // A collection of values returned by getContainerRecipe.
   126  type LookupContainerRecipeResultOutput struct{ *pulumi.OutputState }
   127  
   128  func (LookupContainerRecipeResultOutput) ElementType() reflect.Type {
   129  	return reflect.TypeOf((*LookupContainerRecipeResult)(nil)).Elem()
   130  }
   131  
   132  func (o LookupContainerRecipeResultOutput) ToLookupContainerRecipeResultOutput() LookupContainerRecipeResultOutput {
   133  	return o
   134  }
   135  
   136  func (o LookupContainerRecipeResultOutput) ToLookupContainerRecipeResultOutputWithContext(ctx context.Context) LookupContainerRecipeResultOutput {
   137  	return o
   138  }
   139  
   140  func (o LookupContainerRecipeResultOutput) Arn() pulumi.StringOutput {
   141  	return o.ApplyT(func(v LookupContainerRecipeResult) string { return v.Arn }).(pulumi.StringOutput)
   142  }
   143  
   144  // List of objects with components for the container recipe.
   145  func (o LookupContainerRecipeResultOutput) Components() GetContainerRecipeComponentArrayOutput {
   146  	return o.ApplyT(func(v LookupContainerRecipeResult) []GetContainerRecipeComponent { return v.Components }).(GetContainerRecipeComponentArrayOutput)
   147  }
   148  
   149  // Type of the container.
   150  func (o LookupContainerRecipeResultOutput) ContainerType() pulumi.StringOutput {
   151  	return o.ApplyT(func(v LookupContainerRecipeResult) string { return v.ContainerType }).(pulumi.StringOutput)
   152  }
   153  
   154  // Date the container recipe was created.
   155  func (o LookupContainerRecipeResultOutput) DateCreated() pulumi.StringOutput {
   156  	return o.ApplyT(func(v LookupContainerRecipeResult) string { return v.DateCreated }).(pulumi.StringOutput)
   157  }
   158  
   159  // Description of the container recipe.
   160  func (o LookupContainerRecipeResultOutput) Description() pulumi.StringOutput {
   161  	return o.ApplyT(func(v LookupContainerRecipeResult) string { return v.Description }).(pulumi.StringOutput)
   162  }
   163  
   164  // Dockerfile template used to build the image.
   165  func (o LookupContainerRecipeResultOutput) DockerfileTemplateData() pulumi.StringOutput {
   166  	return o.ApplyT(func(v LookupContainerRecipeResult) string { return v.DockerfileTemplateData }).(pulumi.StringOutput)
   167  }
   168  
   169  // Whether to encrypt the volume. Defaults to unset, which is the value inherited from the parent image.
   170  func (o LookupContainerRecipeResultOutput) Encrypted() pulumi.BoolOutput {
   171  	return o.ApplyT(func(v LookupContainerRecipeResult) bool { return v.Encrypted }).(pulumi.BoolOutput)
   172  }
   173  
   174  // The provider-assigned unique ID for this managed resource.
   175  func (o LookupContainerRecipeResultOutput) Id() pulumi.StringOutput {
   176  	return o.ApplyT(func(v LookupContainerRecipeResult) string { return v.Id }).(pulumi.StringOutput)
   177  }
   178  
   179  // List of objects with instance configurations for building and testing container images.
   180  func (o LookupContainerRecipeResultOutput) InstanceConfigurations() GetContainerRecipeInstanceConfigurationArrayOutput {
   181  	return o.ApplyT(func(v LookupContainerRecipeResult) []GetContainerRecipeInstanceConfiguration {
   182  		return v.InstanceConfigurations
   183  	}).(GetContainerRecipeInstanceConfigurationArrayOutput)
   184  }
   185  
   186  // KMS key used to encrypt the container image.
   187  func (o LookupContainerRecipeResultOutput) KmsKeyId() pulumi.StringOutput {
   188  	return o.ApplyT(func(v LookupContainerRecipeResult) string { return v.KmsKeyId }).(pulumi.StringOutput)
   189  }
   190  
   191  // Name of the container recipe.
   192  func (o LookupContainerRecipeResultOutput) Name() pulumi.StringOutput {
   193  	return o.ApplyT(func(v LookupContainerRecipeResult) string { return v.Name }).(pulumi.StringOutput)
   194  }
   195  
   196  // Owner of the container recipe.
   197  func (o LookupContainerRecipeResultOutput) Owner() pulumi.StringOutput {
   198  	return o.ApplyT(func(v LookupContainerRecipeResult) string { return v.Owner }).(pulumi.StringOutput)
   199  }
   200  
   201  // Base image for the container recipe.
   202  func (o LookupContainerRecipeResultOutput) ParentImage() pulumi.StringOutput {
   203  	return o.ApplyT(func(v LookupContainerRecipeResult) string { return v.ParentImage }).(pulumi.StringOutput)
   204  }
   205  
   206  // Platform of the container recipe.
   207  func (o LookupContainerRecipeResultOutput) Platform() pulumi.StringOutput {
   208  	return o.ApplyT(func(v LookupContainerRecipeResult) string { return v.Platform }).(pulumi.StringOutput)
   209  }
   210  
   211  // Key-value map of resource tags for the container recipe.
   212  func (o LookupContainerRecipeResultOutput) Tags() pulumi.StringMapOutput {
   213  	return o.ApplyT(func(v LookupContainerRecipeResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
   214  }
   215  
   216  // Destination repository for the container image.
   217  func (o LookupContainerRecipeResultOutput) TargetRepositories() GetContainerRecipeTargetRepositoryArrayOutput {
   218  	return o.ApplyT(func(v LookupContainerRecipeResult) []GetContainerRecipeTargetRepository { return v.TargetRepositories }).(GetContainerRecipeTargetRepositoryArrayOutput)
   219  }
   220  
   221  // Version of the container recipe.
   222  func (o LookupContainerRecipeResultOutput) Version() pulumi.StringOutput {
   223  	return o.ApplyT(func(v LookupContainerRecipeResult) string { return v.Version }).(pulumi.StringOutput)
   224  }
   225  
   226  // Working directory used during build and test workflows.
   227  func (o LookupContainerRecipeResultOutput) WorkingDirectory() pulumi.StringOutput {
   228  	return o.ApplyT(func(v LookupContainerRecipeResult) string { return v.WorkingDirectory }).(pulumi.StringOutput)
   229  }
   230  
   231  func init() {
   232  	pulumi.RegisterOutputType(LookupContainerRecipeResultOutput{})
   233  }