Get
Returns the specified agent.
To get the list of all available agents, make a List request.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const GetAgentRequest = cloudApi.loadtesting.api_agent_service.GetAgentRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.AgentServiceClient);
const result = await client.get(
GetAgentRequest.fromPartial({
// agentId: "agentId"
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.loadtesting.agent.v1.agent_service_pb2_grpc import AgentServiceStub
from yandex.cloud.loadtesting.api.v1.agent_service_pb2 import GetAgentRequest
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(AgentServiceStub)
response = service.Get(
GetAgentRequest(
# agent_id = "agentId"
)
)
print(response)
GetAgentRequest
agentId
: string
ID of the agent to return.
Agent
Load testing agent on which tests are executed.
id
: string
ID of the agent. Generated at creation time.
folderId
: string
ID of the folder that the agent belongs to.
name
: string
Name of the agent.
description
: string
Description of the agent.
computeInstanceId
: 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
: Status
Status of the agent.
errors
: string
List of errors reported by the agent.
currentJobId
: string
ID of the test that is currently being executed by the agent.
agentVersionId
: string
Version of the agent.
labels
: string
Agent labels as key:value
pairs.
logSettings
: agent.LogSettings
Agent log settings
LogSettings
cloudLogGroupId
: string
Id of Yandex Cloud log group to upload agent logs to