305 lines
11 KiB
Go
Generated
305 lines
11 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"
|
|
|
|
"git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal"
|
|
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
|
|
)
|
|
|
|
type Profile struct {
|
|
pulumi.CustomResourceState
|
|
|
|
// *Optional* - Map of key/value pairs of
|
|
// [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/).
|
|
Config pulumi.StringMapOutput `pulumi:"config"`
|
|
// *Optional* - Description of the profile.
|
|
Description pulumi.StringOutput `pulumi:"description"`
|
|
// *Optional* - Device definition. See reference below.
|
|
Devices ProfileDeviceArrayOutput `pulumi:"devices"`
|
|
// **Required** - Name of the profile.
|
|
Name pulumi.StringOutput `pulumi:"name"`
|
|
// *Optional* - Name of the project where the profile 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"`
|
|
}
|
|
|
|
// NewProfile registers a new resource with the given unique name, arguments, and options.
|
|
func NewProfile(ctx *pulumi.Context,
|
|
name string, args *ProfileArgs, opts ...pulumi.ResourceOption) (*Profile, error) {
|
|
if args == nil {
|
|
args = &ProfileArgs{}
|
|
}
|
|
|
|
if args.Project == nil {
|
|
args.Project = pulumi.StringPtr("default")
|
|
}
|
|
opts = internal.PkgResourceDefaultOpts(opts)
|
|
var resource Profile
|
|
err := ctx.RegisterResource("incus:index/profile:Profile", name, args, &resource, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &resource, nil
|
|
}
|
|
|
|
// GetProfile gets an existing Profile 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 GetProfile(ctx *pulumi.Context,
|
|
name string, id pulumi.IDInput, state *ProfileState, opts ...pulumi.ResourceOption) (*Profile, error) {
|
|
var resource Profile
|
|
err := ctx.ReadResource("incus:index/profile:Profile", name, id, state, &resource, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &resource, nil
|
|
}
|
|
|
|
// Input properties used for looking up and filtering Profile resources.
|
|
type profileState struct {
|
|
// *Optional* - Map of key/value pairs of
|
|
// [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/).
|
|
Config map[string]string `pulumi:"config"`
|
|
// *Optional* - Description of the profile.
|
|
Description *string `pulumi:"description"`
|
|
// *Optional* - Device definition. See reference below.
|
|
Devices []ProfileDevice `pulumi:"devices"`
|
|
// **Required** - Name of the profile.
|
|
Name *string `pulumi:"name"`
|
|
// *Optional* - Name of the project where the profile 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"`
|
|
}
|
|
|
|
type ProfileState struct {
|
|
// *Optional* - Map of key/value pairs of
|
|
// [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/).
|
|
Config pulumi.StringMapInput
|
|
// *Optional* - Description of the profile.
|
|
Description pulumi.StringPtrInput
|
|
// *Optional* - Device definition. See reference below.
|
|
Devices ProfileDeviceArrayInput
|
|
// **Required** - Name of the profile.
|
|
Name pulumi.StringPtrInput
|
|
// *Optional* - Name of the project where the profile 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
|
|
}
|
|
|
|
func (ProfileState) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*profileState)(nil)).Elem()
|
|
}
|
|
|
|
type profileArgs struct {
|
|
// *Optional* - Map of key/value pairs of
|
|
// [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/).
|
|
Config map[string]string `pulumi:"config"`
|
|
// *Optional* - Description of the profile.
|
|
Description *string `pulumi:"description"`
|
|
// *Optional* - Device definition. See reference below.
|
|
Devices []ProfileDevice `pulumi:"devices"`
|
|
// **Required** - Name of the profile.
|
|
Name *string `pulumi:"name"`
|
|
// *Optional* - Name of the project where the profile 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"`
|
|
}
|
|
|
|
// The set of arguments for constructing a Profile resource.
|
|
type ProfileArgs struct {
|
|
// *Optional* - Map of key/value pairs of
|
|
// [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/).
|
|
Config pulumi.StringMapInput
|
|
// *Optional* - Description of the profile.
|
|
Description pulumi.StringPtrInput
|
|
// *Optional* - Device definition. See reference below.
|
|
Devices ProfileDeviceArrayInput
|
|
// **Required** - Name of the profile.
|
|
Name pulumi.StringPtrInput
|
|
// *Optional* - Name of the project where the profile 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
|
|
}
|
|
|
|
func (ProfileArgs) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*profileArgs)(nil)).Elem()
|
|
}
|
|
|
|
type ProfileInput interface {
|
|
pulumi.Input
|
|
|
|
ToProfileOutput() ProfileOutput
|
|
ToProfileOutputWithContext(ctx context.Context) ProfileOutput
|
|
}
|
|
|
|
func (*Profile) ElementType() reflect.Type {
|
|
return reflect.TypeOf((**Profile)(nil)).Elem()
|
|
}
|
|
|
|
func (i *Profile) ToProfileOutput() ProfileOutput {
|
|
return i.ToProfileOutputWithContext(context.Background())
|
|
}
|
|
|
|
func (i *Profile) ToProfileOutputWithContext(ctx context.Context) ProfileOutput {
|
|
return pulumi.ToOutputWithContext(ctx, i).(ProfileOutput)
|
|
}
|
|
|
|
// ProfileArrayInput is an input type that accepts ProfileArray and ProfileArrayOutput values.
|
|
// You can construct a concrete instance of `ProfileArrayInput` via:
|
|
//
|
|
// ProfileArray{ ProfileArgs{...} }
|
|
type ProfileArrayInput interface {
|
|
pulumi.Input
|
|
|
|
ToProfileArrayOutput() ProfileArrayOutput
|
|
ToProfileArrayOutputWithContext(context.Context) ProfileArrayOutput
|
|
}
|
|
|
|
type ProfileArray []ProfileInput
|
|
|
|
func (ProfileArray) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*[]*Profile)(nil)).Elem()
|
|
}
|
|
|
|
func (i ProfileArray) ToProfileArrayOutput() ProfileArrayOutput {
|
|
return i.ToProfileArrayOutputWithContext(context.Background())
|
|
}
|
|
|
|
func (i ProfileArray) ToProfileArrayOutputWithContext(ctx context.Context) ProfileArrayOutput {
|
|
return pulumi.ToOutputWithContext(ctx, i).(ProfileArrayOutput)
|
|
}
|
|
|
|
// ProfileMapInput is an input type that accepts ProfileMap and ProfileMapOutput values.
|
|
// You can construct a concrete instance of `ProfileMapInput` via:
|
|
//
|
|
// ProfileMap{ "key": ProfileArgs{...} }
|
|
type ProfileMapInput interface {
|
|
pulumi.Input
|
|
|
|
ToProfileMapOutput() ProfileMapOutput
|
|
ToProfileMapOutputWithContext(context.Context) ProfileMapOutput
|
|
}
|
|
|
|
type ProfileMap map[string]ProfileInput
|
|
|
|
func (ProfileMap) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*map[string]*Profile)(nil)).Elem()
|
|
}
|
|
|
|
func (i ProfileMap) ToProfileMapOutput() ProfileMapOutput {
|
|
return i.ToProfileMapOutputWithContext(context.Background())
|
|
}
|
|
|
|
func (i ProfileMap) ToProfileMapOutputWithContext(ctx context.Context) ProfileMapOutput {
|
|
return pulumi.ToOutputWithContext(ctx, i).(ProfileMapOutput)
|
|
}
|
|
|
|
type ProfileOutput struct{ *pulumi.OutputState }
|
|
|
|
func (ProfileOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((**Profile)(nil)).Elem()
|
|
}
|
|
|
|
func (o ProfileOutput) ToProfileOutput() ProfileOutput {
|
|
return o
|
|
}
|
|
|
|
func (o ProfileOutput) ToProfileOutputWithContext(ctx context.Context) ProfileOutput {
|
|
return o
|
|
}
|
|
|
|
// *Optional* - Map of key/value pairs of
|
|
// [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/).
|
|
func (o ProfileOutput) Config() pulumi.StringMapOutput {
|
|
return o.ApplyT(func(v *Profile) pulumi.StringMapOutput { return v.Config }).(pulumi.StringMapOutput)
|
|
}
|
|
|
|
// *Optional* - Description of the profile.
|
|
func (o ProfileOutput) Description() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *Profile) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// *Optional* - Device definition. See reference below.
|
|
func (o ProfileOutput) Devices() ProfileDeviceArrayOutput {
|
|
return o.ApplyT(func(v *Profile) ProfileDeviceArrayOutput { return v.Devices }).(ProfileDeviceArrayOutput)
|
|
}
|
|
|
|
// **Required** - Name of the profile.
|
|
func (o ProfileOutput) Name() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *Profile) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// *Optional* - Name of the project where the profile will be stored.
|
|
func (o ProfileOutput) Project() pulumi.StringOutput {
|
|
return o.ApplyT(func(v *Profile) 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 ProfileOutput) Remote() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v *Profile) pulumi.StringPtrOutput { return v.Remote }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
type ProfileArrayOutput struct{ *pulumi.OutputState }
|
|
|
|
func (ProfileArrayOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*[]*Profile)(nil)).Elem()
|
|
}
|
|
|
|
func (o ProfileArrayOutput) ToProfileArrayOutput() ProfileArrayOutput {
|
|
return o
|
|
}
|
|
|
|
func (o ProfileArrayOutput) ToProfileArrayOutputWithContext(ctx context.Context) ProfileArrayOutput {
|
|
return o
|
|
}
|
|
|
|
func (o ProfileArrayOutput) Index(i pulumi.IntInput) ProfileOutput {
|
|
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Profile {
|
|
return vs[0].([]*Profile)[vs[1].(int)]
|
|
}).(ProfileOutput)
|
|
}
|
|
|
|
type ProfileMapOutput struct{ *pulumi.OutputState }
|
|
|
|
func (ProfileMapOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*map[string]*Profile)(nil)).Elem()
|
|
}
|
|
|
|
func (o ProfileMapOutput) ToProfileMapOutput() ProfileMapOutput {
|
|
return o
|
|
}
|
|
|
|
func (o ProfileMapOutput) ToProfileMapOutputWithContext(ctx context.Context) ProfileMapOutput {
|
|
return o
|
|
}
|
|
|
|
func (o ProfileMapOutput) MapIndex(k pulumi.StringInput) ProfileOutput {
|
|
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Profile {
|
|
return vs[0].(map[string]*Profile)[vs[1].(string)]
|
|
}).(ProfileOutput)
|
|
}
|
|
|
|
func init() {
|
|
pulumi.RegisterInputType(reflect.TypeOf((*ProfileInput)(nil)).Elem(), &Profile{})
|
|
pulumi.RegisterInputType(reflect.TypeOf((*ProfileArrayInput)(nil)).Elem(), ProfileArray{})
|
|
pulumi.RegisterInputType(reflect.TypeOf((*ProfileMapInput)(nil)).Elem(), ProfileMap{})
|
|
pulumi.RegisterOutputType(ProfileOutput{})
|
|
pulumi.RegisterOutputType(ProfileArrayOutput{})
|
|
pulumi.RegisterOutputType(ProfileMapOutput{})
|
|
}
|