// Code generated by crd2pulumi DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package v1alpha1 import ( "context" "reflect" "antoine-roux.tk/projects/go/pulumi-library/crds/kubernetes/internal" v1 "github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/meta/v1" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) // MiddlewareTCP is the CRD implementation of a Traefik TCP middleware. More info: https://doc.traefik.io/traefik/v2.10/middlewares/overview/ type MiddlewareTCP struct { pulumi.CustomResourceState ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` Kind pulumi.StringPtrOutput `pulumi:"kind"` Metadata v1.ObjectMetaOutput `pulumi:"metadata"` // MiddlewareTCPSpec defines the desired state of a MiddlewareTCP. Spec MiddlewareTCPSpecOutput `pulumi:"spec"` } // NewMiddlewareTCP registers a new resource with the given unique name, arguments, and options. func NewMiddlewareTCP(ctx *pulumi.Context, name string, args *MiddlewareTCPArgs, opts ...pulumi.ResourceOption) (*MiddlewareTCP, error) { if args == nil { args = &MiddlewareTCPArgs{} } args.ApiVersion = pulumi.StringPtr("traefik.io/v1alpha1") args.Kind = pulumi.StringPtr("MiddlewareTCP") opts = internal.PkgResourceDefaultOpts(opts) var resource MiddlewareTCP err := ctx.RegisterResource("kubernetes:traefik.io/v1alpha1:MiddlewareTCP", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetMiddlewareTCP gets an existing MiddlewareTCP 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 GetMiddlewareTCP(ctx *pulumi.Context, name string, id pulumi.IDInput, state *MiddlewareTCPState, opts ...pulumi.ResourceOption) (*MiddlewareTCP, error) { var resource MiddlewareTCP err := ctx.ReadResource("kubernetes:traefik.io/v1alpha1:MiddlewareTCP", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering MiddlewareTCP resources. type middlewareTCPState struct { } type MiddlewareTCPState struct { } func (MiddlewareTCPState) ElementType() reflect.Type { return reflect.TypeOf((*middlewareTCPState)(nil)).Elem() } type middlewareTCPArgs struct { ApiVersion *string `pulumi:"apiVersion"` Kind *string `pulumi:"kind"` Metadata *v1.ObjectMeta `pulumi:"metadata"` // MiddlewareTCPSpec defines the desired state of a MiddlewareTCP. Spec *MiddlewareTCPSpec `pulumi:"spec"` } // The set of arguments for constructing a MiddlewareTCP resource. type MiddlewareTCPArgs struct { ApiVersion pulumi.StringPtrInput Kind pulumi.StringPtrInput Metadata v1.ObjectMetaPtrInput // MiddlewareTCPSpec defines the desired state of a MiddlewareTCP. Spec MiddlewareTCPSpecPtrInput } func (MiddlewareTCPArgs) ElementType() reflect.Type { return reflect.TypeOf((*middlewareTCPArgs)(nil)).Elem() } type MiddlewareTCPInput interface { pulumi.Input ToMiddlewareTCPOutput() MiddlewareTCPOutput ToMiddlewareTCPOutputWithContext(ctx context.Context) MiddlewareTCPOutput } func (*MiddlewareTCP) ElementType() reflect.Type { return reflect.TypeOf((**MiddlewareTCP)(nil)).Elem() } func (i *MiddlewareTCP) ToMiddlewareTCPOutput() MiddlewareTCPOutput { return i.ToMiddlewareTCPOutputWithContext(context.Background()) } func (i *MiddlewareTCP) ToMiddlewareTCPOutputWithContext(ctx context.Context) MiddlewareTCPOutput { return pulumi.ToOutputWithContext(ctx, i).(MiddlewareTCPOutput) } func (i *MiddlewareTCP) ToOutput(ctx context.Context) pulumix.Output[*MiddlewareTCP] { return pulumix.Output[*MiddlewareTCP]{ OutputState: i.ToMiddlewareTCPOutputWithContext(ctx).OutputState, } } type MiddlewareTCPOutput struct{ *pulumi.OutputState } func (MiddlewareTCPOutput) ElementType() reflect.Type { return reflect.TypeOf((**MiddlewareTCP)(nil)).Elem() } func (o MiddlewareTCPOutput) ToMiddlewareTCPOutput() MiddlewareTCPOutput { return o } func (o MiddlewareTCPOutput) ToMiddlewareTCPOutputWithContext(ctx context.Context) MiddlewareTCPOutput { return o } func (o MiddlewareTCPOutput) ToOutput(ctx context.Context) pulumix.Output[*MiddlewareTCP] { return pulumix.Output[*MiddlewareTCP]{ OutputState: o.OutputState, } } func (o MiddlewareTCPOutput) ApiVersion() pulumi.StringPtrOutput { return o.ApplyT(func(v *MiddlewareTCP) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput) } func (o MiddlewareTCPOutput) Kind() pulumi.StringPtrOutput { return o.ApplyT(func(v *MiddlewareTCP) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) } func (o MiddlewareTCPOutput) Metadata() v1.ObjectMetaOutput { return o.ApplyT(func(v *MiddlewareTCP) v1.ObjectMetaOutput { return v.Metadata }).(v1.ObjectMetaOutput) } // MiddlewareTCPSpec defines the desired state of a MiddlewareTCP. func (o MiddlewareTCPOutput) Spec() MiddlewareTCPSpecOutput { return o.ApplyT(func(v *MiddlewareTCP) MiddlewareTCPSpecOutput { return v.Spec }).(MiddlewareTCPSpecOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*MiddlewareTCPInput)(nil)).Elem(), &MiddlewareTCP{}) pulumi.RegisterOutputType(MiddlewareTCPOutput{}) }