355 lines
15 KiB
Go
Generated
355 lines
15 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 StorageBucketKey struct {
|
|
pulumi.CustomResourceState
|
|
|
|
// Access key of the storage bucket key.
|
|
AccessKey pulumi.StringOutput `pulumi:"accessKey"`
|
|
// *Optional* - Description of the storage bucket key.
|
|
Description pulumi.StringOutput `pulumi:"description"`
|
|
// **Required** - Name of the storage bucket key.
|
|
Name pulumi.StringOutput `pulumi:"name"`
|
|
// **Required** - Name of storage pool to host the storage bucket key.
|
|
Pool pulumi.StringOutput `pulumi:"pool"`
|
|
// *Optional* - Name of the project where the storage bucket key 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* - Name of the role that controls the access rights for the
|
|
// key. If not specified, the default role is used, as described in the [official documentation](https://linuxcontainers.org/incus/docs/main/howto/storage_buckets/#manage-storage-bucket-keys).
|
|
Role pulumi.StringOutput `pulumi:"role"`
|
|
// Secret key of the storage bucket key.
|
|
SecretKey pulumi.StringOutput `pulumi:"secretKey"`
|
|
// **Required** - Name of the storage bucket.
|
|
StorageBucket pulumi.StringOutput `pulumi:"storageBucket"`
|
|
}
|
|
|
|
// NewStorageBucketKey registers a new resource with the given unique name, arguments, and options.
|
|
func NewStorageBucketKey(ctx *pulumi.Context,
|
|
name string, args *StorageBucketKeyArgs, opts ...pulumi.ResourceOption) (*StorageBucketKey, 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.StorageBucket == nil {
|
|
return nil, errors.New("invalid value for required argument 'StorageBucket'")
|
|
}
|
|
if args.Project == nil {
|
|
args.Project = pulumi.StringPtr("default")
|
|
}
|
|
secrets := pulumi.AdditionalSecretOutputs([]string{
|
|
"accessKey",
|
|
"secretKey",
|
|
})
|
|
opts = append(opts, secrets)
|
|
opts = internal.PkgResourceDefaultOpts(opts)
|
|
var resource StorageBucketKey
|
|
err := ctx.RegisterResource("incus:index/storageBucketKey:StorageBucketKey", name, args, &resource, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &resource, nil
|
|
}
|
|
|
|
// GetStorageBucketKey gets an existing StorageBucketKey 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 GetStorageBucketKey(ctx *pulumi.Context,
|
|
name string, id pulumi.IDInput, state *StorageBucketKeyState, opts ...pulumi.ResourceOption) (*StorageBucketKey, error) {
|
|
var resource StorageBucketKey
|
|
err := ctx.ReadResource("incus:index/storageBucketKey:StorageBucketKey", name, id, state, &resource, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &resource, nil
|
|
}
|
|
|
|
// Input properties used for looking up and filtering StorageBucketKey resources.
|
|
type storageBucketKeyState struct {
|
|
// Access key of the storage bucket key.
|
|
AccessKey *string `pulumi:"accessKey"`
|
|
// *Optional* - Description of the storage bucket key.
|
|
Description *string `pulumi:"description"`
|
|
// **Required** - Name of the storage bucket key.
|
|
Name *string `pulumi:"name"`
|
|
// **Required** - Name of storage pool to host the storage bucket key.
|
|
Pool *string `pulumi:"pool"`
|
|
// *Optional* - Name of the project where the storage bucket key 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* - Name of the role that controls the access rights for the
|
|
// key. If not specified, the default role is used, as described in the [official documentation](https://linuxcontainers.org/incus/docs/main/howto/storage_buckets/#manage-storage-bucket-keys).
|
|
Role *string `pulumi:"role"`
|
|
// Secret key of the storage bucket key.
|
|
SecretKey *string `pulumi:"secretKey"`
|
|
// **Required** - Name of the storage bucket.
|
|
StorageBucket *string `pulumi:"storageBucket"`
|
|
}
|
|
|
|
type StorageBucketKeyState struct {
|
|
// Access key of the storage bucket key.
|
|
AccessKey pulumi.StringPtrInput
|
|
// *Optional* - Description of the storage bucket key.
|
|
Description pulumi.StringPtrInput
|
|
// **Required** - Name of the storage bucket key.
|
|
Name pulumi.StringPtrInput
|
|
// **Required** - Name of storage pool to host the storage bucket key.
|
|
Pool pulumi.StringPtrInput
|
|
// *Optional* - Name of the project where the storage bucket key 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* - Name of the role that controls the access rights for the
|
|
// key. If not specified, the default role is used, as described in the [official documentation](https://linuxcontainers.org/incus/docs/main/howto/storage_buckets/#manage-storage-bucket-keys).
|
|
Role pulumi.StringPtrInput
|
|
// Secret key of the storage bucket key.
|
|
SecretKey pulumi.StringPtrInput
|
|
// **Required** - Name of the storage bucket.
|
|
StorageBucket pulumi.StringPtrInput
|
|
}
|
|
|
|
func (StorageBucketKeyState) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*storageBucketKeyState)(nil)).Elem()
|
|
}
|
|
|
|
type storageBucketKeyArgs struct {
|
|
// *Optional* - Description of the storage bucket key.
|
|
Description *string `pulumi:"description"`
|
|
// **Required** - Name of the storage bucket key.
|
|
Name *string `pulumi:"name"`
|
|
// **Required** - Name of storage pool to host the storage bucket key.
|
|
Pool string `pulumi:"pool"`
|
|
// *Optional* - Name of the project where the storage bucket key 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* - Name of the role that controls the access rights for the
|
|
// key. If not specified, the default role is used, as described in the [official documentation](https://linuxcontainers.org/incus/docs/main/howto/storage_buckets/#manage-storage-bucket-keys).
|
|
Role *string `pulumi:"role"`
|
|
// **Required** - Name of the storage bucket.
|
|
StorageBucket string `pulumi:"storageBucket"`
|
|
}
|
|
|
|
// The set of arguments for constructing a StorageBucketKey resource.
|
|
type StorageBucketKeyArgs struct {
|
|
// *Optional* - Description of the storage bucket key.
|
|
Description pulumi.StringPtrInput
|
|
// **Required** - Name of the storage bucket key.
|
|
Name pulumi.StringPtrInput
|
|
// **Required** - Name of storage pool to host the storage bucket key.
|
|
Pool pulumi.StringInput
|
|
// *Optional* - Name of the project where the storage bucket key 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* - Name of the role that controls the access rights for the
|
|
// key. If not specified, the default role is used, as described in the [official documentation](https://linuxcontainers.org/incus/docs/main/howto/storage_buckets/#manage-storage-bucket-keys).
|
|
Role pulumi.StringPtrInput
|
|
// **Required** - Name of the storage bucket.
|
|
StorageBucket pulumi.StringInput
|
|
}
|
|
|
|
func (StorageBucketKeyArgs) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*storageBucketKeyArgs)(nil)).Elem()
|
|
}
|
|
|
|
type StorageBucketKeyInput interface {
|
|
pulumi.Input
|
|
|
|
ToStorageBucketKeyOutput() StorageBucketKeyOutput
|
|
ToStorageBucketKeyOutputWithContext(ctx context.Context) StorageBucketKeyOutput
|
|
}
|
|
|
|
func (*StorageBucketKey) ElementType() reflect.Type {
|
|
return reflect.TypeOf((**StorageBucketKey)(nil)).Elem()
|
|
}
|
|
|
|
func (i *StorageBucketKey) ToStorageBucketKeyOutput() StorageBucketKeyOutput {
|
|
return i.ToStorageBucketKeyOutputWithContext(context.Background())
|
|
}
|
|
|
|
func (i *StorageBucketKey) ToStorageBucketKeyOutputWithContext(ctx context.Context) StorageBucketKeyOutput {
|
|
return pulumi.ToOutputWithContext(ctx, i).(StorageBucketKeyOutput)
|
|
}
|
|
|
|
// StorageBucketKeyArrayInput is an input type that accepts StorageBucketKeyArray and StorageBucketKeyArrayOutput values.
|
|
// You can construct a concrete instance of `StorageBucketKeyArrayInput` via:
|
|
//
|
|
// StorageBucketKeyArray{ StorageBucketKeyArgs{...} }
|
|
type StorageBucketKeyArrayInput interface {
|
|
pulumi.Input
|
|
|
|
ToStorageBucketKeyArrayOutput() StorageBucketKeyArrayOutput
|
|
ToStorageBucketKeyArrayOutputWithContext(context.Context) StorageBucketKeyArrayOutput
|
|
}
|
|
|
|
type StorageBucketKeyArray []StorageBucketKeyInput
|
|
|
|
func (StorageBucketKeyArray) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*[]*StorageBucketKey)(nil)).Elem()
|
|
}
|
|
|
|
func (i StorageBucketKeyArray) ToStorageBucketKeyArrayOutput() StorageBucketKeyArrayOutput {
|
|
return i.ToStorageBucketKeyArrayOutputWithContext(context.Background())
|
|
}
|
|
|
|
func (i StorageBucketKeyArray) ToStorageBucketKeyArrayOutputWithContext(ctx context.Context) StorageBucketKeyArrayOutput {
|
|
return pulumi.ToOutputWithContext(ctx, i).(StorageBucketKeyArrayOutput)
|
|
}
|
|
|
|
// StorageBucketKeyMapInput is an input type that accepts StorageBucketKeyMap and StorageBucketKeyMapOutput values.
|
|
// You can construct a concrete instance of `StorageBucketKeyMapInput` via:
|
|
//
|
|
// StorageBucketKeyMap{ "key": StorageBucketKeyArgs{...} }
|
|
type StorageBucketKeyMapInput interface {
|
|
pulumi.Input
|
|
|
|
ToStorageBucketKeyMapOutput() StorageBucketKeyMapOutput
|
|
ToStorageBucketKeyMapOutputWithContext(context.Context) StorageBucketKeyMapOutput
|
|
}
|
|
|
|
type StorageBucketKeyMap map[string]StorageBucketKeyInput
|
|
|
|
func (StorageBucketKeyMap) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*map[string]*StorageBucketKey)(nil)).Elem()
|
|
}
|
|
|
|
func (i StorageBucketKeyMap) ToStorageBucketKeyMapOutput() StorageBucketKeyMapOutput {
|
|
return i.ToStorageBucketKeyMapOutputWithContext(context.Background())
|
|
}
|
|
|
|
func (i StorageBucketKeyMap) ToStorageBucketKeyMapOutputWithContext(ctx context.Context) StorageBucketKeyMapOutput {
|
|
return pulumi.ToOutputWithContext(ctx, i).(StorageBucketKeyMapOutput)
|
|
}
|
|
|
|
type StorageBucketKeyOutput struct{ *pulumi.OutputState }
|
|
|
|
func (StorageBucketKeyOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((**StorageBucketKey)(nil)).Elem()
|
|
}
|
|
|
|
func (o StorageBucketKeyOutput) ToStorageBucketKeyOutput() StorageBucketKeyOutput {
|
|
return o
|
|
}
|
|
|
|
func (o StorageBucketKeyOutput) ToStorageBucketKeyOutputWithContext(ctx context.Context) StorageBucketKeyOutput {
|
|
return o
|
|
}
|
|
|
|
// Access key of the storage bucket key.
|
|
func (o StorageBucketKeyOutput) AccessKey() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *StorageBucketKey) pulumi.StringOutput { return v.AccessKey }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// *Optional* - Description of the storage bucket key.
|
|
func (o StorageBucketKeyOutput) Description() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *StorageBucketKey) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// **Required** - Name of the storage bucket key.
|
|
func (o StorageBucketKeyOutput) Name() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *StorageBucketKey) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// **Required** - Name of storage pool to host the storage bucket key.
|
|
func (o StorageBucketKeyOutput) Pool() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *StorageBucketKey) pulumi.StringOutput { return v.Pool }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// *Optional* - Name of the project where the storage bucket key will be stored.
|
|
func (o StorageBucketKeyOutput) Project() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *StorageBucketKey) 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 StorageBucketKeyOutput) Remote() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v *StorageBucketKey) pulumi.StringPtrOutput { return v.Remote }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
// *Optional* - Name of the role that controls the access rights for the
|
|
// key. If not specified, the default role is used, as described in the [official documentation](https://linuxcontainers.org/incus/docs/main/howto/storage_buckets/#manage-storage-bucket-keys).
|
|
func (o StorageBucketKeyOutput) Role() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *StorageBucketKey) pulumi.StringOutput { return v.Role }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// Secret key of the storage bucket key.
|
|
func (o StorageBucketKeyOutput) SecretKey() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *StorageBucketKey) pulumi.StringOutput { return v.SecretKey }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// **Required** - Name of the storage bucket.
|
|
func (o StorageBucketKeyOutput) StorageBucket() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *StorageBucketKey) pulumi.StringOutput { return v.StorageBucket }).(pulumi.StringOutput)
|
|
}
|
|
|
|
type StorageBucketKeyArrayOutput struct{ *pulumi.OutputState }
|
|
|
|
func (StorageBucketKeyArrayOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*[]*StorageBucketKey)(nil)).Elem()
|
|
}
|
|
|
|
func (o StorageBucketKeyArrayOutput) ToStorageBucketKeyArrayOutput() StorageBucketKeyArrayOutput {
|
|
return o
|
|
}
|
|
|
|
func (o StorageBucketKeyArrayOutput) ToStorageBucketKeyArrayOutputWithContext(ctx context.Context) StorageBucketKeyArrayOutput {
|
|
return o
|
|
}
|
|
|
|
func (o StorageBucketKeyArrayOutput) Index(i pulumi.IntInput) StorageBucketKeyOutput {
|
|
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *StorageBucketKey {
|
|
return vs[0].([]*StorageBucketKey)[vs[1].(int)]
|
|
}).(StorageBucketKeyOutput)
|
|
}
|
|
|
|
type StorageBucketKeyMapOutput struct{ *pulumi.OutputState }
|
|
|
|
func (StorageBucketKeyMapOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*map[string]*StorageBucketKey)(nil)).Elem()
|
|
}
|
|
|
|
func (o StorageBucketKeyMapOutput) ToStorageBucketKeyMapOutput() StorageBucketKeyMapOutput {
|
|
return o
|
|
}
|
|
|
|
func (o StorageBucketKeyMapOutput) ToStorageBucketKeyMapOutputWithContext(ctx context.Context) StorageBucketKeyMapOutput {
|
|
return o
|
|
}
|
|
|
|
func (o StorageBucketKeyMapOutput) MapIndex(k pulumi.StringInput) StorageBucketKeyOutput {
|
|
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *StorageBucketKey {
|
|
return vs[0].(map[string]*StorageBucketKey)[vs[1].(string)]
|
|
}).(StorageBucketKeyOutput)
|
|
}
|
|
|
|
func init() {
|
|
pulumi.RegisterInputType(reflect.TypeOf((*StorageBucketKeyInput)(nil)).Elem(), &StorageBucketKey{})
|
|
pulumi.RegisterInputType(reflect.TypeOf((*StorageBucketKeyArrayInput)(nil)).Elem(), StorageBucketKeyArray{})
|
|
pulumi.RegisterInputType(reflect.TypeOf((*StorageBucketKeyMapInput)(nil)).Elem(), StorageBucketKeyMap{})
|
|
pulumi.RegisterOutputType(StorageBucketKeyOutput{})
|
|
pulumi.RegisterOutputType(StorageBucketKeyArrayOutput{})
|
|
pulumi.RegisterOutputType(StorageBucketKeyMapOutput{})
|
|
}
|