Adds or removes permission settings for the specified snapshot. You may add or remove
specified Amazon Web Services account IDs from a snapshot's list of create volume permissions, but you cannot
do both in a single operation. If you need to both add and remove account IDs for a snapshot,
you must use multiple operations. You can make up to 500 modifications to a snapshot in a single operation.
Encrypted snapshots and snapshots with Amazon Web Services Marketplace product codes cannot be made
public. Snapshots encrypted with your default KMS key cannot be shared with other accounts.
For more information about modifying snapshot permissions, see Share a snapshot in the
Amazon Elastic Compute Cloud User Guide.
example
Use a bare-bones client and the command you need to make an API call.
Adds or removes permission settings for the specified snapshot. You may add or remove specified Amazon Web Services account IDs from a snapshot's list of create volume permissions, but you cannot do both in a single operation. If you need to both add and remove account IDs for a snapshot, you must use multiple operations. You can make up to 500 modifications to a snapshot in a single operation.
Encrypted snapshots and snapshots with Amazon Web Services Marketplace product codes cannot be made public. Snapshots encrypted with your default KMS key cannot be shared with other accounts.
For more information about modifying snapshot permissions, see Share a snapshot in the Amazon Elastic Compute Cloud User Guide.
Use a bare-bones client and the command you need to make an API call.
import { EC2Client, ModifySnapshotAttributeCommand } from "@aws-sdk/client-ec2"; // ES Modules import // const { EC2Client, ModifySnapshotAttributeCommand } = require("@aws-sdk/client-ec2"); // CommonJS import const client = new EC2Client(config); const command = new ModifySnapshotAttributeCommand(input); const response = await client.send(command);
ModifySnapshotAttributeCommandInput for command's
input
shape.ModifySnapshotAttributeCommandOutput for command's
response
shape.config for EC2Client's
config
shape.