Try AWS Native preview for resources not in the classic version.
aws.lightsail.Distribution
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Resource for managing an AWS Lightsail Distribution.
Example Usage
Basic Usage
Below is a basic example with a bucket as an origin.
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = new aws.lightsail.Bucket("test", {
name: "test-bucket",
bundleId: "small_1_0",
});
const testDistribution = new aws.lightsail.Distribution("test", {
name: "test-distribution",
bundleId: "small_1_0",
origin: {
name: test.name,
regionName: test.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
test = aws.lightsail.Bucket("test",
name="test-bucket",
bundle_id="small_1_0")
test_distribution = aws.lightsail.Distribution("test",
name="test-distribution",
bundle_id="small_1_0",
origin={
"name": test.name,
"regionName": test.region,
},
default_cache_behavior={
"behavior": "cache",
},
cache_behavior_settings={
"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,
},
})
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 {
test, err := lightsail.NewBucket(ctx, "test", &lightsail.BucketArgs{
Name: pulumi.String("test-bucket"),
BundleId: pulumi.String("small_1_0"),
})
if err != nil {
return err
}
_, err = lightsail.NewDistribution(ctx, "test", &lightsail.DistributionArgs{
Name: pulumi.String("test-distribution"),
BundleId: pulumi.String("small_1_0"),
Origin: &lightsail.DistributionOriginArgs{
Name: test.Name,
RegionName: test.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 test = new Aws.LightSail.Bucket("test", new()
{
Name = "test-bucket",
BundleId = "small_1_0",
});
var testDistribution = new Aws.LightSail.Distribution("test", new()
{
Name = "test-distribution",
BundleId = "small_1_0",
Origin = new Aws.LightSail.Inputs.DistributionOriginArgs
{
Name = test.Name,
RegionName = test.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 test = new Bucket("test", BucketArgs.builder()
.name("test-bucket")
.bundleId("small_1_0")
.build());
var testDistribution = new Distribution("testDistribution", DistributionArgs.builder()
.name("test-distribution")
.bundleId("small_1_0")
.origin(DistributionOriginArgs.builder()
.name(test.name())
.regionName(test.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:
test:
type: aws:lightsail:Bucket
properties:
name: test-bucket
bundleId: small_1_0
testDistribution:
type: aws:lightsail:Distribution
name: test
properties:
name: test-distribution
bundleId: small_1_0
origin:
name: ${test.name}
regionName: ${test.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 example
Below is an example of an instance as the 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 testStaticIp = new aws.lightsail.StaticIp("test", {name: "test-static-ip"});
const testInstance = new aws.lightsail.Instance("test", {
name: "test-instance",
availabilityZone: available.then(available => available.names?.[0]),
blueprintId: "amazon_linux_2",
bundleId: "micro_1_0",
});
const test = new aws.lightsail.StaticIpAttachment("test", {
staticIpName: testStaticIp.name,
instanceName: testInstance.name,
});
const testDistribution = new aws.lightsail.Distribution("test", {
name: "test-distribution",
bundleId: "small_1_0",
origin: {
name: testInstance.name,
regionName: available.then(available => available.id),
},
defaultCacheBehavior: {
behavior: "cache",
},
}, {
dependsOn: [test],
});
import pulumi
import pulumi_aws as aws
available = aws.get_availability_zones(state="available",
filters=[{
"name": "opt-in-status",
"values": ["opt-in-not-required"],
}])
test_static_ip = aws.lightsail.StaticIp("test", name="test-static-ip")
test_instance = aws.lightsail.Instance("test",
name="test-instance",
availability_zone=available.names[0],
blueprint_id="amazon_linux_2",
bundle_id="micro_1_0")
test = aws.lightsail.StaticIpAttachment("test",
static_ip_name=test_static_ip.name,
instance_name=test_instance.name)
test_distribution = aws.lightsail.Distribution("test",
name="test-distribution",
bundle_id="small_1_0",
origin={
"name": test_instance.name,
"regionName": available.id,
},
default_cache_behavior={
"behavior": "cache",
},
opts = pulumi.ResourceOptions(depends_on=[test]))
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
}
testStaticIp, err := lightsail.NewStaticIp(ctx, "test", &lightsail.StaticIpArgs{
Name: pulumi.String("test-static-ip"),
})
if err != nil {
return err
}
testInstance, err := lightsail.NewInstance(ctx, "test", &lightsail.InstanceArgs{
Name: pulumi.String("test-instance"),
AvailabilityZone: pulumi.String(available.Names[0]),
BlueprintId: pulumi.String("amazon_linux_2"),
BundleId: pulumi.String("micro_1_0"),
})
if err != nil {
return err
}
test, err := lightsail.NewStaticIpAttachment(ctx, "test", &lightsail.StaticIpAttachmentArgs{
StaticIpName: testStaticIp.Name,
InstanceName: testInstance.Name,
})
if err != nil {
return err
}
_, err = lightsail.NewDistribution(ctx, "test", &lightsail.DistributionArgs{
Name: pulumi.String("test-distribution"),
BundleId: pulumi.String("small_1_0"),
Origin: &lightsail.DistributionOriginArgs{
Name: testInstance.Name,
RegionName: pulumi.String(available.Id),
},
DefaultCacheBehavior: &lightsail.DistributionDefaultCacheBehaviorArgs{
Behavior: pulumi.String("cache"),
},
}, pulumi.DependsOn([]pulumi.Resource{
test,
}))
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 testStaticIp = new Aws.LightSail.StaticIp("test", new()
{
Name = "test-static-ip",
});
var testInstance = new Aws.LightSail.Instance("test", new()
{
Name = "test-instance",
AvailabilityZone = available.Apply(getAvailabilityZonesResult => getAvailabilityZonesResult.Names[0]),
BlueprintId = "amazon_linux_2",
BundleId = "micro_1_0",
});
var test = new Aws.LightSail.StaticIpAttachment("test", new()
{
StaticIpName = testStaticIp.Name,
InstanceName = testInstance.Name,
});
var testDistribution = new Aws.LightSail.Distribution("test", new()
{
Name = "test-distribution",
BundleId = "small_1_0",
Origin = new Aws.LightSail.Inputs.DistributionOriginArgs
{
Name = testInstance.Name,
RegionName = available.Apply(getAvailabilityZonesResult => getAvailabilityZonesResult.Id),
},
DefaultCacheBehavior = new Aws.LightSail.Inputs.DistributionDefaultCacheBehaviorArgs
{
Behavior = "cache",
},
}, new CustomResourceOptions
{
DependsOn =
{
test,
},
});
});
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 testStaticIp = new StaticIp("testStaticIp", StaticIpArgs.builder()
.name("test-static-ip")
.build());
var testInstance = new Instance("testInstance", InstanceArgs.builder()
.name("test-instance")
.availabilityZone(available.applyValue(getAvailabilityZonesResult -> getAvailabilityZonesResult.names()[0]))
.blueprintId("amazon_linux_2")
.bundleId("micro_1_0")
.build());
var test = new StaticIpAttachment("test", StaticIpAttachmentArgs.builder()
.staticIpName(testStaticIp.name())
.instanceName(testInstance.name())
.build());
var testDistribution = new Distribution("testDistribution", DistributionArgs.builder()
.name("test-distribution")
.bundleId("small_1_0")
.origin(DistributionOriginArgs.builder()
.name(testInstance.name())
.regionName(available.applyValue(getAvailabilityZonesResult -> getAvailabilityZonesResult.id()))
.build())
.defaultCacheBehavior(DistributionDefaultCacheBehaviorArgs.builder()
.behavior("cache")
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(test)
.build());
}
}
resources:
test:
type: aws:lightsail:StaticIpAttachment
properties:
staticIpName: ${testStaticIp.name}
instanceName: ${testInstance.name}
testStaticIp:
type: aws:lightsail:StaticIp
name: test
properties:
name: test-static-ip
testInstance:
type: aws:lightsail:Instance
name: test
properties:
name: test-instance
availabilityZone: ${available.names[0]}
blueprintId: amazon_linux_2
bundleId: micro_1_0
testDistribution:
type: aws:lightsail:Distribution
name: test
properties:
name: test-distribution
bundleId: small_1_0
origin:
name: ${testInstance.name}
regionName: ${available.id}
defaultCacheBehavior:
behavior: cache
options:
dependson:
- ${test}
variables:
available:
fn::invoke:
Function: aws:getAvailabilityZones
Arguments:
state: available
filters:
- name: opt-in-status
values:
- opt-in-not-required
lb origin example
Below is an example with a load balancer as an 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 test = new aws.lightsail.Lb("test", {
name: "test-load-balancer",
healthCheckPath: "/",
instancePort: 80,
tags: {
foo: "bar",
},
});
const testInstance = new aws.lightsail.Instance("test", {
name: "test-instance",
availabilityZone: available.then(available => available.names?.[0]),
blueprintId: "amazon_linux_2",
bundleId: "nano_3_0",
});
const testLbAttachment = new aws.lightsail.LbAttachment("test", {
lbName: test.name,
instanceName: testInstance.name,
});
const testDistribution = new aws.lightsail.Distribution("test", {
name: "test-distribution",
bundleId: "small_1_0",
origin: {
name: test.name,
regionName: available.then(available => available.id),
},
defaultCacheBehavior: {
behavior: "cache",
},
}, {
dependsOn: [testLbAttachment],
});
import pulumi
import pulumi_aws as aws
available = aws.get_availability_zones(state="available",
filters=[{
"name": "opt-in-status",
"values": ["opt-in-not-required"],
}])
test = aws.lightsail.Lb("test",
name="test-load-balancer",
health_check_path="/",
instance_port=80,
tags={
"foo": "bar",
})
test_instance = aws.lightsail.Instance("test",
name="test-instance",
availability_zone=available.names[0],
blueprint_id="amazon_linux_2",
bundle_id="nano_3_0")
test_lb_attachment = aws.lightsail.LbAttachment("test",
lb_name=test.name,
instance_name=test_instance.name)
test_distribution = aws.lightsail.Distribution("test",
name="test-distribution",
bundle_id="small_1_0",
origin={
"name": test.name,
"regionName": available.id,
},
default_cache_behavior={
"behavior": "cache",
},
opts = pulumi.ResourceOptions(depends_on=[test_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
}
test, err := lightsail.NewLb(ctx, "test", &lightsail.LbArgs{
Name: pulumi.String("test-load-balancer"),
HealthCheckPath: pulumi.String("/"),
InstancePort: pulumi.Int(80),
Tags: pulumi.StringMap{
"foo": pulumi.String("bar"),
},
})
if err != nil {
return err
}
testInstance, err := lightsail.NewInstance(ctx, "test", &lightsail.InstanceArgs{
Name: pulumi.String("test-instance"),
AvailabilityZone: pulumi.String(available.Names[0]),
BlueprintId: pulumi.String("amazon_linux_2"),
BundleId: pulumi.String("nano_3_0"),
})
if err != nil {
return err
}
testLbAttachment, err := lightsail.NewLbAttachment(ctx, "test", &lightsail.LbAttachmentArgs{
LbName: test.Name,
InstanceName: testInstance.Name,
})
if err != nil {
return err
}
_, err = lightsail.NewDistribution(ctx, "test", &lightsail.DistributionArgs{
Name: pulumi.String("test-distribution"),
BundleId: pulumi.String("small_1_0"),
Origin: &lightsail.DistributionOriginArgs{
Name: test.Name,
RegionName: pulumi.String(available.Id),
},
DefaultCacheBehavior: &lightsail.DistributionDefaultCacheBehaviorArgs{
Behavior: pulumi.String("cache"),
},
}, pulumi.DependsOn([]pulumi.Resource{
testLbAttachment,
}))
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 test = new Aws.LightSail.Lb("test", new()
{
Name = "test-load-balancer",
HealthCheckPath = "/",
InstancePort = 80,
Tags =
{
{ "foo", "bar" },
},
});
var testInstance = new Aws.LightSail.Instance("test", new()
{
Name = "test-instance",
AvailabilityZone = available.Apply(getAvailabilityZonesResult => getAvailabilityZonesResult.Names[0]),
BlueprintId = "amazon_linux_2",
BundleId = "nano_3_0",
});
var testLbAttachment = new Aws.LightSail.LbAttachment("test", new()
{
LbName = test.Name,
InstanceName = testInstance.Name,
});
var testDistribution = new Aws.LightSail.Distribution("test", new()
{
Name = "test-distribution",
BundleId = "small_1_0",
Origin = new Aws.LightSail.Inputs.DistributionOriginArgs
{
Name = test.Name,
RegionName = available.Apply(getAvailabilityZonesResult => getAvailabilityZonesResult.Id),
},
DefaultCacheBehavior = new Aws.LightSail.Inputs.DistributionDefaultCacheBehaviorArgs
{
Behavior = "cache",
},
}, new CustomResourceOptions
{
DependsOn =
{
testLbAttachment,
},
});
});
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 test = new Lb("test", LbArgs.builder()
.name("test-load-balancer")
.healthCheckPath("/")
.instancePort("80")
.tags(Map.of("foo", "bar"))
.build());
var testInstance = new Instance("testInstance", InstanceArgs.builder()
.name("test-instance")
.availabilityZone(available.applyValue(getAvailabilityZonesResult -> getAvailabilityZonesResult.names()[0]))
.blueprintId("amazon_linux_2")
.bundleId("nano_3_0")
.build());
var testLbAttachment = new LbAttachment("testLbAttachment", LbAttachmentArgs.builder()
.lbName(test.name())
.instanceName(testInstance.name())
.build());
var testDistribution = new Distribution("testDistribution", DistributionArgs.builder()
.name("test-distribution")
.bundleId("small_1_0")
.origin(DistributionOriginArgs.builder()
.name(test.name())
.regionName(available.applyValue(getAvailabilityZonesResult -> getAvailabilityZonesResult.id()))
.build())
.defaultCacheBehavior(DistributionDefaultCacheBehaviorArgs.builder()
.behavior("cache")
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(testLbAttachment)
.build());
}
}
resources:
test:
type: aws:lightsail:Lb
properties:
name: test-load-balancer
healthCheckPath: /
instancePort: '80'
tags:
foo: bar
testInstance:
type: aws:lightsail:Instance
name: test
properties:
name: test-instance
availabilityZone: ${available.names[0]}
blueprintId: amazon_linux_2
bundleId: nano_3_0
testLbAttachment:
type: aws:lightsail:LbAttachment
name: test
properties:
lbName: ${test.name}
instanceName: ${testInstance.name}
testDistribution:
type: aws:lightsail:Distribution
name: test
properties:
name: test-distribution
bundleId: small_1_0
origin:
name: ${test.name}
regionName: ${available.id}
defaultCacheBehavior:
behavior: cache
options:
dependson:
- ${testLbAttachment}
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 Distribution("awsDistributionResource", 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",
"regionName": "string",
"protocolPolicy": "string",
"resourceType": "string",
},
cache_behavior_settings={
"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,
},
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
The Distribution resource accepts the following input properties:
- Bundle
Id string - Bundle ID to use for the distribution.
- Default
Cache Pulumi.Behavior Aws. Light Sail. Inputs. Distribution Default Cache Behavior - Object that describes the default cache behavior of the distribution. Detailed below
- Origin
Pulumi.
Aws. Light Sail. Inputs. Distribution Origin - Object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. Detailed below
- Cache
Behavior Pulumi.Settings Aws. Light Sail. Inputs. Distribution Cache Behavior Settings An object that describes the cache behavior settings of the distribution. Detailed below
The following arguments are optional:
- Cache
Behaviors List<Pulumi.Aws. Light Sail. Inputs. Distribution Cache Behavior> - A set of configuration blocks that describe the per-path cache behavior of the distribution. Detailed below
- Certificate
Name string - The name of the SSL/TLS certificate attached to the distribution, if any.
- Ip
Address stringType - The IP address type of the distribution. Default:
dualstack
. - Is
Enabled bool - Indicates whether the distribution is enabled. Default:
true
. - Name string
- Name of the distribution.
- Dictionary<string, string>
- Map of tags for the Lightsail Distribution. To create a key-only tag, use an empty string as the value. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- Bundle
Id string - Bundle ID to use for the distribution.
- Default
Cache DistributionBehavior Default Cache Behavior Args - Object that describes the default cache behavior of the distribution. Detailed below
- Origin
Distribution
Origin Args - Object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. Detailed below
- Cache
Behavior DistributionSettings Cache Behavior Settings Args An object that describes the cache behavior settings of the distribution. Detailed below
The following arguments are optional:
- Cache
Behaviors []DistributionCache Behavior Args - A set of configuration blocks that describe the per-path cache behavior of the distribution. Detailed below
- Certificate
Name string - The name of the SSL/TLS certificate attached to the distribution, if any.
- Ip
Address stringType - The IP address type of the distribution. Default:
dualstack
. - Is
Enabled bool - Indicates whether the distribution is enabled. Default:
true
. - Name string
- Name of the distribution.
- map[string]string
- Map of tags for the Lightsail Distribution. To create a key-only tag, use an empty string as the value. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- bundle
Id String - Bundle ID to use for the distribution.
- default
Cache DistributionBehavior Default Cache Behavior - Object that describes the default cache behavior of the distribution. Detailed below
- origin
Distribution
Origin - Object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. Detailed below
- cache
Behavior DistributionSettings Cache Behavior Settings An object that describes the cache behavior settings of the distribution. Detailed below
The following arguments are optional:
- cache
Behaviors List<DistributionCache Behavior> - A set of configuration blocks that describe the per-path cache behavior of the distribution. Detailed below
- certificate
Name String - The name of the SSL/TLS certificate attached to the distribution, if any.
- ip
Address StringType - The IP address type of the distribution. Default:
dualstack
. - is
Enabled Boolean - Indicates whether the distribution is enabled. Default:
true
. - name String
- Name of the distribution.
- Map<String,String>
- Map of tags for the Lightsail Distribution. To create a key-only tag, use an empty string as the value. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- bundle
Id string - Bundle ID to use for the distribution.
- default
Cache DistributionBehavior Default Cache Behavior - Object that describes the default cache behavior of the distribution. Detailed below
- origin
Distribution
Origin - Object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. Detailed below
- cache
Behavior DistributionSettings Cache Behavior Settings An object that describes the cache behavior settings of the distribution. Detailed below
The following arguments are optional:
- cache
Behaviors DistributionCache Behavior[] - A set of configuration blocks that describe the per-path cache behavior of the distribution. Detailed below
- certificate
Name string - The name of the SSL/TLS certificate attached to the distribution, if any.
- ip
Address stringType - The IP address type of the distribution. Default:
dualstack
. - is
Enabled boolean - Indicates whether the distribution is enabled. Default:
true
. - name string
- Name of the distribution.
- {[key: string]: string}
- Map of tags for the Lightsail Distribution. To create a key-only tag, use an empty string as the value. 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_ Distributionbehavior Default Cache Behavior Args - Object that describes the default cache behavior of the distribution. Detailed below
- origin
Distribution
Origin Args - Object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. Detailed below
- cache_
behavior_ Distributionsettings Cache Behavior Settings Args An object that describes the cache behavior settings of the distribution. Detailed below
The following arguments are optional:
- cache_
behaviors Sequence[DistributionCache Behavior Args] - A set of configuration blocks that describe the per-path cache behavior of the distribution. Detailed below
- certificate_
name str - The name of the SSL/TLS certificate attached to the distribution, if any.
- ip_
address_ strtype - The IP address type of the distribution. Default:
dualstack
. - is_
enabled bool - Indicates whether the distribution is enabled. Default:
true
. - name str
- Name of the distribution.
- Mapping[str, str]
- Map of tags for the Lightsail Distribution. To create a key-only tag, use an empty string as the value. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- bundle
Id String - Bundle ID to use for the distribution.
- default
Cache Property MapBehavior - Object that describes the default cache behavior of the distribution. Detailed below
- origin Property Map
- Object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. Detailed below
- cache
Behavior Property MapSettings An object that describes the cache behavior settings of the distribution. Detailed below
The following arguments are optional:
- cache
Behaviors List<Property Map> - A set of configuration blocks that describe the per-path cache behavior of the distribution. Detailed below
- certificate
Name String - The name of the SSL/TLS certificate attached to the distribution, if any.
- ip
Address StringType - The IP address type of the distribution. Default:
dualstack
. - is
Enabled Boolean - Indicates whether the distribution is enabled. Default:
true
. - name String
- Name of the distribution.
- Map<String>
- Map of tags for the Lightsail Distribution. To create a key-only tag, use an empty string as the value. 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:
- Alternative
Domain List<string>Names - The alternate domain names of the distribution.
- Arn string
- The Amazon Resource Name (ARN) of the distribution.
- Created
At string - The timestamp when the distribution was created.
- Domain
Name string - The domain name of the distribution.
- Id string
- The provider-assigned unique ID for this managed resource.
- Locations
List<Pulumi.
Aws. Light Sail. Outputs. Distribution Location> - An object that describes the location of the distribution, such as the AWS Region and Availability Zone. Detailed below
- Origin
Public stringDns - The public DNS of the origin.
- Resource
Type string - The Lightsail resource type (e.g., Distribution).
- Status string
- The status of the distribution.
- Support
Code string - The 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.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Alternative
Domain []stringNames - The alternate domain names of the distribution.
- Arn string
- The Amazon Resource Name (ARN) of the distribution.
- Created
At string - The timestamp when the distribution was created.
- Domain
Name string - The domain name of the distribution.
- Id string
- The provider-assigned unique ID for this managed resource.
- Locations
[]Distribution
Location - An object that describes the location of the distribution, such as the AWS Region and Availability Zone. Detailed below
- Origin
Public stringDns - The public DNS of the origin.
- Resource
Type string - The Lightsail resource type (e.g., Distribution).
- Status string
- The status of the distribution.
- Support
Code string - The 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.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- alternative
Domain List<String>Names - The alternate domain names of the distribution.
- arn String
- The Amazon Resource Name (ARN) of the distribution.
- created
At String - The timestamp when the distribution was created.
- domain
Name String - The domain name of the distribution.
- id String
- The provider-assigned unique ID for this managed resource.
- locations
List<Distribution
Location> - An object that describes the location of the distribution, such as the AWS Region and Availability Zone. Detailed below
- origin
Public StringDns - The public DNS of the origin.
- resource
Type String - The Lightsail resource type (e.g., Distribution).
- status String
- The status of the distribution.
- support
Code String - The 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.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- alternative
Domain string[]Names - The alternate domain names of the distribution.
- arn string
- The Amazon Resource Name (ARN) of the distribution.
- created
At string - The timestamp when the distribution was created.
- domain
Name string - The domain name of the distribution.
- id string
- The provider-assigned unique ID for this managed resource.
- locations
Distribution
Location[] - An object that describes the location of the distribution, such as the AWS Region and Availability Zone. Detailed below
- origin
Public stringDns - The public DNS of the origin.
- resource
Type string - The Lightsail resource type (e.g., Distribution).
- status string
- The status of the distribution.
- support
Code string - The 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.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- alternative_
domain_ Sequence[str]names - The alternate domain names of the distribution.
- arn str
- The Amazon Resource Name (ARN) of the distribution.
- created_
at str - The timestamp when the distribution was created.
- domain_
name str - The domain name of the distribution.
- id str
- The provider-assigned unique ID for this managed resource.
- locations
Sequence[Distribution
Location] - An object that describes the location of the distribution, such as the AWS Region and Availability Zone. Detailed below
- origin_
public_ strdns - The public DNS of the origin.
- resource_
type str - The Lightsail resource type (e.g., Distribution).
- status str
- The status of the distribution.
- support_
code str - The 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.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- alternative
Domain List<String>Names - The alternate domain names of the distribution.
- arn String
- The Amazon Resource Name (ARN) of the distribution.
- created
At String - The timestamp when the distribution was created.
- domain
Name String - The domain name of the distribution.
- id String
- The provider-assigned unique ID for this managed resource.
- locations List<Property Map>
- An object that describes the location of the distribution, such as the AWS Region and Availability Zone. Detailed below
- origin
Public StringDns - The public DNS of the origin.
- resource
Type String - The Lightsail resource type (e.g., Distribution).
- status String
- The status of the distribution.
- support
Code String - The 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.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
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)
Resource lookup is not supported in YAML
- 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.
- Alternative
Domain List<string>Names - The alternate domain names of the distribution.
- Arn string
- The Amazon Resource Name (ARN) of the distribution.
- Bundle
Id string - Bundle ID to use for the distribution.
- Cache
Behavior Pulumi.Settings Aws. Light Sail. Inputs. Distribution Cache Behavior Settings An object that describes the cache behavior settings of the distribution. Detailed below
The following arguments are optional:
- Cache
Behaviors List<Pulumi.Aws. Light Sail. Inputs. Distribution Cache Behavior> - A set of configuration blocks that describe the per-path cache behavior of the distribution. Detailed below
- Certificate
Name string - The name of the SSL/TLS certificate attached to the distribution, if any.
- Created
At string - The timestamp when the distribution was created.
- Default
Cache Pulumi.Behavior Aws. Light Sail. Inputs. Distribution Default Cache Behavior - Object that describes the default cache behavior of the distribution. Detailed below
- Domain
Name string - The domain name of the distribution.
- Ip
Address stringType - The IP address type of the distribution. Default:
dualstack
. - Is
Enabled bool - Indicates whether the distribution is enabled. Default:
true
. - Locations
List<Pulumi.
Aws. Light Sail. Inputs. Distribution Location> - An object that describes the location of the distribution, such as the AWS Region and Availability Zone. Detailed below
- Name string
- Name of the distribution.
- Origin
Pulumi.
Aws. Light Sail. Inputs. Distribution Origin - Object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. Detailed below
- Origin
Public stringDns - The public DNS of the origin.
- Resource
Type string - The Lightsail resource type (e.g., Distribution).
- Status string
- The status of the distribution.
- Support
Code string - The 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.
- Dictionary<string, string>
- Map of tags for the Lightsail Distribution. To create a key-only tag, use an empty string as the value. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Alternative
Domain []stringNames - The alternate domain names of the distribution.
- Arn string
- The Amazon Resource Name (ARN) of the distribution.
- Bundle
Id string - Bundle ID to use for the distribution.
- Cache
Behavior DistributionSettings Cache Behavior Settings Args An object that describes the cache behavior settings of the distribution. Detailed below
The following arguments are optional:
- Cache
Behaviors []DistributionCache Behavior Args - A set of configuration blocks that describe the per-path cache behavior of the distribution. Detailed below
- Certificate
Name string - The name of the SSL/TLS certificate attached to the distribution, if any.
- Created
At string - The timestamp when the distribution was created.
- Default
Cache DistributionBehavior Default Cache Behavior Args - Object that describes the default cache behavior of the distribution. Detailed below
- Domain
Name string - The domain name of the distribution.
- Ip
Address stringType - The IP address type of the distribution. Default:
dualstack
. - Is
Enabled bool - Indicates whether the distribution is enabled. Default:
true
. - Locations
[]Distribution
Location Args - An object that describes the location of the distribution, such as the AWS Region and Availability Zone. Detailed below
- Name string
- Name of the distribution.
- Origin
Distribution
Origin Args - Object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. Detailed below
- Origin
Public stringDns - The public DNS of the origin.
- Resource
Type string - The Lightsail resource type (e.g., Distribution).
- Status string
- The status of the distribution.
- Support
Code string - The 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.
- map[string]string
- Map of tags for the Lightsail Distribution. To create a key-only tag, use an empty string as the value. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- alternative
Domain List<String>Names - The alternate domain names of the distribution.
- arn String
- The Amazon Resource Name (ARN) of the distribution.
- bundle
Id String - Bundle ID to use for the distribution.
- cache
Behavior DistributionSettings Cache Behavior Settings An object that describes the cache behavior settings of the distribution. Detailed below
The following arguments are optional:
- cache
Behaviors List<DistributionCache Behavior> - A set of configuration blocks that describe the per-path cache behavior of the distribution. Detailed below
- certificate
Name String - The name of the SSL/TLS certificate attached to the distribution, if any.
- created
At String - The timestamp when the distribution was created.
- default
Cache DistributionBehavior Default Cache Behavior - Object that describes the default cache behavior of the distribution. Detailed below
- domain
Name String - The domain name of the distribution.
- ip
Address StringType - The IP address type of the distribution. Default:
dualstack
. - is
Enabled Boolean - Indicates whether the distribution is enabled. Default:
true
. - locations
List<Distribution
Location> - An object that describes the location of the distribution, such as the AWS Region and Availability Zone. Detailed below
- name String
- Name of the distribution.
- origin
Distribution
Origin - Object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. Detailed below
- origin
Public StringDns - The public DNS of the origin.
- resource
Type String - The Lightsail resource type (e.g., Distribution).
- status String
- The status of the distribution.
- support
Code String - The 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.
- Map<String,String>
- Map of tags for the Lightsail Distribution. To create a key-only tag, use an empty string as the value. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- alternative
Domain string[]Names - The alternate domain names of the distribution.
- arn string
- The Amazon Resource Name (ARN) of the distribution.
- bundle
Id string - Bundle ID to use for the distribution.
- cache
Behavior DistributionSettings Cache Behavior Settings An object that describes the cache behavior settings of the distribution. Detailed below
The following arguments are optional:
- cache
Behaviors DistributionCache Behavior[] - A set of configuration blocks that describe the per-path cache behavior of the distribution. Detailed below
- certificate
Name string - The name of the SSL/TLS certificate attached to the distribution, if any.
- created
At string - The timestamp when the distribution was created.
- default
Cache DistributionBehavior Default Cache Behavior - Object that describes the default cache behavior of the distribution. Detailed below
- domain
Name string - The domain name of the distribution.
- ip
Address stringType - The IP address type of the distribution. Default:
dualstack
. - is
Enabled boolean - Indicates whether the distribution is enabled. Default:
true
. - locations
Distribution
Location[] - An object that describes the location of the distribution, such as the AWS Region and Availability Zone. Detailed below
- name string
- Name of the distribution.
- origin
Distribution
Origin - Object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. Detailed below
- origin
Public stringDns - The public DNS of the origin.
- resource
Type string - The Lightsail resource type (e.g., Distribution).
- status string
- The status of the distribution.
- support
Code string - The 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.
- {[key: string]: string}
- Map of tags for the Lightsail Distribution. To create a key-only tag, use an empty string as the value. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- alternative_
domain_ Sequence[str]names - The alternate domain names of the distribution.
- arn str
- The Amazon Resource Name (ARN) of the distribution.
- bundle_
id str - Bundle ID to use for the distribution.
- cache_
behavior_ Distributionsettings Cache Behavior Settings Args An object that describes the cache behavior settings of the distribution. Detailed below
The following arguments are optional:
- cache_
behaviors Sequence[DistributionCache Behavior Args] - A set of configuration blocks that describe the per-path cache behavior of the distribution. Detailed below
- certificate_
name str - The name of the SSL/TLS certificate attached to the distribution, if any.
- created_
at str - The timestamp when the distribution was created.
- default_
cache_ Distributionbehavior Default Cache Behavior Args - Object that describes the default cache behavior of the distribution. Detailed below
- domain_
name str - The domain name of the distribution.
- ip_
address_ strtype - The IP address type of the distribution. Default:
dualstack
. - is_
enabled bool - Indicates whether the distribution is enabled. Default:
true
. - locations
Sequence[Distribution
Location Args] - An object that describes the location of the distribution, such as the AWS Region and Availability Zone. Detailed below
- name str
- Name of the distribution.
- origin
Distribution
Origin Args - Object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. Detailed below
- origin_
public_ strdns - The public DNS of the origin.
- resource_
type str - The Lightsail resource type (e.g., Distribution).
- status str
- The status of the distribution.
- support_
code str - The 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.
- Mapping[str, str]
- Map of tags for the Lightsail Distribution. To create a key-only tag, use an empty string as the value. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- alternative
Domain List<String>Names - The alternate domain names of the distribution.
- arn String
- The Amazon Resource Name (ARN) of the distribution.
- bundle
Id String - Bundle ID to use for the distribution.
- cache
Behavior Property MapSettings An object that describes the cache behavior settings of the distribution. Detailed below
The following arguments are optional:
- cache
Behaviors List<Property Map> - A set of configuration blocks that describe the per-path cache behavior of the distribution. Detailed below
- certificate
Name String - The name of the SSL/TLS certificate attached to the distribution, if any.
- created
At String - The timestamp when the distribution was created.
- default
Cache Property MapBehavior - Object that describes the default cache behavior of the distribution. Detailed below
- domain
Name String - The domain name of the distribution.
- ip
Address StringType - The IP address type of the distribution. Default:
dualstack
. - is
Enabled Boolean - Indicates whether the distribution is enabled. Default:
true
. - locations List<Property Map>
- An object that describes the location of the distribution, such as the AWS Region and Availability Zone. Detailed below
- name String
- Name of the distribution.
- origin Property Map
- Object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. Detailed below
- origin
Public StringDns - The public DNS of the origin.
- resource
Type String - The Lightsail resource type (e.g., Distribution).
- status String
- The status of the distribution.
- support
Code String - The 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.
- Map<String>
- Map of tags for the Lightsail Distribution. To create a key-only tag, use an empty string as the value. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
Supporting Types
DistributionCacheBehavior, DistributionCacheBehaviorArgs
DistributionCacheBehaviorSettings, DistributionCacheBehaviorSettingsArgs
- Allowed
Http stringMethods - The HTTP methods that are processed and forwarded to the distribution's origin.
- Cached
Http stringMethods - The HTTP method responses that are cached by your distribution.
- Default
Ttl int - The 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.
- Pulumi.
Aws. Light Sail. Inputs. Distribution Cache Behavior Settings Forwarded Cookies - An object that describes the cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded. Detailed below
- Forwarded
Headers Pulumi.Aws. Light Sail. Inputs. Distribution Cache Behavior Settings Forwarded Headers - An object that describes the headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded. Detailed below
- Forwarded
Query Pulumi.Strings Aws. Light Sail. Inputs. Distribution Cache Behavior Settings Forwarded Query Strings - An object that describes the query strings that are forwarded to the origin. Your content is cached based on the query strings that are forwarded. Detailed below
- Maximum
Ttl int - The 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 - The 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 stringMethods - The HTTP methods that are processed and forwarded to the distribution's origin.
- Cached
Http stringMethods - The HTTP method responses that are cached by your distribution.
- Default
Ttl int - The 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.
- Distribution
Cache Behavior Settings Forwarded Cookies - An object that describes the cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded. Detailed below
- Forwarded
Headers DistributionCache Behavior Settings Forwarded Headers - An object that describes the headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded. Detailed below
- Forwarded
Query DistributionStrings Cache Behavior Settings Forwarded Query Strings - An object that describes the query strings that are forwarded to the origin. Your content is cached based on the query strings that are forwarded. Detailed below
- Maximum
Ttl int - The 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 - The 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 StringMethods - The HTTP methods that are processed and forwarded to the distribution's origin.
- cached
Http StringMethods - The HTTP method responses that are cached by your distribution.
- default
Ttl Integer - The 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.
- Distribution
Cache Behavior Settings Forwarded Cookies - An object that describes the cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded. Detailed below
- forwarded
Headers DistributionCache Behavior Settings Forwarded Headers - An object that describes the headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded. Detailed below
- forwarded
Query DistributionStrings Cache Behavior Settings Forwarded Query Strings - An object that describes the query strings that are forwarded to the origin. Your content is cached based on the query strings that are forwarded. Detailed below
- maximum
Ttl Integer - The 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 Integer - The 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 stringMethods - The HTTP methods that are processed and forwarded to the distribution's origin.
- cached
Http stringMethods - The HTTP method responses that are cached by your distribution.
- default
Ttl number - The 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.
- Distribution
Cache Behavior Settings Forwarded Cookies - An object that describes the cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded. Detailed below
- forwarded
Headers DistributionCache Behavior Settings Forwarded Headers - An object that describes the headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded. Detailed below
- forwarded
Query DistributionStrings Cache Behavior Settings Forwarded Query Strings - An object that describes the query strings that are forwarded to the origin. Your content is cached based on the query strings that are forwarded. Detailed below
- maximum
Ttl number - The 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 number - The 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_ strmethods - The HTTP methods that are processed and forwarded to the distribution's origin.
- cached_
http_ strmethods - The HTTP method responses that are cached by your distribution.
- default_
ttl int - The 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.
- Distribution
Cache Behavior Settings Forwarded Cookies - An object that describes the cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded. Detailed below
- forwarded_
headers DistributionCache Behavior Settings Forwarded Headers - An object that describes the headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded. Detailed below
- forwarded_
query_ Distributionstrings Cache Behavior Settings Forwarded Query Strings - An object that describes the query strings that are forwarded to the origin. Your content is cached based on the query strings that are forwarded. Detailed below
- maximum_
ttl int - The 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 - The 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 StringMethods - The HTTP methods that are processed and forwarded to the distribution's origin.
- cached
Http StringMethods - The HTTP method responses that are cached by your distribution.
- default
Ttl Number - The 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.
- Property Map
- An object that describes the cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded. Detailed below
- forwarded
Headers Property Map - An object that describes the headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded. Detailed below
- forwarded
Query Property MapStrings - An object that describes the query strings that are forwarded to the origin. Your content is cached based on the query strings that are forwarded. Detailed below
- maximum
Ttl Number - The 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 Number - The 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
- List<string>
- The specific cookies to forward to your distribution's origin.
- Option string
- Specifies which cookies to forward to the distribution's origin for a cache behavior: all, none, or allow-list to forward only the cookies specified in the cookiesAllowList parameter.
- []string
- The specific cookies to forward to your distribution's origin.
- Option string
- Specifies which cookies to forward to the distribution's origin for a cache behavior: all, none, or allow-list to forward only the cookies specified in the cookiesAllowList parameter.
- List<String>
- The specific cookies to forward to your distribution's origin.
- option String
- Specifies which cookies to forward to the distribution's origin for a cache behavior: all, none, or allow-list to forward only the cookies specified in the cookiesAllowList parameter.
- string[]
- The specific cookies to forward to your distribution's origin.
- option string
- Specifies which cookies to forward to the distribution's origin for a cache behavior: all, none, or allow-list to forward only the cookies specified in the cookiesAllowList parameter.
- Sequence[str]
- The specific cookies to forward to your distribution's origin.
- option str
- Specifies which cookies to forward to the distribution's origin for a cache behavior: all, none, or allow-list to forward only the cookies specified in the cookiesAllowList parameter.
- List<String>
- The specific cookies to forward to your distribution's origin.
- option String
- Specifies which cookies to forward to the distribution's origin for a cache behavior: all, none, or allow-list to forward only the cookies specified in the cookiesAllowList parameter.
DistributionCacheBehaviorSettingsForwardedHeaders, DistributionCacheBehaviorSettingsForwardedHeadersArgs
- Headers
Allow List<string>Lists - The specific headers to forward to your distribution's origin.
- Option string
- The headers that you want your distribution to forward to your origin and base caching on.
- Headers
Allow []stringLists - The specific headers to forward to your distribution's origin.
- Option string
- The headers that you want your distribution to forward to your origin and base caching on.
- headers
Allow List<String>Lists - The specific headers to forward to your distribution's origin.
- option String
- The headers that you want your distribution to forward to your origin and base caching on.
- headers
Allow string[]Lists - The specific headers to forward to your distribution's origin.
- option string
- The headers that you want your distribution to forward to your origin and base caching on.
- headers_
allow_ Sequence[str]lists - The specific headers to forward to your distribution's origin.
- option str
- The headers that you want your distribution to forward to your origin and base caching on.
- headers
Allow List<String>Lists - The specific headers to forward to your distribution's origin.
- option String
- The headers that you want your distribution to forward to your origin and base caching on.
DistributionCacheBehaviorSettingsForwardedQueryStrings, DistributionCacheBehaviorSettingsForwardedQueryStringsArgs
- Option bool
- Indicates whether the distribution forwards and caches based on query strings.
- Query
Strings List<string>Allowed Lists - The specific query strings that the distribution forwards to the origin.
- Option bool
- Indicates whether the distribution forwards and caches based on query strings.
- Query
Strings []stringAllowed Lists - The specific query strings that the distribution forwards to the origin.
- option Boolean
- Indicates whether the distribution forwards and caches based on query strings.
- query
Strings List<String>Allowed Lists - The specific query strings that the distribution forwards to the origin.
- option boolean
- Indicates whether the distribution forwards and caches based on query strings.
- query
Strings string[]Allowed Lists - The specific query strings that the distribution forwards to the origin.
- option bool
- Indicates whether the distribution forwards and caches based on query strings.
- query_
strings_ Sequence[str]allowed_ lists - The specific query strings that the distribution forwards to the origin.
- option Boolean
- Indicates whether the distribution forwards and caches based on query strings.
- query
Strings List<String>Allowed Lists - The specific query strings that the distribution forwards to the origin.
DistributionDefaultCacheBehavior, DistributionDefaultCacheBehaviorArgs
- Behavior string
- The cache behavior of the distribution. Valid values:
cache
anddont-cache
.
- Behavior string
- The cache behavior of the distribution. Valid values:
cache
anddont-cache
.
- behavior String
- The cache behavior of the distribution. Valid values:
cache
anddont-cache
.
- behavior string
- The cache behavior of the distribution. Valid values:
cache
anddont-cache
.
- behavior str
- The cache behavior of the distribution. Valid values:
cache
anddont-cache
.
- behavior String
- The cache behavior of the distribution. Valid values:
cache
anddont-cache
.
DistributionLocation, DistributionLocationArgs
- Availability
Zone string - The Availability Zone. Follows the format us-east-2a (case-sensitive).
- Region
Name string - The AWS Region name.
- Availability
Zone string - The Availability Zone. Follows the format us-east-2a (case-sensitive).
- Region
Name string - The AWS Region name.
- availability
Zone String - The Availability Zone. Follows the format us-east-2a (case-sensitive).
- region
Name String - The AWS Region name.
- availability
Zone string - The Availability Zone. Follows the format us-east-2a (case-sensitive).
- region
Name string - The AWS Region name.
- availability_
zone str - The Availability Zone. Follows the format us-east-2a (case-sensitive).
- region_
name str - The AWS Region name.
- availability
Zone String - The Availability Zone. Follows the format us-east-2a (case-sensitive).
- region
Name String - The AWS Region name.
DistributionOrigin, DistributionOriginArgs
- Name string
- The 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 string - The AWS Region name of the origin resource.
- Protocol
Policy string - The protocol that your Amazon Lightsail distribution uses when establishing a connection with your origin to pull content.
- Resource
Type string - The resource type of the origin resource (e.g., Instance).
- Name string
- The 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 string - The AWS Region name of the origin resource.
- Protocol
Policy string - The protocol that your Amazon Lightsail distribution uses when establishing a connection with your origin to pull content.
- Resource
Type string - The resource type of the origin resource (e.g., Instance).
- name String
- The 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 String - The AWS Region name of the origin resource.
- protocol
Policy String - The protocol that your Amazon Lightsail distribution uses when establishing a connection with your origin to pull content.
- resource
Type String - The resource type of the origin resource (e.g., Instance).
- name string
- The 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 string - The AWS Region name of the origin resource.
- protocol
Policy string - The protocol that your Amazon Lightsail distribution uses when establishing a connection with your origin to pull content.
- resource
Type string - The resource type of the origin resource (e.g., Instance).
- name str
- The 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 - The AWS Region name of the origin resource.
- protocol_
policy str - The protocol that your Amazon Lightsail distribution uses when establishing a connection with your origin to pull content.
- resource_
type str - The resource type of the origin resource (e.g., Instance).
- name String
- The 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 String - The AWS Region name of the origin resource.
- protocol
Policy String - The protocol that your Amazon Lightsail distribution uses when establishing a connection with your origin to pull content.
- resource
Type String - The resource type of the origin resource (e.g., Instance).
Import
Using pulumi import
, import Lightsail Distribution using the id
. For example:
$ pulumi import aws:lightsail/distribution:Distribution example rft-8012925589
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.
Try AWS Native preview for resources not in the classic version.