From 932e7882ecc07d282a53f8f0084108203056de06 Mon Sep 17 00:00:00 2001 From: leslitagordita Date: Fri, 30 Oct 2020 16:27:29 -0400 Subject: [PATCH 1/2] /object-storage/buckets/{clusterId}/{bucket}/access is now PUT Endpoint still supports POST method, but docs now show it as PUT for consistency with API convention and new GET method for this endpoint. --- openapi.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index b75247485..41853b418 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -11121,12 +11121,12 @@ paths: required: true schema: type: string - post: + put: operationId: modifyObjectStorageBucketAccess x-linode-cli-skip: true servers: - url: https://api.linode.com/v4 - summary: Object Storage Bucket Access Modify + summary: Object Storage Bucket Access Update description: | Allows changing basic Cross-origin Resource Sharing (CORS) and Access Control Level (ACL) settings. Only allows enabling/disabling CORS for all origins, and/or setting canned ACLs. @@ -11178,7 +11178,7 @@ paths: source: > curl -H "Content-Type: application/json" \ -H "Authorization: Bearer $TOKEN" \ - -X POST -d '{ + -X PUT -d '{ "cors_enabled": true, "acl": "private" }' \ From 351d4d05dbc5a6f0b48cd739b06addb48e2ff450 Mon Sep 17 00:00:00 2001 From: leslitagordita Date: Mon, 2 Nov 2020 14:27:40 -0500 Subject: [PATCH 2/2] Add POST method back Spec should display both methods, since both methods can modify this resource. --- openapi.yaml | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index 41853b418..1d3daf3b4 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -11121,6 +11121,69 @@ paths: required: true schema: type: string + post: + operationId: modifyObjectStorageBucketAccess + x-linode-cli-skip: true + servers: + - url: https://api.linode.com/v4 + summary: Object Storage Bucket Access Modify + description: | + Allows changing basic Cross-origin Resource Sharing (CORS) and Access Control Level (ACL) settings. + Only allows enabling/disabling CORS for all origins, and/or setting canned ACLs. + For more fine-grained control of both systems, please use the S3 API directly. + + + + This endpoint is available for convenience. It is recommended that instead you + use the more more [fully-featured S3 API](https://docs.ceph.com/docs/mimic/radosgw/s3/bucketops/#put-bucket-acl) directly. + tags: + - Object Storage + security: + - personalAccessToken: [] + - oauth: + - object_storage:read_write + requestBody: + description: The changes to make to the bucket's access controls. + content: + application/json: + schema: + properties: + cors_enabled: + type: boolean + description: > + If true, the bucket will be created with CORS enabled for all + origins. For more fine-grained controls of CORS, use the S3 + API directly. + example: true + acl: + type: string + enum: + - private + - public-read + - authenticated-read + description: > + The Access Control Level of the bucket, as a canned ACL string. + For more fine-grained control of ACLs, use the S3 API directly. + example: private + responses: + '200': + description: Access controls updated. + content: + application/json: + schema: + type: object + default: + $ref: '#/components/responses/ErrorResponse' + x-code-samples: + - lang: Shell + source: > + curl -H "Content-Type: application/json" \ + -H "Authorization: Bearer $TOKEN" \ + -X POST -d '{ + "cors_enabled": true, + "acl": "private" + }' \ + https://api.linode.com/v4/object-storage/buckets/us-east-1/example-bucket/access put: operationId: modifyObjectStorageBucketAccess x-linode-cli-skip: true