1. Packages
  2. Yandex
  3. API Docs
  4. FunctionIamBinding
Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi

yandex.FunctionIamBinding

Explore with Pulumi AI

yandex logo
Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi

    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 FunctionIamBinding Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new FunctionIamBinding(name: string, args: FunctionIamBindingArgs, opts?: CustomResourceOptions);
    @overload
    def FunctionIamBinding(resource_name: str,
                           args: FunctionIamBindingArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @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)
    func NewFunctionIamBinding(ctx *Context, name string, args FunctionIamBindingArgs, opts ...ResourceOption) (*FunctionIamBinding, error)
    public FunctionIamBinding(string name, FunctionIamBindingArgs args, CustomResourceOptions? opts = null)
    public FunctionIamBinding(String name, FunctionIamBindingArgs args)
    public FunctionIamBinding(String name, FunctionIamBindingArgs args, CustomResourceOptions options)
    
    type: yandex:FunctionIamBinding
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    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.
    name String
    The unique name of the resource.
    args FunctionIamBindingArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var functionIamBindingResource = new Yandex.FunctionIamBinding("functionIamBindingResource", new()
    {
        FunctionId = "string",
        Members = new[]
        {
            "string",
        },
        Role = "string",
        SleepAfter = 0,
    });
    
    example, err := yandex.NewFunctionIamBinding(ctx, "functionIamBindingResource", &yandex.FunctionIamBindingArgs{
    	FunctionId: pulumi.String("string"),
    	Members: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Role:       pulumi.String("string"),
    	SleepAfter: pulumi.Int(0),
    })
    
    var functionIamBindingResource = new FunctionIamBinding("functionIamBindingResource", FunctionIamBindingArgs.builder()
        .functionId("string")
        .members("string")
        .role("string")
        .sleepAfter(0)
        .build());
    
    function_iam_binding_resource = yandex.FunctionIamBinding("functionIamBindingResource",
        function_id="string",
        members=["string"],
        role="string",
        sleep_after=0)
    
    const functionIamBindingResource = new yandex.FunctionIamBinding("functionIamBindingResource", {
        functionId: "string",
        members: ["string"],
        role: "string",
        sleepAfter: 0,
    });
    
    type: yandex:FunctionIamBinding
    properties:
        functionId: string
        members:
            - string
        role: string
        sleepAfter: 0
    

    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.
    • serviceAccount:{service_account_id}: A unique service account ID.
    • 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.
    • serviceAccount:{service_account_id}: A unique service account ID.
    • 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 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.
    • serviceAccount:{service_account_id}: A unique service account ID.
    • system:{allUsers|allAuthenticatedUsers}: see system groups
    role String
    The role that should be applied. See roles
    sleepAfter Integer
    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.
    • serviceAccount:{service_account_id}: A unique service account ID.
    • 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.
    • serviceAccount:{service_account_id}: A unique service account ID.
    • system:{allUsers|allAuthenticatedUsers}: see system groups
    role str
    The role that should be applied. See roles
    sleep_after int
    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.
    • serviceAccount:{service_account_id}: A unique service account ID.
    • system:{allUsers|allAuthenticatedUsers}: see system groups
    role String
    The role that should be applied. See roles
    sleepAfter Number

    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 string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up 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)
    public static FunctionIamBinding get(String name, Output<String> id, FunctionIamBindingState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    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.
    • serviceAccount:{service_account_id}: A unique service account ID.
    • 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.
    • serviceAccount:{service_account_id}: A unique service account ID.
    • 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 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.
    • serviceAccount:{service_account_id}: A unique service account ID.
    • system:{allUsers|allAuthenticatedUsers}: see system groups
    role String
    The role that should be applied. See roles
    sleepAfter Integer
    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.
    • serviceAccount:{service_account_id}: A unique service account ID.
    • 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.
    • serviceAccount:{service_account_id}: A unique service account ID.
    • system:{allUsers|allAuthenticatedUsers}: see system groups
    role str
    The role that should be applied. See roles
    sleep_after int
    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.
    • serviceAccount:{service_account_id}: A unique service account ID.
    • system:{allUsers|allAuthenticatedUsers}: see system groups
    role String
    The role that should be applied. See roles
    sleepAfter Number

    Package Details

    Repository
    Yandex pulumi/pulumi-yandex
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the yandex Terraform Provider.
    yandex logo
    Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi