Update
This commit is contained in:
204
sdk/go/incus/getStorageVolume.go
generated
Normal file
204
sdk/go/incus/getStorageVolume.go
generated
Normal file
@@ -0,0 +1,204 @@
|
||||
// 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"
|
||||
)
|
||||
|
||||
// ## # StorageVolume
|
||||
//
|
||||
// Provides information about an Incus storage volume.
|
||||
// See Incus storage volume [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/storage_volumes/) 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.LookupStorageVolume(ctx, &incus.LookupStorageVolumeArgs{
|
||||
// Name: "default",
|
||||
// Type: "custom",
|
||||
// StoragePool: "parent",
|
||||
// }, nil)
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
// ctx.Export("storageVolumeName", this.Name)
|
||||
// return nil
|
||||
// })
|
||||
// }
|
||||
//
|
||||
// ```
|
||||
func LookupStorageVolume(ctx *pulumi.Context, args *LookupStorageVolumeArgs, opts ...pulumi.InvokeOption) (*LookupStorageVolumeResult, error) {
|
||||
opts = internal.PkgInvokeDefaultOpts(opts)
|
||||
var rv LookupStorageVolumeResult
|
||||
err := ctx.Invoke("incus:index/getStorageVolume:getStorageVolume", args, &rv, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &rv, nil
|
||||
}
|
||||
|
||||
// A collection of arguments for invoking getStorageVolume.
|
||||
type LookupStorageVolumeArgs struct {
|
||||
// Storage Volume content type.
|
||||
ContentType *string `pulumi:"contentType"`
|
||||
// Description of the storage volume.
|
||||
Description *string `pulumi:"description"`
|
||||
// Location of the storage volume.
|
||||
Location *string `pulumi:"location"`
|
||||
// **Required** - Name of the storage volume.
|
||||
Name string `pulumi:"name"`
|
||||
// *Optional* - Name of the project where the storage volume 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"`
|
||||
// **Required** - Name of the parent storage pool.
|
||||
StoragePool string `pulumi:"storagePool"`
|
||||
// *Optional* - Specify a target node in a cluster.
|
||||
Target *string `pulumi:"target"`
|
||||
// **Required** - Storage Volume type.
|
||||
Type string `pulumi:"type"`
|
||||
}
|
||||
|
||||
// A collection of values returned by getStorageVolume.
|
||||
type LookupStorageVolumeResult struct {
|
||||
// Map of key/value pairs of config settings.
|
||||
// [storage volume config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/)
|
||||
Config map[string]string `pulumi:"config"`
|
||||
// Storage Volume content type.
|
||||
ContentType string `pulumi:"contentType"`
|
||||
// Description of the storage volume.
|
||||
Description string `pulumi:"description"`
|
||||
// The provider-assigned unique ID for this managed resource.
|
||||
Id string `pulumi:"id"`
|
||||
// Location of the storage volume.
|
||||
Location string `pulumi:"location"`
|
||||
Name string `pulumi:"name"`
|
||||
Project *string `pulumi:"project"`
|
||||
Remote *string `pulumi:"remote"`
|
||||
StoragePool string `pulumi:"storagePool"`
|
||||
Target *string `pulumi:"target"`
|
||||
Type string `pulumi:"type"`
|
||||
}
|
||||
|
||||
func LookupStorageVolumeOutput(ctx *pulumi.Context, args LookupStorageVolumeOutputArgs, opts ...pulumi.InvokeOption) LookupStorageVolumeResultOutput {
|
||||
return pulumi.ToOutputWithContext(ctx.Context(), args).
|
||||
ApplyT(func(v interface{}) (LookupStorageVolumeResultOutput, error) {
|
||||
args := v.(LookupStorageVolumeArgs)
|
||||
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
|
||||
return ctx.InvokeOutput("incus:index/getStorageVolume:getStorageVolume", args, LookupStorageVolumeResultOutput{}, options).(LookupStorageVolumeResultOutput), nil
|
||||
}).(LookupStorageVolumeResultOutput)
|
||||
}
|
||||
|
||||
// A collection of arguments for invoking getStorageVolume.
|
||||
type LookupStorageVolumeOutputArgs struct {
|
||||
// Storage Volume content type.
|
||||
ContentType pulumi.StringPtrInput `pulumi:"contentType"`
|
||||
// Description of the storage volume.
|
||||
Description pulumi.StringPtrInput `pulumi:"description"`
|
||||
// Location of the storage volume.
|
||||
Location pulumi.StringPtrInput `pulumi:"location"`
|
||||
// **Required** - Name of the storage volume.
|
||||
Name pulumi.StringInput `pulumi:"name"`
|
||||
// *Optional* - Name of the project where the storage volume 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"`
|
||||
// **Required** - Name of the parent storage pool.
|
||||
StoragePool pulumi.StringInput `pulumi:"storagePool"`
|
||||
// *Optional* - Specify a target node in a cluster.
|
||||
Target pulumi.StringPtrInput `pulumi:"target"`
|
||||
// **Required** - Storage Volume type.
|
||||
Type pulumi.StringInput `pulumi:"type"`
|
||||
}
|
||||
|
||||
func (LookupStorageVolumeOutputArgs) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*LookupStorageVolumeArgs)(nil)).Elem()
|
||||
}
|
||||
|
||||
// A collection of values returned by getStorageVolume.
|
||||
type LookupStorageVolumeResultOutput struct{ *pulumi.OutputState }
|
||||
|
||||
func (LookupStorageVolumeResultOutput) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*LookupStorageVolumeResult)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (o LookupStorageVolumeResultOutput) ToLookupStorageVolumeResultOutput() LookupStorageVolumeResultOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o LookupStorageVolumeResultOutput) ToLookupStorageVolumeResultOutputWithContext(ctx context.Context) LookupStorageVolumeResultOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
// Map of key/value pairs of config settings.
|
||||
// [storage volume config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/)
|
||||
func (o LookupStorageVolumeResultOutput) Config() pulumi.StringMapOutput {
|
||||
return o.ApplyT(func(v LookupStorageVolumeResult) map[string]string { return v.Config }).(pulumi.StringMapOutput)
|
||||
}
|
||||
|
||||
// Storage Volume content type.
|
||||
func (o LookupStorageVolumeResultOutput) ContentType() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v LookupStorageVolumeResult) string { return v.ContentType }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
// Description of the storage volume.
|
||||
func (o LookupStorageVolumeResultOutput) Description() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v LookupStorageVolumeResult) string { return v.Description }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
// The provider-assigned unique ID for this managed resource.
|
||||
func (o LookupStorageVolumeResultOutput) Id() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v LookupStorageVolumeResult) string { return v.Id }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
// Location of the storage volume.
|
||||
func (o LookupStorageVolumeResultOutput) Location() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v LookupStorageVolumeResult) string { return v.Location }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
func (o LookupStorageVolumeResultOutput) Name() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v LookupStorageVolumeResult) string { return v.Name }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
func (o LookupStorageVolumeResultOutput) Project() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v LookupStorageVolumeResult) *string { return v.Project }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
func (o LookupStorageVolumeResultOutput) Remote() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v LookupStorageVolumeResult) *string { return v.Remote }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
func (o LookupStorageVolumeResultOutput) StoragePool() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v LookupStorageVolumeResult) string { return v.StoragePool }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
func (o LookupStorageVolumeResultOutput) Target() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v LookupStorageVolumeResult) *string { return v.Target }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
func (o LookupStorageVolumeResultOutput) Type() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v LookupStorageVolumeResult) string { return v.Type }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
func init() {
|
||||
pulumi.RegisterOutputType(LookupStorageVolumeResultOutput{})
|
||||
}
|
||||
Reference in New Issue
Block a user