1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. ApiShieldSchemaValidationSettings
Cloudflare v5.44.0 published on Wednesday, Nov 27, 2024 by Pulumi

cloudflare.ApiShieldSchemaValidationSettings

Explore with Pulumi AI

cloudflare logo
Cloudflare v5.44.0 published on Wednesday, Nov 27, 2024 by Pulumi

    Provides a resource to manage settings in API Shield Schema Validation 2.0.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const example = new cloudflare.ApiShieldSchemaValidationSettings("example", {
        zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
        validationDefaultMitigationAction: "log",
        validationOverrideMitigationAction: "none",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example = cloudflare.ApiShieldSchemaValidationSettings("example",
        zone_id="0da42c8d2132a9ddaf714f9e7c920711",
        validation_default_mitigation_action="log",
        validation_override_mitigation_action="none")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudflare.NewApiShieldSchemaValidationSettings(ctx, "example", &cloudflare.ApiShieldSchemaValidationSettingsArgs{
    			ZoneId:                             pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
    			ValidationDefaultMitigationAction:  pulumi.String("log"),
    			ValidationOverrideMitigationAction: pulumi.String("none"),
    		})
    		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 example = new Cloudflare.ApiShieldSchemaValidationSettings("example", new()
        {
            ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
            ValidationDefaultMitigationAction = "log",
            ValidationOverrideMitigationAction = "none",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.ApiShieldSchemaValidationSettings;
    import com.pulumi.cloudflare.ApiShieldSchemaValidationSettingsArgs;
    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 example = new ApiShieldSchemaValidationSettings("example", ApiShieldSchemaValidationSettingsArgs.builder()
                .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
                .validationDefaultMitigationAction("log")
                .validationOverrideMitigationAction("none")
                .build());
    
        }
    }
    
    resources:
      example:
        type: cloudflare:ApiShieldSchemaValidationSettings
        properties:
          zoneId: 0da42c8d2132a9ddaf714f9e7c920711
          validationDefaultMitigationAction: log
          validationOverrideMitigationAction: none
    

    Create ApiShieldSchemaValidationSettings Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ApiShieldSchemaValidationSettings(name: string, args: ApiShieldSchemaValidationSettingsArgs, opts?: CustomResourceOptions);
    @overload
    def ApiShieldSchemaValidationSettings(resource_name: str,
                                          args: ApiShieldSchemaValidationSettingsArgs,
                                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def ApiShieldSchemaValidationSettings(resource_name: str,
                                          opts: Optional[ResourceOptions] = None,
                                          validation_default_mitigation_action: Optional[str] = None,
                                          zone_id: Optional[str] = None,
                                          validation_override_mitigation_action: Optional[str] = None)
    func NewApiShieldSchemaValidationSettings(ctx *Context, name string, args ApiShieldSchemaValidationSettingsArgs, opts ...ResourceOption) (*ApiShieldSchemaValidationSettings, error)
    public ApiShieldSchemaValidationSettings(string name, ApiShieldSchemaValidationSettingsArgs args, CustomResourceOptions? opts = null)
    public ApiShieldSchemaValidationSettings(String name, ApiShieldSchemaValidationSettingsArgs args)
    public ApiShieldSchemaValidationSettings(String name, ApiShieldSchemaValidationSettingsArgs args, CustomResourceOptions options)
    
    type: cloudflare:ApiShieldSchemaValidationSettings
    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 ApiShieldSchemaValidationSettingsArgs
    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 ApiShieldSchemaValidationSettingsArgs
    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 ApiShieldSchemaValidationSettingsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApiShieldSchemaValidationSettingsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApiShieldSchemaValidationSettingsArgs
    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 apiShieldSchemaValidationSettingsResource = new Cloudflare.ApiShieldSchemaValidationSettings("apiShieldSchemaValidationSettingsResource", new()
    {
        ValidationDefaultMitigationAction = "string",
        ZoneId = "string",
        ValidationOverrideMitigationAction = "string",
    });
    
    example, err := cloudflare.NewApiShieldSchemaValidationSettings(ctx, "apiShieldSchemaValidationSettingsResource", &cloudflare.ApiShieldSchemaValidationSettingsArgs{
    	ValidationDefaultMitigationAction:  pulumi.String("string"),
    	ZoneId:                             pulumi.String("string"),
    	ValidationOverrideMitigationAction: pulumi.String("string"),
    })
    
    var apiShieldSchemaValidationSettingsResource = new ApiShieldSchemaValidationSettings("apiShieldSchemaValidationSettingsResource", ApiShieldSchemaValidationSettingsArgs.builder()
        .validationDefaultMitigationAction("string")
        .zoneId("string")
        .validationOverrideMitigationAction("string")
        .build());
    
    api_shield_schema_validation_settings_resource = cloudflare.ApiShieldSchemaValidationSettings("apiShieldSchemaValidationSettingsResource",
        validation_default_mitigation_action="string",
        zone_id="string",
        validation_override_mitigation_action="string")
    
    const apiShieldSchemaValidationSettingsResource = new cloudflare.ApiShieldSchemaValidationSettings("apiShieldSchemaValidationSettingsResource", {
        validationDefaultMitigationAction: "string",
        zoneId: "string",
        validationOverrideMitigationAction: "string",
    });
    
    type: cloudflare:ApiShieldSchemaValidationSettings
    properties:
        validationDefaultMitigationAction: string
        validationOverrideMitigationAction: string
        zoneId: string
    

    ApiShieldSchemaValidationSettings 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 ApiShieldSchemaValidationSettings resource accepts the following input properties:

    ValidationDefaultMitigationAction string
    The default mitigation action used when there is no mitigation action defined on the operation.
    ZoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    ValidationOverrideMitigationAction string
    When set, this overrides both zone level and operation level mitigation actions.
    ValidationDefaultMitigationAction string
    The default mitigation action used when there is no mitigation action defined on the operation.
    ZoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    ValidationOverrideMitigationAction string
    When set, this overrides both zone level and operation level mitigation actions.
    validationDefaultMitigationAction String
    The default mitigation action used when there is no mitigation action defined on the operation.
    zoneId String
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    validationOverrideMitigationAction String
    When set, this overrides both zone level and operation level mitigation actions.
    validationDefaultMitigationAction string
    The default mitigation action used when there is no mitigation action defined on the operation.
    zoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    validationOverrideMitigationAction string
    When set, this overrides both zone level and operation level mitigation actions.
    validation_default_mitigation_action str
    The default mitigation action used when there is no mitigation action defined on the operation.
    zone_id str
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    validation_override_mitigation_action str
    When set, this overrides both zone level and operation level mitigation actions.
    validationDefaultMitigationAction String
    The default mitigation action used when there is no mitigation action defined on the operation.
    zoneId String
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    validationOverrideMitigationAction String
    When set, this overrides both zone level and operation level mitigation actions.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ApiShieldSchemaValidationSettings resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ApiShieldSchemaValidationSettings Resource

    Get an existing ApiShieldSchemaValidationSettings 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?: ApiShieldSchemaValidationSettingsState, opts?: CustomResourceOptions): ApiShieldSchemaValidationSettings
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            validation_default_mitigation_action: Optional[str] = None,
            validation_override_mitigation_action: Optional[str] = None,
            zone_id: Optional[str] = None) -> ApiShieldSchemaValidationSettings
    func GetApiShieldSchemaValidationSettings(ctx *Context, name string, id IDInput, state *ApiShieldSchemaValidationSettingsState, opts ...ResourceOption) (*ApiShieldSchemaValidationSettings, error)
    public static ApiShieldSchemaValidationSettings Get(string name, Input<string> id, ApiShieldSchemaValidationSettingsState? state, CustomResourceOptions? opts = null)
    public static ApiShieldSchemaValidationSettings get(String name, Output<String> id, ApiShieldSchemaValidationSettingsState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    ValidationDefaultMitigationAction string
    The default mitigation action used when there is no mitigation action defined on the operation.
    ValidationOverrideMitigationAction string
    When set, this overrides both zone level and operation level mitigation actions.
    ZoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    ValidationDefaultMitigationAction string
    The default mitigation action used when there is no mitigation action defined on the operation.
    ValidationOverrideMitigationAction string
    When set, this overrides both zone level and operation level mitigation actions.
    ZoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    validationDefaultMitigationAction String
    The default mitigation action used when there is no mitigation action defined on the operation.
    validationOverrideMitigationAction String
    When set, this overrides both zone level and operation level mitigation actions.
    zoneId String
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    validationDefaultMitigationAction string
    The default mitigation action used when there is no mitigation action defined on the operation.
    validationOverrideMitigationAction string
    When set, this overrides both zone level and operation level mitigation actions.
    zoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    validation_default_mitigation_action str
    The default mitigation action used when there is no mitigation action defined on the operation.
    validation_override_mitigation_action str
    When set, this overrides both zone level and operation level mitigation actions.
    zone_id str
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    validationDefaultMitigationAction String
    The default mitigation action used when there is no mitigation action defined on the operation.
    validationOverrideMitigationAction String
    When set, this overrides both zone level and operation level mitigation actions.
    zoneId String
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.

    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 v5.44.0 published on Wednesday, Nov 27, 2024 by Pulumi