Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Cloud Functions
  • Comparison with other Yandex Cloud services
    • All guides
    • Using functions to get an IAM token for a service account
    • Connecting to managed databases from functions
      • Making a function public
      • Making a function private
      • Viewing roles assigned to a function
      • Assigning roles to a function
      • Revoking roles assigned to a function
    • Viewing operations with service resources
  • Tools
  • Pricing policy
  • Access management
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  • FAQ
  1. Step-by-step guides
  2. Managing function access permissions
  3. Making a function private

Making a function private

Written by
Yandex Cloud
Updated at May 5, 2025

For a function to be invoked only by users with rights to invoke it, make the function private.

Note

If all unauthorized users (the All users public group) of a cloud or folder are granted permissions to invoke a function, the function will be public regardless of its settings. How to revoke a role.

Management console
CLI
  1. In the management console, select the folder containing the function.
  2. Select Cloud Functions.
  3. Select the function you want to make private.
  4. On the Overview page, disable Public function.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

To make a function private, run the command:

yc serverless function deny-unauthenticated-invoke <function_name>

Result:

done (1s)   

Was the article helpful?

Previous
Making a function public
Next
Viewing roles assigned to a function
© 2025 Direct Cursus Technology L.L.C.