github.com/elopio/cli@v6.21.2-0.20160902224010-ea909d1fdb2f+incompatible/commands/v2/create_service_key_command.go (about)

     1  package v2
     2  
     3  import (
     4  	"os"
     5  
     6  	"code.cloudfoundry.org/cli/cf/cmd"
     7  	"code.cloudfoundry.org/cli/commands"
     8  	"code.cloudfoundry.org/cli/commands/flags"
     9  )
    10  
    11  type CreateServiceKeyCommand struct {
    12  	RequiredArgs     flags.ServiceInstanceKey `positional-args:"yes"`
    13  	ParametersAsJSON string                   `short:"c" description:"Valid JSON object containing service-specific configuration parameters, provided either in-line or in a file. For a list of supported configuration parameters, see documentation for the particular service offering."`
    14  	usage            interface{}              `usage:"CF_NAME create-service-key SERVICE_INSTANCE SERVICE_KEY [-c PARAMETERS_AS_JSON]\n\n   Optionally provide service-specific configuration parameters in a valid JSON object in-line.\n   CF_NAME create-service-key SERVICE_INSTANCE SERVICE_KEY -c '{\"name\":\"value\",\"name\":\"value\"}'\n\n   Optionally provide a file containing service-specific configuration parameters in a valid JSON object. The path to the parameters file can be an absolute or relative path to a file.\n   CF_NAME create-service-key SERVICE_INSTANCE SERVICE_KEY -c PATH_TO_FILE\n\n   Example of valid JSON object:\n   {\n     \"permissions\": \"read-only\"\n   }\n\nEXAMPLES:\n   CF_NAME create-service-key mydb mykey -c '{\"permissions\":\"read-only\"}'\n   CF_NAME create-service-key mydb mykey -c ~/workspace/tmp/instance_config.json"`
    15  	relatedCommands  interface{}              `related_commands:"service-key"`
    16  }
    17  
    18  func (_ CreateServiceKeyCommand) Setup(config commands.Config, ui commands.UI) error {
    19  	return nil
    20  }
    21  
    22  func (_ CreateServiceKeyCommand) Execute(args []string) error {
    23  	cmd.Main(os.Getenv("CF_TRACE"), os.Args)
    24  	return nil
    25  }