Modify Snapshot Attribute operation for the Amazon EC2 REST adapter
The Modify Snapshot Attribute operation adds or removes permission settings for a specified snapshot.
The following figure shows a sample <items> XML element for the Modify Snapshot Attribute operation.
Sample <items> XML element for the Modify Snapshot Attribute operation
<item>
<parameters>
<snapshot-id></snapshot-id>
<create-volume-permission>
<!-You have a CHOICE of the next 2 items (add/remove) at this level->
<add>
<!-Zero or more repetition->
<item>
<!-You have a CHOICE of the next 2 items at this level->
<user-id></user-id>
<group></group>
</item>
</add>
<remove>
<!-Zero or more repetition->
<item>
<!-You have a CHOICE of the next 2 items at this level->
<user-id></user-id>
<group></group>
</item>
</remove>
</create-volume-permission>
</parameters>
</item>
</items>
The following table shows adapter request elements for the Modify Snapshot Attribute operation.
Adapter request elements for the Modify Snapshot Attribute operation
Element | Definition | Required |
---|---|---|
<access-key> | Specifies the Amazon Web Services (AWS) access key You need to generate the AWS access key by going to the Security Credentials tab in the AWS console. | Conditional;
|
<secret-key> | Specifies the AWS secret access key You need to generate the AWS secret access key by going to the Security Credentials tab in the AWS console. | Conditional;
|
<region> | Specifies the region with which you want the adapter to communicate Amazon EC2 is hosted in multiple locations world-wide. You must specify the region in which you want the adapter to perform the actions. Valid values:
| No |
<operation-name> | Contains the name of the operation: modify-snapshot-attribute | Yes |
<snapshot-id> | Specifies the ID of the Amazon EBS snapshot that you want to modify | Yes |
<create-volume-permission> | Specifies the create volume permission for the Amazon EBS snapshot that you want to modify Valid values:
| Yes |
The following figure shows a sample adapter request for the Modify Snapshot Attribute operation.
Sample adapter request for the Modify Snapshot Attribute operation
<operation-name>modify-snapshot-attribute</operation-name>
<parameters>
<snapshot-id>snap-d0b10bee</snapshot-id>
<create-volume-permission>
<add>
<item>
<user-id>379709784307</user-id>
<group />
</item>
<item>
<user-id>379709784308</user-id>
<group />
</item>
<item>
<user-id>379709784309</user-id>
<group />
</item>
</add>
<remove>
<item>
<user-id />
<group />
</item>
</remove>
</create-volume-permission>
</parameters>
</amazon-ec2-rest-request>
The following figure shows a sample adapter response for the Modify Snapshot Attribute operation.
Sample adapter response for the Modify Snapshot Attribute operation
<metadata>
<status>success</status>
</metadata>
<ModifySnapshotAttributeResponse>
<return>true</return>
</ModifySnapshotAttributeResponse>
</amazon-ec2-rest-response>
The following figure shows a sample adapter request for the Modify Snapshot Attribute operation when you want to specify the <group> as all.
Sample adapter request to modify permissions attribute for a group
<operation-name>modify-snapshot-attribute</operation-name>
<parameters>
<snapshot-id>snap-d0b10bee</snapshot-id>
<create-volume-permission>
<add>
<item>
<group>all</group>
</item>
</add>
</create-volume-permission>
</parameters>
</amazon-ec2-rest-request>