alicloud logo
Alibaba Cloud v3.29.0, Jan 20 23

alicloud.ram.getAccountAliases

This data source provides an alias for the Alibaba Cloud account.

Example Usage

using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var aliasDs = AliCloud.Ram.GetAccountAliases.Invoke(new()
    {
        OutputFile = "alias.txt",
    });

    return new Dictionary<string, object?>
    {
        ["accountAlias"] = aliasDs.Apply(getAccountAliasesResult => getAccountAliasesResult.AccountAlias),
    };
});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		aliasDs, err := ram.GetAccountAliases(ctx, &ram.GetAccountAliasesArgs{
			OutputFile: pulumi.StringRef("alias.txt"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("accountAlias", aliasDs.AccountAlias)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ram.RamFunctions;
import com.pulumi.alicloud.ram.inputs.GetAccountAliasesArgs;
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 aliasDs = RamFunctions.getAccountAliases(GetAccountAliasesArgs.builder()
            .outputFile("alias.txt")
            .build());

        ctx.export("accountAlias", aliasDs.applyValue(getAccountAliasesResult -> getAccountAliasesResult.accountAlias()));
    }
}
import pulumi
import pulumi_alicloud as alicloud

alias_ds = alicloud.ram.get_account_aliases(output_file="alias.txt")
pulumi.export("accountAlias", alias_ds.account_alias)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const aliasDs = alicloud.ram.getAccountAliases({
    outputFile: "alias.txt",
});
export const accountAlias = aliasDs.then(aliasDs => aliasDs.accountAlias);
variables:
  aliasDs:
    fn::invoke:
      Function: alicloud:ram:getAccountAliases
      Arguments:
        outputFile: alias.txt
outputs:
  accountAlias: ${aliasDs.accountAlias}

Using getAccountAliases

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 getAccountAliases(args: GetAccountAliasesArgs, opts?: InvokeOptions): Promise<GetAccountAliasesResult>
function getAccountAliasesOutput(args: GetAccountAliasesOutputArgs, opts?: InvokeOptions): Output<GetAccountAliasesResult>
def get_account_aliases(output_file: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetAccountAliasesResult
def get_account_aliases_output(output_file: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetAccountAliasesResult]
func GetAccountAliases(ctx *Context, args *GetAccountAliasesArgs, opts ...InvokeOption) (*GetAccountAliasesResult, error)
func GetAccountAliasesOutput(ctx *Context, args *GetAccountAliasesOutputArgs, opts ...InvokeOption) GetAccountAliasesResultOutput

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

public static class GetAccountAliases 
{
    public static Task<GetAccountAliasesResult> InvokeAsync(GetAccountAliasesArgs args, InvokeOptions? opts = null)
    public static Output<GetAccountAliasesResult> Invoke(GetAccountAliasesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAccountAliasesResult> getAccountAliases(GetAccountAliasesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:ram/getAccountAliases:getAccountAliases
  arguments:
    # arguments dictionary

The following arguments are supported:

OutputFile string
OutputFile string
outputFile String
outputFile string
outputFile String

getAccountAliases Result

The following output properties are available:

AccountAlias string

Alias of the account.

Id string

The provider-assigned unique ID for this managed resource.

OutputFile string
AccountAlias string

Alias of the account.

Id string

The provider-assigned unique ID for this managed resource.

OutputFile string
accountAlias String

Alias of the account.

id String

The provider-assigned unique ID for this managed resource.

outputFile String
accountAlias string

Alias of the account.

id string

The provider-assigned unique ID for this managed resource.

outputFile string
account_alias str

Alias of the account.

id str

The provider-assigned unique ID for this managed resource.

output_file str
accountAlias String

Alias of the account.

id String

The provider-assigned unique ID for this managed resource.

outputFile String

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.