Snowflake v0.26.0, May 30 23
Snowflake v0.26.0, May 30 23
snowflake.getCurrentAccount
Explore with Pulumi AI
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
using Snowflake = Pulumi.Snowflake;
return await Deployment.RunAsync(() =>
{
var @this = Snowflake.GetCurrentAccount.Invoke();
var snowflakeAccountUrl = new Aws.Ssm.Parameter("snowflakeAccountUrl", new()
{
Type = "String",
Value = @this.Apply(@this => @this.Apply(getCurrentAccountResult => getCurrentAccountResult.Url)),
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ssm"
"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 {
this, err := snowflake.GetCurrentAccount(ctx, nil, nil)
if err != nil {
return err
}
_, err = ssm.NewParameter(ctx, "snowflakeAccountUrl", &ssm.ParameterArgs{
Type: pulumi.String("String"),
Value: *pulumi.String(this.Url),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.snowflake.SnowflakeFunctions;
import com.pulumi.aws.ssm.Parameter;
import com.pulumi.aws.ssm.ParameterArgs;
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.getCurrentAccount();
var snowflakeAccountUrl = new Parameter("snowflakeAccountUrl", ParameterArgs.builder()
.type("String")
.value(this_.url())
.build());
}
}
import pulumi
import pulumi_aws as aws
import pulumi_snowflake as snowflake
this = snowflake.get_current_account()
snowflake_account_url = aws.ssm.Parameter("snowflakeAccountUrl",
type="String",
value=this.url)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as snowflake from "@pulumi/snowflake";
const this = snowflake.getCurrentAccount({});
const snowflakeAccountUrl = new aws.ssm.Parameter("snowflakeAccountUrl", {
type: "String",
value: _this.then(_this => _this.url),
});
resources:
snowflakeAccountUrl:
type: aws:ssm:Parameter
properties:
type: String
value: ${this.url}
variables:
this:
fn::invoke:
Function: snowflake:getCurrentAccount
Arguments: {}
Using getCurrentAccount
function getCurrentAccount(opts?: InvokeOptions): Promise<GetCurrentAccountResult>
def get_current_account(opts: Optional[InvokeOptions] = None) -> GetCurrentAccountResult
func GetCurrentAccount(ctx *Context, opts ...InvokeOption) (*GetCurrentAccountResult, error)
> Note: This function is named GetCurrentAccount
in the Go SDK.
public static class GetCurrentAccount
{
public static Task<GetCurrentAccountResult> InvokeAsync(InvokeOptions? opts = null)
}
public static CompletableFuture<GetCurrentAccountResult> getCurrentAccount(InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: snowflake:index/getCurrentAccount:getCurrentAccount
arguments:
# arguments dictionary
getCurrentAccount Result
The following output properties are available:
Package Details
- Repository
- Snowflake pulumi/pulumi-snowflake
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
snowflake
Terraform Provider.