edgecenter.ProtectionResourceBlacklistEntry
Explore with Pulumi AI
Represent IP added to blacklist for DDoS protection resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as edgecenter from "@pulumi/edgecenter";
const protectedExampleCom = new edgecenter.ProtectionResource("protectedExampleCom", {tls: [
"1.2",
"1.3",
]});
const blacklist1 = new edgecenter.ProtectionResourceBlacklistEntry("blacklist1", {
resource: protectedExampleCom.protectionResourceId,
ip: "1.2.3.4",
});
const blacklist2 = new edgecenter.ProtectionResourceBlacklistEntry("blacklist2", {
resource: protectedExampleCom.protectionResourceId,
ip: "1.2.4.0/27",
});
import pulumi
import pulumi_edgecenter as edgecenter
protected_example_com = edgecenter.ProtectionResource("protectedExampleCom", tls=[
"1.2",
"1.3",
])
blacklist1 = edgecenter.ProtectionResourceBlacklistEntry("blacklist1",
resource=protected_example_com.protection_resource_id,
ip="1.2.3.4")
blacklist2 = edgecenter.ProtectionResourceBlacklistEntry("blacklist2",
resource=protected_example_com.protection_resource_id,
ip="1.2.4.0/27")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/edgecenter/edgecenter"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
protectedExampleCom, err := edgecenter.NewProtectionResource(ctx, "protectedExampleCom", &edgecenter.ProtectionResourceArgs{
Tls: pulumi.StringArray{
pulumi.String("1.2"),
pulumi.String("1.3"),
},
})
if err != nil {
return err
}
_, err = edgecenter.NewProtectionResourceBlacklistEntry(ctx, "blacklist1", &edgecenter.ProtectionResourceBlacklistEntryArgs{
Resource: protectedExampleCom.ProtectionResourceId,
Ip: pulumi.String("1.2.3.4"),
})
if err != nil {
return err
}
_, err = edgecenter.NewProtectionResourceBlacklistEntry(ctx, "blacklist2", &edgecenter.ProtectionResourceBlacklistEntryArgs{
Resource: protectedExampleCom.ProtectionResourceId,
Ip: pulumi.String("1.2.4.0/27"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Edgecenter = Pulumi.Edgecenter;
return await Deployment.RunAsync(() =>
{
var protectedExampleCom = new Edgecenter.ProtectionResource("protectedExampleCom", new()
{
Tls = new[]
{
"1.2",
"1.3",
},
});
var blacklist1 = new Edgecenter.ProtectionResourceBlacklistEntry("blacklist1", new()
{
Resource = protectedExampleCom.ProtectionResourceId,
Ip = "1.2.3.4",
});
var blacklist2 = new Edgecenter.ProtectionResourceBlacklistEntry("blacklist2", new()
{
Resource = protectedExampleCom.ProtectionResourceId,
Ip = "1.2.4.0/27",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.edgecenter.ProtectionResource;
import com.pulumi.edgecenter.ProtectionResourceArgs;
import com.pulumi.edgecenter.ProtectionResourceBlacklistEntry;
import com.pulumi.edgecenter.ProtectionResourceBlacklistEntryArgs;
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 protectedExampleCom = new ProtectionResource("protectedExampleCom", ProtectionResourceArgs.builder()
.tls(
"1.2",
"1.3")
.build());
var blacklist1 = new ProtectionResourceBlacklistEntry("blacklist1", ProtectionResourceBlacklistEntryArgs.builder()
.resource(protectedExampleCom.protectionResourceId())
.ip("1.2.3.4")
.build());
var blacklist2 = new ProtectionResourceBlacklistEntry("blacklist2", ProtectionResourceBlacklistEntryArgs.builder()
.resource(protectedExampleCom.protectionResourceId())
.ip("1.2.4.0/27")
.build());
}
}
resources:
protectedExampleCom:
type: edgecenter:ProtectionResource
properties:
tls:
- '1.2'
- '1.3'
blacklist1:
type: edgecenter:ProtectionResourceBlacklistEntry
properties:
resource: ${protectedExampleCom.protectionResourceId}
ip: 1.2.3.4
blacklist2:
type: edgecenter:ProtectionResourceBlacklistEntry
properties:
resource: ${protectedExampleCom.protectionResourceId}
ip: 1.2.4.0/27
Create ProtectionResourceBlacklistEntry Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ProtectionResourceBlacklistEntry(name: string, args: ProtectionResourceBlacklistEntryArgs, opts?: CustomResourceOptions);
@overload
def ProtectionResourceBlacklistEntry(resource_name: str,
args: ProtectionResourceBlacklistEntryArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ProtectionResourceBlacklistEntry(resource_name: str,
opts: Optional[ResourceOptions] = None,
ip: Optional[str] = None,
resource: Optional[str] = None,
protection_resource_blacklist_entry_id: Optional[str] = None)
func NewProtectionResourceBlacklistEntry(ctx *Context, name string, args ProtectionResourceBlacklistEntryArgs, opts ...ResourceOption) (*ProtectionResourceBlacklistEntry, error)
public ProtectionResourceBlacklistEntry(string name, ProtectionResourceBlacklistEntryArgs args, CustomResourceOptions? opts = null)
public ProtectionResourceBlacklistEntry(String name, ProtectionResourceBlacklistEntryArgs args)
public ProtectionResourceBlacklistEntry(String name, ProtectionResourceBlacklistEntryArgs args, CustomResourceOptions options)
type: edgecenter:ProtectionResourceBlacklistEntry
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 ProtectionResourceBlacklistEntryArgs
- 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 ProtectionResourceBlacklistEntryArgs
- 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 ProtectionResourceBlacklistEntryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProtectionResourceBlacklistEntryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ProtectionResourceBlacklistEntryArgs
- 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 protectionResourceBlacklistEntryResource = new Edgecenter.ProtectionResourceBlacklistEntry("protectionResourceBlacklistEntryResource", new()
{
Ip = "string",
Resource = "string",
ProtectionResourceBlacklistEntryId = "string",
});
example, err := edgecenter.NewProtectionResourceBlacklistEntry(ctx, "protectionResourceBlacklistEntryResource", &edgecenter.ProtectionResourceBlacklistEntryArgs{
Ip: pulumi.String("string"),
Resource: pulumi.String("string"),
ProtectionResourceBlacklistEntryId: pulumi.String("string"),
})
var protectionResourceBlacklistEntryResource = new ProtectionResourceBlacklistEntry("protectionResourceBlacklistEntryResource", ProtectionResourceBlacklistEntryArgs.builder()
.ip("string")
.resource("string")
.protectionResourceBlacklistEntryId("string")
.build());
protection_resource_blacklist_entry_resource = edgecenter.ProtectionResourceBlacklistEntry("protectionResourceBlacklistEntryResource",
ip="string",
resource="string",
protection_resource_blacklist_entry_id="string")
const protectionResourceBlacklistEntryResource = new edgecenter.ProtectionResourceBlacklistEntry("protectionResourceBlacklistEntryResource", {
ip: "string",
resource: "string",
protectionResourceBlacklistEntryId: "string",
});
type: edgecenter:ProtectionResourceBlacklistEntry
properties:
ip: string
protectionResourceBlacklistEntryId: string
resource: string
ProtectionResourceBlacklistEntry 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 ProtectionResourceBlacklistEntry resource accepts the following input properties:
- Ip string
- Blocked IP address.
- Resource string
- ID of the DDoS protection resource to add blacklist to.
- Protection
Resource stringBlacklist Entry Id - The ID of this resource.
- Ip string
- Blocked IP address.
- Resource string
- ID of the DDoS protection resource to add blacklist to.
- Protection
Resource stringBlacklist Entry Id - The ID of this resource.
- ip String
- Blocked IP address.
- resource String
- ID of the DDoS protection resource to add blacklist to.
- protection
Resource StringBlacklist Entry Id - The ID of this resource.
- ip string
- Blocked IP address.
- resource string
- ID of the DDoS protection resource to add blacklist to.
- protection
Resource stringBlacklist Entry Id - The ID of this resource.
- ip str
- Blocked IP address.
- resource str
- ID of the DDoS protection resource to add blacklist to.
- protection_
resource_ strblacklist_ entry_ id - The ID of this resource.
- ip String
- Blocked IP address.
- resource String
- ID of the DDoS protection resource to add blacklist to.
- protection
Resource StringBlacklist Entry Id - The ID of this resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the ProtectionResourceBlacklistEntry 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 ProtectionResourceBlacklistEntry Resource
Get an existing ProtectionResourceBlacklistEntry 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?: ProtectionResourceBlacklistEntryState, opts?: CustomResourceOptions): ProtectionResourceBlacklistEntry
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
ip: Optional[str] = None,
protection_resource_blacklist_entry_id: Optional[str] = None,
resource: Optional[str] = None) -> ProtectionResourceBlacklistEntry
func GetProtectionResourceBlacklistEntry(ctx *Context, name string, id IDInput, state *ProtectionResourceBlacklistEntryState, opts ...ResourceOption) (*ProtectionResourceBlacklistEntry, error)
public static ProtectionResourceBlacklistEntry Get(string name, Input<string> id, ProtectionResourceBlacklistEntryState? state, CustomResourceOptions? opts = null)
public static ProtectionResourceBlacklistEntry get(String name, Output<String> id, ProtectionResourceBlacklistEntryState state, CustomResourceOptions options)
resources: _: type: edgecenter:ProtectionResourceBlacklistEntry 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.
- Ip string
- Blocked IP address.
- Protection
Resource stringBlacklist Entry Id - The ID of this resource.
- Resource string
- ID of the DDoS protection resource to add blacklist to.
- Ip string
- Blocked IP address.
- Protection
Resource stringBlacklist Entry Id - The ID of this resource.
- Resource string
- ID of the DDoS protection resource to add blacklist to.
- ip String
- Blocked IP address.
- protection
Resource StringBlacklist Entry Id - The ID of this resource.
- resource String
- ID of the DDoS protection resource to add blacklist to.
- ip string
- Blocked IP address.
- protection
Resource stringBlacklist Entry Id - The ID of this resource.
- resource string
- ID of the DDoS protection resource to add blacklist to.
- ip str
- Blocked IP address.
- protection_
resource_ strblacklist_ entry_ id - The ID of this resource.
- resource str
- ID of the DDoS protection resource to add blacklist to.
- ip String
- Blocked IP address.
- protection
Resource StringBlacklist Entry Id - The ID of this resource.
- resource String
- ID of the DDoS protection resource to add blacklist to.
Import
import using <resource_id>:<entry_id> format
$ pulumi import edgecenter:index/protectionResourceBlacklistEntry:ProtectionResourceBlacklistEntry blacklist1 12345:67
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- edgecenter edge-center/terraform-provider-edgecenter
- License
- Notes
- This Pulumi package is based on the
edgecenter
Terraform Provider.