GetCanonicalUserId
The Canonical User ID data source allows access to the canonical user ID for the effective account in which this provider is working.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var current = Output.Create(Aws.GetCanonicalUserId.InvokeAsync());
this.CanonicalUserId = current.Apply(current => current.Id);
}
[Output("canonicalUserId")]
public Output<string> CanonicalUserId { get; set; }
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
current, err := aws.GetCanonicalUserId(ctx, nil, nil)
if err != nil {
return err
}
ctx.Export("canonicalUserId", current.Id)
return nil
})
}import pulumi
import pulumi_aws as aws
current = aws.get_canonical_user_id()
pulumi.export("canonicalUserId", current.id)import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const current = pulumi.output(aws.getCanonicalUserId({ async: true }));
export const canonicalUserId = current.id;Using GetCanonicalUserId
function getCanonicalUserId(opts?: InvokeOptions): Promise<GetCanonicalUserIdResult>function get_canonical_user_id(opts=None)func GetCanonicalUserId(ctx *Context, opts ...InvokeOption) (*GetCanonicalUserIdResult, error)public static class GetCanonicalUserId {
public static Task<GetCanonicalUserIdResult> InvokeAsync(InvokeOptions? opts = null)
}GetCanonicalUserId Result
The following output properties are available:
- Display
Name string The human-friendly name linked to the canonical user ID. The bucket owner’s display name. NOTE: This value is only included in the response in the US East (N. Virginia), US West (N. California), US West (Oregon), Asia Pacific (Singapore), Asia Pacific (Sydney), Asia Pacific (Tokyo), EU (Ireland), and South America (São Paulo) regions.
- Id string
The provider-assigned unique ID for this managed resource.
- Display
Name string The human-friendly name linked to the canonical user ID. The bucket owner’s display name. NOTE: This value is only included in the response in the US East (N. Virginia), US West (N. California), US West (Oregon), Asia Pacific (Singapore), Asia Pacific (Sydney), Asia Pacific (Tokyo), EU (Ireland), and South America (São Paulo) regions.
- Id string
The provider-assigned unique ID for this managed resource.
- display
Name string The human-friendly name linked to the canonical user ID. The bucket owner’s display name. NOTE: This value is only included in the response in the US East (N. Virginia), US West (N. California), US West (Oregon), Asia Pacific (Singapore), Asia Pacific (Sydney), Asia Pacific (Tokyo), EU (Ireland), and South America (São Paulo) regions.
- id string
The provider-assigned unique ID for this managed resource.
- display_
name str The human-friendly name linked to the canonical user ID. The bucket owner’s display name. NOTE: This value is only included in the response in the US East (N. Virginia), US West (N. California), US West (Oregon), Asia Pacific (Singapore), Asia Pacific (Sydney), Asia Pacific (Tokyo), EU (Ireland), and South America (São Paulo) regions.
- id str
The provider-assigned unique ID for this managed resource.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.