1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. threatdetection
  5. HoneypotPreset
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.threatdetection.HoneypotPreset

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    Provides a Threat Detection Honeypot Preset resource.

    For information about Threat Detection Honeypot Preset and how to use it, see What is Honeypot Preset.

    NOTE: Available since v1.195.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "tfexample";
    const default = alicloud.threatdetection.getHoneypotImages({
        nameRegex: "^ruoyi",
    });
    const defaultHoneypotNode = new alicloud.threatdetection.HoneypotNode("default", {
        nodeName: name,
        availableProbeNum: 20,
        securityGroupProbeIpLists: ["0.0.0.0/0"],
    });
    const defaultHoneypotPreset = new alicloud.threatdetection.HoneypotPreset("default", {
        presetName: name,
        nodeId: defaultHoneypotNode.id,
        honeypotImageName: _default.then(_default => _default.images?.[0]?.honeypotImageName),
        meta: {
            portraitOption: true,
            burp: "open",
            trojanGit: "open",
        },
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tfexample"
    default = alicloud.threatdetection.get_honeypot_images(name_regex="^ruoyi")
    default_honeypot_node = alicloud.threatdetection.HoneypotNode("default",
        node_name=name,
        available_probe_num=20,
        security_group_probe_ip_lists=["0.0.0.0/0"])
    default_honeypot_preset = alicloud.threatdetection.HoneypotPreset("default",
        preset_name=name,
        node_id=default_honeypot_node.id,
        honeypot_image_name=default.images[0].honeypot_image_name,
        meta={
            "portrait_option": True,
            "burp": "open",
            "trojan_git": "open",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/threatdetection"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "tfexample"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_default, err := threatdetection.GetHoneypotImages(ctx, &threatdetection.GetHoneypotImagesArgs{
    			NameRegex: pulumi.StringRef("^ruoyi"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultHoneypotNode, err := threatdetection.NewHoneypotNode(ctx, "default", &threatdetection.HoneypotNodeArgs{
    			NodeName:          pulumi.String(name),
    			AvailableProbeNum: pulumi.Int(20),
    			SecurityGroupProbeIpLists: pulumi.StringArray{
    				pulumi.String("0.0.0.0/0"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = threatdetection.NewHoneypotPreset(ctx, "default", &threatdetection.HoneypotPresetArgs{
    			PresetName:        pulumi.String(name),
    			NodeId:            defaultHoneypotNode.ID(),
    			HoneypotImageName: pulumi.String(_default.Images[0].HoneypotImageName),
    			Meta: &threatdetection.HoneypotPresetMetaArgs{
    				PortraitOption: pulumi.Bool(true),
    				Burp:           pulumi.String("open"),
    				TrojanGit:      pulumi.String("open"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "tfexample";
        var @default = AliCloud.ThreatDetection.GetHoneypotImages.Invoke(new()
        {
            NameRegex = "^ruoyi",
        });
    
        var defaultHoneypotNode = new AliCloud.ThreatDetection.HoneypotNode("default", new()
        {
            NodeName = name,
            AvailableProbeNum = 20,
            SecurityGroupProbeIpLists = new[]
            {
                "0.0.0.0/0",
            },
        });
    
        var defaultHoneypotPreset = new AliCloud.ThreatDetection.HoneypotPreset("default", new()
        {
            PresetName = name,
            NodeId = defaultHoneypotNode.Id,
            HoneypotImageName = @default.Apply(@default => @default.Apply(getHoneypotImagesResult => getHoneypotImagesResult.Images[0]?.HoneypotImageName)),
            Meta = new AliCloud.ThreatDetection.Inputs.HoneypotPresetMetaArgs
            {
                PortraitOption = true,
                Burp = "open",
                TrojanGit = "open",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.threatdetection.ThreatdetectionFunctions;
    import com.pulumi.alicloud.threatdetection.inputs.GetHoneypotImagesArgs;
    import com.pulumi.alicloud.threatdetection.HoneypotNode;
    import com.pulumi.alicloud.threatdetection.HoneypotNodeArgs;
    import com.pulumi.alicloud.threatdetection.HoneypotPreset;
    import com.pulumi.alicloud.threatdetection.HoneypotPresetArgs;
    import com.pulumi.alicloud.threatdetection.inputs.HoneypotPresetMetaArgs;
    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) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("tfexample");
            final var default = ThreatdetectionFunctions.getHoneypotImages(GetHoneypotImagesArgs.builder()
                .nameRegex("^ruoyi")
                .build());
    
            var defaultHoneypotNode = new HoneypotNode("defaultHoneypotNode", HoneypotNodeArgs.builder()
                .nodeName(name)
                .availableProbeNum(20)
                .securityGroupProbeIpLists("0.0.0.0/0")
                .build());
    
            var defaultHoneypotPreset = new HoneypotPreset("defaultHoneypotPreset", HoneypotPresetArgs.builder()
                .presetName(name)
                .nodeId(defaultHoneypotNode.id())
                .honeypotImageName(default_.images()[0].honeypotImageName())
                .meta(HoneypotPresetMetaArgs.builder()
                    .portraitOption(true)
                    .burp("open")
                    .trojanGit("open")
                    .build())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tfexample
    resources:
      defaultHoneypotNode:
        type: alicloud:threatdetection:HoneypotNode
        name: default
        properties:
          nodeName: ${name}
          availableProbeNum: 20
          securityGroupProbeIpLists:
            - 0.0.0.0/0
      defaultHoneypotPreset:
        type: alicloud:threatdetection:HoneypotPreset
        name: default
        properties:
          presetName: ${name}
          nodeId: ${defaultHoneypotNode.id}
          honeypotImageName: ${default.images[0].honeypotImageName}
          meta:
            portraitOption: true
            burp: open
            trojanGit: open
    variables:
      default:
        fn::invoke:
          Function: alicloud:threatdetection:getHoneypotImages
          Arguments:
            nameRegex: ^ruoyi
    

    Create HoneypotPreset Resource

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

    Constructor syntax

    new HoneypotPreset(name: string, args: HoneypotPresetArgs, opts?: CustomResourceOptions);
    @overload
    def HoneypotPreset(resource_name: str,
                       args: HoneypotPresetArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def HoneypotPreset(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       honeypot_image_name: Optional[str] = None,
                       meta: Optional[HoneypotPresetMetaArgs] = None,
                       node_id: Optional[str] = None,
                       preset_name: Optional[str] = None)
    func NewHoneypotPreset(ctx *Context, name string, args HoneypotPresetArgs, opts ...ResourceOption) (*HoneypotPreset, error)
    public HoneypotPreset(string name, HoneypotPresetArgs args, CustomResourceOptions? opts = null)
    public HoneypotPreset(String name, HoneypotPresetArgs args)
    public HoneypotPreset(String name, HoneypotPresetArgs args, CustomResourceOptions options)
    
    type: alicloud:threatdetection:HoneypotPreset
    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 HoneypotPresetArgs
    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 HoneypotPresetArgs
    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 HoneypotPresetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args HoneypotPresetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args HoneypotPresetArgs
    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 honeypotPresetResource = new AliCloud.ThreatDetection.HoneypotPreset("honeypotPresetResource", new()
    {
        HoneypotImageName = "string",
        Meta = new AliCloud.ThreatDetection.Inputs.HoneypotPresetMetaArgs
        {
            Burp = "string",
            PortraitOption = false,
            TrojanGit = "string",
        },
        NodeId = "string",
        PresetName = "string",
    });
    
    example, err := threatdetection.NewHoneypotPreset(ctx, "honeypotPresetResource", &threatdetection.HoneypotPresetArgs{
    	HoneypotImageName: pulumi.String("string"),
    	Meta: &threatdetection.HoneypotPresetMetaArgs{
    		Burp:           pulumi.String("string"),
    		PortraitOption: pulumi.Bool(false),
    		TrojanGit:      pulumi.String("string"),
    	},
    	NodeId:     pulumi.String("string"),
    	PresetName: pulumi.String("string"),
    })
    
    var honeypotPresetResource = new HoneypotPreset("honeypotPresetResource", HoneypotPresetArgs.builder()
        .honeypotImageName("string")
        .meta(HoneypotPresetMetaArgs.builder()
            .burp("string")
            .portraitOption(false)
            .trojanGit("string")
            .build())
        .nodeId("string")
        .presetName("string")
        .build());
    
    honeypot_preset_resource = alicloud.threatdetection.HoneypotPreset("honeypotPresetResource",
        honeypot_image_name="string",
        meta={
            "burp": "string",
            "portrait_option": False,
            "trojan_git": "string",
        },
        node_id="string",
        preset_name="string")
    
    const honeypotPresetResource = new alicloud.threatdetection.HoneypotPreset("honeypotPresetResource", {
        honeypotImageName: "string",
        meta: {
            burp: "string",
            portraitOption: false,
            trojanGit: "string",
        },
        nodeId: "string",
        presetName: "string",
    });
    
    type: alicloud:threatdetection:HoneypotPreset
    properties:
        honeypotImageName: string
        meta:
            burp: string
            portraitOption: false
            trojanGit: string
        nodeId: string
        presetName: string
    

    HoneypotPreset 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 HoneypotPreset resource accepts the following input properties:

    HoneypotImageName string
    Honeypot mirror name
    Meta Pulumi.AliCloud.ThreatDetection.Inputs.HoneypotPresetMeta
    Honeypot template custom parameters. See meta below.
    NodeId string
    Unique id of management node
    PresetName string
    Honeypot template custom name
    HoneypotImageName string
    Honeypot mirror name
    Meta HoneypotPresetMetaArgs
    Honeypot template custom parameters. See meta below.
    NodeId string
    Unique id of management node
    PresetName string
    Honeypot template custom name
    honeypotImageName String
    Honeypot mirror name
    meta HoneypotPresetMeta
    Honeypot template custom parameters. See meta below.
    nodeId String
    Unique id of management node
    presetName String
    Honeypot template custom name
    honeypotImageName string
    Honeypot mirror name
    meta HoneypotPresetMeta
    Honeypot template custom parameters. See meta below.
    nodeId string
    Unique id of management node
    presetName string
    Honeypot template custom name
    honeypot_image_name str
    Honeypot mirror name
    meta HoneypotPresetMetaArgs
    Honeypot template custom parameters. See meta below.
    node_id str
    Unique id of management node
    preset_name str
    Honeypot template custom name
    honeypotImageName String
    Honeypot mirror name
    meta Property Map
    Honeypot template custom parameters. See meta below.
    nodeId String
    Unique id of management node
    presetName String
    Honeypot template custom name

    Outputs

    All input properties are implicitly available as output properties. Additionally, the HoneypotPreset resource produces the following output properties:

    HoneypotPresetId string
    Unique ID of honeypot Template
    Id string
    The provider-assigned unique ID for this managed resource.
    HoneypotPresetId string
    Unique ID of honeypot Template
    Id string
    The provider-assigned unique ID for this managed resource.
    honeypotPresetId String
    Unique ID of honeypot Template
    id String
    The provider-assigned unique ID for this managed resource.
    honeypotPresetId string
    Unique ID of honeypot Template
    id string
    The provider-assigned unique ID for this managed resource.
    honeypot_preset_id str
    Unique ID of honeypot Template
    id str
    The provider-assigned unique ID for this managed resource.
    honeypotPresetId String
    Unique ID of honeypot Template
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing HoneypotPreset Resource

    Get an existing HoneypotPreset 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?: HoneypotPresetState, opts?: CustomResourceOptions): HoneypotPreset
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            honeypot_image_name: Optional[str] = None,
            honeypot_preset_id: Optional[str] = None,
            meta: Optional[HoneypotPresetMetaArgs] = None,
            node_id: Optional[str] = None,
            preset_name: Optional[str] = None) -> HoneypotPreset
    func GetHoneypotPreset(ctx *Context, name string, id IDInput, state *HoneypotPresetState, opts ...ResourceOption) (*HoneypotPreset, error)
    public static HoneypotPreset Get(string name, Input<string> id, HoneypotPresetState? state, CustomResourceOptions? opts = null)
    public static HoneypotPreset get(String name, Output<String> id, HoneypotPresetState 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:
    HoneypotImageName string
    Honeypot mirror name
    HoneypotPresetId string
    Unique ID of honeypot Template
    Meta Pulumi.AliCloud.ThreatDetection.Inputs.HoneypotPresetMeta
    Honeypot template custom parameters. See meta below.
    NodeId string
    Unique id of management node
    PresetName string
    Honeypot template custom name
    HoneypotImageName string
    Honeypot mirror name
    HoneypotPresetId string
    Unique ID of honeypot Template
    Meta HoneypotPresetMetaArgs
    Honeypot template custom parameters. See meta below.
    NodeId string
    Unique id of management node
    PresetName string
    Honeypot template custom name
    honeypotImageName String
    Honeypot mirror name
    honeypotPresetId String
    Unique ID of honeypot Template
    meta HoneypotPresetMeta
    Honeypot template custom parameters. See meta below.
    nodeId String
    Unique id of management node
    presetName String
    Honeypot template custom name
    honeypotImageName string
    Honeypot mirror name
    honeypotPresetId string
    Unique ID of honeypot Template
    meta HoneypotPresetMeta
    Honeypot template custom parameters. See meta below.
    nodeId string
    Unique id of management node
    presetName string
    Honeypot template custom name
    honeypot_image_name str
    Honeypot mirror name
    honeypot_preset_id str
    Unique ID of honeypot Template
    meta HoneypotPresetMetaArgs
    Honeypot template custom parameters. See meta below.
    node_id str
    Unique id of management node
    preset_name str
    Honeypot template custom name
    honeypotImageName String
    Honeypot mirror name
    honeypotPresetId String
    Unique ID of honeypot Template
    meta Property Map
    Honeypot template custom parameters. See meta below.
    nodeId String
    Unique id of management node
    presetName String
    Honeypot template custom name

    Supporting Types

    HoneypotPresetMeta, HoneypotPresetMetaArgs

    Burp string
    Burp counter.
    PortraitOption bool
    Social traceability.
    TrojanGit string
    Git countered.
    Burp string
    Burp counter.
    PortraitOption bool
    Social traceability.
    TrojanGit string
    Git countered.
    burp String
    Burp counter.
    portraitOption Boolean
    Social traceability.
    trojanGit String
    Git countered.
    burp string
    Burp counter.
    portraitOption boolean
    Social traceability.
    trojanGit string
    Git countered.
    burp str
    Burp counter.
    portrait_option bool
    Social traceability.
    trojan_git str
    Git countered.
    burp String
    Burp counter.
    portraitOption Boolean
    Social traceability.
    trojanGit String
    Git countered.

    Import

    Threat Detection Honeypot Preset can be imported using the id, e.g.

    $ pulumi import alicloud:threatdetection/honeypotPreset:HoneypotPreset example <id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi