mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-11 14:56:53 +00:00
admin api: merge calls to manage global/local aliases
This commit is contained in:
+13
-81
@@ -946,14 +946,16 @@ paths:
|
||||
schema:
|
||||
$ref: '#/components/schemas/BucketInfo'
|
||||
|
||||
/AddGlobalBucketAlias:
|
||||
/AddBucketAlias:
|
||||
post:
|
||||
tags:
|
||||
- Bucket aliases
|
||||
operationId: "AddGlobalBucketAlias"
|
||||
summary: "Add a global alias"
|
||||
operationId: "AddlBucketAlias"
|
||||
summary: "Add an alias to a bucket"
|
||||
description: |
|
||||
Add a global alias to the target bucket
|
||||
Add an alias for the target bucket.
|
||||
This can be a local alias if `accessKeyId` is specified,
|
||||
or a global alias otherwise.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
@@ -961,78 +963,6 @@ paths:
|
||||
schema:
|
||||
type: object
|
||||
required: [bucketId, alias]
|
||||
properties:
|
||||
bucketId:
|
||||
type: string
|
||||
example: e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b
|
||||
alias:
|
||||
type: string
|
||||
example: my_documents
|
||||
responses:
|
||||
'500':
|
||||
description: "The server can not handle your request. Check your connectivity with the rest of the cluster."
|
||||
'400':
|
||||
description: "Bad request, check your request body"
|
||||
'404':
|
||||
description: "Bucket not found"
|
||||
'200':
|
||||
description: Returns exhaustive information about the bucket
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/BucketInfo'
|
||||
|
||||
/RemoveGlobalBucketAlias:
|
||||
post:
|
||||
tags:
|
||||
- Bucket aliases
|
||||
operationId: "RemoveGlobalBucketAlias"
|
||||
summary: "Delete a global alias"
|
||||
description: |
|
||||
Delete a global alias from the target bucket
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required: [bucketId, alias]
|
||||
properties:
|
||||
bucketId:
|
||||
type: string
|
||||
example: e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b
|
||||
alias:
|
||||
type: string
|
||||
example: my_documents
|
||||
responses:
|
||||
'500':
|
||||
description: "The server can not handle your request. Check your connectivity with the rest of the cluster."
|
||||
'400':
|
||||
description: "Bad request, check your request body"
|
||||
'404':
|
||||
description: "Bucket not found"
|
||||
'200':
|
||||
description: Returns exhaustive information about the bucket
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/BucketInfo'
|
||||
|
||||
/AddLocalBucketAlias:
|
||||
post:
|
||||
tags:
|
||||
- Bucket aliases
|
||||
operationId: "AddLocalBucketAlias"
|
||||
summary: "Add a local alias"
|
||||
description: |
|
||||
Add a local alias, bound to specified account, to the target bucket
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required: [bucketId, accessKeyId, alias]
|
||||
properties:
|
||||
bucketId:
|
||||
type: string
|
||||
@@ -1057,21 +987,23 @@ paths:
|
||||
schema:
|
||||
$ref: '#/components/schemas/BucketInfo'
|
||||
|
||||
/RemoveGlobalBucketAlias:
|
||||
/RemoveBucketAlias:
|
||||
post:
|
||||
tags:
|
||||
- Bucket aliases
|
||||
operationId: "RemoveGlobalBucketAlias"
|
||||
summary: "Delete a local alias"
|
||||
operationId: "RemoveBucketAlias"
|
||||
summary: "Remove an alias from a bucket"
|
||||
description: |
|
||||
Delete a local alias, bound to specified account, from the target bucket
|
||||
Remove an alias for the target bucket.
|
||||
This can be a local alias if `accessKeyId` is specified,
|
||||
or a global alias otherwise.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required: [bucketId, accessKeyId, alias]
|
||||
required: [bucketId, alias]
|
||||
properties:
|
||||
bucketId:
|
||||
type: string
|
||||
|
||||
+8
-30
@@ -750,35 +750,11 @@ Other flags will remain unchanged.
|
||||
|
||||
### Operations on bucket aliases
|
||||
|
||||
#### AddGlobalBucketAlias `POST /v2/AddGlobalBucketAlias`
|
||||
#### AddBucketAlias `POST /v2/AddBucketAlias`
|
||||
|
||||
Creates a global alias for a bucket.
|
||||
|
||||
Request body format:
|
||||
|
||||
```json
|
||||
{
|
||||
"bucketId": "e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b",
|
||||
"alias": "the-bucket"
|
||||
}
|
||||
```
|
||||
|
||||
#### RemoveGlobalBucketAlias `POST /v2/RemoveGlobalBucketAlias`
|
||||
|
||||
Removes a global alias for a bucket.
|
||||
|
||||
Request body format:
|
||||
|
||||
```json
|
||||
{
|
||||
"bucketId": "e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b",
|
||||
"alias": "the-bucket"
|
||||
}
|
||||
```
|
||||
|
||||
#### AddLocalBucketAlias `POST /v2/AddLocalBucketAlias`
|
||||
|
||||
Creates a local alias for a bucket in the namespace of a specific access key.
|
||||
Creates an alias for a bucket in the namespace of a specific access key.
|
||||
If `accessKeyId` is specified, an alias is created in the local namespace
|
||||
of the key. Otherwise, a global alias is created.
|
||||
|
||||
Request body format:
|
||||
|
||||
@@ -790,9 +766,11 @@ Request body format:
|
||||
}
|
||||
```
|
||||
|
||||
#### RemoveLocalBucketAlias `POST /v2/RemoveLocalBucketAlias`
|
||||
#### RemoveBucketAlias `POST /v2/RemoveBucketAlias`
|
||||
|
||||
Removes a local alias for a bucket in the namespace of a specific access key.
|
||||
Removes an alias for a bucket in the namespace of a specific access key.
|
||||
If `accessKeyId` is specified, the alias is removed from the local namespace
|
||||
of the key. Otherwise, the alias is removed from the global namespace.
|
||||
|
||||
Request body format:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user