cloudflare.ApiShieldSchema
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleApiShieldSchema = new cloudflare.ApiShieldSchema("example_api_shield_schema", {
zoneId: "023e105f4ecef8ad9ca31a8372d0c353",
file: "file.txt",
kind: "openapi_v3",
name: "petstore schema",
validationEnabled: "true",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_api_shield_schema = cloudflare.ApiShieldSchema("example_api_shield_schema",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
file="file.txt",
kind="openapi_v3",
name="petstore schema",
validation_enabled="true")
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.NewApiShieldSchema(ctx, "example_api_shield_schema", &cloudflare.ApiShieldSchemaArgs{
ZoneId: pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
File: pulumi.String("file.txt"),
Kind: pulumi.String("openapi_v3"),
Name: pulumi.String("petstore schema"),
ValidationEnabled: pulumi.String("true"),
})
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 exampleApiShieldSchema = new Cloudflare.ApiShieldSchema("example_api_shield_schema", new()
{
ZoneId = "023e105f4ecef8ad9ca31a8372d0c353",
File = "file.txt",
Kind = "openapi_v3",
Name = "petstore schema",
ValidationEnabled = "true",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.ApiShieldSchema;
import com.pulumi.cloudflare.ApiShieldSchemaArgs;
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) {
var exampleApiShieldSchema = new ApiShieldSchema("exampleApiShieldSchema", ApiShieldSchemaArgs.builder()
.zoneId("023e105f4ecef8ad9ca31a8372d0c353")
.file("file.txt")
.kind("openapi_v3")
.name("petstore schema")
.validationEnabled("true")
.build());
}
}
resources:
exampleApiShieldSchema:
type: cloudflare:ApiShieldSchema
name: example_api_shield_schema
properties:
zoneId: 023e105f4ecef8ad9ca31a8372d0c353
file: file.txt
kind: openapi_v3
name: petstore schema
validationEnabled: 'true'
Create ApiShieldSchema Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ApiShieldSchema(name: string, args: ApiShieldSchemaArgs, opts?: CustomResourceOptions);
@overload
def ApiShieldSchema(resource_name: str,
args: ApiShieldSchemaArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ApiShieldSchema(resource_name: str,
opts: Optional[ResourceOptions] = None,
file: Optional[str] = None,
kind: Optional[str] = None,
zone_id: Optional[str] = None,
name: Optional[str] = None,
schema_id: Optional[str] = None,
validation_enabled: Optional[str] = None)
func NewApiShieldSchema(ctx *Context, name string, args ApiShieldSchemaArgs, opts ...ResourceOption) (*ApiShieldSchema, error)
public ApiShieldSchema(string name, ApiShieldSchemaArgs args, CustomResourceOptions? opts = null)
public ApiShieldSchema(String name, ApiShieldSchemaArgs args)
public ApiShieldSchema(String name, ApiShieldSchemaArgs args, CustomResourceOptions options)
type: cloudflare:ApiShieldSchema
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ApiShieldSchemaArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ApiShieldSchemaArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ApiShieldSchemaArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApiShieldSchemaArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ApiShieldSchemaArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var apiShieldSchemaResource = new Cloudflare.ApiShieldSchema("apiShieldSchemaResource", new()
{
File = "string",
Kind = "string",
ZoneId = "string",
Name = "string",
SchemaId = "string",
ValidationEnabled = "string",
});
example, err := cloudflare.NewApiShieldSchema(ctx, "apiShieldSchemaResource", &cloudflare.ApiShieldSchemaArgs{
File: pulumi.String("string"),
Kind: pulumi.String("string"),
ZoneId: pulumi.String("string"),
Name: pulumi.String("string"),
SchemaId: pulumi.String("string"),
ValidationEnabled: pulumi.String("string"),
})
var apiShieldSchemaResource = new ApiShieldSchema("apiShieldSchemaResource", ApiShieldSchemaArgs.builder()
.file("string")
.kind("string")
.zoneId("string")
.name("string")
.schemaId("string")
.validationEnabled("string")
.build());
api_shield_schema_resource = cloudflare.ApiShieldSchema("apiShieldSchemaResource",
file="string",
kind="string",
zone_id="string",
name="string",
schema_id="string",
validation_enabled="string")
const apiShieldSchemaResource = new cloudflare.ApiShieldSchema("apiShieldSchemaResource", {
file: "string",
kind: "string",
zoneId: "string",
name: "string",
schemaId: "string",
validationEnabled: "string",
});
type: cloudflare:ApiShieldSchema
properties:
file: string
kind: string
name: string
schemaId: string
validationEnabled: string
zoneId: string
ApiShieldSchema Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ApiShieldSchema resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the ApiShieldSchema resource produces the following output properties:
- Created
At string - Id string
- The provider-assigned unique ID for this managed resource.
- Schema
Api
Shield Schema Schema - Source string
- Source of the schema
- Upload
Details ApiShield Schema Upload Details
- Created
At string - Id string
- The provider-assigned unique ID for this managed resource.
- Schema
Api
Shield Schema Schema - Source string
- Source of the schema
- Upload
Details ApiShield Schema Upload Details
- created
At String - id String
- The provider-assigned unique ID for this managed resource.
- schema
Api
Shield Schema Schema - source String
- Source of the schema
- upload
Details ApiShield Schema Upload Details
- created
At string - id string
- The provider-assigned unique ID for this managed resource.
- schema
Api
Shield Schema Schema - source string
- Source of the schema
- upload
Details ApiShield Schema Upload Details
- created_
at str - id str
- The provider-assigned unique ID for this managed resource.
- schema
Api
Shield Schema Schema - source str
- Source of the schema
- upload_
details ApiShield Schema Upload Details
- created
At String - id String
- The provider-assigned unique ID for this managed resource.
- schema Property Map
- source String
- Source of the schema
- upload
Details Property Map
Look up Existing ApiShieldSchema Resource
Get an existing ApiShieldSchema resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ApiShieldSchemaState, opts?: CustomResourceOptions): ApiShieldSchema
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
file: Optional[str] = None,
kind: Optional[str] = None,
name: Optional[str] = None,
schema: Optional[ApiShieldSchemaSchemaArgs] = None,
schema_id: Optional[str] = None,
source: Optional[str] = None,
upload_details: Optional[ApiShieldSchemaUploadDetailsArgs] = None,
validation_enabled: Optional[str] = None,
zone_id: Optional[str] = None) -> ApiShieldSchema
func GetApiShieldSchema(ctx *Context, name string, id IDInput, state *ApiShieldSchemaState, opts ...ResourceOption) (*ApiShieldSchema, error)
public static ApiShieldSchema Get(string name, Input<string> id, ApiShieldSchemaState? state, CustomResourceOptions? opts = null)
public static ApiShieldSchema get(String name, Output<String> id, ApiShieldSchemaState state, CustomResourceOptions options)
resources: _: type: cloudflare:ApiShieldSchema get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Created
At string - File string
- Schema file bytes
- Kind string
- Kind of schema Available values: "openapi_v3".
- Name string
- Name of the schema
- Schema
Api
Shield Schema Schema - Schema
Id string - Source string
- Source of the schema
- Upload
Details ApiShield Schema Upload Details - Validation
Enabled string - Flag whether schema is enabled for validation. Available values: "true", "false".
- Zone
Id string - Identifier
- Created
At string - File string
- Schema file bytes
- Kind string
- Kind of schema Available values: "openapi_v3".
- Name string
- Name of the schema
- Schema
Api
Shield Schema Schema Args - Schema
Id string - Source string
- Source of the schema
- Upload
Details ApiShield Schema Upload Details Args - Validation
Enabled string - Flag whether schema is enabled for validation. Available values: "true", "false".
- Zone
Id string - Identifier
- created
At String - file String
- Schema file bytes
- kind String
- Kind of schema Available values: "openapi_v3".
- name String
- Name of the schema
- schema
Api
Shield Schema Schema - schema
Id String - source String
- Source of the schema
- upload
Details ApiShield Schema Upload Details - validation
Enabled String - Flag whether schema is enabled for validation. Available values: "true", "false".
- zone
Id String - Identifier
- created
At string - file string
- Schema file bytes
- kind string
- Kind of schema Available values: "openapi_v3".
- name string
- Name of the schema
- schema
Api
Shield Schema Schema - schema
Id string - source string
- Source of the schema
- upload
Details ApiShield Schema Upload Details - validation
Enabled string - Flag whether schema is enabled for validation. Available values: "true", "false".
- zone
Id string - Identifier
- created_
at str - file str
- Schema file bytes
- kind str
- Kind of schema Available values: "openapi_v3".
- name str
- Name of the schema
- schema
Api
Shield Schema Schema Args - schema_
id str - source str
- Source of the schema
- upload_
details ApiShield Schema Upload Details Args - validation_
enabled str - Flag whether schema is enabled for validation. Available values: "true", "false".
- zone_
id str - Identifier
- created
At String - file String
- Schema file bytes
- kind String
- Kind of schema Available values: "openapi_v3".
- name String
- Name of the schema
- schema Property Map
- schema
Id String - source String
- Source of the schema
- upload
Details Property Map - validation
Enabled String - Flag whether schema is enabled for validation. Available values: "true", "false".
- zone
Id String - Identifier
Supporting Types
ApiShieldSchemaSchema, ApiShieldSchemaSchemaArgs
- created_
at str - kind str
- Kind of schema Available values: "openapi_v3".
- name str
- Name of the schema
- schema_
id str - UUID
- source str
- Source of the schema
- validation_
enabled bool - Flag whether schema is enabled for validation.
ApiShieldSchemaUploadDetails, ApiShieldSchemaUploadDetailsArgs
- Warnings
List<Api
Shield Schema Upload Details Warning> - Diagnostic warning events that occurred during processing. These events are non-critical errors found within the schema.
- Warnings
[]Api
Shield Schema Upload Details Warning - Diagnostic warning events that occurred during processing. These events are non-critical errors found within the schema.
- warnings
List<Api
Shield Schema Upload Details Warning> - Diagnostic warning events that occurred during processing. These events are non-critical errors found within the schema.
- warnings
Api
Shield Schema Upload Details Warning[] - Diagnostic warning events that occurred during processing. These events are non-critical errors found within the schema.
- warnings
Sequence[Api
Shield Schema Upload Details Warning] - Diagnostic warning events that occurred during processing. These events are non-critical errors found within the schema.
- warnings List<Property Map>
- Diagnostic warning events that occurred during processing. These events are non-critical errors found within the schema.
ApiShieldSchemaUploadDetailsWarning, ApiShieldSchemaUploadDetailsWarningArgs
- Code int
- 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.
- Code int
- Code that identifies the event that occurred.
- Locations []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.
- code Integer
- 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.
- code number
- Code that identifies the event that occurred.
- locations 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.
- code int
- Code that identifies the event that occurred.
- locations Sequence[str]
- JSONPath location(s) in the schema where these events were encountered. See https://goessner.net/articles/JsonPath/ for JSONPath specification.
- message str
- Diagnostic message that describes the event.
- code Number
- 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.
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.