code: func NewCmdAPIResources(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command {
  	o := NewAPIResourceOptions(ioStreams)
  
  	cmd := &cobra.Command{
  		Use:     "api-resources",
  		Short:   "Print the supported API resources on the server",
  		Long:    "Print the supported API resources on the server",
  		Example: apiresourcesExample,
  		Run: func(cmd *cobra.Command, args []string) {
  			cmdutil.CheckErr(o.Complete(cmd, args))
  			cmdutil.CheckErr(o.Validate())
  			cmdutil.CheckErr(o.RunAPIResources(cmd, f))
  		},
  	}
  
  	cmd.Flags().BoolVar(&o.NoHeaders, "no-headers", o.NoHeaders, "When using the default or custom-column output format, don't print headers (default print headers).")
  	cmd.Flags().StringVarP(&o.Output, "output", "o", o.Output, "Output format. One of: wide|name.")
  
  	cmd.Flags().StringVar(&o.APIGroup, "api-group", o.APIGroup, "Limit to resources in the specified API group.")
  	cmd.Flags().BoolVar(&o.Namespaced, "namespaced", o.Namespaced, "If false, non-namespaced resources will be returned, otherwise returning namespaced resources by default.")
  	cmd.Flags().StringSliceVar(&o.Verbs, "verbs", o.Verbs, "Limit to resources that support the specified verbs.")
  	cmd.Flags().BoolVar(&o.Cached, "cached", o.Cached, "Use the cached list of resources if available.")
  	return cmd
  }
docs: // NewCmdAPIResources creates the `api-resources` command