1. Packages
  2. Snowflake Provider
  3. API Docs
  4. getRole
Snowflake v0.61.1 published on Thursday, Nov 14, 2024 by Pulumi

snowflake.getRole

Explore with Pulumi AI

snowflake logo
Snowflake v0.61.1 published on Thursday, Nov 14, 2024 by Pulumi

    Deprecation This resource is deprecated and will be removed in a future major version release. Please use snowflake.getRoles instead.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as snowflake from "@pulumi/snowflake";
    
    const this = snowflake.getRole({
        name: "role1",
    });
    
    import pulumi
    import pulumi_snowflake as snowflake
    
    this = snowflake.get_role(name="role1")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-snowflake/sdk/go/snowflake"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := snowflake.LookupRole(ctx, &snowflake.LookupRoleArgs{
    			Name: "role1",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Snowflake = Pulumi.Snowflake;
    
    return await Deployment.RunAsync(() => 
    {
        var @this = Snowflake.GetRole.Invoke(new()
        {
            Name = "role1",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.snowflake.SnowflakeFunctions;
    import com.pulumi.snowflake.inputs.GetRoleArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var this = SnowflakeFunctions.getRole(GetRoleArgs.builder()
                .name("role1")
                .build());
    
        }
    }
    
    variables:
      this:
        fn::invoke:
          Function: snowflake:getRole
          Arguments:
            name: role1
    

    Using getRole

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getRole(args: GetRoleArgs, opts?: InvokeOptions): Promise<GetRoleResult>
    function getRoleOutput(args: GetRoleOutputArgs, opts?: InvokeOptions): Output<GetRoleResult>
    def get_role(name: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetRoleResult
    def get_role_output(name: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetRoleResult]
    func LookupRole(ctx *Context, args *LookupRoleArgs, opts ...InvokeOption) (*LookupRoleResult, error)
    func LookupRoleOutput(ctx *Context, args *LookupRoleOutputArgs, opts ...InvokeOption) LookupRoleResultOutput

    > Note: This function is named LookupRole in the Go SDK.

    public static class GetRole 
    {
        public static Task<GetRoleResult> InvokeAsync(GetRoleArgs args, InvokeOptions? opts = null)
        public static Output<GetRoleResult> Invoke(GetRoleInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRoleResult> getRole(GetRoleArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: snowflake:index/getRole:getRole
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The role for which to return metadata.
    Name string
    The role for which to return metadata.
    name String
    The role for which to return metadata.
    name string
    The role for which to return metadata.
    name str
    The role for which to return metadata.
    name String
    The role for which to return metadata.

    getRole Result

    The following output properties are available:

    Comment string
    The comment on the role
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The role for which to return metadata.
    Comment string
    The comment on the role
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The role for which to return metadata.
    comment String
    The comment on the role
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The role for which to return metadata.
    comment string
    The comment on the role
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The role for which to return metadata.
    comment str
    The comment on the role
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The role for which to return metadata.
    comment String
    The comment on the role
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The role for which to return metadata.

    Package Details

    Repository
    Snowflake pulumi/pulumi-snowflake
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the snowflake Terraform Provider.
    snowflake logo
    Snowflake v0.61.1 published on Thursday, Nov 14, 2024 by Pulumi