1. Packages
  2. Snowflake
  3. API Docs
  4. getShares
Snowflake v0.59.0 published on Friday, Sep 20, 2024 by Pulumi

snowflake.getShares

Explore with Pulumi AI

snowflake logo
Snowflake v0.59.0 published on Friday, Sep 20, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as snowflake from "@pulumi/snowflake";
    
    const this = snowflake.getShares({});
    const ad = snowflake.getShares({
        pattern: "usage",
    });
    
    import pulumi
    import pulumi_snowflake as snowflake
    
    this = snowflake.get_shares()
    ad = snowflake.get_shares(pattern="usage")
    
    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.GetShares(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		_, err = snowflake.GetShares(ctx, &snowflake.GetSharesArgs{
    			Pattern: pulumi.StringRef("usage"),
    		}, 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.GetShares.Invoke();
    
        var ad = Snowflake.GetShares.Invoke(new()
        {
            Pattern = "usage",
        });
    
    });
    
    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.GetSharesArgs;
    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.getShares();
    
            final var ad = SnowflakeFunctions.getShares(GetSharesArgs.builder()
                .pattern("usage")
                .build());
    
        }
    }
    
    variables:
      this:
        fn::invoke:
          Function: snowflake:getShares
          Arguments: {}
      ad:
        fn::invoke:
          Function: snowflake:getShares
          Arguments:
            pattern: usage
    

    Using getShares

    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 getShares(args: GetSharesArgs, opts?: InvokeOptions): Promise<GetSharesResult>
    function getSharesOutput(args: GetSharesOutputArgs, opts?: InvokeOptions): Output<GetSharesResult>
    def get_shares(pattern: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetSharesResult
    def get_shares_output(pattern: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetSharesResult]
    func GetShares(ctx *Context, args *GetSharesArgs, opts ...InvokeOption) (*GetSharesResult, error)
    func GetSharesOutput(ctx *Context, args *GetSharesOutputArgs, opts ...InvokeOption) GetSharesResultOutput

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

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

    The following arguments are supported:

    Pattern string
    Filters the command output by object name.
    Pattern string
    Filters the command output by object name.
    pattern String
    Filters the command output by object name.
    pattern string
    Filters the command output by object name.
    pattern str
    Filters the command output by object name.
    pattern String
    Filters the command output by object name.

    getShares Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Shares List<GetSharesShare>
    List of all the shares available in the system.
    Pattern string
    Filters the command output by object name.
    Id string
    The provider-assigned unique ID for this managed resource.
    Shares []GetSharesShare
    List of all the shares available in the system.
    Pattern string
    Filters the command output by object name.
    id String
    The provider-assigned unique ID for this managed resource.
    shares List<GetSharesShare>
    List of all the shares available in the system.
    pattern String
    Filters the command output by object name.
    id string
    The provider-assigned unique ID for this managed resource.
    shares GetSharesShare[]
    List of all the shares available in the system.
    pattern string
    Filters the command output by object name.
    id str
    The provider-assigned unique ID for this managed resource.
    shares Sequence[GetSharesShare]
    List of all the shares available in the system.
    pattern str
    Filters the command output by object name.
    id String
    The provider-assigned unique ID for this managed resource.
    shares List<Property Map>
    List of all the shares available in the system.
    pattern String
    Filters the command output by object name.

    Supporting Types

    GetSharesShare

    Comment string
    The comment on the share.
    Kind string
    The kind of the share.
    Name string
    Identifier for the share.
    Owner string
    The owner of the share.
    Tos List<object>
    For the OUTBOUND share, list of consumers.
    Comment string
    The comment on the share.
    Kind string
    The kind of the share.
    Name string
    Identifier for the share.
    Owner string
    The owner of the share.
    Tos []interface{}
    For the OUTBOUND share, list of consumers.
    comment String
    The comment on the share.
    kind String
    The kind of the share.
    name String
    Identifier for the share.
    owner String
    The owner of the share.
    tos List<Object>
    For the OUTBOUND share, list of consumers.
    comment string
    The comment on the share.
    kind string
    The kind of the share.
    name string
    Identifier for the share.
    owner string
    The owner of the share.
    tos any[]
    For the OUTBOUND share, list of consumers.
    comment str
    The comment on the share.
    kind str
    The kind of the share.
    name str
    Identifier for the share.
    owner str
    The owner of the share.
    tos Sequence[Any]
    For the OUTBOUND share, list of consumers.
    comment String
    The comment on the share.
    kind String
    The kind of the share.
    name String
    Identifier for the share.
    owner String
    The owner of the share.
    tos List<Any>
    For the OUTBOUND share, list of consumers.

    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.59.0 published on Friday, Sep 20, 2024 by Pulumi