You can execute a subset of resources with the --tags argument. However, you first have to set the associated tag in the resources you want executed for that tag.
If you wanted to execute only one class, then you can set a tag for that class and specify that tag as the argument to --tags to execute only that class.
you could refer to: https://docs.puppet.com/puppet/4.10/lang_tags.html
In this case, the tag function will be much more useful for you than the metaparameter.
https://docs.puppet.com/puppet/4.10/lang_tags.html#the-tag-function
# You can use the tag function inside a class definition or defined type to assign tags to the surrounding container and all of the resources it contains
class myClass {
tag 'mytag'
...
}
You can then execute only myClass:
# execute agent with tags
puppet agent -t --tags mytag
https://docs.puppet.com/puppet/4.10/lang_tags.html#restricting-catalog-runs