357 lines
14 KiB
Go
Generated
357 lines
14 KiB
Go
Generated
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
|
|
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
|
|
|
|
package incus
|
|
|
|
import (
|
|
"context"
|
|
"reflect"
|
|
|
|
"errors"
|
|
|
|
"git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal"
|
|
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
|
|
)
|
|
|
|
type StorageBucket struct {
|
|
pulumi.CustomResourceState
|
|
|
|
// *Optional* - Map of key/value pairs of
|
|
// [storage bucket config settings](https://linuxcontainers.org/incus/docs/main/howto/storage_buckets/#configure-storage-bucket-settings).
|
|
// Config settings vary depending on the Storage Pool used.
|
|
Config pulumi.StringMapOutput `pulumi:"config"`
|
|
// *Optional* - Description of the storage bucket.
|
|
Description pulumi.StringOutput `pulumi:"description"`
|
|
// Name of the node where storage bucket was created. It could be useful with Incus in cluster mode.
|
|
Location pulumi.StringOutput `pulumi:"location"`
|
|
// **Required** - Name of the storage bucket.
|
|
Name pulumi.StringOutput `pulumi:"name"`
|
|
// **Required** - Name of storage pool to host the storage bucket.
|
|
Pool pulumi.StringOutput `pulumi:"pool"`
|
|
// *Optional* - Name of the project where the storage bucket will be stored.
|
|
Project pulumi.StringOutput `pulumi:"project"`
|
|
// *Optional* - The remote in which the resource will be created. If
|
|
// not provided, the provider's default remote will be used.
|
|
Remote pulumi.StringPtrOutput `pulumi:"remote"`
|
|
// *Optional* - Path to a backup file from which the bucket will be created.
|
|
SourceFile pulumi.StringPtrOutput `pulumi:"sourceFile"`
|
|
// *Optional* - Specify a target node in a cluster.
|
|
Target pulumi.StringOutput `pulumi:"target"`
|
|
}
|
|
|
|
// NewStorageBucket registers a new resource with the given unique name, arguments, and options.
|
|
func NewStorageBucket(ctx *pulumi.Context,
|
|
name string, args *StorageBucketArgs, opts ...pulumi.ResourceOption) (*StorageBucket, error) {
|
|
if args == nil {
|
|
return nil, errors.New("missing one or more required arguments")
|
|
}
|
|
|
|
if args.Pool == nil {
|
|
return nil, errors.New("invalid value for required argument 'Pool'")
|
|
}
|
|
if args.Project == nil {
|
|
args.Project = pulumi.StringPtr("default")
|
|
}
|
|
opts = internal.PkgResourceDefaultOpts(opts)
|
|
var resource StorageBucket
|
|
err := ctx.RegisterResource("incus:index/storageBucket:StorageBucket", name, args, &resource, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &resource, nil
|
|
}
|
|
|
|
// GetStorageBucket gets an existing StorageBucket resource's state with the given name, ID, and optional
|
|
// state properties that are used to uniquely qualify the lookup (nil if not required).
|
|
func GetStorageBucket(ctx *pulumi.Context,
|
|
name string, id pulumi.IDInput, state *StorageBucketState, opts ...pulumi.ResourceOption) (*StorageBucket, error) {
|
|
var resource StorageBucket
|
|
err := ctx.ReadResource("incus:index/storageBucket:StorageBucket", name, id, state, &resource, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &resource, nil
|
|
}
|
|
|
|
// Input properties used for looking up and filtering StorageBucket resources.
|
|
type storageBucketState struct {
|
|
// *Optional* - Map of key/value pairs of
|
|
// [storage bucket config settings](https://linuxcontainers.org/incus/docs/main/howto/storage_buckets/#configure-storage-bucket-settings).
|
|
// Config settings vary depending on the Storage Pool used.
|
|
Config map[string]string `pulumi:"config"`
|
|
// *Optional* - Description of the storage bucket.
|
|
Description *string `pulumi:"description"`
|
|
// Name of the node where storage bucket was created. It could be useful with Incus in cluster mode.
|
|
Location *string `pulumi:"location"`
|
|
// **Required** - Name of the storage bucket.
|
|
Name *string `pulumi:"name"`
|
|
// **Required** - Name of storage pool to host the storage bucket.
|
|
Pool *string `pulumi:"pool"`
|
|
// *Optional* - Name of the project where the storage bucket will be stored.
|
|
Project *string `pulumi:"project"`
|
|
// *Optional* - The remote in which the resource will be created. If
|
|
// not provided, the provider's default remote will be used.
|
|
Remote *string `pulumi:"remote"`
|
|
// *Optional* - Path to a backup file from which the bucket will be created.
|
|
SourceFile *string `pulumi:"sourceFile"`
|
|
// *Optional* - Specify a target node in a cluster.
|
|
Target *string `pulumi:"target"`
|
|
}
|
|
|
|
type StorageBucketState struct {
|
|
// *Optional* - Map of key/value pairs of
|
|
// [storage bucket config settings](https://linuxcontainers.org/incus/docs/main/howto/storage_buckets/#configure-storage-bucket-settings).
|
|
// Config settings vary depending on the Storage Pool used.
|
|
Config pulumi.StringMapInput
|
|
// *Optional* - Description of the storage bucket.
|
|
Description pulumi.StringPtrInput
|
|
// Name of the node where storage bucket was created. It could be useful with Incus in cluster mode.
|
|
Location pulumi.StringPtrInput
|
|
// **Required** - Name of the storage bucket.
|
|
Name pulumi.StringPtrInput
|
|
// **Required** - Name of storage pool to host the storage bucket.
|
|
Pool pulumi.StringPtrInput
|
|
// *Optional* - Name of the project where the storage bucket will be stored.
|
|
Project pulumi.StringPtrInput
|
|
// *Optional* - The remote in which the resource will be created. If
|
|
// not provided, the provider's default remote will be used.
|
|
Remote pulumi.StringPtrInput
|
|
// *Optional* - Path to a backup file from which the bucket will be created.
|
|
SourceFile pulumi.StringPtrInput
|
|
// *Optional* - Specify a target node in a cluster.
|
|
Target pulumi.StringPtrInput
|
|
}
|
|
|
|
func (StorageBucketState) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*storageBucketState)(nil)).Elem()
|
|
}
|
|
|
|
type storageBucketArgs struct {
|
|
// *Optional* - Map of key/value pairs of
|
|
// [storage bucket config settings](https://linuxcontainers.org/incus/docs/main/howto/storage_buckets/#configure-storage-bucket-settings).
|
|
// Config settings vary depending on the Storage Pool used.
|
|
Config map[string]string `pulumi:"config"`
|
|
// *Optional* - Description of the storage bucket.
|
|
Description *string `pulumi:"description"`
|
|
// **Required** - Name of the storage bucket.
|
|
Name *string `pulumi:"name"`
|
|
// **Required** - Name of storage pool to host the storage bucket.
|
|
Pool string `pulumi:"pool"`
|
|
// *Optional* - Name of the project where the storage bucket will be stored.
|
|
Project *string `pulumi:"project"`
|
|
// *Optional* - The remote in which the resource will be created. If
|
|
// not provided, the provider's default remote will be used.
|
|
Remote *string `pulumi:"remote"`
|
|
// *Optional* - Path to a backup file from which the bucket will be created.
|
|
SourceFile *string `pulumi:"sourceFile"`
|
|
// *Optional* - Specify a target node in a cluster.
|
|
Target *string `pulumi:"target"`
|
|
}
|
|
|
|
// The set of arguments for constructing a StorageBucket resource.
|
|
type StorageBucketArgs struct {
|
|
// *Optional* - Map of key/value pairs of
|
|
// [storage bucket config settings](https://linuxcontainers.org/incus/docs/main/howto/storage_buckets/#configure-storage-bucket-settings).
|
|
// Config settings vary depending on the Storage Pool used.
|
|
Config pulumi.StringMapInput
|
|
// *Optional* - Description of the storage bucket.
|
|
Description pulumi.StringPtrInput
|
|
// **Required** - Name of the storage bucket.
|
|
Name pulumi.StringPtrInput
|
|
// **Required** - Name of storage pool to host the storage bucket.
|
|
Pool pulumi.StringInput
|
|
// *Optional* - Name of the project where the storage bucket will be stored.
|
|
Project pulumi.StringPtrInput
|
|
// *Optional* - The remote in which the resource will be created. If
|
|
// not provided, the provider's default remote will be used.
|
|
Remote pulumi.StringPtrInput
|
|
// *Optional* - Path to a backup file from which the bucket will be created.
|
|
SourceFile pulumi.StringPtrInput
|
|
// *Optional* - Specify a target node in a cluster.
|
|
Target pulumi.StringPtrInput
|
|
}
|
|
|
|
func (StorageBucketArgs) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*storageBucketArgs)(nil)).Elem()
|
|
}
|
|
|
|
type StorageBucketInput interface {
|
|
pulumi.Input
|
|
|
|
ToStorageBucketOutput() StorageBucketOutput
|
|
ToStorageBucketOutputWithContext(ctx context.Context) StorageBucketOutput
|
|
}
|
|
|
|
func (*StorageBucket) ElementType() reflect.Type {
|
|
return reflect.TypeOf((**StorageBucket)(nil)).Elem()
|
|
}
|
|
|
|
func (i *StorageBucket) ToStorageBucketOutput() StorageBucketOutput {
|
|
return i.ToStorageBucketOutputWithContext(context.Background())
|
|
}
|
|
|
|
func (i *StorageBucket) ToStorageBucketOutputWithContext(ctx context.Context) StorageBucketOutput {
|
|
return pulumi.ToOutputWithContext(ctx, i).(StorageBucketOutput)
|
|
}
|
|
|
|
// StorageBucketArrayInput is an input type that accepts StorageBucketArray and StorageBucketArrayOutput values.
|
|
// You can construct a concrete instance of `StorageBucketArrayInput` via:
|
|
//
|
|
// StorageBucketArray{ StorageBucketArgs{...} }
|
|
type StorageBucketArrayInput interface {
|
|
pulumi.Input
|
|
|
|
ToStorageBucketArrayOutput() StorageBucketArrayOutput
|
|
ToStorageBucketArrayOutputWithContext(context.Context) StorageBucketArrayOutput
|
|
}
|
|
|
|
type StorageBucketArray []StorageBucketInput
|
|
|
|
func (StorageBucketArray) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*[]*StorageBucket)(nil)).Elem()
|
|
}
|
|
|
|
func (i StorageBucketArray) ToStorageBucketArrayOutput() StorageBucketArrayOutput {
|
|
return i.ToStorageBucketArrayOutputWithContext(context.Background())
|
|
}
|
|
|
|
func (i StorageBucketArray) ToStorageBucketArrayOutputWithContext(ctx context.Context) StorageBucketArrayOutput {
|
|
return pulumi.ToOutputWithContext(ctx, i).(StorageBucketArrayOutput)
|
|
}
|
|
|
|
// StorageBucketMapInput is an input type that accepts StorageBucketMap and StorageBucketMapOutput values.
|
|
// You can construct a concrete instance of `StorageBucketMapInput` via:
|
|
//
|
|
// StorageBucketMap{ "key": StorageBucketArgs{...} }
|
|
type StorageBucketMapInput interface {
|
|
pulumi.Input
|
|
|
|
ToStorageBucketMapOutput() StorageBucketMapOutput
|
|
ToStorageBucketMapOutputWithContext(context.Context) StorageBucketMapOutput
|
|
}
|
|
|
|
type StorageBucketMap map[string]StorageBucketInput
|
|
|
|
func (StorageBucketMap) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*map[string]*StorageBucket)(nil)).Elem()
|
|
}
|
|
|
|
func (i StorageBucketMap) ToStorageBucketMapOutput() StorageBucketMapOutput {
|
|
return i.ToStorageBucketMapOutputWithContext(context.Background())
|
|
}
|
|
|
|
func (i StorageBucketMap) ToStorageBucketMapOutputWithContext(ctx context.Context) StorageBucketMapOutput {
|
|
return pulumi.ToOutputWithContext(ctx, i).(StorageBucketMapOutput)
|
|
}
|
|
|
|
type StorageBucketOutput struct{ *pulumi.OutputState }
|
|
|
|
func (StorageBucketOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((**StorageBucket)(nil)).Elem()
|
|
}
|
|
|
|
func (o StorageBucketOutput) ToStorageBucketOutput() StorageBucketOutput {
|
|
return o
|
|
}
|
|
|
|
func (o StorageBucketOutput) ToStorageBucketOutputWithContext(ctx context.Context) StorageBucketOutput {
|
|
return o
|
|
}
|
|
|
|
// *Optional* - Map of key/value pairs of
|
|
// [storage bucket config settings](https://linuxcontainers.org/incus/docs/main/howto/storage_buckets/#configure-storage-bucket-settings).
|
|
// Config settings vary depending on the Storage Pool used.
|
|
func (o StorageBucketOutput) Config() pulumi.StringMapOutput {
|
|
return o.ApplyT(func(v *StorageBucket) pulumi.StringMapOutput { return v.Config }).(pulumi.StringMapOutput)
|
|
}
|
|
|
|
// *Optional* - Description of the storage bucket.
|
|
func (o StorageBucketOutput) Description() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *StorageBucket) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// Name of the node where storage bucket was created. It could be useful with Incus in cluster mode.
|
|
func (o StorageBucketOutput) Location() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *StorageBucket) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// **Required** - Name of the storage bucket.
|
|
func (o StorageBucketOutput) Name() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *StorageBucket) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// **Required** - Name of storage pool to host the storage bucket.
|
|
func (o StorageBucketOutput) Pool() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *StorageBucket) pulumi.StringOutput { return v.Pool }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// *Optional* - Name of the project where the storage bucket will be stored.
|
|
func (o StorageBucketOutput) Project() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *StorageBucket) pulumi.StringOutput { return v.Project }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// *Optional* - The remote in which the resource will be created. If
|
|
// not provided, the provider's default remote will be used.
|
|
func (o StorageBucketOutput) Remote() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v *StorageBucket) pulumi.StringPtrOutput { return v.Remote }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
// *Optional* - Path to a backup file from which the bucket will be created.
|
|
func (o StorageBucketOutput) SourceFile() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v *StorageBucket) pulumi.StringPtrOutput { return v.SourceFile }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
// *Optional* - Specify a target node in a cluster.
|
|
func (o StorageBucketOutput) Target() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *StorageBucket) pulumi.StringOutput { return v.Target }).(pulumi.StringOutput)
|
|
}
|
|
|
|
type StorageBucketArrayOutput struct{ *pulumi.OutputState }
|
|
|
|
func (StorageBucketArrayOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*[]*StorageBucket)(nil)).Elem()
|
|
}
|
|
|
|
func (o StorageBucketArrayOutput) ToStorageBucketArrayOutput() StorageBucketArrayOutput {
|
|
return o
|
|
}
|
|
|
|
func (o StorageBucketArrayOutput) ToStorageBucketArrayOutputWithContext(ctx context.Context) StorageBucketArrayOutput {
|
|
return o
|
|
}
|
|
|
|
func (o StorageBucketArrayOutput) Index(i pulumi.IntInput) StorageBucketOutput {
|
|
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *StorageBucket {
|
|
return vs[0].([]*StorageBucket)[vs[1].(int)]
|
|
}).(StorageBucketOutput)
|
|
}
|
|
|
|
type StorageBucketMapOutput struct{ *pulumi.OutputState }
|
|
|
|
func (StorageBucketMapOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*map[string]*StorageBucket)(nil)).Elem()
|
|
}
|
|
|
|
func (o StorageBucketMapOutput) ToStorageBucketMapOutput() StorageBucketMapOutput {
|
|
return o
|
|
}
|
|
|
|
func (o StorageBucketMapOutput) ToStorageBucketMapOutputWithContext(ctx context.Context) StorageBucketMapOutput {
|
|
return o
|
|
}
|
|
|
|
func (o StorageBucketMapOutput) MapIndex(k pulumi.StringInput) StorageBucketOutput {
|
|
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *StorageBucket {
|
|
return vs[0].(map[string]*StorageBucket)[vs[1].(string)]
|
|
}).(StorageBucketOutput)
|
|
}
|
|
|
|
func init() {
|
|
pulumi.RegisterInputType(reflect.TypeOf((*StorageBucketInput)(nil)).Elem(), &StorageBucket{})
|
|
pulumi.RegisterInputType(reflect.TypeOf((*StorageBucketArrayInput)(nil)).Elem(), StorageBucketArray{})
|
|
pulumi.RegisterInputType(reflect.TypeOf((*StorageBucketMapInput)(nil)).Elem(), StorageBucketMap{})
|
|
pulumi.RegisterOutputType(StorageBucketOutput{})
|
|
pulumi.RegisterOutputType(StorageBucketArrayOutput{})
|
|
pulumi.RegisterOutputType(StorageBucketMapOutput{})
|
|
}
|