computing / Client / create_volume
create_volume
- computing.Client.create_volume(**kwargs)
ディスクを新規作成します。
サーバーを指定するためには、サーバー名が必要です。
削除済みのサーバーを指定した、管理外のサーバーを指定した、起動中・停止中以外のサーバーを指定したなど、無効なサーバーを指定した場合は、エラーが返されます。 同様に、ディスクサイズおよびディスクタイプに規定外の値を指定した、すでに存在するディスク名を指定した、利用料金タイプに無効な値を指定したなどの場合は、エラーが返されます。
作成したディスクのゾーンは指定したサーバーと同一のゾーンになります。
See also: NIFCLOUD API Documentation
Request Syntax
response = client.create_volume( AccountingType='1'|'2', Description='string', DiskType='2'|'3'|'4'|'5'|'6'|'7'|'8'|'9', InstanceId='string', InstanceUniqueId='string', Size=123, VolumeId='string' )
- Parameters:
AccountingType (string) –
Description (string) –
DiskType (string) –
InstanceId (string) –
InstanceUniqueId (string) –
Size (integer) – [REQUIRED]
VolumeId (string) –
- Return type:
dict
- Returns:
Response Syntax
{ 'AccountingType': 'string', 'AvailabilityZone': 'string', 'CreateTime': datetime(2015, 1, 1), 'Description': 'string', 'DiskType': 'string', 'RequestId': 'string', 'Size': 123, 'SnapshotId': 'string', 'Status': 'string', 'VolumeId': 'string', 'VolumeUniqueId': 'string' }
Response Structure
(dict) –
AccountingType (string) –
AvailabilityZone (string) –
CreateTime (datetime) –
Description (string) –
DiskType (string) –
RequestId (string) –
Size (integer) –
SnapshotId (string) –
Status (string) –
VolumeId (string) –
VolumeUniqueId (string) –