// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package incus import ( "context" "reflect" "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // ## # Image // // Provides information about an Incus image. // // ## Example Usage // // ```go // package main // // import ( // // "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // debianCustom, err := incus.LookupImage(ctx, &incus.LookupImageArgs{ // Name: pulumi.StringRef("debian_custom"), // }, nil) // if err != nil { // return err // } // _, err = incus.NewInstance(ctx, "d1", &incus.InstanceArgs{ // Image: pulumi.String(debianCustom.Fingerprint), // Name: pulumi.String("d1"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` func LookupImage(ctx *pulumi.Context, args *LookupImageArgs, opts ...pulumi.InvokeOption) (*LookupImageResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupImageResult err := ctx.Invoke("incus:index/getImage:getImage", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getImage. type LookupImageArgs struct { // *Optional* - The image architecture (e.g. x86_64, aarch64). See [Architectures](https://linuxcontainers.org/incus/docs/main/architectures/) for all possible values. Architecture *string `pulumi:"architecture"` // *Optional* - Fingerprint of the image. Fingerprint *string `pulumi:"fingerprint"` // *Optional* - Name of the image. Name *string `pulumi:"name"` // *Optional* - Name of the project where the image is stored. Project *string `pulumi:"project"` // *Optional* - The remote in which the resource was created. If // not provided, the provider's default remote will be used. Remote *string `pulumi:"remote"` // *Optional* - Type of image. Must be one of `container` or `virtual-machine`. Type *string `pulumi:"type"` } // A collection of values returned by getImage. type LookupImageResult struct { // The list of aliases for the image. Aliases []string `pulumi:"aliases"` Architecture string `pulumi:"architecture"` // The datetime of image creation, in Unix time. CreatedAt int `pulumi:"createdAt"` Fingerprint string `pulumi:"fingerprint"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name *string `pulumi:"name"` Project *string `pulumi:"project"` Remote *string `pulumi:"remote"` Type string `pulumi:"type"` } func LookupImageOutput(ctx *pulumi.Context, args LookupImageOutputArgs, opts ...pulumi.InvokeOption) LookupImageResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupImageResultOutput, error) { args := v.(LookupImageArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("incus:index/getImage:getImage", args, LookupImageResultOutput{}, options).(LookupImageResultOutput), nil }).(LookupImageResultOutput) } // A collection of arguments for invoking getImage. type LookupImageOutputArgs struct { // *Optional* - The image architecture (e.g. x86_64, aarch64). See [Architectures](https://linuxcontainers.org/incus/docs/main/architectures/) for all possible values. Architecture pulumi.StringPtrInput `pulumi:"architecture"` // *Optional* - Fingerprint of the image. Fingerprint pulumi.StringPtrInput `pulumi:"fingerprint"` // *Optional* - Name of the image. Name pulumi.StringPtrInput `pulumi:"name"` // *Optional* - Name of the project where the image is stored. Project pulumi.StringPtrInput `pulumi:"project"` // *Optional* - The remote in which the resource was created. If // not provided, the provider's default remote will be used. Remote pulumi.StringPtrInput `pulumi:"remote"` // *Optional* - Type of image. Must be one of `container` or `virtual-machine`. Type pulumi.StringPtrInput `pulumi:"type"` } func (LookupImageOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupImageArgs)(nil)).Elem() } // A collection of values returned by getImage. type LookupImageResultOutput struct{ *pulumi.OutputState } func (LookupImageResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupImageResult)(nil)).Elem() } func (o LookupImageResultOutput) ToLookupImageResultOutput() LookupImageResultOutput { return o } func (o LookupImageResultOutput) ToLookupImageResultOutputWithContext(ctx context.Context) LookupImageResultOutput { return o } // The list of aliases for the image. func (o LookupImageResultOutput) Aliases() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupImageResult) []string { return v.Aliases }).(pulumi.StringArrayOutput) } func (o LookupImageResultOutput) Architecture() pulumi.StringOutput { return o.ApplyT(func(v LookupImageResult) string { return v.Architecture }).(pulumi.StringOutput) } // The datetime of image creation, in Unix time. func (o LookupImageResultOutput) CreatedAt() pulumi.IntOutput { return o.ApplyT(func(v LookupImageResult) int { return v.CreatedAt }).(pulumi.IntOutput) } func (o LookupImageResultOutput) Fingerprint() pulumi.StringOutput { return o.ApplyT(func(v LookupImageResult) string { return v.Fingerprint }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupImageResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupImageResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupImageResultOutput) Name() pulumi.StringPtrOutput { return o.ApplyT(func(v LookupImageResult) *string { return v.Name }).(pulumi.StringPtrOutput) } func (o LookupImageResultOutput) Project() pulumi.StringPtrOutput { return o.ApplyT(func(v LookupImageResult) *string { return v.Project }).(pulumi.StringPtrOutput) } func (o LookupImageResultOutput) Remote() pulumi.StringPtrOutput { return o.ApplyT(func(v LookupImageResult) *string { return v.Remote }).(pulumi.StringPtrOutput) } func (o LookupImageResultOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v LookupImageResult) string { return v.Type }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupImageResultOutput{}) }