AWS v6.71.0 published on Friday, Mar 7, 2025 by Pulumi
aws.cloudfront.getDistribution
Explore with Pulumi AI
Use this data source to retrieve information about a CloudFront distribution.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = aws.cloudfront.getDistribution({
    id: "EDFDVBD632BHDS5",
});
import pulumi
import pulumi_aws as aws
test = aws.cloudfront.get_distribution(id="EDFDVBD632BHDS5")
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.LookupDistribution(ctx, &cloudfront.LookupDistributionArgs{
			Id: "EDFDVBD632BHDS5",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var test = Aws.CloudFront.GetDistribution.Invoke(new()
    {
        Id = "EDFDVBD632BHDS5",
    });
});
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.GetDistributionArgs;
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 test = CloudfrontFunctions.getDistribution(GetDistributionArgs.builder()
            .id("EDFDVBD632BHDS5")
            .build());
    }
}
variables:
  test:
    fn::invoke:
      function: aws:cloudfront:getDistribution
      arguments:
        id: EDFDVBD632BHDS5
Using getDistribution
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 getDistribution(args: GetDistributionArgs, opts?: InvokeOptions): Promise<GetDistributionResult>
function getDistributionOutput(args: GetDistributionOutputArgs, opts?: InvokeOptions): Output<GetDistributionResult>def get_distribution(id: Optional[str] = None,
                     tags: Optional[Mapping[str, str]] = None,
                     opts: Optional[InvokeOptions] = None) -> GetDistributionResult
def get_distribution_output(id: Optional[pulumi.Input[str]] = None,
                     tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetDistributionResult]func LookupDistribution(ctx *Context, args *LookupDistributionArgs, opts ...InvokeOption) (*LookupDistributionResult, error)
func LookupDistributionOutput(ctx *Context, args *LookupDistributionOutputArgs, opts ...InvokeOption) LookupDistributionResultOutput> Note: This function is named LookupDistribution in the Go SDK.
public static class GetDistribution 
{
    public static Task<GetDistributionResult> InvokeAsync(GetDistributionArgs args, InvokeOptions? opts = null)
    public static Output<GetDistributionResult> Invoke(GetDistributionInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDistributionResult> getDistribution(GetDistributionArgs args, InvokeOptions options)
public static Output<GetDistributionResult> getDistribution(GetDistributionArgs args, InvokeOptions options)
fn::invoke:
  function: aws:cloudfront/getDistribution:getDistribution
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Id string
- Identifier for the distribution. For example: EDFDVBD632BHDS5.
- Dictionary<string, string>
- Id string
- Identifier for the distribution. For example: EDFDVBD632BHDS5.
- map[string]string
- id String
- Identifier for the distribution. For example: EDFDVBD632BHDS5.
- Map<String,String>
- id string
- Identifier for the distribution. For example: EDFDVBD632BHDS5.
- {[key: string]: string}
- id str
- Identifier for the distribution. For example: EDFDVBD632BHDS5.
- Mapping[str, str]
- id String
- Identifier for the distribution. For example: EDFDVBD632BHDS5.
- Map<String>
getDistribution Result
The following output properties are available:
- Aliases List<string>
- List that contains information about CNAMEs (alternate domain names), if any, for this distribution.
- Arn string
- ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, where 123456789012 is your AWS account ID.
- DomainName string
- Domain name corresponding to the distribution. For
example: d604721fxaaqy9.cloudfront.net.
- Enabled bool
- Etag string
- Current version of the distribution's information. For example:
E2QWRUHAPOMQZL.
- HostedZone stringId 
- CloudFront Route 53 zone ID that can be used to
route an [Alias Resource Record Set][7] to. This attribute is simply an
alias for the zone ID Z2FDTNDATAQYW2.
- Id string
- Identifier for the distribution. For example: EDFDVBD632BHDS5.
- InProgress intValidation Batches 
- The number of invalidation batches currently in progress.
- LastModified stringTime 
- Date and time the distribution was last modified.
- Status string
- Current status of the distribution. Deployedif the distribution's information is fully propagated throughout the Amazon CloudFront system.
- Dictionary<string, string>
- WebAcl stringId 
- AWS WAF web ACL associated with this distribution.
- Aliases []string
- List that contains information about CNAMEs (alternate domain names), if any, for this distribution.
- Arn string
- ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, where 123456789012 is your AWS account ID.
- DomainName string
- Domain name corresponding to the distribution. For
example: d604721fxaaqy9.cloudfront.net.
- Enabled bool
- Etag string
- Current version of the distribution's information. For example:
E2QWRUHAPOMQZL.
- HostedZone stringId 
- CloudFront Route 53 zone ID that can be used to
route an [Alias Resource Record Set][7] to. This attribute is simply an
alias for the zone ID Z2FDTNDATAQYW2.
- Id string
- Identifier for the distribution. For example: EDFDVBD632BHDS5.
- InProgress intValidation Batches 
- The number of invalidation batches currently in progress.
- LastModified stringTime 
- Date and time the distribution was last modified.
- Status string
- Current status of the distribution. Deployedif the distribution's information is fully propagated throughout the Amazon CloudFront system.
- map[string]string
- WebAcl stringId 
- AWS WAF web ACL associated with this distribution.
- aliases List<String>
- List that contains information about CNAMEs (alternate domain names), if any, for this distribution.
- arn String
- ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, where 123456789012 is your AWS account ID.
- domainName String
- Domain name corresponding to the distribution. For
example: d604721fxaaqy9.cloudfront.net.
- enabled Boolean
- etag String
- Current version of the distribution's information. For example:
E2QWRUHAPOMQZL.
- hostedZone StringId 
- CloudFront Route 53 zone ID that can be used to
route an [Alias Resource Record Set][7] to. This attribute is simply an
alias for the zone ID Z2FDTNDATAQYW2.
- id String
- Identifier for the distribution. For example: EDFDVBD632BHDS5.
- inProgress IntegerValidation Batches 
- The number of invalidation batches currently in progress.
- lastModified StringTime 
- Date and time the distribution was last modified.
- status String
- Current status of the distribution. Deployedif the distribution's information is fully propagated throughout the Amazon CloudFront system.
- Map<String,String>
- webAcl StringId 
- AWS WAF web ACL associated with this distribution.
- aliases string[]
- List that contains information about CNAMEs (alternate domain names), if any, for this distribution.
- arn string
- ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, where 123456789012 is your AWS account ID.
- domainName string
- Domain name corresponding to the distribution. For
example: d604721fxaaqy9.cloudfront.net.
- enabled boolean
- etag string
- Current version of the distribution's information. For example:
E2QWRUHAPOMQZL.
- hostedZone stringId 
- CloudFront Route 53 zone ID that can be used to
route an [Alias Resource Record Set][7] to. This attribute is simply an
alias for the zone ID Z2FDTNDATAQYW2.
- id string
- Identifier for the distribution. For example: EDFDVBD632BHDS5.
- inProgress numberValidation Batches 
- The number of invalidation batches currently in progress.
- lastModified stringTime 
- Date and time the distribution was last modified.
- status string
- Current status of the distribution. Deployedif the distribution's information is fully propagated throughout the Amazon CloudFront system.
- {[key: string]: string}
- webAcl stringId 
- AWS WAF web ACL associated with this distribution.
- aliases Sequence[str]
- List that contains information about CNAMEs (alternate domain names), if any, for this distribution.
- arn str
- ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, where 123456789012 is your AWS account ID.
- domain_name str
- Domain name corresponding to the distribution. For
example: d604721fxaaqy9.cloudfront.net.
- enabled bool
- etag str
- Current version of the distribution's information. For example:
E2QWRUHAPOMQZL.
- hosted_zone_ strid 
- CloudFront Route 53 zone ID that can be used to
route an [Alias Resource Record Set][7] to. This attribute is simply an
alias for the zone ID Z2FDTNDATAQYW2.
- id str
- Identifier for the distribution. For example: EDFDVBD632BHDS5.
- in_progress_ intvalidation_ batches 
- The number of invalidation batches currently in progress.
- last_modified_ strtime 
- Date and time the distribution was last modified.
- status str
- Current status of the distribution. Deployedif the distribution's information is fully propagated throughout the Amazon CloudFront system.
- Mapping[str, str]
- web_acl_ strid 
- AWS WAF web ACL associated with this distribution.
- aliases List<String>
- List that contains information about CNAMEs (alternate domain names), if any, for this distribution.
- arn String
- ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, where 123456789012 is your AWS account ID.
- domainName String
- Domain name corresponding to the distribution. For
example: d604721fxaaqy9.cloudfront.net.
- enabled Boolean
- etag String
- Current version of the distribution's information. For example:
E2QWRUHAPOMQZL.
- hostedZone StringId 
- CloudFront Route 53 zone ID that can be used to
route an [Alias Resource Record Set][7] to. This attribute is simply an
alias for the zone ID Z2FDTNDATAQYW2.
- id String
- Identifier for the distribution. For example: EDFDVBD632BHDS5.
- inProgress NumberValidation Batches 
- The number of invalidation batches currently in progress.
- lastModified StringTime 
- Date and time the distribution was last modified.
- status String
- Current status of the distribution. Deployedif the distribution's information is fully propagated throughout the Amazon CloudFront system.
- Map<String>
- webAcl StringId 
- AWS WAF web ACL associated with this distribution.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.