There are a number of steps you have to go through to create your own custom resource (LWRP). In summary it involves creating a file in a cookbooks resources
directory and an identically named file in the providers
directory.
The file you create in the resources
directory defines (among other things) the actions and attributes which your custom resource can accept. The file you create in the providers
directory provides implementations for each of the actions that are specified in the resources file.
The name of resource will be the cookbook name + the file name without the rb extension.
For more details, there is a great tutorial here: http://dougireton.com/blog/2012/12/31/creating-an-lwrp/