Skip to content
Start here

Discovery

DiscoveryOperations

resource cloudflare_api_shield_discovery_operation

required Expand Collapse
operation_id: String

UUID.

zone_id: String

Identifier.

optional Expand Collapse
state?: String

Mark state of operation in API Discovery

  • review - Mark operation as for review
  • ignored - Mark operation as ignored
computed Expand Collapse
id: String

UUID.

cloudflare_api_shield_discovery_operation

resource "cloudflare_api_shield_discovery_operation" "example_api_shield_discovery_operation" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  operation_id = "f174e90a-fafe-4643-bbbc-4a0ed4fc8415"
  state = "review"
}

data cloudflare_api_shield_discovery_operations

required Expand Collapse
zone_id: String

Identifier.

optional Expand Collapse
diff?: Bool

When true, only return API Discovery results that are not saved into API Shield Endpoint Management

direction?: String

Direction to order results.

endpoint?: String

Filter results to only include endpoints containing this pattern.

order?: String

Field to order by

origin?: String

Filter results to only include discovery results sourced from a particular discovery engine

  • ML - Discovered operations that were sourced using ML API Discovery
  • SessionIdentifier - Discovered operations that were sourced using Session Identifier API Discovery
state?: String

Filter results to only include discovery results in a particular state. States are as follows

  • review - Discovered operations that are not saved into API Shield Endpoint Management
  • saved - Discovered operations that are already saved into API Shield Endpoint Management
  • ignored - Discovered operations that have been marked as ignored
host?: List[String]

Filter results to only include the specified hosts.

method?: List[String]

Filter results to only include the specified HTTP methods.

max_items?: Int64

Max items to fetch, default: 1000

computed Expand Collapse
result: List[Attributes]

The items returned by the data source

id: String

UUID.

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/.

host: String

RFC3986-compliant host.

last_updated: Time
method: String

The HTTP method used to access the endpoint.

origin: 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
features: Attributes
traffic_stats: Attributes
last_updated: Time
period_seconds: Int64

The period in seconds these statistics were computed over

requests: Float64

The average number of requests seen during this period

cloudflare_api_shield_discovery_operations

data "cloudflare_api_shield_discovery_operations" "example_api_shield_discovery_operations" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  diff = true
  direction = "desc"
  endpoint = "/api/v1"
  host = ["api.cloudflare.com"]
  method = ["GET"]
  order = "method"
  origin = "ML"
  state = "review"
}