Copy Snapshot
| ec2_copy_snapshot | R Documentation |
Creates an exact copy of an Amazon EBS snapshot¶
Description¶
Creates an exact copy of an Amazon EBS snapshot.
The location of the source snapshot determines whether you can copy it or not, and the allowed destinations for the snapshot copy.
-
If the source snapshot is in a Region, you can copy it within that Region, to another Region, to an Outpost associated with that Region, or to a Local Zone in that Region.
-
If the source snapshot is in a Local Zone, you can copy it within that Local Zone, to another Local Zone in the same zone group, or to the parent Region of the Local Zone.
-
If the source snapshot is on an Outpost, you can't copy it.
When copying snapshots to a Region, the encryption outcome for the snapshot copy depends on the Amazon EBS encryption by default setting for the destination Region, the encryption status of the source snapshot, and the encryption parameters you specify in the request. For more information, see Encryption and snapshot copying.
Snapshots copied to an Outpost must be encrypted. Unencrypted snapshots are not supported on Outposts. For more information, Amazon EBS local snapshots on Outposts.
Snapshots copies have an arbitrary source volume ID. Do not use this volume ID for any purpose.
For more information, see Copy an Amazon EBS snapshot in the Amazon EBS User Guide.
Usage¶
ec2_copy_snapshot(Description, DestinationOutpostArn, DestinationRegion,
Encrypted, KmsKeyId, PresignedUrl, SourceRegion, SourceSnapshotId,
TagSpecifications, CompletionDurationMinutes,
DestinationAvailabilityZone, DryRun)
Arguments¶
Description |
A description for the EBS snapshot. |
DestinationOutpostArn |
The Amazon Resource Name (ARN) of the Outpost to which to copy the snapshot. Only supported when copying a snapshot to an Outpost. For more information, see Copy snapshots from an Amazon Web Services Region to an Outpost in the Amazon EBS User Guide. |
DestinationRegion |
The destination Region to use in the The snapshot copy is sent to the regional endpoint that you sent the
HTTP request to (for example, |
Encrypted |
To encrypt a copy of an unencrypted snapshot if encryption by default is not enabled, enable encryption using this parameter. Otherwise, omit this parameter. Copies of encrypted snapshots are encrypted, even if you omit this parameter and encryption by default is not enabled. You cannot set this parameter to false. For more information, see Amazon EBS encryption in the Amazon EBS User Guide. |
KmsKeyId |
The identifier of the KMS key to use for Amazon EBS encryption.
If this parameter is not specified, your KMS key for Amazon EBS is used.
If You can specify the KMS key using any of the following:
Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid, the action can appear to complete, but eventually fails. |
PresignedUrl |
When you copy an encrypted source snapshot using the Amazon EC2 Query API, you must supply a pre-signed URL. This parameter is optional for unencrypted snapshots. For more information, see Query requests. The |
SourceRegion |
[required] The ID of the Region that contains the snapshot to be copied. |
SourceSnapshotId |
[required] The ID of the EBS snapshot to copy. |
TagSpecifications |
The tags to apply to the new snapshot. |
CompletionDurationMinutes |
Not supported when copying snapshots to or from Local Zones or Outposts. Specify a completion duration, in 15 minute increments, to initiate a time-based snapshot copy. Time-based snapshot copy operations complete within the specified duration. For more information, see Time-based copies. If you do not specify a value, the snapshot copy operation is completed on a best-effort basis. |
DestinationAvailabilityZone |
The Local Zone, for example, Only supported when copying a snapshot to a Local Zone. |
DryRun |
Checks whether you have the required permissions for the action,
without actually making the request, and provides an error response. If
you have the required permissions, the error response is
|
Value¶
A list with the following syntax:
list(
Tags = list(
list(
Key = "string",
Value = "string"
)
),
SnapshotId = "string"
)
Request syntax¶
svc$copy_snapshot(
Description = "string",
DestinationOutpostArn = "string",
DestinationRegion = "string",
Encrypted = TRUE|FALSE,
KmsKeyId = "string",
PresignedUrl = "string",
SourceRegion = "string",
SourceSnapshotId = "string",
TagSpecifications = list(
list(
ResourceType = "capacity-reservation"|"client-vpn-endpoint"|"customer-gateway"|"carrier-gateway"|"coip-pool"|"declarative-policies-report"|"dedicated-host"|"dhcp-options"|"egress-only-internet-gateway"|"elastic-ip"|"elastic-gpu"|"export-image-task"|"export-instance-task"|"fleet"|"fpga-image"|"host-reservation"|"image"|"image-usage-report"|"import-image-task"|"import-snapshot-task"|"instance"|"instance-event-window"|"internet-gateway"|"ipam"|"ipam-pool"|"ipam-scope"|"ipv4pool-ec2"|"ipv6pool-ec2"|"key-pair"|"launch-template"|"local-gateway"|"local-gateway-route-table"|"local-gateway-virtual-interface"|"local-gateway-virtual-interface-group"|"local-gateway-route-table-vpc-association"|"local-gateway-route-table-virtual-interface-group-association"|"natgateway"|"network-acl"|"network-interface"|"network-insights-analysis"|"network-insights-path"|"network-insights-access-scope"|"network-insights-access-scope-analysis"|"outpost-lag"|"placement-group"|"prefix-list"|"replace-root-volume-task"|"reserved-instances"|"route-table"|"security-group"|"security-group-rule"|"service-link-virtual-interface"|"snapshot"|"spot-fleet-request"|"spot-instances-request"|"subnet"|"subnet-cidr-reservation"|"traffic-mirror-filter"|"traffic-mirror-session"|"traffic-mirror-target"|"transit-gateway"|"transit-gateway-attachment"|"transit-gateway-connect-peer"|"transit-gateway-multicast-domain"|"transit-gateway-policy-table"|"transit-gateway-metering-policy"|"transit-gateway-route-table"|"transit-gateway-route-table-announcement"|"volume"|"vpc"|"vpc-endpoint"|"vpc-endpoint-connection"|"vpc-endpoint-service"|"vpc-endpoint-service-permission"|"vpc-peering-connection"|"vpn-connection"|"vpn-gateway"|"vpc-flow-log"|"capacity-reservation-fleet"|"traffic-mirror-filter-rule"|"vpc-endpoint-connection-device-type"|"verified-access-instance"|"verified-access-group"|"verified-access-endpoint"|"verified-access-policy"|"verified-access-trust-provider"|"vpn-connection-device-type"|"vpc-block-public-access-exclusion"|"vpc-encryption-control"|"route-server"|"route-server-endpoint"|"route-server-peer"|"ipam-resource-discovery"|"ipam-resource-discovery-association"|"instance-connect-endpoint"|"verified-access-endpoint-target"|"ipam-external-resource-verification-token"|"capacity-block"|"mac-modification-task"|"ipam-prefix-list-resolver"|"ipam-policy"|"ipam-prefix-list-resolver-target"|"secondary-interface"|"secondary-network"|"secondary-subnet"|"capacity-manager-data-export"|"vpn-concentrator"|"ipam-pool-allocation",
Tags = list(
list(
Key = "string",
Value = "string"
)
)
)
),
CompletionDurationMinutes = 123,
DestinationAvailabilityZone = "string",
DryRun = TRUE|FALSE
)
Examples¶
## Not run:
# This example copies a snapshot with the snapshot ID of
# `snap-066877671789bd71b` from the `us-west-2` region to the
# `us-east-1` region and adds a short description to identify the
# snapshot.
svc$copy_snapshot(
Description = "This is my copied snapshot.",
DestinationRegion = "us-east-1",
SourceRegion = "us-west-2",
SourceSnapshotId = "snap-066877671789bd71b"
)
## End(Not run)