1. Packages
  2. Ionoscloud
  3. API Docs
  4. cdn
  5. Distribution
IonosCloud v0.2.3 published on Tuesday, May 13, 2025 by ionos-cloud

ionoscloud.cdn.Distribution

Explore with Pulumi AI

ionoscloud logo
IonosCloud v0.2.3 published on Tuesday, May 13, 2025 by ionos-cloud

    Manages a CDN Distribution on IonosCloud.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
    
    const example = new ionoscloud.cdn.Distribution("example", {
        domain: "example.com",
        certificateId: cert.id,
        routingRules: [
            {
                scheme: "https",
                prefix: "/api",
                upstream: {
                    host: "server.example.com",
                    caching: true,
                    waf: true,
                    sniMode: "distribution",
                    rateLimitClass: "R500",
                    geoRestrictions: {
                        allowLists: [
                            "CN",
                            "RU",
                        ],
                    },
                },
            },
            {
                scheme: "http/https",
                prefix: "/api2",
                upstream: {
                    host: "server2.example.com",
                    caching: false,
                    waf: false,
                    sniMode: "origin",
                    rateLimitClass: "R10",
                    geoRestrictions: {
                        blockLists: [
                            "CN",
                            "RU",
                        ],
                    },
                },
            },
        ],
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.cdn.Distribution("example",
        domain="example.com",
        certificate_id=cert["id"],
        routing_rules=[
            {
                "scheme": "https",
                "prefix": "/api",
                "upstream": {
                    "host": "server.example.com",
                    "caching": True,
                    "waf": True,
                    "sni_mode": "distribution",
                    "rate_limit_class": "R500",
                    "geo_restrictions": {
                        "allow_lists": [
                            "CN",
                            "RU",
                        ],
                    },
                },
            },
            {
                "scheme": "http/https",
                "prefix": "/api2",
                "upstream": {
                    "host": "server2.example.com",
                    "caching": False,
                    "waf": False,
                    "sni_mode": "origin",
                    "rate_limit_class": "R10",
                    "geo_restrictions": {
                        "block_lists": [
                            "CN",
                            "RU",
                        ],
                    },
                },
            },
        ])
    
    package main
    
    import (
    	"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/cdn"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cdn.NewDistribution(ctx, "example", &cdn.DistributionArgs{
    			Domain:        pulumi.String("example.com"),
    			CertificateId: pulumi.Any(cert.Id),
    			RoutingRules: cdn.DistributionRoutingRuleArray{
    				&cdn.DistributionRoutingRuleArgs{
    					Scheme: pulumi.String("https"),
    					Prefix: pulumi.String("/api"),
    					Upstream: &cdn.DistributionRoutingRuleUpstreamArgs{
    						Host:           pulumi.String("server.example.com"),
    						Caching:        pulumi.Bool(true),
    						Waf:            pulumi.Bool(true),
    						SniMode:        pulumi.String("distribution"),
    						RateLimitClass: pulumi.String("R500"),
    						GeoRestrictions: &cdn.DistributionRoutingRuleUpstreamGeoRestrictionsArgs{
    							AllowLists: pulumi.StringArray{
    								pulumi.String("CN"),
    								pulumi.String("RU"),
    							},
    						},
    					},
    				},
    				&cdn.DistributionRoutingRuleArgs{
    					Scheme: pulumi.String("http/https"),
    					Prefix: pulumi.String("/api2"),
    					Upstream: &cdn.DistributionRoutingRuleUpstreamArgs{
    						Host:           pulumi.String("server2.example.com"),
    						Caching:        pulumi.Bool(false),
    						Waf:            pulumi.Bool(false),
    						SniMode:        pulumi.String("origin"),
    						RateLimitClass: pulumi.String("R10"),
    						GeoRestrictions: &cdn.DistributionRoutingRuleUpstreamGeoRestrictionsArgs{
    							BlockLists: pulumi.StringArray{
    								pulumi.String("CN"),
    								pulumi.String("RU"),
    							},
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Ionoscloud.Cdn.Distribution("example", new()
        {
            Domain = "example.com",
            CertificateId = cert.Id,
            RoutingRules = new[]
            {
                new Ionoscloud.Cdn.Inputs.DistributionRoutingRuleArgs
                {
                    Scheme = "https",
                    Prefix = "/api",
                    Upstream = new Ionoscloud.Cdn.Inputs.DistributionRoutingRuleUpstreamArgs
                    {
                        Host = "server.example.com",
                        Caching = true,
                        Waf = true,
                        SniMode = "distribution",
                        RateLimitClass = "R500",
                        GeoRestrictions = new Ionoscloud.Cdn.Inputs.DistributionRoutingRuleUpstreamGeoRestrictionsArgs
                        {
                            AllowLists = new[]
                            {
                                "CN",
                                "RU",
                            },
                        },
                    },
                },
                new Ionoscloud.Cdn.Inputs.DistributionRoutingRuleArgs
                {
                    Scheme = "http/https",
                    Prefix = "/api2",
                    Upstream = new Ionoscloud.Cdn.Inputs.DistributionRoutingRuleUpstreamArgs
                    {
                        Host = "server2.example.com",
                        Caching = false,
                        Waf = false,
                        SniMode = "origin",
                        RateLimitClass = "R10",
                        GeoRestrictions = new Ionoscloud.Cdn.Inputs.DistributionRoutingRuleUpstreamGeoRestrictionsArgs
                        {
                            BlockLists = new[]
                            {
                                "CN",
                                "RU",
                            },
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.cdn.Distribution;
    import com.pulumi.ionoscloud.cdn.DistributionArgs;
    import com.pulumi.ionoscloud.cdn.inputs.DistributionRoutingRuleArgs;
    import com.pulumi.ionoscloud.cdn.inputs.DistributionRoutingRuleUpstreamArgs;
    import com.pulumi.ionoscloud.cdn.inputs.DistributionRoutingRuleUpstreamGeoRestrictionsArgs;
    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 Distribution("example", DistributionArgs.builder()
                .domain("example.com")
                .certificateId(cert.id())
                .routingRules(            
                    DistributionRoutingRuleArgs.builder()
                        .scheme("https")
                        .prefix("/api")
                        .upstream(DistributionRoutingRuleUpstreamArgs.builder()
                            .host("server.example.com")
                            .caching(true)
                            .waf(true)
                            .sniMode("distribution")
                            .rateLimitClass("R500")
                            .geoRestrictions(DistributionRoutingRuleUpstreamGeoRestrictionsArgs.builder()
                                .allowLists(                            
                                    "CN",
                                    "RU")
                                .build())
                            .build())
                        .build(),
                    DistributionRoutingRuleArgs.builder()
                        .scheme("http/https")
                        .prefix("/api2")
                        .upstream(DistributionRoutingRuleUpstreamArgs.builder()
                            .host("server2.example.com")
                            .caching(false)
                            .waf(false)
                            .sniMode("origin")
                            .rateLimitClass("R10")
                            .geoRestrictions(DistributionRoutingRuleUpstreamGeoRestrictionsArgs.builder()
                                .blockLists(                            
                                    "CN",
                                    "RU")
                                .build())
                            .build())
                        .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: ionoscloud:cdn:Distribution
        properties:
          domain: example.com
          certificateId: ${cert.id}
          routingRules:
            - scheme: https
              prefix: /api
              upstream:
                host: server.example.com
                caching: true
                waf: true
                sniMode: distribution
                rateLimitClass: R500
                geoRestrictions:
                  allowLists:
                    - CN
                    - RU
            - scheme: http/https
              prefix: /api2
              upstream:
                host: server2.example.com
                caching: false
                waf: false
                sniMode: origin
                rateLimitClass: R10
                geoRestrictions:
                  blockLists:
                    - CN
                    - RU
    

    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,
                     domain: Optional[str] = None,
                     routing_rules: Optional[Sequence[DistributionRoutingRuleArgs]] = None,
                     certificate_id: Optional[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: ionoscloud:cdn: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 distributionResource = new Ionoscloud.Cdn.Distribution("distributionResource", new()
    {
        Domain = "string",
        RoutingRules = new[]
        {
            new Ionoscloud.Cdn.Inputs.DistributionRoutingRuleArgs
            {
                Prefix = "string",
                Scheme = "string",
                Upstream = new Ionoscloud.Cdn.Inputs.DistributionRoutingRuleUpstreamArgs
                {
                    Caching = false,
                    Host = "string",
                    RateLimitClass = "string",
                    SniMode = "string",
                    Waf = false,
                    GeoRestrictions = new Ionoscloud.Cdn.Inputs.DistributionRoutingRuleUpstreamGeoRestrictionsArgs
                    {
                        AllowLists = new[]
                        {
                            "string",
                        },
                        BlockLists = new[]
                        {
                            "string",
                        },
                    },
                },
            },
        },
        CertificateId = "string",
    });
    
    example, err := cdn.NewDistribution(ctx, "distributionResource", &cdn.DistributionArgs{
    	Domain: pulumi.String("string"),
    	RoutingRules: cdn.DistributionRoutingRuleArray{
    		&cdn.DistributionRoutingRuleArgs{
    			Prefix: pulumi.String("string"),
    			Scheme: pulumi.String("string"),
    			Upstream: &cdn.DistributionRoutingRuleUpstreamArgs{
    				Caching:        pulumi.Bool(false),
    				Host:           pulumi.String("string"),
    				RateLimitClass: pulumi.String("string"),
    				SniMode:        pulumi.String("string"),
    				Waf:            pulumi.Bool(false),
    				GeoRestrictions: &cdn.DistributionRoutingRuleUpstreamGeoRestrictionsArgs{
    					AllowLists: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    					BlockLists: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    				},
    			},
    		},
    	},
    	CertificateId: pulumi.String("string"),
    })
    
    var distributionResource = new Distribution("distributionResource", DistributionArgs.builder()
        .domain("string")
        .routingRules(DistributionRoutingRuleArgs.builder()
            .prefix("string")
            .scheme("string")
            .upstream(DistributionRoutingRuleUpstreamArgs.builder()
                .caching(false)
                .host("string")
                .rateLimitClass("string")
                .sniMode("string")
                .waf(false)
                .geoRestrictions(DistributionRoutingRuleUpstreamGeoRestrictionsArgs.builder()
                    .allowLists("string")
                    .blockLists("string")
                    .build())
                .build())
            .build())
        .certificateId("string")
        .build());
    
    distribution_resource = ionoscloud.cdn.Distribution("distributionResource",
        domain="string",
        routing_rules=[{
            "prefix": "string",
            "scheme": "string",
            "upstream": {
                "caching": False,
                "host": "string",
                "rate_limit_class": "string",
                "sni_mode": "string",
                "waf": False,
                "geo_restrictions": {
                    "allow_lists": ["string"],
                    "block_lists": ["string"],
                },
            },
        }],
        certificate_id="string")
    
    const distributionResource = new ionoscloud.cdn.Distribution("distributionResource", {
        domain: "string",
        routingRules: [{
            prefix: "string",
            scheme: "string",
            upstream: {
                caching: false,
                host: "string",
                rateLimitClass: "string",
                sniMode: "string",
                waf: false,
                geoRestrictions: {
                    allowLists: ["string"],
                    blockLists: ["string"],
                },
            },
        }],
        certificateId: "string",
    });
    
    type: ionoscloud:cdn:Distribution
    properties:
        certificateId: string
        domain: string
        routingRules:
            - prefix: string
              scheme: string
              upstream:
                caching: false
                geoRestrictions:
                    allowLists:
                        - string
                    blockLists:
                        - string
                host: string
                rateLimitClass: string
                sniMode: string
                waf: false
    

    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:

    Domain string
    [string] The domain of the distribution.
    RoutingRules List<Ionoscloud.DistributionRoutingRule>
    [list] The routing rules for the distribution.
    CertificateId string
    [string] The ID of the certificate to use for the distribution. You can create certificates with the certificate resource.
    Domain string
    [string] The domain of the distribution.
    RoutingRules []DistributionRoutingRuleArgs
    [list] The routing rules for the distribution.
    CertificateId string
    [string] The ID of the certificate to use for the distribution. You can create certificates with the certificate resource.
    domain String
    [string] The domain of the distribution.
    routingRules List<DistributionRoutingRule>
    [list] The routing rules for the distribution.
    certificateId String
    [string] The ID of the certificate to use for the distribution. You can create certificates with the certificate resource.
    domain string
    [string] The domain of the distribution.
    routingRules DistributionRoutingRule[]
    [list] The routing rules for the distribution.
    certificateId string
    [string] The ID of the certificate to use for the distribution. You can create certificates with the certificate resource.
    domain str
    [string] The domain of the distribution.
    routing_rules Sequence[DistributionRoutingRuleArgs]
    [list] The routing rules for the distribution.
    certificate_id str
    [string] The ID of the certificate to use for the distribution. You can create certificates with the certificate resource.
    domain String
    [string] The domain of the distribution.
    routingRules List<Property Map>
    [list] The routing rules for the distribution.
    certificateId String
    [string] The ID of the certificate to use for the distribution. You can create certificates with the certificate resource.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    PublicEndpointV4 string
    IP of the distribution, it has to be included on the domain DNS Zone as A record.
    PublicEndpointV6 string
    IP of the distribution, it has to be included on the domain DNS Zone as AAAA record.
    ResourceUrn string
    Unique resource indentifier.
    Id string
    The provider-assigned unique ID for this managed resource.
    PublicEndpointV4 string
    IP of the distribution, it has to be included on the domain DNS Zone as A record.
    PublicEndpointV6 string
    IP of the distribution, it has to be included on the domain DNS Zone as AAAA record.
    ResourceUrn string
    Unique resource indentifier.
    id String
    The provider-assigned unique ID for this managed resource.
    publicEndpointV4 String
    IP of the distribution, it has to be included on the domain DNS Zone as A record.
    publicEndpointV6 String
    IP of the distribution, it has to be included on the domain DNS Zone as AAAA record.
    resourceUrn String
    Unique resource indentifier.
    id string
    The provider-assigned unique ID for this managed resource.
    publicEndpointV4 string
    IP of the distribution, it has to be included on the domain DNS Zone as A record.
    publicEndpointV6 string
    IP of the distribution, it has to be included on the domain DNS Zone as AAAA record.
    resourceUrn string
    Unique resource indentifier.
    id str
    The provider-assigned unique ID for this managed resource.
    public_endpoint_v4 str
    IP of the distribution, it has to be included on the domain DNS Zone as A record.
    public_endpoint_v6 str
    IP of the distribution, it has to be included on the domain DNS Zone as AAAA record.
    resource_urn str
    Unique resource indentifier.
    id String
    The provider-assigned unique ID for this managed resource.
    publicEndpointV4 String
    IP of the distribution, it has to be included on the domain DNS Zone as A record.
    publicEndpointV6 String
    IP of the distribution, it has to be included on the domain DNS Zone as AAAA record.
    resourceUrn String
    Unique resource indentifier.

    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,
            certificate_id: Optional[str] = None,
            domain: Optional[str] = None,
            public_endpoint_v4: Optional[str] = None,
            public_endpoint_v6: Optional[str] = None,
            resource_urn: Optional[str] = None,
            routing_rules: Optional[Sequence[DistributionRoutingRuleArgs]] = 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: ionoscloud:cdn: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:
    CertificateId string
    [string] The ID of the certificate to use for the distribution. You can create certificates with the certificate resource.
    Domain string
    [string] The domain of the distribution.
    PublicEndpointV4 string
    IP of the distribution, it has to be included on the domain DNS Zone as A record.
    PublicEndpointV6 string
    IP of the distribution, it has to be included on the domain DNS Zone as AAAA record.
    ResourceUrn string
    Unique resource indentifier.
    RoutingRules List<Ionoscloud.DistributionRoutingRule>
    [list] The routing rules for the distribution.
    CertificateId string
    [string] The ID of the certificate to use for the distribution. You can create certificates with the certificate resource.
    Domain string
    [string] The domain of the distribution.
    PublicEndpointV4 string
    IP of the distribution, it has to be included on the domain DNS Zone as A record.
    PublicEndpointV6 string
    IP of the distribution, it has to be included on the domain DNS Zone as AAAA record.
    ResourceUrn string
    Unique resource indentifier.
    RoutingRules []DistributionRoutingRuleArgs
    [list] The routing rules for the distribution.
    certificateId String
    [string] The ID of the certificate to use for the distribution. You can create certificates with the certificate resource.
    domain String
    [string] The domain of the distribution.
    publicEndpointV4 String
    IP of the distribution, it has to be included on the domain DNS Zone as A record.
    publicEndpointV6 String
    IP of the distribution, it has to be included on the domain DNS Zone as AAAA record.
    resourceUrn String
    Unique resource indentifier.
    routingRules List<DistributionRoutingRule>
    [list] The routing rules for the distribution.
    certificateId string
    [string] The ID of the certificate to use for the distribution. You can create certificates with the certificate resource.
    domain string
    [string] The domain of the distribution.
    publicEndpointV4 string
    IP of the distribution, it has to be included on the domain DNS Zone as A record.
    publicEndpointV6 string
    IP of the distribution, it has to be included on the domain DNS Zone as AAAA record.
    resourceUrn string
    Unique resource indentifier.
    routingRules DistributionRoutingRule[]
    [list] The routing rules for the distribution.
    certificate_id str
    [string] The ID of the certificate to use for the distribution. You can create certificates with the certificate resource.
    domain str
    [string] The domain of the distribution.
    public_endpoint_v4 str
    IP of the distribution, it has to be included on the domain DNS Zone as A record.
    public_endpoint_v6 str
    IP of the distribution, it has to be included on the domain DNS Zone as AAAA record.
    resource_urn str
    Unique resource indentifier.
    routing_rules Sequence[DistributionRoutingRuleArgs]
    [list] The routing rules for the distribution.
    certificateId String
    [string] The ID of the certificate to use for the distribution. You can create certificates with the certificate resource.
    domain String
    [string] The domain of the distribution.
    publicEndpointV4 String
    IP of the distribution, it has to be included on the domain DNS Zone as A record.
    publicEndpointV6 String
    IP of the distribution, it has to be included on the domain DNS Zone as AAAA record.
    resourceUrn String
    Unique resource indentifier.
    routingRules List<Property Map>
    [list] The routing rules for the distribution.

    Supporting Types

    DistributionRoutingRule, DistributionRoutingRuleArgs

    Prefix string
    [string] The prefix of the routing rule.
    Scheme string
    [string] The scheme of the routing rule.
    Upstream Ionoscloud.DistributionRoutingRuleUpstream
    [map] - A map of properties for the rule
    Prefix string
    [string] The prefix of the routing rule.
    Scheme string
    [string] The scheme of the routing rule.
    Upstream DistributionRoutingRuleUpstream
    [map] - A map of properties for the rule
    prefix String
    [string] The prefix of the routing rule.
    scheme String
    [string] The scheme of the routing rule.
    upstream DistributionRoutingRuleUpstream
    [map] - A map of properties for the rule
    prefix string
    [string] The prefix of the routing rule.
    scheme string
    [string] The scheme of the routing rule.
    upstream DistributionRoutingRuleUpstream
    [map] - A map of properties for the rule
    prefix str
    [string] The prefix of the routing rule.
    scheme str
    [string] The scheme of the routing rule.
    upstream DistributionRoutingRuleUpstream
    [map] - A map of properties for the rule
    prefix String
    [string] The prefix of the routing rule.
    scheme String
    [string] The scheme of the routing rule.
    upstream Property Map
    [map] - A map of properties for the rule

    DistributionRoutingRuleUpstream, DistributionRoutingRuleUpstreamArgs

    Caching bool
    [bool] Enable or disable caching. If enabled, the CDN will cache the responses from the upstream host. Subsequent requests for the same resource will be served from the cache.
    Host string
    [string] The upstream host that handles the requests if not already cached. This host will be protected by the WAF if the option is enabled.
    RateLimitClass string
    [string] Rate limit class that will be applied to limit the number of incoming requests per IP.
    SniMode string
    [string] The SNI (Server Name Indication) mode of the upstream. It supports two modes: 1) distribution: for outgoing connections to the upstream host, the CDN requires the upstream host to present a valid certificate that matches the configured domain of the CDN distribution; 2) origin: for outgoing connections to the upstream host, the CDN requires the upstream host to present a valid certificate that matches the configured upstream/origin hostname.
    Waf bool
    [bool] Enable or disable WAF to protect the upstream host.
    GeoRestrictions Ionoscloud.DistributionRoutingRuleUpstreamGeoRestrictions
    [map] - A map of geo_restrictions
    Caching bool
    [bool] Enable or disable caching. If enabled, the CDN will cache the responses from the upstream host. Subsequent requests for the same resource will be served from the cache.
    Host string
    [string] The upstream host that handles the requests if not already cached. This host will be protected by the WAF if the option is enabled.
    RateLimitClass string
    [string] Rate limit class that will be applied to limit the number of incoming requests per IP.
    SniMode string
    [string] The SNI (Server Name Indication) mode of the upstream. It supports two modes: 1) distribution: for outgoing connections to the upstream host, the CDN requires the upstream host to present a valid certificate that matches the configured domain of the CDN distribution; 2) origin: for outgoing connections to the upstream host, the CDN requires the upstream host to present a valid certificate that matches the configured upstream/origin hostname.
    Waf bool
    [bool] Enable or disable WAF to protect the upstream host.
    GeoRestrictions DistributionRoutingRuleUpstreamGeoRestrictions
    [map] - A map of geo_restrictions
    caching Boolean
    [bool] Enable or disable caching. If enabled, the CDN will cache the responses from the upstream host. Subsequent requests for the same resource will be served from the cache.
    host String
    [string] The upstream host that handles the requests if not already cached. This host will be protected by the WAF if the option is enabled.
    rateLimitClass String
    [string] Rate limit class that will be applied to limit the number of incoming requests per IP.
    sniMode String
    [string] The SNI (Server Name Indication) mode of the upstream. It supports two modes: 1) distribution: for outgoing connections to the upstream host, the CDN requires the upstream host to present a valid certificate that matches the configured domain of the CDN distribution; 2) origin: for outgoing connections to the upstream host, the CDN requires the upstream host to present a valid certificate that matches the configured upstream/origin hostname.
    waf Boolean
    [bool] Enable or disable WAF to protect the upstream host.
    geoRestrictions DistributionRoutingRuleUpstreamGeoRestrictions
    [map] - A map of geo_restrictions
    caching boolean
    [bool] Enable or disable caching. If enabled, the CDN will cache the responses from the upstream host. Subsequent requests for the same resource will be served from the cache.
    host string
    [string] The upstream host that handles the requests if not already cached. This host will be protected by the WAF if the option is enabled.
    rateLimitClass string
    [string] Rate limit class that will be applied to limit the number of incoming requests per IP.
    sniMode string
    [string] The SNI (Server Name Indication) mode of the upstream. It supports two modes: 1) distribution: for outgoing connections to the upstream host, the CDN requires the upstream host to present a valid certificate that matches the configured domain of the CDN distribution; 2) origin: for outgoing connections to the upstream host, the CDN requires the upstream host to present a valid certificate that matches the configured upstream/origin hostname.
    waf boolean
    [bool] Enable or disable WAF to protect the upstream host.
    geoRestrictions DistributionRoutingRuleUpstreamGeoRestrictions
    [map] - A map of geo_restrictions
    caching bool
    [bool] Enable or disable caching. If enabled, the CDN will cache the responses from the upstream host. Subsequent requests for the same resource will be served from the cache.
    host str
    [string] The upstream host that handles the requests if not already cached. This host will be protected by the WAF if the option is enabled.
    rate_limit_class str
    [string] Rate limit class that will be applied to limit the number of incoming requests per IP.
    sni_mode str
    [string] The SNI (Server Name Indication) mode of the upstream. It supports two modes: 1) distribution: for outgoing connections to the upstream host, the CDN requires the upstream host to present a valid certificate that matches the configured domain of the CDN distribution; 2) origin: for outgoing connections to the upstream host, the CDN requires the upstream host to present a valid certificate that matches the configured upstream/origin hostname.
    waf bool
    [bool] Enable or disable WAF to protect the upstream host.
    geo_restrictions DistributionRoutingRuleUpstreamGeoRestrictions
    [map] - A map of geo_restrictions
    caching Boolean
    [bool] Enable or disable caching. If enabled, the CDN will cache the responses from the upstream host. Subsequent requests for the same resource will be served from the cache.
    host String
    [string] The upstream host that handles the requests if not already cached. This host will be protected by the WAF if the option is enabled.
    rateLimitClass String
    [string] Rate limit class that will be applied to limit the number of incoming requests per IP.
    sniMode String
    [string] The SNI (Server Name Indication) mode of the upstream. It supports two modes: 1) distribution: for outgoing connections to the upstream host, the CDN requires the upstream host to present a valid certificate that matches the configured domain of the CDN distribution; 2) origin: for outgoing connections to the upstream host, the CDN requires the upstream host to present a valid certificate that matches the configured upstream/origin hostname.
    waf Boolean
    [bool] Enable or disable WAF to protect the upstream host.
    geoRestrictions Property Map
    [map] - A map of geo_restrictions

    DistributionRoutingRuleUpstreamGeoRestrictions, DistributionRoutingRuleUpstreamGeoRestrictionsArgs

    AllowLists List<string>
    [string] List of allowed countries
    BlockLists List<string>
    [string] List of blocked countries
    AllowLists []string
    [string] List of allowed countries
    BlockLists []string
    [string] List of blocked countries
    allowLists List<String>
    [string] List of allowed countries
    blockLists List<String>
    [string] List of blocked countries
    allowLists string[]
    [string] List of allowed countries
    blockLists string[]
    [string] List of blocked countries
    allow_lists Sequence[str]
    [string] List of allowed countries
    block_lists Sequence[str]
    [string] List of blocked countries
    allowLists List<String>
    [string] List of allowed countries
    blockLists List<String>
    [string] List of blocked countries

    Import

    Resource Distribution can be imported using the resource id, e.g.

    $ pulumi import ionoscloud:cdn/distribution:Distribution myDistribution distribution uuid
    

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

    Package Details

    Repository
    ionoscloud ionos-cloud/pulumi-ionoscloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ionoscloud Terraform Provider.
    ionoscloud logo
    IonosCloud v0.2.3 published on Tuesday, May 13, 2025 by ionos-cloud