Create Block Device
Following disk custom properties can be passed while creating a block device:
1. dataStore: Defines name of the datastore in which the disk has to be provisioned.
2. storagePolicy: Defines name of the storage policy in which the disk has to be provisioned. If name of the datastore is specified in the custom properties then, datastore takes precedence.
3. provisioningType: Defines the type of provisioning. For eg. thick/thin.
4. resourceGroupName: Defines the Azure resource group name where the disk needs to be provisioned.
The version of the API in yyyy-MM-dd format (UTC). For versioning information refer to /iaas/api/about
Disk Specification instance
Show optional properties
{
"name": "string",
"projectId": "e058",
"capacityInGB": 78
}
{
"name": "string",
"projectId": "e058",
"deploymentId": "123e4567-e89b-12d3-a456-426655440000",
"customProperties": {
"customProperties": "string"
},
"description": "string",
"capacityInGB": 78,
"encrypted": true,
"persistent": true,
"sourceReference": "ami-0d4cfd66",
"diskContentBase64": "dGVzdA",
"constraints": [
{
"mandatory": false,
"expression": "ha:strong"
}
],
"tags": [
{
"key": "location",
"value": "SOF"
}
]
}
A human-friendly name used as an identifier in APIs that support this option.
The id of the project the current user belongs to.
The id of the deployment that is associated with this resource
Additional custom properties that may be used to extend this resource.
A human-friendly description.
Capacity of the block device in GB.
Indicates whether the block device should be encrypted or not.
Indicates whether the block device survives a delete action.
Reference to URI using which the block device has to be created.
Content of a disk, base64 encoded.
Constraints that are used to drive placement policies for the block device that is produced from this specification. Constraint expressions are matched against tags on existing placement targets.
A set of tag keys and optional values that should be set on any resource that is produced from this specification.
Accepted
"RequestTracker Object"
Progress of the request as percentage.
Status message of the request.
Status of the request.
Collection of resources.
Name of the operation.
ID of this request.
Self link of this request.
ID of the deployment, this request is connected to.
Forbidden
"ServiceErrorResponse Object"
message
messageId
stackTrace
statusCode
errorCode
details
serverErrorId
documentKind
internalErrorCode
Invalid Request - bad data
"ServiceErrorResponse Object"
message
messageId
stackTrace
statusCode
errorCode
details
serverErrorId
documentKind
internalErrorCode
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"capacityInGB:"integer","name:"string","projectId:"string"}' https://{api_host}/iaas/api/block-devices