Load Testing API, REST: Agent.create
Creates an agent in the specified folder.
Also creates a corresponding compute instance.
HTTP request
POST https://loadtesting.api.cloud.yandex.net/loadtesting/api/v1/agent
Body parameters
{
"folderId": "string",
"name": "string",
"description": "string",
"computeInstanceParams": {
"labels": "object",
"zoneId": "string",
"resourcesSpec": {
"memory": "string",
"cores": "string",
"coreFraction": "string",
"gpus": "string"
},
"metadata": "object",
"bootDiskSpec": {
"mode": "string",
"deviceName": "string",
"autoDelete": true,
// `computeInstanceParams.bootDiskSpec` includes only one of the fields `diskSpec`, `diskId`
"diskSpec": {
"name": "string",
"description": "string",
"typeId": "string",
"size": "string",
"blockSize": "string",
"diskPlacementPolicy": {
"placementGroupId": "string",
"placementGroupPartition": "string"
},
// `computeInstanceParams.bootDiskSpec.diskSpec` includes only one of the fields `imageId`, `snapshotId`
"imageId": "string",
"snapshotId": "string",
// end of the list of possible fields`computeInstanceParams.bootDiskSpec.diskSpec`
},
"diskId": "string",
// end of the list of possible fields`computeInstanceParams.bootDiskSpec`
},
"networkInterfaceSpecs": [
{
"subnetId": "string",
"primaryV4AddressSpec": {
"address": "string",
"oneToOneNatSpec": {
"ipVersion": "string",
"address": "string",
"dnsRecordSpecs": [
{
"fqdn": "string",
"dnsZoneId": "string",
"ttl": "string",
"ptr": true
}
]
},
"dnsRecordSpecs": [
{
"fqdn": "string",
"dnsZoneId": "string",
"ttl": "string",
"ptr": true
}
]
},
"primaryV6AddressSpec": {
"address": "string",
"oneToOneNatSpec": {
"ipVersion": "string",
"address": "string",
"dnsRecordSpecs": [
{
"fqdn": "string",
"dnsZoneId": "string",
"ttl": "string",
"ptr": true
}
]
},
"dnsRecordSpecs": [
{
"fqdn": "string",
"dnsZoneId": "string",
"ttl": "string",
"ptr": true
}
]
},
"securityGroupIds": [
"string"
],
"index": "string"
}
],
"serviceAccountId": "string",
"platformId": "string"
},
"agentVersion": "string",
"labels": "object",
"logSettings": {
"cloudLogGroupId": "string"
}
}
Field | Description |
---|---|
folderId | string Required. ID of the folder to create an agent in. The maximum string length in characters is 50. |
name | string Name of the agent. A created compute instance will have the same name. Value must match the regular expression |
description | string Description of the agent. A created compute instance will have the same description. The maximum string length in characters is 256. |
computeInstanceParams | object Parameters for compute instance to be created. |
computeInstanceParams. labels |
object Resource labels as No more than 64 per resource. The string length in characters for each key must be 1-63. Each key must match the regular expression |
computeInstanceParams. zoneId |
string Required. ID of the availability zone where the instance resides. To get a list of available zones, use the list request The maximum string length in characters is 50. |
computeInstanceParams. resourcesSpec |
object Required. Computing resources of the instance, such as the amount of memory and number of cores. To get a list of available values, see Levels of core performance. |
computeInstanceParams. resourcesSpec. memory |
string (int64) Required. The amount of memory available to the instance, specified in bytes. The maximum value is 274877906944. |
computeInstanceParams. resourcesSpec. cores |
string (int64) Required. The number of cores available to the instance. Value must be one of 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76 or 80. |
computeInstanceParams. resourcesSpec. coreFraction |
string (int64) Baseline level of CPU performance with the ability to burst performance above that baseline level. This field sets baseline performance for each core. For example, if you need only 5% of the CPU performance, you can set core_fraction=5. For more information, see Levels of core performance. Value must be one of 0, 5, 20, 50 or 100. |
computeInstanceParams. resourcesSpec. gpus |
string (int64) The number of GPUs available to the instance. Value must be one of 0, 1, 2 or 4. |
computeInstanceParams. metadata |
object The metadata Values are free-form strings, and only have meaning as interpreted by the programs which configure the instance. The values must be 256 KB or less. For example, you may use the metadata in order to provide your public SSH key to the instance. For more information, see Metadata. |
computeInstanceParams. bootDiskSpec |
object Required. Boot disk to attach to the instance. |
computeInstanceParams. bootDiskSpec. mode |
string The mode in which to attach this disk.
|
computeInstanceParams. bootDiskSpec. deviceName |
string Specifies a unique serial number of your choice that is reflected into the /dev/disk/by-id/ tree of a Linux operating system running within the instance. This value can be used to reference the device for mounting, resizing, and so on, from within the instance. If not specified, a random value will be generated. Value must match the regular expression |
computeInstanceParams. bootDiskSpec. autoDelete |
boolean (boolean) Specifies whether the disk will be auto-deleted when the instance is deleted. |
computeInstanceParams. bootDiskSpec. diskSpec |
object Disk specification. computeInstanceParams.bootDiskSpec includes only one of the fields diskSpec , diskId |
computeInstanceParams. bootDiskSpec. diskSpec. name |
string Name of the disk. Value must match the regular expression |
computeInstanceParams. bootDiskSpec. diskSpec. description |
string Description of the disk. The maximum string length in characters is 256. |
computeInstanceParams. bootDiskSpec. diskSpec. typeId |
string ID of the disk type. To get a list of available disk types, use the list request. The maximum string length in characters is 50. |
computeInstanceParams. bootDiskSpec. diskSpec. size |
string (int64) Required. Size of the disk, specified in bytes. Acceptable values are 4194304 to 4398046511104, inclusive. |
computeInstanceParams. bootDiskSpec. diskSpec. blockSize |
string (int64) Block size of the disk, specified in bytes. The default is 4096. |
computeInstanceParams. bootDiskSpec. diskSpec. diskPlacementPolicy |
object Placement policy configuration. |
computeInstanceParams. bootDiskSpec. diskSpec. diskPlacementPolicy. placementGroupId |
string Placement group ID. |
computeInstanceParams. bootDiskSpec. diskSpec. diskPlacementPolicy. placementGroupPartition |
string (int64) |
computeInstanceParams. bootDiskSpec. diskSpec. imageId |
string computeInstanceParams.bootDiskSpec.diskSpec includes only one of the fields imageId , snapshotId ID of the image to create the disk from. The maximum string length in characters is 50. |
computeInstanceParams. bootDiskSpec. diskSpec. snapshotId |
string computeInstanceParams.bootDiskSpec.diskSpec includes only one of the fields imageId , snapshotId ID of the snapshot to restore the disk from. The maximum string length in characters is 50. |
computeInstanceParams. bootDiskSpec. diskId |
string computeInstanceParams.bootDiskSpec includes only one of the fields diskSpec , diskId ID of the disk that should be attached. The maximum string length in characters is 50. |
computeInstanceParams. networkInterfaceSpecs[] |
object Required. Network configuration for the instance. Specifies how the network interface is configured to interact with other services on the internal network and on the internet. Currently only one network interface is supported per instance. Must contain exactly 1 element. |
computeInstanceParams. networkInterfaceSpecs[]. subnetId |
string Required. ID of the subnet. The maximum string length in characters is 50. |
computeInstanceParams. networkInterfaceSpecs[]. primaryV4AddressSpec |
object Primary IPv4 address that will be assigned to the instance for this network interface. |
computeInstanceParams. networkInterfaceSpecs[]. primaryV4AddressSpec. address |
string An IPv4 internal network address that is assigned to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system. |
computeInstanceParams. networkInterfaceSpecs[]. primaryV4AddressSpec. oneToOneNatSpec |
object An external IP address configuration. If not specified, then this instance will have no external internet access. |
computeInstanceParams. networkInterfaceSpecs[]. primaryV4AddressSpec. oneToOneNatSpec. ipVersion |
string External IP address version.
|
computeInstanceParams. networkInterfaceSpecs[]. primaryV4AddressSpec. oneToOneNatSpec. address |
string |
computeInstanceParams. networkInterfaceSpecs[]. primaryV4AddressSpec. oneToOneNatSpec. dnsRecordSpecs[] |
object External DNS configuration |
computeInstanceParams. networkInterfaceSpecs[]. primaryV4AddressSpec. oneToOneNatSpec. dnsRecordSpecs[]. fqdn |
string Required. FQDN (required) |
computeInstanceParams. networkInterfaceSpecs[]. primaryV4AddressSpec. oneToOneNatSpec. dnsRecordSpecs[]. dnsZoneId |
string DNS zone id (optional, if not set, private zone used) |
computeInstanceParams. networkInterfaceSpecs[]. primaryV4AddressSpec. oneToOneNatSpec. dnsRecordSpecs[]. ttl |
string (int64) DNS record ttl, values in 0-86400 (optional) Acceptable values are 0 to 86400, inclusive. |
computeInstanceParams. networkInterfaceSpecs[]. primaryV4AddressSpec. oneToOneNatSpec. dnsRecordSpecs[]. ptr |
boolean (boolean) When set to true, also create PTR DNS record (optional) |
computeInstanceParams. networkInterfaceSpecs[]. primaryV4AddressSpec. dnsRecordSpecs[] |
object Internal DNS configuration |
computeInstanceParams. networkInterfaceSpecs[]. primaryV4AddressSpec. dnsRecordSpecs[]. fqdn |
string Required. FQDN (required) |
computeInstanceParams. networkInterfaceSpecs[]. primaryV4AddressSpec. dnsRecordSpecs[]. dnsZoneId |
string DNS zone id (optional, if not set, private zone used) |
computeInstanceParams. networkInterfaceSpecs[]. primaryV4AddressSpec. dnsRecordSpecs[]. ttl |
string (int64) DNS record ttl, values in 0-86400 (optional) Acceptable values are 0 to 86400, inclusive. |
computeInstanceParams. networkInterfaceSpecs[]. primaryV4AddressSpec. dnsRecordSpecs[]. ptr |
boolean (boolean) When set to true, also create PTR DNS record (optional) |
computeInstanceParams. networkInterfaceSpecs[]. primaryV6AddressSpec |
object Primary IPv6 address that will be assigned to the instance for this network interface. IPv6 not available yet. |
computeInstanceParams. networkInterfaceSpecs[]. primaryV6AddressSpec. address |
string An IPv4 internal network address that is assigned to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system. |
computeInstanceParams. networkInterfaceSpecs[]. primaryV6AddressSpec. oneToOneNatSpec |
object An external IP address configuration. If not specified, then this instance will have no external internet access. |
computeInstanceParams. networkInterfaceSpecs[]. primaryV6AddressSpec. oneToOneNatSpec. ipVersion |
string External IP address version.
|
computeInstanceParams. networkInterfaceSpecs[]. primaryV6AddressSpec. oneToOneNatSpec. address |
string |
computeInstanceParams. networkInterfaceSpecs[]. primaryV6AddressSpec. oneToOneNatSpec. dnsRecordSpecs[] |
object External DNS configuration |
computeInstanceParams. networkInterfaceSpecs[]. primaryV6AddressSpec. oneToOneNatSpec. dnsRecordSpecs[]. fqdn |
string Required. FQDN (required) |
computeInstanceParams. networkInterfaceSpecs[]. primaryV6AddressSpec. oneToOneNatSpec. dnsRecordSpecs[]. dnsZoneId |
string DNS zone id (optional, if not set, private zone used) |
computeInstanceParams. networkInterfaceSpecs[]. primaryV6AddressSpec. oneToOneNatSpec. dnsRecordSpecs[]. ttl |
string (int64) DNS record ttl, values in 0-86400 (optional) Acceptable values are 0 to 86400, inclusive. |
computeInstanceParams. networkInterfaceSpecs[]. primaryV6AddressSpec. oneToOneNatSpec. dnsRecordSpecs[]. ptr |
boolean (boolean) When set to true, also create PTR DNS record (optional) |
computeInstanceParams. networkInterfaceSpecs[]. primaryV6AddressSpec. dnsRecordSpecs[] |
object Internal DNS configuration |
computeInstanceParams. networkInterfaceSpecs[]. primaryV6AddressSpec. dnsRecordSpecs[]. fqdn |
string Required. FQDN (required) |
computeInstanceParams. networkInterfaceSpecs[]. primaryV6AddressSpec. dnsRecordSpecs[]. dnsZoneId |
string DNS zone id (optional, if not set, private zone used) |
computeInstanceParams. networkInterfaceSpecs[]. primaryV6AddressSpec. dnsRecordSpecs[]. ttl |
string (int64) DNS record ttl, values in 0-86400 (optional) Acceptable values are 0 to 86400, inclusive. |
computeInstanceParams. networkInterfaceSpecs[]. primaryV6AddressSpec. dnsRecordSpecs[]. ptr |
boolean (boolean) When set to true, also create PTR DNS record (optional) |
computeInstanceParams. networkInterfaceSpecs[]. securityGroupIds[] |
string ID's of security groups attached to the interface |
computeInstanceParams. networkInterfaceSpecs[]. index |
string The index of the network interface, will be generated by the server, 0,1,2... etc if not specified. |
computeInstanceParams. serviceAccountId |
string ID of the service account to use for authentication inside the instance. To get the service account ID, use a list request. |
computeInstanceParams. platformId |
string ID of the Compute VM platform on which the agent will be created. Default value: "standard-v2" |
agentVersion | string Version of the agent. If not provided, the most recent agent version will be used. |
labels | object Agent labels as No more than 64 per resource. The string length in characters for each key must be 1-63. Each key must match the regular expression |
logSettings | object Agent log settings |
logSettings. cloudLogGroupId |
string Id of Yandex Cloud log group to upload agent logs to The maximum string length in characters is 50. |
Response
HTTP Code: 200 - OK
{
"id": "string",
"description": "string",
"createdAt": "string",
"createdBy": "string",
"modifiedAt": "string",
"done": true,
"metadata": "object",
// includes only one of the fields `error`, `response`
"error": {
"code": "integer",
"message": "string",
"details": [
"object"
]
},
"response": "object",
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
createdAt | string (date-time) Creation timestamp. String in RFC3339 text format. The range of possible values is from To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits). |
createdBy | string ID of the user or service account who initiated the operation. |
modifiedAt | string (date-time) The time when the Operation resource was last modified. String in RFC3339 text format. The range of possible values is from To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits). |
done | boolean (boolean) If the value is |
metadata | object Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
error | object The error result of the operation in case of failure or cancellation. includes only one of the fields error , response |
error. code |
integer (int32) Error code. An enum value of google.rpc.Code. |
error. message |
string An error message. |
error. details[] |
object A list of messages that carry the error details. |
response | object includes only one of the fields error , response The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is the standard Create/Update, the response should be the target resource of the operation. Any method that returns a long-running operation should document the response type, if any. |