Skip to main content

Get

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

const GetRawLogsRequest = cloudApi.cdn.raw_logs_service.GetRawLogsRequest;

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

const result = await client.get(
GetRawLogsRequest.fromPartial({
resourceId: "resourceId",
})
);
console.log(result);
})();

GetRawLogsRequest

resourceId : string

ID of CDN resource to request status and settings.

GetRawLogsResponse

status : RawLogsStatus

Raw logs status.

settings : RawLogsSettings

Raw logs settings.

RawLogsSettings

User settings for Raw logs.

bucketName : string

Destination S3 bucket name, note that the suer should be owner of the bucket.

bucketRegion : string

Bucket region, unused for now, could be blank.

filePrefix : string

file_prefix: prefix each log object name with specified prefix.

The prefix makes it simpler for you to locate the log objects. For example, if you specify the prefix value logs/, each log object that S3 creates begins with the logs/ prefix in its key, so pseudo S3 folders could be setup.