Load Testing API, gRPC: AgentService
A set of methods for managing Load Testing agents.
Call | Description |
---|---|
Create | Creates an agent in the specified folder. |
Get | Returns the specified agent. |
List | Retrieves the list of agents in the specified folder. |
Delete | Deletes the specified agent. |
Update | Updates the specified agent. |
Calls AgentService
Create
Creates an agent in the specified folder.
Also creates a corresponding compute instance.
rpc Create (CreateAgentRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:CreateAgentMetadata
Operation.response:agent.Agent
CreateAgentRequest
Field | Description |
---|---|
folder_id | 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 |[a-z][-a-z0-9]{1,61}[a-z0-9] . |
description | string Description of the agent. A created compute instance will have the same description. The maximum string length in characters is 256. |
compute_instance_params | agent.CreateComputeInstance Parameters for compute instance to be created. |
agent_version | string Version of the agent. If not provided, the most recent agent version will be used. |
labels | map<string,string> Agent labels as key:value pairs. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_0-9a-z]* . |
log_settings | agent.LogSettings Agent log settings |
CreateComputeInstance
Field | Description |
---|---|
labels | map<string,string> Resource labels as key:value pairs. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_./\\@0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_./\\@0-9a-z]* . |
zone_id | string Required. ID of the availability zone where the instance resides. To get a list of available zones, use the yandex.cloud.compute.v1.ZoneService.List request The maximum string length in characters is 50. |
resources_spec | compute.v1.ResourcesSpec 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. |
metadata | map<string,string> The metadata key:value pairs that will be assigned to this instance. This includes custom metadata and predefined keys. The total size of all keys and values must be less than 512 KB. 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. |
boot_disk_spec | compute.v1.AttachedDiskSpec Required. Boot disk to attach to the instance. |
network_interface_specs[] | compute.v1.NetworkInterfaceSpec 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. The number of elemets must be exactly 1. |
service_account_id | string ID of the service account to use for authentication inside the instance. To get the service account ID, use a yandex.cloud.iam.v1.ServiceAccountService.List request. |
platform_id | string ID of the Compute VM platform on which the agent will be created. Default value: "standard-v2" |
LogSettings
Field | Description |
---|---|
cloud_log_group_id | string Id of Yandex Cloud log group to upload agent logs to The maximum string length in characters is 50. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any 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. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
CreateAgentMetadata
Field | Description |
---|---|
agent_id | string ID of the agent that is being created. |
Agent
Field | Description |
---|---|
id | string ID of the agent. Generated at creation time. |
folder_id | string ID of the folder that the agent belongs to. |
name | string Name of the agent. |
description | string Description of the agent. |
compute_instance_id | string ID of the compute instance managed by the agent. Empty if there is no such instance (i.e. the case of external agent). |
status | enum Status Status of the agent.
|
errors[] | string List of errors reported by the agent. |
current_job_id | string ID of the test that is currently being executed by the agent. |
agent_version_id | string Version of the agent. |
labels | map<string,string> Agent labels as key:value pairs. |
log_settings | agent.LogSettings Agent log settings |
Get
Returns the specified agent.
To get the list of all available agents, make a List request.
rpc Get (GetAgentRequest) returns (agent.Agent)
GetAgentRequest
Field | Description |
---|---|
agent_id | string ID of the agent to return. |
Agent
Field | Description |
---|---|
id | string ID of the agent. Generated at creation time. |
folder_id | string ID of the folder that the agent belongs to. |
name | string Name of the agent. |
description | string Description of the agent. |
compute_instance_id | string ID of the compute instance managed by the agent. Empty if there is no such instance (i.e. the case of external agent). |
status | enum Status Status of the agent.
|
errors[] | string List of errors reported by the agent. |
current_job_id | string ID of the test that is currently being executed by the agent. |
agent_version_id | string Version of the agent. |
labels | map<string,string> Agent labels as key:value pairs. |
log_settings | agent.LogSettings Agent log settings |
LogSettings
Field | Description |
---|---|
cloud_log_group_id | string Id of Yandex Cloud log group to upload agent logs to The maximum string length in characters is 50. |
List
Retrieves the list of agents in the specified folder.
rpc List (ListAgentsRequest) returns (ListAgentsResponse)
ListAgentsRequest
Field | Description |
---|---|
folder_id | string Required. ID of the folder to list agents in. The maximum string length in characters is 50. |
page_size | int64 The maximum number of results per page to return. If the number of available results is larger than page_size , the service returns a ListAgentsResponse.next_page_token that can be used to get the next page of results in subsequent list requests. Default value: 100. The maximum value is 1000. |
page_token | string Page token. To get the next page of results, set page_token to the ListAgentsResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100. |
filter | string A filter expression that filters agents listed in the response. The filter expression may contain multiple field expressions joined by AND . The field expression must specify:
Currently supported fields:
Examples:
|
ListAgentsResponse
Field | Description |
---|---|
agents[] | agent.Agent List of agents in the specified folder. |
next_page_token | string Token for getting the next page of the list. If the number of results is greater than the specified ListAgentsRequest.page_size, use next_page_token as the value for the ListAgentsRequest.page_token parameter in the next list request. Each subsequent page will have its own next_page_token to continue paging through the results. The maximum string length in characters is 100. |
Agent
Field | Description |
---|---|
id | string ID of the agent. Generated at creation time. |
folder_id | string ID of the folder that the agent belongs to. |
name | string Name of the agent. |
description | string Description of the agent. |
compute_instance_id | string ID of the compute instance managed by the agent. Empty if there is no such instance (i.e. the case of external agent). |
status | enum Status Status of the agent.
|
errors[] | string List of errors reported by the agent. |
current_job_id | string ID of the test that is currently being executed by the agent. |
agent_version_id | string Version of the agent. |
labels | map<string,string> Agent labels as key:value pairs. |
log_settings | agent.LogSettings Agent log settings |
LogSettings
Field | Description |
---|---|
cloud_log_group_id | string Id of Yandex Cloud log group to upload agent logs to The maximum string length in characters is 50. |
Delete
Deletes the specified agent.
Also deletes a corresponding compute instance.
rpc Delete (DeleteAgentRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:DeleteAgentMetadata
Operation.response:google.protobuf.Empty
DeleteAgentRequest
Field | Description |
---|---|
agent_id | string ID of the agent to delete. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any 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. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
DeleteAgentMetadata
Field | Description |
---|---|
agent_id | string ID of the agent that is being deleted. |
Update
Updates the specified agent.
rpc Update (UpdateAgentRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:UpdateAgentMetadata
Operation.response:agent.Agent
UpdateAgentRequest
Field | Description |
---|---|
agent_id | string Required. ID of the agent to update. |
update_mask | google.protobuf.FieldMask Required. Field mask that specifies which attributes of the agent are going to be updated. |
name | string New name of the agent. Value must match the regular expression |[a-z][-a-z0-9]{1,61}[a-z0-9] . |
description | string New description of the agent. The maximum string length in characters is 256. |
compute_instance_params | agent.CreateComputeInstance New parameters of compute instance managed by the agent. |
labels | map<string,string> New labels of the agent. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_0-9a-z]* . |
CreateComputeInstance
Field | Description |
---|---|
labels | map<string,string> Resource labels as key:value pairs. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_./\\@0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_./\\@0-9a-z]* . |
zone_id | string Required. ID of the availability zone where the instance resides. To get a list of available zones, use the yandex.cloud.compute.v1.ZoneService.List request The maximum string length in characters is 50. |
resources_spec | compute.v1.ResourcesSpec 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. |
metadata | map<string,string> The metadata key:value pairs that will be assigned to this instance. This includes custom metadata and predefined keys. The total size of all keys and values must be less than 512 KB. 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. |
boot_disk_spec | compute.v1.AttachedDiskSpec Required. Boot disk to attach to the instance. |
network_interface_specs[] | compute.v1.NetworkInterfaceSpec 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. The number of elemets must be exactly 1. |
service_account_id | string ID of the service account to use for authentication inside the instance. To get the service account ID, use a yandex.cloud.iam.v1.ServiceAccountService.List request. |
platform_id | string ID of the Compute VM platform on which the agent will be created. Default value: "standard-v2" |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any 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. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
UpdateAgentMetadata
Field | Description |
---|---|
agent_id | string ID of the agent that is being updated. |
Agent
Field | Description |
---|---|
id | string ID of the agent. Generated at creation time. |
folder_id | string ID of the folder that the agent belongs to. |
name | string Name of the agent. |
description | string Description of the agent. |
compute_instance_id | string ID of the compute instance managed by the agent. Empty if there is no such instance (i.e. the case of external agent). |
status | enum Status Status of the agent.
|
errors[] | string List of errors reported by the agent. |
current_job_id | string ID of the test that is currently being executed by the agent. |
agent_version_id | string Version of the agent. |
labels | map<string,string> Agent labels as key:value pairs. |
log_settings | agent.LogSettings Agent log settings |
LogSettings
Field | Description |
---|---|
cloud_log_group_id | string Id of Yandex Cloud log group to upload agent logs to The maximum string length in characters is 50. |