psm jcs disable-access-rule

Use this command to disable an active access rule for Oracle Java Cloud Service instance.
The access rule must exist for your service and be in the enabled status before you can disable it. To determine whether the access rule exists and if it’s enabled, use the psm jcs access-rules command. If the rule is enabled, the status line will so indicate:
 {
     "description":"Permit public to ssh to admin server",
     "destination":"WLS_ADMIN_SERVER",
     "ports":"22",
     "ruleName":"ora_p2admin_ssh",
     "ruleType":"DEFAULT",
     "source":"PUBLIC-INTERNET",
     "status":"enabled" 
},
You can re-enable the rule by using the psm jcs enable-access-rule command. Rules of both types USER and DEFAULT can be disabled.

Syntax

 psm jcs disable-access-rule -s|--service-name serviceName
  -r|--rule-name ruleName
   [-of|--output-format json|html|short]
   [-wc|- -wait-until-complete true|false]

Parameters

All parameters are required unless otherwise specified.

Parameter Description
-s|--service-name serviceName Name of the Oracle Java Cloud Service instance.
-r|--rule-name ruleName The name of the rule you want to disable.
-of|--output-format json|html|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

Example

$ psm jcs disable-access-rule -s ExampleInstance -r ora_p2admin_ssh -of json

Response:

{
    "description":"Permit public to ssh to admin server",
    "destination":"WLS_ADMIN_SERVER",
    "ports":"22",
    "ruleName":"ora_p2admin_ssh",
    "ruleType":"DEFAULT",
    "source":"PUBLIC-INTERNET",
    "status":"disabled"
}