#[non_exhaustive]pub struct BackupCredentialsArgs {
pub purpose: Option<BackupPurpose>,
pub run_id: Option<Uuid>,
pub type_: String,
}Expand description
Request body for minting short-lived S3 credentials for a backup or restore run.
JSON schema
{
"description": "Request body for minting short-lived S3 credentials for a backup or\nrestore run.",
"type": "object",
"required": [
"type"
],
"properties": {
"purpose": {
"description": "What the credentials will be used for. `backup` (the default) grants\nwrite access for uploading backups; `restore` grants strictly read-only\naccess. Either way the credentials are scoped to the group's backup\nstorage only.",
"$ref": "#/components/schemas/BackupPurpose"
},
"run_id": {
"description": "This must be the run-uuid the client minted for this run.\nThe field is optional only so older clients don't break; it WILL be made\nmandatory in future.",
"type": [
"string",
"null"
],
"format": "uuid"
},
"type": {
"description": "The backup type the credentials are for (e.g. `tamanu-postgres`). For a\n`backup`, the type must be an enabled capability of this server or the\nsubject of a pending \"backup now\" request; for a `restore`, the server's\nrestore window must be open (an operator allows restores for it in\ncanopy). Otherwise the request is rejected with 409.",
"type": "string"
}
}
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.purpose: Option<BackupPurpose>What the credentials will be used for. backup (the default) grants
write access for uploading backups; restore grants strictly read-only
access. Either way the credentials are scoped to the group’s backup
storage only.
run_id: Option<Uuid>This must be the run-uuid the client minted for this run. The field is optional only so older clients don’t break; it WILL be made mandatory in future.
type_: StringThe backup type the credentials are for (e.g. tamanu-postgres). For a
backup, the type must be an enabled capability of this server or the
subject of a pending “backup now” request; for a restore, the server’s
restore window must be open (an operator allows restores for it in
canopy). Otherwise the request is rejected with 409.
Implementations§
Source§impl BackupCredentialsArgs
impl BackupCredentialsArgs
Sourcepub fn builder() -> BackupCredentialsArgsBuilder
pub fn builder() -> BackupCredentialsArgsBuilder
Create an instance of BackupCredentialsArgs using the builder syntax
Trait Implementations§
Source§impl Clone for BackupCredentialsArgs
impl Clone for BackupCredentialsArgs
Source§fn clone(&self) -> BackupCredentialsArgs
fn clone(&self) -> BackupCredentialsArgs
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more