269 lines
9.1 KiB
Go
Generated
269 lines
9.1 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"
|
|
)
|
|
|
|
type Server struct {
|
|
pulumi.CustomResourceState
|
|
|
|
// *Optional* - Map of key/value pairs of
|
|
// [server config settings](https://linuxcontainers.org/incus/docs/main/server_config/).
|
|
Config pulumi.StringMapOutput `pulumi:"config"`
|
|
// *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* - Specify a target node in a cluster where the config
|
|
// options should be applied. This is in particular important for config options
|
|
// with `local` scope.
|
|
Target pulumi.StringPtrOutput `pulumi:"target"`
|
|
}
|
|
|
|
// NewServer registers a new resource with the given unique name, arguments, and options.
|
|
func NewServer(ctx *pulumi.Context,
|
|
name string, args *ServerArgs, opts ...pulumi.ResourceOption) (*Server, error) {
|
|
if args == nil {
|
|
args = &ServerArgs{}
|
|
}
|
|
|
|
opts = internal.PkgResourceDefaultOpts(opts)
|
|
var resource Server
|
|
err := ctx.RegisterResource("incus:index/server:Server", name, args, &resource, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &resource, nil
|
|
}
|
|
|
|
// GetServer gets an existing Server 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 GetServer(ctx *pulumi.Context,
|
|
name string, id pulumi.IDInput, state *ServerState, opts ...pulumi.ResourceOption) (*Server, error) {
|
|
var resource Server
|
|
err := ctx.ReadResource("incus:index/server:Server", name, id, state, &resource, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &resource, nil
|
|
}
|
|
|
|
// Input properties used for looking up and filtering Server resources.
|
|
type serverState struct {
|
|
// *Optional* - Map of key/value pairs of
|
|
// [server config settings](https://linuxcontainers.org/incus/docs/main/server_config/).
|
|
Config map[string]string `pulumi:"config"`
|
|
// *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* - Specify a target node in a cluster where the config
|
|
// options should be applied. This is in particular important for config options
|
|
// with `local` scope.
|
|
Target *string `pulumi:"target"`
|
|
}
|
|
|
|
type ServerState struct {
|
|
// *Optional* - Map of key/value pairs of
|
|
// [server config settings](https://linuxcontainers.org/incus/docs/main/server_config/).
|
|
Config pulumi.StringMapInput
|
|
// *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* - Specify a target node in a cluster where the config
|
|
// options should be applied. This is in particular important for config options
|
|
// with `local` scope.
|
|
Target pulumi.StringPtrInput
|
|
}
|
|
|
|
func (ServerState) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*serverState)(nil)).Elem()
|
|
}
|
|
|
|
type serverArgs struct {
|
|
// *Optional* - Map of key/value pairs of
|
|
// [server config settings](https://linuxcontainers.org/incus/docs/main/server_config/).
|
|
Config map[string]string `pulumi:"config"`
|
|
// *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* - Specify a target node in a cluster where the config
|
|
// options should be applied. This is in particular important for config options
|
|
// with `local` scope.
|
|
Target *string `pulumi:"target"`
|
|
}
|
|
|
|
// The set of arguments for constructing a Server resource.
|
|
type ServerArgs struct {
|
|
// *Optional* - Map of key/value pairs of
|
|
// [server config settings](https://linuxcontainers.org/incus/docs/main/server_config/).
|
|
Config pulumi.StringMapInput
|
|
// *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* - Specify a target node in a cluster where the config
|
|
// options should be applied. This is in particular important for config options
|
|
// with `local` scope.
|
|
Target pulumi.StringPtrInput
|
|
}
|
|
|
|
func (ServerArgs) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*serverArgs)(nil)).Elem()
|
|
}
|
|
|
|
type ServerInput interface {
|
|
pulumi.Input
|
|
|
|
ToServerOutput() ServerOutput
|
|
ToServerOutputWithContext(ctx context.Context) ServerOutput
|
|
}
|
|
|
|
func (*Server) ElementType() reflect.Type {
|
|
return reflect.TypeOf((**Server)(nil)).Elem()
|
|
}
|
|
|
|
func (i *Server) ToServerOutput() ServerOutput {
|
|
return i.ToServerOutputWithContext(context.Background())
|
|
}
|
|
|
|
func (i *Server) ToServerOutputWithContext(ctx context.Context) ServerOutput {
|
|
return pulumi.ToOutputWithContext(ctx, i).(ServerOutput)
|
|
}
|
|
|
|
// ServerArrayInput is an input type that accepts ServerArray and ServerArrayOutput values.
|
|
// You can construct a concrete instance of `ServerArrayInput` via:
|
|
//
|
|
// ServerArray{ ServerArgs{...} }
|
|
type ServerArrayInput interface {
|
|
pulumi.Input
|
|
|
|
ToServerArrayOutput() ServerArrayOutput
|
|
ToServerArrayOutputWithContext(context.Context) ServerArrayOutput
|
|
}
|
|
|
|
type ServerArray []ServerInput
|
|
|
|
func (ServerArray) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*[]*Server)(nil)).Elem()
|
|
}
|
|
|
|
func (i ServerArray) ToServerArrayOutput() ServerArrayOutput {
|
|
return i.ToServerArrayOutputWithContext(context.Background())
|
|
}
|
|
|
|
func (i ServerArray) ToServerArrayOutputWithContext(ctx context.Context) ServerArrayOutput {
|
|
return pulumi.ToOutputWithContext(ctx, i).(ServerArrayOutput)
|
|
}
|
|
|
|
// ServerMapInput is an input type that accepts ServerMap and ServerMapOutput values.
|
|
// You can construct a concrete instance of `ServerMapInput` via:
|
|
//
|
|
// ServerMap{ "key": ServerArgs{...} }
|
|
type ServerMapInput interface {
|
|
pulumi.Input
|
|
|
|
ToServerMapOutput() ServerMapOutput
|
|
ToServerMapOutputWithContext(context.Context) ServerMapOutput
|
|
}
|
|
|
|
type ServerMap map[string]ServerInput
|
|
|
|
func (ServerMap) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*map[string]*Server)(nil)).Elem()
|
|
}
|
|
|
|
func (i ServerMap) ToServerMapOutput() ServerMapOutput {
|
|
return i.ToServerMapOutputWithContext(context.Background())
|
|
}
|
|
|
|
func (i ServerMap) ToServerMapOutputWithContext(ctx context.Context) ServerMapOutput {
|
|
return pulumi.ToOutputWithContext(ctx, i).(ServerMapOutput)
|
|
}
|
|
|
|
type ServerOutput struct{ *pulumi.OutputState }
|
|
|
|
func (ServerOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((**Server)(nil)).Elem()
|
|
}
|
|
|
|
func (o ServerOutput) ToServerOutput() ServerOutput {
|
|
return o
|
|
}
|
|
|
|
func (o ServerOutput) ToServerOutputWithContext(ctx context.Context) ServerOutput {
|
|
return o
|
|
}
|
|
|
|
// *Optional* - Map of key/value pairs of
|
|
// [server config settings](https://linuxcontainers.org/incus/docs/main/server_config/).
|
|
func (o ServerOutput) Config() pulumi.StringMapOutput {
|
|
return o.ApplyT(func(v *Server) pulumi.StringMapOutput { return v.Config }).(pulumi.StringMapOutput)
|
|
}
|
|
|
|
// *Optional* - The remote in which the resource will be created. If
|
|
// not provided, the provider's default remote will be used.
|
|
func (o ServerOutput) Remote() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v *Server) pulumi.StringPtrOutput { return v.Remote }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
// *Optional* - Specify a target node in a cluster where the config
|
|
// options should be applied. This is in particular important for config options
|
|
// with `local` scope.
|
|
func (o ServerOutput) Target() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v *Server) pulumi.StringPtrOutput { return v.Target }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
type ServerArrayOutput struct{ *pulumi.OutputState }
|
|
|
|
func (ServerArrayOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*[]*Server)(nil)).Elem()
|
|
}
|
|
|
|
func (o ServerArrayOutput) ToServerArrayOutput() ServerArrayOutput {
|
|
return o
|
|
}
|
|
|
|
func (o ServerArrayOutput) ToServerArrayOutputWithContext(ctx context.Context) ServerArrayOutput {
|
|
return o
|
|
}
|
|
|
|
func (o ServerArrayOutput) Index(i pulumi.IntInput) ServerOutput {
|
|
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Server {
|
|
return vs[0].([]*Server)[vs[1].(int)]
|
|
}).(ServerOutput)
|
|
}
|
|
|
|
type ServerMapOutput struct{ *pulumi.OutputState }
|
|
|
|
func (ServerMapOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*map[string]*Server)(nil)).Elem()
|
|
}
|
|
|
|
func (o ServerMapOutput) ToServerMapOutput() ServerMapOutput {
|
|
return o
|
|
}
|
|
|
|
func (o ServerMapOutput) ToServerMapOutputWithContext(ctx context.Context) ServerMapOutput {
|
|
return o
|
|
}
|
|
|
|
func (o ServerMapOutput) MapIndex(k pulumi.StringInput) ServerOutput {
|
|
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Server {
|
|
return vs[0].(map[string]*Server)[vs[1].(string)]
|
|
}).(ServerOutput)
|
|
}
|
|
|
|
func init() {
|
|
pulumi.RegisterInputType(reflect.TypeOf((*ServerInput)(nil)).Elem(), &Server{})
|
|
pulumi.RegisterInputType(reflect.TypeOf((*ServerArrayInput)(nil)).Elem(), ServerArray{})
|
|
pulumi.RegisterInputType(reflect.TypeOf((*ServerMapInput)(nil)).Elem(), ServerMap{})
|
|
pulumi.RegisterOutputType(ServerOutput{})
|
|
pulumi.RegisterOutputType(ServerArrayOutput{})
|
|
pulumi.RegisterOutputType(ServerMapOutput{})
|
|
}
|