1. Packages
  2. AWS
  3. API Docs
  4. cloudfront
  5. getOriginAccessIdentity
AWS v6.74.0 published on Wednesday, Mar 26, 2025 by Pulumi

aws.cloudfront.getOriginAccessIdentity

Explore with Pulumi AI

AWS v6.74.0 published on Wednesday, Mar 26, 2025 by Pulumi

Use this data source to retrieve information for an Amazon CloudFront origin access identity.

Example Usage

The following example below creates a CloudFront origin access identity.

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.cloudfront.getOriginAccessIdentity({
    id: "E1ZAKK699EOLAL",
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.cloudfront.get_origin_access_identity(id="E1ZAKK699EOLAL")
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudfront"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudfront.LookupOriginAccessIdentity(ctx, &cloudfront.LookupOriginAccessIdentityArgs{
			Id: "E1ZAKK699EOLAL",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.CloudFront.GetOriginAccessIdentity.Invoke(new()
    {
        Id = "E1ZAKK699EOLAL",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudfront.CloudfrontFunctions;
import com.pulumi.aws.cloudfront.inputs.GetOriginAccessIdentityArgs;
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 example = CloudfrontFunctions.getOriginAccessIdentity(GetOriginAccessIdentityArgs.builder()
            .id("E1ZAKK699EOLAL")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: aws:cloudfront:getOriginAccessIdentity
      arguments:
        id: E1ZAKK699EOLAL
Copy

Using getOriginAccessIdentity

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 getOriginAccessIdentity(args: GetOriginAccessIdentityArgs, opts?: InvokeOptions): Promise<GetOriginAccessIdentityResult>
function getOriginAccessIdentityOutput(args: GetOriginAccessIdentityOutputArgs, opts?: InvokeOptions): Output<GetOriginAccessIdentityResult>
Copy
def get_origin_access_identity(id: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetOriginAccessIdentityResult
def get_origin_access_identity_output(id: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetOriginAccessIdentityResult]
Copy
func LookupOriginAccessIdentity(ctx *Context, args *LookupOriginAccessIdentityArgs, opts ...InvokeOption) (*LookupOriginAccessIdentityResult, error)
func LookupOriginAccessIdentityOutput(ctx *Context, args *LookupOriginAccessIdentityOutputArgs, opts ...InvokeOption) LookupOriginAccessIdentityResultOutput
Copy

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

public static class GetOriginAccessIdentity 
{
    public static Task<GetOriginAccessIdentityResult> InvokeAsync(GetOriginAccessIdentityArgs args, InvokeOptions? opts = null)
    public static Output<GetOriginAccessIdentityResult> Invoke(GetOriginAccessIdentityInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetOriginAccessIdentityResult> getOriginAccessIdentity(GetOriginAccessIdentityArgs args, InvokeOptions options)
public static Output<GetOriginAccessIdentityResult> getOriginAccessIdentity(GetOriginAccessIdentityArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws:cloudfront/getOriginAccessIdentity:getOriginAccessIdentity
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Id This property is required. string
The identifier for the origin access identity. For example: E1ZAKK699EOLAL.
Id This property is required. string
The identifier for the origin access identity. For example: E1ZAKK699EOLAL.
id This property is required. String
The identifier for the origin access identity. For example: E1ZAKK699EOLAL.
id This property is required. string
The identifier for the origin access identity. For example: E1ZAKK699EOLAL.
id This property is required. str
The identifier for the origin access identity. For example: E1ZAKK699EOLAL.
id This property is required. String
The identifier for the origin access identity. For example: E1ZAKK699EOLAL.

getOriginAccessIdentity Result

The following output properties are available:

Arn string
The origin access identity ARN.
CallerReference string
Internal value used by CloudFront to allow future updates to the origin access identity.
CloudfrontAccessIdentityPath string
A shortcut to the full path for the origin access identity to use in CloudFront, see below.
Comment string
An optional comment for the origin access identity.
Etag string
Current version of the origin access identity's information. For example: E2QWRUHAPOMQZL.
IamArn string
Pre-generated ARN for use in S3 bucket policies (see below). Example: arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2QWRUHAPOMQZL.
Id string
S3CanonicalUserId string
The Amazon S3 canonical user ID for the origin access identity, which you use when giving the origin access identity read permission to an object in Amazon S3.
Arn string
The origin access identity ARN.
CallerReference string
Internal value used by CloudFront to allow future updates to the origin access identity.
CloudfrontAccessIdentityPath string
A shortcut to the full path for the origin access identity to use in CloudFront, see below.
Comment string
An optional comment for the origin access identity.
Etag string
Current version of the origin access identity's information. For example: E2QWRUHAPOMQZL.
IamArn string
Pre-generated ARN for use in S3 bucket policies (see below). Example: arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2QWRUHAPOMQZL.
Id string
S3CanonicalUserId string
The Amazon S3 canonical user ID for the origin access identity, which you use when giving the origin access identity read permission to an object in Amazon S3.
arn String
The origin access identity ARN.
callerReference String
Internal value used by CloudFront to allow future updates to the origin access identity.
cloudfrontAccessIdentityPath String
A shortcut to the full path for the origin access identity to use in CloudFront, see below.
comment String
An optional comment for the origin access identity.
etag String
Current version of the origin access identity's information. For example: E2QWRUHAPOMQZL.
iamArn String
Pre-generated ARN for use in S3 bucket policies (see below). Example: arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2QWRUHAPOMQZL.
id String
s3CanonicalUserId String
The Amazon S3 canonical user ID for the origin access identity, which you use when giving the origin access identity read permission to an object in Amazon S3.
arn string
The origin access identity ARN.
callerReference string
Internal value used by CloudFront to allow future updates to the origin access identity.
cloudfrontAccessIdentityPath string
A shortcut to the full path for the origin access identity to use in CloudFront, see below.
comment string
An optional comment for the origin access identity.
etag string
Current version of the origin access identity's information. For example: E2QWRUHAPOMQZL.
iamArn string
Pre-generated ARN for use in S3 bucket policies (see below). Example: arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2QWRUHAPOMQZL.
id string
s3CanonicalUserId string
The Amazon S3 canonical user ID for the origin access identity, which you use when giving the origin access identity read permission to an object in Amazon S3.
arn str
The origin access identity ARN.
caller_reference str
Internal value used by CloudFront to allow future updates to the origin access identity.
cloudfront_access_identity_path str
A shortcut to the full path for the origin access identity to use in CloudFront, see below.
comment str
An optional comment for the origin access identity.
etag str
Current version of the origin access identity's information. For example: E2QWRUHAPOMQZL.
iam_arn str
Pre-generated ARN for use in S3 bucket policies (see below). Example: arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2QWRUHAPOMQZL.
id str
s3_canonical_user_id str
The Amazon S3 canonical user ID for the origin access identity, which you use when giving the origin access identity read permission to an object in Amazon S3.
arn String
The origin access identity ARN.
callerReference String
Internal value used by CloudFront to allow future updates to the origin access identity.
cloudfrontAccessIdentityPath String
A shortcut to the full path for the origin access identity to use in CloudFront, see below.
comment String
An optional comment for the origin access identity.
etag String
Current version of the origin access identity's information. For example: E2QWRUHAPOMQZL.
iamArn String
Pre-generated ARN for use in S3 bucket policies (see below). Example: arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2QWRUHAPOMQZL.
id String
s3CanonicalUserId String
The Amazon S3 canonical user ID for the origin access identity, which you use when giving the origin access identity read permission to an object in Amazon S3.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.
AWS v6.74.0 published on Wednesday, Mar 26, 2025 by Pulumi