Copy Snapshot
| lightsail_copy_snapshot | R Documentation |
Copies a manual snapshot of an instance or disk as another manual snapshot, or copies an automatic snapshot of an instance or disk as a manual snapshot¶
Description¶
Copies a manual snapshot of an instance or disk as another manual snapshot, or copies an automatic snapshot of an instance or disk as a manual snapshot. This operation can also be used to copy a manual or automatic snapshot of an instance or a disk from one Amazon Web Services Region to another in Amazon Lightsail.
When copying a manual snapshot, be sure to define the source region,
source snapshot name, and target snapshot name parameters.
When copying an automatic snapshot, be sure to define the
source region, source resource name, target snapshot name, and
either the restore date or the use latest restorable auto snapshot
parameters.
Usage¶
lightsail_copy_snapshot(sourceSnapshotName, sourceResourceName,
restoreDate, useLatestRestorableAutoSnapshot, targetSnapshotName,
sourceRegion)
Arguments¶
sourceSnapshotNameThe name of the source manual snapshot to copy.
Constraint:
Define this parameter only when copying a manual snapshot as another manual snapshot.
sourceResourceNameThe name of the source instance or disk from which the source automatic snapshot was created.
Constraint:
Define this parameter only when copying an automatic snapshot as a manual snapshot. For more information, see the Amazon Lightsail Developer Guide.
restoreDateThe date of the source automatic snapshot to copy. Use the
get auto snapshotsoperation to identify the dates of the available automatic snapshots.Constraints:
Must be specified in
YYYY-MM-DDformat.This parameter cannot be defined together with the
use latest restorable auto snapshotparameter. Therestore dateanduse latest restorable auto snapshotparameters are mutually exclusive.Define this parameter only when copying an automatic snapshot as a manual snapshot. For more information, see the Amazon Lightsail Developer Guide.
useLatestRestorableAutoSnapshotA Boolean value to indicate whether to use the latest available automatic snapshot of the specified source instance or disk.
Constraints:
This parameter cannot be defined together with the
restore dateparameter. Theuse latest restorable auto snapshotandrestore dateparameters are mutually exclusive.Define this parameter only when copying an automatic snapshot as a manual snapshot. For more information, see the Amazon Lightsail Developer Guide.
targetSnapshotName[required] The name of the new manual snapshot to be created as a copy.
sourceRegion[required] The Amazon Web Services Region where the source manual or automatic snapshot is located.
Value¶
A list with the following syntax:
list(
operations = list(
list(
id = "string",
resourceName = "string",
resourceType = "ContainerService"|"Instance"|"StaticIp"|"KeyPair"|"InstanceSnapshot"|"Domain"|"PeeredVpc"|"LoadBalancer"|"LoadBalancerTlsCertificate"|"Disk"|"DiskSnapshot"|"RelationalDatabase"|"RelationalDatabaseSnapshot"|"ExportSnapshotRecord"|"CloudFormationStackRecord"|"Alarm"|"ContactMethod"|"Distribution"|"Certificate"|"Bucket",
createdAt = as.POSIXct(
"2015-01-01"
),
location = list(
availabilityZone = "string",
regionName = "us-east-1"|"us-east-2"|"us-west-1"|"us-west-2"|"eu-west-1"|"eu-west-2"|"eu-west-3"|"eu-central-1"|"ca-central-1"|"ap-south-1"|"ap-southeast-1"|"ap-southeast-2"|"ap-northeast-1"|"ap-northeast-2"|"eu-north-1"
),
isTerminal = TRUE|FALSE,
operationDetails = "string",
operationType = "DeleteKnownHostKeys"|"DeleteInstance"|"CreateInstance"|"StopInstance"|"StartInstance"|"RebootInstance"|"OpenInstancePublicPorts"|"PutInstancePublicPorts"|"CloseInstancePublicPorts"|"AllocateStaticIp"|"ReleaseStaticIp"|"AttachStaticIp"|"DetachStaticIp"|"UpdateDomainEntry"|"DeleteDomainEntry"|"CreateDomain"|"DeleteDomain"|"CreateInstanceSnapshot"|"DeleteInstanceSnapshot"|"CreateInstancesFromSnapshot"|"CreateLoadBalancer"|"DeleteLoadBalancer"|"AttachInstancesToLoadBalancer"|"DetachInstancesFromLoadBalancer"|"UpdateLoadBalancerAttribute"|"CreateLoadBalancerTlsCertificate"|"DeleteLoadBalancerTlsCertificate"|"AttachLoadBalancerTlsCertificate"|"CreateDisk"|"DeleteDisk"|"AttachDisk"|"DetachDisk"|"CreateDiskSnapshot"|"DeleteDiskSnapshot"|"CreateDiskFromSnapshot"|"CreateRelationalDatabase"|"UpdateRelationalDatabase"|"DeleteRelationalDatabase"|"CreateRelationalDatabaseFromSnapshot"|"CreateRelationalDatabaseSnapshot"|"DeleteRelationalDatabaseSnapshot"|"UpdateRelationalDatabaseParameters"|"StartRelationalDatabase"|"RebootRelationalDatabase"|"StopRelationalDatabase"|"EnableAddOn"|"DisableAddOn"|"PutAlarm"|"GetAlarms"|"DeleteAlarm"|"TestAlarm"|"CreateContactMethod"|"GetContactMethods"|"SendContactMethodVerification"|"DeleteContactMethod"|"CreateDistribution"|"UpdateDistribution"|"DeleteDistribution"|"ResetDistributionCache"|"AttachCertificateToDistribution"|"DetachCertificateFromDistribution"|"UpdateDistributionBundle"|"SetIpAddressType"|"CreateCertificate"|"DeleteCertificate"|"CreateContainerService"|"UpdateContainerService"|"DeleteContainerService"|"CreateContainerServiceDeployment"|"CreateContainerServiceRegistryLogin"|"RegisterContainerImage"|"DeleteContainerImage"|"CreateBucket"|"DeleteBucket"|"CreateBucketAccessKey"|"DeleteBucketAccessKey"|"UpdateBucketBundle"|"UpdateBucket"|"SetResourceAccessForBucket"|"UpdateInstanceMetadataOptions"|"StartGUISession"|"StopGUISession"|"SetupInstanceHttps",
status = "NotStarted"|"Started"|"Failed"|"Completed"|"Succeeded",
statusChangedAt = as.POSIXct(
"2015-01-01"
),
errorCode = "string",
errorDetails = "string"
)
)
)
Request syntax¶
svc$copy_snapshot(
sourceSnapshotName = "string",
sourceResourceName = "string",
restoreDate = "string",
useLatestRestorableAutoSnapshot = TRUE|FALSE,
targetSnapshotName = "string",
sourceRegion = "us-east-1"|"us-east-2"|"us-west-1"|"us-west-2"|"eu-west-1"|"eu-west-2"|"eu-west-3"|"eu-central-1"|"ca-central-1"|"ap-south-1"|"ap-southeast-1"|"ap-southeast-2"|"ap-northeast-1"|"ap-northeast-2"|"eu-north-1"
)