Get
Returns the specified Cloud resource.
To get the list of available Cloud resources, make a List request.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const GetCloudRequest = cloudApi.resourcemanager.cloud_service.GetCloudRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.CloudServiceClient);
const result = await client.get(
GetCloudRequest.fromPartial({
cloudId: "cloudId",
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.resourcemanager.v1.cloud_service_pb2_grpc import CloudServiceStub
from yandex.cloud.resourcemanager.v1.cloud_service_pb2 import GetCloudRequest
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(CloudServiceStub)
response = service.Get(GetCloudRequest(cloud_id="cloudId"))
print(response)
GetCloudRequest
cloudId
: string
ID of the Cloud resource to return. To get the cloud ID, use a CloudService.List request.
Cloud
A Cloud resource. For more information, see Cloud.
id
: string
ID of the cloud.
createdAt
: google.protobuf.Timestamp
Creation timestamp.
name
: string
Name of the cloud. 3-63 characters long.
description
: string
Description of the cloud. 0-256 characters long.
organizationId
: string
ID of the organization that the cloud belongs to.
labels
: string
Resource labels as key:value
pairs. Maximum of 64 per resource.