1. Packages
  2. AWS
  3. API Docs
  4. cloudfront
  5. getOriginAccessControl
AWS v6.75.0 published on Wednesday, Apr 2, 2025 by Pulumi

aws.cloudfront.getOriginAccessControl

Explore with Pulumi AI

AWS v6.75.0 published on Wednesday, Apr 2, 2025 by Pulumi

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

Example Usage

The below example retrieves a CloudFront origin access control config.

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

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

example = aws.cloudfront.get_origin_access_control(id="E2T5VTFBZJ3BJB")
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.LookupOriginAccessControl(ctx, &cloudfront.LookupOriginAccessControlArgs{
			Id: "E2T5VTFBZJ3BJB",
		}, 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.GetOriginAccessControl.Invoke(new()
    {
        Id = "E2T5VTFBZJ3BJB",
    });

});
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.GetOriginAccessControlArgs;
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.getOriginAccessControl(GetOriginAccessControlArgs.builder()
            .id("E2T5VTFBZJ3BJB")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: aws:cloudfront:getOriginAccessControl
      arguments:
        id: E2T5VTFBZJ3BJB
Copy

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:cloudfront/getOriginAccessControl:getOriginAccessControl
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Id This property is required. string
The identifier for the origin access control settings. For example: E2T5VTFBZJ3BJB.
Id This property is required. string
The identifier for the origin access control settings. For example: E2T5VTFBZJ3BJB.
id This property is required. String
The identifier for the origin access control settings. For example: E2T5VTFBZJ3BJB.
id This property is required. string
The identifier for the origin access control settings. For example: E2T5VTFBZJ3BJB.
id This property is required. str
The identifier for the origin access control settings. For example: E2T5VTFBZJ3BJB.
id This property is required. String
The identifier for the origin access control settings. For example: E2T5VTFBZJ3BJB.

getOriginAccessControl Result

The following output properties are available:

Arn string
The origin access control ARN.
Description string
A description of the origin access control.
Etag string
Current version of the origin access control's information. For example: E2QWRUHAPOMQZL.
Id string
Name string
A name to identify the origin access control.
OriginAccessControlOriginType string
The type of origin that this origin access control is for.
SigningBehavior string
Specifies which requests CloudFront signs.
SigningProtocol string
The signing protocol of the origin access control, which determines how CloudFront signs (authenticates) requests.
Arn string
The origin access control ARN.
Description string
A description of the origin access control.
Etag string
Current version of the origin access control's information. For example: E2QWRUHAPOMQZL.
Id string
Name string
A name to identify the origin access control.
OriginAccessControlOriginType string
The type of origin that this origin access control is for.
SigningBehavior string
Specifies which requests CloudFront signs.
SigningProtocol string
The signing protocol of the origin access control, which determines how CloudFront signs (authenticates) requests.
arn String
The origin access control ARN.
description String
A description of the origin access control.
etag String
Current version of the origin access control's information. For example: E2QWRUHAPOMQZL.
id String
name String
A name to identify the origin access control.
originAccessControlOriginType String
The type of origin that this origin access control is for.
signingBehavior String
Specifies which requests CloudFront signs.
signingProtocol String
The signing protocol of the origin access control, which determines how CloudFront signs (authenticates) requests.
arn string
The origin access control ARN.
description string
A description of the origin access control.
etag string
Current version of the origin access control's information. For example: E2QWRUHAPOMQZL.
id string
name string
A name to identify the origin access control.
originAccessControlOriginType string
The type of origin that this origin access control is for.
signingBehavior string
Specifies which requests CloudFront signs.
signingProtocol string
The signing protocol of the origin access control, which determines how CloudFront signs (authenticates) requests.
arn str
The origin access control ARN.
description str
A description of the origin access control.
etag str
Current version of the origin access control's information. For example: E2QWRUHAPOMQZL.
id str
name str
A name to identify the origin access control.
origin_access_control_origin_type str
The type of origin that this origin access control is for.
signing_behavior str
Specifies which requests CloudFront signs.
signing_protocol str
The signing protocol of the origin access control, which determines how CloudFront signs (authenticates) requests.
arn String
The origin access control ARN.
description String
A description of the origin access control.
etag String
Current version of the origin access control's information. For example: E2QWRUHAPOMQZL.
id String
name String
A name to identify the origin access control.
originAccessControlOriginType String
The type of origin that this origin access control is for.
signingBehavior String
Specifies which requests CloudFront signs.
signingProtocol String
The signing protocol of the origin access control, which determines how CloudFront signs (authenticates) requests.

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.75.0 published on Wednesday, Apr 2, 2025 by Pulumi