176 lines
6.3 KiB
Go
Generated
176 lines
6.3 KiB
Go
Generated
// 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"
|
|
)
|
|
|
|
// ## # StoragePool
|
|
//
|
|
// Provides information about an Incus storage pool.
|
|
// See Incus storage pool [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/storage_pools/) 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.LookupStoragePool(ctx, &incus.LookupStoragePoolArgs{
|
|
// Name: "default",
|
|
// }, nil)
|
|
// if err != nil {
|
|
// return err
|
|
// }
|
|
// ctx.Export("storagePoolName", this.Name)
|
|
// return nil
|
|
// })
|
|
// }
|
|
//
|
|
// ```
|
|
func LookupStoragePool(ctx *pulumi.Context, args *LookupStoragePoolArgs, opts ...pulumi.InvokeOption) (*LookupStoragePoolResult, error) {
|
|
opts = internal.PkgInvokeDefaultOpts(opts)
|
|
var rv LookupStoragePoolResult
|
|
err := ctx.Invoke("incus:index/getStoragePool:getStoragePool", args, &rv, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &rv, nil
|
|
}
|
|
|
|
// A collection of arguments for invoking getStoragePool.
|
|
type LookupStoragePoolArgs struct {
|
|
// Description of the storage pool.
|
|
Description *string `pulumi:"description"`
|
|
// Storage Pool driver.
|
|
Driver *string `pulumi:"driver"`
|
|
// **Required** - Name of the storage pool.
|
|
Name string `pulumi:"name"`
|
|
// *Optional* - The remote in which the resource was created. If
|
|
// not provided, the provider's default remote will be used.
|
|
Remote *string `pulumi:"remote"`
|
|
// Status of the storage pool.
|
|
Status *string `pulumi:"status"`
|
|
// *Optional* - Specify a target node in a cluster.
|
|
Target *string `pulumi:"target"`
|
|
}
|
|
|
|
// A collection of values returned by getStoragePool.
|
|
type LookupStoragePoolResult struct {
|
|
// Map of key/value pairs of config settings.
|
|
// [storage pool config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/)
|
|
Config map[string]string `pulumi:"config"`
|
|
// Description of the storage pool.
|
|
Description string `pulumi:"description"`
|
|
// Storage Pool driver.
|
|
Driver string `pulumi:"driver"`
|
|
// The provider-assigned unique ID for this managed resource.
|
|
Id string `pulumi:"id"`
|
|
Name string `pulumi:"name"`
|
|
Remote *string `pulumi:"remote"`
|
|
// Status of the storage pool.
|
|
Status string `pulumi:"status"`
|
|
Target *string `pulumi:"target"`
|
|
}
|
|
|
|
func LookupStoragePoolOutput(ctx *pulumi.Context, args LookupStoragePoolOutputArgs, opts ...pulumi.InvokeOption) LookupStoragePoolResultOutput {
|
|
return pulumi.ToOutputWithContext(ctx.Context(), args).
|
|
ApplyT(func(v interface{}) (LookupStoragePoolResultOutput, error) {
|
|
args := v.(LookupStoragePoolArgs)
|
|
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
|
|
return ctx.InvokeOutput("incus:index/getStoragePool:getStoragePool", args, LookupStoragePoolResultOutput{}, options).(LookupStoragePoolResultOutput), nil
|
|
}).(LookupStoragePoolResultOutput)
|
|
}
|
|
|
|
// A collection of arguments for invoking getStoragePool.
|
|
type LookupStoragePoolOutputArgs struct {
|
|
// Description of the storage pool.
|
|
Description pulumi.StringPtrInput `pulumi:"description"`
|
|
// Storage Pool driver.
|
|
Driver pulumi.StringPtrInput `pulumi:"driver"`
|
|
// **Required** - Name of the storage pool.
|
|
Name pulumi.StringInput `pulumi:"name"`
|
|
// *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"`
|
|
// Status of the storage pool.
|
|
Status pulumi.StringPtrInput `pulumi:"status"`
|
|
// *Optional* - Specify a target node in a cluster.
|
|
Target pulumi.StringPtrInput `pulumi:"target"`
|
|
}
|
|
|
|
func (LookupStoragePoolOutputArgs) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*LookupStoragePoolArgs)(nil)).Elem()
|
|
}
|
|
|
|
// A collection of values returned by getStoragePool.
|
|
type LookupStoragePoolResultOutput struct{ *pulumi.OutputState }
|
|
|
|
func (LookupStoragePoolResultOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*LookupStoragePoolResult)(nil)).Elem()
|
|
}
|
|
|
|
func (o LookupStoragePoolResultOutput) ToLookupStoragePoolResultOutput() LookupStoragePoolResultOutput {
|
|
return o
|
|
}
|
|
|
|
func (o LookupStoragePoolResultOutput) ToLookupStoragePoolResultOutputWithContext(ctx context.Context) LookupStoragePoolResultOutput {
|
|
return o
|
|
}
|
|
|
|
// Map of key/value pairs of config settings.
|
|
// [storage pool config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/)
|
|
func (o LookupStoragePoolResultOutput) Config() pulumi.StringMapOutput {
|
|
return o.ApplyT(func(v LookupStoragePoolResult) map[string]string { return v.Config }).(pulumi.StringMapOutput)
|
|
}
|
|
|
|
// Description of the storage pool.
|
|
func (o LookupStoragePoolResultOutput) Description() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupStoragePoolResult) string { return v.Description }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// Storage Pool driver.
|
|
func (o LookupStoragePoolResultOutput) Driver() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupStoragePoolResult) string { return v.Driver }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// The provider-assigned unique ID for this managed resource.
|
|
func (o LookupStoragePoolResultOutput) Id() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupStoragePoolResult) string { return v.Id }).(pulumi.StringOutput)
|
|
}
|
|
|
|
func (o LookupStoragePoolResultOutput) Name() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupStoragePoolResult) string { return v.Name }).(pulumi.StringOutput)
|
|
}
|
|
|
|
func (o LookupStoragePoolResultOutput) Remote() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v LookupStoragePoolResult) *string { return v.Remote }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
// Status of the storage pool.
|
|
func (o LookupStoragePoolResultOutput) Status() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupStoragePoolResult) string { return v.Status }).(pulumi.StringOutput)
|
|
}
|
|
|
|
func (o LookupStoragePoolResultOutput) Target() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v LookupStoragePoolResult) *string { return v.Target }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
func init() {
|
|
pulumi.RegisterOutputType(LookupStoragePoolResultOutput{})
|
|
}
|