cloudflare.ContentScanningExpression
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleContentScanningExpression = new cloudflare.ContentScanningExpression("example_content_scanning_expression", {
zoneId: "023e105f4ecef8ad9ca31a8372d0c353",
bodies: [{
payload: "lookup_json_string(http.request.body.raw, \"file\")",
}],
});
import pulumi
import pulumi_cloudflare as cloudflare
example_content_scanning_expression = cloudflare.ContentScanningExpression("example_content_scanning_expression",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
bodies=[{
"payload": "lookup_json_string(http.request.body.raw, \"file\")",
}])
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.NewContentScanningExpression(ctx, "example_content_scanning_expression", &cloudflare.ContentScanningExpressionArgs{
ZoneId: pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
Bodies: cloudflare.ContentScanningExpressionBodyArray{
&cloudflare.ContentScanningExpressionBodyArgs{
Payload: pulumi.String("lookup_json_string(http.request.body.raw, \"file\")"),
},
},
})
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 exampleContentScanningExpression = new Cloudflare.ContentScanningExpression("example_content_scanning_expression", new()
{
ZoneId = "023e105f4ecef8ad9ca31a8372d0c353",
Bodies = new[]
{
new Cloudflare.Inputs.ContentScanningExpressionBodyArgs
{
Payload = "lookup_json_string(http.request.body.raw, \"file\")",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.ContentScanningExpression;
import com.pulumi.cloudflare.ContentScanningExpressionArgs;
import com.pulumi.cloudflare.inputs.ContentScanningExpressionBodyArgs;
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 exampleContentScanningExpression = new ContentScanningExpression("exampleContentScanningExpression", ContentScanningExpressionArgs.builder()
.zoneId("023e105f4ecef8ad9ca31a8372d0c353")
.bodies(ContentScanningExpressionBodyArgs.builder()
.payload("lookup_json_string(http.request.body.raw, \"file\")")
.build())
.build());
}
}
resources:
exampleContentScanningExpression:
type: cloudflare:ContentScanningExpression
name: example_content_scanning_expression
properties:
zoneId: 023e105f4ecef8ad9ca31a8372d0c353
bodies:
- payload: lookup_json_string(http.request.body.raw, "file")
Create ContentScanningExpression Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ContentScanningExpression(name: string, args: ContentScanningExpressionArgs, opts?: CustomResourceOptions);
@overload
def ContentScanningExpression(resource_name: str,
args: ContentScanningExpressionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ContentScanningExpression(resource_name: str,
opts: Optional[ResourceOptions] = None,
bodies: Optional[Sequence[ContentScanningExpressionBodyArgs]] = None,
zone_id: Optional[str] = None)
func NewContentScanningExpression(ctx *Context, name string, args ContentScanningExpressionArgs, opts ...ResourceOption) (*ContentScanningExpression, error)
public ContentScanningExpression(string name, ContentScanningExpressionArgs args, CustomResourceOptions? opts = null)
public ContentScanningExpression(String name, ContentScanningExpressionArgs args)
public ContentScanningExpression(String name, ContentScanningExpressionArgs args, CustomResourceOptions options)
type: cloudflare:ContentScanningExpression
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 ContentScanningExpressionArgs
- 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 ContentScanningExpressionArgs
- 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 ContentScanningExpressionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ContentScanningExpressionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ContentScanningExpressionArgs
- 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 contentScanningExpressionResource = new Cloudflare.ContentScanningExpression("contentScanningExpressionResource", new()
{
Bodies = new[]
{
new Cloudflare.Inputs.ContentScanningExpressionBodyArgs
{
Payload = "string",
},
},
ZoneId = "string",
});
example, err := cloudflare.NewContentScanningExpression(ctx, "contentScanningExpressionResource", &cloudflare.ContentScanningExpressionArgs{
Bodies: cloudflare.ContentScanningExpressionBodyArray{
&cloudflare.ContentScanningExpressionBodyArgs{
Payload: pulumi.String("string"),
},
},
ZoneId: pulumi.String("string"),
})
var contentScanningExpressionResource = new ContentScanningExpression("contentScanningExpressionResource", ContentScanningExpressionArgs.builder()
.bodies(ContentScanningExpressionBodyArgs.builder()
.payload("string")
.build())
.zoneId("string")
.build());
content_scanning_expression_resource = cloudflare.ContentScanningExpression("contentScanningExpressionResource",
bodies=[{
"payload": "string",
}],
zone_id="string")
const contentScanningExpressionResource = new cloudflare.ContentScanningExpression("contentScanningExpressionResource", {
bodies: [{
payload: "string",
}],
zoneId: "string",
});
type: cloudflare:ContentScanningExpression
properties:
bodies:
- payload: string
zoneId: string
ContentScanningExpression 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 ContentScanningExpression resource accepts the following input properties:
- Bodies
List<Content
Scanning Expression Body> - Zone
Id string - Identifier
- Bodies
[]Content
Scanning Expression Body Args - Zone
Id string - Identifier
- bodies
List<Content
Scanning Expression Body> - zone
Id String - Identifier
- bodies
Content
Scanning Expression Body[] - zone
Id string - Identifier
- bodies
Sequence[Content
Scanning Expression Body Args] - zone_
id str - Identifier
- bodies List<Property Map>
- zone
Id String - Identifier
Outputs
All input properties are implicitly available as output properties. Additionally, the ContentScanningExpression resource produces the following output properties:
Look up Existing ContentScanningExpression Resource
Get an existing ContentScanningExpression 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?: ContentScanningExpressionState, opts?: CustomResourceOptions): ContentScanningExpression
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bodies: Optional[Sequence[ContentScanningExpressionBodyArgs]] = None,
payload: Optional[str] = None,
zone_id: Optional[str] = None) -> ContentScanningExpression
func GetContentScanningExpression(ctx *Context, name string, id IDInput, state *ContentScanningExpressionState, opts ...ResourceOption) (*ContentScanningExpression, error)
public static ContentScanningExpression Get(string name, Input<string> id, ContentScanningExpressionState? state, CustomResourceOptions? opts = null)
public static ContentScanningExpression get(String name, Output<String> id, ContentScanningExpressionState state, CustomResourceOptions options)
resources: _: type: cloudflare:ContentScanningExpression 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.
- Bodies
List<Content
Scanning Expression Body> - Payload string
- Ruleset expression to use in matching content objects
- Zone
Id string - Identifier
- Bodies
[]Content
Scanning Expression Body Args - Payload string
- Ruleset expression to use in matching content objects
- Zone
Id string - Identifier
- bodies
List<Content
Scanning Expression Body> - payload String
- Ruleset expression to use in matching content objects
- zone
Id String - Identifier
- bodies
Content
Scanning Expression Body[] - payload string
- Ruleset expression to use in matching content objects
- zone
Id string - Identifier
- bodies
Sequence[Content
Scanning Expression Body Args] - payload str
- Ruleset expression to use in matching content objects
- zone_
id str - Identifier
- bodies List<Property Map>
- payload String
- Ruleset expression to use in matching content objects
- zone
Id String - Identifier
Supporting Types
ContentScanningExpressionBody, ContentScanningExpressionBodyArgs
- Payload string
- Ruleset expression to use in matching content objects
- Payload string
- Ruleset expression to use in matching content objects
- payload String
- Ruleset expression to use in matching content objects
- payload string
- Ruleset expression to use in matching content objects
- payload str
- Ruleset expression to use in matching content objects
- payload String
- Ruleset expression to use in matching content objects
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.