Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Blog
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
Yandex Cloud Functions
  • Comparison with other Yandex Cloud services
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Using functions to get an IAM token for a service account
    • Connecting to managed databases from functions
    • Getting information about a function
    • Managing rights to access 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
    • Creating a function
    • Invoking a function
    • Managing functions
    • Getting information about a trigger
    • Creating a trigger
    • Managing triggers
  • Concepts
  • Developing in Node.js
  • Developing in Python
  • Developing in Go
  • Developing in PHP
  • Developing in Bash
  • Developing in Java
  • Developing in R
  • Developing in C#
  • Practical guidelines
  • Pricing policy
  • Access management
  • API Functions reference
  • API Triggers reference
  • Questions and answers
  1. Step-by-step instructions
  2. Managing rights to access functions
  3. Making a function private

Making a function private

Written by
Yandex Cloud

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

    Note

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

    Management console
    CLI
    1. In the management console, select the folder containing your function.
    2. Select Cloud Functions.
    3. Select the function you want to make private.
    4. On the Overview page, under General information, turn the Public function option off.

    If you don't have the Yandex Cloud command line interface yet, install and initialize it.

    The folder specified in the CLI profile is used by default. 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?

    Language / Region
    Yandex project
    © 2023 Yandex.Cloud LLC