Skip to content
Start here

User Schemas

resource cloudflare_api_shield_schema

required Expand Collapse
zone_id: String

Identifier.

file: String

Schema file bytes

kind: String

Kind of schema

optional Expand Collapse
schema_id?: String
name?: String

Name of the schema

validation_enabled?: String

Flag whether schema is enabled for validation.

computed Expand Collapse
created_at: Time
source: String

Source of the schema

schema: Attributes
created_at: Time
kind: String

Kind of schema

name: String

Name of the schema

schema_id: String

UUID.

source: String

Source of the schema

validation_enabled: Bool

Flag whether schema is enabled for validation.

upload_details: Attributes
warnings: List[Attributes]

Diagnostic warning events that occurred during processing. These events are non-critical errors found within the schema.

code: Int64

Code that identifies the event that occurred.

locations: List[String]

JSONPath location(s) in the schema where these events were encountered. See https://goessner.net/articles/JsonPath/ for JSONPath specification.

message: String

Diagnostic message that describes the event.

cloudflare_api_shield_schema

resource "cloudflare_api_shield_schema" "example_api_shield_schema" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  file = "Example data"
  kind = "openapi_v3"
  name = "petstore schema"
  validation_enabled = "true"
}

data cloudflare_api_shield_schema

required Expand Collapse
schema_id: String
zone_id: String

Identifier.

optional Expand Collapse
omit_source?: Bool

Omit the source-files of schemas and only retrieve their meta-data.

computed Expand Collapse
created_at: Time
kind: String

Kind of schema

name: String

Name of the schema

source: String

Source of the schema

validation_enabled: Bool

Flag whether schema is enabled for validation.

cloudflare_api_shield_schema

data "cloudflare_api_shield_schema" "example_api_shield_schema" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  schema_id = "f174e90a-fafe-4643-bbbc-4a0ed4fc8415"
  omit_source = true
}

data cloudflare_api_shield_schemas

required Expand Collapse
zone_id: String

Identifier.

optional Expand Collapse
validation_enabled?: Bool

Flag whether schema is enabled for validation.

omit_source?: Bool

Omit the source-files of schemas and only retrieve their meta-data.

max_items?: Int64

Max items to fetch, default: 1000

computed Expand Collapse
result: List[Attributes]

The items returned by the data source

created_at: Time
kind: String

Kind of schema

name: String

Name of the schema

schema_id: String

UUID.

source: String

Source of the schema

validation_enabled: Bool

Flag whether schema is enabled for validation.

cloudflare_api_shield_schemas

data "cloudflare_api_shield_schemas" "example_api_shield_schemas" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  validation_enabled = true
}