func NewListener(ctx *pulumi.Context,
	name string, args *ListenerArgs, opts ...pulumi.ResourceOption) (*Listener, error) {
	if args == nil {
		return nil, errors.New("missing one or more required arguments")
	}

	if args.LoadbalancerId == nil {
		return nil, errors.New("invalid value for required argument 'LoadbalancerId'")
	}
	if args.Protocol == nil {
		return nil, errors.New("invalid value for required argument 'Protocol'")
	}
	if args.ProtocolPort == nil {
		return nil, errors.New("invalid value for required argument 'ProtocolPort'")
	}
	var resource Listener
	err := ctx.RegisterResource("openstack:loadbalancer/listener:Listener", name, args, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}
// NewListener registers a new resource with the given unique name, arguments, and options.
NewListener registers a new resource with the given unique name, arguments, and options.
// NewListener registers a new resource with the given unique name arguments and options .
func NewListener(ctx *pulumi.Context,
	name string, args *ListenerArgs, opts ...pulumi.ResourceOption) (*Listener, error) {
	if args == nil {
		return nil, errors.New("missing one or more required arguments")
	}
	if args.LoadbalancerId == nil {
		return nil, errors.New("invalid value for required argument 'LoadbalancerId'")
	}
	if args.Protocol == nil {
		return nil, errors.New("invalid value for required argument 'Protocol'")
	}
	if args.ProtocolPort == nil {
		return nil, errors.New("invalid value for required argument 'ProtocolPort'")
	}
	var resource Listener
	err := ctx.RegisterResource("openstack:loadbalancer/listener:Listener", name, args, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}
func NewListener ( ctx * pulumi . Context , name string , args * ListenerArgs , opts ... pulumi . ResourceOption ) ( * Listener , error ) { if args == nil { return nil , errors . New ( " " ) } if args . LoadbalancerId == nil { return nil , errors . New ( " " ) } if args . Protocol == nil { return nil , errors . New ( " " ) } if args . ProtocolPort == nil { return nil , errors . New ( " " ) } var resource Listener err := ctx . RegisterResource ( " " , name , args , & resource , opts ... ) if err != nil { return nil , err } return & resource , nil }
NewListener registers a new resource with the given unique name, arguments, and options.
NewListener registers a new resource with the given unique name arguments and options .