psm dbcs create-access-rule
Create an access rule for an Oracle Database Classic Cloud Service instance.
Syntax
In the following syntax, line breaks have been added for clarity. Do not include them when entering the command.
psm dbcs create-access-rule
-s|--service-name instance-name
-c|--config-payload json-file
[-of|--output-format json|html|short]
Parameters
Parameter | Description |
---|---|
|
Specifies the name of the Database Classic Cloud Service instance for which you want to create an access rule. |
|
Specifies the path to a JSON file containing the information necessary to create an access rule. The format of this file is the same as the request body you provide when adding an access rule by using the REST API. For information about this format, see the “Body” section of Create a Rule in REST API for Oracle Database Classic Cloud Service. |
|
(Optional) Specifies the output format of the command’s response:
The default output format is the one you specified when using the |
Examples
The following example creates the access rule specified by information provided in the createaccessrule.json
file for the db12c-xp-si2
Database Classic Cloud
Service instance.
$ psm dbcs create-access-rule --service-name db12c-xp-si2 --config-payload createaccessrule.json
"Accepted"
Listing of createaccessrule.json
{
"ruleName":"example-https",
"description":"",
"source":"192.0.2.0/24",
"destination":"DB",
"ports":"443",
"status":"enabled"
}