Get
- TypeScript
- Python
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);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.cdn.v1.raw_logs_service_pb2 import GetRawLogsRequest
from yandex.cloud.cdn.v1.raw_logs_service_pb2_grpc import RawLogsServiceStub
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(RawLogsServiceStub)
response = service.Get(GetRawLogsRequest(resource_id="resourceId"))
print(response)
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.