195 lines
7.3 KiB
Go
Generated
195 lines
7.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"
|
|
)
|
|
|
|
// ## # StorageBucket
|
|
//
|
|
// Provides information about an Incus storage bucket.
|
|
// See Incus storage bucket [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/storage_buckets/) 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.LookupStorageBucket(ctx, &incus.LookupStorageBucketArgs{
|
|
// Name: "default",
|
|
// StoragePool: "parent",
|
|
// }, nil)
|
|
// if err != nil {
|
|
// return err
|
|
// }
|
|
// ctx.Export("storageBucketName", this.Name)
|
|
// return nil
|
|
// })
|
|
// }
|
|
//
|
|
// ```
|
|
func LookupStorageBucket(ctx *pulumi.Context, args *LookupStorageBucketArgs, opts ...pulumi.InvokeOption) (*LookupStorageBucketResult, error) {
|
|
opts = internal.PkgInvokeDefaultOpts(opts)
|
|
var rv LookupStorageBucketResult
|
|
err := ctx.Invoke("incus:index/getStorageBucket:getStorageBucket", args, &rv, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &rv, nil
|
|
}
|
|
|
|
// A collection of arguments for invoking getStorageBucket.
|
|
type LookupStorageBucketArgs struct {
|
|
// Description of the storage bucket.
|
|
Description *string `pulumi:"description"`
|
|
// Location of the storage bucket.
|
|
Location *string `pulumi:"location"`
|
|
// **Required** - Name of the storage bucket.
|
|
Name string `pulumi:"name"`
|
|
// *Optional* - Name of the project where the storage bucket 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"`
|
|
// Storage Bucket S3 URL.
|
|
S3Url *string `pulumi:"s3Url"`
|
|
// **Required** - Name of the parent storage pool.
|
|
StoragePool string `pulumi:"storagePool"`
|
|
// *Optional* - Specify a target node in a cluster.
|
|
Target *string `pulumi:"target"`
|
|
}
|
|
|
|
// A collection of values returned by getStorageBucket.
|
|
type LookupStorageBucketResult struct {
|
|
// Map of key/value pairs of config settings.
|
|
// [storage bucket config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/)
|
|
Config map[string]string `pulumi:"config"`
|
|
// Description of the storage bucket.
|
|
Description string `pulumi:"description"`
|
|
// The provider-assigned unique ID for this managed resource.
|
|
Id string `pulumi:"id"`
|
|
// Location of the storage bucket.
|
|
Location string `pulumi:"location"`
|
|
Name string `pulumi:"name"`
|
|
Project *string `pulumi:"project"`
|
|
Remote *string `pulumi:"remote"`
|
|
// Storage Bucket S3 URL.
|
|
S3Url string `pulumi:"s3Url"`
|
|
StoragePool string `pulumi:"storagePool"`
|
|
Target *string `pulumi:"target"`
|
|
}
|
|
|
|
func LookupStorageBucketOutput(ctx *pulumi.Context, args LookupStorageBucketOutputArgs, opts ...pulumi.InvokeOption) LookupStorageBucketResultOutput {
|
|
return pulumi.ToOutputWithContext(ctx.Context(), args).
|
|
ApplyT(func(v interface{}) (LookupStorageBucketResultOutput, error) {
|
|
args := v.(LookupStorageBucketArgs)
|
|
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
|
|
return ctx.InvokeOutput("incus:index/getStorageBucket:getStorageBucket", args, LookupStorageBucketResultOutput{}, options).(LookupStorageBucketResultOutput), nil
|
|
}).(LookupStorageBucketResultOutput)
|
|
}
|
|
|
|
// A collection of arguments for invoking getStorageBucket.
|
|
type LookupStorageBucketOutputArgs struct {
|
|
// Description of the storage bucket.
|
|
Description pulumi.StringPtrInput `pulumi:"description"`
|
|
// Location of the storage bucket.
|
|
Location pulumi.StringPtrInput `pulumi:"location"`
|
|
// **Required** - Name of the storage bucket.
|
|
Name pulumi.StringInput `pulumi:"name"`
|
|
// *Optional* - Name of the project where the storage bucket 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"`
|
|
// Storage Bucket S3 URL.
|
|
S3Url pulumi.StringPtrInput `pulumi:"s3Url"`
|
|
// **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"`
|
|
}
|
|
|
|
func (LookupStorageBucketOutputArgs) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*LookupStorageBucketArgs)(nil)).Elem()
|
|
}
|
|
|
|
// A collection of values returned by getStorageBucket.
|
|
type LookupStorageBucketResultOutput struct{ *pulumi.OutputState }
|
|
|
|
func (LookupStorageBucketResultOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*LookupStorageBucketResult)(nil)).Elem()
|
|
}
|
|
|
|
func (o LookupStorageBucketResultOutput) ToLookupStorageBucketResultOutput() LookupStorageBucketResultOutput {
|
|
return o
|
|
}
|
|
|
|
func (o LookupStorageBucketResultOutput) ToLookupStorageBucketResultOutputWithContext(ctx context.Context) LookupStorageBucketResultOutput {
|
|
return o
|
|
}
|
|
|
|
// Map of key/value pairs of config settings.
|
|
// [storage bucket config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/)
|
|
func (o LookupStorageBucketResultOutput) Config() pulumi.StringMapOutput {
|
|
return o.ApplyT(func(v LookupStorageBucketResult) map[string]string { return v.Config }).(pulumi.StringMapOutput)
|
|
}
|
|
|
|
// Description of the storage bucket.
|
|
func (o LookupStorageBucketResultOutput) Description() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupStorageBucketResult) string { return v.Description }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// The provider-assigned unique ID for this managed resource.
|
|
func (o LookupStorageBucketResultOutput) Id() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupStorageBucketResult) string { return v.Id }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// Location of the storage bucket.
|
|
func (o LookupStorageBucketResultOutput) Location() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupStorageBucketResult) string { return v.Location }).(pulumi.StringOutput)
|
|
}
|
|
|
|
func (o LookupStorageBucketResultOutput) Name() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupStorageBucketResult) string { return v.Name }).(pulumi.StringOutput)
|
|
}
|
|
|
|
func (o LookupStorageBucketResultOutput) Project() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v LookupStorageBucketResult) *string { return v.Project }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
func (o LookupStorageBucketResultOutput) Remote() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v LookupStorageBucketResult) *string { return v.Remote }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
// Storage Bucket S3 URL.
|
|
func (o LookupStorageBucketResultOutput) S3Url() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupStorageBucketResult) string { return v.S3Url }).(pulumi.StringOutput)
|
|
}
|
|
|
|
func (o LookupStorageBucketResultOutput) StoragePool() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupStorageBucketResult) string { return v.StoragePool }).(pulumi.StringOutput)
|
|
}
|
|
|
|
func (o LookupStorageBucketResultOutput) Target() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v LookupStorageBucketResult) *string { return v.Target }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
func init() {
|
|
pulumi.RegisterOutputType(LookupStorageBucketResultOutput{})
|
|
}
|