Zone Lockdown Args
data class ZoneLockdownArgs(val configurations: Output<List<ZoneLockdownConfigurationArgs>>? = null, val urls: Output<List<String>>? = null, val zoneId: Output<String>? = null) : ConvertibleToJava<ZoneLockdownArgs>
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleZoneLockdown = new cloudflare.ZoneLockdown("example_zone_lockdown", {
zoneId: "023e105f4ecef8ad9ca31a8372d0c353",
configurations: [{
target: "ip",
value: "198.51.100.4",
}],
urls: ["shop.example.com/*"],
});
Content copied to clipboard
import pulumi
import pulumi_cloudflare as cloudflare
example_zone_lockdown = cloudflare.ZoneLockdown("example_zone_lockdown",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
configurations=[{
"target": "ip",
"value": "198.51.100.4",
}],
urls=["shop.example.com/*"])
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var exampleZoneLockdown = new Cloudflare.ZoneLockdown("example_zone_lockdown", new()
{
ZoneId = "023e105f4ecef8ad9ca31a8372d0c353",
Configurations = new[]
{
new Cloudflare.Inputs.ZoneLockdownConfigurationArgs
{
Target = "ip",
Value = "198.51.100.4",
},
},
Urls = new[]
{
"shop.example.com/*",
},
});
});
Content copied to clipboard
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.NewZoneLockdown(ctx, "example_zone_lockdown", &cloudflare.ZoneLockdownArgs{
ZoneId: pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
Configurations: cloudflare.ZoneLockdownConfigurationArray{
&cloudflare.ZoneLockdownConfigurationArgs{
Target: pulumi.String("ip"),
Value: pulumi.String("198.51.100.4"),
},
},
Urls: pulumi.StringArray{
pulumi.String("shop.example.com/*"),
},
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.ZoneLockdown;
import com.pulumi.cloudflare.ZoneLockdownArgs;
import com.pulumi.cloudflare.inputs.ZoneLockdownConfigurationArgs;
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 exampleZoneLockdown = new ZoneLockdown("exampleZoneLockdown", ZoneLockdownArgs.builder()
.zoneId("023e105f4ecef8ad9ca31a8372d0c353")
.configurations(ZoneLockdownConfigurationArgs.builder()
.target("ip")
.value("198.51.100.4")
.build())
.urls("shop.example.com/*")
.build());
}
}
Content copied to clipboard
resources:
exampleZoneLockdown:
type: cloudflare:ZoneLockdown
name: example_zone_lockdown
properties:
zoneId: 023e105f4ecef8ad9ca31a8372d0c353
configurations:
- target: ip
value: 198.51.100.4
urls:
- shop.example.com/*
Content copied to clipboard
Import
$ pulumi import cloudflare:index/zoneLockdown:ZoneLockdown example '<zone_id>/<lock_downs_id>'
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(configurations: Output<List<ZoneLockdownConfigurationArgs>>? = null, urls: Output<List<String>>? = null, zoneId: Output<String>? = null)