Yandex

v0.10.0 published on Thursday, Nov 18, 2021 by Pulumi

FunctionIamBinding

yandex_function_iam_binding

import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";

const function_iam = new yandex.FunctionIamBinding("function-iam", {
    functionId: "your-function-id",
    members: ["system:allUsers"],
    role: "serverless.functions.invoker",
});
import pulumi
import pulumi_yandex as yandex

function_iam = yandex.FunctionIamBinding("function-iam",
    function_id="your-function-id",
    members=["system:allUsers"],
    role="serverless.functions.invoker")
using Pulumi;
using Yandex = Pulumi.Yandex;

class MyStack : Stack
{
    public MyStack()
    {
        var function_iam = new Yandex.FunctionIamBinding("function-iam", new Yandex.FunctionIamBindingArgs
        {
            FunctionId = "your-function-id",
            Members = 
            {
                "system:allUsers",
            },
            Role = "serverless.functions.invoker",
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := yandex.NewFunctionIamBinding(ctx, "function_iam", &yandex.FunctionIamBindingArgs{
			FunctionId: pulumi.String("your-function-id"),
			Members: pulumi.StringArray{
				pulumi.String("system:allUsers"),
			},
			Role: pulumi.String("serverless.functions.invoker"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Create a FunctionIamBinding Resource

new FunctionIamBinding(name: string, args: FunctionIamBindingArgs, opts?: CustomResourceOptions);
@overload
def FunctionIamBinding(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       function_id: Optional[str] = None,
                       members: Optional[Sequence[str]] = None,
                       role: Optional[str] = None,
                       sleep_after: Optional[int] = None)
@overload
def FunctionIamBinding(resource_name: str,
                       args: FunctionIamBindingArgs,
                       opts: Optional[ResourceOptions] = None)
func NewFunctionIamBinding(ctx *Context, name string, args FunctionIamBindingArgs, opts ...ResourceOption) (*FunctionIamBinding, error)
public FunctionIamBinding(string name, FunctionIamBindingArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args FunctionIamBindingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args FunctionIamBindingArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args FunctionIamBindingArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args FunctionIamBindingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

FunctionIamBinding Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The FunctionIamBinding resource accepts the following input properties:

FunctionId string
The Yandex Cloud Function ID to apply a binding to.
Members List<string>

Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • userAccount:{user_id}: A unique user ID that represents a specific Yandex account.
  • system:{allUsers|allAuthenticatedUsers}: see system groups
Role string
The role that should be applied. See roles
SleepAfter int
FunctionId string
The Yandex Cloud Function ID to apply a binding to.
Members []string

Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • userAccount:{user_id}: A unique user ID that represents a specific Yandex account.
  • system:{allUsers|allAuthenticatedUsers}: see system groups
Role string
The role that should be applied. See roles
SleepAfter int
functionId string
The Yandex Cloud Function ID to apply a binding to.
members string[]

Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • userAccount:{user_id}: A unique user ID that represents a specific Yandex account.
  • system:{allUsers|allAuthenticatedUsers}: see system groups
role string
The role that should be applied. See roles
sleepAfter number
function_id str
The Yandex Cloud Function ID to apply a binding to.
members Sequence[str]

Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • userAccount:{user_id}: A unique user ID that represents a specific Yandex account.
  • system:{allUsers|allAuthenticatedUsers}: see system groups
role str
The role that should be applied. See roles
sleep_after int

Outputs

All input properties are implicitly available as output properties. Additionally, the FunctionIamBinding resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing FunctionIamBinding Resource

Get an existing FunctionIamBinding resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: FunctionIamBindingState, opts?: CustomResourceOptions): FunctionIamBinding
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        function_id: Optional[str] = None,
        members: Optional[Sequence[str]] = None,
        role: Optional[str] = None,
        sleep_after: Optional[int] = None) -> FunctionIamBinding
func GetFunctionIamBinding(ctx *Context, name string, id IDInput, state *FunctionIamBindingState, opts ...ResourceOption) (*FunctionIamBinding, error)
public static FunctionIamBinding Get(string name, Input<string> id, FunctionIamBindingState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

FunctionId string
The Yandex Cloud Function ID to apply a binding to.
Members List<string>

Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • userAccount:{user_id}: A unique user ID that represents a specific Yandex account.
  • system:{allUsers|allAuthenticatedUsers}: see system groups
Role string
The role that should be applied. See roles
SleepAfter int
FunctionId string
The Yandex Cloud Function ID to apply a binding to.
Members []string

Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • userAccount:{user_id}: A unique user ID that represents a specific Yandex account.
  • system:{allUsers|allAuthenticatedUsers}: see system groups
Role string
The role that should be applied. See roles
SleepAfter int
functionId string
The Yandex Cloud Function ID to apply a binding to.
members string[]

Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • userAccount:{user_id}: A unique user ID that represents a specific Yandex account.
  • system:{allUsers|allAuthenticatedUsers}: see system groups
role string
The role that should be applied. See roles
sleepAfter number
function_id str
The Yandex Cloud Function ID to apply a binding to.
members Sequence[str]

Identities that will be granted the privilege in role. Each entry can have one of the following values:

  • userAccount:{user_id}: A unique user ID that represents a specific Yandex account.
  • system:{allUsers|allAuthenticatedUsers}: see system groups
role str
The role that should be applied. See roles
sleep_after int

Package Details

Repository
https://github.com/pulumi/pulumi-yandex
License
Apache-2.0
Notes
This Pulumi package is based on the yandex Terraform Provider.