// 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" ) // ## # Profile // // Provides information about an Incus profile. // See Incus profile [configuration reference](https://linuxcontainers.org/incus/docs/main/profiles/) for more details. // // ## 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 { // this, err := incus.LookupProfile(ctx, &incus.LookupProfileArgs{ // Name: "default", // }, nil) // if err != nil { // return err // } // ctx.Export("profileName", this.Name) // return nil // }) // } // // ``` func LookupProfile(ctx *pulumi.Context, args *LookupProfileArgs, opts ...pulumi.InvokeOption) (*LookupProfileResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupProfileResult err := ctx.Invoke("incus:index/getProfile:getProfile", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getProfile. type LookupProfileArgs struct { // Description of the profile. Description *string `pulumi:"description"` // Device definitions. See reference below. Devices []GetProfileDevice `pulumi:"devices"` // **Required** - Name of the profile. Name string `pulumi:"name"` // *Optional* - Name of the project where the profile is be 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"` } // A collection of values returned by getProfile. type LookupProfileResult struct { // Map of key/value pairs of config settings. // [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/) Config map[string]string `pulumi:"config"` // Description of the profile. Description string `pulumi:"description"` // Device definitions. See reference below. Devices []GetProfileDevice `pulumi:"devices"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // Name of the device. Name string `pulumi:"name"` Project *string `pulumi:"project"` Remote *string `pulumi:"remote"` } func LookupProfileOutput(ctx *pulumi.Context, args LookupProfileOutputArgs, opts ...pulumi.InvokeOption) LookupProfileResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupProfileResultOutput, error) { args := v.(LookupProfileArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("incus:index/getProfile:getProfile", args, LookupProfileResultOutput{}, options).(LookupProfileResultOutput), nil }).(LookupProfileResultOutput) } // A collection of arguments for invoking getProfile. type LookupProfileOutputArgs struct { // Description of the profile. Description pulumi.StringPtrInput `pulumi:"description"` // Device definitions. See reference below. Devices GetProfileDeviceArrayInput `pulumi:"devices"` // **Required** - Name of the profile. Name pulumi.StringInput `pulumi:"name"` // *Optional* - Name of the project where the profile is be 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"` } func (LookupProfileOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupProfileArgs)(nil)).Elem() } // A collection of values returned by getProfile. type LookupProfileResultOutput struct{ *pulumi.OutputState } func (LookupProfileResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupProfileResult)(nil)).Elem() } func (o LookupProfileResultOutput) ToLookupProfileResultOutput() LookupProfileResultOutput { return o } func (o LookupProfileResultOutput) ToLookupProfileResultOutputWithContext(ctx context.Context) LookupProfileResultOutput { return o } // Map of key/value pairs of config settings. // [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/) func (o LookupProfileResultOutput) Config() pulumi.StringMapOutput { return o.ApplyT(func(v LookupProfileResult) map[string]string { return v.Config }).(pulumi.StringMapOutput) } // Description of the profile. func (o LookupProfileResultOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v LookupProfileResult) string { return v.Description }).(pulumi.StringOutput) } // Device definitions. See reference below. func (o LookupProfileResultOutput) Devices() GetProfileDeviceArrayOutput { return o.ApplyT(func(v LookupProfileResult) []GetProfileDevice { return v.Devices }).(GetProfileDeviceArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupProfileResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupProfileResult) string { return v.Id }).(pulumi.StringOutput) } // Name of the device. func (o LookupProfileResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupProfileResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupProfileResultOutput) Project() pulumi.StringPtrOutput { return o.ApplyT(func(v LookupProfileResult) *string { return v.Project }).(pulumi.StringPtrOutput) } func (o LookupProfileResultOutput) Remote() pulumi.StringPtrOutput { return o.ApplyT(func(v LookupProfileResult) *string { return v.Remote }).(pulumi.StringPtrOutput) } func init() { pulumi.RegisterOutputType(LookupProfileResultOutput{}) }