diff options
author | Lingxian Kong <anlin.kong@gmail.com> | 2020-08-10 19:48:16 +1200 |
---|---|---|
committer | Lingxian Kong <anlin.kong@gmail.com> | 2020-08-11 09:35:14 +1200 |
commit | 4de40cb5144cfd8cdc4b270f23acfdbd3eafa5be (patch) | |
tree | d8d6f9a3bdfe31193ba7c604f85862795b7569a3 /api-ref/source | |
parent | 680a43002bfaba4a334736af052995373cecd349 (diff) | |
download | trove-4de40cb5144cfd8cdc4b270f23acfdbd3eafa5be.tar.gz |
Support to update instance access
Change-Id: I640cd8b50fd0e0f80a1a45399b8bfdac437ae2b9
Diffstat (limited to 'api-ref/source')
-rw-r--r-- | api-ref/source/instances.inc | 38 | ||||
-rw-r--r-- | api-ref/source/samples/instance-update-access-request.json | 8 |
2 files changed, 43 insertions, 3 deletions
diff --git a/api-ref/source/instances.inc b/api-ref/source/instances.inc index 38c38864..1d635fd5 100644 --- a/api-ref/source/instances.inc +++ b/api-ref/source/instances.inc @@ -334,7 +334,7 @@ Request Example Update instance name ~~~~~~~~~~~~~~~~~~~~ -.. rest_method:: PATCH /v1.0/{project_id}/instances/{instanceId} +.. rest_method:: PUT /v1.0/{project_id}/instances/{instanceId} Update the instance name. @@ -362,7 +362,7 @@ Request Example Upgrade datastore version for instance ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. rest_method:: PATCH /v1.0/{project_id}/instances/{instanceId} +.. rest_method:: PUT /v1.0/{project_id}/instances/{instanceId} Upgrade datastore version. @@ -394,7 +394,7 @@ Request Example Detach replica ~~~~~~~~~~~~~~ -.. rest_method:: PATCH /v1.0/{project_id}/instances/{instanceId} +.. rest_method:: PUT /v1.0/{project_id}/instances/{instanceId} Detaches a replica from its replication source. @@ -426,6 +426,38 @@ Request Example +Update instance accessbility +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. rest_method:: PUT /v1.0/{project_id}/instances/{instanceId} + +The following operations are supported: + +* If the instance should be exposed to public or not. Not providing + ``is_public`` means private. +* The list of CIDRs that are allowed to access the database service. Not + providing ``allowed_cidrs`` means allowing everything. + +Normal response codes: 202 + +Request +------- + +.. rest_parameters:: parameters.yaml + + - project_id: project_id + - instanceId: instanceId + - instance: instance + - access: access + - access.is_public: access_is_public + - access.allowed_cidrs: access_allowed_cidrs + +Request Example +--------------- + +.. literalinclude:: samples/instance-update-access-request.json + :language: javascript + Delete database instance ~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/api-ref/source/samples/instance-update-access-request.json b/api-ref/source/samples/instance-update-access-request.json new file mode 100644 index 00000000..d19f65de --- /dev/null +++ b/api-ref/source/samples/instance-update-access-request.json @@ -0,0 +1,8 @@ +{ + "instance": { + "access": { + "is_public": true, + "allowed_cidrs": ["10.0.0.0/24"] + } + } +} |