使用AWS SDK for PHP 2创建EBS卷


Create an EBS volume using AWS SDK for PHP 2

我想创建一个EBS存储并将其连接到现有的EC2实例。

然而,我在这里找不到任何PHP代码示例http://docs.aws.amazon.com/aws-sdk-php-2/guide/latest/index.html

您会发现通过API进行EBS管理是EC2名称空间的一部分。

具体而言:

  1. 创建卷:http://docs.aws.amazon.com/aws-sdk-php-2/latest/class-Aws.Ec2.Ec2Client.html#_createVolume

  2. 将卷附加到实例:http://docs.aws.amazon.com/aws-sdk-php-2/latest/class-Aws.Ec2.Ec2Client.html#_attachVolume