github.com/ablease/cli@v6.37.1-0.20180613014814-3adbb7d7fb19+incompatible/command/v2/create_service_key_command.go (about)

     1  package v2
     2  
     3  import (
     4  	"code.cloudfoundry.org/cli/command"
     5  	"code.cloudfoundry.org/cli/command/flag"
     6  	"code.cloudfoundry.org/cli/command/translatableerror"
     7  )
     8  
     9  type CreateServiceKeyCommand struct {
    10  	RequiredArgs     flag.ServiceInstanceKey `positional-args:"yes"`
    11  	ParametersAsJSON flag.Path               `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."`
    12  	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"`
    13  	relatedCommands  interface{}             `related_commands:"service-key"`
    14  }
    15  
    16  func (CreateServiceKeyCommand) Setup(config command.Config, ui command.UI) error {
    17  	return nil
    18  }
    19  
    20  func (CreateServiceKeyCommand) Execute(args []string) error {
    21  	return translatableerror.UnrefactoredCommandError{}
    22  }