1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. getApiShieldDiscoveryOperations
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

cloudflare.getApiShieldDiscoveryOperations

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleApiShieldDiscoveryOperations = cloudflare.getApiShieldDiscoveryOperations({
        zoneId: "023e105f4ecef8ad9ca31a8372d0c353",
        diff: true,
        direction: "desc",
        endpoint: "/api/v1",
        hosts: ["api.cloudflare.com"],
        methods: ["GET"],
        order: "method",
        origin: "ML",
        state: "review",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_api_shield_discovery_operations = cloudflare.get_api_shield_discovery_operations(zone_id="023e105f4ecef8ad9ca31a8372d0c353",
        diff=True,
        direction="desc",
        endpoint="/api/v1",
        hosts=["api.cloudflare.com"],
        methods=["GET"],
        order="method",
        origin="ML",
        state="review")
    
    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.LookupApiShieldDiscoveryOperations(ctx, &cloudflare.LookupApiShieldDiscoveryOperationsArgs{
    			ZoneId:    "023e105f4ecef8ad9ca31a8372d0c353",
    			Diff:      pulumi.BoolRef(true),
    			Direction: pulumi.StringRef("desc"),
    			Endpoint:  pulumi.StringRef("/api/v1"),
    			Hosts: []string{
    				"api.cloudflare.com",
    			},
    			Methods: []string{
    				"GET",
    			},
    			Order:  pulumi.StringRef("method"),
    			Origin: pulumi.StringRef("ML"),
    			State:  pulumi.StringRef("review"),
    		}, 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 exampleApiShieldDiscoveryOperations = Cloudflare.GetApiShieldDiscoveryOperations.Invoke(new()
        {
            ZoneId = "023e105f4ecef8ad9ca31a8372d0c353",
            Diff = true,
            Direction = "desc",
            Endpoint = "/api/v1",
            Hosts = new[]
            {
                "api.cloudflare.com",
            },
            Methods = new[]
            {
                "GET",
            },
            Order = "method",
            Origin = "ML",
            State = "review",
        });
    
    });
    
    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.GetApiShieldDiscoveryOperationsArgs;
    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) {
            final var exampleApiShieldDiscoveryOperations = CloudflareFunctions.getApiShieldDiscoveryOperations(GetApiShieldDiscoveryOperationsArgs.builder()
                .zoneId("023e105f4ecef8ad9ca31a8372d0c353")
                .diff(true)
                .direction("desc")
                .endpoint("/api/v1")
                .hosts("api.cloudflare.com")
                .methods("GET")
                .order("method")
                .origin("ML")
                .state("review")
                .build());
    
        }
    }
    
    variables:
      exampleApiShieldDiscoveryOperations:
        fn::invoke:
          function: cloudflare:getApiShieldDiscoveryOperations
          arguments:
            zoneId: 023e105f4ecef8ad9ca31a8372d0c353
            diff: true
            direction: desc
            endpoint: /api/v1
            hosts:
              - api.cloudflare.com
            methods:
              - GET
            order: method
            origin: ML
            state: review
    

    Using getApiShieldDiscoveryOperations

    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 getApiShieldDiscoveryOperations(args: GetApiShieldDiscoveryOperationsArgs, opts?: InvokeOptions): Promise<GetApiShieldDiscoveryOperationsResult>
    function getApiShieldDiscoveryOperationsOutput(args: GetApiShieldDiscoveryOperationsOutputArgs, opts?: InvokeOptions): Output<GetApiShieldDiscoveryOperationsResult>
    def get_api_shield_discovery_operations(diff: Optional[bool] = None,
                                            direction: Optional[str] = None,
                                            endpoint: Optional[str] = None,
                                            hosts: Optional[Sequence[str]] = None,
                                            max_items: Optional[int] = None,
                                            methods: Optional[Sequence[str]] = None,
                                            order: Optional[str] = None,
                                            origin: Optional[str] = None,
                                            state: Optional[str] = None,
                                            zone_id: Optional[str] = None,
                                            opts: Optional[InvokeOptions] = None) -> GetApiShieldDiscoveryOperationsResult
    def get_api_shield_discovery_operations_output(diff: Optional[pulumi.Input[bool]] = None,
                                            direction: Optional[pulumi.Input[str]] = None,
                                            endpoint: Optional[pulumi.Input[str]] = None,
                                            hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                            max_items: Optional[pulumi.Input[int]] = None,
                                            methods: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                            order: Optional[pulumi.Input[str]] = None,
                                            origin: Optional[pulumi.Input[str]] = None,
                                            state: Optional[pulumi.Input[str]] = None,
                                            zone_id: Optional[pulumi.Input[str]] = None,
                                            opts: Optional[InvokeOptions] = None) -> Output[GetApiShieldDiscoveryOperationsResult]
    func LookupApiShieldDiscoveryOperations(ctx *Context, args *LookupApiShieldDiscoveryOperationsArgs, opts ...InvokeOption) (*LookupApiShieldDiscoveryOperationsResult, error)
    func LookupApiShieldDiscoveryOperationsOutput(ctx *Context, args *LookupApiShieldDiscoveryOperationsOutputArgs, opts ...InvokeOption) LookupApiShieldDiscoveryOperationsResultOutput

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

    public static class GetApiShieldDiscoveryOperations 
    {
        public static Task<GetApiShieldDiscoveryOperationsResult> InvokeAsync(GetApiShieldDiscoveryOperationsArgs args, InvokeOptions? opts = null)
        public static Output<GetApiShieldDiscoveryOperationsResult> Invoke(GetApiShieldDiscoveryOperationsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetApiShieldDiscoveryOperationsResult> getApiShieldDiscoveryOperations(GetApiShieldDiscoveryOperationsArgs args, InvokeOptions options)
    public static Output<GetApiShieldDiscoveryOperationsResult> getApiShieldDiscoveryOperations(GetApiShieldDiscoveryOperationsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getApiShieldDiscoveryOperations:getApiShieldDiscoveryOperations
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ZoneId string
    Diff bool
    Direction string
    Endpoint string
    Hosts List<string>
    MaxItems int
    Methods List<string>
    Order string
    Origin string
    State string
    ZoneId string
    Diff bool
    Direction string
    Endpoint string
    Hosts []string
    MaxItems int
    Methods []string
    Order string
    Origin string
    State string
    zoneId String
    diff Boolean
    direction String
    endpoint String
    hosts List<String>
    maxItems Integer
    methods List<String>
    order String
    origin String
    state String
    zoneId string
    diff boolean
    direction string
    endpoint string
    hosts string[]
    maxItems number
    methods string[]
    order string
    origin string
    state string
    zone_id str
    diff bool
    direction str
    endpoint str
    hosts Sequence[str]
    max_items int
    methods Sequence[str]
    order str
    origin str
    state str
    zoneId String
    diff Boolean
    direction String
    endpoint String
    hosts List<String>
    maxItems Number
    methods List<String>
    order String
    origin String
    state String

    getApiShieldDiscoveryOperations Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Results List<GetApiShieldDiscoveryOperationsResult>
    ZoneId string
    Diff bool
    Direction string
    Endpoint string
    Hosts List<string>
    MaxItems int
    Methods List<string>
    Order string
    Origin string
    State string
    Id string
    The provider-assigned unique ID for this managed resource.
    Results []GetApiShieldDiscoveryOperationsResult
    ZoneId string
    Diff bool
    Direction string
    Endpoint string
    Hosts []string
    MaxItems int
    Methods []string
    Order string
    Origin string
    State string
    id String
    The provider-assigned unique ID for this managed resource.
    results List<GetApiShieldDiscoveryOperationsResult>
    zoneId String
    diff Boolean
    direction String
    endpoint String
    hosts List<String>
    maxItems Integer
    methods List<String>
    order String
    origin String
    state String
    id string
    The provider-assigned unique ID for this managed resource.
    results GetApiShieldDiscoveryOperationsResult[]
    zoneId string
    diff boolean
    direction string
    endpoint string
    hosts string[]
    maxItems number
    methods string[]
    order string
    origin string
    state string
    id str
    The provider-assigned unique ID for this managed resource.
    results Sequence[GetApiShieldDiscoveryOperationsResult]
    zone_id str
    diff bool
    direction str
    endpoint str
    hosts Sequence[str]
    max_items int
    methods Sequence[str]
    order str
    origin str
    state str
    id String
    The provider-assigned unique ID for this managed resource.
    results List<Property Map>
    zoneId String
    diff Boolean
    direction String
    endpoint String
    hosts List<String>
    maxItems Number
    methods List<String>
    order String
    origin String
    state String

    Supporting Types

    GetApiShieldDiscoveryOperationsResult

    Endpoint string
    The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/.
    Features GetApiShieldDiscoveryOperationsResultFeatures
    Host string
    RFC3986-compliant host.
    Id string
    UUID
    LastUpdated string
    Method string
    The HTTP method used to access the endpoint. Available values: "GET", "POST", "HEAD", "OPTIONS", "PUT", "DELETE", "CONNECT", "PATCH", "TRACE".
    Origins List<string>
    API discovery engine(s) that discovered this operation
    State string
    State of operation in API Discovery

    • review - Operation is not saved into API Shield Endpoint Management
    • saved - Operation is saved into API Shield Endpoint Management
    • ignored - Operation is marked as ignored Available values: "review", "saved", "ignored".
    Endpoint string
    The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/.
    Features GetApiShieldDiscoveryOperationsResultFeatures
    Host string
    RFC3986-compliant host.
    Id string
    UUID
    LastUpdated string
    Method string
    The HTTP method used to access the endpoint. Available values: "GET", "POST", "HEAD", "OPTIONS", "PUT", "DELETE", "CONNECT", "PATCH", "TRACE".
    Origins []string
    API discovery engine(s) that discovered this operation
    State string
    State of operation in API Discovery

    • review - Operation is not saved into API Shield Endpoint Management
    • saved - Operation is saved into API Shield Endpoint Management
    • ignored - Operation is marked as ignored Available values: "review", "saved", "ignored".
    endpoint String
    The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/.
    features GetApiShieldDiscoveryOperationsResultFeatures
    host String
    RFC3986-compliant host.
    id String
    UUID
    lastUpdated String
    method String
    The HTTP method used to access the endpoint. Available values: "GET", "POST", "HEAD", "OPTIONS", "PUT", "DELETE", "CONNECT", "PATCH", "TRACE".
    origins List<String>
    API discovery engine(s) that discovered this operation
    state String
    State of operation in API Discovery

    • review - Operation is not saved into API Shield Endpoint Management
    • saved - Operation is saved into API Shield Endpoint Management
    • ignored - Operation is marked as ignored Available values: "review", "saved", "ignored".
    endpoint string
    The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/.
    features GetApiShieldDiscoveryOperationsResultFeatures
    host string
    RFC3986-compliant host.
    id string
    UUID
    lastUpdated string
    method string
    The HTTP method used to access the endpoint. Available values: "GET", "POST", "HEAD", "OPTIONS", "PUT", "DELETE", "CONNECT", "PATCH", "TRACE".
    origins string[]
    API discovery engine(s) that discovered this operation
    state string
    State of operation in API Discovery

    • review - Operation is not saved into API Shield Endpoint Management
    • saved - Operation is saved into API Shield Endpoint Management
    • ignored - Operation is marked as ignored Available values: "review", "saved", "ignored".
    endpoint str
    The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/.
    features GetApiShieldDiscoveryOperationsResultFeatures
    host str
    RFC3986-compliant host.
    id str
    UUID
    last_updated str
    method str
    The HTTP method used to access the endpoint. Available values: "GET", "POST", "HEAD", "OPTIONS", "PUT", "DELETE", "CONNECT", "PATCH", "TRACE".
    origins Sequence[str]
    API discovery engine(s) that discovered this operation
    state str
    State of operation in API Discovery

    • review - Operation is not saved into API Shield Endpoint Management
    • saved - Operation is saved into API Shield Endpoint Management
    • ignored - Operation is marked as ignored Available values: "review", "saved", "ignored".
    endpoint String
    The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/.
    features Property Map
    host String
    RFC3986-compliant host.
    id String
    UUID
    lastUpdated String
    method String
    The HTTP method used to access the endpoint. Available values: "GET", "POST", "HEAD", "OPTIONS", "PUT", "DELETE", "CONNECT", "PATCH", "TRACE".
    origins List<String>
    API discovery engine(s) that discovered this operation
    state String
    State of operation in API Discovery

    • review - Operation is not saved into API Shield Endpoint Management
    • saved - Operation is saved into API Shield Endpoint Management
    • ignored - Operation is marked as ignored Available values: "review", "saved", "ignored".

    GetApiShieldDiscoveryOperationsResultFeatures

    GetApiShieldDiscoveryOperationsResultFeaturesTrafficStats

    LastUpdated string
    PeriodSeconds int
    The period in seconds these statistics were computed over
    Requests double
    The average number of requests seen during this period
    LastUpdated string
    PeriodSeconds int
    The period in seconds these statistics were computed over
    Requests float64
    The average number of requests seen during this period
    lastUpdated String
    periodSeconds Integer
    The period in seconds these statistics were computed over
    requests Double
    The average number of requests seen during this period
    lastUpdated string
    periodSeconds number
    The period in seconds these statistics were computed over
    requests number
    The average number of requests seen during this period
    last_updated str
    period_seconds int
    The period in seconds these statistics were computed over
    requests float
    The average number of requests seen during this period
    lastUpdated String
    periodSeconds Number
    The period in seconds these statistics were computed over
    requests Number
    The average number of requests seen during this period

    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 v6.1.2 published on Monday, Apr 28, 2025 by Pulumi