1. Packages
  2. AWS
  3. API Docs
  4. lightsail
  5. Distribution
AWS v6.83.0 published on Monday, Jun 16, 2025 by Pulumi

aws.lightsail.Distribution

Explore with Pulumi AI

aws logo
AWS v6.83.0 published on Monday, Jun 16, 2025 by Pulumi

    Manages a Lightsail content delivery network (CDN) distribution. Use this resource to cache content at edge locations and reduce latency for users accessing your content.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.lightsail.Bucket("example", {
        name: "example-bucket",
        bundleId: "small_1_0",
    });
    const exampleDistribution = new aws.lightsail.Distribution("example", {
        name: "example-distribution",
        bundleId: "small_1_0",
        origin: {
            name: example.name,
            regionName: example.region,
        },
        defaultCacheBehavior: {
            behavior: "cache",
        },
        cacheBehaviorSettings: {
            allowedHttpMethods: "GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE",
            cachedHttpMethods: "GET,HEAD",
            defaultTtl: 86400,
            maximumTtl: 31536000,
            minimumTtl: 0,
            forwardedCookies: {
                option: "none",
            },
            forwardedHeaders: {
                option: "default",
            },
            forwardedQueryStrings: {
                option: false,
            },
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.lightsail.Bucket("example",
        name="example-bucket",
        bundle_id="small_1_0")
    example_distribution = aws.lightsail.Distribution("example",
        name="example-distribution",
        bundle_id="small_1_0",
        origin={
            "name": example.name,
            "region_name": example.region,
        },
        default_cache_behavior={
            "behavior": "cache",
        },
        cache_behavior_settings={
            "allowed_http_methods": "GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE",
            "cached_http_methods": "GET,HEAD",
            "default_ttl": 86400,
            "maximum_ttl": 31536000,
            "minimum_ttl": 0,
            "forwarded_cookies": {
                "option": "none",
            },
            "forwarded_headers": {
                "option": "default",
            },
            "forwarded_query_strings": {
                "option": False,
            },
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lightsail"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := lightsail.NewBucket(ctx, "example", &lightsail.BucketArgs{
    			Name:     pulumi.String("example-bucket"),
    			BundleId: pulumi.String("small_1_0"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = lightsail.NewDistribution(ctx, "example", &lightsail.DistributionArgs{
    			Name:     pulumi.String("example-distribution"),
    			BundleId: pulumi.String("small_1_0"),
    			Origin: &lightsail.DistributionOriginArgs{
    				Name:       example.Name,
    				RegionName: example.Region,
    			},
    			DefaultCacheBehavior: &lightsail.DistributionDefaultCacheBehaviorArgs{
    				Behavior: pulumi.String("cache"),
    			},
    			CacheBehaviorSettings: &lightsail.DistributionCacheBehaviorSettingsArgs{
    				AllowedHttpMethods: pulumi.String("GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE"),
    				CachedHttpMethods:  pulumi.String("GET,HEAD"),
    				DefaultTtl:         pulumi.Int(86400),
    				MaximumTtl:         pulumi.Int(31536000),
    				MinimumTtl:         pulumi.Int(0),
    				ForwardedCookies: &lightsail.DistributionCacheBehaviorSettingsForwardedCookiesArgs{
    					Option: pulumi.String("none"),
    				},
    				ForwardedHeaders: &lightsail.DistributionCacheBehaviorSettingsForwardedHeadersArgs{
    					Option: pulumi.String("default"),
    				},
    				ForwardedQueryStrings: &lightsail.DistributionCacheBehaviorSettingsForwardedQueryStringsArgs{
    					Option: pulumi.Bool(false),
    				},
    			},
    		})
    		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 example = new Aws.LightSail.Bucket("example", new()
        {
            Name = "example-bucket",
            BundleId = "small_1_0",
        });
    
        var exampleDistribution = new Aws.LightSail.Distribution("example", new()
        {
            Name = "example-distribution",
            BundleId = "small_1_0",
            Origin = new Aws.LightSail.Inputs.DistributionOriginArgs
            {
                Name = example.Name,
                RegionName = example.Region,
            },
            DefaultCacheBehavior = new Aws.LightSail.Inputs.DistributionDefaultCacheBehaviorArgs
            {
                Behavior = "cache",
            },
            CacheBehaviorSettings = new Aws.LightSail.Inputs.DistributionCacheBehaviorSettingsArgs
            {
                AllowedHttpMethods = "GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE",
                CachedHttpMethods = "GET,HEAD",
                DefaultTtl = 86400,
                MaximumTtl = 31536000,
                MinimumTtl = 0,
                ForwardedCookies = new Aws.LightSail.Inputs.DistributionCacheBehaviorSettingsForwardedCookiesArgs
                {
                    Option = "none",
                },
                ForwardedHeaders = new Aws.LightSail.Inputs.DistributionCacheBehaviorSettingsForwardedHeadersArgs
                {
                    Option = "default",
                },
                ForwardedQueryStrings = new Aws.LightSail.Inputs.DistributionCacheBehaviorSettingsForwardedQueryStringsArgs
                {
                    Option = false,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.lightsail.Bucket;
    import com.pulumi.aws.lightsail.BucketArgs;
    import com.pulumi.aws.lightsail.Distribution;
    import com.pulumi.aws.lightsail.DistributionArgs;
    import com.pulumi.aws.lightsail.inputs.DistributionOriginArgs;
    import com.pulumi.aws.lightsail.inputs.DistributionDefaultCacheBehaviorArgs;
    import com.pulumi.aws.lightsail.inputs.DistributionCacheBehaviorSettingsArgs;
    import com.pulumi.aws.lightsail.inputs.DistributionCacheBehaviorSettingsForwardedCookiesArgs;
    import com.pulumi.aws.lightsail.inputs.DistributionCacheBehaviorSettingsForwardedHeadersArgs;
    import com.pulumi.aws.lightsail.inputs.DistributionCacheBehaviorSettingsForwardedQueryStringsArgs;
    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) {
            var example = new Bucket("example", BucketArgs.builder()
                .name("example-bucket")
                .bundleId("small_1_0")
                .build());
    
            var exampleDistribution = new Distribution("exampleDistribution", DistributionArgs.builder()
                .name("example-distribution")
                .bundleId("small_1_0")
                .origin(DistributionOriginArgs.builder()
                    .name(example.name())
                    .regionName(example.region())
                    .build())
                .defaultCacheBehavior(DistributionDefaultCacheBehaviorArgs.builder()
                    .behavior("cache")
                    .build())
                .cacheBehaviorSettings(DistributionCacheBehaviorSettingsArgs.builder()
                    .allowedHttpMethods("GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE")
                    .cachedHttpMethods("GET,HEAD")
                    .defaultTtl(86400)
                    .maximumTtl(31536000)
                    .minimumTtl(0)
                    .forwardedCookies(DistributionCacheBehaviorSettingsForwardedCookiesArgs.builder()
                        .option("none")
                        .build())
                    .forwardedHeaders(DistributionCacheBehaviorSettingsForwardedHeadersArgs.builder()
                        .option("default")
                        .build())
                    .forwardedQueryStrings(DistributionCacheBehaviorSettingsForwardedQueryStringsArgs.builder()
                        .option(false)
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:lightsail:Bucket
        properties:
          name: example-bucket
          bundleId: small_1_0
      exampleDistribution:
        type: aws:lightsail:Distribution
        name: example
        properties:
          name: example-distribution
          bundleId: small_1_0
          origin:
            name: ${example.name}
            regionName: ${example.region}
          defaultCacheBehavior:
            behavior: cache
          cacheBehaviorSettings:
            allowedHttpMethods: GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE
            cachedHttpMethods: GET,HEAD
            defaultTtl: 86400
            maximumTtl: 3.1536e+07
            minimumTtl: 0
            forwardedCookies:
              option: none
            forwardedHeaders:
              option: default
            forwardedQueryStrings:
              option: false
    

    Instance Origin

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const available = aws.getAvailabilityZones({
        state: "available",
        filters: [{
            name: "opt-in-status",
            values: ["opt-in-not-required"],
        }],
    });
    const exampleStaticIp = new aws.lightsail.StaticIp("example", {name: "example-static-ip"});
    const exampleInstance = new aws.lightsail.Instance("example", {
        name: "example-instance",
        availabilityZone: available.then(available => available.names?.[0]),
        blueprintId: "amazon_linux_2",
        bundleId: "micro_1_0",
    });
    const example = new aws.lightsail.StaticIpAttachment("example", {
        staticIpName: exampleStaticIp.name,
        instanceName: exampleInstance.name,
    });
    const exampleDistribution = new aws.lightsail.Distribution("example", {
        name: "example-distribution",
        bundleId: "small_1_0",
        origin: {
            name: exampleInstance.name,
            regionName: available.then(available => available.id),
        },
        defaultCacheBehavior: {
            behavior: "cache",
        },
    }, {
        dependsOn: [example],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    available = aws.get_availability_zones(state="available",
        filters=[{
            "name": "opt-in-status",
            "values": ["opt-in-not-required"],
        }])
    example_static_ip = aws.lightsail.StaticIp("example", name="example-static-ip")
    example_instance = aws.lightsail.Instance("example",
        name="example-instance",
        availability_zone=available.names[0],
        blueprint_id="amazon_linux_2",
        bundle_id="micro_1_0")
    example = aws.lightsail.StaticIpAttachment("example",
        static_ip_name=example_static_ip.name,
        instance_name=example_instance.name)
    example_distribution = aws.lightsail.Distribution("example",
        name="example-distribution",
        bundle_id="small_1_0",
        origin={
            "name": example_instance.name,
            "region_name": available.id,
        },
        default_cache_behavior={
            "behavior": "cache",
        },
        opts = pulumi.ResourceOptions(depends_on=[example]))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lightsail"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		available, err := aws.GetAvailabilityZones(ctx, &aws.GetAvailabilityZonesArgs{
    			State: pulumi.StringRef("available"),
    			Filters: []aws.GetAvailabilityZonesFilter{
    				{
    					Name: "opt-in-status",
    					Values: []string{
    						"opt-in-not-required",
    					},
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		exampleStaticIp, err := lightsail.NewStaticIp(ctx, "example", &lightsail.StaticIpArgs{
    			Name: pulumi.String("example-static-ip"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleInstance, err := lightsail.NewInstance(ctx, "example", &lightsail.InstanceArgs{
    			Name:             pulumi.String("example-instance"),
    			AvailabilityZone: pulumi.String(available.Names[0]),
    			BlueprintId:      pulumi.String("amazon_linux_2"),
    			BundleId:         pulumi.String("micro_1_0"),
    		})
    		if err != nil {
    			return err
    		}
    		example, err := lightsail.NewStaticIpAttachment(ctx, "example", &lightsail.StaticIpAttachmentArgs{
    			StaticIpName: exampleStaticIp.Name,
    			InstanceName: exampleInstance.Name,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = lightsail.NewDistribution(ctx, "example", &lightsail.DistributionArgs{
    			Name:     pulumi.String("example-distribution"),
    			BundleId: pulumi.String("small_1_0"),
    			Origin: &lightsail.DistributionOriginArgs{
    				Name:       exampleInstance.Name,
    				RegionName: pulumi.String(available.Id),
    			},
    			DefaultCacheBehavior: &lightsail.DistributionDefaultCacheBehaviorArgs{
    				Behavior: pulumi.String("cache"),
    			},
    		}, pulumi.DependsOn([]pulumi.Resource{
    			example,
    		}))
    		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 available = Aws.GetAvailabilityZones.Invoke(new()
        {
            State = "available",
            Filters = new[]
            {
                new Aws.Inputs.GetAvailabilityZonesFilterInputArgs
                {
                    Name = "opt-in-status",
                    Values = new[]
                    {
                        "opt-in-not-required",
                    },
                },
            },
        });
    
        var exampleStaticIp = new Aws.LightSail.StaticIp("example", new()
        {
            Name = "example-static-ip",
        });
    
        var exampleInstance = new Aws.LightSail.Instance("example", new()
        {
            Name = "example-instance",
            AvailabilityZone = available.Apply(getAvailabilityZonesResult => getAvailabilityZonesResult.Names[0]),
            BlueprintId = "amazon_linux_2",
            BundleId = "micro_1_0",
        });
    
        var example = new Aws.LightSail.StaticIpAttachment("example", new()
        {
            StaticIpName = exampleStaticIp.Name,
            InstanceName = exampleInstance.Name,
        });
    
        var exampleDistribution = new Aws.LightSail.Distribution("example", new()
        {
            Name = "example-distribution",
            BundleId = "small_1_0",
            Origin = new Aws.LightSail.Inputs.DistributionOriginArgs
            {
                Name = exampleInstance.Name,
                RegionName = available.Apply(getAvailabilityZonesResult => getAvailabilityZonesResult.Id),
            },
            DefaultCacheBehavior = new Aws.LightSail.Inputs.DistributionDefaultCacheBehaviorArgs
            {
                Behavior = "cache",
            },
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                example,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.AwsFunctions;
    import com.pulumi.aws.inputs.GetAvailabilityZonesArgs;
    import com.pulumi.aws.lightsail.StaticIp;
    import com.pulumi.aws.lightsail.StaticIpArgs;
    import com.pulumi.aws.lightsail.Instance;
    import com.pulumi.aws.lightsail.InstanceArgs;
    import com.pulumi.aws.lightsail.StaticIpAttachment;
    import com.pulumi.aws.lightsail.StaticIpAttachmentArgs;
    import com.pulumi.aws.lightsail.Distribution;
    import com.pulumi.aws.lightsail.DistributionArgs;
    import com.pulumi.aws.lightsail.inputs.DistributionOriginArgs;
    import com.pulumi.aws.lightsail.inputs.DistributionDefaultCacheBehaviorArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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 available = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()
                .state("available")
                .filters(GetAvailabilityZonesFilterArgs.builder()
                    .name("opt-in-status")
                    .values("opt-in-not-required")
                    .build())
                .build());
    
            var exampleStaticIp = new StaticIp("exampleStaticIp", StaticIpArgs.builder()
                .name("example-static-ip")
                .build());
    
            var exampleInstance = new Instance("exampleInstance", InstanceArgs.builder()
                .name("example-instance")
                .availabilityZone(available.names()[0])
                .blueprintId("amazon_linux_2")
                .bundleId("micro_1_0")
                .build());
    
            var example = new StaticIpAttachment("example", StaticIpAttachmentArgs.builder()
                .staticIpName(exampleStaticIp.name())
                .instanceName(exampleInstance.name())
                .build());
    
            var exampleDistribution = new Distribution("exampleDistribution", DistributionArgs.builder()
                .name("example-distribution")
                .bundleId("small_1_0")
                .origin(DistributionOriginArgs.builder()
                    .name(exampleInstance.name())
                    .regionName(available.id())
                    .build())
                .defaultCacheBehavior(DistributionDefaultCacheBehaviorArgs.builder()
                    .behavior("cache")
                    .build())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(example)
                    .build());
    
        }
    }
    
    resources:
      example:
        type: aws:lightsail:StaticIpAttachment
        properties:
          staticIpName: ${exampleStaticIp.name}
          instanceName: ${exampleInstance.name}
      exampleStaticIp:
        type: aws:lightsail:StaticIp
        name: example
        properties:
          name: example-static-ip
      exampleInstance:
        type: aws:lightsail:Instance
        name: example
        properties:
          name: example-instance
          availabilityZone: ${available.names[0]}
          blueprintId: amazon_linux_2
          bundleId: micro_1_0
      exampleDistribution:
        type: aws:lightsail:Distribution
        name: example
        properties:
          name: example-distribution
          bundleId: small_1_0
          origin:
            name: ${exampleInstance.name}
            regionName: ${available.id}
          defaultCacheBehavior:
            behavior: cache
        options:
          dependsOn:
            - ${example}
    variables:
      available:
        fn::invoke:
          function: aws:getAvailabilityZones
          arguments:
            state: available
            filters:
              - name: opt-in-status
                values:
                  - opt-in-not-required
    

    Load Balancer Origin

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const available = aws.getAvailabilityZones({
        state: "available",
        filters: [{
            name: "opt-in-status",
            values: ["opt-in-not-required"],
        }],
    });
    const example = new aws.lightsail.Lb("example", {
        name: "example-load-balancer",
        healthCheckPath: "/",
        instancePort: 80,
        tags: {
            foo: "bar",
        },
    });
    const exampleInstance = new aws.lightsail.Instance("example", {
        name: "example-instance",
        availabilityZone: available.then(available => available.names?.[0]),
        blueprintId: "amazon_linux_2",
        bundleId: "nano_3_0",
    });
    const exampleLbAttachment = new aws.lightsail.LbAttachment("example", {
        lbName: example.name,
        instanceName: exampleInstance.name,
    });
    const exampleDistribution = new aws.lightsail.Distribution("example", {
        name: "example-distribution",
        bundleId: "small_1_0",
        origin: {
            name: example.name,
            regionName: available.then(available => available.id),
        },
        defaultCacheBehavior: {
            behavior: "cache",
        },
    }, {
        dependsOn: [exampleLbAttachment],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    available = aws.get_availability_zones(state="available",
        filters=[{
            "name": "opt-in-status",
            "values": ["opt-in-not-required"],
        }])
    example = aws.lightsail.Lb("example",
        name="example-load-balancer",
        health_check_path="/",
        instance_port=80,
        tags={
            "foo": "bar",
        })
    example_instance = aws.lightsail.Instance("example",
        name="example-instance",
        availability_zone=available.names[0],
        blueprint_id="amazon_linux_2",
        bundle_id="nano_3_0")
    example_lb_attachment = aws.lightsail.LbAttachment("example",
        lb_name=example.name,
        instance_name=example_instance.name)
    example_distribution = aws.lightsail.Distribution("example",
        name="example-distribution",
        bundle_id="small_1_0",
        origin={
            "name": example.name,
            "region_name": available.id,
        },
        default_cache_behavior={
            "behavior": "cache",
        },
        opts = pulumi.ResourceOptions(depends_on=[example_lb_attachment]))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lightsail"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		available, err := aws.GetAvailabilityZones(ctx, &aws.GetAvailabilityZonesArgs{
    			State: pulumi.StringRef("available"),
    			Filters: []aws.GetAvailabilityZonesFilter{
    				{
    					Name: "opt-in-status",
    					Values: []string{
    						"opt-in-not-required",
    					},
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		example, err := lightsail.NewLb(ctx, "example", &lightsail.LbArgs{
    			Name:            pulumi.String("example-load-balancer"),
    			HealthCheckPath: pulumi.String("/"),
    			InstancePort:    pulumi.Int(80),
    			Tags: pulumi.StringMap{
    				"foo": pulumi.String("bar"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleInstance, err := lightsail.NewInstance(ctx, "example", &lightsail.InstanceArgs{
    			Name:             pulumi.String("example-instance"),
    			AvailabilityZone: pulumi.String(available.Names[0]),
    			BlueprintId:      pulumi.String("amazon_linux_2"),
    			BundleId:         pulumi.String("nano_3_0"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleLbAttachment, err := lightsail.NewLbAttachment(ctx, "example", &lightsail.LbAttachmentArgs{
    			LbName:       example.Name,
    			InstanceName: exampleInstance.Name,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = lightsail.NewDistribution(ctx, "example", &lightsail.DistributionArgs{
    			Name:     pulumi.String("example-distribution"),
    			BundleId: pulumi.String("small_1_0"),
    			Origin: &lightsail.DistributionOriginArgs{
    				Name:       example.Name,
    				RegionName: pulumi.String(available.Id),
    			},
    			DefaultCacheBehavior: &lightsail.DistributionDefaultCacheBehaviorArgs{
    				Behavior: pulumi.String("cache"),
    			},
    		}, pulumi.DependsOn([]pulumi.Resource{
    			exampleLbAttachment,
    		}))
    		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 available = Aws.GetAvailabilityZones.Invoke(new()
        {
            State = "available",
            Filters = new[]
            {
                new Aws.Inputs.GetAvailabilityZonesFilterInputArgs
                {
                    Name = "opt-in-status",
                    Values = new[]
                    {
                        "opt-in-not-required",
                    },
                },
            },
        });
    
        var example = new Aws.LightSail.Lb("example", new()
        {
            Name = "example-load-balancer",
            HealthCheckPath = "/",
            InstancePort = 80,
            Tags = 
            {
                { "foo", "bar" },
            },
        });
    
        var exampleInstance = new Aws.LightSail.Instance("example", new()
        {
            Name = "example-instance",
            AvailabilityZone = available.Apply(getAvailabilityZonesResult => getAvailabilityZonesResult.Names[0]),
            BlueprintId = "amazon_linux_2",
            BundleId = "nano_3_0",
        });
    
        var exampleLbAttachment = new Aws.LightSail.LbAttachment("example", new()
        {
            LbName = example.Name,
            InstanceName = exampleInstance.Name,
        });
    
        var exampleDistribution = new Aws.LightSail.Distribution("example", new()
        {
            Name = "example-distribution",
            BundleId = "small_1_0",
            Origin = new Aws.LightSail.Inputs.DistributionOriginArgs
            {
                Name = example.Name,
                RegionName = available.Apply(getAvailabilityZonesResult => getAvailabilityZonesResult.Id),
            },
            DefaultCacheBehavior = new Aws.LightSail.Inputs.DistributionDefaultCacheBehaviorArgs
            {
                Behavior = "cache",
            },
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                exampleLbAttachment,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.AwsFunctions;
    import com.pulumi.aws.inputs.GetAvailabilityZonesArgs;
    import com.pulumi.aws.lightsail.Lb;
    import com.pulumi.aws.lightsail.LbArgs;
    import com.pulumi.aws.lightsail.Instance;
    import com.pulumi.aws.lightsail.InstanceArgs;
    import com.pulumi.aws.lightsail.LbAttachment;
    import com.pulumi.aws.lightsail.LbAttachmentArgs;
    import com.pulumi.aws.lightsail.Distribution;
    import com.pulumi.aws.lightsail.DistributionArgs;
    import com.pulumi.aws.lightsail.inputs.DistributionOriginArgs;
    import com.pulumi.aws.lightsail.inputs.DistributionDefaultCacheBehaviorArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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 available = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()
                .state("available")
                .filters(GetAvailabilityZonesFilterArgs.builder()
                    .name("opt-in-status")
                    .values("opt-in-not-required")
                    .build())
                .build());
    
            var example = new Lb("example", LbArgs.builder()
                .name("example-load-balancer")
                .healthCheckPath("/")
                .instancePort(80)
                .tags(Map.of("foo", "bar"))
                .build());
    
            var exampleInstance = new Instance("exampleInstance", InstanceArgs.builder()
                .name("example-instance")
                .availabilityZone(available.names()[0])
                .blueprintId("amazon_linux_2")
                .bundleId("nano_3_0")
                .build());
    
            var exampleLbAttachment = new LbAttachment("exampleLbAttachment", LbAttachmentArgs.builder()
                .lbName(example.name())
                .instanceName(exampleInstance.name())
                .build());
    
            var exampleDistribution = new Distribution("exampleDistribution", DistributionArgs.builder()
                .name("example-distribution")
                .bundleId("small_1_0")
                .origin(DistributionOriginArgs.builder()
                    .name(example.name())
                    .regionName(available.id())
                    .build())
                .defaultCacheBehavior(DistributionDefaultCacheBehaviorArgs.builder()
                    .behavior("cache")
                    .build())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(exampleLbAttachment)
                    .build());
    
        }
    }
    
    resources:
      example:
        type: aws:lightsail:Lb
        properties:
          name: example-load-balancer
          healthCheckPath: /
          instancePort: '80'
          tags:
            foo: bar
      exampleInstance:
        type: aws:lightsail:Instance
        name: example
        properties:
          name: example-instance
          availabilityZone: ${available.names[0]}
          blueprintId: amazon_linux_2
          bundleId: nano_3_0
      exampleLbAttachment:
        type: aws:lightsail:LbAttachment
        name: example
        properties:
          lbName: ${example.name}
          instanceName: ${exampleInstance.name}
      exampleDistribution:
        type: aws:lightsail:Distribution
        name: example
        properties:
          name: example-distribution
          bundleId: small_1_0
          origin:
            name: ${example.name}
            regionName: ${available.id}
          defaultCacheBehavior:
            behavior: cache
        options:
          dependsOn:
            - ${exampleLbAttachment}
    variables:
      available:
        fn::invoke:
          function: aws:getAvailabilityZones
          arguments:
            state: available
            filters:
              - name: opt-in-status
                values:
                  - opt-in-not-required
    

    Create Distribution Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Distribution(name: string, args: DistributionArgs, opts?: CustomResourceOptions);
    @overload
    def Distribution(resource_name: str,
                     args: DistributionArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def Distribution(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     bundle_id: Optional[str] = None,
                     default_cache_behavior: Optional[DistributionDefaultCacheBehaviorArgs] = None,
                     origin: Optional[DistributionOriginArgs] = None,
                     cache_behavior_settings: Optional[DistributionCacheBehaviorSettingsArgs] = None,
                     cache_behaviors: Optional[Sequence[DistributionCacheBehaviorArgs]] = None,
                     certificate_name: Optional[str] = None,
                     ip_address_type: Optional[str] = None,
                     is_enabled: Optional[bool] = None,
                     name: Optional[str] = None,
                     tags: Optional[Mapping[str, str]] = None)
    func NewDistribution(ctx *Context, name string, args DistributionArgs, opts ...ResourceOption) (*Distribution, error)
    public Distribution(string name, DistributionArgs args, CustomResourceOptions? opts = null)
    public Distribution(String name, DistributionArgs args)
    public Distribution(String name, DistributionArgs args, CustomResourceOptions options)
    
    type: aws:lightsail:Distribution
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DistributionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args DistributionArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args DistributionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DistributionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DistributionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var awsDistributionResource = new Aws.LightSail.Distribution("awsDistributionResource", new()
    {
        BundleId = "string",
        DefaultCacheBehavior = new Aws.LightSail.Inputs.DistributionDefaultCacheBehaviorArgs
        {
            Behavior = "string",
        },
        Origin = new Aws.LightSail.Inputs.DistributionOriginArgs
        {
            Name = "string",
            RegionName = "string",
            ProtocolPolicy = "string",
            ResourceType = "string",
        },
        CacheBehaviorSettings = new Aws.LightSail.Inputs.DistributionCacheBehaviorSettingsArgs
        {
            AllowedHttpMethods = "string",
            CachedHttpMethods = "string",
            DefaultTtl = 0,
            ForwardedCookies = new Aws.LightSail.Inputs.DistributionCacheBehaviorSettingsForwardedCookiesArgs
            {
                CookiesAllowLists = new[]
                {
                    "string",
                },
                Option = "string",
            },
            ForwardedHeaders = new Aws.LightSail.Inputs.DistributionCacheBehaviorSettingsForwardedHeadersArgs
            {
                HeadersAllowLists = new[]
                {
                    "string",
                },
                Option = "string",
            },
            ForwardedQueryStrings = new Aws.LightSail.Inputs.DistributionCacheBehaviorSettingsForwardedQueryStringsArgs
            {
                Option = false,
                QueryStringsAllowedLists = new[]
                {
                    "string",
                },
            },
            MaximumTtl = 0,
            MinimumTtl = 0,
        },
        CacheBehaviors = new[]
        {
            new Aws.LightSail.Inputs.DistributionCacheBehaviorArgs
            {
                Behavior = "string",
                Path = "string",
            },
        },
        CertificateName = "string",
        IpAddressType = "string",
        IsEnabled = false,
        Name = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := lightsail.NewDistribution(ctx, "awsDistributionResource", &lightsail.DistributionArgs{
    	BundleId: pulumi.String("string"),
    	DefaultCacheBehavior: &lightsail.DistributionDefaultCacheBehaviorArgs{
    		Behavior: pulumi.String("string"),
    	},
    	Origin: &lightsail.DistributionOriginArgs{
    		Name:           pulumi.String("string"),
    		RegionName:     pulumi.String("string"),
    		ProtocolPolicy: pulumi.String("string"),
    		ResourceType:   pulumi.String("string"),
    	},
    	CacheBehaviorSettings: &lightsail.DistributionCacheBehaviorSettingsArgs{
    		AllowedHttpMethods: pulumi.String("string"),
    		CachedHttpMethods:  pulumi.String("string"),
    		DefaultTtl:         pulumi.Int(0),
    		ForwardedCookies: &lightsail.DistributionCacheBehaviorSettingsForwardedCookiesArgs{
    			CookiesAllowLists: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Option: pulumi.String("string"),
    		},
    		ForwardedHeaders: &lightsail.DistributionCacheBehaviorSettingsForwardedHeadersArgs{
    			HeadersAllowLists: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Option: pulumi.String("string"),
    		},
    		ForwardedQueryStrings: &lightsail.DistributionCacheBehaviorSettingsForwardedQueryStringsArgs{
    			Option: pulumi.Bool(false),
    			QueryStringsAllowedLists: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    		MaximumTtl: pulumi.Int(0),
    		MinimumTtl: pulumi.Int(0),
    	},
    	CacheBehaviors: lightsail.DistributionCacheBehaviorArray{
    		&lightsail.DistributionCacheBehaviorArgs{
    			Behavior: pulumi.String("string"),
    			Path:     pulumi.String("string"),
    		},
    	},
    	CertificateName: pulumi.String("string"),
    	IpAddressType:   pulumi.String("string"),
    	IsEnabled:       pulumi.Bool(false),
    	Name:            pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var awsDistributionResource = new com.pulumi.aws.lightsail.Distribution("awsDistributionResource", com.pulumi.aws.lightsail.DistributionArgs.builder()
        .bundleId("string")
        .defaultCacheBehavior(DistributionDefaultCacheBehaviorArgs.builder()
            .behavior("string")
            .build())
        .origin(DistributionOriginArgs.builder()
            .name("string")
            .regionName("string")
            .protocolPolicy("string")
            .resourceType("string")
            .build())
        .cacheBehaviorSettings(DistributionCacheBehaviorSettingsArgs.builder()
            .allowedHttpMethods("string")
            .cachedHttpMethods("string")
            .defaultTtl(0)
            .forwardedCookies(DistributionCacheBehaviorSettingsForwardedCookiesArgs.builder()
                .cookiesAllowLists("string")
                .option("string")
                .build())
            .forwardedHeaders(DistributionCacheBehaviorSettingsForwardedHeadersArgs.builder()
                .headersAllowLists("string")
                .option("string")
                .build())
            .forwardedQueryStrings(DistributionCacheBehaviorSettingsForwardedQueryStringsArgs.builder()
                .option(false)
                .queryStringsAllowedLists("string")
                .build())
            .maximumTtl(0)
            .minimumTtl(0)
            .build())
        .cacheBehaviors(DistributionCacheBehaviorArgs.builder()
            .behavior("string")
            .path("string")
            .build())
        .certificateName("string")
        .ipAddressType("string")
        .isEnabled(false)
        .name("string")
        .tags(Map.of("string", "string"))
        .build());
    
    aws_distribution_resource = aws.lightsail.Distribution("awsDistributionResource",
        bundle_id="string",
        default_cache_behavior={
            "behavior": "string",
        },
        origin={
            "name": "string",
            "region_name": "string",
            "protocol_policy": "string",
            "resource_type": "string",
        },
        cache_behavior_settings={
            "allowed_http_methods": "string",
            "cached_http_methods": "string",
            "default_ttl": 0,
            "forwarded_cookies": {
                "cookies_allow_lists": ["string"],
                "option": "string",
            },
            "forwarded_headers": {
                "headers_allow_lists": ["string"],
                "option": "string",
            },
            "forwarded_query_strings": {
                "option": False,
                "query_strings_allowed_lists": ["string"],
            },
            "maximum_ttl": 0,
            "minimum_ttl": 0,
        },
        cache_behaviors=[{
            "behavior": "string",
            "path": "string",
        }],
        certificate_name="string",
        ip_address_type="string",
        is_enabled=False,
        name="string",
        tags={
            "string": "string",
        })
    
    const awsDistributionResource = new aws.lightsail.Distribution("awsDistributionResource", {
        bundleId: "string",
        defaultCacheBehavior: {
            behavior: "string",
        },
        origin: {
            name: "string",
            regionName: "string",
            protocolPolicy: "string",
            resourceType: "string",
        },
        cacheBehaviorSettings: {
            allowedHttpMethods: "string",
            cachedHttpMethods: "string",
            defaultTtl: 0,
            forwardedCookies: {
                cookiesAllowLists: ["string"],
                option: "string",
            },
            forwardedHeaders: {
                headersAllowLists: ["string"],
                option: "string",
            },
            forwardedQueryStrings: {
                option: false,
                queryStringsAllowedLists: ["string"],
            },
            maximumTtl: 0,
            minimumTtl: 0,
        },
        cacheBehaviors: [{
            behavior: "string",
            path: "string",
        }],
        certificateName: "string",
        ipAddressType: "string",
        isEnabled: false,
        name: "string",
        tags: {
            string: "string",
        },
    });
    
    type: aws:lightsail:Distribution
    properties:
        bundleId: string
        cacheBehaviorSettings:
            allowedHttpMethods: string
            cachedHttpMethods: string
            defaultTtl: 0
            forwardedCookies:
                cookiesAllowLists:
                    - string
                option: string
            forwardedHeaders:
                headersAllowLists:
                    - string
                option: string
            forwardedQueryStrings:
                option: false
                queryStringsAllowedLists:
                    - string
            maximumTtl: 0
            minimumTtl: 0
        cacheBehaviors:
            - behavior: string
              path: string
        certificateName: string
        defaultCacheBehavior:
            behavior: string
        ipAddressType: string
        isEnabled: false
        name: string
        origin:
            name: string
            protocolPolicy: string
            regionName: string
            resourceType: string
        tags:
            string: string
    

    Distribution Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Distribution resource accepts the following input properties:

    BundleId string
    Bundle ID to use for the distribution.
    DefaultCacheBehavior DistributionDefaultCacheBehavior
    Default cache behavior of the distribution. See below.
    Origin DistributionOrigin

    Origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. See below.

    The following arguments are optional:

    CacheBehaviorSettings DistributionCacheBehaviorSettings
    Cache behavior settings of the distribution. See below.
    CacheBehaviors List<DistributionCacheBehavior>
    Per-path cache behavior of the distribution. See below.
    CertificateName string
    Name of the SSL/TLS certificate attached to the distribution.
    IpAddressType string
    IP address type of the distribution. Valid values: dualstack, ipv4. Default: dualstack.
    IsEnabled bool
    Whether the distribution is enabled. Default: true.
    Name string
    Name of the distribution.
    Tags Dictionary<string, string>
    Map of tags for the Lightsail Distribution. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    BundleId string
    Bundle ID to use for the distribution.
    DefaultCacheBehavior DistributionDefaultCacheBehaviorArgs
    Default cache behavior of the distribution. See below.
    Origin DistributionOriginArgs

    Origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. See below.

    The following arguments are optional:

    CacheBehaviorSettings DistributionCacheBehaviorSettingsArgs
    Cache behavior settings of the distribution. See below.
    CacheBehaviors []DistributionCacheBehaviorArgs
    Per-path cache behavior of the distribution. See below.
    CertificateName string
    Name of the SSL/TLS certificate attached to the distribution.
    IpAddressType string
    IP address type of the distribution. Valid values: dualstack, ipv4. Default: dualstack.
    IsEnabled bool
    Whether the distribution is enabled. Default: true.
    Name string
    Name of the distribution.
    Tags map[string]string
    Map of tags for the Lightsail Distribution. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    bundleId String
    Bundle ID to use for the distribution.
    defaultCacheBehavior DistributionDefaultCacheBehavior
    Default cache behavior of the distribution. See below.
    origin DistributionOrigin

    Origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. See below.

    The following arguments are optional:

    cacheBehaviorSettings DistributionCacheBehaviorSettings
    Cache behavior settings of the distribution. See below.
    cacheBehaviors List<DistributionCacheBehavior>
    Per-path cache behavior of the distribution. See below.
    certificateName String
    Name of the SSL/TLS certificate attached to the distribution.
    ipAddressType String
    IP address type of the distribution. Valid values: dualstack, ipv4. Default: dualstack.
    isEnabled Boolean
    Whether the distribution is enabled. Default: true.
    name String
    Name of the distribution.
    tags Map<String,String>
    Map of tags for the Lightsail Distribution. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    bundleId string
    Bundle ID to use for the distribution.
    defaultCacheBehavior DistributionDefaultCacheBehavior
    Default cache behavior of the distribution. See below.
    origin DistributionOrigin

    Origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. See below.

    The following arguments are optional:

    cacheBehaviorSettings DistributionCacheBehaviorSettings
    Cache behavior settings of the distribution. See below.
    cacheBehaviors DistributionCacheBehavior[]
    Per-path cache behavior of the distribution. See below.
    certificateName string
    Name of the SSL/TLS certificate attached to the distribution.
    ipAddressType string
    IP address type of the distribution. Valid values: dualstack, ipv4. Default: dualstack.
    isEnabled boolean
    Whether the distribution is enabled. Default: true.
    name string
    Name of the distribution.
    tags {[key: string]: string}
    Map of tags for the Lightsail Distribution. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    bundle_id str
    Bundle ID to use for the distribution.
    default_cache_behavior DistributionDefaultCacheBehaviorArgs
    Default cache behavior of the distribution. See below.
    origin DistributionOriginArgs

    Origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. See below.

    The following arguments are optional:

    cache_behavior_settings DistributionCacheBehaviorSettingsArgs
    Cache behavior settings of the distribution. See below.
    cache_behaviors Sequence[DistributionCacheBehaviorArgs]
    Per-path cache behavior of the distribution. See below.
    certificate_name str
    Name of the SSL/TLS certificate attached to the distribution.
    ip_address_type str
    IP address type of the distribution. Valid values: dualstack, ipv4. Default: dualstack.
    is_enabled bool
    Whether the distribution is enabled. Default: true.
    name str
    Name of the distribution.
    tags Mapping[str, str]
    Map of tags for the Lightsail Distribution. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    bundleId String
    Bundle ID to use for the distribution.
    defaultCacheBehavior Property Map
    Default cache behavior of the distribution. See below.
    origin Property Map

    Origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. See below.

    The following arguments are optional:

    cacheBehaviorSettings Property Map
    Cache behavior settings of the distribution. See below.
    cacheBehaviors List<Property Map>
    Per-path cache behavior of the distribution. See below.
    certificateName String
    Name of the SSL/TLS certificate attached to the distribution.
    ipAddressType String
    IP address type of the distribution. Valid values: dualstack, ipv4. Default: dualstack.
    isEnabled Boolean
    Whether the distribution is enabled. Default: true.
    name String
    Name of the distribution.
    tags Map<String>
    Map of tags for the Lightsail Distribution. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

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

    AlternativeDomainNames List<string>
    Alternate domain names of the distribution.
    Arn string
    ARN of the distribution.
    CreatedAt string
    Timestamp when the distribution was created.
    DomainName string
    Domain name of the distribution.
    Id string
    The provider-assigned unique ID for this managed resource.
    Locations List<DistributionLocation>
    Location of the distribution, such as the AWS Region and Availability Zone. See below.
    OriginPublicDns string
    Public DNS of the origin.

    • origin[0].resource_type - Resource type of the origin resource (e.g., Instance).
    ResourceType string
    Lightsail resource type (e.g., Distribution).
    Status string
    Status of the distribution.
    SupportCode string
    Support code. Include this code in your email to support when you have questions about your Lightsail distribution. This code enables our support team to look up your Lightsail information more easily.
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    AlternativeDomainNames []string
    Alternate domain names of the distribution.
    Arn string
    ARN of the distribution.
    CreatedAt string
    Timestamp when the distribution was created.
    DomainName string
    Domain name of the distribution.
    Id string
    The provider-assigned unique ID for this managed resource.
    Locations []DistributionLocation
    Location of the distribution, such as the AWS Region and Availability Zone. See below.
    OriginPublicDns string
    Public DNS of the origin.

    • origin[0].resource_type - Resource type of the origin resource (e.g., Instance).
    ResourceType string
    Lightsail resource type (e.g., Distribution).
    Status string
    Status of the distribution.
    SupportCode string
    Support code. Include this code in your email to support when you have questions about your Lightsail distribution. This code enables our support team to look up your Lightsail information more easily.
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    alternativeDomainNames List<String>
    Alternate domain names of the distribution.
    arn String
    ARN of the distribution.
    createdAt String
    Timestamp when the distribution was created.
    domainName String
    Domain name of the distribution.
    id String
    The provider-assigned unique ID for this managed resource.
    locations List<DistributionLocation>
    Location of the distribution, such as the AWS Region and Availability Zone. See below.
    originPublicDns String
    Public DNS of the origin.

    • origin[0].resource_type - Resource type of the origin resource (e.g., Instance).
    resourceType String
    Lightsail resource type (e.g., Distribution).
    status String
    Status of the distribution.
    supportCode String
    Support code. Include this code in your email to support when you have questions about your Lightsail distribution. This code enables our support team to look up your Lightsail information more easily.
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    alternativeDomainNames string[]
    Alternate domain names of the distribution.
    arn string
    ARN of the distribution.
    createdAt string
    Timestamp when the distribution was created.
    domainName string
    Domain name of the distribution.
    id string
    The provider-assigned unique ID for this managed resource.
    locations DistributionLocation[]
    Location of the distribution, such as the AWS Region and Availability Zone. See below.
    originPublicDns string
    Public DNS of the origin.

    • origin[0].resource_type - Resource type of the origin resource (e.g., Instance).
    resourceType string
    Lightsail resource type (e.g., Distribution).
    status string
    Status of the distribution.
    supportCode string
    Support code. Include this code in your email to support when you have questions about your Lightsail distribution. This code enables our support team to look up your Lightsail information more easily.
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    alternative_domain_names Sequence[str]
    Alternate domain names of the distribution.
    arn str
    ARN of the distribution.
    created_at str
    Timestamp when the distribution was created.
    domain_name str
    Domain name of the distribution.
    id str
    The provider-assigned unique ID for this managed resource.
    locations Sequence[DistributionLocation]
    Location of the distribution, such as the AWS Region and Availability Zone. See below.
    origin_public_dns str
    Public DNS of the origin.

    • origin[0].resource_type - Resource type of the origin resource (e.g., Instance).
    resource_type str
    Lightsail resource type (e.g., Distribution).
    status str
    Status of the distribution.
    support_code str
    Support code. Include this code in your email to support when you have questions about your Lightsail distribution. This code enables our support team to look up your Lightsail information more easily.
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    alternativeDomainNames List<String>
    Alternate domain names of the distribution.
    arn String
    ARN of the distribution.
    createdAt String
    Timestamp when the distribution was created.
    domainName String
    Domain name of the distribution.
    id String
    The provider-assigned unique ID for this managed resource.
    locations List<Property Map>
    Location of the distribution, such as the AWS Region and Availability Zone. See below.
    originPublicDns String
    Public DNS of the origin.

    • origin[0].resource_type - Resource type of the origin resource (e.g., Instance).
    resourceType String
    Lightsail resource type (e.g., Distribution).
    status String
    Status of the distribution.
    supportCode String
    Support code. Include this code in your email to support when you have questions about your Lightsail distribution. This code enables our support team to look up your Lightsail information more easily.
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Look up Existing Distribution Resource

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

    public static get(name: string, id: Input<ID>, state?: DistributionState, opts?: CustomResourceOptions): Distribution
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            alternative_domain_names: Optional[Sequence[str]] = None,
            arn: Optional[str] = None,
            bundle_id: Optional[str] = None,
            cache_behavior_settings: Optional[DistributionCacheBehaviorSettingsArgs] = None,
            cache_behaviors: Optional[Sequence[DistributionCacheBehaviorArgs]] = None,
            certificate_name: Optional[str] = None,
            created_at: Optional[str] = None,
            default_cache_behavior: Optional[DistributionDefaultCacheBehaviorArgs] = None,
            domain_name: Optional[str] = None,
            ip_address_type: Optional[str] = None,
            is_enabled: Optional[bool] = None,
            locations: Optional[Sequence[DistributionLocationArgs]] = None,
            name: Optional[str] = None,
            origin: Optional[DistributionOriginArgs] = None,
            origin_public_dns: Optional[str] = None,
            resource_type: Optional[str] = None,
            status: Optional[str] = None,
            support_code: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None) -> Distribution
    func GetDistribution(ctx *Context, name string, id IDInput, state *DistributionState, opts ...ResourceOption) (*Distribution, error)
    public static Distribution Get(string name, Input<string> id, DistributionState? state, CustomResourceOptions? opts = null)
    public static Distribution get(String name, Output<String> id, DistributionState state, CustomResourceOptions options)
    resources:  _:    type: aws:lightsail:Distribution    get:      id: ${id}
    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.
    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:
    AlternativeDomainNames List<string>
    Alternate domain names of the distribution.
    Arn string
    ARN of the distribution.
    BundleId string
    Bundle ID to use for the distribution.
    CacheBehaviorSettings DistributionCacheBehaviorSettings
    Cache behavior settings of the distribution. See below.
    CacheBehaviors List<DistributionCacheBehavior>
    Per-path cache behavior of the distribution. See below.
    CertificateName string
    Name of the SSL/TLS certificate attached to the distribution.
    CreatedAt string
    Timestamp when the distribution was created.
    DefaultCacheBehavior DistributionDefaultCacheBehavior
    Default cache behavior of the distribution. See below.
    DomainName string
    Domain name of the distribution.
    IpAddressType string
    IP address type of the distribution. Valid values: dualstack, ipv4. Default: dualstack.
    IsEnabled bool
    Whether the distribution is enabled. Default: true.
    Locations List<DistributionLocation>
    Location of the distribution, such as the AWS Region and Availability Zone. See below.
    Name string
    Name of the distribution.
    Origin DistributionOrigin

    Origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. See below.

    The following arguments are optional:

    OriginPublicDns string
    Public DNS of the origin.

    • origin[0].resource_type - Resource type of the origin resource (e.g., Instance).
    ResourceType string
    Lightsail resource type (e.g., Distribution).
    Status string
    Status of the distribution.
    SupportCode string
    Support code. Include this code in your email to support when you have questions about your Lightsail distribution. This code enables our support team to look up your Lightsail information more easily.
    Tags Dictionary<string, string>
    Map of tags for the Lightsail Distribution. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    AlternativeDomainNames []string
    Alternate domain names of the distribution.
    Arn string
    ARN of the distribution.
    BundleId string
    Bundle ID to use for the distribution.
    CacheBehaviorSettings DistributionCacheBehaviorSettingsArgs
    Cache behavior settings of the distribution. See below.
    CacheBehaviors []DistributionCacheBehaviorArgs
    Per-path cache behavior of the distribution. See below.
    CertificateName string
    Name of the SSL/TLS certificate attached to the distribution.
    CreatedAt string
    Timestamp when the distribution was created.
    DefaultCacheBehavior DistributionDefaultCacheBehaviorArgs
    Default cache behavior of the distribution. See below.
    DomainName string
    Domain name of the distribution.
    IpAddressType string
    IP address type of the distribution. Valid values: dualstack, ipv4. Default: dualstack.
    IsEnabled bool
    Whether the distribution is enabled. Default: true.
    Locations []DistributionLocationArgs
    Location of the distribution, such as the AWS Region and Availability Zone. See below.
    Name string
    Name of the distribution.
    Origin DistributionOriginArgs

    Origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. See below.

    The following arguments are optional:

    OriginPublicDns string
    Public DNS of the origin.

    • origin[0].resource_type - Resource type of the origin resource (e.g., Instance).
    ResourceType string
    Lightsail resource type (e.g., Distribution).
    Status string
    Status of the distribution.
    SupportCode string
    Support code. Include this code in your email to support when you have questions about your Lightsail distribution. This code enables our support team to look up your Lightsail information more easily.
    Tags map[string]string
    Map of tags for the Lightsail Distribution. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    alternativeDomainNames List<String>
    Alternate domain names of the distribution.
    arn String
    ARN of the distribution.
    bundleId String
    Bundle ID to use for the distribution.
    cacheBehaviorSettings DistributionCacheBehaviorSettings
    Cache behavior settings of the distribution. See below.
    cacheBehaviors List<DistributionCacheBehavior>
    Per-path cache behavior of the distribution. See below.
    certificateName String
    Name of the SSL/TLS certificate attached to the distribution.
    createdAt String
    Timestamp when the distribution was created.
    defaultCacheBehavior DistributionDefaultCacheBehavior
    Default cache behavior of the distribution. See below.
    domainName String
    Domain name of the distribution.
    ipAddressType String
    IP address type of the distribution. Valid values: dualstack, ipv4. Default: dualstack.
    isEnabled Boolean
    Whether the distribution is enabled. Default: true.
    locations List<DistributionLocation>
    Location of the distribution, such as the AWS Region and Availability Zone. See below.
    name String
    Name of the distribution.
    origin DistributionOrigin

    Origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. See below.

    The following arguments are optional:

    originPublicDns String
    Public DNS of the origin.

    • origin[0].resource_type - Resource type of the origin resource (e.g., Instance).
    resourceType String
    Lightsail resource type (e.g., Distribution).
    status String
    Status of the distribution.
    supportCode String
    Support code. Include this code in your email to support when you have questions about your Lightsail distribution. This code enables our support team to look up your Lightsail information more easily.
    tags Map<String,String>
    Map of tags for the Lightsail Distribution. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    alternativeDomainNames string[]
    Alternate domain names of the distribution.
    arn string
    ARN of the distribution.
    bundleId string
    Bundle ID to use for the distribution.
    cacheBehaviorSettings DistributionCacheBehaviorSettings
    Cache behavior settings of the distribution. See below.
    cacheBehaviors DistributionCacheBehavior[]
    Per-path cache behavior of the distribution. See below.
    certificateName string
    Name of the SSL/TLS certificate attached to the distribution.
    createdAt string
    Timestamp when the distribution was created.
    defaultCacheBehavior DistributionDefaultCacheBehavior
    Default cache behavior of the distribution. See below.
    domainName string
    Domain name of the distribution.
    ipAddressType string
    IP address type of the distribution. Valid values: dualstack, ipv4. Default: dualstack.
    isEnabled boolean
    Whether the distribution is enabled. Default: true.
    locations DistributionLocation[]
    Location of the distribution, such as the AWS Region and Availability Zone. See below.
    name string
    Name of the distribution.
    origin DistributionOrigin

    Origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. See below.

    The following arguments are optional:

    originPublicDns string
    Public DNS of the origin.

    • origin[0].resource_type - Resource type of the origin resource (e.g., Instance).
    resourceType string
    Lightsail resource type (e.g., Distribution).
    status string
    Status of the distribution.
    supportCode string
    Support code. Include this code in your email to support when you have questions about your Lightsail distribution. This code enables our support team to look up your Lightsail information more easily.
    tags {[key: string]: string}
    Map of tags for the Lightsail Distribution. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    alternative_domain_names Sequence[str]
    Alternate domain names of the distribution.
    arn str
    ARN of the distribution.
    bundle_id str
    Bundle ID to use for the distribution.
    cache_behavior_settings DistributionCacheBehaviorSettingsArgs
    Cache behavior settings of the distribution. See below.
    cache_behaviors Sequence[DistributionCacheBehaviorArgs]
    Per-path cache behavior of the distribution. See below.
    certificate_name str
    Name of the SSL/TLS certificate attached to the distribution.
    created_at str
    Timestamp when the distribution was created.
    default_cache_behavior DistributionDefaultCacheBehaviorArgs
    Default cache behavior of the distribution. See below.
    domain_name str
    Domain name of the distribution.
    ip_address_type str
    IP address type of the distribution. Valid values: dualstack, ipv4. Default: dualstack.
    is_enabled bool
    Whether the distribution is enabled. Default: true.
    locations Sequence[DistributionLocationArgs]
    Location of the distribution, such as the AWS Region and Availability Zone. See below.
    name str
    Name of the distribution.
    origin DistributionOriginArgs

    Origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. See below.

    The following arguments are optional:

    origin_public_dns str
    Public DNS of the origin.

    • origin[0].resource_type - Resource type of the origin resource (e.g., Instance).
    resource_type str
    Lightsail resource type (e.g., Distribution).
    status str
    Status of the distribution.
    support_code str
    Support code. Include this code in your email to support when you have questions about your Lightsail distribution. This code enables our support team to look up your Lightsail information more easily.
    tags Mapping[str, str]
    Map of tags for the Lightsail Distribution. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    alternativeDomainNames List<String>
    Alternate domain names of the distribution.
    arn String
    ARN of the distribution.
    bundleId String
    Bundle ID to use for the distribution.
    cacheBehaviorSettings Property Map
    Cache behavior settings of the distribution. See below.
    cacheBehaviors List<Property Map>
    Per-path cache behavior of the distribution. See below.
    certificateName String
    Name of the SSL/TLS certificate attached to the distribution.
    createdAt String
    Timestamp when the distribution was created.
    defaultCacheBehavior Property Map
    Default cache behavior of the distribution. See below.
    domainName String
    Domain name of the distribution.
    ipAddressType String
    IP address type of the distribution. Valid values: dualstack, ipv4. Default: dualstack.
    isEnabled Boolean
    Whether the distribution is enabled. Default: true.
    locations List<Property Map>
    Location of the distribution, such as the AWS Region and Availability Zone. See below.
    name String
    Name of the distribution.
    origin Property Map

    Origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. See below.

    The following arguments are optional:

    originPublicDns String
    Public DNS of the origin.

    • origin[0].resource_type - Resource type of the origin resource (e.g., Instance).
    resourceType String
    Lightsail resource type (e.g., Distribution).
    status String
    Status of the distribution.
    supportCode String
    Support code. Include this code in your email to support when you have questions about your Lightsail distribution. This code enables our support team to look up your Lightsail information more easily.
    tags Map<String>
    Map of tags for the Lightsail Distribution. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Supporting Types

    DistributionCacheBehavior, DistributionCacheBehaviorArgs

    Behavior string
    Cache behavior for the specified path. Valid values: cache, dont-cache.
    Path string
    Path to a directory or file to cache, or not cache. Use an asterisk symbol to specify wildcard directories (path/to/assets/*), and file types (*.html, *.jpg, *.js). Directories and file paths are case-sensitive.
    Behavior string
    Cache behavior for the specified path. Valid values: cache, dont-cache.
    Path string
    Path to a directory or file to cache, or not cache. Use an asterisk symbol to specify wildcard directories (path/to/assets/*), and file types (*.html, *.jpg, *.js). Directories and file paths are case-sensitive.
    behavior String
    Cache behavior for the specified path. Valid values: cache, dont-cache.
    path String
    Path to a directory or file to cache, or not cache. Use an asterisk symbol to specify wildcard directories (path/to/assets/*), and file types (*.html, *.jpg, *.js). Directories and file paths are case-sensitive.
    behavior string
    Cache behavior for the specified path. Valid values: cache, dont-cache.
    path string
    Path to a directory or file to cache, or not cache. Use an asterisk symbol to specify wildcard directories (path/to/assets/*), and file types (*.html, *.jpg, *.js). Directories and file paths are case-sensitive.
    behavior str
    Cache behavior for the specified path. Valid values: cache, dont-cache.
    path str
    Path to a directory or file to cache, or not cache. Use an asterisk symbol to specify wildcard directories (path/to/assets/*), and file types (*.html, *.jpg, *.js). Directories and file paths are case-sensitive.
    behavior String
    Cache behavior for the specified path. Valid values: cache, dont-cache.
    path String
    Path to a directory or file to cache, or not cache. Use an asterisk symbol to specify wildcard directories (path/to/assets/*), and file types (*.html, *.jpg, *.js). Directories and file paths are case-sensitive.

    DistributionCacheBehaviorSettings, DistributionCacheBehaviorSettingsArgs

    AllowedHttpMethods string
    HTTP methods that are processed and forwarded to the distribution's origin.
    CachedHttpMethods string
    HTTP method responses that are cached by your distribution.
    DefaultTtl int
    Default amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the content has been updated.
    ForwardedCookies DistributionCacheBehaviorSettingsForwardedCookies
    Cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded. See below.
    ForwardedHeaders DistributionCacheBehaviorSettingsForwardedHeaders
    Headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded. See below.
    ForwardedQueryStrings DistributionCacheBehaviorSettingsForwardedQueryStrings
    Query strings that are forwarded to the origin. Your content is cached based on the query strings that are forwarded. See below.
    MaximumTtl int
    Maximum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.
    MinimumTtl int
    Minimum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.
    AllowedHttpMethods string
    HTTP methods that are processed and forwarded to the distribution's origin.
    CachedHttpMethods string
    HTTP method responses that are cached by your distribution.
    DefaultTtl int
    Default amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the content has been updated.
    ForwardedCookies DistributionCacheBehaviorSettingsForwardedCookies
    Cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded. See below.
    ForwardedHeaders DistributionCacheBehaviorSettingsForwardedHeaders
    Headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded. See below.
    ForwardedQueryStrings DistributionCacheBehaviorSettingsForwardedQueryStrings
    Query strings that are forwarded to the origin. Your content is cached based on the query strings that are forwarded. See below.
    MaximumTtl int
    Maximum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.
    MinimumTtl int
    Minimum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.
    allowedHttpMethods String
    HTTP methods that are processed and forwarded to the distribution's origin.
    cachedHttpMethods String
    HTTP method responses that are cached by your distribution.
    defaultTtl Integer
    Default amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the content has been updated.
    forwardedCookies DistributionCacheBehaviorSettingsForwardedCookies
    Cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded. See below.
    forwardedHeaders DistributionCacheBehaviorSettingsForwardedHeaders
    Headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded. See below.
    forwardedQueryStrings DistributionCacheBehaviorSettingsForwardedQueryStrings
    Query strings that are forwarded to the origin. Your content is cached based on the query strings that are forwarded. See below.
    maximumTtl Integer
    Maximum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.
    minimumTtl Integer
    Minimum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.
    allowedHttpMethods string
    HTTP methods that are processed and forwarded to the distribution's origin.
    cachedHttpMethods string
    HTTP method responses that are cached by your distribution.
    defaultTtl number
    Default amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the content has been updated.
    forwardedCookies DistributionCacheBehaviorSettingsForwardedCookies
    Cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded. See below.
    forwardedHeaders DistributionCacheBehaviorSettingsForwardedHeaders
    Headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded. See below.
    forwardedQueryStrings DistributionCacheBehaviorSettingsForwardedQueryStrings
    Query strings that are forwarded to the origin. Your content is cached based on the query strings that are forwarded. See below.
    maximumTtl number
    Maximum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.
    minimumTtl number
    Minimum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.
    allowed_http_methods str
    HTTP methods that are processed and forwarded to the distribution's origin.
    cached_http_methods str
    HTTP method responses that are cached by your distribution.
    default_ttl int
    Default amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the content has been updated.
    forwarded_cookies DistributionCacheBehaviorSettingsForwardedCookies
    Cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded. See below.
    forwarded_headers DistributionCacheBehaviorSettingsForwardedHeaders
    Headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded. See below.
    forwarded_query_strings DistributionCacheBehaviorSettingsForwardedQueryStrings
    Query strings that are forwarded to the origin. Your content is cached based on the query strings that are forwarded. See below.
    maximum_ttl int
    Maximum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.
    minimum_ttl int
    Minimum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.
    allowedHttpMethods String
    HTTP methods that are processed and forwarded to the distribution's origin.
    cachedHttpMethods String
    HTTP method responses that are cached by your distribution.
    defaultTtl Number
    Default amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the content has been updated.
    forwardedCookies Property Map
    Cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded. See below.
    forwardedHeaders Property Map
    Headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded. See below.
    forwardedQueryStrings Property Map
    Query strings that are forwarded to the origin. Your content is cached based on the query strings that are forwarded. See below.
    maximumTtl Number
    Maximum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.
    minimumTtl Number
    Minimum amount of time that objects stay in the distribution's cache before the distribution forwards another request to the origin to determine whether the object has been updated.

    DistributionCacheBehaviorSettingsForwardedCookies, DistributionCacheBehaviorSettingsForwardedCookiesArgs

    CookiesAllowLists List<string>
    Specific cookies to forward to your distribution's origin.
    Option string
    Which cookies to forward to the distribution's origin for a cache behavior. Valid values: all, none, allow-list.
    CookiesAllowLists []string
    Specific cookies to forward to your distribution's origin.
    Option string
    Which cookies to forward to the distribution's origin for a cache behavior. Valid values: all, none, allow-list.
    cookiesAllowLists List<String>
    Specific cookies to forward to your distribution's origin.
    option String
    Which cookies to forward to the distribution's origin for a cache behavior. Valid values: all, none, allow-list.
    cookiesAllowLists string[]
    Specific cookies to forward to your distribution's origin.
    option string
    Which cookies to forward to the distribution's origin for a cache behavior. Valid values: all, none, allow-list.
    cookies_allow_lists Sequence[str]
    Specific cookies to forward to your distribution's origin.
    option str
    Which cookies to forward to the distribution's origin for a cache behavior. Valid values: all, none, allow-list.
    cookiesAllowLists List<String>
    Specific cookies to forward to your distribution's origin.
    option String
    Which cookies to forward to the distribution's origin for a cache behavior. Valid values: all, none, allow-list.

    DistributionCacheBehaviorSettingsForwardedHeaders, DistributionCacheBehaviorSettingsForwardedHeadersArgs

    HeadersAllowLists List<string>
    Specific headers to forward to your distribution's origin.
    Option string
    Headers that you want your distribution to forward to your origin and base caching on. Valid values: default, allow-list, all.
    HeadersAllowLists []string
    Specific headers to forward to your distribution's origin.
    Option string
    Headers that you want your distribution to forward to your origin and base caching on. Valid values: default, allow-list, all.
    headersAllowLists List<String>
    Specific headers to forward to your distribution's origin.
    option String
    Headers that you want your distribution to forward to your origin and base caching on. Valid values: default, allow-list, all.
    headersAllowLists string[]
    Specific headers to forward to your distribution's origin.
    option string
    Headers that you want your distribution to forward to your origin and base caching on. Valid values: default, allow-list, all.
    headers_allow_lists Sequence[str]
    Specific headers to forward to your distribution's origin.
    option str
    Headers that you want your distribution to forward to your origin and base caching on. Valid values: default, allow-list, all.
    headersAllowLists List<String>
    Specific headers to forward to your distribution's origin.
    option String
    Headers that you want your distribution to forward to your origin and base caching on. Valid values: default, allow-list, all.

    DistributionCacheBehaviorSettingsForwardedQueryStrings, DistributionCacheBehaviorSettingsForwardedQueryStringsArgs

    Option bool
    Whether the distribution forwards and caches based on query strings.
    QueryStringsAllowedLists List<string>
    Specific query strings that the distribution forwards to the origin.
    Option bool
    Whether the distribution forwards and caches based on query strings.
    QueryStringsAllowedLists []string
    Specific query strings that the distribution forwards to the origin.
    option Boolean
    Whether the distribution forwards and caches based on query strings.
    queryStringsAllowedLists List<String>
    Specific query strings that the distribution forwards to the origin.
    option boolean
    Whether the distribution forwards and caches based on query strings.
    queryStringsAllowedLists string[]
    Specific query strings that the distribution forwards to the origin.
    option bool
    Whether the distribution forwards and caches based on query strings.
    query_strings_allowed_lists Sequence[str]
    Specific query strings that the distribution forwards to the origin.
    option Boolean
    Whether the distribution forwards and caches based on query strings.
    queryStringsAllowedLists List<String>
    Specific query strings that the distribution forwards to the origin.

    DistributionDefaultCacheBehavior, DistributionDefaultCacheBehaviorArgs

    Behavior string
    Cache behavior of the distribution. Valid values: cache, dont-cache.
    Behavior string
    Cache behavior of the distribution. Valid values: cache, dont-cache.
    behavior String
    Cache behavior of the distribution. Valid values: cache, dont-cache.
    behavior string
    Cache behavior of the distribution. Valid values: cache, dont-cache.
    behavior str
    Cache behavior of the distribution. Valid values: cache, dont-cache.
    behavior String
    Cache behavior of the distribution. Valid values: cache, dont-cache.

    DistributionLocation, DistributionLocationArgs

    AvailabilityZone string
    Availability Zone. Follows the format us-east-2a (case-sensitive).
    RegionName string
    AWS Region name.
    AvailabilityZone string
    Availability Zone. Follows the format us-east-2a (case-sensitive).
    RegionName string
    AWS Region name.
    availabilityZone String
    Availability Zone. Follows the format us-east-2a (case-sensitive).
    regionName String
    AWS Region name.
    availabilityZone string
    Availability Zone. Follows the format us-east-2a (case-sensitive).
    regionName string
    AWS Region name.
    availability_zone str
    Availability Zone. Follows the format us-east-2a (case-sensitive).
    region_name str
    AWS Region name.
    availabilityZone String
    Availability Zone. Follows the format us-east-2a (case-sensitive).
    regionName String
    AWS Region name.

    DistributionOrigin, DistributionOriginArgs

    Name string
    Name of the origin resource. Your origin can be an instance with an attached static IP, a bucket, or a load balancer that has at least one instance attached to it.
    RegionName string
    AWS Region name of the origin resource.
    ProtocolPolicy string
    Protocol that your Amazon Lightsail distribution uses when establishing a connection with your origin to pull content.
    ResourceType string
    Lightsail resource type (e.g., Distribution).
    Name string
    Name of the origin resource. Your origin can be an instance with an attached static IP, a bucket, or a load balancer that has at least one instance attached to it.
    RegionName string
    AWS Region name of the origin resource.
    ProtocolPolicy string
    Protocol that your Amazon Lightsail distribution uses when establishing a connection with your origin to pull content.
    ResourceType string
    Lightsail resource type (e.g., Distribution).
    name String
    Name of the origin resource. Your origin can be an instance with an attached static IP, a bucket, or a load balancer that has at least one instance attached to it.
    regionName String
    AWS Region name of the origin resource.
    protocolPolicy String
    Protocol that your Amazon Lightsail distribution uses when establishing a connection with your origin to pull content.
    resourceType String
    Lightsail resource type (e.g., Distribution).
    name string
    Name of the origin resource. Your origin can be an instance with an attached static IP, a bucket, or a load balancer that has at least one instance attached to it.
    regionName string
    AWS Region name of the origin resource.
    protocolPolicy string
    Protocol that your Amazon Lightsail distribution uses when establishing a connection with your origin to pull content.
    resourceType string
    Lightsail resource type (e.g., Distribution).
    name str
    Name of the origin resource. Your origin can be an instance with an attached static IP, a bucket, or a load balancer that has at least one instance attached to it.
    region_name str
    AWS Region name of the origin resource.
    protocol_policy str
    Protocol that your Amazon Lightsail distribution uses when establishing a connection with your origin to pull content.
    resource_type str
    Lightsail resource type (e.g., Distribution).
    name String
    Name of the origin resource. Your origin can be an instance with an attached static IP, a bucket, or a load balancer that has at least one instance attached to it.
    regionName String
    AWS Region name of the origin resource.
    protocolPolicy String
    Protocol that your Amazon Lightsail distribution uses when establishing a connection with your origin to pull content.
    resourceType String
    Lightsail resource type (e.g., Distribution).

    Import

    Using pulumi import, import Lightsail Distribution using the name. For example:

    $ pulumi import aws:lightsail/distribution:Distribution example example-distribution
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.83.0 published on Monday, Jun 16, 2025 by Pulumi