Update
This commit is contained in:
247
sdk/go/incus/getInstance.go
generated
Normal file
247
sdk/go/incus/getInstance.go
generated
Normal file
@@ -0,0 +1,247 @@
|
||||
// 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"
|
||||
)
|
||||
|
||||
// ## # Instance
|
||||
//
|
||||
// Provides information about an Incus instance.
|
||||
// See Incus instance [configuration reference](https://linuxcontainers.org/incus/docs/main/explanation/instance_config/) 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.LookupInstance(ctx, &incus.LookupInstanceArgs{
|
||||
// Name: "default",
|
||||
// }, nil)
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
// ctx.Export("instanceName", this.Name)
|
||||
// return nil
|
||||
// })
|
||||
// }
|
||||
//
|
||||
// ```
|
||||
func LookupInstance(ctx *pulumi.Context, args *LookupInstanceArgs, opts ...pulumi.InvokeOption) (*LookupInstanceResult, error) {
|
||||
opts = internal.PkgInvokeDefaultOpts(opts)
|
||||
var rv LookupInstanceResult
|
||||
err := ctx.Invoke("incus:index/getInstance:getInstance", args, &rv, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &rv, nil
|
||||
}
|
||||
|
||||
// A collection of arguments for invoking getInstance.
|
||||
type LookupInstanceArgs struct {
|
||||
// Architecture name.
|
||||
Architecture *string `pulumi:"architecture"`
|
||||
// Description of the instance.
|
||||
Description *string `pulumi:"description"`
|
||||
// Device definitions. See reference below.
|
||||
Devices []GetInstanceDevice `pulumi:"devices"`
|
||||
// Whether the instance is ephemeral (deleted on shutdown).
|
||||
Ephemeral *bool `pulumi:"ephemeral"`
|
||||
// Location of the instance.
|
||||
Location *string `pulumi:"location"`
|
||||
// **Required** - Name of the instance.
|
||||
Name string `pulumi:"name"`
|
||||
// List of profiles applied to the instance.
|
||||
Profiles []string `pulumi:"profiles"`
|
||||
// *Optional* - Name of the project where the instance 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"`
|
||||
// Whether the instance is stateful.
|
||||
Stateful *bool `pulumi:"stateful"`
|
||||
// Status of the instance.
|
||||
Status *string `pulumi:"status"`
|
||||
// Type of the device Must be one of none, disk, nic,
|
||||
// unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci.
|
||||
Type *string `pulumi:"type"`
|
||||
}
|
||||
|
||||
// A collection of values returned by getInstance.
|
||||
type LookupInstanceResult struct {
|
||||
// Architecture name.
|
||||
Architecture string `pulumi:"architecture"`
|
||||
// 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 instance.
|
||||
Description string `pulumi:"description"`
|
||||
// Device definitions. See reference below.
|
||||
Devices []GetInstanceDevice `pulumi:"devices"`
|
||||
// Whether the instance is ephemeral (deleted on shutdown).
|
||||
Ephemeral bool `pulumi:"ephemeral"`
|
||||
// The provider-assigned unique ID for this managed resource.
|
||||
Id string `pulumi:"id"`
|
||||
// Location of the instance.
|
||||
Location string `pulumi:"location"`
|
||||
// Name of the device.
|
||||
Name string `pulumi:"name"`
|
||||
// List of profiles applied to the instance.
|
||||
Profiles []string `pulumi:"profiles"`
|
||||
Project *string `pulumi:"project"`
|
||||
Remote *string `pulumi:"remote"`
|
||||
// Whether the instance is stateful.
|
||||
Stateful bool `pulumi:"stateful"`
|
||||
// Status of the instance.
|
||||
Status string `pulumi:"status"`
|
||||
// Type of the device Must be one of none, disk, nic,
|
||||
// unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci.
|
||||
Type string `pulumi:"type"`
|
||||
}
|
||||
|
||||
func LookupInstanceOutput(ctx *pulumi.Context, args LookupInstanceOutputArgs, opts ...pulumi.InvokeOption) LookupInstanceResultOutput {
|
||||
return pulumi.ToOutputWithContext(ctx.Context(), args).
|
||||
ApplyT(func(v interface{}) (LookupInstanceResultOutput, error) {
|
||||
args := v.(LookupInstanceArgs)
|
||||
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
|
||||
return ctx.InvokeOutput("incus:index/getInstance:getInstance", args, LookupInstanceResultOutput{}, options).(LookupInstanceResultOutput), nil
|
||||
}).(LookupInstanceResultOutput)
|
||||
}
|
||||
|
||||
// A collection of arguments for invoking getInstance.
|
||||
type LookupInstanceOutputArgs struct {
|
||||
// Architecture name.
|
||||
Architecture pulumi.StringPtrInput `pulumi:"architecture"`
|
||||
// Description of the instance.
|
||||
Description pulumi.StringPtrInput `pulumi:"description"`
|
||||
// Device definitions. See reference below.
|
||||
Devices GetInstanceDeviceArrayInput `pulumi:"devices"`
|
||||
// Whether the instance is ephemeral (deleted on shutdown).
|
||||
Ephemeral pulumi.BoolPtrInput `pulumi:"ephemeral"`
|
||||
// Location of the instance.
|
||||
Location pulumi.StringPtrInput `pulumi:"location"`
|
||||
// **Required** - Name of the instance.
|
||||
Name pulumi.StringInput `pulumi:"name"`
|
||||
// List of profiles applied to the instance.
|
||||
Profiles pulumi.StringArrayInput `pulumi:"profiles"`
|
||||
// *Optional* - Name of the project where the instance 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"`
|
||||
// Whether the instance is stateful.
|
||||
Stateful pulumi.BoolPtrInput `pulumi:"stateful"`
|
||||
// Status of the instance.
|
||||
Status pulumi.StringPtrInput `pulumi:"status"`
|
||||
// Type of the device Must be one of none, disk, nic,
|
||||
// unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci.
|
||||
Type pulumi.StringPtrInput `pulumi:"type"`
|
||||
}
|
||||
|
||||
func (LookupInstanceOutputArgs) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*LookupInstanceArgs)(nil)).Elem()
|
||||
}
|
||||
|
||||
// A collection of values returned by getInstance.
|
||||
type LookupInstanceResultOutput struct{ *pulumi.OutputState }
|
||||
|
||||
func (LookupInstanceResultOutput) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*LookupInstanceResult)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (o LookupInstanceResultOutput) ToLookupInstanceResultOutput() LookupInstanceResultOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o LookupInstanceResultOutput) ToLookupInstanceResultOutputWithContext(ctx context.Context) LookupInstanceResultOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
// Architecture name.
|
||||
func (o LookupInstanceResultOutput) Architecture() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v LookupInstanceResult) string { return v.Architecture }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
// Map of key/value pairs of config settings.
|
||||
// [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/)
|
||||
func (o LookupInstanceResultOutput) Config() pulumi.StringMapOutput {
|
||||
return o.ApplyT(func(v LookupInstanceResult) map[string]string { return v.Config }).(pulumi.StringMapOutput)
|
||||
}
|
||||
|
||||
// Description of the instance.
|
||||
func (o LookupInstanceResultOutput) Description() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v LookupInstanceResult) string { return v.Description }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
// Device definitions. See reference below.
|
||||
func (o LookupInstanceResultOutput) Devices() GetInstanceDeviceArrayOutput {
|
||||
return o.ApplyT(func(v LookupInstanceResult) []GetInstanceDevice { return v.Devices }).(GetInstanceDeviceArrayOutput)
|
||||
}
|
||||
|
||||
// Whether the instance is ephemeral (deleted on shutdown).
|
||||
func (o LookupInstanceResultOutput) Ephemeral() pulumi.BoolOutput {
|
||||
return o.ApplyT(func(v LookupInstanceResult) bool { return v.Ephemeral }).(pulumi.BoolOutput)
|
||||
}
|
||||
|
||||
// The provider-assigned unique ID for this managed resource.
|
||||
func (o LookupInstanceResultOutput) Id() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v LookupInstanceResult) string { return v.Id }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
// Location of the instance.
|
||||
func (o LookupInstanceResultOutput) Location() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v LookupInstanceResult) string { return v.Location }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
// Name of the device.
|
||||
func (o LookupInstanceResultOutput) Name() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v LookupInstanceResult) string { return v.Name }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
// List of profiles applied to the instance.
|
||||
func (o LookupInstanceResultOutput) Profiles() pulumi.StringArrayOutput {
|
||||
return o.ApplyT(func(v LookupInstanceResult) []string { return v.Profiles }).(pulumi.StringArrayOutput)
|
||||
}
|
||||
|
||||
func (o LookupInstanceResultOutput) Project() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v LookupInstanceResult) *string { return v.Project }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
func (o LookupInstanceResultOutput) Remote() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v LookupInstanceResult) *string { return v.Remote }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// Whether the instance is stateful.
|
||||
func (o LookupInstanceResultOutput) Stateful() pulumi.BoolOutput {
|
||||
return o.ApplyT(func(v LookupInstanceResult) bool { return v.Stateful }).(pulumi.BoolOutput)
|
||||
}
|
||||
|
||||
// Status of the instance.
|
||||
func (o LookupInstanceResultOutput) Status() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v LookupInstanceResult) string { return v.Status }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
// Type of the device Must be one of none, disk, nic,
|
||||
// unix-char, unix-block, usb, gpu, infiniband, proxy, unix-hotplug, tpm, pci.
|
||||
func (o LookupInstanceResultOutput) Type() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v LookupInstanceResult) string { return v.Type }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
func init() {
|
||||
pulumi.RegisterOutputType(LookupInstanceResultOutput{})
|
||||
}
|
||||
Reference in New Issue
Block a user