gcp.networkservices.EdgeCacheService
Explore with Pulumi AI
EdgeCacheService defines the IP addresses, protocols, security policies, cache policies and routing configuration.
Warning: These resources require allow-listing to use, and are not openly available to all Cloud customers. Engage with your Cloud account team to discuss how to onboard.
Example Usage
Network Services Edge Cache Service Basic
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var dest = new Gcp.Storage.Bucket("dest", new()
{
Location = "US",
ForceDestroy = true,
});
var instanceEdgeCacheOrigin = new Gcp.NetworkServices.EdgeCacheOrigin("instanceEdgeCacheOrigin", new()
{
OriginAddress = dest.Url,
Description = "The default bucket for media edge test",
MaxAttempts = 2,
Timeout = new Gcp.NetworkServices.Inputs.EdgeCacheOriginTimeoutArgs
{
ConnectTimeout = "10s",
},
});
var instanceEdgeCacheService = new Gcp.NetworkServices.EdgeCacheService("instanceEdgeCacheService", new()
{
Description = "some description",
Routing = new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingArgs
{
HostRules = new[]
{
new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingHostRuleArgs
{
Description = "host rule description",
Hosts = new[]
{
"sslcert.tf-test.club",
},
PathMatcher = "routes",
},
},
PathMatchers = new[]
{
new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherArgs
{
Name = "routes",
RouteRules = new[]
{
new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleArgs
{
Description = "a route rule to match against",
Priority = "1",
MatchRules = new[]
{
new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs
{
PrefixMatch = "/",
},
},
Origin = instanceEdgeCacheOrigin.Name,
RouteAction = new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionArgs
{
CdnPolicy = new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyArgs
{
CacheMode = "CACHE_ALL_STATIC",
DefaultTtl = "3600s",
},
},
HeaderAction = new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionArgs
{
ResponseHeaderToAdds = new[]
{
new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionResponseHeaderToAddArgs
{
HeaderName = "x-cache-status",
HeaderValue = "{cdn_cache_status}",
},
},
},
},
},
},
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/networkservices"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/storage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
dest, err := storage.NewBucket(ctx, "dest", &storage.BucketArgs{
Location: pulumi.String("US"),
ForceDestroy: pulumi.Bool(true),
})
if err != nil {
return err
}
instanceEdgeCacheOrigin, err := networkservices.NewEdgeCacheOrigin(ctx, "instanceEdgeCacheOrigin", &networkservices.EdgeCacheOriginArgs{
OriginAddress: dest.Url,
Description: pulumi.String("The default bucket for media edge test"),
MaxAttempts: pulumi.Int(2),
Timeout: &networkservices.EdgeCacheOriginTimeoutArgs{
ConnectTimeout: pulumi.String("10s"),
},
})
if err != nil {
return err
}
_, err = networkservices.NewEdgeCacheService(ctx, "instanceEdgeCacheService", &networkservices.EdgeCacheServiceArgs{
Description: pulumi.String("some description"),
Routing: &networkservices.EdgeCacheServiceRoutingArgs{
HostRules: networkservices.EdgeCacheServiceRoutingHostRuleArray{
&networkservices.EdgeCacheServiceRoutingHostRuleArgs{
Description: pulumi.String("host rule description"),
Hosts: pulumi.StringArray{
pulumi.String("sslcert.tf-test.club"),
},
PathMatcher: pulumi.String("routes"),
},
},
PathMatchers: networkservices.EdgeCacheServiceRoutingPathMatcherArray{
&networkservices.EdgeCacheServiceRoutingPathMatcherArgs{
Name: pulumi.String("routes"),
RouteRules: networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleArray{
&networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleArgs{
Description: pulumi.String("a route rule to match against"),
Priority: pulumi.String("1"),
MatchRules: networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArray{
&networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs{
PrefixMatch: pulumi.String("/"),
},
},
Origin: instanceEdgeCacheOrigin.Name,
RouteAction: &networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionArgs{
CdnPolicy: &networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyArgs{
CacheMode: pulumi.String("CACHE_ALL_STATIC"),
DefaultTtl: pulumi.String("3600s"),
},
},
HeaderAction: &networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionArgs{
ResponseHeaderToAdds: networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionResponseHeaderToAddArray{
&networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionResponseHeaderToAddArgs{
HeaderName: pulumi.String("x-cache-status"),
HeaderValue: pulumi.String("{cdn_cache_status}"),
},
},
},
},
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.storage.Bucket;
import com.pulumi.gcp.storage.BucketArgs;
import com.pulumi.gcp.networkservices.EdgeCacheOrigin;
import com.pulumi.gcp.networkservices.EdgeCacheOriginArgs;
import com.pulumi.gcp.networkservices.inputs.EdgeCacheOriginTimeoutArgs;
import com.pulumi.gcp.networkservices.EdgeCacheService;
import com.pulumi.gcp.networkservices.EdgeCacheServiceArgs;
import com.pulumi.gcp.networkservices.inputs.EdgeCacheServiceRoutingArgs;
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 dest = new Bucket("dest", BucketArgs.builder()
.location("US")
.forceDestroy(true)
.build());
var instanceEdgeCacheOrigin = new EdgeCacheOrigin("instanceEdgeCacheOrigin", EdgeCacheOriginArgs.builder()
.originAddress(dest.url())
.description("The default bucket for media edge test")
.maxAttempts(2)
.timeout(EdgeCacheOriginTimeoutArgs.builder()
.connectTimeout("10s")
.build())
.build());
var instanceEdgeCacheService = new EdgeCacheService("instanceEdgeCacheService", EdgeCacheServiceArgs.builder()
.description("some description")
.routing(EdgeCacheServiceRoutingArgs.builder()
.hostRules(EdgeCacheServiceRoutingHostRuleArgs.builder()
.description("host rule description")
.hosts("sslcert.tf-test.club")
.pathMatcher("routes")
.build())
.pathMatchers(EdgeCacheServiceRoutingPathMatcherArgs.builder()
.name("routes")
.routeRules(EdgeCacheServiceRoutingPathMatcherRouteRuleArgs.builder()
.description("a route rule to match against")
.priority(1)
.matchRules(EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs.builder()
.prefixMatch("/")
.build())
.origin(instanceEdgeCacheOrigin.name())
.routeAction(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionArgs.builder()
.cdnPolicy(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyArgs.builder()
.cacheMode("CACHE_ALL_STATIC")
.defaultTtl("3600s")
.build())
.build())
.headerAction(EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionArgs.builder()
.responseHeaderToAdds(EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionResponseHeaderToAddArgs.builder()
.headerName("x-cache-status")
.headerValue("{cdn_cache_status}")
.build())
.build())
.build())
.build())
.build())
.build());
}
}
import pulumi
import pulumi_gcp as gcp
dest = gcp.storage.Bucket("dest",
location="US",
force_destroy=True)
instance_edge_cache_origin = gcp.networkservices.EdgeCacheOrigin("instanceEdgeCacheOrigin",
origin_address=dest.url,
description="The default bucket for media edge test",
max_attempts=2,
timeout=gcp.networkservices.EdgeCacheOriginTimeoutArgs(
connect_timeout="10s",
))
instance_edge_cache_service = gcp.networkservices.EdgeCacheService("instanceEdgeCacheService",
description="some description",
routing=gcp.networkservices.EdgeCacheServiceRoutingArgs(
host_rules=[gcp.networkservices.EdgeCacheServiceRoutingHostRuleArgs(
description="host rule description",
hosts=["sslcert.tf-test.club"],
path_matcher="routes",
)],
path_matchers=[gcp.networkservices.EdgeCacheServiceRoutingPathMatcherArgs(
name="routes",
route_rules=[gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleArgs(
description="a route rule to match against",
priority="1",
match_rules=[gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs(
prefix_match="/",
)],
origin=instance_edge_cache_origin.name,
route_action=gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionArgs(
cdn_policy=gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyArgs(
cache_mode="CACHE_ALL_STATIC",
default_ttl="3600s",
),
),
header_action=gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionArgs(
response_header_to_adds=[gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionResponseHeaderToAddArgs(
header_name="x-cache-status",
header_value="{cdn_cache_status}",
)],
),
)],
)],
))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const dest = new gcp.storage.Bucket("dest", {
location: "US",
forceDestroy: true,
});
const instanceEdgeCacheOrigin = new gcp.networkservices.EdgeCacheOrigin("instanceEdgeCacheOrigin", {
originAddress: dest.url,
description: "The default bucket for media edge test",
maxAttempts: 2,
timeout: {
connectTimeout: "10s",
},
});
const instanceEdgeCacheService = new gcp.networkservices.EdgeCacheService("instanceEdgeCacheService", {
description: "some description",
routing: {
hostRules: [{
description: "host rule description",
hosts: ["sslcert.tf-test.club"],
pathMatcher: "routes",
}],
pathMatchers: [{
name: "routes",
routeRules: [{
description: "a route rule to match against",
priority: "1",
matchRules: [{
prefixMatch: "/",
}],
origin: instanceEdgeCacheOrigin.name,
routeAction: {
cdnPolicy: {
cacheMode: "CACHE_ALL_STATIC",
defaultTtl: "3600s",
},
},
headerAction: {
responseHeaderToAdds: [{
headerName: "x-cache-status",
headerValue: "{cdn_cache_status}",
}],
},
}],
}],
},
});
resources:
dest:
type: gcp:storage:Bucket
properties:
location: US
forceDestroy: true
instanceEdgeCacheOrigin:
type: gcp:networkservices:EdgeCacheOrigin
properties:
originAddress: ${dest.url}
description: The default bucket for media edge test
maxAttempts: 2
timeout:
connectTimeout: 10s
instanceEdgeCacheService:
type: gcp:networkservices:EdgeCacheService
properties:
description: some description
routing:
hostRules:
- description: host rule description
hosts:
- sslcert.tf-test.club
pathMatcher: routes
pathMatchers:
- name: routes
routeRules:
- description: a route rule to match against
priority: 1
matchRules:
- prefixMatch: /
origin: ${instanceEdgeCacheOrigin.name}
routeAction:
cdnPolicy:
cacheMode: CACHE_ALL_STATIC
defaultTtl: 3600s
headerAction:
responseHeaderToAdds:
- headerName: x-cache-status
headerValue: '{cdn_cache_status}'
Network Services Edge Cache Service Advanced
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var dest = new Gcp.Storage.Bucket("dest", new()
{
Location = "US",
ForceDestroy = true,
});
var google = new Gcp.NetworkServices.EdgeCacheOrigin("google", new()
{
OriginAddress = "google.com",
Description = "The default bucket for media edge test",
MaxAttempts = 2,
Timeout = new Gcp.NetworkServices.Inputs.EdgeCacheOriginTimeoutArgs
{
ConnectTimeout = "10s",
},
});
var instanceEdgeCacheOrigin = new Gcp.NetworkServices.EdgeCacheOrigin("instanceEdgeCacheOrigin", new()
{
OriginAddress = dest.Url,
Description = "The default bucket for media edge test",
MaxAttempts = 2,
Timeout = new Gcp.NetworkServices.Inputs.EdgeCacheOriginTimeoutArgs
{
ConnectTimeout = "10s",
},
});
var instanceEdgeCacheService = new Gcp.NetworkServices.EdgeCacheService("instanceEdgeCacheService", new()
{
Description = "some description",
DisableQuic = true,
DisableHttp2 = true,
Labels =
{
{ "a", "b" },
},
Routing = new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingArgs
{
HostRules = new[]
{
new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingHostRuleArgs
{
Description = "host rule description",
Hosts = new[]
{
"sslcert.tf-test.club",
},
PathMatcher = "routes",
},
new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingHostRuleArgs
{
Description = "host rule2",
Hosts = new[]
{
"sslcert.tf-test2.club",
},
PathMatcher = "routes",
},
new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingHostRuleArgs
{
Description = "host rule3",
Hosts = new[]
{
"sslcert.tf-test3.club",
},
PathMatcher = "routesAdvanced",
},
},
PathMatchers = new[]
{
new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherArgs
{
Name = "routes",
RouteRules = new[]
{
new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleArgs
{
Description = "a route rule to match against",
Priority = "1",
MatchRules = new[]
{
new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs
{
PrefixMatch = "/",
},
},
Origin = instanceEdgeCacheOrigin.Name,
RouteAction = new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionArgs
{
CdnPolicy = new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyArgs
{
CacheMode = "CACHE_ALL_STATIC",
DefaultTtl = "3600s",
},
},
HeaderAction = new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionArgs
{
ResponseHeaderToAdds = new[]
{
new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionResponseHeaderToAddArgs
{
HeaderName = "x-cache-status",
HeaderValue = "{cdn_cache_status}",
},
},
},
},
},
},
new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherArgs
{
Name = "routesAdvanced",
Description = "an advanced ruleset",
RouteRules = new[]
{
new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleArgs
{
Description = "an advanced route rule to match against",
Priority = "1",
MatchRules = new[]
{
new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs
{
PrefixMatch = "/potato/",
QueryParameterMatches = new[]
{
new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleQueryParameterMatchArgs
{
Name = "debug",
PresentMatch = true,
},
new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleQueryParameterMatchArgs
{
Name = "state",
ExactMatch = "debug",
},
},
},
new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs
{
FullPathMatch = "/apple",
},
},
HeaderAction = new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionArgs
{
RequestHeaderToAdds = new[]
{
new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionRequestHeaderToAddArgs
{
HeaderName = "debug",
HeaderValue = "true",
Replace = true,
},
new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionRequestHeaderToAddArgs
{
HeaderName = "potato",
HeaderValue = "plant",
},
},
ResponseHeaderToAdds = new[]
{
new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionResponseHeaderToAddArgs
{
HeaderName = "potato",
HeaderValue = "plant",
Replace = true,
},
},
RequestHeaderToRemoves = new[]
{
new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionRequestHeaderToRemoveArgs
{
HeaderName = "prod",
},
},
ResponseHeaderToRemoves = new[]
{
new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionResponseHeaderToRemoveArgs
{
HeaderName = "prod",
},
},
},
Origin = instanceEdgeCacheOrigin.Name,
RouteAction = new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionArgs
{
CdnPolicy = new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyArgs
{
CacheMode = "CACHE_ALL_STATIC",
DefaultTtl = "3800s",
ClientTtl = "3600s",
MaxTtl = "9000s",
CacheKeyPolicy = new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyCacheKeyPolicyArgs
{
IncludeProtocol = true,
ExcludeHost = true,
IncludedQueryParameters = new[]
{
"apple",
"dev",
"santa",
"claus",
},
IncludedHeaderNames = new[]
{
"banana",
},
IncludedCookieNames = new[]
{
"orange",
},
},
NegativeCaching = true,
SignedRequestMode = "DISABLED",
NegativeCachingPolicy =
{
{ "500", "3000s" },
},
},
UrlRewrite = new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionUrlRewriteArgs
{
PathPrefixRewrite = "/dev",
HostRewrite = "dev.club",
},
CorsPolicy = new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCorsPolicyArgs
{
MaxAge = "2500s",
AllowCredentials = true,
AllowOrigins = new[]
{
"*",
},
AllowMethods = new[]
{
"GET",
},
AllowHeaders = new[]
{
"dev",
},
ExposeHeaders = new[]
{
"prod",
},
},
},
},
new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleArgs
{
Description = "a second route rule to match against",
Priority = "2",
MatchRules = new[]
{
new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs
{
FullPathMatch = "/yay",
},
},
Origin = instanceEdgeCacheOrigin.Name,
RouteAction = new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionArgs
{
CdnPolicy = new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyArgs
{
CacheMode = "CACHE_ALL_STATIC",
DefaultTtl = "3600s",
CacheKeyPolicy = new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyCacheKeyPolicyArgs
{
ExcludedQueryParameters = new[]
{
"dev",
},
},
},
CorsPolicy = new Gcp.NetworkServices.Inputs.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCorsPolicyArgs
{
MaxAge = "3000s",
AllowHeaders = new[]
{
"dev",
},
Disabled = true,
},
},
},
},
},
},
},
LogConfig = new Gcp.NetworkServices.Inputs.EdgeCacheServiceLogConfigArgs
{
Enable = true,
SampleRate = 0.01,
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/networkservices"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/storage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
dest, err := storage.NewBucket(ctx, "dest", &storage.BucketArgs{
Location: pulumi.String("US"),
ForceDestroy: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = networkservices.NewEdgeCacheOrigin(ctx, "google", &networkservices.EdgeCacheOriginArgs{
OriginAddress: pulumi.String("google.com"),
Description: pulumi.String("The default bucket for media edge test"),
MaxAttempts: pulumi.Int(2),
Timeout: &networkservices.EdgeCacheOriginTimeoutArgs{
ConnectTimeout: pulumi.String("10s"),
},
})
if err != nil {
return err
}
instanceEdgeCacheOrigin, err := networkservices.NewEdgeCacheOrigin(ctx, "instanceEdgeCacheOrigin", &networkservices.EdgeCacheOriginArgs{
OriginAddress: dest.Url,
Description: pulumi.String("The default bucket for media edge test"),
MaxAttempts: pulumi.Int(2),
Timeout: &networkservices.EdgeCacheOriginTimeoutArgs{
ConnectTimeout: pulumi.String("10s"),
},
})
if err != nil {
return err
}
_, err = networkservices.NewEdgeCacheService(ctx, "instanceEdgeCacheService", &networkservices.EdgeCacheServiceArgs{
Description: pulumi.String("some description"),
DisableQuic: pulumi.Bool(true),
DisableHttp2: pulumi.Bool(true),
Labels: pulumi.StringMap{
"a": pulumi.String("b"),
},
Routing: &networkservices.EdgeCacheServiceRoutingArgs{
HostRules: networkservices.EdgeCacheServiceRoutingHostRuleArray{
&networkservices.EdgeCacheServiceRoutingHostRuleArgs{
Description: pulumi.String("host rule description"),
Hosts: pulumi.StringArray{
pulumi.String("sslcert.tf-test.club"),
},
PathMatcher: pulumi.String("routes"),
},
&networkservices.EdgeCacheServiceRoutingHostRuleArgs{
Description: pulumi.String("host rule2"),
Hosts: pulumi.StringArray{
pulumi.String("sslcert.tf-test2.club"),
},
PathMatcher: pulumi.String("routes"),
},
&networkservices.EdgeCacheServiceRoutingHostRuleArgs{
Description: pulumi.String("host rule3"),
Hosts: pulumi.StringArray{
pulumi.String("sslcert.tf-test3.club"),
},
PathMatcher: pulumi.String("routesAdvanced"),
},
},
PathMatchers: networkservices.EdgeCacheServiceRoutingPathMatcherArray{
&networkservices.EdgeCacheServiceRoutingPathMatcherArgs{
Name: pulumi.String("routes"),
RouteRules: networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleArray{
&networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleArgs{
Description: pulumi.String("a route rule to match against"),
Priority: pulumi.String("1"),
MatchRules: networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArray{
&networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs{
PrefixMatch: pulumi.String("/"),
},
},
Origin: instanceEdgeCacheOrigin.Name,
RouteAction: &networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionArgs{
CdnPolicy: &networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyArgs{
CacheMode: pulumi.String("CACHE_ALL_STATIC"),
DefaultTtl: pulumi.String("3600s"),
},
},
HeaderAction: &networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionArgs{
ResponseHeaderToAdds: networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionResponseHeaderToAddArray{
&networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionResponseHeaderToAddArgs{
HeaderName: pulumi.String("x-cache-status"),
HeaderValue: pulumi.String("{cdn_cache_status}"),
},
},
},
},
},
},
&networkservices.EdgeCacheServiceRoutingPathMatcherArgs{
Name: pulumi.String("routesAdvanced"),
Description: pulumi.String("an advanced ruleset"),
RouteRules: networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleArray{
&networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleArgs{
Description: pulumi.String("an advanced route rule to match against"),
Priority: pulumi.String("1"),
MatchRules: networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArray{
&networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs{
PrefixMatch: pulumi.String("/potato/"),
QueryParameterMatches: networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleQueryParameterMatchArray{
&networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleQueryParameterMatchArgs{
Name: pulumi.String("debug"),
PresentMatch: pulumi.Bool(true),
},
&networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleQueryParameterMatchArgs{
Name: pulumi.String("state"),
ExactMatch: pulumi.String("debug"),
},
},
},
&networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs{
FullPathMatch: pulumi.String("/apple"),
},
},
HeaderAction: &networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionArgs{
RequestHeaderToAdds: networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionRequestHeaderToAddArray{
&networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionRequestHeaderToAddArgs{
HeaderName: pulumi.String("debug"),
HeaderValue: pulumi.String("true"),
Replace: pulumi.Bool(true),
},
&networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionRequestHeaderToAddArgs{
HeaderName: pulumi.String("potato"),
HeaderValue: pulumi.String("plant"),
},
},
ResponseHeaderToAdds: networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionResponseHeaderToAddArray{
&networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionResponseHeaderToAddArgs{
HeaderName: pulumi.String("potato"),
HeaderValue: pulumi.String("plant"),
Replace: pulumi.Bool(true),
},
},
RequestHeaderToRemoves: networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionRequestHeaderToRemoveArray{
&networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionRequestHeaderToRemoveArgs{
HeaderName: pulumi.String("prod"),
},
},
ResponseHeaderToRemoves: networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionResponseHeaderToRemoveArray{
&networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionResponseHeaderToRemoveArgs{
HeaderName: pulumi.String("prod"),
},
},
},
Origin: instanceEdgeCacheOrigin.Name,
RouteAction: &networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionArgs{
CdnPolicy: &networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyArgs{
CacheMode: pulumi.String("CACHE_ALL_STATIC"),
DefaultTtl: pulumi.String("3800s"),
ClientTtl: pulumi.String("3600s"),
MaxTtl: pulumi.String("9000s"),
CacheKeyPolicy: &networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyCacheKeyPolicyArgs{
IncludeProtocol: pulumi.Bool(true),
ExcludeHost: pulumi.Bool(true),
IncludedQueryParameters: pulumi.StringArray{
pulumi.String("apple"),
pulumi.String("dev"),
pulumi.String("santa"),
pulumi.String("claus"),
},
IncludedHeaderNames: pulumi.StringArray{
pulumi.String("banana"),
},
IncludedCookieNames: pulumi.StringArray{
pulumi.String("orange"),
},
},
NegativeCaching: pulumi.Bool(true),
SignedRequestMode: pulumi.String("DISABLED"),
NegativeCachingPolicy: pulumi.StringMap{
"500": pulumi.String("3000s"),
},
},
UrlRewrite: &networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionUrlRewriteArgs{
PathPrefixRewrite: pulumi.String("/dev"),
HostRewrite: pulumi.String("dev.club"),
},
CorsPolicy: &networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCorsPolicyArgs{
MaxAge: pulumi.String("2500s"),
AllowCredentials: pulumi.Bool(true),
AllowOrigins: pulumi.StringArray{
pulumi.String("*"),
},
AllowMethods: pulumi.StringArray{
pulumi.String("GET"),
},
AllowHeaders: pulumi.StringArray{
pulumi.String("dev"),
},
ExposeHeaders: pulumi.StringArray{
pulumi.String("prod"),
},
},
},
},
&networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleArgs{
Description: pulumi.String("a second route rule to match against"),
Priority: pulumi.String("2"),
MatchRules: networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArray{
&networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs{
FullPathMatch: pulumi.String("/yay"),
},
},
Origin: instanceEdgeCacheOrigin.Name,
RouteAction: &networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionArgs{
CdnPolicy: &networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyArgs{
CacheMode: pulumi.String("CACHE_ALL_STATIC"),
DefaultTtl: pulumi.String("3600s"),
CacheKeyPolicy: &networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyCacheKeyPolicyArgs{
ExcludedQueryParameters: pulumi.StringArray{
pulumi.String("dev"),
},
},
},
CorsPolicy: &networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCorsPolicyArgs{
MaxAge: pulumi.String("3000s"),
AllowHeaders: pulumi.StringArray{
pulumi.String("dev"),
},
Disabled: pulumi.Bool(true),
},
},
},
},
},
},
},
LogConfig: &networkservices.EdgeCacheServiceLogConfigArgs{
Enable: pulumi.Bool(true),
SampleRate: pulumi.Float64(0.01),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.storage.Bucket;
import com.pulumi.gcp.storage.BucketArgs;
import com.pulumi.gcp.networkservices.EdgeCacheOrigin;
import com.pulumi.gcp.networkservices.EdgeCacheOriginArgs;
import com.pulumi.gcp.networkservices.inputs.EdgeCacheOriginTimeoutArgs;
import com.pulumi.gcp.networkservices.EdgeCacheService;
import com.pulumi.gcp.networkservices.EdgeCacheServiceArgs;
import com.pulumi.gcp.networkservices.inputs.EdgeCacheServiceRoutingArgs;
import com.pulumi.gcp.networkservices.inputs.EdgeCacheServiceLogConfigArgs;
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 dest = new Bucket("dest", BucketArgs.builder()
.location("US")
.forceDestroy(true)
.build());
var google = new EdgeCacheOrigin("google", EdgeCacheOriginArgs.builder()
.originAddress("google.com")
.description("The default bucket for media edge test")
.maxAttempts(2)
.timeout(EdgeCacheOriginTimeoutArgs.builder()
.connectTimeout("10s")
.build())
.build());
var instanceEdgeCacheOrigin = new EdgeCacheOrigin("instanceEdgeCacheOrigin", EdgeCacheOriginArgs.builder()
.originAddress(dest.url())
.description("The default bucket for media edge test")
.maxAttempts(2)
.timeout(EdgeCacheOriginTimeoutArgs.builder()
.connectTimeout("10s")
.build())
.build());
var instanceEdgeCacheService = new EdgeCacheService("instanceEdgeCacheService", EdgeCacheServiceArgs.builder()
.description("some description")
.disableQuic(true)
.disableHttp2(true)
.labels(Map.of("a", "b"))
.routing(EdgeCacheServiceRoutingArgs.builder()
.hostRules(
EdgeCacheServiceRoutingHostRuleArgs.builder()
.description("host rule description")
.hosts("sslcert.tf-test.club")
.pathMatcher("routes")
.build(),
EdgeCacheServiceRoutingHostRuleArgs.builder()
.description("host rule2")
.hosts("sslcert.tf-test2.club")
.pathMatcher("routes")
.build(),
EdgeCacheServiceRoutingHostRuleArgs.builder()
.description("host rule3")
.hosts("sslcert.tf-test3.club")
.pathMatcher("routesAdvanced")
.build())
.pathMatchers(
EdgeCacheServiceRoutingPathMatcherArgs.builder()
.name("routes")
.routeRules(EdgeCacheServiceRoutingPathMatcherRouteRuleArgs.builder()
.description("a route rule to match against")
.priority(1)
.matchRules(EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs.builder()
.prefixMatch("/")
.build())
.origin(instanceEdgeCacheOrigin.name())
.routeAction(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionArgs.builder()
.cdnPolicy(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyArgs.builder()
.cacheMode("CACHE_ALL_STATIC")
.defaultTtl("3600s")
.build())
.build())
.headerAction(EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionArgs.builder()
.responseHeaderToAdds(EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionResponseHeaderToAddArgs.builder()
.headerName("x-cache-status")
.headerValue("{cdn_cache_status}")
.build())
.build())
.build())
.build(),
EdgeCacheServiceRoutingPathMatcherArgs.builder()
.name("routesAdvanced")
.description("an advanced ruleset")
.routeRules(
EdgeCacheServiceRoutingPathMatcherRouteRuleArgs.builder()
.description("an advanced route rule to match against")
.priority(1)
.matchRules(
EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs.builder()
.prefixMatch("/potato/")
.queryParameterMatches(
EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleQueryParameterMatchArgs.builder()
.name("debug")
.presentMatch(true)
.build(),
EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleQueryParameterMatchArgs.builder()
.name("state")
.exactMatch("debug")
.build())
.build(),
EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs.builder()
.fullPathMatch("/apple")
.build())
.headerAction(EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionArgs.builder()
.requestHeaderToAdds(
EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionRequestHeaderToAddArgs.builder()
.headerName("debug")
.headerValue("true")
.replace(true)
.build(),
EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionRequestHeaderToAddArgs.builder()
.headerName("potato")
.headerValue("plant")
.build())
.responseHeaderToAdds(EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionResponseHeaderToAddArgs.builder()
.headerName("potato")
.headerValue("plant")
.replace(true)
.build())
.requestHeaderToRemoves(EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionRequestHeaderToRemoveArgs.builder()
.headerName("prod")
.build())
.responseHeaderToRemoves(EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionResponseHeaderToRemoveArgs.builder()
.headerName("prod")
.build())
.build())
.origin(instanceEdgeCacheOrigin.name())
.routeAction(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionArgs.builder()
.cdnPolicy(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyArgs.builder()
.cacheMode("CACHE_ALL_STATIC")
.defaultTtl("3800s")
.clientTtl("3600s")
.maxTtl("9000s")
.cacheKeyPolicy(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyCacheKeyPolicyArgs.builder()
.includeProtocol(true)
.excludeHost(true)
.includedQueryParameters(
"apple",
"dev",
"santa",
"claus")
.includedHeaderNames("banana")
.includedCookieNames("orange")
.build())
.negativeCaching(true)
.signedRequestMode("DISABLED")
.negativeCachingPolicy(Map.of("500", "3000s"))
.build())
.urlRewrite(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionUrlRewriteArgs.builder()
.pathPrefixRewrite("/dev")
.hostRewrite("dev.club")
.build())
.corsPolicy(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCorsPolicyArgs.builder()
.maxAge("2500s")
.allowCredentials(true)
.allowOrigins("*")
.allowMethods("GET")
.allowHeaders("dev")
.exposeHeaders("prod")
.build())
.build())
.build(),
EdgeCacheServiceRoutingPathMatcherRouteRuleArgs.builder()
.description("a second route rule to match against")
.priority(2)
.matchRules(EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs.builder()
.fullPathMatch("/yay")
.build())
.origin(instanceEdgeCacheOrigin.name())
.routeAction(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionArgs.builder()
.cdnPolicy(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyArgs.builder()
.cacheMode("CACHE_ALL_STATIC")
.defaultTtl("3600s")
.cacheKeyPolicy(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyCacheKeyPolicyArgs.builder()
.excludedQueryParameters("dev")
.build())
.build())
.corsPolicy(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCorsPolicyArgs.builder()
.maxAge("3000s")
.allowHeaders("dev")
.disabled(true)
.build())
.build())
.build())
.build())
.build())
.logConfig(EdgeCacheServiceLogConfigArgs.builder()
.enable(true)
.sampleRate(0.01)
.build())
.build());
}
}
import pulumi
import pulumi_gcp as gcp
dest = gcp.storage.Bucket("dest",
location="US",
force_destroy=True)
google = gcp.networkservices.EdgeCacheOrigin("google",
origin_address="google.com",
description="The default bucket for media edge test",
max_attempts=2,
timeout=gcp.networkservices.EdgeCacheOriginTimeoutArgs(
connect_timeout="10s",
))
instance_edge_cache_origin = gcp.networkservices.EdgeCacheOrigin("instanceEdgeCacheOrigin",
origin_address=dest.url,
description="The default bucket for media edge test",
max_attempts=2,
timeout=gcp.networkservices.EdgeCacheOriginTimeoutArgs(
connect_timeout="10s",
))
instance_edge_cache_service = gcp.networkservices.EdgeCacheService("instanceEdgeCacheService",
description="some description",
disable_quic=True,
disable_http2=True,
labels={
"a": "b",
},
routing=gcp.networkservices.EdgeCacheServiceRoutingArgs(
host_rules=[
gcp.networkservices.EdgeCacheServiceRoutingHostRuleArgs(
description="host rule description",
hosts=["sslcert.tf-test.club"],
path_matcher="routes",
),
gcp.networkservices.EdgeCacheServiceRoutingHostRuleArgs(
description="host rule2",
hosts=["sslcert.tf-test2.club"],
path_matcher="routes",
),
gcp.networkservices.EdgeCacheServiceRoutingHostRuleArgs(
description="host rule3",
hosts=["sslcert.tf-test3.club"],
path_matcher="routesAdvanced",
),
],
path_matchers=[
gcp.networkservices.EdgeCacheServiceRoutingPathMatcherArgs(
name="routes",
route_rules=[gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleArgs(
description="a route rule to match against",
priority="1",
match_rules=[gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs(
prefix_match="/",
)],
origin=instance_edge_cache_origin.name,
route_action=gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionArgs(
cdn_policy=gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyArgs(
cache_mode="CACHE_ALL_STATIC",
default_ttl="3600s",
),
),
header_action=gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionArgs(
response_header_to_adds=[gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionResponseHeaderToAddArgs(
header_name="x-cache-status",
header_value="{cdn_cache_status}",
)],
),
)],
),
gcp.networkservices.EdgeCacheServiceRoutingPathMatcherArgs(
name="routesAdvanced",
description="an advanced ruleset",
route_rules=[
gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleArgs(
description="an advanced route rule to match against",
priority="1",
match_rules=[
gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs(
prefix_match="/potato/",
query_parameter_matches=[
gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleQueryParameterMatchArgs(
name="debug",
present_match=True,
),
gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleQueryParameterMatchArgs(
name="state",
exact_match="debug",
),
],
),
gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs(
full_path_match="/apple",
),
],
header_action=gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionArgs(
request_header_to_adds=[
gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionRequestHeaderToAddArgs(
header_name="debug",
header_value="true",
replace=True,
),
gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionRequestHeaderToAddArgs(
header_name="potato",
header_value="plant",
),
],
response_header_to_adds=[gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionResponseHeaderToAddArgs(
header_name="potato",
header_value="plant",
replace=True,
)],
request_header_to_removes=[gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionRequestHeaderToRemoveArgs(
header_name="prod",
)],
response_header_to_removes=[gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionResponseHeaderToRemoveArgs(
header_name="prod",
)],
),
origin=instance_edge_cache_origin.name,
route_action=gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionArgs(
cdn_policy=gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyArgs(
cache_mode="CACHE_ALL_STATIC",
default_ttl="3800s",
client_ttl="3600s",
max_ttl="9000s",
cache_key_policy=gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyCacheKeyPolicyArgs(
include_protocol=True,
exclude_host=True,
included_query_parameters=[
"apple",
"dev",
"santa",
"claus",
],
included_header_names=["banana"],
included_cookie_names=["orange"],
),
negative_caching=True,
signed_request_mode="DISABLED",
negative_caching_policy={
"500": "3000s",
},
),
url_rewrite=gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionUrlRewriteArgs(
path_prefix_rewrite="/dev",
host_rewrite="dev.club",
),
cors_policy=gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCorsPolicyArgs(
max_age="2500s",
allow_credentials=True,
allow_origins=["*"],
allow_methods=["GET"],
allow_headers=["dev"],
expose_headers=["prod"],
),
),
),
gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleArgs(
description="a second route rule to match against",
priority="2",
match_rules=[gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs(
full_path_match="/yay",
)],
origin=instance_edge_cache_origin.name,
route_action=gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionArgs(
cdn_policy=gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyArgs(
cache_mode="CACHE_ALL_STATIC",
default_ttl="3600s",
cache_key_policy=gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyCacheKeyPolicyArgs(
excluded_query_parameters=["dev"],
),
),
cors_policy=gcp.networkservices.EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCorsPolicyArgs(
max_age="3000s",
allow_headers=["dev"],
disabled=True,
),
),
),
],
),
],
),
log_config=gcp.networkservices.EdgeCacheServiceLogConfigArgs(
enable=True,
sample_rate=0.01,
))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const dest = new gcp.storage.Bucket("dest", {
location: "US",
forceDestroy: true,
});
const google = new gcp.networkservices.EdgeCacheOrigin("google", {
originAddress: "google.com",
description: "The default bucket for media edge test",
maxAttempts: 2,
timeout: {
connectTimeout: "10s",
},
});
const instanceEdgeCacheOrigin = new gcp.networkservices.EdgeCacheOrigin("instanceEdgeCacheOrigin", {
originAddress: dest.url,
description: "The default bucket for media edge test",
maxAttempts: 2,
timeout: {
connectTimeout: "10s",
},
});
const instanceEdgeCacheService = new gcp.networkservices.EdgeCacheService("instanceEdgeCacheService", {
description: "some description",
disableQuic: true,
disableHttp2: true,
labels: {
a: "b",
},
routing: {
hostRules: [
{
description: "host rule description",
hosts: ["sslcert.tf-test.club"],
pathMatcher: "routes",
},
{
description: "host rule2",
hosts: ["sslcert.tf-test2.club"],
pathMatcher: "routes",
},
{
description: "host rule3",
hosts: ["sslcert.tf-test3.club"],
pathMatcher: "routesAdvanced",
},
],
pathMatchers: [
{
name: "routes",
routeRules: [{
description: "a route rule to match against",
priority: "1",
matchRules: [{
prefixMatch: "/",
}],
origin: instanceEdgeCacheOrigin.name,
routeAction: {
cdnPolicy: {
cacheMode: "CACHE_ALL_STATIC",
defaultTtl: "3600s",
},
},
headerAction: {
responseHeaderToAdds: [{
headerName: "x-cache-status",
headerValue: "{cdn_cache_status}",
}],
},
}],
},
{
name: "routesAdvanced",
description: "an advanced ruleset",
routeRules: [
{
description: "an advanced route rule to match against",
priority: "1",
matchRules: [
{
prefixMatch: "/potato/",
queryParameterMatches: [
{
name: "debug",
presentMatch: true,
},
{
name: "state",
exactMatch: "debug",
},
],
},
{
fullPathMatch: "/apple",
},
],
headerAction: {
requestHeaderToAdds: [
{
headerName: "debug",
headerValue: "true",
replace: true,
},
{
headerName: "potato",
headerValue: "plant",
},
],
responseHeaderToAdds: [{
headerName: "potato",
headerValue: "plant",
replace: true,
}],
requestHeaderToRemoves: [{
headerName: "prod",
}],
responseHeaderToRemoves: [{
headerName: "prod",
}],
},
origin: instanceEdgeCacheOrigin.name,
routeAction: {
cdnPolicy: {
cacheMode: "CACHE_ALL_STATIC",
defaultTtl: "3800s",
clientTtl: "3600s",
maxTtl: "9000s",
cacheKeyPolicy: {
includeProtocol: true,
excludeHost: true,
includedQueryParameters: [
"apple",
"dev",
"santa",
"claus",
],
includedHeaderNames: ["banana"],
includedCookieNames: ["orange"],
},
negativeCaching: true,
signedRequestMode: "DISABLED",
negativeCachingPolicy: {
"500": "3000s",
},
},
urlRewrite: {
pathPrefixRewrite: "/dev",
hostRewrite: "dev.club",
},
corsPolicy: {
maxAge: "2500s",
allowCredentials: true,
allowOrigins: ["*"],
allowMethods: ["GET"],
allowHeaders: ["dev"],
exposeHeaders: ["prod"],
},
},
},
{
description: "a second route rule to match against",
priority: "2",
matchRules: [{
fullPathMatch: "/yay",
}],
origin: instanceEdgeCacheOrigin.name,
routeAction: {
cdnPolicy: {
cacheMode: "CACHE_ALL_STATIC",
defaultTtl: "3600s",
cacheKeyPolicy: {
excludedQueryParameters: ["dev"],
},
},
corsPolicy: {
maxAge: "3000s",
allowHeaders: ["dev"],
disabled: true,
},
},
},
],
},
],
},
logConfig: {
enable: true,
sampleRate: 0.01,
},
});
resources:
dest:
type: gcp:storage:Bucket
properties:
location: US
forceDestroy: true
google:
type: gcp:networkservices:EdgeCacheOrigin
properties:
originAddress: google.com
description: The default bucket for media edge test
maxAttempts: 2
timeout:
connectTimeout: 10s
instanceEdgeCacheOrigin:
type: gcp:networkservices:EdgeCacheOrigin
properties:
originAddress: ${dest.url}
description: The default bucket for media edge test
maxAttempts: 2
timeout:
connectTimeout: 10s
instanceEdgeCacheService:
type: gcp:networkservices:EdgeCacheService
properties:
description: some description
disableQuic: true
disableHttp2: true
labels:
a: b
routing:
hostRules:
- description: host rule description
hosts:
- sslcert.tf-test.club
pathMatcher: routes
- description: host rule2
hosts:
- sslcert.tf-test2.club
pathMatcher: routes
- description: host rule3
hosts:
- sslcert.tf-test3.club
pathMatcher: routesAdvanced
pathMatchers:
- name: routes
routeRules:
- description: a route rule to match against
priority: 1
matchRules:
- prefixMatch: /
origin: ${instanceEdgeCacheOrigin.name}
routeAction:
cdnPolicy:
cacheMode: CACHE_ALL_STATIC
defaultTtl: 3600s
headerAction:
responseHeaderToAdds:
- headerName: x-cache-status
headerValue: '{cdn_cache_status}'
- name: routesAdvanced
description: an advanced ruleset
routeRules:
- description: an advanced route rule to match against
priority: 1
matchRules:
- prefixMatch: /potato/
queryParameterMatches:
- name: debug
presentMatch: true
- name: state
exactMatch: debug
- fullPathMatch: /apple
headerAction:
requestHeaderToAdds:
- headerName: debug
headerValue: 'true'
replace: true
- headerName: potato
headerValue: plant
responseHeaderToAdds:
- headerName: potato
headerValue: plant
replace: true
requestHeaderToRemoves:
- headerName: prod
responseHeaderToRemoves:
- headerName: prod
origin: ${instanceEdgeCacheOrigin.name}
routeAction:
cdnPolicy:
cacheMode: CACHE_ALL_STATIC
defaultTtl: 3800s
clientTtl: 3600s
maxTtl: 9000s
cacheKeyPolicy:
includeProtocol: true
excludeHost: true
includedQueryParameters:
- apple
- dev
- santa
- claus
includedHeaderNames:
- banana
includedCookieNames:
- orange
negativeCaching: true
signedRequestMode: DISABLED
negativeCachingPolicy:
'500': 3000s
urlRewrite:
pathPrefixRewrite: /dev
hostRewrite: dev.club
corsPolicy:
maxAge: 2500s
allowCredentials: true
allowOrigins:
- '*'
allowMethods:
- GET
allowHeaders:
- dev
exposeHeaders:
- prod
- description: a second route rule to match against
priority: 2
matchRules:
- fullPathMatch: /yay
origin: ${instanceEdgeCacheOrigin.name}
routeAction:
cdnPolicy:
cacheMode: CACHE_ALL_STATIC
defaultTtl: 3600s
cacheKeyPolicy:
excludedQueryParameters:
- dev
corsPolicy:
maxAge: 3000s
allowHeaders:
- dev
disabled: true
logConfig:
enable: true
sampleRate: 0.01
Network Services Edge Cache Service Dual Token
Coming soon!
Coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.secretmanager.Secret;
import com.pulumi.gcp.secretmanager.SecretArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationArgs;
import com.pulumi.gcp.secretmanager.SecretVersion;
import com.pulumi.gcp.secretmanager.SecretVersionArgs;
import com.pulumi.gcp.networkservices.EdgeCacheKeyset;
import com.pulumi.gcp.networkservices.EdgeCacheKeysetArgs;
import com.pulumi.gcp.networkservices.inputs.EdgeCacheKeysetPublicKeyArgs;
import com.pulumi.gcp.networkservices.inputs.EdgeCacheKeysetValidationSharedKeyArgs;
import com.pulumi.gcp.networkservices.EdgeCacheOrigin;
import com.pulumi.gcp.networkservices.EdgeCacheOriginArgs;
import com.pulumi.gcp.networkservices.EdgeCacheService;
import com.pulumi.gcp.networkservices.EdgeCacheServiceArgs;
import com.pulumi.gcp.networkservices.inputs.EdgeCacheServiceRoutingArgs;
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 secret_basic = new Secret("secret-basic", SecretArgs.builder()
.secretId("secret-name")
.replication(SecretReplicationArgs.builder()
.automatic(true)
.build())
.build());
var secret_version_basic = new SecretVersion("secret-version-basic", SecretVersionArgs.builder()
.secret(secret_basic.id())
.secretData("secret-data")
.build());
var keyset = new EdgeCacheKeyset("keyset", EdgeCacheKeysetArgs.builder()
.description("The default keyset")
.publicKeys(EdgeCacheKeysetPublicKeyArgs.builder()
.id("my-public-key")
.managed(true)
.build())
.validationSharedKeys(EdgeCacheKeysetValidationSharedKeyArgs.builder()
.secretVersion(secret_version_basic.id())
.build())
.build());
var instanceEdgeCacheOrigin = new EdgeCacheOrigin("instanceEdgeCacheOrigin", EdgeCacheOriginArgs.builder()
.originAddress("gs://media-edge-default")
.description("The default bucket for media edge test")
.build());
var instanceEdgeCacheService = new EdgeCacheService("instanceEdgeCacheService", EdgeCacheServiceArgs.builder()
.description("some description")
.routing(EdgeCacheServiceRoutingArgs.builder()
.hostRules(EdgeCacheServiceRoutingHostRuleArgs.builder()
.description("host rule description")
.hosts("sslcert.tf-test.club")
.pathMatcher("routes")
.build())
.pathMatchers(EdgeCacheServiceRoutingPathMatcherArgs.builder()
.name("routes")
.routeRules(
EdgeCacheServiceRoutingPathMatcherRouteRuleArgs.builder()
.description("a route rule to match against master playlist")
.priority(1)
.matchRules(EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs.builder()
.pathTemplateMatch("/master.m3u8")
.build())
.origin(instanceEdgeCacheOrigin.name())
.routeAction(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionArgs.builder()
.cdnPolicy(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyArgs.builder()
.signedRequestMode("REQUIRE_TOKENS")
.signedRequestKeyset(keyset.id())
.signedTokenOptions(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicySignedTokenOptionsArgs.builder()
.tokenQueryParameter("edge-cache-token")
.build())
.signedRequestMaximumExpirationTtl("600s")
.addSignatures(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyAddSignaturesArgs.builder()
.actions("GENERATE_COOKIE")
.keyset(keyset.id())
.copiedParameters(
"PathGlobs",
"SessionID")
.build())
.build())
.build())
.build(),
EdgeCacheServiceRoutingPathMatcherRouteRuleArgs.builder()
.description("a route rule to match against all playlists")
.priority(2)
.matchRules(EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs.builder()
.pathTemplateMatch("/*.m3u8")
.build())
.origin(instanceEdgeCacheOrigin.name())
.routeAction(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionArgs.builder()
.cdnPolicy(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyArgs.builder()
.signedRequestMode("REQUIRE_TOKENS")
.signedRequestKeyset(keyset.id())
.signedTokenOptions(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicySignedTokenOptionsArgs.builder()
.tokenQueryParameter("hdnts")
.allowedSignatureAlgorithms(
"ED25519",
"HMAC_SHA_256",
"HMAC_SHA1")
.build())
.addSignatures(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyAddSignaturesArgs.builder()
.actions("GENERATE_TOKEN_HLS_COOKIELESS")
.keyset(keyset.id())
.tokenTtl("1200s")
.tokenQueryParameter("hdntl")
.copiedParameters("URLPrefix")
.build())
.build())
.build())
.build(),
EdgeCacheServiceRoutingPathMatcherRouteRuleArgs.builder()
.description("a route rule to match against")
.priority(3)
.matchRules(EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs.builder()
.pathTemplateMatch("/**.m3u8")
.build())
.origin(instanceEdgeCacheOrigin.name())
.routeAction(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionArgs.builder()
.cdnPolicy(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyArgs.builder()
.signedRequestMode("REQUIRE_TOKENS")
.signedRequestKeyset(keyset.id())
.signedTokenOptions(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicySignedTokenOptionsArgs.builder()
.tokenQueryParameter("hdntl")
.build())
.addSignatures(EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyAddSignaturesArgs.builder()
.actions("PROPAGATE_TOKEN_HLS_COOKIELESS")
.tokenQueryParameter("hdntl")
.build())
.build())
.build())
.build())
.build())
.build())
.build());
}
}
Coming soon!
Coming soon!
resources:
secret-basic:
type: gcp:secretmanager:Secret
properties:
secretId: secret-name
replication:
automatic: true
secret-version-basic:
type: gcp:secretmanager:SecretVersion
properties:
secret: ${["secret-basic"].id}
secretData: secret-data
keyset:
type: gcp:networkservices:EdgeCacheKeyset
properties:
description: The default keyset
publicKeys:
- id: my-public-key
managed: true
validationSharedKeys:
- secretVersion: ${["secret-version-basic"].id}
instanceEdgeCacheOrigin:
type: gcp:networkservices:EdgeCacheOrigin
properties:
originAddress: gs://media-edge-default
description: The default bucket for media edge test
instanceEdgeCacheService:
type: gcp:networkservices:EdgeCacheService
properties:
description: some description
routing:
hostRules:
- description: host rule description
hosts:
- sslcert.tf-test.club
pathMatcher: routes
pathMatchers:
- name: routes
routeRules:
- description: a route rule to match against master playlist
priority: 1
matchRules:
- pathTemplateMatch: /master.m3u8
origin: ${instanceEdgeCacheOrigin.name}
routeAction:
cdnPolicy:
signedRequestMode: REQUIRE_TOKENS
signedRequestKeyset: ${keyset.id}
signedTokenOptions:
tokenQueryParameter: edge-cache-token
signedRequestMaximumExpirationTtl: 600s
addSignatures:
actions:
- GENERATE_COOKIE
keyset: ${keyset.id}
copiedParameters:
- PathGlobs
- SessionID
- description: a route rule to match against all playlists
priority: 2
matchRules:
- pathTemplateMatch: /*.m3u8
origin: ${instanceEdgeCacheOrigin.name}
routeAction:
cdnPolicy:
signedRequestMode: REQUIRE_TOKENS
signedRequestKeyset: ${keyset.id}
signedTokenOptions:
tokenQueryParameter: hdnts
allowedSignatureAlgorithms:
- ED25519
- HMAC_SHA_256
- HMAC_SHA1
addSignatures:
actions:
- GENERATE_TOKEN_HLS_COOKIELESS
keyset: ${keyset.id}
tokenTtl: 1200s
tokenQueryParameter: hdntl
copiedParameters:
- URLPrefix
- description: a route rule to match against
priority: 3
matchRules:
- pathTemplateMatch: /**.m3u8
origin: ${instanceEdgeCacheOrigin.name}
routeAction:
cdnPolicy:
signedRequestMode: REQUIRE_TOKENS
signedRequestKeyset: ${keyset.id}
signedTokenOptions:
tokenQueryParameter: hdntl
addSignatures:
actions:
- PROPAGATE_TOKEN_HLS_COOKIELESS
tokenQueryParameter: hdntl
Create EdgeCacheService Resource
new EdgeCacheService(name: string, args: EdgeCacheServiceArgs, opts?: CustomResourceOptions);
@overload
def EdgeCacheService(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
disable_http2: Optional[bool] = None,
disable_quic: Optional[bool] = None,
edge_security_policy: Optional[str] = None,
edge_ssl_certificates: Optional[Sequence[str]] = None,
labels: Optional[Mapping[str, str]] = None,
log_config: Optional[EdgeCacheServiceLogConfigArgs] = None,
name: Optional[str] = None,
project: Optional[str] = None,
require_tls: Optional[bool] = None,
routing: Optional[EdgeCacheServiceRoutingArgs] = None,
ssl_policy: Optional[str] = None)
@overload
def EdgeCacheService(resource_name: str,
args: EdgeCacheServiceArgs,
opts: Optional[ResourceOptions] = None)
func NewEdgeCacheService(ctx *Context, name string, args EdgeCacheServiceArgs, opts ...ResourceOption) (*EdgeCacheService, error)
public EdgeCacheService(string name, EdgeCacheServiceArgs args, CustomResourceOptions? opts = null)
public EdgeCacheService(String name, EdgeCacheServiceArgs args)
public EdgeCacheService(String name, EdgeCacheServiceArgs args, CustomResourceOptions options)
type: gcp:networkservices:EdgeCacheService
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EdgeCacheServiceArgs
- 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 EdgeCacheServiceArgs
- 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 EdgeCacheServiceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EdgeCacheServiceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EdgeCacheServiceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
EdgeCacheService 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 EdgeCacheService resource accepts the following input properties:
- Routing
Edge
Cache Service Routing Defines how requests are routed, modified, cached and/or which origin content is filled from. Structure is documented below.
- Description string
A human-readable description of the hostRule.
(Optional) A human-readable description of the resource.
(Optional) A human-readable description of the routeRule.
(Optional) A human-readable description of the resource.
- Disable
Http2 bool Disables HTTP/2. HTTP/2 (h2) is enabled by default and recommended for performance. HTTP/2 improves connection re-use and reduces connection setup overhead by sending multiple streams over the same connection. Some legacy HTTP clients may have issues with HTTP/2 connections due to broken HTTP/2 implementations. Setting this to true will prevent HTTP/2 from being advertised and negotiated.
- Disable
Quic bool HTTP/3 (IETF QUIC) and Google QUIC are enabled by default.
- Edge
Security stringPolicy Resource URL that points at the Cloud Armor edge security policy that is applied on each request against the EdgeCacheService.
- Edge
Ssl List<string>Certificates URLs to sslCertificate resources that are used to authenticate connections between users and the EdgeCacheService. Note that only "global" certificates with a "scope" of "EDGE_CACHE" can be attached to an EdgeCacheService.
- Labels Dictionary<string, string>
Set of label tags associated with the EdgeCache resource.
- Log
Config EdgeCache Service Log Config Specifies the logging options for the traffic served by this service. If logging is enabled, logs will be exported to Cloud Logging. Structure is documented below.
- Name string
Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Require
Tls bool Require TLS (HTTPS) for all clients connecting to this service. Clients who connect over HTTP (port 80) will receive a HTTP 301 to the same URL over HTTPS (port 443). You must have at least one (1) edgeSslCertificate specified to enable this.
- Ssl
Policy string URL of the SslPolicy resource that will be associated with the EdgeCacheService. If not set, the EdgeCacheService has no SSL policy configured, and will default to the "COMPATIBLE" policy.
- Routing
Edge
Cache Service Routing Args Defines how requests are routed, modified, cached and/or which origin content is filled from. Structure is documented below.
- Description string
A human-readable description of the hostRule.
(Optional) A human-readable description of the resource.
(Optional) A human-readable description of the routeRule.
(Optional) A human-readable description of the resource.
- Disable
Http2 bool Disables HTTP/2. HTTP/2 (h2) is enabled by default and recommended for performance. HTTP/2 improves connection re-use and reduces connection setup overhead by sending multiple streams over the same connection. Some legacy HTTP clients may have issues with HTTP/2 connections due to broken HTTP/2 implementations. Setting this to true will prevent HTTP/2 from being advertised and negotiated.
- Disable
Quic bool HTTP/3 (IETF QUIC) and Google QUIC are enabled by default.
- Edge
Security stringPolicy Resource URL that points at the Cloud Armor edge security policy that is applied on each request against the EdgeCacheService.
- Edge
Ssl []stringCertificates URLs to sslCertificate resources that are used to authenticate connections between users and the EdgeCacheService. Note that only "global" certificates with a "scope" of "EDGE_CACHE" can be attached to an EdgeCacheService.
- Labels map[string]string
Set of label tags associated with the EdgeCache resource.
- Log
Config EdgeCache Service Log Config Args Specifies the logging options for the traffic served by this service. If logging is enabled, logs will be exported to Cloud Logging. Structure is documented below.
- Name string
Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Require
Tls bool Require TLS (HTTPS) for all clients connecting to this service. Clients who connect over HTTP (port 80) will receive a HTTP 301 to the same URL over HTTPS (port 443). You must have at least one (1) edgeSslCertificate specified to enable this.
- Ssl
Policy string URL of the SslPolicy resource that will be associated with the EdgeCacheService. If not set, the EdgeCacheService has no SSL policy configured, and will default to the "COMPATIBLE" policy.
- routing
Edge
Cache Service Routing Defines how requests are routed, modified, cached and/or which origin content is filled from. Structure is documented below.
- description String
A human-readable description of the hostRule.
(Optional) A human-readable description of the resource.
(Optional) A human-readable description of the routeRule.
(Optional) A human-readable description of the resource.
- disable
Http2 Boolean Disables HTTP/2. HTTP/2 (h2) is enabled by default and recommended for performance. HTTP/2 improves connection re-use and reduces connection setup overhead by sending multiple streams over the same connection. Some legacy HTTP clients may have issues with HTTP/2 connections due to broken HTTP/2 implementations. Setting this to true will prevent HTTP/2 from being advertised and negotiated.
- disable
Quic Boolean HTTP/3 (IETF QUIC) and Google QUIC are enabled by default.
- edge
Security StringPolicy Resource URL that points at the Cloud Armor edge security policy that is applied on each request against the EdgeCacheService.
- edge
Ssl List<String>Certificates URLs to sslCertificate resources that are used to authenticate connections between users and the EdgeCacheService. Note that only "global" certificates with a "scope" of "EDGE_CACHE" can be attached to an EdgeCacheService.
- labels Map<String,String>
Set of label tags associated with the EdgeCache resource.
- log
Config EdgeCache Service Log Config Specifies the logging options for the traffic served by this service. If logging is enabled, logs will be exported to Cloud Logging. Structure is documented below.
- name String
Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- require
Tls Boolean Require TLS (HTTPS) for all clients connecting to this service. Clients who connect over HTTP (port 80) will receive a HTTP 301 to the same URL over HTTPS (port 443). You must have at least one (1) edgeSslCertificate specified to enable this.
- ssl
Policy String URL of the SslPolicy resource that will be associated with the EdgeCacheService. If not set, the EdgeCacheService has no SSL policy configured, and will default to the "COMPATIBLE" policy.
- routing
Edge
Cache Service Routing Defines how requests are routed, modified, cached and/or which origin content is filled from. Structure is documented below.
- description string
A human-readable description of the hostRule.
(Optional) A human-readable description of the resource.
(Optional) A human-readable description of the routeRule.
(Optional) A human-readable description of the resource.
- disable
Http2 boolean Disables HTTP/2. HTTP/2 (h2) is enabled by default and recommended for performance. HTTP/2 improves connection re-use and reduces connection setup overhead by sending multiple streams over the same connection. Some legacy HTTP clients may have issues with HTTP/2 connections due to broken HTTP/2 implementations. Setting this to true will prevent HTTP/2 from being advertised and negotiated.
- disable
Quic boolean HTTP/3 (IETF QUIC) and Google QUIC are enabled by default.
- edge
Security stringPolicy Resource URL that points at the Cloud Armor edge security policy that is applied on each request against the EdgeCacheService.
- edge
Ssl string[]Certificates URLs to sslCertificate resources that are used to authenticate connections between users and the EdgeCacheService. Note that only "global" certificates with a "scope" of "EDGE_CACHE" can be attached to an EdgeCacheService.
- labels {[key: string]: string}
Set of label tags associated with the EdgeCache resource.
- log
Config EdgeCache Service Log Config Specifies the logging options for the traffic served by this service. If logging is enabled, logs will be exported to Cloud Logging. Structure is documented below.
- name string
Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.
- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- require
Tls boolean Require TLS (HTTPS) for all clients connecting to this service. Clients who connect over HTTP (port 80) will receive a HTTP 301 to the same URL over HTTPS (port 443). You must have at least one (1) edgeSslCertificate specified to enable this.
- ssl
Policy string URL of the SslPolicy resource that will be associated with the EdgeCacheService. If not set, the EdgeCacheService has no SSL policy configured, and will default to the "COMPATIBLE" policy.
- routing
Edge
Cache Service Routing Args Defines how requests are routed, modified, cached and/or which origin content is filled from. Structure is documented below.
- description str
A human-readable description of the hostRule.
(Optional) A human-readable description of the resource.
(Optional) A human-readable description of the routeRule.
(Optional) A human-readable description of the resource.
- disable_
http2 bool Disables HTTP/2. HTTP/2 (h2) is enabled by default and recommended for performance. HTTP/2 improves connection re-use and reduces connection setup overhead by sending multiple streams over the same connection. Some legacy HTTP clients may have issues with HTTP/2 connections due to broken HTTP/2 implementations. Setting this to true will prevent HTTP/2 from being advertised and negotiated.
- disable_
quic bool HTTP/3 (IETF QUIC) and Google QUIC are enabled by default.
- edge_
security_ strpolicy Resource URL that points at the Cloud Armor edge security policy that is applied on each request against the EdgeCacheService.
- edge_
ssl_ Sequence[str]certificates URLs to sslCertificate resources that are used to authenticate connections between users and the EdgeCacheService. Note that only "global" certificates with a "scope" of "EDGE_CACHE" can be attached to an EdgeCacheService.
- labels Mapping[str, str]
Set of label tags associated with the EdgeCache resource.
- log_
config EdgeCache Service Log Config Args Specifies the logging options for the traffic served by this service. If logging is enabled, logs will be exported to Cloud Logging. Structure is documented below.
- name str
Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.
- project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- require_
tls bool Require TLS (HTTPS) for all clients connecting to this service. Clients who connect over HTTP (port 80) will receive a HTTP 301 to the same URL over HTTPS (port 443). You must have at least one (1) edgeSslCertificate specified to enable this.
- ssl_
policy str URL of the SslPolicy resource that will be associated with the EdgeCacheService. If not set, the EdgeCacheService has no SSL policy configured, and will default to the "COMPATIBLE" policy.
- routing Property Map
Defines how requests are routed, modified, cached and/or which origin content is filled from. Structure is documented below.
- description String
A human-readable description of the hostRule.
(Optional) A human-readable description of the resource.
(Optional) A human-readable description of the routeRule.
(Optional) A human-readable description of the resource.
- disable
Http2 Boolean Disables HTTP/2. HTTP/2 (h2) is enabled by default and recommended for performance. HTTP/2 improves connection re-use and reduces connection setup overhead by sending multiple streams over the same connection. Some legacy HTTP clients may have issues with HTTP/2 connections due to broken HTTP/2 implementations. Setting this to true will prevent HTTP/2 from being advertised and negotiated.
- disable
Quic Boolean HTTP/3 (IETF QUIC) and Google QUIC are enabled by default.
- edge
Security StringPolicy Resource URL that points at the Cloud Armor edge security policy that is applied on each request against the EdgeCacheService.
- edge
Ssl List<String>Certificates URLs to sslCertificate resources that are used to authenticate connections between users and the EdgeCacheService. Note that only "global" certificates with a "scope" of "EDGE_CACHE" can be attached to an EdgeCacheService.
- labels Map<String>
Set of label tags associated with the EdgeCache resource.
- log
Config Property Map Specifies the logging options for the traffic served by this service. If logging is enabled, logs will be exported to Cloud Logging. Structure is documented below.
- name String
Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- require
Tls Boolean Require TLS (HTTPS) for all clients connecting to this service. Clients who connect over HTTP (port 80) will receive a HTTP 301 to the same URL over HTTPS (port 443). You must have at least one (1) edgeSslCertificate specified to enable this.
- ssl
Policy String URL of the SslPolicy resource that will be associated with the EdgeCacheService. If not set, the EdgeCacheService has no SSL policy configured, and will default to the "COMPATIBLE" policy.
Outputs
All input properties are implicitly available as output properties. Additionally, the EdgeCacheService resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Ipv4Addresses List<string>
The IPv4 addresses associated with this service. Addresses are static for the lifetime of the service.
- Ipv6Addresses List<string>
The IPv6 addresses associated with this service. Addresses are static for the lifetime of the service.
- Id string
The provider-assigned unique ID for this managed resource.
- Ipv4Addresses []string
The IPv4 addresses associated with this service. Addresses are static for the lifetime of the service.
- Ipv6Addresses []string
The IPv6 addresses associated with this service. Addresses are static for the lifetime of the service.
- id String
The provider-assigned unique ID for this managed resource.
- ipv4Addresses List<String>
The IPv4 addresses associated with this service. Addresses are static for the lifetime of the service.
- ipv6Addresses List<String>
The IPv6 addresses associated with this service. Addresses are static for the lifetime of the service.
- id string
The provider-assigned unique ID for this managed resource.
- ipv4Addresses string[]
The IPv4 addresses associated with this service. Addresses are static for the lifetime of the service.
- ipv6Addresses string[]
The IPv6 addresses associated with this service. Addresses are static for the lifetime of the service.
- id str
The provider-assigned unique ID for this managed resource.
- ipv4_
addresses Sequence[str] The IPv4 addresses associated with this service. Addresses are static for the lifetime of the service.
- ipv6_
addresses Sequence[str] The IPv6 addresses associated with this service. Addresses are static for the lifetime of the service.
- id String
The provider-assigned unique ID for this managed resource.
- ipv4Addresses List<String>
The IPv4 addresses associated with this service. Addresses are static for the lifetime of the service.
- ipv6Addresses List<String>
The IPv6 addresses associated with this service. Addresses are static for the lifetime of the service.
Look up Existing EdgeCacheService Resource
Get an existing EdgeCacheService 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?: EdgeCacheServiceState, opts?: CustomResourceOptions): EdgeCacheService
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
disable_http2: Optional[bool] = None,
disable_quic: Optional[bool] = None,
edge_security_policy: Optional[str] = None,
edge_ssl_certificates: Optional[Sequence[str]] = None,
ipv4_addresses: Optional[Sequence[str]] = None,
ipv6_addresses: Optional[Sequence[str]] = None,
labels: Optional[Mapping[str, str]] = None,
log_config: Optional[EdgeCacheServiceLogConfigArgs] = None,
name: Optional[str] = None,
project: Optional[str] = None,
require_tls: Optional[bool] = None,
routing: Optional[EdgeCacheServiceRoutingArgs] = None,
ssl_policy: Optional[str] = None) -> EdgeCacheService
func GetEdgeCacheService(ctx *Context, name string, id IDInput, state *EdgeCacheServiceState, opts ...ResourceOption) (*EdgeCacheService, error)
public static EdgeCacheService Get(string name, Input<string> id, EdgeCacheServiceState? state, CustomResourceOptions? opts = null)
public static EdgeCacheService get(String name, Output<String> id, EdgeCacheServiceState 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.
- Description string
A human-readable description of the hostRule.
(Optional) A human-readable description of the resource.
(Optional) A human-readable description of the routeRule.
(Optional) A human-readable description of the resource.
- Disable
Http2 bool Disables HTTP/2. HTTP/2 (h2) is enabled by default and recommended for performance. HTTP/2 improves connection re-use and reduces connection setup overhead by sending multiple streams over the same connection. Some legacy HTTP clients may have issues with HTTP/2 connections due to broken HTTP/2 implementations. Setting this to true will prevent HTTP/2 from being advertised and negotiated.
- Disable
Quic bool HTTP/3 (IETF QUIC) and Google QUIC are enabled by default.
- Edge
Security stringPolicy Resource URL that points at the Cloud Armor edge security policy that is applied on each request against the EdgeCacheService.
- Edge
Ssl List<string>Certificates URLs to sslCertificate resources that are used to authenticate connections between users and the EdgeCacheService. Note that only "global" certificates with a "scope" of "EDGE_CACHE" can be attached to an EdgeCacheService.
- Ipv4Addresses List<string>
The IPv4 addresses associated with this service. Addresses are static for the lifetime of the service.
- Ipv6Addresses List<string>
The IPv6 addresses associated with this service. Addresses are static for the lifetime of the service.
- Labels Dictionary<string, string>
Set of label tags associated with the EdgeCache resource.
- Log
Config EdgeCache Service Log Config Specifies the logging options for the traffic served by this service. If logging is enabled, logs will be exported to Cloud Logging. Structure is documented below.
- Name string
Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Require
Tls bool Require TLS (HTTPS) for all clients connecting to this service. Clients who connect over HTTP (port 80) will receive a HTTP 301 to the same URL over HTTPS (port 443). You must have at least one (1) edgeSslCertificate specified to enable this.
- Routing
Edge
Cache Service Routing Defines how requests are routed, modified, cached and/or which origin content is filled from. Structure is documented below.
- Ssl
Policy string URL of the SslPolicy resource that will be associated with the EdgeCacheService. If not set, the EdgeCacheService has no SSL policy configured, and will default to the "COMPATIBLE" policy.
- Description string
A human-readable description of the hostRule.
(Optional) A human-readable description of the resource.
(Optional) A human-readable description of the routeRule.
(Optional) A human-readable description of the resource.
- Disable
Http2 bool Disables HTTP/2. HTTP/2 (h2) is enabled by default and recommended for performance. HTTP/2 improves connection re-use and reduces connection setup overhead by sending multiple streams over the same connection. Some legacy HTTP clients may have issues with HTTP/2 connections due to broken HTTP/2 implementations. Setting this to true will prevent HTTP/2 from being advertised and negotiated.
- Disable
Quic bool HTTP/3 (IETF QUIC) and Google QUIC are enabled by default.
- Edge
Security stringPolicy Resource URL that points at the Cloud Armor edge security policy that is applied on each request against the EdgeCacheService.
- Edge
Ssl []stringCertificates URLs to sslCertificate resources that are used to authenticate connections between users and the EdgeCacheService. Note that only "global" certificates with a "scope" of "EDGE_CACHE" can be attached to an EdgeCacheService.
- Ipv4Addresses []string
The IPv4 addresses associated with this service. Addresses are static for the lifetime of the service.
- Ipv6Addresses []string
The IPv6 addresses associated with this service. Addresses are static for the lifetime of the service.
- Labels map[string]string
Set of label tags associated with the EdgeCache resource.
- Log
Config EdgeCache Service Log Config Args Specifies the logging options for the traffic served by this service. If logging is enabled, logs will be exported to Cloud Logging. Structure is documented below.
- Name string
Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Require
Tls bool Require TLS (HTTPS) for all clients connecting to this service. Clients who connect over HTTP (port 80) will receive a HTTP 301 to the same URL over HTTPS (port 443). You must have at least one (1) edgeSslCertificate specified to enable this.
- Routing
Edge
Cache Service Routing Args Defines how requests are routed, modified, cached and/or which origin content is filled from. Structure is documented below.
- Ssl
Policy string URL of the SslPolicy resource that will be associated with the EdgeCacheService. If not set, the EdgeCacheService has no SSL policy configured, and will default to the "COMPATIBLE" policy.
- description String
A human-readable description of the hostRule.
(Optional) A human-readable description of the resource.
(Optional) A human-readable description of the routeRule.
(Optional) A human-readable description of the resource.
- disable
Http2 Boolean Disables HTTP/2. HTTP/2 (h2) is enabled by default and recommended for performance. HTTP/2 improves connection re-use and reduces connection setup overhead by sending multiple streams over the same connection. Some legacy HTTP clients may have issues with HTTP/2 connections due to broken HTTP/2 implementations. Setting this to true will prevent HTTP/2 from being advertised and negotiated.
- disable
Quic Boolean HTTP/3 (IETF QUIC) and Google QUIC are enabled by default.
- edge
Security StringPolicy Resource URL that points at the Cloud Armor edge security policy that is applied on each request against the EdgeCacheService.
- edge
Ssl List<String>Certificates URLs to sslCertificate resources that are used to authenticate connections between users and the EdgeCacheService. Note that only "global" certificates with a "scope" of "EDGE_CACHE" can be attached to an EdgeCacheService.
- ipv4Addresses List<String>
The IPv4 addresses associated with this service. Addresses are static for the lifetime of the service.
- ipv6Addresses List<String>
The IPv6 addresses associated with this service. Addresses are static for the lifetime of the service.
- labels Map<String,String>
Set of label tags associated with the EdgeCache resource.
- log
Config EdgeCache Service Log Config Specifies the logging options for the traffic served by this service. If logging is enabled, logs will be exported to Cloud Logging. Structure is documented below.
- name String
Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- require
Tls Boolean Require TLS (HTTPS) for all clients connecting to this service. Clients who connect over HTTP (port 80) will receive a HTTP 301 to the same URL over HTTPS (port 443). You must have at least one (1) edgeSslCertificate specified to enable this.
- routing
Edge
Cache Service Routing Defines how requests are routed, modified, cached and/or which origin content is filled from. Structure is documented below.
- ssl
Policy String URL of the SslPolicy resource that will be associated with the EdgeCacheService. If not set, the EdgeCacheService has no SSL policy configured, and will default to the "COMPATIBLE" policy.
- description string
A human-readable description of the hostRule.
(Optional) A human-readable description of the resource.
(Optional) A human-readable description of the routeRule.
(Optional) A human-readable description of the resource.
- disable
Http2 boolean Disables HTTP/2. HTTP/2 (h2) is enabled by default and recommended for performance. HTTP/2 improves connection re-use and reduces connection setup overhead by sending multiple streams over the same connection. Some legacy HTTP clients may have issues with HTTP/2 connections due to broken HTTP/2 implementations. Setting this to true will prevent HTTP/2 from being advertised and negotiated.
- disable
Quic boolean HTTP/3 (IETF QUIC) and Google QUIC are enabled by default.
- edge
Security stringPolicy Resource URL that points at the Cloud Armor edge security policy that is applied on each request against the EdgeCacheService.
- edge
Ssl string[]Certificates URLs to sslCertificate resources that are used to authenticate connections between users and the EdgeCacheService. Note that only "global" certificates with a "scope" of "EDGE_CACHE" can be attached to an EdgeCacheService.
- ipv4Addresses string[]
The IPv4 addresses associated with this service. Addresses are static for the lifetime of the service.
- ipv6Addresses string[]
The IPv6 addresses associated with this service. Addresses are static for the lifetime of the service.
- labels {[key: string]: string}
Set of label tags associated with the EdgeCache resource.
- log
Config EdgeCache Service Log Config Specifies the logging options for the traffic served by this service. If logging is enabled, logs will be exported to Cloud Logging. Structure is documented below.
- name string
Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.
- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- require
Tls boolean Require TLS (HTTPS) for all clients connecting to this service. Clients who connect over HTTP (port 80) will receive a HTTP 301 to the same URL over HTTPS (port 443). You must have at least one (1) edgeSslCertificate specified to enable this.
- routing
Edge
Cache Service Routing Defines how requests are routed, modified, cached and/or which origin content is filled from. Structure is documented below.
- ssl
Policy string URL of the SslPolicy resource that will be associated with the EdgeCacheService. If not set, the EdgeCacheService has no SSL policy configured, and will default to the "COMPATIBLE" policy.
- description str
A human-readable description of the hostRule.
(Optional) A human-readable description of the resource.
(Optional) A human-readable description of the routeRule.
(Optional) A human-readable description of the resource.
- disable_
http2 bool Disables HTTP/2. HTTP/2 (h2) is enabled by default and recommended for performance. HTTP/2 improves connection re-use and reduces connection setup overhead by sending multiple streams over the same connection. Some legacy HTTP clients may have issues with HTTP/2 connections due to broken HTTP/2 implementations. Setting this to true will prevent HTTP/2 from being advertised and negotiated.
- disable_
quic bool HTTP/3 (IETF QUIC) and Google QUIC are enabled by default.
- edge_
security_ strpolicy Resource URL that points at the Cloud Armor edge security policy that is applied on each request against the EdgeCacheService.
- edge_
ssl_ Sequence[str]certificates URLs to sslCertificate resources that are used to authenticate connections between users and the EdgeCacheService. Note that only "global" certificates with a "scope" of "EDGE_CACHE" can be attached to an EdgeCacheService.
- ipv4_
addresses Sequence[str] The IPv4 addresses associated with this service. Addresses are static for the lifetime of the service.
- ipv6_
addresses Sequence[str] The IPv6 addresses associated with this service. Addresses are static for the lifetime of the service.
- labels Mapping[str, str]
Set of label tags associated with the EdgeCache resource.
- log_
config EdgeCache Service Log Config Args Specifies the logging options for the traffic served by this service. If logging is enabled, logs will be exported to Cloud Logging. Structure is documented below.
- name str
Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.
- project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- require_
tls bool Require TLS (HTTPS) for all clients connecting to this service. Clients who connect over HTTP (port 80) will receive a HTTP 301 to the same URL over HTTPS (port 443). You must have at least one (1) edgeSslCertificate specified to enable this.
- routing
Edge
Cache Service Routing Args Defines how requests are routed, modified, cached and/or which origin content is filled from. Structure is documented below.
- ssl_
policy str URL of the SslPolicy resource that will be associated with the EdgeCacheService. If not set, the EdgeCacheService has no SSL policy configured, and will default to the "COMPATIBLE" policy.
- description String
A human-readable description of the hostRule.
(Optional) A human-readable description of the resource.
(Optional) A human-readable description of the routeRule.
(Optional) A human-readable description of the resource.
- disable
Http2 Boolean Disables HTTP/2. HTTP/2 (h2) is enabled by default and recommended for performance. HTTP/2 improves connection re-use and reduces connection setup overhead by sending multiple streams over the same connection. Some legacy HTTP clients may have issues with HTTP/2 connections due to broken HTTP/2 implementations. Setting this to true will prevent HTTP/2 from being advertised and negotiated.
- disable
Quic Boolean HTTP/3 (IETF QUIC) and Google QUIC are enabled by default.
- edge
Security StringPolicy Resource URL that points at the Cloud Armor edge security policy that is applied on each request against the EdgeCacheService.
- edge
Ssl List<String>Certificates URLs to sslCertificate resources that are used to authenticate connections between users and the EdgeCacheService. Note that only "global" certificates with a "scope" of "EDGE_CACHE" can be attached to an EdgeCacheService.
- ipv4Addresses List<String>
The IPv4 addresses associated with this service. Addresses are static for the lifetime of the service.
- ipv6Addresses List<String>
The IPv6 addresses associated with this service. Addresses are static for the lifetime of the service.
- labels Map<String>
Set of label tags associated with the EdgeCache resource.
- log
Config Property Map Specifies the logging options for the traffic served by this service. If logging is enabled, logs will be exported to Cloud Logging. Structure is documented below.
- name String
Name of the resource; provided by the client when the resource is created. The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit.
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- require
Tls Boolean Require TLS (HTTPS) for all clients connecting to this service. Clients who connect over HTTP (port 80) will receive a HTTP 301 to the same URL over HTTPS (port 443). You must have at least one (1) edgeSslCertificate specified to enable this.
- routing Property Map
Defines how requests are routed, modified, cached and/or which origin content is filled from. Structure is documented below.
- ssl
Policy String URL of the SslPolicy resource that will be associated with the EdgeCacheService. If not set, the EdgeCacheService has no SSL policy configured, and will default to the "COMPATIBLE" policy.
Supporting Types
EdgeCacheServiceLogConfig, EdgeCacheServiceLogConfigArgs
- Enable bool
Specifies whether to enable logging for traffic served by this service.
- Sample
Rate double Configures the sampling rate of requests, where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0, and the value of the field must be in [0, 1]. This field can only be specified if logging is enabled for this service.
- Enable bool
Specifies whether to enable logging for traffic served by this service.
- Sample
Rate float64 Configures the sampling rate of requests, where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0, and the value of the field must be in [0, 1]. This field can only be specified if logging is enabled for this service.
- enable Boolean
Specifies whether to enable logging for traffic served by this service.
- sample
Rate Double Configures the sampling rate of requests, where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0, and the value of the field must be in [0, 1]. This field can only be specified if logging is enabled for this service.
- enable boolean
Specifies whether to enable logging for traffic served by this service.
- sample
Rate number Configures the sampling rate of requests, where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0, and the value of the field must be in [0, 1]. This field can only be specified if logging is enabled for this service.
- enable bool
Specifies whether to enable logging for traffic served by this service.
- sample_
rate float Configures the sampling rate of requests, where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0, and the value of the field must be in [0, 1]. This field can only be specified if logging is enabled for this service.
- enable Boolean
Specifies whether to enable logging for traffic served by this service.
- sample
Rate Number Configures the sampling rate of requests, where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0, and the value of the field must be in [0, 1]. This field can only be specified if logging is enabled for this service.
EdgeCacheServiceRouting, EdgeCacheServiceRoutingArgs
- Host
Rules List<EdgeCache Service Routing Host Rule> The list of hostRules to match against. These rules define which hostnames the EdgeCacheService will match against, and which route configurations apply. Structure is documented below.
- Path
Matchers List<EdgeCache Service Routing Path Matcher> The list of pathMatchers referenced via name by hostRules. PathMatcher is used to match the path portion of the URL when a HostRule matches the URL's host portion. Structure is documented below.
- Host
Rules []EdgeCache Service Routing Host Rule The list of hostRules to match against. These rules define which hostnames the EdgeCacheService will match against, and which route configurations apply. Structure is documented below.
- Path
Matchers []EdgeCache Service Routing Path Matcher The list of pathMatchers referenced via name by hostRules. PathMatcher is used to match the path portion of the URL when a HostRule matches the URL's host portion. Structure is documented below.
- host
Rules List<EdgeCache Service Routing Host Rule> The list of hostRules to match against. These rules define which hostnames the EdgeCacheService will match against, and which route configurations apply. Structure is documented below.
- path
Matchers List<EdgeCache Service Routing Path Matcher> The list of pathMatchers referenced via name by hostRules. PathMatcher is used to match the path portion of the URL when a HostRule matches the URL's host portion. Structure is documented below.
- host
Rules EdgeCache Service Routing Host Rule[] The list of hostRules to match against. These rules define which hostnames the EdgeCacheService will match against, and which route configurations apply. Structure is documented below.
- path
Matchers EdgeCache Service Routing Path Matcher[] The list of pathMatchers referenced via name by hostRules. PathMatcher is used to match the path portion of the URL when a HostRule matches the URL's host portion. Structure is documented below.
- host_
rules Sequence[EdgeCache Service Routing Host Rule] The list of hostRules to match against. These rules define which hostnames the EdgeCacheService will match against, and which route configurations apply. Structure is documented below.
- path_
matchers Sequence[EdgeCache Service Routing Path Matcher] The list of pathMatchers referenced via name by hostRules. PathMatcher is used to match the path portion of the URL when a HostRule matches the URL's host portion. Structure is documented below.
- host
Rules List<Property Map> The list of hostRules to match against. These rules define which hostnames the EdgeCacheService will match against, and which route configurations apply. Structure is documented below.
- path
Matchers List<Property Map> The list of pathMatchers referenced via name by hostRules. PathMatcher is used to match the path portion of the URL when a HostRule matches the URL's host portion. Structure is documented below.
EdgeCacheServiceRoutingHostRule, EdgeCacheServiceRoutingHostRuleArgs
- Hosts List<string>
The list of host patterns to match. Host patterns must be valid hostnames. Ports are not allowed. Wildcard hosts are supported in the suffix or prefix form. * matches any string of ([a-z0-9-.]*). It does not match the empty string. When multiple hosts are specified, hosts are matched in the following priority:
- Exact domain names:
www.foo.com
. - Suffix domain wildcards:
*.foo.com
or*-bar.foo.com
. - Prefix domain wildcards:
foo.*
orfoo-*
. - Special wildcard
*
matching any domain. Notes: The wildcard will not match the empty string. e.g.*-bar.foo.com
will matchbaz-bar.foo.com
but not-bar.foo.com
. The longest wildcards match first. Only a single host in the entire service can match on*
. A domain must be unique across all configured hosts within a service. Hosts are matched against the HTTP Host header, or for HTTP/2 and HTTP/3, the ":authority" header, from the incoming request. You may specify up to 10 hosts.
- Exact domain names:
- Path
Matcher string The name of the pathMatcher associated with this hostRule.
- Description string
A human-readable description of the hostRule.
- Hosts []string
The list of host patterns to match. Host patterns must be valid hostnames. Ports are not allowed. Wildcard hosts are supported in the suffix or prefix form. * matches any string of ([a-z0-9-.]*). It does not match the empty string. When multiple hosts are specified, hosts are matched in the following priority:
- Exact domain names:
www.foo.com
. - Suffix domain wildcards:
*.foo.com
or*-bar.foo.com
. - Prefix domain wildcards:
foo.*
orfoo-*
. - Special wildcard
*
matching any domain. Notes: The wildcard will not match the empty string. e.g.*-bar.foo.com
will matchbaz-bar.foo.com
but not-bar.foo.com
. The longest wildcards match first. Only a single host in the entire service can match on*
. A domain must be unique across all configured hosts within a service. Hosts are matched against the HTTP Host header, or for HTTP/2 and HTTP/3, the ":authority" header, from the incoming request. You may specify up to 10 hosts.
- Exact domain names:
- Path
Matcher string The name of the pathMatcher associated with this hostRule.
- Description string
A human-readable description of the hostRule.
- hosts List<String>
The list of host patterns to match. Host patterns must be valid hostnames. Ports are not allowed. Wildcard hosts are supported in the suffix or prefix form. * matches any string of ([a-z0-9-.]*). It does not match the empty string. When multiple hosts are specified, hosts are matched in the following priority:
- Exact domain names:
www.foo.com
. - Suffix domain wildcards:
*.foo.com
or*-bar.foo.com
. - Prefix domain wildcards:
foo.*
orfoo-*
. - Special wildcard
*
matching any domain. Notes: The wildcard will not match the empty string. e.g.*-bar.foo.com
will matchbaz-bar.foo.com
but not-bar.foo.com
. The longest wildcards match first. Only a single host in the entire service can match on*
. A domain must be unique across all configured hosts within a service. Hosts are matched against the HTTP Host header, or for HTTP/2 and HTTP/3, the ":authority" header, from the incoming request. You may specify up to 10 hosts.
- Exact domain names:
- path
Matcher String The name of the pathMatcher associated with this hostRule.
- description String
A human-readable description of the hostRule.
- hosts string[]
The list of host patterns to match. Host patterns must be valid hostnames. Ports are not allowed. Wildcard hosts are supported in the suffix or prefix form. * matches any string of ([a-z0-9-.]*). It does not match the empty string. When multiple hosts are specified, hosts are matched in the following priority:
- Exact domain names:
www.foo.com
. - Suffix domain wildcards:
*.foo.com
or*-bar.foo.com
. - Prefix domain wildcards:
foo.*
orfoo-*
. - Special wildcard
*
matching any domain. Notes: The wildcard will not match the empty string. e.g.*-bar.foo.com
will matchbaz-bar.foo.com
but not-bar.foo.com
. The longest wildcards match first. Only a single host in the entire service can match on*
. A domain must be unique across all configured hosts within a service. Hosts are matched against the HTTP Host header, or for HTTP/2 and HTTP/3, the ":authority" header, from the incoming request. You may specify up to 10 hosts.
- Exact domain names:
- path
Matcher string The name of the pathMatcher associated with this hostRule.
- description string
A human-readable description of the hostRule.
- hosts Sequence[str]
The list of host patterns to match. Host patterns must be valid hostnames. Ports are not allowed. Wildcard hosts are supported in the suffix or prefix form. * matches any string of ([a-z0-9-.]*). It does not match the empty string. When multiple hosts are specified, hosts are matched in the following priority:
- Exact domain names:
www.foo.com
. - Suffix domain wildcards:
*.foo.com
or*-bar.foo.com
. - Prefix domain wildcards:
foo.*
orfoo-*
. - Special wildcard
*
matching any domain. Notes: The wildcard will not match the empty string. e.g.*-bar.foo.com
will matchbaz-bar.foo.com
but not-bar.foo.com
. The longest wildcards match first. Only a single host in the entire service can match on*
. A domain must be unique across all configured hosts within a service. Hosts are matched against the HTTP Host header, or for HTTP/2 and HTTP/3, the ":authority" header, from the incoming request. You may specify up to 10 hosts.
- Exact domain names:
- path_
matcher str The name of the pathMatcher associated with this hostRule.
- description str
A human-readable description of the hostRule.
- hosts List<String>
The list of host patterns to match. Host patterns must be valid hostnames. Ports are not allowed. Wildcard hosts are supported in the suffix or prefix form. * matches any string of ([a-z0-9-.]*). It does not match the empty string. When multiple hosts are specified, hosts are matched in the following priority:
- Exact domain names:
www.foo.com
. - Suffix domain wildcards:
*.foo.com
or*-bar.foo.com
. - Prefix domain wildcards:
foo.*
orfoo-*
. - Special wildcard
*
matching any domain. Notes: The wildcard will not match the empty string. e.g.*-bar.foo.com
will matchbaz-bar.foo.com
but not-bar.foo.com
. The longest wildcards match first. Only a single host in the entire service can match on*
. A domain must be unique across all configured hosts within a service. Hosts are matched against the HTTP Host header, or for HTTP/2 and HTTP/3, the ":authority" header, from the incoming request. You may specify up to 10 hosts.
- Exact domain names:
- path
Matcher String The name of the pathMatcher associated with this hostRule.
- description String
A human-readable description of the hostRule.
EdgeCacheServiceRoutingPathMatcher, EdgeCacheServiceRoutingPathMatcherArgs
- Name string
The name to which this PathMatcher is referred by the HostRule.
- Route
Rules List<EdgeCache Service Routing Path Matcher Route Rule> The routeRules to match against. routeRules support advanced routing behaviour, and can match on paths, headers and query parameters, as well as status codes and HTTP methods. Structure is documented below.
- Description string
A human-readable description of the resource.
- Name string
The name to which this PathMatcher is referred by the HostRule.
- Route
Rules []EdgeCache Service Routing Path Matcher Route Rule The routeRules to match against. routeRules support advanced routing behaviour, and can match on paths, headers and query parameters, as well as status codes and HTTP methods. Structure is documented below.
- Description string
A human-readable description of the resource.
- name String
The name to which this PathMatcher is referred by the HostRule.
- route
Rules List<EdgeCache Service Routing Path Matcher Route Rule> The routeRules to match against. routeRules support advanced routing behaviour, and can match on paths, headers and query parameters, as well as status codes and HTTP methods. Structure is documented below.
- description String
A human-readable description of the resource.
- name string
The name to which this PathMatcher is referred by the HostRule.
- route
Rules EdgeCache Service Routing Path Matcher Route Rule[] The routeRules to match against. routeRules support advanced routing behaviour, and can match on paths, headers and query parameters, as well as status codes and HTTP methods. Structure is documented below.
- description string
A human-readable description of the resource.
- name str
The name to which this PathMatcher is referred by the HostRule.
- route_
rules Sequence[EdgeCache Service Routing Path Matcher Route Rule] The routeRules to match against. routeRules support advanced routing behaviour, and can match on paths, headers and query parameters, as well as status codes and HTTP methods. Structure is documented below.
- description str
A human-readable description of the resource.
- name String
The name to which this PathMatcher is referred by the HostRule.
- route
Rules List<Property Map> The routeRules to match against. routeRules support advanced routing behaviour, and can match on paths, headers and query parameters, as well as status codes and HTTP methods. Structure is documented below.
- description String
A human-readable description of the resource.
EdgeCacheServiceRoutingPathMatcherRouteRule, EdgeCacheServiceRoutingPathMatcherRouteRuleArgs
- Match
Rules List<EdgeCache Service Routing Path Matcher Route Rule Match Rule> The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule. Structure is documented below.
- Priority string
The priority of this route rule, where 1 is the highest priority. You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 1 and 999 inclusive. Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.
- Description string
A human-readable description of the routeRule.
- Header
Action EdgeCache Service Routing Path Matcher Route Rule Header Action The header actions, including adding & removing headers, for requests that match this route. Structure is documented below.
- Origin string
The Origin resource that requests to this route should fetch from when a matching response is not in cache. Origins can be defined as short names ("my-origin") or fully-qualified resource URLs - e.g. "networkservices.googleapis.com/projects/my-project/global/edgecacheorigins/my-origin" Only one of origin or urlRedirect can be set.
- Route
Action EdgeCache Service Routing Path Matcher Route Rule Route Action In response to a matching path, the routeAction performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected origin. Structure is documented below.
- Url
Redirect EdgeCache Service Routing Path Matcher Route Rule Url Redirect The URL redirect configuration for requests that match this route. Structure is documented below.
- Match
Rules []EdgeCache Service Routing Path Matcher Route Rule Match Rule The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule. Structure is documented below.
- Priority string
The priority of this route rule, where 1 is the highest priority. You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 1 and 999 inclusive. Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.
- Description string
A human-readable description of the routeRule.
- Header
Action EdgeCache Service Routing Path Matcher Route Rule Header Action The header actions, including adding & removing headers, for requests that match this route. Structure is documented below.
- Origin string
The Origin resource that requests to this route should fetch from when a matching response is not in cache. Origins can be defined as short names ("my-origin") or fully-qualified resource URLs - e.g. "networkservices.googleapis.com/projects/my-project/global/edgecacheorigins/my-origin" Only one of origin or urlRedirect can be set.
- Route
Action EdgeCache Service Routing Path Matcher Route Rule Route Action In response to a matching path, the routeAction performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected origin. Structure is documented below.
- Url
Redirect EdgeCache Service Routing Path Matcher Route Rule Url Redirect The URL redirect configuration for requests that match this route. Structure is documented below.
- match
Rules List<EdgeCache Service Routing Path Matcher Route Rule Match Rule> The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule. Structure is documented below.
- priority String
The priority of this route rule, where 1 is the highest priority. You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 1 and 999 inclusive. Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.
- description String
A human-readable description of the routeRule.
- header
Action EdgeCache Service Routing Path Matcher Route Rule Header Action The header actions, including adding & removing headers, for requests that match this route. Structure is documented below.
- origin String
The Origin resource that requests to this route should fetch from when a matching response is not in cache. Origins can be defined as short names ("my-origin") or fully-qualified resource URLs - e.g. "networkservices.googleapis.com/projects/my-project/global/edgecacheorigins/my-origin" Only one of origin or urlRedirect can be set.
- route
Action EdgeCache Service Routing Path Matcher Route Rule Route Action In response to a matching path, the routeAction performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected origin. Structure is documented below.
- url
Redirect EdgeCache Service Routing Path Matcher Route Rule Url Redirect The URL redirect configuration for requests that match this route. Structure is documented below.
- match
Rules EdgeCache Service Routing Path Matcher Route Rule Match Rule[] The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule. Structure is documented below.
- priority string
The priority of this route rule, where 1 is the highest priority. You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 1 and 999 inclusive. Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.
- description string
A human-readable description of the routeRule.
- header
Action EdgeCache Service Routing Path Matcher Route Rule Header Action The header actions, including adding & removing headers, for requests that match this route. Structure is documented below.
- origin string
The Origin resource that requests to this route should fetch from when a matching response is not in cache. Origins can be defined as short names ("my-origin") or fully-qualified resource URLs - e.g. "networkservices.googleapis.com/projects/my-project/global/edgecacheorigins/my-origin" Only one of origin or urlRedirect can be set.
- route
Action EdgeCache Service Routing Path Matcher Route Rule Route Action In response to a matching path, the routeAction performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected origin. Structure is documented below.
- url
Redirect EdgeCache Service Routing Path Matcher Route Rule Url Redirect The URL redirect configuration for requests that match this route. Structure is documented below.
- match_
rules Sequence[EdgeCache Service Routing Path Matcher Route Rule Match Rule] The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule. Structure is documented below.
- priority str
The priority of this route rule, where 1 is the highest priority. You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 1 and 999 inclusive. Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.
- description str
A human-readable description of the routeRule.
- header_
action EdgeCache Service Routing Path Matcher Route Rule Header Action The header actions, including adding & removing headers, for requests that match this route. Structure is documented below.
- origin str
The Origin resource that requests to this route should fetch from when a matching response is not in cache. Origins can be defined as short names ("my-origin") or fully-qualified resource URLs - e.g. "networkservices.googleapis.com/projects/my-project/global/edgecacheorigins/my-origin" Only one of origin or urlRedirect can be set.
- route_
action EdgeCache Service Routing Path Matcher Route Rule Route Action In response to a matching path, the routeAction performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected origin. Structure is documented below.
- url_
redirect EdgeCache Service Routing Path Matcher Route Rule Url Redirect The URL redirect configuration for requests that match this route. Structure is documented below.
- match
Rules List<Property Map> The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule. Structure is documented below.
- priority String
The priority of this route rule, where 1 is the highest priority. You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 1 and 999 inclusive. Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.
- description String
A human-readable description of the routeRule.
- header
Action Property Map The header actions, including adding & removing headers, for requests that match this route. Structure is documented below.
- origin String
The Origin resource that requests to this route should fetch from when a matching response is not in cache. Origins can be defined as short names ("my-origin") or fully-qualified resource URLs - e.g. "networkservices.googleapis.com/projects/my-project/global/edgecacheorigins/my-origin" Only one of origin or urlRedirect can be set.
- route
Action Property Map In response to a matching path, the routeAction performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected origin. Structure is documented below.
- url
Redirect Property Map The URL redirect configuration for requests that match this route. Structure is documented below.
EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderAction, EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionArgs
- Request
Header List<EdgeTo Adds Cache Service Routing Path Matcher Route Rule Header Action Request Header To Add> Describes a header to add. Structure is documented below.
- Request
Header List<EdgeTo Removes Cache Service Routing Path Matcher Route Rule Header Action Request Header To Remove> A list of header names for headers that need to be removed from the request prior to forwarding the request to the origin. Structure is documented below.
- Response
Header List<EdgeTo Adds Cache Service Routing Path Matcher Route Rule Header Action Response Header To Add> Headers to add to the response prior to sending it back to the client. Response headers are only sent to the client, and do not have an effect on the cache serving the response. Structure is documented below.
- Response
Header List<EdgeTo Removes Cache Service Routing Path Matcher Route Rule Header Action Response Header To Remove> A list of header names for headers that need to be removed from the request prior to forwarding the request to the origin. Structure is documented below.
- Request
Header []EdgeTo Adds Cache Service Routing Path Matcher Route Rule Header Action Request Header To Add Describes a header to add. Structure is documented below.
- Request
Header []EdgeTo Removes Cache Service Routing Path Matcher Route Rule Header Action Request Header To Remove A list of header names for headers that need to be removed from the request prior to forwarding the request to the origin. Structure is documented below.
- Response
Header []EdgeTo Adds Cache Service Routing Path Matcher Route Rule Header Action Response Header To Add Headers to add to the response prior to sending it back to the client. Response headers are only sent to the client, and do not have an effect on the cache serving the response. Structure is documented below.
- Response
Header []EdgeTo Removes Cache Service Routing Path Matcher Route Rule Header Action Response Header To Remove A list of header names for headers that need to be removed from the request prior to forwarding the request to the origin. Structure is documented below.
- request
Header List<EdgeTo Adds Cache Service Routing Path Matcher Route Rule Header Action Request Header To Add> Describes a header to add. Structure is documented below.
- request
Header List<EdgeTo Removes Cache Service Routing Path Matcher Route Rule Header Action Request Header To Remove> A list of header names for headers that need to be removed from the request prior to forwarding the request to the origin. Structure is documented below.
- response
Header List<EdgeTo Adds Cache Service Routing Path Matcher Route Rule Header Action Response Header To Add> Headers to add to the response prior to sending it back to the client. Response headers are only sent to the client, and do not have an effect on the cache serving the response. Structure is documented below.
- response
Header List<EdgeTo Removes Cache Service Routing Path Matcher Route Rule Header Action Response Header To Remove> A list of header names for headers that need to be removed from the request prior to forwarding the request to the origin. Structure is documented below.
- request
Header EdgeTo Adds Cache Service Routing Path Matcher Route Rule Header Action Request Header To Add[] Describes a header to add. Structure is documented below.
- request
Header EdgeTo Removes Cache Service Routing Path Matcher Route Rule Header Action Request Header To Remove[] A list of header names for headers that need to be removed from the request prior to forwarding the request to the origin. Structure is documented below.
- response
Header EdgeTo Adds Cache Service Routing Path Matcher Route Rule Header Action Response Header To Add[] Headers to add to the response prior to sending it back to the client. Response headers are only sent to the client, and do not have an effect on the cache serving the response. Structure is documented below.
- response
Header EdgeTo Removes Cache Service Routing Path Matcher Route Rule Header Action Response Header To Remove[] A list of header names for headers that need to be removed from the request prior to forwarding the request to the origin. Structure is documented below.
- request_
header_ Sequence[Edgeto_ adds Cache Service Routing Path Matcher Route Rule Header Action Request Header To Add] Describes a header to add. Structure is documented below.
- request_
header_ Sequence[Edgeto_ removes Cache Service Routing Path Matcher Route Rule Header Action Request Header To Remove] A list of header names for headers that need to be removed from the request prior to forwarding the request to the origin. Structure is documented below.
- response_
header_ Sequence[Edgeto_ adds Cache Service Routing Path Matcher Route Rule Header Action Response Header To Add] Headers to add to the response prior to sending it back to the client. Response headers are only sent to the client, and do not have an effect on the cache serving the response. Structure is documented below.
- response_
header_ Sequence[Edgeto_ removes Cache Service Routing Path Matcher Route Rule Header Action Response Header To Remove] A list of header names for headers that need to be removed from the request prior to forwarding the request to the origin. Structure is documented below.
- request
Header List<Property Map>To Adds Describes a header to add. Structure is documented below.
- request
Header List<Property Map>To Removes A list of header names for headers that need to be removed from the request prior to forwarding the request to the origin. Structure is documented below.
- response
Header List<Property Map>To Adds Headers to add to the response prior to sending it back to the client. Response headers are only sent to the client, and do not have an effect on the cache serving the response. Structure is documented below.
- response
Header List<Property Map>To Removes A list of header names for headers that need to be removed from the request prior to forwarding the request to the origin. Structure is documented below.
EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionRequestHeaderToAdd, EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionRequestHeaderToAddArgs
- Header
Name string The name of the header to add.
- Header
Value string The value of the header to add.
- Replace bool
Whether to replace all existing headers with the same name.
- Header
Name string The name of the header to add.
- Header
Value string The value of the header to add.
- Replace bool
Whether to replace all existing headers with the same name.
- header
Name String The name of the header to add.
- header
Value String The value of the header to add.
- replace Boolean
Whether to replace all existing headers with the same name.
- header
Name string The name of the header to add.
- header
Value string The value of the header to add.
- replace boolean
Whether to replace all existing headers with the same name.
- header_
name str The name of the header to add.
- header_
value str The value of the header to add.
- replace bool
Whether to replace all existing headers with the same name.
- header
Name String The name of the header to add.
- header
Value String The value of the header to add.
- replace Boolean
Whether to replace all existing headers with the same name.
EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionRequestHeaderToRemove, EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionRequestHeaderToRemoveArgs
- Header
Name string The name of the header to remove.
- Header
Name string The name of the header to remove.
- header
Name String The name of the header to remove.
- header
Name string The name of the header to remove.
- header_
name str The name of the header to remove.
- header
Name String The name of the header to remove.
EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionResponseHeaderToAdd, EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionResponseHeaderToAddArgs
- Header
Name string The name of the header to add.
- Header
Value string The value of the header to add.
- Replace bool
Whether to replace all existing headers with the same name.
- Header
Name string The name of the header to add.
- Header
Value string The value of the header to add.
- Replace bool
Whether to replace all existing headers with the same name.
- header
Name String The name of the header to add.
- header
Value String The value of the header to add.
- replace Boolean
Whether to replace all existing headers with the same name.
- header
Name string The name of the header to add.
- header
Value string The value of the header to add.
- replace boolean
Whether to replace all existing headers with the same name.
- header_
name str The name of the header to add.
- header_
value str The value of the header to add.
- replace bool
Whether to replace all existing headers with the same name.
- header
Name String The name of the header to add.
- header
Value String The value of the header to add.
- replace Boolean
Whether to replace all existing headers with the same name.
EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionResponseHeaderToRemove, EdgeCacheServiceRoutingPathMatcherRouteRuleHeaderActionResponseHeaderToRemoveArgs
- Header
Name string Headers to remove from the response prior to sending it back to the client. Response headers are only sent to the client, and do not have an effect on the cache serving the response.
- Header
Name string Headers to remove from the response prior to sending it back to the client. Response headers are only sent to the client, and do not have an effect on the cache serving the response.
- header
Name String Headers to remove from the response prior to sending it back to the client. Response headers are only sent to the client, and do not have an effect on the cache serving the response.
- header
Name string Headers to remove from the response prior to sending it back to the client. Response headers are only sent to the client, and do not have an effect on the cache serving the response.
- header_
name str Headers to remove from the response prior to sending it back to the client. Response headers are only sent to the client, and do not have an effect on the cache serving the response.
- header
Name String Headers to remove from the response prior to sending it back to the client. Response headers are only sent to the client, and do not have an effect on the cache serving the response.
EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRule, EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleArgs
- Full
Path stringMatch For satisfying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL.
- Header
Matches List<EdgeCache Service Routing Path Matcher Route Rule Match Rule Header Match> Specifies a list of header match criteria, all of which must match corresponding headers in the request. Structure is documented below.
- Ignore
Case bool Specifies that prefixMatch and fullPathMatch matches are case sensitive.
- Path
Template stringMatch For satisfying the matchRule condition, the path of the request must match the wildcard pattern specified in pathTemplateMatch after removing any query parameters and anchor that may be part of the original URL. pathTemplateMatch must be between 1 and 255 characters (inclusive). The pattern specified by pathTemplateMatch may have at most 5 wildcard operators and at most 5 variable captures in total.
- Prefix
Match string For satisfying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /.
- Query
Parameter List<EdgeMatches Cache Service Routing Path Matcher Route Rule Match Rule Query Parameter Match> Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request. Structure is documented below.
- Full
Path stringMatch For satisfying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL.
- Header
Matches []EdgeCache Service Routing Path Matcher Route Rule Match Rule Header Match Specifies a list of header match criteria, all of which must match corresponding headers in the request. Structure is documented below.
- Ignore
Case bool Specifies that prefixMatch and fullPathMatch matches are case sensitive.
- Path
Template stringMatch For satisfying the matchRule condition, the path of the request must match the wildcard pattern specified in pathTemplateMatch after removing any query parameters and anchor that may be part of the original URL. pathTemplateMatch must be between 1 and 255 characters (inclusive). The pattern specified by pathTemplateMatch may have at most 5 wildcard operators and at most 5 variable captures in total.
- Prefix
Match string For satisfying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /.
- Query
Parameter []EdgeMatches Cache Service Routing Path Matcher Route Rule Match Rule Query Parameter Match Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request. Structure is documented below.
- full
Path StringMatch For satisfying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL.
- header
Matches List<EdgeCache Service Routing Path Matcher Route Rule Match Rule Header Match> Specifies a list of header match criteria, all of which must match corresponding headers in the request. Structure is documented below.
- ignore
Case Boolean Specifies that prefixMatch and fullPathMatch matches are case sensitive.
- path
Template StringMatch For satisfying the matchRule condition, the path of the request must match the wildcard pattern specified in pathTemplateMatch after removing any query parameters and anchor that may be part of the original URL. pathTemplateMatch must be between 1 and 255 characters (inclusive). The pattern specified by pathTemplateMatch may have at most 5 wildcard operators and at most 5 variable captures in total.
- prefix
Match String For satisfying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /.
- query
Parameter List<EdgeMatches Cache Service Routing Path Matcher Route Rule Match Rule Query Parameter Match> Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request. Structure is documented below.
- full
Path stringMatch For satisfying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL.
- header
Matches EdgeCache Service Routing Path Matcher Route Rule Match Rule Header Match[] Specifies a list of header match criteria, all of which must match corresponding headers in the request. Structure is documented below.
- ignore
Case boolean Specifies that prefixMatch and fullPathMatch matches are case sensitive.
- path
Template stringMatch For satisfying the matchRule condition, the path of the request must match the wildcard pattern specified in pathTemplateMatch after removing any query parameters and anchor that may be part of the original URL. pathTemplateMatch must be between 1 and 255 characters (inclusive). The pattern specified by pathTemplateMatch may have at most 5 wildcard operators and at most 5 variable captures in total.
- prefix
Match string For satisfying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /.
- query
Parameter EdgeMatches Cache Service Routing Path Matcher Route Rule Match Rule Query Parameter Match[] Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request. Structure is documented below.
- full_
path_ strmatch For satisfying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL.
- header_
matches Sequence[EdgeCache Service Routing Path Matcher Route Rule Match Rule Header Match] Specifies a list of header match criteria, all of which must match corresponding headers in the request. Structure is documented below.
- ignore_
case bool Specifies that prefixMatch and fullPathMatch matches are case sensitive.
- path_
template_ strmatch For satisfying the matchRule condition, the path of the request must match the wildcard pattern specified in pathTemplateMatch after removing any query parameters and anchor that may be part of the original URL. pathTemplateMatch must be between 1 and 255 characters (inclusive). The pattern specified by pathTemplateMatch may have at most 5 wildcard operators and at most 5 variable captures in total.
- prefix_
match str For satisfying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /.
- query_
parameter_ Sequence[Edgematches Cache Service Routing Path Matcher Route Rule Match Rule Query Parameter Match] Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request. Structure is documented below.
- full
Path StringMatch For satisfying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL.
- header
Matches List<Property Map> Specifies a list of header match criteria, all of which must match corresponding headers in the request. Structure is documented below.
- ignore
Case Boolean Specifies that prefixMatch and fullPathMatch matches are case sensitive.
- path
Template StringMatch For satisfying the matchRule condition, the path of the request must match the wildcard pattern specified in pathTemplateMatch after removing any query parameters and anchor that may be part of the original URL. pathTemplateMatch must be between 1 and 255 characters (inclusive). The pattern specified by pathTemplateMatch may have at most 5 wildcard operators and at most 5 variable captures in total.
- prefix
Match String For satisfying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /.
- query
Parameter List<Property Map>Matches Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request. Structure is documented below.
EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleHeaderMatch, EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleHeaderMatchArgs
- Header
Name string The header name to match on.
- Exact
Match string The value of the header should exactly match contents of exactMatch.
- Invert
Match bool If set to false (default), the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met.
- Prefix
Match string The value of the header must start with the contents of prefixMatch.
- Present
Match bool A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value.
- Suffix
Match string The value of the header must end with the contents of suffixMatch.
- Header
Name string The header name to match on.
- Exact
Match string The value of the header should exactly match contents of exactMatch.
- Invert
Match bool If set to false (default), the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met.
- Prefix
Match string The value of the header must start with the contents of prefixMatch.
- Present
Match bool A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value.
- Suffix
Match string The value of the header must end with the contents of suffixMatch.
- header
Name String The header name to match on.
- exact
Match String The value of the header should exactly match contents of exactMatch.
- invert
Match Boolean If set to false (default), the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met.
- prefix
Match String The value of the header must start with the contents of prefixMatch.
- present
Match Boolean A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value.
- suffix
Match String The value of the header must end with the contents of suffixMatch.
- header
Name string The header name to match on.
- exact
Match string The value of the header should exactly match contents of exactMatch.
- invert
Match boolean If set to false (default), the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met.
- prefix
Match string The value of the header must start with the contents of prefixMatch.
- present
Match boolean A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value.
- suffix
Match string The value of the header must end with the contents of suffixMatch.
- header_
name str The header name to match on.
- exact_
match str The value of the header should exactly match contents of exactMatch.
- invert_
match bool If set to false (default), the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met.
- prefix_
match str The value of the header must start with the contents of prefixMatch.
- present_
match bool A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value.
- suffix_
match str The value of the header must end with the contents of suffixMatch.
- header
Name String The header name to match on.
- exact
Match String The value of the header should exactly match contents of exactMatch.
- invert
Match Boolean If set to false (default), the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met.
- prefix
Match String The value of the header must start with the contents of prefixMatch.
- present
Match Boolean A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value.
- suffix
Match String The value of the header must end with the contents of suffixMatch.
EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleQueryParameterMatch, EdgeCacheServiceRoutingPathMatcherRouteRuleMatchRuleQueryParameterMatchArgs
- Name string
The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.
- Exact
Match string The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
- Present
Match bool Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not.
- Name string
The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.
- Exact
Match string The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
- Present
Match bool Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not.
- name String
The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.
- exact
Match String The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
- present
Match Boolean Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not.
- name string
The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.
- exact
Match string The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
- present
Match boolean Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not.
- name str
The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.
- exact_
match str The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
- present_
match bool Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not.
- name String
The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.
- exact
Match String The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
- present
Match Boolean Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not.
EdgeCacheServiceRoutingPathMatcherRouteRuleRouteAction, EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionArgs
- Cdn
Policy EdgeCache Service Routing Path Matcher Route Rule Route Action Cdn Policy The policy to use for defining caching and signed request behaviour for requests that match this route. Structure is documented below.
- Cors
Policy EdgeCache Service Routing Path Matcher Route Rule Route Action Cors Policy CORSPolicy defines Cross-Origin-Resource-Sharing configuration, including which CORS response headers will be set. Structure is documented below.
- Url
Rewrite EdgeCache Service Routing Path Matcher Route Rule Route Action Url Rewrite The URL rewrite configuration for requests that match this route. Structure is documented below.
- Cdn
Policy EdgeCache Service Routing Path Matcher Route Rule Route Action Cdn Policy The policy to use for defining caching and signed request behaviour for requests that match this route. Structure is documented below.
- Cors
Policy EdgeCache Service Routing Path Matcher Route Rule Route Action Cors Policy CORSPolicy defines Cross-Origin-Resource-Sharing configuration, including which CORS response headers will be set. Structure is documented below.
- Url
Rewrite EdgeCache Service Routing Path Matcher Route Rule Route Action Url Rewrite The URL rewrite configuration for requests that match this route. Structure is documented below.
- cdn
Policy EdgeCache Service Routing Path Matcher Route Rule Route Action Cdn Policy The policy to use for defining caching and signed request behaviour for requests that match this route. Structure is documented below.
- cors
Policy EdgeCache Service Routing Path Matcher Route Rule Route Action Cors Policy CORSPolicy defines Cross-Origin-Resource-Sharing configuration, including which CORS response headers will be set. Structure is documented below.
- url
Rewrite EdgeCache Service Routing Path Matcher Route Rule Route Action Url Rewrite The URL rewrite configuration for requests that match this route. Structure is documented below.
- cdn
Policy EdgeCache Service Routing Path Matcher Route Rule Route Action Cdn Policy The policy to use for defining caching and signed request behaviour for requests that match this route. Structure is documented below.
- cors
Policy EdgeCache Service Routing Path Matcher Route Rule Route Action Cors Policy CORSPolicy defines Cross-Origin-Resource-Sharing configuration, including which CORS response headers will be set. Structure is documented below.
- url
Rewrite EdgeCache Service Routing Path Matcher Route Rule Route Action Url Rewrite The URL rewrite configuration for requests that match this route. Structure is documented below.
- cdn_
policy EdgeCache Service Routing Path Matcher Route Rule Route Action Cdn Policy The policy to use for defining caching and signed request behaviour for requests that match this route. Structure is documented below.
- cors_
policy EdgeCache Service Routing Path Matcher Route Rule Route Action Cors Policy CORSPolicy defines Cross-Origin-Resource-Sharing configuration, including which CORS response headers will be set. Structure is documented below.
- url_
rewrite EdgeCache Service Routing Path Matcher Route Rule Route Action Url Rewrite The URL rewrite configuration for requests that match this route. Structure is documented below.
- cdn
Policy Property Map The policy to use for defining caching and signed request behaviour for requests that match this route. Structure is documented below.
- cors
Policy Property Map CORSPolicy defines Cross-Origin-Resource-Sharing configuration, including which CORS response headers will be set. Structure is documented below.
- url
Rewrite Property Map The URL rewrite configuration for requests that match this route. Structure is documented below.
EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicy, EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyArgs
- Add
Signatures EdgeCache Service Routing Path Matcher Route Rule Route Action Cdn Policy Add Signatures Enable signature generation or propagation on this route. This field may only be specified when signedRequestMode is set to REQUIRE_TOKENS. Structure is documented below.
- Cache
Key EdgePolicy Cache Service Routing Path Matcher Route Rule Route Action Cdn Policy Cache Key Policy Defines the request parameters that contribute to the cache key. Structure is documented below.
- Cache
Mode string Cache modes allow users to control the behaviour of the cache, what content it should cache automatically, whether to respect origin headers, or whether to unconditionally cache all responses. For all cache modes, Cache-Control headers will be passed to the client. Use clientTtl to override what is sent to the client. Possible values are:
CACHE_ALL_STATIC
,USE_ORIGIN_HEADERS
,FORCE_CACHE_ALL
,BYPASS_CACHE
.- Client
Ttl string Specifies a separate client (e.g. browser client) TTL, separate from the TTL used by the edge caches. Leaving this empty will use the same cache TTL for both the CDN and the client-facing response.
- The TTL must be > 0 and <= 86400s (1 day)
- The clientTtl cannot be larger than the defaultTtl (if set)
- Fractions of a second are not allowed. Omit this field to use the defaultTtl, or the max-age set by the origin, as the client-facing TTL. When the cache mode is set to "USE_ORIGIN_HEADERS" or "BYPASS_CACHE", you must omit this field. A duration in seconds terminated by 's'. Example: "3s".
- Default
Ttl string Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age). Defaults to 3600s (1 hour).
- The TTL must be >= 0 and <= 31,536,000 seconds (1 year)
- Setting a TTL of "0" means "always revalidate" (equivalent to must-revalidate)
- The value of defaultTTL cannot be set to a value greater than that of maxTTL.
- Fractions of a second are not allowed.
- When the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL will overwrite the TTL set in all responses. Note that infrequently accessed objects may be evicted from the cache before the defined TTL. Objects that expire will be revalidated with the origin. When the cache mode is set to "USE_ORIGIN_HEADERS" or "BYPASS_CACHE", you must omit this field. A duration in seconds terminated by 's'. Example: "3s".
- Max
Ttl string Specifies the maximum allowed TTL for cached content served by this origin. Defaults to 86400s (1 day). Cache directives that attempt to set a max-age or s-maxage higher than this, or an Expires header more than maxTtl seconds in the future will be capped at the value of maxTTL, as if it were the value of an s-maxage Cache-Control directive.
- The TTL must be >= 0 and <= 31,536,000 seconds (1 year)
- Setting a TTL of "0" means "always revalidate"
- The value of maxTtl must be equal to or greater than defaultTtl.
- Fractions of a second are not allowed. When the cache mode is set to "USE_ORIGIN_HEADERS", "FORCE_CACHE_ALL", or "BYPASS_CACHE", you must omit this field. A duration in seconds terminated by 's'. Example: "3s".
- Negative
Caching bool Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. This can reduce the load on your origin and improve end-user experience by reducing response latency. By default, the CDNPolicy will apply the following default TTLs to these status codes:
- HTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m
- HTTP 404 (Not Found), 410 (Gone), 451 (Unavailable For Legal Reasons): 120s
- HTTP 405 (Method Not Found), 414 (URI Too Long), 501 (Not Implemented): 60s These defaults can be overridden in negativeCachingPolicy
- Negative
Caching Dictionary<string, string>Policy Sets a cache TTL for the specified HTTP status code. negativeCaching must be enabled to configure negativeCachingPolicy.
- Omitting the policy and leaving negativeCaching enabled will use the default TTLs for each status code, defined in negativeCaching.
- TTLs must be >= 0 (where 0 is "always revalidate") and <= 86400s (1 day) Note that when specifying an explicit negativeCachingPolicy, you should take care to specify a cache TTL for all response codes that you wish to cache. The CDNPolicy will not apply any default negative caching when a policy exists.
- Signed
Request stringKeyset The EdgeCacheKeyset containing the set of public keys used to validate signed requests at the edge.
- Signed
Request stringMaximum Expiration Ttl Limit how far into the future the expiration time of a signed request may be. When set, a signed request is rejected if its expiration time is later than now + signedRequestMaximumExpirationTtl, where now is the time at which the signed request is first handled by the CDN.
- The TTL must be > 0.
- Fractions of a second are not allowed. By default, signedRequestMaximumExpirationTtl is not set and the expiration time of a signed request may be arbitrarily far into future.
- Signed
Request stringMode Whether to enforce signed requests. The default value is DISABLED, which means all content is public, and does not authorize access. You must also set a signedRequestKeyset to enable signed requests. When set to REQUIRE_SIGNATURES, all matching requests will have their signature validated. Requests that were not signed with the corresponding private key, or that are otherwise invalid (expired, do not match the signature, IP address, or header) will be rejected with a HTTP 403 and (if enabled) logged. Possible values are:
DISABLED
,REQUIRE_SIGNATURES
,REQUIRE_TOKENS
.- Signed
Token EdgeOptions Cache Service Routing Path Matcher Route Rule Route Action Cdn Policy Signed Token Options Additional options for signed tokens. signedTokenOptions may only be specified when signedRequestMode is REQUIRE_TOKENS. Structure is documented below.
- Add
Signatures EdgeCache Service Routing Path Matcher Route Rule Route Action Cdn Policy Add Signatures Enable signature generation or propagation on this route. This field may only be specified when signedRequestMode is set to REQUIRE_TOKENS. Structure is documented below.
- Cache
Key EdgePolicy Cache Service Routing Path Matcher Route Rule Route Action Cdn Policy Cache Key Policy Defines the request parameters that contribute to the cache key. Structure is documented below.
- Cache
Mode string Cache modes allow users to control the behaviour of the cache, what content it should cache automatically, whether to respect origin headers, or whether to unconditionally cache all responses. For all cache modes, Cache-Control headers will be passed to the client. Use clientTtl to override what is sent to the client. Possible values are:
CACHE_ALL_STATIC
,USE_ORIGIN_HEADERS
,FORCE_CACHE_ALL
,BYPASS_CACHE
.- Client
Ttl string Specifies a separate client (e.g. browser client) TTL, separate from the TTL used by the edge caches. Leaving this empty will use the same cache TTL for both the CDN and the client-facing response.
- The TTL must be > 0 and <= 86400s (1 day)
- The clientTtl cannot be larger than the defaultTtl (if set)
- Fractions of a second are not allowed. Omit this field to use the defaultTtl, or the max-age set by the origin, as the client-facing TTL. When the cache mode is set to "USE_ORIGIN_HEADERS" or "BYPASS_CACHE", you must omit this field. A duration in seconds terminated by 's'. Example: "3s".
- Default
Ttl string Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age). Defaults to 3600s (1 hour).
- The TTL must be >= 0 and <= 31,536,000 seconds (1 year)
- Setting a TTL of "0" means "always revalidate" (equivalent to must-revalidate)
- The value of defaultTTL cannot be set to a value greater than that of maxTTL.
- Fractions of a second are not allowed.
- When the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL will overwrite the TTL set in all responses. Note that infrequently accessed objects may be evicted from the cache before the defined TTL. Objects that expire will be revalidated with the origin. When the cache mode is set to "USE_ORIGIN_HEADERS" or "BYPASS_CACHE", you must omit this field. A duration in seconds terminated by 's'. Example: "3s".
- Max
Ttl string Specifies the maximum allowed TTL for cached content served by this origin. Defaults to 86400s (1 day). Cache directives that attempt to set a max-age or s-maxage higher than this, or an Expires header more than maxTtl seconds in the future will be capped at the value of maxTTL, as if it were the value of an s-maxage Cache-Control directive.
- The TTL must be >= 0 and <= 31,536,000 seconds (1 year)
- Setting a TTL of "0" means "always revalidate"
- The value of maxTtl must be equal to or greater than defaultTtl.
- Fractions of a second are not allowed. When the cache mode is set to "USE_ORIGIN_HEADERS", "FORCE_CACHE_ALL", or "BYPASS_CACHE", you must omit this field. A duration in seconds terminated by 's'. Example: "3s".
- Negative
Caching bool Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. This can reduce the load on your origin and improve end-user experience by reducing response latency. By default, the CDNPolicy will apply the following default TTLs to these status codes:
- HTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m
- HTTP 404 (Not Found), 410 (Gone), 451 (Unavailable For Legal Reasons): 120s
- HTTP 405 (Method Not Found), 414 (URI Too Long), 501 (Not Implemented): 60s These defaults can be overridden in negativeCachingPolicy
- Negative
Caching map[string]stringPolicy Sets a cache TTL for the specified HTTP status code. negativeCaching must be enabled to configure negativeCachingPolicy.
- Omitting the policy and leaving negativeCaching enabled will use the default TTLs for each status code, defined in negativeCaching.
- TTLs must be >= 0 (where 0 is "always revalidate") and <= 86400s (1 day) Note that when specifying an explicit negativeCachingPolicy, you should take care to specify a cache TTL for all response codes that you wish to cache. The CDNPolicy will not apply any default negative caching when a policy exists.
- Signed
Request stringKeyset The EdgeCacheKeyset containing the set of public keys used to validate signed requests at the edge.
- Signed
Request stringMaximum Expiration Ttl Limit how far into the future the expiration time of a signed request may be. When set, a signed request is rejected if its expiration time is later than now + signedRequestMaximumExpirationTtl, where now is the time at which the signed request is first handled by the CDN.
- The TTL must be > 0.
- Fractions of a second are not allowed. By default, signedRequestMaximumExpirationTtl is not set and the expiration time of a signed request may be arbitrarily far into future.
- Signed
Request stringMode Whether to enforce signed requests. The default value is DISABLED, which means all content is public, and does not authorize access. You must also set a signedRequestKeyset to enable signed requests. When set to REQUIRE_SIGNATURES, all matching requests will have their signature validated. Requests that were not signed with the corresponding private key, or that are otherwise invalid (expired, do not match the signature, IP address, or header) will be rejected with a HTTP 403 and (if enabled) logged. Possible values are:
DISABLED
,REQUIRE_SIGNATURES
,REQUIRE_TOKENS
.- Signed
Token EdgeOptions Cache Service Routing Path Matcher Route Rule Route Action Cdn Policy Signed Token Options Additional options for signed tokens. signedTokenOptions may only be specified when signedRequestMode is REQUIRE_TOKENS. Structure is documented below.
- add
Signatures EdgeCache Service Routing Path Matcher Route Rule Route Action Cdn Policy Add Signatures Enable signature generation or propagation on this route. This field may only be specified when signedRequestMode is set to REQUIRE_TOKENS. Structure is documented below.
- cache
Key EdgePolicy Cache Service Routing Path Matcher Route Rule Route Action Cdn Policy Cache Key Policy Defines the request parameters that contribute to the cache key. Structure is documented below.
- cache
Mode String Cache modes allow users to control the behaviour of the cache, what content it should cache automatically, whether to respect origin headers, or whether to unconditionally cache all responses. For all cache modes, Cache-Control headers will be passed to the client. Use clientTtl to override what is sent to the client. Possible values are:
CACHE_ALL_STATIC
,USE_ORIGIN_HEADERS
,FORCE_CACHE_ALL
,BYPASS_CACHE
.- client
Ttl String Specifies a separate client (e.g. browser client) TTL, separate from the TTL used by the edge caches. Leaving this empty will use the same cache TTL for both the CDN and the client-facing response.
- The TTL must be > 0 and <= 86400s (1 day)
- The clientTtl cannot be larger than the defaultTtl (if set)
- Fractions of a second are not allowed. Omit this field to use the defaultTtl, or the max-age set by the origin, as the client-facing TTL. When the cache mode is set to "USE_ORIGIN_HEADERS" or "BYPASS_CACHE", you must omit this field. A duration in seconds terminated by 's'. Example: "3s".
- default
Ttl String Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age). Defaults to 3600s (1 hour).
- The TTL must be >= 0 and <= 31,536,000 seconds (1 year)
- Setting a TTL of "0" means "always revalidate" (equivalent to must-revalidate)
- The value of defaultTTL cannot be set to a value greater than that of maxTTL.
- Fractions of a second are not allowed.
- When the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL will overwrite the TTL set in all responses. Note that infrequently accessed objects may be evicted from the cache before the defined TTL. Objects that expire will be revalidated with the origin. When the cache mode is set to "USE_ORIGIN_HEADERS" or "BYPASS_CACHE", you must omit this field. A duration in seconds terminated by 's'. Example: "3s".
- max
Ttl String Specifies the maximum allowed TTL for cached content served by this origin. Defaults to 86400s (1 day). Cache directives that attempt to set a max-age or s-maxage higher than this, or an Expires header more than maxTtl seconds in the future will be capped at the value of maxTTL, as if it were the value of an s-maxage Cache-Control directive.
- The TTL must be >= 0 and <= 31,536,000 seconds (1 year)
- Setting a TTL of "0" means "always revalidate"
- The value of maxTtl must be equal to or greater than defaultTtl.
- Fractions of a second are not allowed. When the cache mode is set to "USE_ORIGIN_HEADERS", "FORCE_CACHE_ALL", or "BYPASS_CACHE", you must omit this field. A duration in seconds terminated by 's'. Example: "3s".
- negative
Caching Boolean Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. This can reduce the load on your origin and improve end-user experience by reducing response latency. By default, the CDNPolicy will apply the following default TTLs to these status codes:
- HTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m
- HTTP 404 (Not Found), 410 (Gone), 451 (Unavailable For Legal Reasons): 120s
- HTTP 405 (Method Not Found), 414 (URI Too Long), 501 (Not Implemented): 60s These defaults can be overridden in negativeCachingPolicy
- negative
Caching Map<String,String>Policy Sets a cache TTL for the specified HTTP status code. negativeCaching must be enabled to configure negativeCachingPolicy.
- Omitting the policy and leaving negativeCaching enabled will use the default TTLs for each status code, defined in negativeCaching.
- TTLs must be >= 0 (where 0 is "always revalidate") and <= 86400s (1 day) Note that when specifying an explicit negativeCachingPolicy, you should take care to specify a cache TTL for all response codes that you wish to cache. The CDNPolicy will not apply any default negative caching when a policy exists.
- signed
Request StringKeyset The EdgeCacheKeyset containing the set of public keys used to validate signed requests at the edge.
- signed
Request StringMaximum Expiration Ttl Limit how far into the future the expiration time of a signed request may be. When set, a signed request is rejected if its expiration time is later than now + signedRequestMaximumExpirationTtl, where now is the time at which the signed request is first handled by the CDN.
- The TTL must be > 0.
- Fractions of a second are not allowed. By default, signedRequestMaximumExpirationTtl is not set and the expiration time of a signed request may be arbitrarily far into future.
- signed
Request StringMode Whether to enforce signed requests. The default value is DISABLED, which means all content is public, and does not authorize access. You must also set a signedRequestKeyset to enable signed requests. When set to REQUIRE_SIGNATURES, all matching requests will have their signature validated. Requests that were not signed with the corresponding private key, or that are otherwise invalid (expired, do not match the signature, IP address, or header) will be rejected with a HTTP 403 and (if enabled) logged. Possible values are:
DISABLED
,REQUIRE_SIGNATURES
,REQUIRE_TOKENS
.- signed
Token EdgeOptions Cache Service Routing Path Matcher Route Rule Route Action Cdn Policy Signed Token Options Additional options for signed tokens. signedTokenOptions may only be specified when signedRequestMode is REQUIRE_TOKENS. Structure is documented below.
- add
Signatures EdgeCache Service Routing Path Matcher Route Rule Route Action Cdn Policy Add Signatures Enable signature generation or propagation on this route. This field may only be specified when signedRequestMode is set to REQUIRE_TOKENS. Structure is documented below.
- cache
Key EdgePolicy Cache Service Routing Path Matcher Route Rule Route Action Cdn Policy Cache Key Policy Defines the request parameters that contribute to the cache key. Structure is documented below.
- cache
Mode string Cache modes allow users to control the behaviour of the cache, what content it should cache automatically, whether to respect origin headers, or whether to unconditionally cache all responses. For all cache modes, Cache-Control headers will be passed to the client. Use clientTtl to override what is sent to the client. Possible values are:
CACHE_ALL_STATIC
,USE_ORIGIN_HEADERS
,FORCE_CACHE_ALL
,BYPASS_CACHE
.- client
Ttl string Specifies a separate client (e.g. browser client) TTL, separate from the TTL used by the edge caches. Leaving this empty will use the same cache TTL for both the CDN and the client-facing response.
- The TTL must be > 0 and <= 86400s (1 day)
- The clientTtl cannot be larger than the defaultTtl (if set)
- Fractions of a second are not allowed. Omit this field to use the defaultTtl, or the max-age set by the origin, as the client-facing TTL. When the cache mode is set to "USE_ORIGIN_HEADERS" or "BYPASS_CACHE", you must omit this field. A duration in seconds terminated by 's'. Example: "3s".
- default
Ttl string Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age). Defaults to 3600s (1 hour).
- The TTL must be >= 0 and <= 31,536,000 seconds (1 year)
- Setting a TTL of "0" means "always revalidate" (equivalent to must-revalidate)
- The value of defaultTTL cannot be set to a value greater than that of maxTTL.
- Fractions of a second are not allowed.
- When the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL will overwrite the TTL set in all responses. Note that infrequently accessed objects may be evicted from the cache before the defined TTL. Objects that expire will be revalidated with the origin. When the cache mode is set to "USE_ORIGIN_HEADERS" or "BYPASS_CACHE", you must omit this field. A duration in seconds terminated by 's'. Example: "3s".
- max
Ttl string Specifies the maximum allowed TTL for cached content served by this origin. Defaults to 86400s (1 day). Cache directives that attempt to set a max-age or s-maxage higher than this, or an Expires header more than maxTtl seconds in the future will be capped at the value of maxTTL, as if it were the value of an s-maxage Cache-Control directive.
- The TTL must be >= 0 and <= 31,536,000 seconds (1 year)
- Setting a TTL of "0" means "always revalidate"
- The value of maxTtl must be equal to or greater than defaultTtl.
- Fractions of a second are not allowed. When the cache mode is set to "USE_ORIGIN_HEADERS", "FORCE_CACHE_ALL", or "BYPASS_CACHE", you must omit this field. A duration in seconds terminated by 's'. Example: "3s".
- negative
Caching boolean Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. This can reduce the load on your origin and improve end-user experience by reducing response latency. By default, the CDNPolicy will apply the following default TTLs to these status codes:
- HTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m
- HTTP 404 (Not Found), 410 (Gone), 451 (Unavailable For Legal Reasons): 120s
- HTTP 405 (Method Not Found), 414 (URI Too Long), 501 (Not Implemented): 60s These defaults can be overridden in negativeCachingPolicy
- negative
Caching {[key: string]: string}Policy Sets a cache TTL for the specified HTTP status code. negativeCaching must be enabled to configure negativeCachingPolicy.
- Omitting the policy and leaving negativeCaching enabled will use the default TTLs for each status code, defined in negativeCaching.
- TTLs must be >= 0 (where 0 is "always revalidate") and <= 86400s (1 day) Note that when specifying an explicit negativeCachingPolicy, you should take care to specify a cache TTL for all response codes that you wish to cache. The CDNPolicy will not apply any default negative caching when a policy exists.
- signed
Request stringKeyset The EdgeCacheKeyset containing the set of public keys used to validate signed requests at the edge.
- signed
Request stringMaximum Expiration Ttl Limit how far into the future the expiration time of a signed request may be. When set, a signed request is rejected if its expiration time is later than now + signedRequestMaximumExpirationTtl, where now is the time at which the signed request is first handled by the CDN.
- The TTL must be > 0.
- Fractions of a second are not allowed. By default, signedRequestMaximumExpirationTtl is not set and the expiration time of a signed request may be arbitrarily far into future.
- signed
Request stringMode Whether to enforce signed requests. The default value is DISABLED, which means all content is public, and does not authorize access. You must also set a signedRequestKeyset to enable signed requests. When set to REQUIRE_SIGNATURES, all matching requests will have their signature validated. Requests that were not signed with the corresponding private key, or that are otherwise invalid (expired, do not match the signature, IP address, or header) will be rejected with a HTTP 403 and (if enabled) logged. Possible values are:
DISABLED
,REQUIRE_SIGNATURES
,REQUIRE_TOKENS
.- signed
Token EdgeOptions Cache Service Routing Path Matcher Route Rule Route Action Cdn Policy Signed Token Options Additional options for signed tokens. signedTokenOptions may only be specified when signedRequestMode is REQUIRE_TOKENS. Structure is documented below.
- add_
signatures EdgeCache Service Routing Path Matcher Route Rule Route Action Cdn Policy Add Signatures Enable signature generation or propagation on this route. This field may only be specified when signedRequestMode is set to REQUIRE_TOKENS. Structure is documented below.
- cache_
key_ Edgepolicy Cache Service Routing Path Matcher Route Rule Route Action Cdn Policy Cache Key Policy Defines the request parameters that contribute to the cache key. Structure is documented below.
- cache_
mode str Cache modes allow users to control the behaviour of the cache, what content it should cache automatically, whether to respect origin headers, or whether to unconditionally cache all responses. For all cache modes, Cache-Control headers will be passed to the client. Use clientTtl to override what is sent to the client. Possible values are:
CACHE_ALL_STATIC
,USE_ORIGIN_HEADERS
,FORCE_CACHE_ALL
,BYPASS_CACHE
.- client_
ttl str Specifies a separate client (e.g. browser client) TTL, separate from the TTL used by the edge caches. Leaving this empty will use the same cache TTL for both the CDN and the client-facing response.
- The TTL must be > 0 and <= 86400s (1 day)
- The clientTtl cannot be larger than the defaultTtl (if set)
- Fractions of a second are not allowed. Omit this field to use the defaultTtl, or the max-age set by the origin, as the client-facing TTL. When the cache mode is set to "USE_ORIGIN_HEADERS" or "BYPASS_CACHE", you must omit this field. A duration in seconds terminated by 's'. Example: "3s".
- default_
ttl str Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age). Defaults to 3600s (1 hour).
- The TTL must be >= 0 and <= 31,536,000 seconds (1 year)
- Setting a TTL of "0" means "always revalidate" (equivalent to must-revalidate)
- The value of defaultTTL cannot be set to a value greater than that of maxTTL.
- Fractions of a second are not allowed.
- When the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL will overwrite the TTL set in all responses. Note that infrequently accessed objects may be evicted from the cache before the defined TTL. Objects that expire will be revalidated with the origin. When the cache mode is set to "USE_ORIGIN_HEADERS" or "BYPASS_CACHE", you must omit this field. A duration in seconds terminated by 's'. Example: "3s".
- max_
ttl str Specifies the maximum allowed TTL for cached content served by this origin. Defaults to 86400s (1 day). Cache directives that attempt to set a max-age or s-maxage higher than this, or an Expires header more than maxTtl seconds in the future will be capped at the value of maxTTL, as if it were the value of an s-maxage Cache-Control directive.
- The TTL must be >= 0 and <= 31,536,000 seconds (1 year)
- Setting a TTL of "0" means "always revalidate"
- The value of maxTtl must be equal to or greater than defaultTtl.
- Fractions of a second are not allowed. When the cache mode is set to "USE_ORIGIN_HEADERS", "FORCE_CACHE_ALL", or "BYPASS_CACHE", you must omit this field. A duration in seconds terminated by 's'. Example: "3s".
- negative_
caching bool Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. This can reduce the load on your origin and improve end-user experience by reducing response latency. By default, the CDNPolicy will apply the following default TTLs to these status codes:
- HTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m
- HTTP 404 (Not Found), 410 (Gone), 451 (Unavailable For Legal Reasons): 120s
- HTTP 405 (Method Not Found), 414 (URI Too Long), 501 (Not Implemented): 60s These defaults can be overridden in negativeCachingPolicy
- negative_
caching_ Mapping[str, str]policy Sets a cache TTL for the specified HTTP status code. negativeCaching must be enabled to configure negativeCachingPolicy.
- Omitting the policy and leaving negativeCaching enabled will use the default TTLs for each status code, defined in negativeCaching.
- TTLs must be >= 0 (where 0 is "always revalidate") and <= 86400s (1 day) Note that when specifying an explicit negativeCachingPolicy, you should take care to specify a cache TTL for all response codes that you wish to cache. The CDNPolicy will not apply any default negative caching when a policy exists.
- signed_
request_ strkeyset The EdgeCacheKeyset containing the set of public keys used to validate signed requests at the edge.
- signed_
request_ strmaximum_ expiration_ ttl Limit how far into the future the expiration time of a signed request may be. When set, a signed request is rejected if its expiration time is later than now + signedRequestMaximumExpirationTtl, where now is the time at which the signed request is first handled by the CDN.
- The TTL must be > 0.
- Fractions of a second are not allowed. By default, signedRequestMaximumExpirationTtl is not set and the expiration time of a signed request may be arbitrarily far into future.
- signed_
request_ strmode Whether to enforce signed requests. The default value is DISABLED, which means all content is public, and does not authorize access. You must also set a signedRequestKeyset to enable signed requests. When set to REQUIRE_SIGNATURES, all matching requests will have their signature validated. Requests that were not signed with the corresponding private key, or that are otherwise invalid (expired, do not match the signature, IP address, or header) will be rejected with a HTTP 403 and (if enabled) logged. Possible values are:
DISABLED
,REQUIRE_SIGNATURES
,REQUIRE_TOKENS
.- signed_
token_ Edgeoptions Cache Service Routing Path Matcher Route Rule Route Action Cdn Policy Signed Token Options Additional options for signed tokens. signedTokenOptions may only be specified when signedRequestMode is REQUIRE_TOKENS. Structure is documented below.
- add
Signatures Property Map Enable signature generation or propagation on this route. This field may only be specified when signedRequestMode is set to REQUIRE_TOKENS. Structure is documented below.
- cache
Key Property MapPolicy Defines the request parameters that contribute to the cache key. Structure is documented below.
- cache
Mode String Cache modes allow users to control the behaviour of the cache, what content it should cache automatically, whether to respect origin headers, or whether to unconditionally cache all responses. For all cache modes, Cache-Control headers will be passed to the client. Use clientTtl to override what is sent to the client. Possible values are:
CACHE_ALL_STATIC
,USE_ORIGIN_HEADERS
,FORCE_CACHE_ALL
,BYPASS_CACHE
.- client
Ttl String Specifies a separate client (e.g. browser client) TTL, separate from the TTL used by the edge caches. Leaving this empty will use the same cache TTL for both the CDN and the client-facing response.
- The TTL must be > 0 and <= 86400s (1 day)
- The clientTtl cannot be larger than the defaultTtl (if set)
- Fractions of a second are not allowed. Omit this field to use the defaultTtl, or the max-age set by the origin, as the client-facing TTL. When the cache mode is set to "USE_ORIGIN_HEADERS" or "BYPASS_CACHE", you must omit this field. A duration in seconds terminated by 's'. Example: "3s".
- default
Ttl String Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age). Defaults to 3600s (1 hour).
- The TTL must be >= 0 and <= 31,536,000 seconds (1 year)
- Setting a TTL of "0" means "always revalidate" (equivalent to must-revalidate)
- The value of defaultTTL cannot be set to a value greater than that of maxTTL.
- Fractions of a second are not allowed.
- When the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL will overwrite the TTL set in all responses. Note that infrequently accessed objects may be evicted from the cache before the defined TTL. Objects that expire will be revalidated with the origin. When the cache mode is set to "USE_ORIGIN_HEADERS" or "BYPASS_CACHE", you must omit this field. A duration in seconds terminated by 's'. Example: "3s".
- max
Ttl String Specifies the maximum allowed TTL for cached content served by this origin. Defaults to 86400s (1 day). Cache directives that attempt to set a max-age or s-maxage higher than this, or an Expires header more than maxTtl seconds in the future will be capped at the value of maxTTL, as if it were the value of an s-maxage Cache-Control directive.
- The TTL must be >= 0 and <= 31,536,000 seconds (1 year)
- Setting a TTL of "0" means "always revalidate"
- The value of maxTtl must be equal to or greater than defaultTtl.
- Fractions of a second are not allowed. When the cache mode is set to "USE_ORIGIN_HEADERS", "FORCE_CACHE_ALL", or "BYPASS_CACHE", you must omit this field. A duration in seconds terminated by 's'. Example: "3s".
- negative
Caching Boolean Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. This can reduce the load on your origin and improve end-user experience by reducing response latency. By default, the CDNPolicy will apply the following default TTLs to these status codes:
- HTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m
- HTTP 404 (Not Found), 410 (Gone), 451 (Unavailable For Legal Reasons): 120s
- HTTP 405 (Method Not Found), 414 (URI Too Long), 501 (Not Implemented): 60s These defaults can be overridden in negativeCachingPolicy
- negative
Caching Map<String>Policy Sets a cache TTL for the specified HTTP status code. negativeCaching must be enabled to configure negativeCachingPolicy.
- Omitting the policy and leaving negativeCaching enabled will use the default TTLs for each status code, defined in negativeCaching.
- TTLs must be >= 0 (where 0 is "always revalidate") and <= 86400s (1 day) Note that when specifying an explicit negativeCachingPolicy, you should take care to specify a cache TTL for all response codes that you wish to cache. The CDNPolicy will not apply any default negative caching when a policy exists.
- signed
Request StringKeyset The EdgeCacheKeyset containing the set of public keys used to validate signed requests at the edge.
- signed
Request StringMaximum Expiration Ttl Limit how far into the future the expiration time of a signed request may be. When set, a signed request is rejected if its expiration time is later than now + signedRequestMaximumExpirationTtl, where now is the time at which the signed request is first handled by the CDN.
- The TTL must be > 0.
- Fractions of a second are not allowed. By default, signedRequestMaximumExpirationTtl is not set and the expiration time of a signed request may be arbitrarily far into future.
- signed
Request StringMode Whether to enforce signed requests. The default value is DISABLED, which means all content is public, and does not authorize access. You must also set a signedRequestKeyset to enable signed requests. When set to REQUIRE_SIGNATURES, all matching requests will have their signature validated. Requests that were not signed with the corresponding private key, or that are otherwise invalid (expired, do not match the signature, IP address, or header) will be rejected with a HTTP 403 and (if enabled) logged. Possible values are:
DISABLED
,REQUIRE_SIGNATURES
,REQUIRE_TOKENS
.- signed
Token Property MapOptions Additional options for signed tokens. signedTokenOptions may only be specified when signedRequestMode is REQUIRE_TOKENS. Structure is documented below.
EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyAddSignatures, EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyAddSignaturesArgs
- Actions string
The actions to take to add signatures to responses. Each value may be one of:
GENERATE_COOKIE
,GENERATE_TOKEN_HLS_COOKIELESS
,PROPAGATE_TOKEN_HLS_COOKIELESS
.- Copied
Parameters List<string> The parameters to copy from the verified token to the generated token. Only the following parameters may be copied:
- Keyset string
The keyset to use for signature generation. The following are both valid paths to an EdgeCacheKeyset resource:
projects/project/locations/global/edgeCacheKeysets/yourKeyset
- Token
Query stringParameter The query parameter in which to put the generated token. If not specified, defaults to
edge-cache-token
. If specified, the name must be 1-64 characters long and match the regular expressiona-zA-Z*
which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit. This field may only be set when the GENERATE_TOKEN_HLS_COOKIELESS or PROPAGATE_TOKEN_HLS_COOKIELESS actions are specified.- Token
Ttl string The duration the token is valid starting from the moment the token is first generated. Defaults to
86400s
(1 day). The TTL must be >= 0 and <= 604,800 seconds (1 week). This field may only be specified when the GENERATE_COOKIE or GENERATE_TOKEN_HLS_COOKIELESS actions are specified. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
- Actions string
The actions to take to add signatures to responses. Each value may be one of:
GENERATE_COOKIE
,GENERATE_TOKEN_HLS_COOKIELESS
,PROPAGATE_TOKEN_HLS_COOKIELESS
.- Copied
Parameters []string The parameters to copy from the verified token to the generated token. Only the following parameters may be copied:
- Keyset string
The keyset to use for signature generation. The following are both valid paths to an EdgeCacheKeyset resource:
projects/project/locations/global/edgeCacheKeysets/yourKeyset
- Token
Query stringParameter The query parameter in which to put the generated token. If not specified, defaults to
edge-cache-token
. If specified, the name must be 1-64 characters long and match the regular expressiona-zA-Z*
which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit. This field may only be set when the GENERATE_TOKEN_HLS_COOKIELESS or PROPAGATE_TOKEN_HLS_COOKIELESS actions are specified.- Token
Ttl string The duration the token is valid starting from the moment the token is first generated. Defaults to
86400s
(1 day). The TTL must be >= 0 and <= 604,800 seconds (1 week). This field may only be specified when the GENERATE_COOKIE or GENERATE_TOKEN_HLS_COOKIELESS actions are specified. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
- actions String
The actions to take to add signatures to responses. Each value may be one of:
GENERATE_COOKIE
,GENERATE_TOKEN_HLS_COOKIELESS
,PROPAGATE_TOKEN_HLS_COOKIELESS
.- copied
Parameters List<String> The parameters to copy from the verified token to the generated token. Only the following parameters may be copied:
- keyset String
The keyset to use for signature generation. The following are both valid paths to an EdgeCacheKeyset resource:
projects/project/locations/global/edgeCacheKeysets/yourKeyset
- token
Query StringParameter The query parameter in which to put the generated token. If not specified, defaults to
edge-cache-token
. If specified, the name must be 1-64 characters long and match the regular expressiona-zA-Z*
which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit. This field may only be set when the GENERATE_TOKEN_HLS_COOKIELESS or PROPAGATE_TOKEN_HLS_COOKIELESS actions are specified.- token
Ttl String The duration the token is valid starting from the moment the token is first generated. Defaults to
86400s
(1 day). The TTL must be >= 0 and <= 604,800 seconds (1 week). This field may only be specified when the GENERATE_COOKIE or GENERATE_TOKEN_HLS_COOKIELESS actions are specified. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
- actions string
The actions to take to add signatures to responses. Each value may be one of:
GENERATE_COOKIE
,GENERATE_TOKEN_HLS_COOKIELESS
,PROPAGATE_TOKEN_HLS_COOKIELESS
.- copied
Parameters string[] The parameters to copy from the verified token to the generated token. Only the following parameters may be copied:
- keyset string
The keyset to use for signature generation. The following are both valid paths to an EdgeCacheKeyset resource:
projects/project/locations/global/edgeCacheKeysets/yourKeyset
- token
Query stringParameter The query parameter in which to put the generated token. If not specified, defaults to
edge-cache-token
. If specified, the name must be 1-64 characters long and match the regular expressiona-zA-Z*
which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit. This field may only be set when the GENERATE_TOKEN_HLS_COOKIELESS or PROPAGATE_TOKEN_HLS_COOKIELESS actions are specified.- token
Ttl string The duration the token is valid starting from the moment the token is first generated. Defaults to
86400s
(1 day). The TTL must be >= 0 and <= 604,800 seconds (1 week). This field may only be specified when the GENERATE_COOKIE or GENERATE_TOKEN_HLS_COOKIELESS actions are specified. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
- actions str
The actions to take to add signatures to responses. Each value may be one of:
GENERATE_COOKIE
,GENERATE_TOKEN_HLS_COOKIELESS
,PROPAGATE_TOKEN_HLS_COOKIELESS
.- copied_
parameters Sequence[str] The parameters to copy from the verified token to the generated token. Only the following parameters may be copied:
- keyset str
The keyset to use for signature generation. The following are both valid paths to an EdgeCacheKeyset resource:
projects/project/locations/global/edgeCacheKeysets/yourKeyset
- token_
query_ strparameter The query parameter in which to put the generated token. If not specified, defaults to
edge-cache-token
. If specified, the name must be 1-64 characters long and match the regular expressiona-zA-Z*
which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit. This field may only be set when the GENERATE_TOKEN_HLS_COOKIELESS or PROPAGATE_TOKEN_HLS_COOKIELESS actions are specified.- token_
ttl str The duration the token is valid starting from the moment the token is first generated. Defaults to
86400s
(1 day). The TTL must be >= 0 and <= 604,800 seconds (1 week). This field may only be specified when the GENERATE_COOKIE or GENERATE_TOKEN_HLS_COOKIELESS actions are specified. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
- actions String
The actions to take to add signatures to responses. Each value may be one of:
GENERATE_COOKIE
,GENERATE_TOKEN_HLS_COOKIELESS
,PROPAGATE_TOKEN_HLS_COOKIELESS
.- copied
Parameters List<String> The parameters to copy from the verified token to the generated token. Only the following parameters may be copied:
- keyset String
The keyset to use for signature generation. The following are both valid paths to an EdgeCacheKeyset resource:
projects/project/locations/global/edgeCacheKeysets/yourKeyset
- token
Query StringParameter The query parameter in which to put the generated token. If not specified, defaults to
edge-cache-token
. If specified, the name must be 1-64 characters long and match the regular expressiona-zA-Z*
which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit. This field may only be set when the GENERATE_TOKEN_HLS_COOKIELESS or PROPAGATE_TOKEN_HLS_COOKIELESS actions are specified.- token
Ttl String The duration the token is valid starting from the moment the token is first generated. Defaults to
86400s
(1 day). The TTL must be >= 0 and <= 604,800 seconds (1 week). This field may only be specified when the GENERATE_COOKIE or GENERATE_TOKEN_HLS_COOKIELESS actions are specified. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyCacheKeyPolicy, EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicyCacheKeyPolicyArgs
- Exclude
Host bool If true, requests to different hosts will be cached separately. Note: this should only be enabled if hosts share the same origin and content. Removing the host from the cache key may inadvertently result in different objects being cached than intended, depending on which route the first user matched.
- Exclude
Query boolString If true, exclude query string parameters from the cache key If false (the default), include the query string parameters in the cache key according to includeQueryParameters and excludeQueryParameters. If neither includeQueryParameters nor excludeQueryParameters is set, the entire query string will be included.
- Excluded
Query List<string>Parameters Names of query string parameters to exclude from cache keys. All other parameters will be included. Either specify includedQueryParameters or excludedQueryParameters, not both. '&' and '=' will be percent encoded and not treated as delimiters.
- Include
Protocol bool If true, http and https requests will be cached separately.
- List<string>
Names of Cookies to include in cache keys. The cookie name and cookie value of each cookie named will be used as part of the cache key. Cookie names:
- must be valid RFC 6265 "cookie-name" tokens
- are case sensitive
- cannot start with "Edge-Cache-" (case insensitive) Note that specifying several cookies, and/or cookies that have a large range of values (e.g., per-user) will dramatically impact the cache hit rate, and may result in a higher eviction rate and reduced performance. You may specify up to three cookie names.
- Included
Header List<string>Names Names of HTTP request headers to include in cache keys. The value of the header field will be used as part of the cache key.
- Header names must be valid HTTP RFC 7230 header field values.
- Header field names are case insensitive
- To include the HTTP method, use ":method" Note that specifying several headers, and/or headers that have a large range of values (e.g. per-user) will dramatically impact the cache hit rate, and may result in a higher eviction rate and reduced performance.
- Included
Query List<string>Parameters Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify includedQueryParameters or excludedQueryParameters, not both. '&' and '=' will be percent encoded and not treated as delimiters.
- Exclude
Host bool If true, requests to different hosts will be cached separately. Note: this should only be enabled if hosts share the same origin and content. Removing the host from the cache key may inadvertently result in different objects being cached than intended, depending on which route the first user matched.
- Exclude
Query boolString If true, exclude query string parameters from the cache key If false (the default), include the query string parameters in the cache key according to includeQueryParameters and excludeQueryParameters. If neither includeQueryParameters nor excludeQueryParameters is set, the entire query string will be included.
- Excluded
Query []stringParameters Names of query string parameters to exclude from cache keys. All other parameters will be included. Either specify includedQueryParameters or excludedQueryParameters, not both. '&' and '=' will be percent encoded and not treated as delimiters.
- Include
Protocol bool If true, http and https requests will be cached separately.
- []string
Names of Cookies to include in cache keys. The cookie name and cookie value of each cookie named will be used as part of the cache key. Cookie names:
- must be valid RFC 6265 "cookie-name" tokens
- are case sensitive
- cannot start with "Edge-Cache-" (case insensitive) Note that specifying several cookies, and/or cookies that have a large range of values (e.g., per-user) will dramatically impact the cache hit rate, and may result in a higher eviction rate and reduced performance. You may specify up to three cookie names.
- Included
Header []stringNames Names of HTTP request headers to include in cache keys. The value of the header field will be used as part of the cache key.
- Header names must be valid HTTP RFC 7230 header field values.
- Header field names are case insensitive
- To include the HTTP method, use ":method" Note that specifying several headers, and/or headers that have a large range of values (e.g. per-user) will dramatically impact the cache hit rate, and may result in a higher eviction rate and reduced performance.
- Included
Query []stringParameters Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify includedQueryParameters or excludedQueryParameters, not both. '&' and '=' will be percent encoded and not treated as delimiters.
- exclude
Host Boolean If true, requests to different hosts will be cached separately. Note: this should only be enabled if hosts share the same origin and content. Removing the host from the cache key may inadvertently result in different objects being cached than intended, depending on which route the first user matched.
- exclude
Query BooleanString If true, exclude query string parameters from the cache key If false (the default), include the query string parameters in the cache key according to includeQueryParameters and excludeQueryParameters. If neither includeQueryParameters nor excludeQueryParameters is set, the entire query string will be included.
- excluded
Query List<String>Parameters Names of query string parameters to exclude from cache keys. All other parameters will be included. Either specify includedQueryParameters or excludedQueryParameters, not both. '&' and '=' will be percent encoded and not treated as delimiters.
- include
Protocol Boolean If true, http and https requests will be cached separately.
- List<String>
Names of Cookies to include in cache keys. The cookie name and cookie value of each cookie named will be used as part of the cache key. Cookie names:
- must be valid RFC 6265 "cookie-name" tokens
- are case sensitive
- cannot start with "Edge-Cache-" (case insensitive) Note that specifying several cookies, and/or cookies that have a large range of values (e.g., per-user) will dramatically impact the cache hit rate, and may result in a higher eviction rate and reduced performance. You may specify up to three cookie names.
- included
Header List<String>Names Names of HTTP request headers to include in cache keys. The value of the header field will be used as part of the cache key.
- Header names must be valid HTTP RFC 7230 header field values.
- Header field names are case insensitive
- To include the HTTP method, use ":method" Note that specifying several headers, and/or headers that have a large range of values (e.g. per-user) will dramatically impact the cache hit rate, and may result in a higher eviction rate and reduced performance.
- included
Query List<String>Parameters Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify includedQueryParameters or excludedQueryParameters, not both. '&' and '=' will be percent encoded and not treated as delimiters.
- exclude
Host boolean If true, requests to different hosts will be cached separately. Note: this should only be enabled if hosts share the same origin and content. Removing the host from the cache key may inadvertently result in different objects being cached than intended, depending on which route the first user matched.
- exclude
Query booleanString If true, exclude query string parameters from the cache key If false (the default), include the query string parameters in the cache key according to includeQueryParameters and excludeQueryParameters. If neither includeQueryParameters nor excludeQueryParameters is set, the entire query string will be included.
- excluded
Query string[]Parameters Names of query string parameters to exclude from cache keys. All other parameters will be included. Either specify includedQueryParameters or excludedQueryParameters, not both. '&' and '=' will be percent encoded and not treated as delimiters.
- include
Protocol boolean If true, http and https requests will be cached separately.
- string[]
Names of Cookies to include in cache keys. The cookie name and cookie value of each cookie named will be used as part of the cache key. Cookie names:
- must be valid RFC 6265 "cookie-name" tokens
- are case sensitive
- cannot start with "Edge-Cache-" (case insensitive) Note that specifying several cookies, and/or cookies that have a large range of values (e.g., per-user) will dramatically impact the cache hit rate, and may result in a higher eviction rate and reduced performance. You may specify up to three cookie names.
- included
Header string[]Names Names of HTTP request headers to include in cache keys. The value of the header field will be used as part of the cache key.
- Header names must be valid HTTP RFC 7230 header field values.
- Header field names are case insensitive
- To include the HTTP method, use ":method" Note that specifying several headers, and/or headers that have a large range of values (e.g. per-user) will dramatically impact the cache hit rate, and may result in a higher eviction rate and reduced performance.
- included
Query string[]Parameters Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify includedQueryParameters or excludedQueryParameters, not both. '&' and '=' will be percent encoded and not treated as delimiters.
- exclude_
host bool If true, requests to different hosts will be cached separately. Note: this should only be enabled if hosts share the same origin and content. Removing the host from the cache key may inadvertently result in different objects being cached than intended, depending on which route the first user matched.
- exclude_
query_ boolstring If true, exclude query string parameters from the cache key If false (the default), include the query string parameters in the cache key according to includeQueryParameters and excludeQueryParameters. If neither includeQueryParameters nor excludeQueryParameters is set, the entire query string will be included.
- excluded_
query_ Sequence[str]parameters Names of query string parameters to exclude from cache keys. All other parameters will be included. Either specify includedQueryParameters or excludedQueryParameters, not both. '&' and '=' will be percent encoded and not treated as delimiters.
- include_
protocol bool If true, http and https requests will be cached separately.
- Sequence[str]
Names of Cookies to include in cache keys. The cookie name and cookie value of each cookie named will be used as part of the cache key. Cookie names:
- must be valid RFC 6265 "cookie-name" tokens
- are case sensitive
- cannot start with "Edge-Cache-" (case insensitive) Note that specifying several cookies, and/or cookies that have a large range of values (e.g., per-user) will dramatically impact the cache hit rate, and may result in a higher eviction rate and reduced performance. You may specify up to three cookie names.
- included_
header_ Sequence[str]names Names of HTTP request headers to include in cache keys. The value of the header field will be used as part of the cache key.
- Header names must be valid HTTP RFC 7230 header field values.
- Header field names are case insensitive
- To include the HTTP method, use ":method" Note that specifying several headers, and/or headers that have a large range of values (e.g. per-user) will dramatically impact the cache hit rate, and may result in a higher eviction rate and reduced performance.
- included_
query_ Sequence[str]parameters Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify includedQueryParameters or excludedQueryParameters, not both. '&' and '=' will be percent encoded and not treated as delimiters.
- exclude
Host Boolean If true, requests to different hosts will be cached separately. Note: this should only be enabled if hosts share the same origin and content. Removing the host from the cache key may inadvertently result in different objects being cached than intended, depending on which route the first user matched.
- exclude
Query BooleanString If true, exclude query string parameters from the cache key If false (the default), include the query string parameters in the cache key according to includeQueryParameters and excludeQueryParameters. If neither includeQueryParameters nor excludeQueryParameters is set, the entire query string will be included.
- excluded
Query List<String>Parameters Names of query string parameters to exclude from cache keys. All other parameters will be included. Either specify includedQueryParameters or excludedQueryParameters, not both. '&' and '=' will be percent encoded and not treated as delimiters.
- include
Protocol Boolean If true, http and https requests will be cached separately.
- List<String>
Names of Cookies to include in cache keys. The cookie name and cookie value of each cookie named will be used as part of the cache key. Cookie names:
- must be valid RFC 6265 "cookie-name" tokens
- are case sensitive
- cannot start with "Edge-Cache-" (case insensitive) Note that specifying several cookies, and/or cookies that have a large range of values (e.g., per-user) will dramatically impact the cache hit rate, and may result in a higher eviction rate and reduced performance. You may specify up to three cookie names.
- included
Header List<String>Names Names of HTTP request headers to include in cache keys. The value of the header field will be used as part of the cache key.
- Header names must be valid HTTP RFC 7230 header field values.
- Header field names are case insensitive
- To include the HTTP method, use ":method" Note that specifying several headers, and/or headers that have a large range of values (e.g. per-user) will dramatically impact the cache hit rate, and may result in a higher eviction rate and reduced performance.
- included
Query List<String>Parameters Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify includedQueryParameters or excludedQueryParameters, not both. '&' and '=' will be percent encoded and not treated as delimiters.
EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicySignedTokenOptions, EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCdnPolicySignedTokenOptionsArgs
- Allowed
Signature List<string>Algorithms The allowed signature algorithms to use. Defaults to using only ED25519. You may specify up to 3 signature algorithms to use. Each value may be one of:
ED25519
,HMAC_SHA_256
,HMAC_SHA1
.- Token
Query stringParameter The query parameter in which to find the token. The name must be 1-64 characters long and match the regular expression
a-zA-Z*
which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit. Defaults toedge-cache-token
.
- Allowed
Signature []stringAlgorithms The allowed signature algorithms to use. Defaults to using only ED25519. You may specify up to 3 signature algorithms to use. Each value may be one of:
ED25519
,HMAC_SHA_256
,HMAC_SHA1
.- Token
Query stringParameter The query parameter in which to find the token. The name must be 1-64 characters long and match the regular expression
a-zA-Z*
which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit. Defaults toedge-cache-token
.
- allowed
Signature List<String>Algorithms The allowed signature algorithms to use. Defaults to using only ED25519. You may specify up to 3 signature algorithms to use. Each value may be one of:
ED25519
,HMAC_SHA_256
,HMAC_SHA1
.- token
Query StringParameter The query parameter in which to find the token. The name must be 1-64 characters long and match the regular expression
a-zA-Z*
which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit. Defaults toedge-cache-token
.
- allowed
Signature string[]Algorithms The allowed signature algorithms to use. Defaults to using only ED25519. You may specify up to 3 signature algorithms to use. Each value may be one of:
ED25519
,HMAC_SHA_256
,HMAC_SHA1
.- token
Query stringParameter The query parameter in which to find the token. The name must be 1-64 characters long and match the regular expression
a-zA-Z*
which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit. Defaults toedge-cache-token
.
- allowed_
signature_ Sequence[str]algorithms The allowed signature algorithms to use. Defaults to using only ED25519. You may specify up to 3 signature algorithms to use. Each value may be one of:
ED25519
,HMAC_SHA_256
,HMAC_SHA1
.- token_
query_ strparameter The query parameter in which to find the token. The name must be 1-64 characters long and match the regular expression
a-zA-Z*
which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit. Defaults toedge-cache-token
.
- allowed
Signature List<String>Algorithms The allowed signature algorithms to use. Defaults to using only ED25519. You may specify up to 3 signature algorithms to use. Each value may be one of:
ED25519
,HMAC_SHA_256
,HMAC_SHA1
.- token
Query StringParameter The query parameter in which to find the token. The name must be 1-64 characters long and match the regular expression
a-zA-Z*
which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit. Defaults toedge-cache-token
.
EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCorsPolicy, EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionCorsPolicyArgs
- Max
Age string Specifies how long results of a preflight request can be cached by a client in seconds. Note that many browser clients enforce a maximum TTL of 600s (10 minutes).
- Setting the value to -1 forces a pre-flight check for all requests (not recommended)
- A maximum TTL of 86400s can be set, but note that (as above) some clients may force pre-flight checks at a more regular interval.
- This translates to the Access-Control-Max-Age header. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
- Allow
Credentials bool In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials response header.
- Allow
Headers List<string> Specifies the content for the Access-Control-Allow-Headers response header.
- Allow
Methods List<string> Specifies the content for the Access-Control-Allow-Methods response header.
- Allow
Origins List<string> Specifies the list of origins that will be allowed to do CORS requests. This translates to the Access-Control-Allow-Origin response header.
- Disabled bool
If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.
- Expose
Headers List<string> Specifies the content for the Access-Control-Allow-Headers response header.
- Max
Age string Specifies how long results of a preflight request can be cached by a client in seconds. Note that many browser clients enforce a maximum TTL of 600s (10 minutes).
- Setting the value to -1 forces a pre-flight check for all requests (not recommended)
- A maximum TTL of 86400s can be set, but note that (as above) some clients may force pre-flight checks at a more regular interval.
- This translates to the Access-Control-Max-Age header. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
- Allow
Credentials bool In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials response header.
- Allow
Headers []string Specifies the content for the Access-Control-Allow-Headers response header.
- Allow
Methods []string Specifies the content for the Access-Control-Allow-Methods response header.
- Allow
Origins []string Specifies the list of origins that will be allowed to do CORS requests. This translates to the Access-Control-Allow-Origin response header.
- Disabled bool
If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.
- Expose
Headers []string Specifies the content for the Access-Control-Allow-Headers response header.
- max
Age String Specifies how long results of a preflight request can be cached by a client in seconds. Note that many browser clients enforce a maximum TTL of 600s (10 minutes).
- Setting the value to -1 forces a pre-flight check for all requests (not recommended)
- A maximum TTL of 86400s can be set, but note that (as above) some clients may force pre-flight checks at a more regular interval.
- This translates to the Access-Control-Max-Age header. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
- allow
Credentials Boolean In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials response header.
- allow
Headers List<String> Specifies the content for the Access-Control-Allow-Headers response header.
- allow
Methods List<String> Specifies the content for the Access-Control-Allow-Methods response header.
- allow
Origins List<String> Specifies the list of origins that will be allowed to do CORS requests. This translates to the Access-Control-Allow-Origin response header.
- disabled Boolean
If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.
- expose
Headers List<String> Specifies the content for the Access-Control-Allow-Headers response header.
- max
Age string Specifies how long results of a preflight request can be cached by a client in seconds. Note that many browser clients enforce a maximum TTL of 600s (10 minutes).
- Setting the value to -1 forces a pre-flight check for all requests (not recommended)
- A maximum TTL of 86400s can be set, but note that (as above) some clients may force pre-flight checks at a more regular interval.
- This translates to the Access-Control-Max-Age header. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
- allow
Credentials boolean In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials response header.
- allow
Headers string[] Specifies the content for the Access-Control-Allow-Headers response header.
- allow
Methods string[] Specifies the content for the Access-Control-Allow-Methods response header.
- allow
Origins string[] Specifies the list of origins that will be allowed to do CORS requests. This translates to the Access-Control-Allow-Origin response header.
- disabled boolean
If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.
- expose
Headers string[] Specifies the content for the Access-Control-Allow-Headers response header.
- max_
age str Specifies how long results of a preflight request can be cached by a client in seconds. Note that many browser clients enforce a maximum TTL of 600s (10 minutes).
- Setting the value to -1 forces a pre-flight check for all requests (not recommended)
- A maximum TTL of 86400s can be set, but note that (as above) some clients may force pre-flight checks at a more regular interval.
- This translates to the Access-Control-Max-Age header. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
- allow_
credentials bool In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials response header.
- allow_
headers Sequence[str] Specifies the content for the Access-Control-Allow-Headers response header.
- allow_
methods Sequence[str] Specifies the content for the Access-Control-Allow-Methods response header.
- allow_
origins Sequence[str] Specifies the list of origins that will be allowed to do CORS requests. This translates to the Access-Control-Allow-Origin response header.
- disabled bool
If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.
- expose_
headers Sequence[str] Specifies the content for the Access-Control-Allow-Headers response header.
- max
Age String Specifies how long results of a preflight request can be cached by a client in seconds. Note that many browser clients enforce a maximum TTL of 600s (10 minutes).
- Setting the value to -1 forces a pre-flight check for all requests (not recommended)
- A maximum TTL of 86400s can be set, but note that (as above) some clients may force pre-flight checks at a more regular interval.
- This translates to the Access-Control-Max-Age header. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
- allow
Credentials Boolean In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials response header.
- allow
Headers List<String> Specifies the content for the Access-Control-Allow-Headers response header.
- allow
Methods List<String> Specifies the content for the Access-Control-Allow-Methods response header.
- allow
Origins List<String> Specifies the list of origins that will be allowed to do CORS requests. This translates to the Access-Control-Allow-Origin response header.
- disabled Boolean
If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.
- expose
Headers List<String> Specifies the content for the Access-Control-Allow-Headers response header.
EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionUrlRewrite, EdgeCacheServiceRoutingPathMatcherRouteRuleRouteActionUrlRewriteArgs
- Host
Rewrite string Prior to forwarding the request to the selected origin, the request's host header is replaced with contents of hostRewrite.
- Path
Prefix stringRewrite Prior to forwarding the request to the selected origin, the matching portion of the request's path is replaced by pathPrefixRewrite.
- Path
Template stringRewrite Prior to forwarding the request to the selected origin, if the request matched a pathTemplateMatch, the matching portion of the request's path is replaced re-written using the pattern specified by pathTemplateRewrite. pathTemplateRewrite must be between 1 and 255 characters (inclusive), must start with a '/', and must only use variables captured by the route's pathTemplate matchers. pathTemplateRewrite may only be used when all of a route's MatchRules specify pathTemplate. Only one of pathPrefixRewrite and pathTemplateRewrite may be specified.
- Host
Rewrite string Prior to forwarding the request to the selected origin, the request's host header is replaced with contents of hostRewrite.
- Path
Prefix stringRewrite Prior to forwarding the request to the selected origin, the matching portion of the request's path is replaced by pathPrefixRewrite.
- Path
Template stringRewrite Prior to forwarding the request to the selected origin, if the request matched a pathTemplateMatch, the matching portion of the request's path is replaced re-written using the pattern specified by pathTemplateRewrite. pathTemplateRewrite must be between 1 and 255 characters (inclusive), must start with a '/', and must only use variables captured by the route's pathTemplate matchers. pathTemplateRewrite may only be used when all of a route's MatchRules specify pathTemplate. Only one of pathPrefixRewrite and pathTemplateRewrite may be specified.
- host
Rewrite String Prior to forwarding the request to the selected origin, the request's host header is replaced with contents of hostRewrite.
- path
Prefix StringRewrite Prior to forwarding the request to the selected origin, the matching portion of the request's path is replaced by pathPrefixRewrite.
- path
Template StringRewrite Prior to forwarding the request to the selected origin, if the request matched a pathTemplateMatch, the matching portion of the request's path is replaced re-written using the pattern specified by pathTemplateRewrite. pathTemplateRewrite must be between 1 and 255 characters (inclusive), must start with a '/', and must only use variables captured by the route's pathTemplate matchers. pathTemplateRewrite may only be used when all of a route's MatchRules specify pathTemplate. Only one of pathPrefixRewrite and pathTemplateRewrite may be specified.
- host
Rewrite string Prior to forwarding the request to the selected origin, the request's host header is replaced with contents of hostRewrite.
- path
Prefix stringRewrite Prior to forwarding the request to the selected origin, the matching portion of the request's path is replaced by pathPrefixRewrite.
- path
Template stringRewrite Prior to forwarding the request to the selected origin, if the request matched a pathTemplateMatch, the matching portion of the request's path is replaced re-written using the pattern specified by pathTemplateRewrite. pathTemplateRewrite must be between 1 and 255 characters (inclusive), must start with a '/', and must only use variables captured by the route's pathTemplate matchers. pathTemplateRewrite may only be used when all of a route's MatchRules specify pathTemplate. Only one of pathPrefixRewrite and pathTemplateRewrite may be specified.
- host_
rewrite str Prior to forwarding the request to the selected origin, the request's host header is replaced with contents of hostRewrite.
- path_
prefix_ strrewrite Prior to forwarding the request to the selected origin, the matching portion of the request's path is replaced by pathPrefixRewrite.
- path_
template_ strrewrite Prior to forwarding the request to the selected origin, if the request matched a pathTemplateMatch, the matching portion of the request's path is replaced re-written using the pattern specified by pathTemplateRewrite. pathTemplateRewrite must be between 1 and 255 characters (inclusive), must start with a '/', and must only use variables captured by the route's pathTemplate matchers. pathTemplateRewrite may only be used when all of a route's MatchRules specify pathTemplate. Only one of pathPrefixRewrite and pathTemplateRewrite may be specified.
- host
Rewrite String Prior to forwarding the request to the selected origin, the request's host header is replaced with contents of hostRewrite.
- path
Prefix StringRewrite Prior to forwarding the request to the selected origin, the matching portion of the request's path is replaced by pathPrefixRewrite.
- path
Template StringRewrite Prior to forwarding the request to the selected origin, if the request matched a pathTemplateMatch, the matching portion of the request's path is replaced re-written using the pattern specified by pathTemplateRewrite. pathTemplateRewrite must be between 1 and 255 characters (inclusive), must start with a '/', and must only use variables captured by the route's pathTemplate matchers. pathTemplateRewrite may only be used when all of a route's MatchRules specify pathTemplate. Only one of pathPrefixRewrite and pathTemplateRewrite may be specified.
EdgeCacheServiceRoutingPathMatcherRouteRuleUrlRedirect, EdgeCacheServiceRoutingPathMatcherRouteRuleUrlRedirectArgs
- Host
Redirect string The host that will be used in the redirect response instead of the one that was supplied in the request.
- Https
Redirect bool If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This can only be set if there is at least one (1) edgeSslCertificate set on the service.
- Path
Redirect string The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The path value must be between 1 and 1024 characters.
- Prefix
Redirect string The prefix that replaces the prefixMatch specified in the routeRule, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
- Redirect
Response stringCode The HTTP Status code to use for this RedirectAction. The supported values are:
- Strip
Query bool If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
- Host
Redirect string The host that will be used in the redirect response instead of the one that was supplied in the request.
- Https
Redirect bool If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This can only be set if there is at least one (1) edgeSslCertificate set on the service.
- Path
Redirect string The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The path value must be between 1 and 1024 characters.
- Prefix
Redirect string The prefix that replaces the prefixMatch specified in the routeRule, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
- Redirect
Response stringCode The HTTP Status code to use for this RedirectAction. The supported values are:
- Strip
Query bool If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
- host
Redirect String The host that will be used in the redirect response instead of the one that was supplied in the request.
- https
Redirect Boolean If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This can only be set if there is at least one (1) edgeSslCertificate set on the service.
- path
Redirect String The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The path value must be between 1 and 1024 characters.
- prefix
Redirect String The prefix that replaces the prefixMatch specified in the routeRule, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
- redirect
Response StringCode The HTTP Status code to use for this RedirectAction. The supported values are:
- strip
Query Boolean If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
- host
Redirect string The host that will be used in the redirect response instead of the one that was supplied in the request.
- https
Redirect boolean If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This can only be set if there is at least one (1) edgeSslCertificate set on the service.
- path
Redirect string The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The path value must be between 1 and 1024 characters.
- prefix
Redirect string The prefix that replaces the prefixMatch specified in the routeRule, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
- redirect
Response stringCode The HTTP Status code to use for this RedirectAction. The supported values are:
- strip
Query boolean If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
- host_
redirect str The host that will be used in the redirect response instead of the one that was supplied in the request.
- https_
redirect bool If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This can only be set if there is at least one (1) edgeSslCertificate set on the service.
- path_
redirect str The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The path value must be between 1 and 1024 characters.
- prefix_
redirect str The prefix that replaces the prefixMatch specified in the routeRule, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
- redirect_
response_ strcode The HTTP Status code to use for this RedirectAction. The supported values are:
- strip_
query bool If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
- host
Redirect String The host that will be used in the redirect response instead of the one that was supplied in the request.
- https
Redirect Boolean If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This can only be set if there is at least one (1) edgeSslCertificate set on the service.
- path
Redirect String The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The path value must be between 1 and 1024 characters.
- prefix
Redirect String The prefix that replaces the prefixMatch specified in the routeRule, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.
- redirect
Response StringCode The HTTP Status code to use for this RedirectAction. The supported values are:
- strip
Query Boolean If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained.
Import
EdgeCacheService can be imported using any of these accepted formats
$ pulumi import gcp:networkservices/edgeCacheService:EdgeCacheService default projects/{{project}}/locations/global/edgeCacheServices/{{name}}
$ pulumi import gcp:networkservices/edgeCacheService:EdgeCacheService default {{project}}/{{name}}
$ pulumi import gcp:networkservices/edgeCacheService:EdgeCacheService default {{name}}
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
google-beta
Terraform Provider.