PulumiUP: Hear from technical leaders as they present the vision for the future of cloud engineering. Save Your Spot

getCanonicalUserId

Deprecated: aws.getCanonicalUserId has been deprecated in favor of aws.s3.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.S3.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/v3/go/aws/s3"
	"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		current, err := s3.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.s3.get_canonical_user_id()
pulumi.export("canonicalUserId", current.id)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const current = aws.s3.getCanonicalUserId({});
export const canonicalUserId = current.then(current => current.id);

Using getCanonicalUserId

function getCanonicalUserId(opts?: InvokeOptions): Promise<GetCanonicalUserIdResult>
def get_canonical_user_id(opts: Optional[InvokeOptions] = None) -> GetCanonicalUserIdResult
func GetCanonicalUserId(ctx *Context, opts ...InvokeOption) (*GetCanonicalUserIdResult, error)

Note: This function is named GetCanonicalUserId in the Go SDK.

public static class GetCanonicalUserId {
    public static Task<GetCanonicalUserIdResult> InvokeAsync(InvokeOptions? opts = null)
}

getCanonicalUserId Result

The following output properties are available:

DisplayName 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.
DisplayName 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.
displayName 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 aws Terraform Provider.