1. Registry
  2. Packages
  3. Cloudflare Provider
  4. API Docs
  5. getSnippetRules
Viewing docs for Cloudflare v6.19.0
published on Thursday, Aug 6, 2026 by Pulumi
cloudflare logo cloudflare logo
Viewing docs for Cloudflare v6.19.0
published on Thursday, Aug 6, 2026 by Pulumi

    Accepted Permissions

    • Snippets Read
    • Snippets Write

    Using getSnippetRules

    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 getSnippetRules(args: GetSnippetRulesArgs, opts?: InvokeOptions): Promise<GetSnippetRulesResult>
    function getSnippetRulesOutput(args: GetSnippetRulesOutputArgs, opts?: InvokeOutputOptions): Output<GetSnippetRulesResult>
    def get_snippet_rules(zone_id: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetSnippetRulesResult
    def get_snippet_rules_output(zone_id: pulumi.Input[Optional[str]] = None,
                          opts: Optional[InvokeOutputOptions] = None) -> Output[GetSnippetRulesResult]
    func LookupSnippetRules(ctx *Context, args *LookupSnippetRulesArgs, opts ...InvokeOption) (*LookupSnippetRulesResult, error)
    func LookupSnippetRulesOutput(ctx *Context, args *LookupSnippetRulesOutputArgs, opts ...InvokeOption) LookupSnippetRulesResultOutput

    > Note: This function is named LookupSnippetRules in the Go SDK.

    public static class GetSnippetRules 
    {
        public static Task<GetSnippetRulesResult> InvokeAsync(GetSnippetRulesArgs args, InvokeOptions? opts = null)
        public static Output<GetSnippetRulesResult> Invoke(GetSnippetRulesInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetSnippetRulesResult> Invoke(GetSnippetRulesInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetSnippetRulesResult> getSnippetRules(GetSnippetRulesArgs args, InvokeOptions options)
    public static Output<GetSnippetRulesResult> getSnippetRules(GetSnippetRulesArgs args, InvokeOptions options)
    public static Output<GetSnippetRulesResult> getSnippetRules(GetSnippetRulesArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: cloudflare:index/getSnippetRules:getSnippetRules
      arguments:
        # arguments dictionary
    data "cloudflare_get_snippet_rules" "name" {
        # arguments
    }

    The following arguments are supported:

    ZoneId string
    Use this field to specify the unique ID of the zone.
    ZoneId string
    Use this field to specify the unique ID of the zone.
    zone_id string
    Use this field to specify the unique ID of the zone.
    zoneId String
    Use this field to specify the unique ID of the zone.
    zoneId string
    Use this field to specify the unique ID of the zone.
    zone_id str
    Use this field to specify the unique ID of the zone.
    zoneId String
    Use this field to specify the unique ID of the zone.

    getSnippetRules Result

    The following output properties are available:

    Id string
    Use this field to specify the unique ID of the zone.
    ZoneId string
    Use this field to specify the unique ID of the zone.
    Id string
    Use this field to specify the unique ID of the zone.
    ZoneId string
    Use this field to specify the unique ID of the zone.
    id string
    Use this field to specify the unique ID of the zone.
    zone_id string
    Use this field to specify the unique ID of the zone.
    id String
    Use this field to specify the unique ID of the zone.
    zoneId String
    Use this field to specify the unique ID of the zone.
    id string
    Use this field to specify the unique ID of the zone.
    zoneId string
    Use this field to specify the unique ID of the zone.
    id str
    Use this field to specify the unique ID of the zone.
    zone_id str
    Use this field to specify the unique ID of the zone.
    id String
    Use this field to specify the unique ID of the zone.
    zoneId String
    Use this field to specify the unique ID of the zone.

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo cloudflare logo
    Viewing docs for Cloudflare v6.19.0
    published on Thursday, Aug 6, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial