psm jcs update-service

Use this command to assign tags to an existing service instance.

Syntax

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

psm jcs service -s|--service-name serviceName
       [-of|--output-format json|html|short]

Parameters

All parameters are required unless otherwise noted.

Parameter Description
-s|--service-name serviceName The Oracle Java Cloud Service instance for which you want to display information.
-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.

.

Sample Payloads

This shows the payload to assign a tag and to delete a tag.

{
    "tags":[
        {
            "key":"",
            "value":"",
            "isPlacementTag":""
        }
    ],
    "tagsToUnassign":[
        {
            "key":"",
            "value":"",
            "isPlacementTag":""
        }
    ]
}

Example

$ psm jcs update-service -s MyService01
{
  "tagsToAssign": [
    {
      "key": "environment",
      "value": "qa"
    },
    {
      "key": "environment",
      "value": "development"
    }
  ],
  "tagsToUnassign": [
    {
      "key": "environment",
      "value": "qa-other"
    }
  ],
  "createAssignmentsTo": {
    "services": [
      {
        "serviceType": "JaaS",
        "serviceName": "MyJCSExample"
      }
    ]
  },
  "deleteAssignmentsFrom": {
    "services": [
      {
        "serviceType": "JaaS",
        "serviceName": "MyJCS01"
      }
    ]
  }
}