1. Packages
  2. Cloudflare
  3. API Docs
  4. ApiShieldOperationSchemaValidationSettings
Cloudflare v5.26.0 published on Wednesday, Apr 17, 2024 by Pulumi

cloudflare.ApiShieldOperationSchemaValidationSettings

Explore with Pulumi AI

cloudflare logo
Cloudflare v5.26.0 published on Wednesday, Apr 17, 2024 by Pulumi

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleApiShieldOperation = new cloudflare.ApiShieldOperation("exampleApiShieldOperation", {
        zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
        method: "GET",
        host: "api.example.com",
        endpoint: "/path",
    });
    const exampleApiShieldOperationSchemaValidationSettings = new cloudflare.ApiShieldOperationSchemaValidationSettings("exampleApiShieldOperationSchemaValidationSettings", {
        zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
        operationId: exampleApiShieldOperation.id,
        mitigationAction: "block",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_api_shield_operation = cloudflare.ApiShieldOperation("exampleApiShieldOperation",
        zone_id="0da42c8d2132a9ddaf714f9e7c920711",
        method="GET",
        host="api.example.com",
        endpoint="/path")
    example_api_shield_operation_schema_validation_settings = cloudflare.ApiShieldOperationSchemaValidationSettings("exampleApiShieldOperationSchemaValidationSettings",
        zone_id="0da42c8d2132a9ddaf714f9e7c920711",
        operation_id=example_api_shield_operation.id,
        mitigation_action="block")
    
    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 {
    		exampleApiShieldOperation, err := cloudflare.NewApiShieldOperation(ctx, "exampleApiShieldOperation", &cloudflare.ApiShieldOperationArgs{
    			ZoneId:   pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
    			Method:   pulumi.String("GET"),
    			Host:     pulumi.String("api.example.com"),
    			Endpoint: pulumi.String("/path"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = cloudflare.NewApiShieldOperationSchemaValidationSettings(ctx, "exampleApiShieldOperationSchemaValidationSettings", &cloudflare.ApiShieldOperationSchemaValidationSettingsArgs{
    			ZoneId:           pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
    			OperationId:      exampleApiShieldOperation.ID(),
    			MitigationAction: pulumi.String("block"),
    		})
    		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 exampleApiShieldOperation = new Cloudflare.ApiShieldOperation("exampleApiShieldOperation", new()
        {
            ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
            Method = "GET",
            Host = "api.example.com",
            Endpoint = "/path",
        });
    
        var exampleApiShieldOperationSchemaValidationSettings = new Cloudflare.ApiShieldOperationSchemaValidationSettings("exampleApiShieldOperationSchemaValidationSettings", new()
        {
            ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
            OperationId = exampleApiShieldOperation.Id,
            MitigationAction = "block",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.ApiShieldOperation;
    import com.pulumi.cloudflare.ApiShieldOperationArgs;
    import com.pulumi.cloudflare.ApiShieldOperationSchemaValidationSettings;
    import com.pulumi.cloudflare.ApiShieldOperationSchemaValidationSettingsArgs;
    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 exampleApiShieldOperation = new ApiShieldOperation("exampleApiShieldOperation", ApiShieldOperationArgs.builder()        
                .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
                .method("GET")
                .host("api.example.com")
                .endpoint("/path")
                .build());
    
            var exampleApiShieldOperationSchemaValidationSettings = new ApiShieldOperationSchemaValidationSettings("exampleApiShieldOperationSchemaValidationSettings", ApiShieldOperationSchemaValidationSettingsArgs.builder()        
                .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
                .operationId(exampleApiShieldOperation.id())
                .mitigationAction("block")
                .build());
    
        }
    }
    
    resources:
      exampleApiShieldOperation:
        type: cloudflare:ApiShieldOperation
        properties:
          zoneId: 0da42c8d2132a9ddaf714f9e7c920711
          method: GET
          host: api.example.com
          endpoint: /path
      exampleApiShieldOperationSchemaValidationSettings:
        type: cloudflare:ApiShieldOperationSchemaValidationSettings
        properties:
          zoneId: 0da42c8d2132a9ddaf714f9e7c920711
          operationId: ${exampleApiShieldOperation.id}
          mitigationAction: block
    

    Create ApiShieldOperationSchemaValidationSettings Resource

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

    Constructor syntax

    new ApiShieldOperationSchemaValidationSettings(name: string, args: ApiShieldOperationSchemaValidationSettingsArgs, opts?: CustomResourceOptions);
    @overload
    def ApiShieldOperationSchemaValidationSettings(resource_name: str,
                                                   args: ApiShieldOperationSchemaValidationSettingsArgs,
                                                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def ApiShieldOperationSchemaValidationSettings(resource_name: str,
                                                   opts: Optional[ResourceOptions] = None,
                                                   operation_id: Optional[str] = None,
                                                   zone_id: Optional[str] = None,
                                                   mitigation_action: Optional[str] = None)
    func NewApiShieldOperationSchemaValidationSettings(ctx *Context, name string, args ApiShieldOperationSchemaValidationSettingsArgs, opts ...ResourceOption) (*ApiShieldOperationSchemaValidationSettings, error)
    public ApiShieldOperationSchemaValidationSettings(string name, ApiShieldOperationSchemaValidationSettingsArgs args, CustomResourceOptions? opts = null)
    public ApiShieldOperationSchemaValidationSettings(String name, ApiShieldOperationSchemaValidationSettingsArgs args)
    public ApiShieldOperationSchemaValidationSettings(String name, ApiShieldOperationSchemaValidationSettingsArgs args, CustomResourceOptions options)
    
    type: cloudflare:ApiShieldOperationSchemaValidationSettings
    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 ApiShieldOperationSchemaValidationSettingsArgs
    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 ApiShieldOperationSchemaValidationSettingsArgs
    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 ApiShieldOperationSchemaValidationSettingsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApiShieldOperationSchemaValidationSettingsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApiShieldOperationSchemaValidationSettingsArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var apiShieldOperationSchemaValidationSettingsResource = new Cloudflare.ApiShieldOperationSchemaValidationSettings("apiShieldOperationSchemaValidationSettingsResource", new()
    {
        OperationId = "string",
        ZoneId = "string",
        MitigationAction = "string",
    });
    
    example, err := cloudflare.NewApiShieldOperationSchemaValidationSettings(ctx, "apiShieldOperationSchemaValidationSettingsResource", &cloudflare.ApiShieldOperationSchemaValidationSettingsArgs{
    	OperationId:      pulumi.String("string"),
    	ZoneId:           pulumi.String("string"),
    	MitigationAction: pulumi.String("string"),
    })
    
    var apiShieldOperationSchemaValidationSettingsResource = new ApiShieldOperationSchemaValidationSettings("apiShieldOperationSchemaValidationSettingsResource", ApiShieldOperationSchemaValidationSettingsArgs.builder()        
        .operationId("string")
        .zoneId("string")
        .mitigationAction("string")
        .build());
    
    api_shield_operation_schema_validation_settings_resource = cloudflare.ApiShieldOperationSchemaValidationSettings("apiShieldOperationSchemaValidationSettingsResource",
        operation_id="string",
        zone_id="string",
        mitigation_action="string")
    
    const apiShieldOperationSchemaValidationSettingsResource = new cloudflare.ApiShieldOperationSchemaValidationSettings("apiShieldOperationSchemaValidationSettingsResource", {
        operationId: "string",
        zoneId: "string",
        mitigationAction: "string",
    });
    
    type: cloudflare:ApiShieldOperationSchemaValidationSettings
    properties:
        mitigationAction: string
        operationId: string
        zoneId: string
    

    ApiShieldOperationSchemaValidationSettings Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ApiShieldOperationSchemaValidationSettings resource accepts the following input properties:

    OperationId string
    Operation ID these settings should apply to. Modifying this attribute will force creation of a new resource.
    ZoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    MitigationAction string
    The mitigation action to apply to this operation.
    OperationId string
    Operation ID these settings should apply to. Modifying this attribute will force creation of a new resource.
    ZoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    MitigationAction string
    The mitigation action to apply to this operation.
    operationId String
    Operation ID these settings should apply to. Modifying this attribute will force creation of a new resource.
    zoneId String
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    mitigationAction String
    The mitigation action to apply to this operation.
    operationId string
    Operation ID these settings should apply to. Modifying this attribute will force creation of a new resource.
    zoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    mitigationAction string
    The mitigation action to apply to this operation.
    operation_id str
    Operation ID these settings should apply to. Modifying this attribute will force creation of a new resource.
    zone_id str
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    mitigation_action str
    The mitigation action to apply to this operation.
    operationId String
    Operation ID these settings should apply to. Modifying this attribute will force creation of a new resource.
    zoneId String
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    mitigationAction String
    The mitigation action to apply to this operation.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ApiShieldOperationSchemaValidationSettings 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 ApiShieldOperationSchemaValidationSettings Resource

    Get an existing ApiShieldOperationSchemaValidationSettings 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?: ApiShieldOperationSchemaValidationSettingsState, opts?: CustomResourceOptions): ApiShieldOperationSchemaValidationSettings
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            mitigation_action: Optional[str] = None,
            operation_id: Optional[str] = None,
            zone_id: Optional[str] = None) -> ApiShieldOperationSchemaValidationSettings
    func GetApiShieldOperationSchemaValidationSettings(ctx *Context, name string, id IDInput, state *ApiShieldOperationSchemaValidationSettingsState, opts ...ResourceOption) (*ApiShieldOperationSchemaValidationSettings, error)
    public static ApiShieldOperationSchemaValidationSettings Get(string name, Input<string> id, ApiShieldOperationSchemaValidationSettingsState? state, CustomResourceOptions? opts = null)
    public static ApiShieldOperationSchemaValidationSettings get(String name, Output<String> id, ApiShieldOperationSchemaValidationSettingsState 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:
    MitigationAction string
    The mitigation action to apply to this operation.
    OperationId string
    Operation ID these settings should apply to. Modifying this attribute will force creation of a new resource.
    ZoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    MitigationAction string
    The mitigation action to apply to this operation.
    OperationId string
    Operation ID these settings should apply to. Modifying this attribute will force creation of a new resource.
    ZoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    mitigationAction String
    The mitigation action to apply to this operation.
    operationId String
    Operation ID these settings should apply to. Modifying this attribute will force creation of a new resource.
    zoneId String
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    mitigationAction string
    The mitigation action to apply to this operation.
    operationId string
    Operation ID these settings should apply to. Modifying this attribute will force creation of a new resource.
    zoneId string
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    mitigation_action str
    The mitigation action to apply to this operation.
    operation_id str
    Operation ID these settings should apply to. Modifying this attribute will force creation of a new resource.
    zone_id str
    The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    mitigationAction String
    The mitigation action to apply to this operation.
    operationId String
    Operation ID these settings should apply to. Modifying this attribute will force creation of a new resource.
    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.26.0 published on Wednesday, Apr 17, 2024 by Pulumi