gcorelabs.CdnRule
Explore with Pulumi AI
Represent cdn resource rule
Create CdnRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CdnRule(name: string, args: CdnRuleArgs, opts?: CustomResourceOptions);
@overload
def CdnRule(resource_name: str,
args: CdnRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CdnRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
resource_id: Optional[float] = None,
rule: Optional[str] = None,
rule_type: Optional[float] = None,
cdn_rule_id: Optional[str] = None,
name: Optional[str] = None,
options: Optional[CdnRuleOptionsArgs] = None,
origin_group: Optional[float] = None,
origin_protocol: Optional[str] = None,
weight: Optional[float] = None)
func NewCdnRule(ctx *Context, name string, args CdnRuleArgs, opts ...ResourceOption) (*CdnRule, error)
public CdnRule(string name, CdnRuleArgs args, CustomResourceOptions? opts = null)
public CdnRule(String name, CdnRuleArgs args)
public CdnRule(String name, CdnRuleArgs args, CustomResourceOptions options)
type: gcorelabs:CdnRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args CdnRuleArgs
- 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 CdnRuleArgs
- 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 CdnRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CdnRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CdnRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var cdnRuleResource = new Gcorelabs.CdnRule("cdnRuleResource", new()
{
ResourceId = 0,
Rule = "string",
RuleType = 0,
CdnRuleId = "string",
Name = "string",
Options = new Gcorelabs.Inputs.CdnRuleOptionsArgs
{
BrowserCacheSettings = new Gcorelabs.Inputs.CdnRuleOptionsBrowserCacheSettingsArgs
{
Enabled = false,
Value = "string",
},
Cors = new Gcorelabs.Inputs.CdnRuleOptionsCorsArgs
{
Values = new[]
{
"string",
},
Enabled = false,
},
EdgeCacheSettings = new Gcorelabs.Inputs.CdnRuleOptionsEdgeCacheSettingsArgs
{
CustomValues =
{
{ "string", "string" },
},
Default = "string",
Enabled = false,
Value = "string",
},
GzipOn = new Gcorelabs.Inputs.CdnRuleOptionsGzipOnArgs
{
Value = false,
Enabled = false,
},
HostHeader = new Gcorelabs.Inputs.CdnRuleOptionsHostHeaderArgs
{
Value = "string",
Enabled = false,
},
IgnoreQueryString = new Gcorelabs.Inputs.CdnRuleOptionsIgnoreQueryStringArgs
{
Value = false,
Enabled = false,
},
QueryParamsBlacklist = new Gcorelabs.Inputs.CdnRuleOptionsQueryParamsBlacklistArgs
{
Values = new[]
{
"string",
},
Enabled = false,
},
QueryParamsWhitelist = new Gcorelabs.Inputs.CdnRuleOptionsQueryParamsWhitelistArgs
{
Values = new[]
{
"string",
},
Enabled = false,
},
RedirectHttpToHttps = new Gcorelabs.Inputs.CdnRuleOptionsRedirectHttpToHttpsArgs
{
Value = false,
Enabled = false,
},
Rewrite = new Gcorelabs.Inputs.CdnRuleOptionsRewriteArgs
{
Body = "string",
Enabled = false,
Flag = "string",
},
Sni = new Gcorelabs.Inputs.CdnRuleOptionsSniArgs
{
CustomHostname = "string",
Enabled = false,
SniType = "string",
},
StaticHeaders = new Gcorelabs.Inputs.CdnRuleOptionsStaticHeadersArgs
{
Value =
{
{ "string", "string" },
},
Enabled = false,
},
StaticRequestHeaders = new Gcorelabs.Inputs.CdnRuleOptionsStaticRequestHeadersArgs
{
Value =
{
{ "string", "string" },
},
Enabled = false,
},
TlsVersions = new Gcorelabs.Inputs.CdnRuleOptionsTlsVersionsArgs
{
Values = new[]
{
"string",
},
Enabled = false,
},
Webp = new Gcorelabs.Inputs.CdnRuleOptionsWebpArgs
{
JpgQuality = 0,
PngQuality = 0,
Enabled = false,
PngLossless = false,
},
Websockets = new Gcorelabs.Inputs.CdnRuleOptionsWebsocketsArgs
{
Value = false,
Enabled = false,
},
},
OriginGroup = 0,
OriginProtocol = "string",
Weight = 0,
});
example, err := gcorelabs.NewCdnRule(ctx, "cdnRuleResource", &gcorelabs.CdnRuleArgs{
ResourceId: pulumi.Float64(0),
Rule: pulumi.String("string"),
RuleType: pulumi.Float64(0),
CdnRuleId: pulumi.String("string"),
Name: pulumi.String("string"),
Options: &gcorelabs.CdnRuleOptionsArgs{
BrowserCacheSettings: &gcorelabs.CdnRuleOptionsBrowserCacheSettingsArgs{
Enabled: pulumi.Bool(false),
Value: pulumi.String("string"),
},
Cors: &gcorelabs.CdnRuleOptionsCorsArgs{
Values: pulumi.StringArray{
pulumi.String("string"),
},
Enabled: pulumi.Bool(false),
},
EdgeCacheSettings: &gcorelabs.CdnRuleOptionsEdgeCacheSettingsArgs{
CustomValues: pulumi.StringMap{
"string": pulumi.String("string"),
},
Default: pulumi.String("string"),
Enabled: pulumi.Bool(false),
Value: pulumi.String("string"),
},
GzipOn: &gcorelabs.CdnRuleOptionsGzipOnArgs{
Value: pulumi.Bool(false),
Enabled: pulumi.Bool(false),
},
HostHeader: &gcorelabs.CdnRuleOptionsHostHeaderArgs{
Value: pulumi.String("string"),
Enabled: pulumi.Bool(false),
},
IgnoreQueryString: &gcorelabs.CdnRuleOptionsIgnoreQueryStringArgs{
Value: pulumi.Bool(false),
Enabled: pulumi.Bool(false),
},
QueryParamsBlacklist: &gcorelabs.CdnRuleOptionsQueryParamsBlacklistArgs{
Values: pulumi.StringArray{
pulumi.String("string"),
},
Enabled: pulumi.Bool(false),
},
QueryParamsWhitelist: &gcorelabs.CdnRuleOptionsQueryParamsWhitelistArgs{
Values: pulumi.StringArray{
pulumi.String("string"),
},
Enabled: pulumi.Bool(false),
},
RedirectHttpToHttps: &gcorelabs.CdnRuleOptionsRedirectHttpToHttpsArgs{
Value: pulumi.Bool(false),
Enabled: pulumi.Bool(false),
},
Rewrite: &gcorelabs.CdnRuleOptionsRewriteArgs{
Body: pulumi.String("string"),
Enabled: pulumi.Bool(false),
Flag: pulumi.String("string"),
},
Sni: &gcorelabs.CdnRuleOptionsSniArgs{
CustomHostname: pulumi.String("string"),
Enabled: pulumi.Bool(false),
SniType: pulumi.String("string"),
},
StaticHeaders: &gcorelabs.CdnRuleOptionsStaticHeadersArgs{
Value: pulumi.StringMap{
"string": pulumi.String("string"),
},
Enabled: pulumi.Bool(false),
},
StaticRequestHeaders: &gcorelabs.CdnRuleOptionsStaticRequestHeadersArgs{
Value: pulumi.StringMap{
"string": pulumi.String("string"),
},
Enabled: pulumi.Bool(false),
},
TlsVersions: &gcorelabs.CdnRuleOptionsTlsVersionsArgs{
Values: pulumi.StringArray{
pulumi.String("string"),
},
Enabled: pulumi.Bool(false),
},
Webp: &gcorelabs.CdnRuleOptionsWebpArgs{
JpgQuality: pulumi.Float64(0),
PngQuality: pulumi.Float64(0),
Enabled: pulumi.Bool(false),
PngLossless: pulumi.Bool(false),
},
Websockets: &gcorelabs.CdnRuleOptionsWebsocketsArgs{
Value: pulumi.Bool(false),
Enabled: pulumi.Bool(false),
},
},
OriginGroup: pulumi.Float64(0),
OriginProtocol: pulumi.String("string"),
Weight: pulumi.Float64(0),
})
var cdnRuleResource = new CdnRule("cdnRuleResource", CdnRuleArgs.builder()
.resourceId(0)
.rule("string")
.ruleType(0)
.cdnRuleId("string")
.name("string")
.options(CdnRuleOptionsArgs.builder()
.browserCacheSettings(CdnRuleOptionsBrowserCacheSettingsArgs.builder()
.enabled(false)
.value("string")
.build())
.cors(CdnRuleOptionsCorsArgs.builder()
.values("string")
.enabled(false)
.build())
.edgeCacheSettings(CdnRuleOptionsEdgeCacheSettingsArgs.builder()
.customValues(Map.of("string", "string"))
.default_("string")
.enabled(false)
.value("string")
.build())
.gzipOn(CdnRuleOptionsGzipOnArgs.builder()
.value(false)
.enabled(false)
.build())
.hostHeader(CdnRuleOptionsHostHeaderArgs.builder()
.value("string")
.enabled(false)
.build())
.ignoreQueryString(CdnRuleOptionsIgnoreQueryStringArgs.builder()
.value(false)
.enabled(false)
.build())
.queryParamsBlacklist(CdnRuleOptionsQueryParamsBlacklistArgs.builder()
.values("string")
.enabled(false)
.build())
.queryParamsWhitelist(CdnRuleOptionsQueryParamsWhitelistArgs.builder()
.values("string")
.enabled(false)
.build())
.redirectHttpToHttps(CdnRuleOptionsRedirectHttpToHttpsArgs.builder()
.value(false)
.enabled(false)
.build())
.rewrite(CdnRuleOptionsRewriteArgs.builder()
.body("string")
.enabled(false)
.flag("string")
.build())
.sni(CdnRuleOptionsSniArgs.builder()
.customHostname("string")
.enabled(false)
.sniType("string")
.build())
.staticHeaders(CdnRuleOptionsStaticHeadersArgs.builder()
.value(Map.of("string", "string"))
.enabled(false)
.build())
.staticRequestHeaders(CdnRuleOptionsStaticRequestHeadersArgs.builder()
.value(Map.of("string", "string"))
.enabled(false)
.build())
.tlsVersions(CdnRuleOptionsTlsVersionsArgs.builder()
.values("string")
.enabled(false)
.build())
.webp(CdnRuleOptionsWebpArgs.builder()
.jpgQuality(0)
.pngQuality(0)
.enabled(false)
.pngLossless(false)
.build())
.websockets(CdnRuleOptionsWebsocketsArgs.builder()
.value(false)
.enabled(false)
.build())
.build())
.originGroup(0)
.originProtocol("string")
.weight(0)
.build());
cdn_rule_resource = gcorelabs.CdnRule("cdnRuleResource",
resource_id=0,
rule="string",
rule_type=0,
cdn_rule_id="string",
name="string",
options={
"browser_cache_settings": {
"enabled": False,
"value": "string",
},
"cors": {
"values": ["string"],
"enabled": False,
},
"edge_cache_settings": {
"custom_values": {
"string": "string",
},
"default": "string",
"enabled": False,
"value": "string",
},
"gzip_on": {
"value": False,
"enabled": False,
},
"host_header": {
"value": "string",
"enabled": False,
},
"ignore_query_string": {
"value": False,
"enabled": False,
},
"query_params_blacklist": {
"values": ["string"],
"enabled": False,
},
"query_params_whitelist": {
"values": ["string"],
"enabled": False,
},
"redirect_http_to_https": {
"value": False,
"enabled": False,
},
"rewrite": {
"body": "string",
"enabled": False,
"flag": "string",
},
"sni": {
"custom_hostname": "string",
"enabled": False,
"sni_type": "string",
},
"static_headers": {
"value": {
"string": "string",
},
"enabled": False,
},
"static_request_headers": {
"value": {
"string": "string",
},
"enabled": False,
},
"tls_versions": {
"values": ["string"],
"enabled": False,
},
"webp": {
"jpg_quality": 0,
"png_quality": 0,
"enabled": False,
"png_lossless": False,
},
"websockets": {
"value": False,
"enabled": False,
},
},
origin_group=0,
origin_protocol="string",
weight=0)
const cdnRuleResource = new gcorelabs.CdnRule("cdnRuleResource", {
resourceId: 0,
rule: "string",
ruleType: 0,
cdnRuleId: "string",
name: "string",
options: {
browserCacheSettings: {
enabled: false,
value: "string",
},
cors: {
values: ["string"],
enabled: false,
},
edgeCacheSettings: {
customValues: {
string: "string",
},
"default": "string",
enabled: false,
value: "string",
},
gzipOn: {
value: false,
enabled: false,
},
hostHeader: {
value: "string",
enabled: false,
},
ignoreQueryString: {
value: false,
enabled: false,
},
queryParamsBlacklist: {
values: ["string"],
enabled: false,
},
queryParamsWhitelist: {
values: ["string"],
enabled: false,
},
redirectHttpToHttps: {
value: false,
enabled: false,
},
rewrite: {
body: "string",
enabled: false,
flag: "string",
},
sni: {
customHostname: "string",
enabled: false,
sniType: "string",
},
staticHeaders: {
value: {
string: "string",
},
enabled: false,
},
staticRequestHeaders: {
value: {
string: "string",
},
enabled: false,
},
tlsVersions: {
values: ["string"],
enabled: false,
},
webp: {
jpgQuality: 0,
pngQuality: 0,
enabled: false,
pngLossless: false,
},
websockets: {
value: false,
enabled: false,
},
},
originGroup: 0,
originProtocol: "string",
weight: 0,
});
type: gcorelabs:CdnRule
properties:
cdnRuleId: string
name: string
options:
browserCacheSettings:
enabled: false
value: string
cors:
enabled: false
values:
- string
edgeCacheSettings:
customValues:
string: string
default: string
enabled: false
value: string
gzipOn:
enabled: false
value: false
hostHeader:
enabled: false
value: string
ignoreQueryString:
enabled: false
value: false
queryParamsBlacklist:
enabled: false
values:
- string
queryParamsWhitelist:
enabled: false
values:
- string
redirectHttpToHttps:
enabled: false
value: false
rewrite:
body: string
enabled: false
flag: string
sni:
customHostname: string
enabled: false
sniType: string
staticHeaders:
enabled: false
value:
string: string
staticRequestHeaders:
enabled: false
value:
string: string
tlsVersions:
enabled: false
values:
- string
webp:
enabled: false
jpgQuality: 0
pngLossless: false
pngQuality: 0
websockets:
enabled: false
value: false
originGroup: 0
originProtocol: string
resourceId: 0
rule: string
ruleType: 0
weight: 0
CdnRule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The CdnRule resource accepts the following input properties:
- Resource
Id double - Rule string
- A pattern that defines when the rule is triggered. By default, we add a leading forward slash to any rule pattern. Specify a pattern without a forward slash.
- Rule
Type double - Type of rule. The rule is applied if the requested URI matches the rule pattern. It has two possible values: Type 0 — RegEx. Must start with '^/' or '/'. Type 1 — RegEx. Legacy type. Note that for this rule type we automatically add / to each rule pattern before your regular expression. Please use Type 0.
- Cdn
Rule stringId - The ID of this resource.
- Name string
- Rule name
- Options
Cdn
Rule Options - Each option in CDN resource settings. Each option added to CDN resource settings should have the following mandatory request fields: enabled, value.
- Origin
Group double - ID of the Origins Group. Use one of your Origins Group or create a new one. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- Origin
Protocol string - This option defines the protocol that will be used by CDN servers to request content from an origin source. If not specified, it will be inherit from resource. Possible values are: HTTPS, HTTP, MATCH.
- Weight double
- Rule weight that determines rule execution order: from the smallest (0) to the highest.
- Resource
Id float64 - Rule string
- A pattern that defines when the rule is triggered. By default, we add a leading forward slash to any rule pattern. Specify a pattern without a forward slash.
- Rule
Type float64 - Type of rule. The rule is applied if the requested URI matches the rule pattern. It has two possible values: Type 0 — RegEx. Must start with '^/' or '/'. Type 1 — RegEx. Legacy type. Note that for this rule type we automatically add / to each rule pattern before your regular expression. Please use Type 0.
- Cdn
Rule stringId - The ID of this resource.
- Name string
- Rule name
- Options
Cdn
Rule Options Args - Each option in CDN resource settings. Each option added to CDN resource settings should have the following mandatory request fields: enabled, value.
- Origin
Group float64 - ID of the Origins Group. Use one of your Origins Group or create a new one. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- Origin
Protocol string - This option defines the protocol that will be used by CDN servers to request content from an origin source. If not specified, it will be inherit from resource. Possible values are: HTTPS, HTTP, MATCH.
- Weight float64
- Rule weight that determines rule execution order: from the smallest (0) to the highest.
- resource
Id Double - rule String
- A pattern that defines when the rule is triggered. By default, we add a leading forward slash to any rule pattern. Specify a pattern without a forward slash.
- rule
Type Double - Type of rule. The rule is applied if the requested URI matches the rule pattern. It has two possible values: Type 0 — RegEx. Must start with '^/' or '/'. Type 1 — RegEx. Legacy type. Note that for this rule type we automatically add / to each rule pattern before your regular expression. Please use Type 0.
- cdn
Rule StringId - The ID of this resource.
- name String
- Rule name
- options
Cdn
Rule Options - Each option in CDN resource settings. Each option added to CDN resource settings should have the following mandatory request fields: enabled, value.
- origin
Group Double - ID of the Origins Group. Use one of your Origins Group or create a new one. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- origin
Protocol String - This option defines the protocol that will be used by CDN servers to request content from an origin source. If not specified, it will be inherit from resource. Possible values are: HTTPS, HTTP, MATCH.
- weight Double
- Rule weight that determines rule execution order: from the smallest (0) to the highest.
- resource
Id number - rule string
- A pattern that defines when the rule is triggered. By default, we add a leading forward slash to any rule pattern. Specify a pattern without a forward slash.
- rule
Type number - Type of rule. The rule is applied if the requested URI matches the rule pattern. It has two possible values: Type 0 — RegEx. Must start with '^/' or '/'. Type 1 — RegEx. Legacy type. Note that for this rule type we automatically add / to each rule pattern before your regular expression. Please use Type 0.
- cdn
Rule stringId - The ID of this resource.
- name string
- Rule name
- options
Cdn
Rule Options - Each option in CDN resource settings. Each option added to CDN resource settings should have the following mandatory request fields: enabled, value.
- origin
Group number - ID of the Origins Group. Use one of your Origins Group or create a new one. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- origin
Protocol string - This option defines the protocol that will be used by CDN servers to request content from an origin source. If not specified, it will be inherit from resource. Possible values are: HTTPS, HTTP, MATCH.
- weight number
- Rule weight that determines rule execution order: from the smallest (0) to the highest.
- resource_
id float - rule str
- A pattern that defines when the rule is triggered. By default, we add a leading forward slash to any rule pattern. Specify a pattern without a forward slash.
- rule_
type float - Type of rule. The rule is applied if the requested URI matches the rule pattern. It has two possible values: Type 0 — RegEx. Must start with '^/' or '/'. Type 1 — RegEx. Legacy type. Note that for this rule type we automatically add / to each rule pattern before your regular expression. Please use Type 0.
- cdn_
rule_ strid - The ID of this resource.
- name str
- Rule name
- options
Cdn
Rule Options Args - Each option in CDN resource settings. Each option added to CDN resource settings should have the following mandatory request fields: enabled, value.
- origin_
group float - ID of the Origins Group. Use one of your Origins Group or create a new one. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- origin_
protocol str - This option defines the protocol that will be used by CDN servers to request content from an origin source. If not specified, it will be inherit from resource. Possible values are: HTTPS, HTTP, MATCH.
- weight float
- Rule weight that determines rule execution order: from the smallest (0) to the highest.
- resource
Id Number - rule String
- A pattern that defines when the rule is triggered. By default, we add a leading forward slash to any rule pattern. Specify a pattern without a forward slash.
- rule
Type Number - Type of rule. The rule is applied if the requested URI matches the rule pattern. It has two possible values: Type 0 — RegEx. Must start with '^/' or '/'. Type 1 — RegEx. Legacy type. Note that for this rule type we automatically add / to each rule pattern before your regular expression. Please use Type 0.
- cdn
Rule StringId - The ID of this resource.
- name String
- Rule name
- options Property Map
- Each option in CDN resource settings. Each option added to CDN resource settings should have the following mandatory request fields: enabled, value.
- origin
Group Number - ID of the Origins Group. Use one of your Origins Group or create a new one. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- origin
Protocol String - This option defines the protocol that will be used by CDN servers to request content from an origin source. If not specified, it will be inherit from resource. Possible values are: HTTPS, HTTP, MATCH.
- weight Number
- Rule weight that determines rule execution order: from the smallest (0) to the highest.
Outputs
All input properties are implicitly available as output properties. Additionally, the CdnRule resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing CdnRule Resource
Get an existing CdnRule 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?: CdnRuleState, opts?: CustomResourceOptions): CdnRule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cdn_rule_id: Optional[str] = None,
name: Optional[str] = None,
options: Optional[CdnRuleOptionsArgs] = None,
origin_group: Optional[float] = None,
origin_protocol: Optional[str] = None,
resource_id: Optional[float] = None,
rule: Optional[str] = None,
rule_type: Optional[float] = None,
weight: Optional[float] = None) -> CdnRule
func GetCdnRule(ctx *Context, name string, id IDInput, state *CdnRuleState, opts ...ResourceOption) (*CdnRule, error)
public static CdnRule Get(string name, Input<string> id, CdnRuleState? state, CustomResourceOptions? opts = null)
public static CdnRule get(String name, Output<String> id, CdnRuleState state, CustomResourceOptions options)
resources: _: type: gcorelabs:CdnRule get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Cdn
Rule stringId - The ID of this resource.
- Name string
- Rule name
- Options
Cdn
Rule Options - Each option in CDN resource settings. Each option added to CDN resource settings should have the following mandatory request fields: enabled, value.
- Origin
Group double - ID of the Origins Group. Use one of your Origins Group or create a new one. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- Origin
Protocol string - This option defines the protocol that will be used by CDN servers to request content from an origin source. If not specified, it will be inherit from resource. Possible values are: HTTPS, HTTP, MATCH.
- Resource
Id double - Rule string
- A pattern that defines when the rule is triggered. By default, we add a leading forward slash to any rule pattern. Specify a pattern without a forward slash.
- Rule
Type double - Type of rule. The rule is applied if the requested URI matches the rule pattern. It has two possible values: Type 0 — RegEx. Must start with '^/' or '/'. Type 1 — RegEx. Legacy type. Note that for this rule type we automatically add / to each rule pattern before your regular expression. Please use Type 0.
- Weight double
- Rule weight that determines rule execution order: from the smallest (0) to the highest.
- Cdn
Rule stringId - The ID of this resource.
- Name string
- Rule name
- Options
Cdn
Rule Options Args - Each option in CDN resource settings. Each option added to CDN resource settings should have the following mandatory request fields: enabled, value.
- Origin
Group float64 - ID of the Origins Group. Use one of your Origins Group or create a new one. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- Origin
Protocol string - This option defines the protocol that will be used by CDN servers to request content from an origin source. If not specified, it will be inherit from resource. Possible values are: HTTPS, HTTP, MATCH.
- Resource
Id float64 - Rule string
- A pattern that defines when the rule is triggered. By default, we add a leading forward slash to any rule pattern. Specify a pattern without a forward slash.
- Rule
Type float64 - Type of rule. The rule is applied if the requested URI matches the rule pattern. It has two possible values: Type 0 — RegEx. Must start with '^/' or '/'. Type 1 — RegEx. Legacy type. Note that for this rule type we automatically add / to each rule pattern before your regular expression. Please use Type 0.
- Weight float64
- Rule weight that determines rule execution order: from the smallest (0) to the highest.
- cdn
Rule StringId - The ID of this resource.
- name String
- Rule name
- options
Cdn
Rule Options - Each option in CDN resource settings. Each option added to CDN resource settings should have the following mandatory request fields: enabled, value.
- origin
Group Double - ID of the Origins Group. Use one of your Origins Group or create a new one. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- origin
Protocol String - This option defines the protocol that will be used by CDN servers to request content from an origin source. If not specified, it will be inherit from resource. Possible values are: HTTPS, HTTP, MATCH.
- resource
Id Double - rule String
- A pattern that defines when the rule is triggered. By default, we add a leading forward slash to any rule pattern. Specify a pattern without a forward slash.
- rule
Type Double - Type of rule. The rule is applied if the requested URI matches the rule pattern. It has two possible values: Type 0 — RegEx. Must start with '^/' or '/'. Type 1 — RegEx. Legacy type. Note that for this rule type we automatically add / to each rule pattern before your regular expression. Please use Type 0.
- weight Double
- Rule weight that determines rule execution order: from the smallest (0) to the highest.
- cdn
Rule stringId - The ID of this resource.
- name string
- Rule name
- options
Cdn
Rule Options - Each option in CDN resource settings. Each option added to CDN resource settings should have the following mandatory request fields: enabled, value.
- origin
Group number - ID of the Origins Group. Use one of your Origins Group or create a new one. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- origin
Protocol string - This option defines the protocol that will be used by CDN servers to request content from an origin source. If not specified, it will be inherit from resource. Possible values are: HTTPS, HTTP, MATCH.
- resource
Id number - rule string
- A pattern that defines when the rule is triggered. By default, we add a leading forward slash to any rule pattern. Specify a pattern without a forward slash.
- rule
Type number - Type of rule. The rule is applied if the requested URI matches the rule pattern. It has two possible values: Type 0 — RegEx. Must start with '^/' or '/'. Type 1 — RegEx. Legacy type. Note that for this rule type we automatically add / to each rule pattern before your regular expression. Please use Type 0.
- weight number
- Rule weight that determines rule execution order: from the smallest (0) to the highest.
- cdn_
rule_ strid - The ID of this resource.
- name str
- Rule name
- options
Cdn
Rule Options Args - Each option in CDN resource settings. Each option added to CDN resource settings should have the following mandatory request fields: enabled, value.
- origin_
group float - ID of the Origins Group. Use one of your Origins Group or create a new one. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- origin_
protocol str - This option defines the protocol that will be used by CDN servers to request content from an origin source. If not specified, it will be inherit from resource. Possible values are: HTTPS, HTTP, MATCH.
- resource_
id float - rule str
- A pattern that defines when the rule is triggered. By default, we add a leading forward slash to any rule pattern. Specify a pattern without a forward slash.
- rule_
type float - Type of rule. The rule is applied if the requested URI matches the rule pattern. It has two possible values: Type 0 — RegEx. Must start with '^/' or '/'. Type 1 — RegEx. Legacy type. Note that for this rule type we automatically add / to each rule pattern before your regular expression. Please use Type 0.
- weight float
- Rule weight that determines rule execution order: from the smallest (0) to the highest.
- cdn
Rule StringId - The ID of this resource.
- name String
- Rule name
- options Property Map
- Each option in CDN resource settings. Each option added to CDN resource settings should have the following mandatory request fields: enabled, value.
- origin
Group Number - ID of the Origins Group. Use one of your Origins Group or create a new one. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- origin
Protocol String - This option defines the protocol that will be used by CDN servers to request content from an origin source. If not specified, it will be inherit from resource. Possible values are: HTTPS, HTTP, MATCH.
- resource
Id Number - rule String
- A pattern that defines when the rule is triggered. By default, we add a leading forward slash to any rule pattern. Specify a pattern without a forward slash.
- rule
Type Number - Type of rule. The rule is applied if the requested URI matches the rule pattern. It has two possible values: Type 0 — RegEx. Must start with '^/' or '/'. Type 1 — RegEx. Legacy type. Note that for this rule type we automatically add / to each rule pattern before your regular expression. Please use Type 0.
- weight Number
- Rule weight that determines rule execution order: from the smallest (0) to the highest.
Supporting Types
CdnRuleOptions, CdnRuleOptionsArgs
- Browser
Cache CdnSettings Rule Options Browser Cache Settings - Cors
Cdn
Rule Options Cors - Edge
Cache CdnSettings Rule Options Edge Cache Settings - The cache expiration time for CDN servers.
- Gzip
On CdnRule Options Gzip On - Host
Header CdnRule Options Host Header - Specify the Host header that CDN servers use when request content from an origin server. Your server must be able to process requests with the chosen header. If the option is in NULL state Host Header value is taken from the CNAME field.
- Ignore
Query CdnString Rule Options Ignore Query String - Query
Params CdnBlacklist Rule Options Query Params Blacklist - Query
Params CdnWhitelist Rule Options Query Params Whitelist - Redirect
Http CdnTo Https Rule Options Redirect Http To Https - Sets redirect from HTTP protocol to HTTPS for all resource requests.
- Rewrite
Cdn
Rule Options Rewrite - Sni
Cdn
Rule Options Sni - Static
Headers CdnRule Options Static Headers - Static
Request CdnHeaders Rule Options Static Request Headers - Tls
Versions CdnRule Options Tls Versions - Webp
Cdn
Rule Options Webp - Websockets
Cdn
Rule Options Websockets
- Browser
Cache CdnSettings Rule Options Browser Cache Settings - Cors
Cdn
Rule Options Cors - Edge
Cache CdnSettings Rule Options Edge Cache Settings - The cache expiration time for CDN servers.
- Gzip
On CdnRule Options Gzip On - Host
Header CdnRule Options Host Header - Specify the Host header that CDN servers use when request content from an origin server. Your server must be able to process requests with the chosen header. If the option is in NULL state Host Header value is taken from the CNAME field.
- Ignore
Query CdnString Rule Options Ignore Query String - Query
Params CdnBlacklist Rule Options Query Params Blacklist - Query
Params CdnWhitelist Rule Options Query Params Whitelist - Redirect
Http CdnTo Https Rule Options Redirect Http To Https - Sets redirect from HTTP protocol to HTTPS for all resource requests.
- Rewrite
Cdn
Rule Options Rewrite - Sni
Cdn
Rule Options Sni - Static
Headers CdnRule Options Static Headers - Static
Request CdnHeaders Rule Options Static Request Headers - Tls
Versions CdnRule Options Tls Versions - Webp
Cdn
Rule Options Webp - Websockets
Cdn
Rule Options Websockets
- browser
Cache CdnSettings Rule Options Browser Cache Settings - cors
Cdn
Rule Options Cors - edge
Cache CdnSettings Rule Options Edge Cache Settings - The cache expiration time for CDN servers.
- gzip
On CdnRule Options Gzip On - host
Header CdnRule Options Host Header - Specify the Host header that CDN servers use when request content from an origin server. Your server must be able to process requests with the chosen header. If the option is in NULL state Host Header value is taken from the CNAME field.
- ignore
Query CdnString Rule Options Ignore Query String - query
Params CdnBlacklist Rule Options Query Params Blacklist - query
Params CdnWhitelist Rule Options Query Params Whitelist - redirect
Http CdnTo Https Rule Options Redirect Http To Https - Sets redirect from HTTP protocol to HTTPS for all resource requests.
- rewrite
Cdn
Rule Options Rewrite - sni
Cdn
Rule Options Sni - static
Headers CdnRule Options Static Headers - static
Request CdnHeaders Rule Options Static Request Headers - tls
Versions CdnRule Options Tls Versions - webp
Cdn
Rule Options Webp - websockets
Cdn
Rule Options Websockets
- browser
Cache CdnSettings Rule Options Browser Cache Settings - cors
Cdn
Rule Options Cors - edge
Cache CdnSettings Rule Options Edge Cache Settings - The cache expiration time for CDN servers.
- gzip
On CdnRule Options Gzip On - host
Header CdnRule Options Host Header - Specify the Host header that CDN servers use when request content from an origin server. Your server must be able to process requests with the chosen header. If the option is in NULL state Host Header value is taken from the CNAME field.
- ignore
Query CdnString Rule Options Ignore Query String - query
Params CdnBlacklist Rule Options Query Params Blacklist - query
Params CdnWhitelist Rule Options Query Params Whitelist - redirect
Http CdnTo Https Rule Options Redirect Http To Https - Sets redirect from HTTP protocol to HTTPS for all resource requests.
- rewrite
Cdn
Rule Options Rewrite - sni
Cdn
Rule Options Sni - static
Headers CdnRule Options Static Headers - static
Request CdnHeaders Rule Options Static Request Headers - tls
Versions CdnRule Options Tls Versions - webp
Cdn
Rule Options Webp - websockets
Cdn
Rule Options Websockets
- browser_
cache_ Cdnsettings Rule Options Browser Cache Settings - cors
Cdn
Rule Options Cors - edge_
cache_ Cdnsettings Rule Options Edge Cache Settings - The cache expiration time for CDN servers.
- gzip_
on CdnRule Options Gzip On - host_
header CdnRule Options Host Header - Specify the Host header that CDN servers use when request content from an origin server. Your server must be able to process requests with the chosen header. If the option is in NULL state Host Header value is taken from the CNAME field.
- ignore_
query_ Cdnstring Rule Options Ignore Query String - query_
params_ Cdnblacklist Rule Options Query Params Blacklist - query_
params_ Cdnwhitelist Rule Options Query Params Whitelist - redirect_
http_ Cdnto_ https Rule Options Redirect Http To Https - Sets redirect from HTTP protocol to HTTPS for all resource requests.
- rewrite
Cdn
Rule Options Rewrite - sni
Cdn
Rule Options Sni - static_
headers CdnRule Options Static Headers - static_
request_ Cdnheaders Rule Options Static Request Headers - tls_
versions CdnRule Options Tls Versions - webp
Cdn
Rule Options Webp - websockets
Cdn
Rule Options Websockets
- browser
Cache Property MapSettings - cors Property Map
- edge
Cache Property MapSettings - The cache expiration time for CDN servers.
- gzip
On Property Map - host
Header Property Map - Specify the Host header that CDN servers use when request content from an origin server. Your server must be able to process requests with the chosen header. If the option is in NULL state Host Header value is taken from the CNAME field.
- ignore
Query Property MapString - query
Params Property MapBlacklist - query
Params Property MapWhitelist - redirect
Http Property MapTo Https - Sets redirect from HTTP protocol to HTTPS for all resource requests.
- rewrite Property Map
- sni Property Map
- static
Headers Property Map - static
Request Property MapHeaders - tls
Versions Property Map - webp Property Map
- websockets Property Map
CdnRuleOptionsBrowserCacheSettings, CdnRuleOptionsBrowserCacheSettingsArgs
CdnRuleOptionsCors, CdnRuleOptionsCorsArgs
CdnRuleOptionsEdgeCacheSettings, CdnRuleOptionsEdgeCacheSettingsArgs
- Custom
Values Dictionary<string, string> - Caching time for a response with specific codes. These settings have a higher priority than the value field. Response code ('304', '404' for example). Use 'any' to specify caching time for all response codes. Caching time in seconds ('0s', '600s' for example). Use '0s' to disable caching for a specific response code.
- Default string
- Content will be cached according to origin cache settings. The value applies for a response with codes 200, 201, 204, 206, 301, 302, 303, 304, 307, 308 if an origin server does not have caching HTTP headers. Responses with other codes will not be cached.
- Enabled bool
- Value string
- Caching time for a response with codes 200, 206, 301, 302. Responses with codes 4xx, 5xx will not be cached. Use '0s' disable to caching. Use custom_values field to specify a custom caching time for a response with specific codes.
- Custom
Values map[string]string - Caching time for a response with specific codes. These settings have a higher priority than the value field. Response code ('304', '404' for example). Use 'any' to specify caching time for all response codes. Caching time in seconds ('0s', '600s' for example). Use '0s' to disable caching for a specific response code.
- Default string
- Content will be cached according to origin cache settings. The value applies for a response with codes 200, 201, 204, 206, 301, 302, 303, 304, 307, 308 if an origin server does not have caching HTTP headers. Responses with other codes will not be cached.
- Enabled bool
- Value string
- Caching time for a response with codes 200, 206, 301, 302. Responses with codes 4xx, 5xx will not be cached. Use '0s' disable to caching. Use custom_values field to specify a custom caching time for a response with specific codes.
- custom
Values Map<String,String> - Caching time for a response with specific codes. These settings have a higher priority than the value field. Response code ('304', '404' for example). Use 'any' to specify caching time for all response codes. Caching time in seconds ('0s', '600s' for example). Use '0s' to disable caching for a specific response code.
- default_ String
- Content will be cached according to origin cache settings. The value applies for a response with codes 200, 201, 204, 206, 301, 302, 303, 304, 307, 308 if an origin server does not have caching HTTP headers. Responses with other codes will not be cached.
- enabled Boolean
- value String
- Caching time for a response with codes 200, 206, 301, 302. Responses with codes 4xx, 5xx will not be cached. Use '0s' disable to caching. Use custom_values field to specify a custom caching time for a response with specific codes.
- custom
Values {[key: string]: string} - Caching time for a response with specific codes. These settings have a higher priority than the value field. Response code ('304', '404' for example). Use 'any' to specify caching time for all response codes. Caching time in seconds ('0s', '600s' for example). Use '0s' to disable caching for a specific response code.
- default string
- Content will be cached according to origin cache settings. The value applies for a response with codes 200, 201, 204, 206, 301, 302, 303, 304, 307, 308 if an origin server does not have caching HTTP headers. Responses with other codes will not be cached.
- enabled boolean
- value string
- Caching time for a response with codes 200, 206, 301, 302. Responses with codes 4xx, 5xx will not be cached. Use '0s' disable to caching. Use custom_values field to specify a custom caching time for a response with specific codes.
- custom_
values Mapping[str, str] - Caching time for a response with specific codes. These settings have a higher priority than the value field. Response code ('304', '404' for example). Use 'any' to specify caching time for all response codes. Caching time in seconds ('0s', '600s' for example). Use '0s' to disable caching for a specific response code.
- default str
- Content will be cached according to origin cache settings. The value applies for a response with codes 200, 201, 204, 206, 301, 302, 303, 304, 307, 308 if an origin server does not have caching HTTP headers. Responses with other codes will not be cached.
- enabled bool
- value str
- Caching time for a response with codes 200, 206, 301, 302. Responses with codes 4xx, 5xx will not be cached. Use '0s' disable to caching. Use custom_values field to specify a custom caching time for a response with specific codes.
- custom
Values Map<String> - Caching time for a response with specific codes. These settings have a higher priority than the value field. Response code ('304', '404' for example). Use 'any' to specify caching time for all response codes. Caching time in seconds ('0s', '600s' for example). Use '0s' to disable caching for a specific response code.
- default String
- Content will be cached according to origin cache settings. The value applies for a response with codes 200, 201, 204, 206, 301, 302, 303, 304, 307, 308 if an origin server does not have caching HTTP headers. Responses with other codes will not be cached.
- enabled Boolean
- value String
- Caching time for a response with codes 200, 206, 301, 302. Responses with codes 4xx, 5xx will not be cached. Use '0s' disable to caching. Use custom_values field to specify a custom caching time for a response with specific codes.
CdnRuleOptionsGzipOn, CdnRuleOptionsGzipOnArgs
CdnRuleOptionsHostHeader, CdnRuleOptionsHostHeaderArgs
CdnRuleOptionsIgnoreQueryString, CdnRuleOptionsIgnoreQueryStringArgs
CdnRuleOptionsQueryParamsBlacklist, CdnRuleOptionsQueryParamsBlacklistArgs
CdnRuleOptionsQueryParamsWhitelist, CdnRuleOptionsQueryParamsWhitelistArgs
CdnRuleOptionsRedirectHttpToHttps, CdnRuleOptionsRedirectHttpToHttpsArgs
CdnRuleOptionsRewrite, CdnRuleOptionsRewriteArgs
CdnRuleOptionsSni, CdnRuleOptionsSniArgs
- Custom
Hostname string - Required to set custom hostname in case sni-type='custom'
- Enabled bool
- Sni
Type string - Available values 'dynamic' or 'custom'
- Custom
Hostname string - Required to set custom hostname in case sni-type='custom'
- Enabled bool
- Sni
Type string - Available values 'dynamic' or 'custom'
- custom
Hostname String - Required to set custom hostname in case sni-type='custom'
- enabled Boolean
- sni
Type String - Available values 'dynamic' or 'custom'
- custom
Hostname string - Required to set custom hostname in case sni-type='custom'
- enabled boolean
- sni
Type string - Available values 'dynamic' or 'custom'
- custom_
hostname str - Required to set custom hostname in case sni-type='custom'
- enabled bool
- sni_
type str - Available values 'dynamic' or 'custom'
- custom
Hostname String - Required to set custom hostname in case sni-type='custom'
- enabled Boolean
- sni
Type String - Available values 'dynamic' or 'custom'
CdnRuleOptionsStaticHeaders, CdnRuleOptionsStaticHeadersArgs
CdnRuleOptionsStaticRequestHeaders, CdnRuleOptionsStaticRequestHeadersArgs
CdnRuleOptionsTlsVersions, CdnRuleOptionsTlsVersionsArgs
CdnRuleOptionsWebp, CdnRuleOptionsWebpArgs
- Jpg
Quality double - Png
Quality double - Enabled bool
- Png
Lossless bool
- Jpg
Quality float64 - Png
Quality float64 - Enabled bool
- Png
Lossless bool
- jpg
Quality Double - png
Quality Double - enabled Boolean
- png
Lossless Boolean
- jpg
Quality number - png
Quality number - enabled boolean
- png
Lossless boolean
- jpg_
quality float - png_
quality float - enabled bool
- png_
lossless bool
- jpg
Quality Number - png
Quality Number - enabled Boolean
- png
Lossless Boolean
CdnRuleOptionsWebsockets, CdnRuleOptionsWebsocketsArgs
Package Details
- Repository
- gcorelabs g-core/terraform-provider-gcorelabs
- License
- Notes
- This Pulumi package is based on the
gcorelabs
Terraform Provider.