OriginAccessIdentity

Creates an Amazon CloudFront origin access identity.

For information about CloudFront distributions, see the Amazon CloudFront Developer Guide. For more information on generating origin access identities, see [Using an Origin Access Identity to Restrict Access to Your Amazon S3 Content][2].

Using With CloudFront

Normally, when referencing an origin access identity in CloudFront, you need to prefix the ID with the origin-access-identity/cloudfront/ special path. The cloudfront_access_identity_path allows this to be circumvented. The below snippet demonstrates use with the s3_origin_config structure for the [aws.cloudfront.Distribution][3] resource:

import * as pulumi from "@pulumi/pulumi";
import pulumi
using Pulumi;

class MyStack : Stack
{
    public MyStack()
    {
    }

}
package main

import (
	"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		return nil
	})
}

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var originAccessIdentity = new Aws.CloudFront.OriginAccessIdentity("originAccessIdentity", new Aws.CloudFront.OriginAccessIdentityArgs
        {
            Comment = "Some comment",
        });
    }

}
package main

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

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := cloudfront.NewOriginAccessIdentity(ctx, "originAccessIdentity", &cloudfront.OriginAccessIdentityArgs{
            Comment: pulumi.String("Some comment"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

origin_access_identity = aws.cloudfront.OriginAccessIdentity("originAccessIdentity", comment="Some comment")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const originAccessIdentity = new aws.cloudfront.OriginAccessIdentity("origin_access_identity", {
    comment: "Some comment",
});

Create a OriginAccessIdentity Resource

def OriginAccessIdentity(resource_name, opts=None, comment=None, __props__=None);
name string
The unique name of the resource.
args OriginAccessIdentityArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args OriginAccessIdentityArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args OriginAccessIdentityArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

OriginAccessIdentity Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The OriginAccessIdentity resource accepts the following input properties:

Comment string

An optional comment for the origin access identity.

Comment string

An optional comment for the origin access identity.

comment string

An optional comment for the origin access identity.

comment str

An optional comment for the origin access identity.

Outputs

All input properties are implicitly available as output properties. Additionally, the OriginAccessIdentity resource produces the following output properties:

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.

Etag string

The current version of the origin access identity’s information. For example: E2QWRUHAPOMQZL.

IamArn string

A pre-generated ARN for use in S3 bucket policies (see below). Example: arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2QWRUHAPOMQZL.

Id string
The provider-assigned unique ID for this managed resource.
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.

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.

Etag string

The current version of the origin access identity’s information. For example: E2QWRUHAPOMQZL.

IamArn string

A pre-generated ARN for use in S3 bucket policies (see below). Example: arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2QWRUHAPOMQZL.

Id string
The provider-assigned unique ID for this managed resource.
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.

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.

etag string

The current version of the origin access identity’s information. For example: E2QWRUHAPOMQZL.

iamArn string

A pre-generated ARN for use in S3 bucket policies (see below). Example: arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2QWRUHAPOMQZL.

id string
The provider-assigned unique ID for this managed resource.
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.

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.

etag str

The current version of the origin access identity’s information. For example: E2QWRUHAPOMQZL.

iam_arn str

A pre-generated ARN for use in S3 bucket policies (see below). Example: arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2QWRUHAPOMQZL.

id str
The provider-assigned unique ID for this managed resource.
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.

Look up an Existing OriginAccessIdentity Resource

Get an existing OriginAccessIdentity resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

static get(resource_name, id, opts=None, caller_reference=None, cloudfront_access_identity_path=None, comment=None, etag=None, iam_arn=None, s3_canonical_user_id=None, __props__=None);
func GetOriginAccessIdentity(ctx *Context, name string, id IDInput, state *OriginAccessIdentityState, opts ...ResourceOption) (*OriginAccessIdentity, error)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

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

The current version of the origin access identity’s information. For example: E2QWRUHAPOMQZL.

IamArn string

A pre-generated ARN for use in S3 bucket policies (see below). Example: arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2QWRUHAPOMQZL.

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.

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

The current version of the origin access identity’s information. For example: E2QWRUHAPOMQZL.

IamArn string

A pre-generated ARN for use in S3 bucket policies (see below). Example: arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2QWRUHAPOMQZL.

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.

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

The current version of the origin access identity’s information. For example: E2QWRUHAPOMQZL.

iamArn string

A pre-generated ARN for use in S3 bucket policies (see below). Example: arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2QWRUHAPOMQZL.

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.

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

The current version of the origin access identity’s information. For example: E2QWRUHAPOMQZL.

iam_arn str

A pre-generated ARN for use in S3 bucket policies (see below). Example: arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2QWRUHAPOMQZL.

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.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.