psm jcs create-access-rule

Use this command to create an access rule for Oracle Java Cloud Service instance.

Syntax

psm jcs create-access-rule -s|--service-name serviceName
  -c|--config-payload pathToJSONFile
    [-of|--output-format html|json|short]
    [-wc|--wait-until-complete true|false]

Parameters

All parameters are required unless otherwise specified.

Parameter Description
-s|--service-name serviceName Name of the service instance.
-c|--config-payload pathToJSONFile Specifies the path to the JSON file containing the information necessary to create an access rule for a Java Cloud Service instance. The format of this file, as shown in Sample Payload, is the same as the request body you provide when creating an access rule for a Java Cloud Service instance by using the REST API. For information about this format, see the Request/Body (addsecrule-postrequest) section of Add an Access Rule in the REST API for Oracle Java Cloud Service.
-of|--output-format html|json|short (Optional) Output format of the command’s response:

Accepted values: json, html, short

The default output format is the one you specified when using the psm setup command to configure the psm CLI.

-wc|--wait-until-complete true|false

(Optional) A boolean value that, when set to true, makes the command behave synchronously; that is, it does not return until the submitted job is complete. The following message is displayed until the job is complete:
Waiting for the job to complete... (it cannot be cancelled)
Default: false

Sample Payload

Note:

You can find parameter descriptions for this payload in the Request/Body (addsecrule-postrequest) section of Add an Access Rule in the REST API for Oracle Java Cloud Service.

This payload adds an access rule to a service instance.

{    
    "ruleName": "my_corp_vnc",
    "description": "corporate to VNC to Admin Server",
    "ports": "5900",
    "protocol": "tcp",
    "status": "enabled",
    "source": "192.123.45.6/32",
    "destination": "WLS_ADMIN_SERVER"
}

Examples

$ psm jcs create-access-rule -s ExampleInstamce -c D:\cli_apps\access-rule-jcs.json -of json

Response:

"Accepted"