Skip to main content

ResolveAgent

Resolve agent service account for the service in the specified resource container.

import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";

const ResolveServiceAgentRequest =
cloudApi.iam.service_control_service.ResolveServiceAgentRequest;

(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.ServiceControlServiceClient);

const result = await client.resolveAgent(
ResolveServiceAgentRequest.fromPartial({
serviceId: "serviceId",
// microserviceId: "microserviceId",
resource: {
id: "id",
type: "type",
},
})
);
console.log(result);
})();

ResolveServiceAgentRequest

serviceId : string

ID of the Service.

microserviceId : string

ID of the Microservice.

resource : Resource

Resource container.

Resource

A Resource. For more information, see Resource.

id : string

ID of the resource.

type : string

The type of the resource, e.g. resource-manager.folder, billing.account, compute.snapshot, etc.

ServiceAgent

serviceAccountId : string

ID of the agent service account.

serviceId : string

ID of the service.

microserviceId : string

ID of the microservice.