Viewing docs for Cloudflare v6.23.1
published on Wednesday, Oct 21, 2026 by Pulumi
published on Wednesday, Oct 21, 2026 by Pulumi
Viewing docs for Cloudflare v6.23.1
published on Wednesday, Oct 21, 2026 by Pulumi
published on Wednesday, Oct 21, 2026 by Pulumi
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleMonetizationRules = cloudflare.getMonetizationRules({
zoneId: "9f1839b6152d298aca64c4e906b6d074",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_monetization_rules = cloudflare.get_monetization_rules(zone_id="9f1839b6152d298aca64c4e906b6d074")
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudflare.GetMonetizationRules(ctx, &cloudflare.LookupMonetizationRulesArgs{
ZoneId: "9f1839b6152d298aca64c4e906b6d074",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var exampleMonetizationRules = Cloudflare.GetMonetizationRules.Invoke(new()
{
ZoneId = "9f1839b6152d298aca64c4e906b6d074",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.CloudflareFunctions;
import com.pulumi.cloudflare.inputs.GetMonetizationRulesArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var exampleMonetizationRules = CloudflareFunctions.getMonetizationRules(GetMonetizationRulesArgs.builder()
.zoneId("9f1839b6152d298aca64c4e906b6d074")
.build());
}
}
variables:
exampleMonetizationRules:
fn::invoke:
function: cloudflare:getMonetizationRules
arguments:
zoneId: 9f1839b6152d298aca64c4e906b6d074
terraform {
required_providers {
cloudflare = {
source = "pulumi/cloudflare"
}
}
}
data "cloudflare_monetization_rules" "exampleMonetizationRules" {
zone_id = "9f1839b6152d298aca64c4e906b6d074"
}
Using getMonetizationRules
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getMonetizationRules(args: GetMonetizationRulesArgs, opts?: InvokeOptions): Promise<GetMonetizationRulesResult>
function getMonetizationRulesOutput(args: GetMonetizationRulesOutputArgs, opts?: InvokeOutputOptions): Output<GetMonetizationRulesResult>def get_monetization_rules(zone_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetMonetizationRulesResult
def get_monetization_rules_output(zone_id: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetMonetizationRulesResult]func LookupMonetizationRules(ctx *Context, args *LookupMonetizationRulesArgs, opts ...InvokeOption) (*LookupMonetizationRulesResult, error)
func LookupMonetizationRulesOutput(ctx *Context, args *LookupMonetizationRulesOutputArgs, opts ...InvokeOption) LookupMonetizationRulesResultOutput> Note: This function is named LookupMonetizationRules in the Go SDK.
public static class GetMonetizationRules
{
public static Task<GetMonetizationRulesResult> InvokeAsync(GetMonetizationRulesArgs args, InvokeOptions? opts = null)
public static Output<GetMonetizationRulesResult> Invoke(GetMonetizationRulesInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetMonetizationRulesResult> Invoke(GetMonetizationRulesInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetMonetizationRulesResult> getMonetizationRules(GetMonetizationRulesArgs args, InvokeOptions options)
public static Output<GetMonetizationRulesResult> getMonetizationRules(GetMonetizationRulesArgs args, InvokeOptions options)
public static Output<GetMonetizationRulesResult> getMonetizationRules(GetMonetizationRulesArgs args, InvokeOutputOptions options)
fn::invoke:
function: cloudflare:index/getMonetizationRules:getMonetizationRules
arguments:
# arguments dictionarydata "cloudflare_get_monetization_rules" "name" {
# arguments
}The following arguments are supported:
- Zone
Id string - The unique ID of the zone.
- Zone
Id string - The unique ID of the zone.
- zone_
id string - The unique ID of the zone.
- zone
Id String - The unique ID of the zone.
- zone
Id string - The unique ID of the zone.
- zone_
id str - The unique ID of the zone.
- zone
Id String - The unique ID of the zone.
getMonetizationRules Result
The following output properties are available:
- Id string
- The unique ID of the zone.
- Rules
List<Get
Monetization Rules Rule> - The zone's payment rules, in the order they are evaluated. Empty when the zone has no payment rules.
- Zone
Id string - The unique ID of the zone.
- Id string
- The unique ID of the zone.
- Rules
[]Get
Monetization Rules Rule - The zone's payment rules, in the order they are evaluated. Empty when the zone has no payment rules.
- Zone
Id string - The unique ID of the zone.
- id string
- The unique ID of the zone.
- rules list(object)
- The zone's payment rules, in the order they are evaluated. Empty when the zone has no payment rules.
- zone_
id string - The unique ID of the zone.
- id String
- The unique ID of the zone.
- rules
List<Get
Monetization Rules Rule> - The zone's payment rules, in the order they are evaluated. Empty when the zone has no payment rules.
- zone
Id String - The unique ID of the zone.
- id string
- The unique ID of the zone.
- rules
Get
Monetization Rules Rule[] - The zone's payment rules, in the order they are evaluated. Empty when the zone has no payment rules.
- zone
Id string - The unique ID of the zone.
- id str
- The unique ID of the zone.
- rules
Sequence[Get
Monetization Rules Rule] - The zone's payment rules, in the order they are evaluated. Empty when the zone has no payment rules.
- zone_
id str - The unique ID of the zone.
- id String
- The unique ID of the zone.
- rules List<Property Map>
- The zone's payment rules, in the order they are evaluated. Empty when the zone has no payment rules.
- zone
Id String - The unique ID of the zone.
Supporting Types
GetMonetizationRulesRule
- Address string
- 0x-prefixed 20-byte hexadecimal Ethereum address. Mixed-case addresses must carry a valid EIP-55 checksum; all-lowercase or all-uppercase addresses are also accepted. The address must pass wallet screening whenever its rule is deployed or patched.
- Description string
- Enabled bool
- Expression string
- Wirefilter expression identifying the requests that require payment. Forwarded verbatim to the Rulesets API, which validates its syntax.
- Id string
- The server-assigned unique ID of the payment rule. Stable across full-ruleset replacements.
- Price string
- Price in the smallest indivisible unit of the configured payment token, encoded as a decimal string. Must be a canonical decimal integer in [1000, 100000000]: no leading zeros, and a bare JSON number is rejected. The price is required for the fixed-price schemes ("exact" and "upto") and must be at least 1000, the smallest amount the payment facilitator can settle ($0.001 for a 6-decimal token such as USDC), and at most 100000000 ($100 for a 6-decimal token). When the scheme is "origincontrolled" the origin server sets pricing dynamically and the rule carries no price: the field must be omitted — any provided value, including "0", is rejected because it would not be enforced. Responses always encode this as a string and omit it for "origincontrolled" rules; the pattern matches exactly the set of values the server accepts.
- Scheme string
- X402 payment scheme. "exact" requires the specified payment amount; "upto" permits a payment up to the specified amount. Both fixed-price schemes require the price field. Available values: "exact", "upto", "originControlled".
- Address string
- 0x-prefixed 20-byte hexadecimal Ethereum address. Mixed-case addresses must carry a valid EIP-55 checksum; all-lowercase or all-uppercase addresses are also accepted. The address must pass wallet screening whenever its rule is deployed or patched.
- Description string
- Enabled bool
- Expression string
- Wirefilter expression identifying the requests that require payment. Forwarded verbatim to the Rulesets API, which validates its syntax.
- Id string
- The server-assigned unique ID of the payment rule. Stable across full-ruleset replacements.
- Price string
- Price in the smallest indivisible unit of the configured payment token, encoded as a decimal string. Must be a canonical decimal integer in [1000, 100000000]: no leading zeros, and a bare JSON number is rejected. The price is required for the fixed-price schemes ("exact" and "upto") and must be at least 1000, the smallest amount the payment facilitator can settle ($0.001 for a 6-decimal token such as USDC), and at most 100000000 ($100 for a 6-decimal token). When the scheme is "origincontrolled" the origin server sets pricing dynamically and the rule carries no price: the field must be omitted — any provided value, including "0", is rejected because it would not be enforced. Responses always encode this as a string and omit it for "origincontrolled" rules; the pattern matches exactly the set of values the server accepts.
- Scheme string
- X402 payment scheme. "exact" requires the specified payment amount; "upto" permits a payment up to the specified amount. Both fixed-price schemes require the price field. Available values: "exact", "upto", "originControlled".
- address string
- 0x-prefixed 20-byte hexadecimal Ethereum address. Mixed-case addresses must carry a valid EIP-55 checksum; all-lowercase or all-uppercase addresses are also accepted. The address must pass wallet screening whenever its rule is deployed or patched.
- description string
- enabled bool
- expression string
- Wirefilter expression identifying the requests that require payment. Forwarded verbatim to the Rulesets API, which validates its syntax.
- id string
- The server-assigned unique ID of the payment rule. Stable across full-ruleset replacements.
- price string
- Price in the smallest indivisible unit of the configured payment token, encoded as a decimal string. Must be a canonical decimal integer in [1000, 100000000]: no leading zeros, and a bare JSON number is rejected. The price is required for the fixed-price schemes ("exact" and "upto") and must be at least 1000, the smallest amount the payment facilitator can settle ($0.001 for a 6-decimal token such as USDC), and at most 100000000 ($100 for a 6-decimal token). When the scheme is "origincontrolled" the origin server sets pricing dynamically and the rule carries no price: the field must be omitted — any provided value, including "0", is rejected because it would not be enforced. Responses always encode this as a string and omit it for "origincontrolled" rules; the pattern matches exactly the set of values the server accepts.
- scheme string
- X402 payment scheme. "exact" requires the specified payment amount; "upto" permits a payment up to the specified amount. Both fixed-price schemes require the price field. Available values: "exact", "upto", "originControlled".
- address String
- 0x-prefixed 20-byte hexadecimal Ethereum address. Mixed-case addresses must carry a valid EIP-55 checksum; all-lowercase or all-uppercase addresses are also accepted. The address must pass wallet screening whenever its rule is deployed or patched.
- description String
- enabled Boolean
- expression String
- Wirefilter expression identifying the requests that require payment. Forwarded verbatim to the Rulesets API, which validates its syntax.
- id String
- The server-assigned unique ID of the payment rule. Stable across full-ruleset replacements.
- price String
- Price in the smallest indivisible unit of the configured payment token, encoded as a decimal string. Must be a canonical decimal integer in [1000, 100000000]: no leading zeros, and a bare JSON number is rejected. The price is required for the fixed-price schemes ("exact" and "upto") and must be at least 1000, the smallest amount the payment facilitator can settle ($0.001 for a 6-decimal token such as USDC), and at most 100000000 ($100 for a 6-decimal token). When the scheme is "origincontrolled" the origin server sets pricing dynamically and the rule carries no price: the field must be omitted — any provided value, including "0", is rejected because it would not be enforced. Responses always encode this as a string and omit it for "origincontrolled" rules; the pattern matches exactly the set of values the server accepts.
- scheme String
- X402 payment scheme. "exact" requires the specified payment amount; "upto" permits a payment up to the specified amount. Both fixed-price schemes require the price field. Available values: "exact", "upto", "originControlled".
- address string
- 0x-prefixed 20-byte hexadecimal Ethereum address. Mixed-case addresses must carry a valid EIP-55 checksum; all-lowercase or all-uppercase addresses are also accepted. The address must pass wallet screening whenever its rule is deployed or patched.
- description string
- enabled boolean
- expression string
- Wirefilter expression identifying the requests that require payment. Forwarded verbatim to the Rulesets API, which validates its syntax.
- id string
- The server-assigned unique ID of the payment rule. Stable across full-ruleset replacements.
- price string
- Price in the smallest indivisible unit of the configured payment token, encoded as a decimal string. Must be a canonical decimal integer in [1000, 100000000]: no leading zeros, and a bare JSON number is rejected. The price is required for the fixed-price schemes ("exact" and "upto") and must be at least 1000, the smallest amount the payment facilitator can settle ($0.001 for a 6-decimal token such as USDC), and at most 100000000 ($100 for a 6-decimal token). When the scheme is "origincontrolled" the origin server sets pricing dynamically and the rule carries no price: the field must be omitted — any provided value, including "0", is rejected because it would not be enforced. Responses always encode this as a string and omit it for "origincontrolled" rules; the pattern matches exactly the set of values the server accepts.
- scheme string
- X402 payment scheme. "exact" requires the specified payment amount; "upto" permits a payment up to the specified amount. Both fixed-price schemes require the price field. Available values: "exact", "upto", "originControlled".
- address str
- 0x-prefixed 20-byte hexadecimal Ethereum address. Mixed-case addresses must carry a valid EIP-55 checksum; all-lowercase or all-uppercase addresses are also accepted. The address must pass wallet screening whenever its rule is deployed or patched.
- description str
- enabled bool
- expression str
- Wirefilter expression identifying the requests that require payment. Forwarded verbatim to the Rulesets API, which validates its syntax.
- id str
- The server-assigned unique ID of the payment rule. Stable across full-ruleset replacements.
- price str
- Price in the smallest indivisible unit of the configured payment token, encoded as a decimal string. Must be a canonical decimal integer in [1000, 100000000]: no leading zeros, and a bare JSON number is rejected. The price is required for the fixed-price schemes ("exact" and "upto") and must be at least 1000, the smallest amount the payment facilitator can settle ($0.001 for a 6-decimal token such as USDC), and at most 100000000 ($100 for a 6-decimal token). When the scheme is "origincontrolled" the origin server sets pricing dynamically and the rule carries no price: the field must be omitted — any provided value, including "0", is rejected because it would not be enforced. Responses always encode this as a string and omit it for "origincontrolled" rules; the pattern matches exactly the set of values the server accepts.
- scheme str
- X402 payment scheme. "exact" requires the specified payment amount; "upto" permits a payment up to the specified amount. Both fixed-price schemes require the price field. Available values: "exact", "upto", "originControlled".
- address String
- 0x-prefixed 20-byte hexadecimal Ethereum address. Mixed-case addresses must carry a valid EIP-55 checksum; all-lowercase or all-uppercase addresses are also accepted. The address must pass wallet screening whenever its rule is deployed or patched.
- description String
- enabled Boolean
- expression String
- Wirefilter expression identifying the requests that require payment. Forwarded verbatim to the Rulesets API, which validates its syntax.
- id String
- The server-assigned unique ID of the payment rule. Stable across full-ruleset replacements.
- price String
- Price in the smallest indivisible unit of the configured payment token, encoded as a decimal string. Must be a canonical decimal integer in [1000, 100000000]: no leading zeros, and a bare JSON number is rejected. The price is required for the fixed-price schemes ("exact" and "upto") and must be at least 1000, the smallest amount the payment facilitator can settle ($0.001 for a 6-decimal token such as USDC), and at most 100000000 ($100 for a 6-decimal token). When the scheme is "origincontrolled" the origin server sets pricing dynamically and the rule carries no price: the field must be omitted — any provided value, including "0", is rejected because it would not be enforced. Responses always encode this as a string and omit it for "origincontrolled" rules; the pattern matches exactly the set of values the server accepts.
- scheme String
- X402 payment scheme. "exact" requires the specified payment amount; "upto" permits a payment up to the specified amount. Both fixed-price schemes require the price field. Available values: "exact", "upto", "originControlled".
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflareTerraform Provider.
Viewing docs for Cloudflare v6.23.1
published on Wednesday, Oct 21, 2026 by Pulumi
published on Wednesday, Oct 21, 2026 by Pulumi