Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi
alicloud.ram.getAccountAlias
Explore with Pulumi AI
This data source provides an alias for the Alibaba Cloud account.
NOTE: Available since v1.0.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const aliasDs = alicloud.ram.getAccountAlias({
outputFile: "alias.txt",
});
export const accountAlias = aliasDs.then(aliasDs => aliasDs.accountAlias);
import pulumi
import pulumi_alicloud as alicloud
alias_ds = alicloud.ram.get_account_alias(output_file="alias.txt")
pulumi.export("accountAlias", alias_ds.account_alias)
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.LookupAccountAlias(ctx, &ram.LookupAccountAliasArgs{
OutputFile: pulumi.StringRef("alias.txt"),
}, nil)
if err != nil {
return err
}
ctx.Export("accountAlias", aliasDs.AccountAlias)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var aliasDs = AliCloud.Ram.GetAccountAlias.Invoke(new()
{
OutputFile = "alias.txt",
});
return new Dictionary<string, object?>
{
["accountAlias"] = aliasDs.Apply(getAccountAliasResult => getAccountAliasResult.AccountAlias),
};
});
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.GetAccountAliasArgs;
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.getAccountAlias(GetAccountAliasArgs.builder()
.outputFile("alias.txt")
.build());
ctx.export("accountAlias", aliasDs.applyValue(getAccountAliasResult -> getAccountAliasResult.accountAlias()));
}
}
variables:
aliasDs:
fn::invoke:
Function: alicloud:ram:getAccountAlias
Arguments:
outputFile: alias.txt
outputs:
accountAlias: ${aliasDs.accountAlias}
Using getAccountAlias
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 getAccountAlias(args: GetAccountAliasArgs, opts?: InvokeOptions): Promise<GetAccountAliasResult>
function getAccountAliasOutput(args: GetAccountAliasOutputArgs, opts?: InvokeOptions): Output<GetAccountAliasResult>
def get_account_alias(output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAccountAliasResult
def get_account_alias_output(output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAccountAliasResult]
func LookupAccountAlias(ctx *Context, args *LookupAccountAliasArgs, opts ...InvokeOption) (*LookupAccountAliasResult, error)
func LookupAccountAliasOutput(ctx *Context, args *LookupAccountAliasOutputArgs, opts ...InvokeOption) LookupAccountAliasResultOutput
> Note: This function is named LookupAccountAlias
in the Go SDK.
public static class GetAccountAlias
{
public static Task<GetAccountAliasResult> InvokeAsync(GetAccountAliasArgs args, InvokeOptions? opts = null)
public static Output<GetAccountAliasResult> Invoke(GetAccountAliasInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAccountAliasResult> getAccountAlias(GetAccountAliasArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:ram/getAccountAlias:getAccountAlias
arguments:
# arguments dictionary
The following arguments are supported:
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- output
File String - File name where to save data source results (after running
pulumi preview
).
- output
File string - File name where to save data source results (after running
pulumi preview
).
- output_
file str - File name where to save data source results (after running
pulumi preview
).
- output
File String - File name where to save data source results (after running
pulumi preview
).
getAccountAlias Result
The following output properties are available:
- Account
Alias string - Alias of the account.
- Id string
- The provider-assigned unique ID for this managed resource.
- Output
File string
- Account
Alias string - Alias of the account.
- Id string
- The provider-assigned unique ID for this managed resource.
- Output
File string
- account
Alias String - Alias of the account.
- id String
- The provider-assigned unique ID for this managed resource.
- output
File String
- account
Alias string - Alias of the account.
- id string
- The provider-assigned unique ID for this managed resource.
- output
File string
- account_
alias str - Alias of the account.
- id str
- The provider-assigned unique ID for this managed resource.
- output_
file str
- account
Alias String - Alias of the account.
- id String
- The provider-assigned unique ID for this managed resource.
- output
File String
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.