cloudflare.ContentScanning
Explore with Pulumi AI
Provides a Content Scanning resource to be used for managing the status of the Content Scanning feature within a specific zone.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
// Enable Content Scanning
const example = new cloudflare.ContentScanning("example", {
zoneId: "399c6f4950c01a5a141b99ff7fbcbd8b",
enabled: true,
});
import pulumi
import pulumi_cloudflare as cloudflare
# Enable Content Scanning
example = cloudflare.ContentScanning("example",
zone_id="399c6f4950c01a5a141b99ff7fbcbd8b",
enabled=True)
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 {
// Enable Content Scanning
_, err := cloudflare.NewContentScanning(ctx, "example", &cloudflare.ContentScanningArgs{
ZoneId: pulumi.String("399c6f4950c01a5a141b99ff7fbcbd8b"),
Enabled: pulumi.Bool(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(() =>
{
// Enable Content Scanning
var example = new Cloudflare.ContentScanning("example", new()
{
ZoneId = "399c6f4950c01a5a141b99ff7fbcbd8b",
Enabled = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.ContentScanning;
import com.pulumi.cloudflare.ContentScanningArgs;
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) {
// Enable Content Scanning
var example = new ContentScanning("example", ContentScanningArgs.builder()
.zoneId("399c6f4950c01a5a141b99ff7fbcbd8b")
.enabled(true)
.build());
}
}
resources:
# Enable Content Scanning
example:
type: cloudflare:ContentScanning
properties:
zoneId: 399c6f4950c01a5a141b99ff7fbcbd8b
enabled: true
Create ContentScanning Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ContentScanning(name: string, args: ContentScanningArgs, opts?: CustomResourceOptions);
@overload
def ContentScanning(resource_name: str,
args: ContentScanningArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ContentScanning(resource_name: str,
opts: Optional[ResourceOptions] = None,
enabled: Optional[bool] = None,
zone_id: Optional[str] = None)
func NewContentScanning(ctx *Context, name string, args ContentScanningArgs, opts ...ResourceOption) (*ContentScanning, error)
public ContentScanning(string name, ContentScanningArgs args, CustomResourceOptions? opts = null)
public ContentScanning(String name, ContentScanningArgs args)
public ContentScanning(String name, ContentScanningArgs args, CustomResourceOptions options)
type: cloudflare:ContentScanning
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 ContentScanningArgs
- 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 ContentScanningArgs
- 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 ContentScanningArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ContentScanningArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ContentScanningArgs
- 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 contentScanningResource = new Cloudflare.ContentScanning("contentScanningResource", new()
{
Enabled = false,
ZoneId = "string",
});
example, err := cloudflare.NewContentScanning(ctx, "contentScanningResource", &cloudflare.ContentScanningArgs{
Enabled: pulumi.Bool(false),
ZoneId: pulumi.String("string"),
})
var contentScanningResource = new ContentScanning("contentScanningResource", ContentScanningArgs.builder()
.enabled(false)
.zoneId("string")
.build());
content_scanning_resource = cloudflare.ContentScanning("contentScanningResource",
enabled=False,
zone_id="string")
const contentScanningResource = new cloudflare.ContentScanning("contentScanningResource", {
enabled: false,
zoneId: "string",
});
type: cloudflare:ContentScanning
properties:
enabled: false
zoneId: string
ContentScanning 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 ContentScanning resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the ContentScanning 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 ContentScanning Resource
Get an existing ContentScanning 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?: ContentScanningState, opts?: CustomResourceOptions): ContentScanning
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
enabled: Optional[bool] = None,
zone_id: Optional[str] = None) -> ContentScanning
func GetContentScanning(ctx *Context, name string, id IDInput, state *ContentScanningState, opts ...ResourceOption) (*ContentScanning, error)
public static ContentScanning Get(string name, Input<string> id, ContentScanningState? state, CustomResourceOptions? opts = null)
public static ContentScanning get(String name, Output<String> id, ContentScanningState state, CustomResourceOptions options)
resources: _: type: cloudflare:ContentScanning 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.
Import
$ pulumi import cloudflare:index/contentScanning:ContentScanning example <zone_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.