Comments (1)
There is no such concept as public function in API model. It's just shortcut for UI and CLI which will give necessary permissions to invoke functions for all users.
You can achieve that with SDK using such code:
const {FunctionService} = require('yandex-cloud/api/serverless/functions/v1');
const {AccessBindingAction} = require('yandex-cloud/api/access');
const functionService = new FunctionService();
let op = await functionService.updateAccessBindings({
resourceId: "<YOUR FUNCTION ID>",
accessBindingDeltas: [
{
action: AccessBindingAction.ADD,
accessBinding: {
roleId: "serverless.functions.invoker",
subject: { "id": "allUsers", "type": "system" },
}
}
]
});
You will get operation which you should poll using OperationService
until it will be marked done
.
NB: always use updateAccessBinding
(and not setAccessBinding
) to not to rewrite all previously created access bindings.
NB2: you (or your service account) need to have admin
role in given folder to work with access bindings.
from nodejs-sdk.
Related Issues (20)
- TypeError: Cannot destructure property 'idempotencyLevel' of 'call.method.options' as it is undefined. HOT 1
- Use examples as acceptance tests
- Export MetadataTokenService, IamTokenService
- ClientError: /speechkit.tts.v3.Synthesizer/UtteranceSynthesis UNIMPLEMENTED HOT 5
- chore: MetadataTokenService does not extend the token by time and clean up the code from setTimeout HOT 1
- bug: Add to src/token-service/metadata-token-service.ts regular token updates
- chore: Make the project buildable under Windows
- Error: yandex.cloud.iot.broker.v1.BrokerDataService/Publish UNIMPLEMENTED HOT 4
- Не получается сгенерировать iam-token по примеру из документации HOT 3
- [Вопрос] существует ли единый способ управления бессерверными решениями? HOT 1
- Поддержка опций логирования при создании версии Cloud Functions HOT 1
- Add support for AI SpeechKit services HOT 1
- Add support for YandexGPT service HOT 1
- No folderId parameter in llm APIs HOT 2
- Operatation service responses as google.protobuf.Any instead of json HOT 2
- Can you please split the SDK? HOT 1
- nodejs sdk with v3 response does not contain conversation_analysis, speakerAnalysis sections HOT 1
- Chunks have to be sent with at least one per 5 seconds frequency. Как решать? HOT 1
- Pass debug ids with error HOT 1
- Changing endpoints for regions other than in Russia
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodejs-sdk.