yandex-cloud / python-sdk

Yandex.Cloud Python SDK
MIT License
85 stars 27 forks source link

How to use lockbox payload service #83

Closed Themezv closed 10 months ago

Themezv commented 10 months ago

Hi! Could you explain how to use lockbox payload service.

For example how to get secret by id

opportunity356 commented 10 months ago

Hi, @Themezv ! Here is an example:

import yandexcloud
from yandex.cloud.lockbox.v1.payload_service_pb2 import GetPayloadRequest
from yandex.cloud.lockbox.v1.payload_service_pb2_grpc import PayloadServiceStub

sdk = yandexcloud.SDK(token='AQAD-.....')

payload_service = sdk.client(PayloadServiceStub)
payload_service.Get(GetPayloadRequest(secret_id="your-secret-id"))