synology_apm.sdk.models.remote_storage module

RemoteStorage data model.

class synology_apm.sdk.models.remote_storage.RemoteStorage(storage_id, name, storage_type, device_model, endpoint, status, used_bytes, remaining_bytes, encryption_enabled=False, vault_name='', account_name='', client_id='')

Bases: object

A remote storage device configured in APM (External Vault).

Variables:
  • storage_id (str) – Unique remote storage identifier.

  • name (str) – Display name.

  • storage_type (synology_apm.sdk.enums.RemoteStorageType) – Storage type (RemoteStorageType).

  • device_model (str) – Device model. Only meaningful for ACTIVE_PROTECT_VAULT.

  • endpoint (str) – Connection address (host:port).

  • status (synology_apm.sdk.enums.RemoteStorageStatus) – Connection status (RemoteStorageStatus).

  • used_bytes (int | None) – Used space in bytes. None when unavailable.

  • remaining_bytes (int | None) – Remaining available space in bytes. None when unavailable.

  • encryption_enabled (bool) – True when client-side encryption is enabled for this storage.

  • vault_name (str) – Bucket or vault name. Empty for storage types that do not report it.

  • account_name (str) – Storage account name. Only meaningful for AZURE_BLOB and AZURE_BLOB_CHINA; empty for all other storage types.

  • client_id (str) – Application (client) ID used to authenticate. Only meaningful for AZURE_BLOB and AZURE_BLOB_CHINA; empty for all other storage types.

storage_id: str
name: str
storage_type: RemoteStorageType
device_model: str
endpoint: str
status: RemoteStorageStatus
used_bytes: int | None
remaining_bytes: int | None
encryption_enabled: bool = False
vault_name: str = ''
account_name: str = ''
client_id: str = ''
to_dict()

Return a JSON-safe dict representation.

class synology_apm.sdk.models.remote_storage.GenericS3StorageAddRequest(access_key, secret_key, vault_name, endpoint, encryption_enabled=False, relink_encryption_key='', trust_self_signed=False, unmanaged_retirement_plan=None)

Bases: object

Parameters for registering a new S3 Compatible remote storage device.

If pre-existing backup catalogs are found in the bucket, add() raises RemoteStorageUnmanagedCatalogError unless unmanaged_retirement_plan is set.

Variables:
  • access_key (str) – Access key.

  • secret_key (str) – Secret key.

  • vault_name (str) – Bucket name. Also used as the display name in APM.

  • endpoint (str) – Service endpoint URL (e.g. “https://s3.example.com:443”).

  • encryption_enabled (bool) – True to enable client-side encryption.

  • relink_encryption_key (str) – Encryption key issued when this bucket was previously registered with APM. Leave “” for a new bucket — APM generates the key. When re-adding, the old key remains valid even after a new key is issued.

  • trust_self_signed (bool) – True to auto-fetch and trust the endpoint’s self-signed certificate. Use for endpoints with self-signed certificates; leave False for CA-signed endpoints.

  • unmanaged_retirement_plan (synology_apm.sdk.models.retirement_plan.RetirementPlan | None) – Retirement plan to assign pre-existing backup catalogs found in the bucket. Required when unmanaged catalogs exist.

access_key: str
secret_key: str
vault_name: str
endpoint: str
encryption_enabled: bool = False
trust_self_signed: bool = False
unmanaged_retirement_plan: RetirementPlan | None = None
class synology_apm.sdk.models.remote_storage.APVStorageAddRequest(access_key, secret_key, endpoint, encryption_enabled=False, relink_encryption_key='', trust_self_signed=False, unmanaged_retirement_plan=None)

Bases: object

Parameters for registering a new ActiveProtect Vault remote storage device.

If pre-existing backup catalogs are found in the vault, add() raises RemoteStorageUnmanagedCatalogError unless unmanaged_retirement_plan is set.

Variables:
  • access_key (str) – Access key.

  • secret_key (str) – Secret key.

  • endpoint (str) – APV server address in “host:port” format (no https:// scheme).

  • encryption_enabled (bool) – True to enable client-side encryption.

  • relink_encryption_key (str) – Encryption key issued when this vault was previously registered with APM. Leave “” for a new vault — APM generates the key. When re-adding, the old key remains valid even after a new key is issued.

  • trust_self_signed (bool) – True to auto-fetch and trust the APV server’s self-signed certificate. APV servers typically use self-signed certificates, so this is usually required.

  • unmanaged_retirement_plan (synology_apm.sdk.models.retirement_plan.RetirementPlan | None) – Retirement plan to assign pre-existing backup catalogs found in the vault. Required when unmanaged catalogs exist.

access_key: str
secret_key: str
endpoint: str
encryption_enabled: bool = False
trust_self_signed: bool = False
unmanaged_retirement_plan: RetirementPlan | None = None
class synology_apm.sdk.models.remote_storage.AmazonS3StorageAddRequest(access_key, secret_key, vault_name, encryption_enabled=False, relink_encryption_key='', unmanaged_retirement_plan=None)

Bases: _S3VendorStorageAddRequest

Parameters for registering a new Amazon S3 remote storage device.

access_key / secret_key are the AWS credentials; see _S3VendorStorageAddRequest and GenericS3StorageAddRequest for the shared endpoint-derivation and catalog-conflict contract.

encryption_enabled: bool = False
unmanaged_retirement_plan: RetirementPlan | None = None
access_key: str
secret_key: str
vault_name: str
class synology_apm.sdk.models.remote_storage.AmazonS3ChinaStorageAddRequest(access_key, secret_key, vault_name, encryption_enabled=False, relink_encryption_key='', unmanaged_retirement_plan=None)

Bases: _S3VendorStorageAddRequest

Parameters for registering a new Amazon S3 China region remote storage device.

access_key / secret_key are the AWS credentials; see _S3VendorStorageAddRequest and GenericS3StorageAddRequest for the shared endpoint-derivation and catalog-conflict contract.

encryption_enabled: bool = False
unmanaged_retirement_plan: RetirementPlan | None = None
access_key: str
secret_key: str
vault_name: str
class synology_apm.sdk.models.remote_storage.C2ObjectStorageAddRequest(access_key, secret_key, vault_name, encryption_enabled=False, relink_encryption_key='', unmanaged_retirement_plan=None)

Bases: _S3VendorStorageAddRequest

Parameters for registering a new Synology C2 Object Storage remote storage device.

access_key / secret_key are the C2 credentials; see _S3VendorStorageAddRequest and GenericS3StorageAddRequest for the shared endpoint-derivation and catalog-conflict contract.

encryption_enabled: bool = False
unmanaged_retirement_plan: RetirementPlan | None = None
access_key: str
secret_key: str
vault_name: str
class synology_apm.sdk.models.remote_storage.WasabiCloudStorageAddRequest(access_key, secret_key, vault_name, encryption_enabled=False, relink_encryption_key='', unmanaged_retirement_plan=None)

Bases: _S3VendorStorageAddRequest

Parameters for registering a new Wasabi Cloud Storage remote storage device.

access_key / secret_key are the Wasabi credentials; see _S3VendorStorageAddRequest and GenericS3StorageAddRequest for the shared endpoint-derivation and catalog-conflict contract.

encryption_enabled: bool = False
unmanaged_retirement_plan: RetirementPlan | None = None
access_key: str
secret_key: str
vault_name: str
class synology_apm.sdk.models.remote_storage.AzureBlobStorageAddRequest(tenant_id, client_id, secret, account_name, vault_name, encryption_enabled=False, relink_encryption_key='', unmanaged_retirement_plan=None)

Bases: _AzureBlobStorageAddRequestBase

Parameters for registering a new Azure Blob Storage remote storage device.

See _AzureBlobStorageAddRequestBase for the shared field contract.

encryption_enabled: bool = False
unmanaged_retirement_plan: RetirementPlan | None = None
tenant_id: str
client_id: str
secret: str
account_name: str
vault_name: str
class synology_apm.sdk.models.remote_storage.AzureBlobChinaStorageAddRequest(tenant_id, client_id, secret, account_name, vault_name, encryption_enabled=False, relink_encryption_key='', unmanaged_retirement_plan=None)

Bases: _AzureBlobStorageAddRequestBase

Parameters for registering a new Azure Blob Storage (China region) remote storage device.

See _AzureBlobStorageAddRequestBase for the shared field contract.

encryption_enabled: bool = False
unmanaged_retirement_plan: RetirementPlan | None = None
tenant_id: str
client_id: str
secret: str
account_name: str
vault_name: str
class synology_apm.sdk.models.remote_storage.AzureBlobStorageUpdateRequest(tenant_id, client_id, secret)

Bases: object

Updated credentials for an Azure Blob Storage remote storage device (AZURE_BLOB or AZURE_BLOB_CHINA), using a Microsoft Entra application.

The storage account and container are immutable once set at registration and are not part of this request.

Variables:
  • tenant_id (str) – Azure AD tenant ID.

  • client_id (str) – Application (client) ID.

  • secret (str) – Client secret.

tenant_id: str
client_id: str
secret: str
class synology_apm.sdk.models.remote_storage.AccessKeyStorageUpdateRequest(access_key, secret_key, endpoint='', trust_self_signed=False)

Bases: object

Updated credentials for a remote storage device (APV, S3 Compatible, Amazon S3, C2 Object Storage, or Wasabi).

Display name, storage type, and encryption settings are immutable once set at registration.

endpoint and trust_self_signed apply to S3_COMPATIBLE and ACTIVE_PROTECT_VAULT storages. For APV, endpoint uses “host:port” format (no https:// scheme). For S3 Compatible, endpoint uses a full URL (e.g. “https://s3.example.com:443”). For endpoint-free storage types (AMAZON_S3, AMAZON_S3_CHINA, C2_OBJECT_STORAGE, WASABI), leave endpoint=”” — it is not used.

Variables:
  • access_key (str) – New access key.

  • secret_key (str) – New secret key.

  • endpoint (str) – New endpoint address. Sent for S3_COMPATIBLE (full URL) and ACTIVE_PROTECT_VAULT (host:port); leave “” for endpoint-free types.

  • trust_self_signed (bool) – True to auto-fetch and trust the endpoint’s self-signed certificate. Applies to S3_COMPATIBLE and ACTIVE_PROTECT_VAULT storages. Leave False for endpoint-free types — their endpoints are CA-signed.

access_key: str
secret_key: str
endpoint: str = ''
trust_self_signed: bool = False
class synology_apm.sdk.models.remote_storage.RemoteStorageAddResult(storage, encryption_key, relink_warning=None)

Bases: object

Result of a successful add() call.

Variables:
  • storage (synology_apm.sdk.models.remote_storage.RemoteStorage) – The newly registered remote storage device.

  • encryption_key (str | None) – Client-side encryption key. Store this key securely — it cannot be retrieved later. When re-adding a previously encrypted vault, the old key remains valid but the new key should be saved for future use. None when encryption is not enabled.

  • relink_warning (str | None) – Non-None when catalog relinking was attempted but failed. The storage is registered; catalogs remain unlinked and must be relinked manually. None when no relinking was needed or relinking succeeded.

storage: RemoteStorage
encryption_key: str | None
to_dict()

Return a JSON-safe dict representation.