psm jcs enable-access-rule
Use this command to enable an access rule for Oracle Java Cloud Service instance.
The access rule must exist for your service and be in the disabled status before you can enable it. To determine whether the access rule exists and if it’s disabled, use the
psm jcs access-rules
command. If the rule is disabled, 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":"disabled"
},
Rules of both types USER and DEFAULT can be enabled. Syntax
psm jcs enable-access-rule -s|--service-name serviceName
-r|--rule-name ruleName
--operation update
--status enabled
[-of|--output-format json|html|short]
[-wc|--wait-until-complete true|false]
Parameters
All parameters are required unless otherwise specified.
Option | Description |
---|---|
-s|--service-name serviceName |
Name of the Oracle Java Cloud Service instance. |
-r|--rule-name ruleName |
Name of the rule you want to enable. |
--operation update |
The type of operation, in this case, update .
|
--status |
The operation status, in this case, enabled .
|
-of|--output-format json|html|short |
(Optional) Output format of the command’s response:
Accepted values: The default output format is the one you specified when using the |
|
(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: Default: false |
Example
$ psm jcs enable-access-rule -s ExampleInstance -r ora_p2admin_ssh -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":"enabled"
}