Modifie le type d'un instantané. Vous pouvez appeler cette opération pour convertir un instantané standard en instantané d'archive.
Description de l'opération
-
Les instantanés d'archive ne peuvent pas être convertis en instantanés standard.
-
Une fois créé, un instantané standard doit être conservé pendant au moins 14 jours avant de pouvoir être archivé.
-
L'archivage n'est pas pris en charge pour les instantanés partagés, les instantanés gérés par des produits cloud et les instantanés stockés dans une Cloud Box.
Testez maintenant
Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale. Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale.
Test
Autorisation RAM
|
ecs:ModifySnapshotCategory |
update |
*Snapshot
|
|
Aucune |
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| SnapshotId |
string |
Oui |
L'identifiant de l'instantané. |
s-123**sd |
| Category |
string |
Non |
Le type de l'instantané.
|
Archive |
| RetentionDays |
integer |
Non |
La période de rétention de l'instantané. Unité : jours. La période de rétention commence au moment de la création de l'instantané. Vous ne pouvez archiver que les instantanés standard qui ont été conservés pendant au moins 14 jours. Une fois l'instantané archivé, la période de rétention minimale (également appelée période d'archivage minimale) est de 60 jours. Lors du calcul de la période de rétention des instantanés archivés, vous devez déduire la période de rétention des instantanés standard. Si vous supprimez l'instantané dans les 60 jours suivant son archivage, des frais de stockage de niveau archive vous seront facturés pour l'instantané pendant 60 jours. Pour plus d'informations sur la facturation des instantanés, consultez Instantanés. Plage de valeurs : [74,65536] Remarque
Si vous ne spécifiez pas ce paramètre, l'instantané est conservé de manière permanente. |
100 |
Éléments de réponse
|
Élément |
Type |
Description |
Exemple |
|
object |
|||
| RequestId |
string |
L'identifiant de la requête. |
B48A12CD-1295-4A38-A8F0-0E92C937**** |
| TaskId |
string |
L'identifiant de la tâche d'archivage. Vous pouvez appeler l'opération DescribeTasks pour interroger l'état et la progression de la tâche d'archivage. |
t-dxh34xds**d |
Exemples
JSON format
{
"RequestId": "B48A12CD-1295-4A38-A8F0-0E92C937****",
"TaskId": "t-dxh34xds**d"
}
Codes d'erreur
|
Code de statut HTTP |
Code d'erreur |
Message d'erreur |
Description |
|---|---|---|---|
| 400 | InvalidRetentionDays.Malformed | The specified RetentionDays is not valid. | |
| 400 | InvalidOperation.DecreaseRetentionDaysUnsupported | The requested operation to decrease retention days for the snapshot is not supported. | |
| 400 | InvalidSnapshotId.NotReady | The specified snapshot has not completed yet. | |
| 400 | InvalidOperation.ArchiveSharedSnapshotUnsupported | The specified shared snapshot does not support archiving. | |
| 400 | InvalidOperation.ArchiveCloudBoxSnapshotUnsupported | Snapshots in CloudBox do not support archiving. | |
| 400 | InvalidStatus.SnapshotUnfinished | Unfinished snapshots do not support archiving. | |
| 400 | InvalidStatus.SnapshotAgeLimit | Snapshots created within 14 days do not support archiving. | |
| 400 | InvalidStatus.SnapshotInArchive | The specified snapshot is currently being archived. | |
| 400 | InvalidParameter.SnapshotCategory | The specified parameter category is invalid. | |
| 400 | InvalidRetentionDays.LessThanLockExpiredTime | The specified parameter RetentionDays is invalid. The RetentionDays should be greater than the snapshot LockExpiredTime. | |
| 403 | InvalidOperation.ResourceManagedByCloudProduct | The current operation is not supported because the resource is managed by a cloud product. Please contact the relevant cloud product to confirm the reason. | |
| 403 | InvalidOperation.InstantAccessEnabledUnsupport | The specified snapshot with legacy Instant Access enabled does not support archive. | |
| 403 | InvalidOperation.EncryptedSnapshotUnsupport | Archiving encrypted snapshots is not currently supported. | |
| 403 | QuotaExceed.ConcurrentArchiveSnapshotQuota | The number of concurrent archiving tasks associated with the disk of the current snapshot has exceeded the quota limit. Please try again later. | |
| 403 | InvalidOperation.DefaultFreeSnapshotNotSupport | The specified snapshot is a default free snapshot and does not support this operation. | |
| 404 | InvalidSnapshotId.NotFound | The specified SnapshotId does not exist. |
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.