Yandex Cloud
Documentation
PresentationContact UsTry it for free
© 2026 Direct Cursus Technology L.L.C.
Yandex DataSphere
  • Getting started
    • All guides
      • Authentication in DataSphere Jobs
      • Running a job in DataSphere Jobs
      • Working with jobs from Visual Studio Code
      • Using results of completed jobs
      • Working with a service agent from a job
    • Migrating a workflow to a new version
  • Terraform reference
  • Audit Trails events
  • Access management
  • Pricing policy
  • Public materials
  • Release notes
  1. Step-by-step guides
  2. DataSphere Jobs
  3. Working with a service agent from a job

Working with a service agent from a job

Written by
Yandex Cloud
Updated at August 15, 2025
View in Markdown

You can work with other services from jobs using a service agent. A service agent is a special service account under which DataSphere projects will perform actions in other Yandex Cloud services.

To work with other services from jobs:

  1. Create a service agent and enable it in the community.

  2. Run the job. The service agent token will be saved to a file and will be available from the SA_TOKEN_FILENAME environment variable.

  3. Use the SA_TOKEN_FILENAME variable to work with other services. For example, this is how you can get the contents of the Yandex Lockbox secret using the API:

    curl --header "Authorization: Bearer $(cat $SA_TOKEN_FILENAME)" \
      https://payload.lockbox.api.cloud.yandex.net/lockbox/v1/secrets/<secret_ID>/payload
    

    Result:

    {
     "entries": [
      {
       "key": "my-key",
       "textValue": "key-example"
      }
     ],
     "versionId": "e6qlcb7fqtt6********"
    }
    

Was the article helpful?

Previous
Using results of completed jobs
Next
Publishing a notebook
© 2026 Direct Cursus Technology L.L.C.