// 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" "errors" "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) type NetworkForward struct { pulumi.CustomResourceState // *Optional* - Map of key/value pairs of // network forward config settings. Config pulumi.StringMapOutput `pulumi:"config"` // *Optional* - Description of port(s) Description pulumi.StringOutput `pulumi:"description"` // **Required** - IP address to listen on. ListenAddress pulumi.StringOutput `pulumi:"listenAddress"` // **Required** - Name of the network. Network pulumi.StringOutput `pulumi:"network"` // *Optional* - List of port specifications. See reference below. // // The network forward port supports: Ports NetworkForwardPortArrayOutput `pulumi:"ports"` // *Optional* - Name of the project where the network forward will be created. Project pulumi.StringPtrOutput `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"` } // NewNetworkForward registers a new resource with the given unique name, arguments, and options. func NewNetworkForward(ctx *pulumi.Context, name string, args *NetworkForwardArgs, opts ...pulumi.ResourceOption) (*NetworkForward, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ListenAddress == nil { return nil, errors.New("invalid value for required argument 'ListenAddress'") } if args.Network == nil { return nil, errors.New("invalid value for required argument 'Network'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkForward err := ctx.RegisterResource("incus:index/networkForward:NetworkForward", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkForward gets an existing NetworkForward 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 GetNetworkForward(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkForwardState, opts ...pulumi.ResourceOption) (*NetworkForward, error) { var resource NetworkForward err := ctx.ReadResource("incus:index/networkForward:NetworkForward", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkForward resources. type networkForwardState struct { // *Optional* - Map of key/value pairs of // network forward config settings. Config map[string]string `pulumi:"config"` // *Optional* - Description of port(s) Description *string `pulumi:"description"` // **Required** - IP address to listen on. ListenAddress *string `pulumi:"listenAddress"` // **Required** - Name of the network. Network *string `pulumi:"network"` // *Optional* - List of port specifications. See reference below. // // The network forward port supports: Ports []NetworkForwardPort `pulumi:"ports"` // *Optional* - Name of the project where the network forward will be created. 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 NetworkForwardState struct { // *Optional* - Map of key/value pairs of // network forward config settings. Config pulumi.StringMapInput // *Optional* - Description of port(s) Description pulumi.StringPtrInput // **Required** - IP address to listen on. ListenAddress pulumi.StringPtrInput // **Required** - Name of the network. Network pulumi.StringPtrInput // *Optional* - List of port specifications. See reference below. // // The network forward port supports: Ports NetworkForwardPortArrayInput // *Optional* - Name of the project where the network forward will be created. 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 (NetworkForwardState) ElementType() reflect.Type { return reflect.TypeOf((*networkForwardState)(nil)).Elem() } type networkForwardArgs struct { // *Optional* - Map of key/value pairs of // network forward config settings. Config map[string]string `pulumi:"config"` // *Optional* - Description of port(s) Description *string `pulumi:"description"` // **Required** - IP address to listen on. ListenAddress string `pulumi:"listenAddress"` // **Required** - Name of the network. Network string `pulumi:"network"` // *Optional* - List of port specifications. See reference below. // // The network forward port supports: Ports []NetworkForwardPort `pulumi:"ports"` // *Optional* - Name of the project where the network forward will be created. 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 NetworkForward resource. type NetworkForwardArgs struct { // *Optional* - Map of key/value pairs of // network forward config settings. Config pulumi.StringMapInput // *Optional* - Description of port(s) Description pulumi.StringPtrInput // **Required** - IP address to listen on. ListenAddress pulumi.StringInput // **Required** - Name of the network. Network pulumi.StringInput // *Optional* - List of port specifications. See reference below. // // The network forward port supports: Ports NetworkForwardPortArrayInput // *Optional* - Name of the project where the network forward will be created. 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 (NetworkForwardArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkForwardArgs)(nil)).Elem() } type NetworkForwardInput interface { pulumi.Input ToNetworkForwardOutput() NetworkForwardOutput ToNetworkForwardOutputWithContext(ctx context.Context) NetworkForwardOutput } func (*NetworkForward) ElementType() reflect.Type { return reflect.TypeOf((**NetworkForward)(nil)).Elem() } func (i *NetworkForward) ToNetworkForwardOutput() NetworkForwardOutput { return i.ToNetworkForwardOutputWithContext(context.Background()) } func (i *NetworkForward) ToNetworkForwardOutputWithContext(ctx context.Context) NetworkForwardOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkForwardOutput) } // NetworkForwardArrayInput is an input type that accepts NetworkForwardArray and NetworkForwardArrayOutput values. // You can construct a concrete instance of `NetworkForwardArrayInput` via: // // NetworkForwardArray{ NetworkForwardArgs{...} } type NetworkForwardArrayInput interface { pulumi.Input ToNetworkForwardArrayOutput() NetworkForwardArrayOutput ToNetworkForwardArrayOutputWithContext(context.Context) NetworkForwardArrayOutput } type NetworkForwardArray []NetworkForwardInput func (NetworkForwardArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkForward)(nil)).Elem() } func (i NetworkForwardArray) ToNetworkForwardArrayOutput() NetworkForwardArrayOutput { return i.ToNetworkForwardArrayOutputWithContext(context.Background()) } func (i NetworkForwardArray) ToNetworkForwardArrayOutputWithContext(ctx context.Context) NetworkForwardArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkForwardArrayOutput) } // NetworkForwardMapInput is an input type that accepts NetworkForwardMap and NetworkForwardMapOutput values. // You can construct a concrete instance of `NetworkForwardMapInput` via: // // NetworkForwardMap{ "key": NetworkForwardArgs{...} } type NetworkForwardMapInput interface { pulumi.Input ToNetworkForwardMapOutput() NetworkForwardMapOutput ToNetworkForwardMapOutputWithContext(context.Context) NetworkForwardMapOutput } type NetworkForwardMap map[string]NetworkForwardInput func (NetworkForwardMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkForward)(nil)).Elem() } func (i NetworkForwardMap) ToNetworkForwardMapOutput() NetworkForwardMapOutput { return i.ToNetworkForwardMapOutputWithContext(context.Background()) } func (i NetworkForwardMap) ToNetworkForwardMapOutputWithContext(ctx context.Context) NetworkForwardMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkForwardMapOutput) } type NetworkForwardOutput struct{ *pulumi.OutputState } func (NetworkForwardOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkForward)(nil)).Elem() } func (o NetworkForwardOutput) ToNetworkForwardOutput() NetworkForwardOutput { return o } func (o NetworkForwardOutput) ToNetworkForwardOutputWithContext(ctx context.Context) NetworkForwardOutput { return o } // *Optional* - Map of key/value pairs of // network forward config settings. func (o NetworkForwardOutput) Config() pulumi.StringMapOutput { return o.ApplyT(func(v *NetworkForward) pulumi.StringMapOutput { return v.Config }).(pulumi.StringMapOutput) } // *Optional* - Description of port(s) func (o NetworkForwardOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v *NetworkForward) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput) } // **Required** - IP address to listen on. func (o NetworkForwardOutput) ListenAddress() pulumi.StringOutput { return o.ApplyT(func(v *NetworkForward) pulumi.StringOutput { return v.ListenAddress }).(pulumi.StringOutput) } // **Required** - Name of the network. func (o NetworkForwardOutput) Network() pulumi.StringOutput { return o.ApplyT(func(v *NetworkForward) pulumi.StringOutput { return v.Network }).(pulumi.StringOutput) } // *Optional* - List of port specifications. See reference below. // // The network forward port supports: func (o NetworkForwardOutput) Ports() NetworkForwardPortArrayOutput { return o.ApplyT(func(v *NetworkForward) NetworkForwardPortArrayOutput { return v.Ports }).(NetworkForwardPortArrayOutput) } // *Optional* - Name of the project where the network forward will be created. func (o NetworkForwardOutput) Project() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkForward) pulumi.StringPtrOutput { return v.Project }).(pulumi.StringPtrOutput) } // *Optional* - The remote in which the resource will be created. If // not provided, the provider's default remote will be used. func (o NetworkForwardOutput) Remote() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkForward) pulumi.StringPtrOutput { return v.Remote }).(pulumi.StringPtrOutput) } type NetworkForwardArrayOutput struct{ *pulumi.OutputState } func (NetworkForwardArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkForward)(nil)).Elem() } func (o NetworkForwardArrayOutput) ToNetworkForwardArrayOutput() NetworkForwardArrayOutput { return o } func (o NetworkForwardArrayOutput) ToNetworkForwardArrayOutputWithContext(ctx context.Context) NetworkForwardArrayOutput { return o } func (o NetworkForwardArrayOutput) Index(i pulumi.IntInput) NetworkForwardOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkForward { return vs[0].([]*NetworkForward)[vs[1].(int)] }).(NetworkForwardOutput) } type NetworkForwardMapOutput struct{ *pulumi.OutputState } func (NetworkForwardMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkForward)(nil)).Elem() } func (o NetworkForwardMapOutput) ToNetworkForwardMapOutput() NetworkForwardMapOutput { return o } func (o NetworkForwardMapOutput) ToNetworkForwardMapOutputWithContext(ctx context.Context) NetworkForwardMapOutput { return o } func (o NetworkForwardMapOutput) MapIndex(k pulumi.StringInput) NetworkForwardOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkForward { return vs[0].(map[string]*NetworkForward)[vs[1].(string)] }).(NetworkForwardOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkForwardInput)(nil)).Elem(), &NetworkForward{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkForwardArrayInput)(nil)).Elem(), NetworkForwardArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkForwardMapInput)(nil)).Elem(), NetworkForwardMap{}) pulumi.RegisterOutputType(NetworkForwardOutput{}) pulumi.RegisterOutputType(NetworkForwardArrayOutput{}) pulumi.RegisterOutputType(NetworkForwardMapOutput{}) }