psm jcs recreate-association

Update an existing Oracle Java Cloud Service instance and associate it with a different Oracle Database Cloud Service deployment.

Note:

  • This operation is not supported for service instances running Oracle WebLogic Server 11.1.1.7 or 12.1.3.0.

  • This operation is not supported for service instances running on Oracle Cloud Infrastructure regions.

  • Both the original and the target Oracle Database Cloud Service deployment must be of type Single Instance. All other database types are not supported, including Database Clustering with RAC and Single Instance with Data Guard Standby.

  • Oracle Database Exadata Cloud Service is not supported.

Syntax

In the following syntax, line breaks have been added for clarity. Do not include them when entering the command.

psm jcs recreate-association -s|--service-name serviceName
  -c|--config-payload pathToJsonPayload
    [-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.
-c|--config-payload pathToJsonPayload

Specifies the path to a JSON file containing the connection details for your Oracle Database Cloud Service deployment. The format of this file, as shown in the Sample Payload, is the same as the request body you provide when creating a service instance by using the REST API. For information about this format, see the Body (reassociate-request) section of Associate a Service Instance With a Different Database in REST API for Oracle Java Cloud Service.

Note: Do the use the connectString attribute.

-of|--output-format json|html|short

(Optional) Specifies the output format of the command’s response:

  • json—output is formatted as a JSON array.

  • html—output is formatted as HTML

  • short—output is formatted as a brief summary.

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:

For a description of the payload parameters, see the Body (reassociate-request) section of Associate a Service Instance With a Different Database in REST API for Oracle Java Cloud Service.

The payload connects the service instance to an existing Oracle Database Cloud Service deployment named myDBCS02.

{
    "INFRA_DB" :{
      "destServiceName":"myDBCS02",
      "assocDescription":"New infra DB",
      "dbaName":"SYS",
      "dbaPassword":"password"
    }
}

Example

$ psm jcs recreate-association -s ExampleInstance -c /home/templates/recreate-association-payload.json