1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. cloudfront
  5. getOriginAccessControl

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi

aws-native.cloudfront.getOriginAccessControl

Explore with Pulumi AI

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi

Creates a new origin access control in CloudFront. After you create an origin access control, you can add it to an origin in a CloudFront distribution so that CloudFront sends authenticated (signed) requests to the origin. This makes it possible to block public access to the origin, allowing viewers (users) to access the origin’s content only through CloudFront. For more information about using a CloudFront origin access control, see Restricting access to an origin in the Amazon CloudFront Developer Guide.

Using getOriginAccessControl

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 getOriginAccessControl(args: GetOriginAccessControlArgs, opts?: InvokeOptions): Promise<GetOriginAccessControlResult>
function getOriginAccessControlOutput(args: GetOriginAccessControlOutputArgs, opts?: InvokeOptions): Output<GetOriginAccessControlResult>
Copy
def get_origin_access_control(id: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetOriginAccessControlResult
def get_origin_access_control_output(id: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetOriginAccessControlResult]
Copy
func LookupOriginAccessControl(ctx *Context, args *LookupOriginAccessControlArgs, opts ...InvokeOption) (*LookupOriginAccessControlResult, error)
func LookupOriginAccessControlOutput(ctx *Context, args *LookupOriginAccessControlOutputArgs, opts ...InvokeOption) LookupOriginAccessControlResultOutput
Copy

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

public static class GetOriginAccessControl 
{
    public static Task<GetOriginAccessControlResult> InvokeAsync(GetOriginAccessControlArgs args, InvokeOptions? opts = null)
    public static Output<GetOriginAccessControlResult> Invoke(GetOriginAccessControlInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetOriginAccessControlResult> getOriginAccessControl(GetOriginAccessControlArgs args, InvokeOptions options)
public static Output<GetOriginAccessControlResult> getOriginAccessControl(GetOriginAccessControlArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws-native:cloudfront:getOriginAccessControl
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Id This property is required. string
The unique identifier of the origin access control.
Id This property is required. string
The unique identifier of the origin access control.
id This property is required. String
The unique identifier of the origin access control.
id This property is required. string
The unique identifier of the origin access control.
id This property is required. str
The unique identifier of the origin access control.
id This property is required. String
The unique identifier of the origin access control.

getOriginAccessControl Result

The following output properties are available:

Id string
The unique identifier of the origin access control.
OriginAccessControlConfig Pulumi.AwsNative.CloudFront.Outputs.OriginAccessControlConfig
The origin access control.
Id string
The unique identifier of the origin access control.
OriginAccessControlConfig OriginAccessControlConfig
The origin access control.
id String
The unique identifier of the origin access control.
originAccessControlConfig OriginAccessControlConfig
The origin access control.
id string
The unique identifier of the origin access control.
originAccessControlConfig OriginAccessControlConfig
The origin access control.
id str
The unique identifier of the origin access control.
origin_access_control_config OriginAccessControlConfig
The origin access control.
id String
The unique identifier of the origin access control.
originAccessControlConfig Property Map
The origin access control.

Supporting Types

OriginAccessControlConfig

Name This property is required. string
A name to identify the origin access control. You can specify up to 64 characters.
OriginAccessControlOriginType This property is required. string
The type of origin that this origin access control is for.
SigningBehavior This property is required. string
Specifies which requests CloudFront signs (adds authentication information to). Specify always for the most common use case. For more information, see origin access control advanced settings in the Amazon CloudFront Developer Guide. This field can have one of the following values:

  • always – CloudFront signs all origin requests, overwriting the Authorization header from the viewer request if one exists.
  • never – CloudFront doesn't sign any origin requests. This value turns off origin access control for all origins in all distributions that use this origin access control.
  • no-override – If the viewer request doesn't contain the Authorization header, then CloudFront signs the origin request. If the viewer request contains the Authorization header, then CloudFront doesn't sign the origin request and instead passes along the Authorization header from the viewer request. WARNING: To pass along the Authorization header from the viewer request, you must add the Authorization header to a cache policy for all cache behaviors that use origins associated with this origin access control.
SigningProtocol This property is required. string
The signing protocol of the origin access control, which determines how CloudFront signs (authenticates) requests. The only valid value is sigv4.
Description string
A description of the origin access control.
Name This property is required. string
A name to identify the origin access control. You can specify up to 64 characters.
OriginAccessControlOriginType This property is required. string
The type of origin that this origin access control is for.
SigningBehavior This property is required. string
Specifies which requests CloudFront signs (adds authentication information to). Specify always for the most common use case. For more information, see origin access control advanced settings in the Amazon CloudFront Developer Guide. This field can have one of the following values:

  • always – CloudFront signs all origin requests, overwriting the Authorization header from the viewer request if one exists.
  • never – CloudFront doesn't sign any origin requests. This value turns off origin access control for all origins in all distributions that use this origin access control.
  • no-override – If the viewer request doesn't contain the Authorization header, then CloudFront signs the origin request. If the viewer request contains the Authorization header, then CloudFront doesn't sign the origin request and instead passes along the Authorization header from the viewer request. WARNING: To pass along the Authorization header from the viewer request, you must add the Authorization header to a cache policy for all cache behaviors that use origins associated with this origin access control.
SigningProtocol This property is required. string
The signing protocol of the origin access control, which determines how CloudFront signs (authenticates) requests. The only valid value is sigv4.
Description string
A description of the origin access control.
name This property is required. String
A name to identify the origin access control. You can specify up to 64 characters.
originAccessControlOriginType This property is required. String
The type of origin that this origin access control is for.
signingBehavior This property is required. String
Specifies which requests CloudFront signs (adds authentication information to). Specify always for the most common use case. For more information, see origin access control advanced settings in the Amazon CloudFront Developer Guide. This field can have one of the following values:

  • always – CloudFront signs all origin requests, overwriting the Authorization header from the viewer request if one exists.
  • never – CloudFront doesn't sign any origin requests. This value turns off origin access control for all origins in all distributions that use this origin access control.
  • no-override – If the viewer request doesn't contain the Authorization header, then CloudFront signs the origin request. If the viewer request contains the Authorization header, then CloudFront doesn't sign the origin request and instead passes along the Authorization header from the viewer request. WARNING: To pass along the Authorization header from the viewer request, you must add the Authorization header to a cache policy for all cache behaviors that use origins associated with this origin access control.
signingProtocol This property is required. String
The signing protocol of the origin access control, which determines how CloudFront signs (authenticates) requests. The only valid value is sigv4.
description String
A description of the origin access control.
name This property is required. string
A name to identify the origin access control. You can specify up to 64 characters.
originAccessControlOriginType This property is required. string
The type of origin that this origin access control is for.
signingBehavior This property is required. string
Specifies which requests CloudFront signs (adds authentication information to). Specify always for the most common use case. For more information, see origin access control advanced settings in the Amazon CloudFront Developer Guide. This field can have one of the following values:

  • always – CloudFront signs all origin requests, overwriting the Authorization header from the viewer request if one exists.
  • never – CloudFront doesn't sign any origin requests. This value turns off origin access control for all origins in all distributions that use this origin access control.
  • no-override – If the viewer request doesn't contain the Authorization header, then CloudFront signs the origin request. If the viewer request contains the Authorization header, then CloudFront doesn't sign the origin request and instead passes along the Authorization header from the viewer request. WARNING: To pass along the Authorization header from the viewer request, you must add the Authorization header to a cache policy for all cache behaviors that use origins associated with this origin access control.
signingProtocol This property is required. string
The signing protocol of the origin access control, which determines how CloudFront signs (authenticates) requests. The only valid value is sigv4.
description string
A description of the origin access control.
name This property is required. str
A name to identify the origin access control. You can specify up to 64 characters.
origin_access_control_origin_type This property is required. str
The type of origin that this origin access control is for.
signing_behavior This property is required. str
Specifies which requests CloudFront signs (adds authentication information to). Specify always for the most common use case. For more information, see origin access control advanced settings in the Amazon CloudFront Developer Guide. This field can have one of the following values:

  • always – CloudFront signs all origin requests, overwriting the Authorization header from the viewer request if one exists.
  • never – CloudFront doesn't sign any origin requests. This value turns off origin access control for all origins in all distributions that use this origin access control.
  • no-override – If the viewer request doesn't contain the Authorization header, then CloudFront signs the origin request. If the viewer request contains the Authorization header, then CloudFront doesn't sign the origin request and instead passes along the Authorization header from the viewer request. WARNING: To pass along the Authorization header from the viewer request, you must add the Authorization header to a cache policy for all cache behaviors that use origins associated with this origin access control.
signing_protocol This property is required. str
The signing protocol of the origin access control, which determines how CloudFront signs (authenticates) requests. The only valid value is sigv4.
description str
A description of the origin access control.
name This property is required. String
A name to identify the origin access control. You can specify up to 64 characters.
originAccessControlOriginType This property is required. String
The type of origin that this origin access control is for.
signingBehavior This property is required. String
Specifies which requests CloudFront signs (adds authentication information to). Specify always for the most common use case. For more information, see origin access control advanced settings in the Amazon CloudFront Developer Guide. This field can have one of the following values:

  • always – CloudFront signs all origin requests, overwriting the Authorization header from the viewer request if one exists.
  • never – CloudFront doesn't sign any origin requests. This value turns off origin access control for all origins in all distributions that use this origin access control.
  • no-override – If the viewer request doesn't contain the Authorization header, then CloudFront signs the origin request. If the viewer request contains the Authorization header, then CloudFront doesn't sign the origin request and instead passes along the Authorization header from the viewer request. WARNING: To pass along the Authorization header from the viewer request, you must add the Authorization header to a cache policy for all cache behaviors that use origins associated with this origin access control.
signingProtocol This property is required. String
The signing protocol of the origin access control, which determines how CloudFront signs (authenticates) requests. The only valid value is sigv4.
description String
A description of the origin access control.

Package Details

Repository
AWS Native pulumi/pulumi-aws-native
License
Apache-2.0

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi