Update

Updates an external storage policy by name or ID. Credentials can only be rotated by providing both access_key_id and secret_access_key.

Authentication

AuthorizationBearer
Bearer authentication header of the form `Bearer <PHONIC_API_KEY>`. Manage your API keys [here](https://phonic.co/api-keys).

Path parameters

nameOrIdstringRequired
The name or the ID of the external storage policy to update.

Query parameters

projectstringOptionalDefaults to main

The name of the project containing the external storage policy. Only used when nameOrId is a name.

Request

This endpoint expects an object.
namestringOptional

The name of the external storage policy. Must be snake_case, start with a lowercase letter and be unique within the project.

endpoint_urlstringOptional

The S3-compatible endpoint URL that artifacts are uploaded to. Must be a publicly routable HTTPS URL without embedded credentials.

bucketstringOptional
The bucket that artifacts are uploaded to.
regionstring or nullOptional

The region of the bucket. Set to null when the endpoint doesn’t require a region.

key_prefixstring or nullOptional
Prefix prepended to every object key.
addressing_styleenumOptional
How bucket names are addressed in requests to the endpoint.
access_key_idstringOptional

Access key ID used to authenticate with the endpoint. Must be provided together with secret_access_key.

secret_access_keystringOptional

Secret access key used to authenticate with the endpoint. Must be provided together with access_key_id.

Response

Success response
successboolean
Whether the external storage policy was updated successfully.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
500
Internal Server Error