AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.9.2 published on Friday, Jun 24, 2022 by Pulumi

getDistribution

Use this data source to retrieve information about a CloudFront distribution.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var test = Output.Create(Aws.CloudFront.GetDistribution.InvokeAsync(new Aws.CloudFront.GetDistributionArgs
        {
            Id = "EDFDVBD632BHDS5",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/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
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var test = Output.of(CloudfrontFunctions.getDistribution(GetDistributionArgs.builder()
            .id("EDFDVBD632BHDS5")
            .build()));

    }
}
import pulumi
import pulumi_aws as aws

test = aws.cloudfront.get_distribution(id="EDFDVBD632BHDS5")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const test = pulumi.output(aws.cloudfront.getDistribution({
    id: "EDFDVBD632BHDS5",
}));
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)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: aws:cloudfront/getDistribution:getDistribution
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Id string

The identifier for the distribution. For example: EDFDVBD632BHDS5.

Tags Dictionary<string, string>
Id string

The identifier for the distribution. For example: EDFDVBD632BHDS5.

Tags map[string]string
id String

The identifier for the distribution. For example: EDFDVBD632BHDS5.

tags Map<String,String>
id string

The identifier for the distribution. For example: EDFDVBD632BHDS5.

tags {[key: string]: string}
id str

The identifier for the distribution. For example: EDFDVBD632BHDS5.

tags Mapping[str, str]
id String

The identifier for the distribution. For example: EDFDVBD632BHDS5.

tags Map<String>

getDistribution Result

The following output properties are available:

Aliases List<string>

A list that contains information about CNAMEs (alternate domain names), if any, for this distribution.

Arn string

The ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, where 123456789012 is your AWS account ID.

DomainName string

The domain name corresponding to the distribution. For example: d604721fxaaqy9.cloudfront.net.

Enabled bool
Etag string

The current version of the distribution's information. For example: E2QWRUHAPOMQZL.

HostedZoneId string

The 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

The identifier for the distribution. For example: EDFDVBD632BHDS5.

InProgressValidationBatches int

The number of invalidation batches currently in progress.

LastModifiedTime string

The date and time the distribution was last modified.

Status string

The current status of the distribution. Deployed if the distribution's information is fully propagated throughout the Amazon CloudFront system.

Tags Dictionary<string, string>
Aliases []string

A list that contains information about CNAMEs (alternate domain names), if any, for this distribution.

Arn string

The ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, where 123456789012 is your AWS account ID.

DomainName string

The domain name corresponding to the distribution. For example: d604721fxaaqy9.cloudfront.net.

Enabled bool
Etag string

The current version of the distribution's information. For example: E2QWRUHAPOMQZL.

HostedZoneId string

The 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

The identifier for the distribution. For example: EDFDVBD632BHDS5.

InProgressValidationBatches int

The number of invalidation batches currently in progress.

LastModifiedTime string

The date and time the distribution was last modified.

Status string

The current status of the distribution. Deployed if the distribution's information is fully propagated throughout the Amazon CloudFront system.

Tags map[string]string
aliases List<String>

A list that contains information about CNAMEs (alternate domain names), if any, for this distribution.

arn String

The ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, where 123456789012 is your AWS account ID.

domainName String

The domain name corresponding to the distribution. For example: d604721fxaaqy9.cloudfront.net.

enabled Boolean
etag String

The current version of the distribution's information. For example: E2QWRUHAPOMQZL.

hostedZoneId String

The 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

The identifier for the distribution. For example: EDFDVBD632BHDS5.

inProgressValidationBatches Integer

The number of invalidation batches currently in progress.

lastModifiedTime String

The date and time the distribution was last modified.

status String

The current status of the distribution. Deployed if the distribution's information is fully propagated throughout the Amazon CloudFront system.

tags Map<String,String>
aliases string[]

A list that contains information about CNAMEs (alternate domain names), if any, for this distribution.

arn string

The ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, where 123456789012 is your AWS account ID.

domainName string

The domain name corresponding to the distribution. For example: d604721fxaaqy9.cloudfront.net.

enabled boolean
etag string

The current version of the distribution's information. For example: E2QWRUHAPOMQZL.

hostedZoneId string

The 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

The identifier for the distribution. For example: EDFDVBD632BHDS5.

inProgressValidationBatches number

The number of invalidation batches currently in progress.

lastModifiedTime string

The date and time the distribution was last modified.

status string

The current status of the distribution. Deployed if the distribution's information is fully propagated throughout the Amazon CloudFront system.

tags {[key: string]: string}
aliases Sequence[str]

A list that contains information about CNAMEs (alternate domain names), if any, for this distribution.

arn str

The 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

The domain name corresponding to the distribution. For example: d604721fxaaqy9.cloudfront.net.

enabled bool
etag str

The current version of the distribution's information. For example: E2QWRUHAPOMQZL.

hosted_zone_id str

The 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

The identifier for the distribution. For example: EDFDVBD632BHDS5.

in_progress_validation_batches int

The number of invalidation batches currently in progress.

last_modified_time str

The date and time the distribution was last modified.

status str

The current status of the distribution. Deployed if the distribution's information is fully propagated throughout the Amazon CloudFront system.

tags Mapping[str, str]
aliases List<String>

A list that contains information about CNAMEs (alternate domain names), if any, for this distribution.

arn String

The ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, where 123456789012 is your AWS account ID.

domainName String

The domain name corresponding to the distribution. For example: d604721fxaaqy9.cloudfront.net.

enabled Boolean
etag String

The current version of the distribution's information. For example: E2QWRUHAPOMQZL.

hostedZoneId String

The 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

The identifier for the distribution. For example: EDFDVBD632BHDS5.

inProgressValidationBatches Number

The number of invalidation batches currently in progress.

lastModifiedTime String

The date and time the distribution was last modified.

status String

The current status of the distribution. Deployed if the distribution's information is fully propagated throughout the Amazon CloudFront system.

tags Map<String>

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.