GetDryRunResult
Returns the dry run result of the specified lifecycle policy.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const GetDryRunLifecyclePolicyResultRequest =
cloudApi.containerregistry.lifecycle_policy_service
.GetDryRunLifecyclePolicyResultRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.LifecyclePolicyServiceClient);
const result = await client.getDryRunResult(
GetDryRunLifecyclePolicyResultRequest.fromPartial({
dryRunLifecyclePolicyResultId: "dryRunLifecyclePolicyResultId",
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.containerregistry.v1.lifecycle_policy_service_pb2 import (
GetDryRunLifecyclePolicyResultRequest,
)
from yandex.cloud.containerregistry.v1.lifecycle_policy_service_pb2_grpc import (
LifecyclePolicyServiceStub,
)
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(LifecyclePolicyServiceStub)
response = service.GetDryRunResult(
GetDryRunLifecyclePolicyResultRequest(
dry_run_lifecycle_policy_result_id="dryRunLifecyclePolicyResultId"
)
)
print(response)
GetDryRunLifecyclePolicyResultRequest
dryRunLifecyclePolicyResultId
: string
ID of the dry run result of the lifecycle policy.
DryRunLifecyclePolicyResult
dryRunLifecyclePolicyResultId
: string
ID of the dry run result of the lifecycle policy.
lifecyclePolicyId
: string
ID of the lifecycle policy.
runAt
: google.protobuf.Timestamp
Time of the getting result.
affectedImagesCount
: int64
Count of affected images.