1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. threatdetection
  5. HoneyPot
Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi

alicloud.threatdetection.HoneyPot

Explore with Pulumi AI

Provides a Threat Detection Honey Pot resource.

For information about Threat Detection Honey Pot and how to use it, see What is Honey Pot.

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 defaultHoneyPot = new alicloud.threatdetection.HoneyPot("default", {
    honeypotImageName: _default.then(_default => _default.images?.[0]?.honeypotImageName),
    honeypotImageId: _default.then(_default => _default.images?.[0]?.honeypotImageId),
    honeypotName: name,
    nodeId: defaultHoneypotNode.id,
});
Copy
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_honey_pot = alicloud.threatdetection.HoneyPot("default",
    honeypot_image_name=default.images[0].honeypot_image_name,
    honeypot_image_id=default.images[0].honeypot_image_id,
    honeypot_name=name,
    node_id=default_honeypot_node.id)
Copy
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.NewHoneyPot(ctx, "default", &threatdetection.HoneyPotArgs{
			HoneypotImageName: pulumi.String(_default.Images[0].HoneypotImageName),
			HoneypotImageId:   pulumi.String(_default.Images[0].HoneypotImageId),
			HoneypotName:      pulumi.String(name),
			NodeId:            defaultHoneypotNode.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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 defaultHoneyPot = new AliCloud.ThreatDetection.HoneyPot("default", new()
    {
        HoneypotImageName = @default.Apply(@default => @default.Apply(getHoneypotImagesResult => getHoneypotImagesResult.Images[0]?.HoneypotImageName)),
        HoneypotImageId = @default.Apply(@default => @default.Apply(getHoneypotImagesResult => getHoneypotImagesResult.Images[0]?.HoneypotImageId)),
        HoneypotName = name,
        NodeId = defaultHoneypotNode.Id,
    });

});
Copy
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.HoneyPot;
import com.pulumi.alicloud.threatdetection.HoneyPotArgs;
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 defaultHoneyPot = new HoneyPot("defaultHoneyPot", HoneyPotArgs.builder()
            .honeypotImageName(default_.images()[0].honeypotImageName())
            .honeypotImageId(default_.images()[0].honeypotImageId())
            .honeypotName(name)
            .nodeId(defaultHoneypotNode.id())
            .build());

    }
}
Copy
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
  defaultHoneyPot:
    type: alicloud:threatdetection:HoneyPot
    name: default
    properties:
      honeypotImageName: ${default.images[0].honeypotImageName}
      honeypotImageId: ${default.images[0].honeypotImageId}
      honeypotName: ${name}
      nodeId: ${defaultHoneypotNode.id}
variables:
  default:
    fn::invoke:
      function: alicloud:threatdetection:getHoneypotImages
      arguments:
        nameRegex: ^ruoyi
Copy

Create HoneyPot Resource

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

Constructor syntax

new HoneyPot(name: string, args: HoneyPotArgs, opts?: CustomResourceOptions);
@overload
def HoneyPot(resource_name: str,
             args: HoneyPotArgs,
             opts: Optional[ResourceOptions] = None)

@overload
def HoneyPot(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             honeypot_image_id: Optional[str] = None,
             honeypot_image_name: Optional[str] = None,
             honeypot_name: Optional[str] = None,
             node_id: Optional[str] = None)
func NewHoneyPot(ctx *Context, name string, args HoneyPotArgs, opts ...ResourceOption) (*HoneyPot, error)
public HoneyPot(string name, HoneyPotArgs args, CustomResourceOptions? opts = null)
public HoneyPot(String name, HoneyPotArgs args)
public HoneyPot(String name, HoneyPotArgs args, CustomResourceOptions options)
type: alicloud:threatdetection:HoneyPot
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. HoneyPotArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. HoneyPotArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. HoneyPotArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. HoneyPotArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. HoneyPotArgs
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 honeyPotResource = new AliCloud.ThreatDetection.HoneyPot("honeyPotResource", new()
{
    HoneypotImageId = "string",
    HoneypotImageName = "string",
    HoneypotName = "string",
    NodeId = "string",
});
Copy
example, err := threatdetection.NewHoneyPot(ctx, "honeyPotResource", &threatdetection.HoneyPotArgs{
	HoneypotImageId:   pulumi.String("string"),
	HoneypotImageName: pulumi.String("string"),
	HoneypotName:      pulumi.String("string"),
	NodeId:            pulumi.String("string"),
})
Copy
var honeyPotResource = new HoneyPot("honeyPotResource", HoneyPotArgs.builder()
    .honeypotImageId("string")
    .honeypotImageName("string")
    .honeypotName("string")
    .nodeId("string")
    .build());
Copy
honey_pot_resource = alicloud.threatdetection.HoneyPot("honeyPotResource",
    honeypot_image_id="string",
    honeypot_image_name="string",
    honeypot_name="string",
    node_id="string")
Copy
const honeyPotResource = new alicloud.threatdetection.HoneyPot("honeyPotResource", {
    honeypotImageId: "string",
    honeypotImageName: "string",
    honeypotName: "string",
    nodeId: "string",
});
Copy
type: alicloud:threatdetection:HoneyPot
properties:
    honeypotImageId: string
    honeypotImageName: string
    honeypotName: string
    nodeId: string
Copy

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

HoneypotImageId
This property is required.
Changes to this property will trigger replacement.
string
The image ID of the honeypot.
HoneypotImageName
This property is required.
Changes to this property will trigger replacement.
string
Honeypot mirror name.
HoneypotName This property is required. string
Honeypot custom name.
NodeId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the honeypot management node.
HoneypotImageId
This property is required.
Changes to this property will trigger replacement.
string
The image ID of the honeypot.
HoneypotImageName
This property is required.
Changes to this property will trigger replacement.
string
Honeypot mirror name.
HoneypotName This property is required. string
Honeypot custom name.
NodeId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the honeypot management node.
honeypotImageId
This property is required.
Changes to this property will trigger replacement.
String
The image ID of the honeypot.
honeypotImageName
This property is required.
Changes to this property will trigger replacement.
String
Honeypot mirror name.
honeypotName This property is required. String
Honeypot custom name.
nodeId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the honeypot management node.
honeypotImageId
This property is required.
Changes to this property will trigger replacement.
string
The image ID of the honeypot.
honeypotImageName
This property is required.
Changes to this property will trigger replacement.
string
Honeypot mirror name.
honeypotName This property is required. string
Honeypot custom name.
nodeId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the honeypot management node.
honeypot_image_id
This property is required.
Changes to this property will trigger replacement.
str
The image ID of the honeypot.
honeypot_image_name
This property is required.
Changes to this property will trigger replacement.
str
Honeypot mirror name.
honeypot_name This property is required. str
Honeypot custom name.
node_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the honeypot management node.
honeypotImageId
This property is required.
Changes to this property will trigger replacement.
String
The image ID of the honeypot.
honeypotImageName
This property is required.
Changes to this property will trigger replacement.
String
Honeypot mirror name.
honeypotName This property is required. String
Honeypot custom name.
nodeId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the honeypot management node.

Outputs

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

HoneypotId string
Honeypot ID.
Id string
The provider-assigned unique ID for this managed resource.
PresetId string
The custom parameter ID of honeypot.
States List<string>
Honeypot status.
Status string
The status of the resource.
HoneypotId string
Honeypot ID.
Id string
The provider-assigned unique ID for this managed resource.
PresetId string
The custom parameter ID of honeypot.
States []string
Honeypot status.
Status string
The status of the resource.
honeypotId String
Honeypot ID.
id String
The provider-assigned unique ID for this managed resource.
presetId String
The custom parameter ID of honeypot.
states List<String>
Honeypot status.
status String
The status of the resource.
honeypotId string
Honeypot ID.
id string
The provider-assigned unique ID for this managed resource.
presetId string
The custom parameter ID of honeypot.
states string[]
Honeypot status.
status string
The status of the resource.
honeypot_id str
Honeypot ID.
id str
The provider-assigned unique ID for this managed resource.
preset_id str
The custom parameter ID of honeypot.
states Sequence[str]
Honeypot status.
status str
The status of the resource.
honeypotId String
Honeypot ID.
id String
The provider-assigned unique ID for this managed resource.
presetId String
The custom parameter ID of honeypot.
states List<String>
Honeypot status.
status String
The status of the resource.

Look up Existing HoneyPot Resource

Get an existing HoneyPot 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?: HoneyPotState, opts?: CustomResourceOptions): HoneyPot
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        honeypot_id: Optional[str] = None,
        honeypot_image_id: Optional[str] = None,
        honeypot_image_name: Optional[str] = None,
        honeypot_name: Optional[str] = None,
        node_id: Optional[str] = None,
        preset_id: Optional[str] = None,
        states: Optional[Sequence[str]] = None,
        status: Optional[str] = None) -> HoneyPot
func GetHoneyPot(ctx *Context, name string, id IDInput, state *HoneyPotState, opts ...ResourceOption) (*HoneyPot, error)
public static HoneyPot Get(string name, Input<string> id, HoneyPotState? state, CustomResourceOptions? opts = null)
public static HoneyPot get(String name, Output<String> id, HoneyPotState state, CustomResourceOptions options)
resources:  _:    type: alicloud:threatdetection:HoneyPot    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
HoneypotId string
Honeypot ID.
HoneypotImageId Changes to this property will trigger replacement. string
The image ID of the honeypot.
HoneypotImageName Changes to this property will trigger replacement. string
Honeypot mirror name.
HoneypotName string
Honeypot custom name.
NodeId Changes to this property will trigger replacement. string
The ID of the honeypot management node.
PresetId string
The custom parameter ID of honeypot.
States List<string>
Honeypot status.
Status string
The status of the resource.
HoneypotId string
Honeypot ID.
HoneypotImageId Changes to this property will trigger replacement. string
The image ID of the honeypot.
HoneypotImageName Changes to this property will trigger replacement. string
Honeypot mirror name.
HoneypotName string
Honeypot custom name.
NodeId Changes to this property will trigger replacement. string
The ID of the honeypot management node.
PresetId string
The custom parameter ID of honeypot.
States []string
Honeypot status.
Status string
The status of the resource.
honeypotId String
Honeypot ID.
honeypotImageId Changes to this property will trigger replacement. String
The image ID of the honeypot.
honeypotImageName Changes to this property will trigger replacement. String
Honeypot mirror name.
honeypotName String
Honeypot custom name.
nodeId Changes to this property will trigger replacement. String
The ID of the honeypot management node.
presetId String
The custom parameter ID of honeypot.
states List<String>
Honeypot status.
status String
The status of the resource.
honeypotId string
Honeypot ID.
honeypotImageId Changes to this property will trigger replacement. string
The image ID of the honeypot.
honeypotImageName Changes to this property will trigger replacement. string
Honeypot mirror name.
honeypotName string
Honeypot custom name.
nodeId Changes to this property will trigger replacement. string
The ID of the honeypot management node.
presetId string
The custom parameter ID of honeypot.
states string[]
Honeypot status.
status string
The status of the resource.
honeypot_id str
Honeypot ID.
honeypot_image_id Changes to this property will trigger replacement. str
The image ID of the honeypot.
honeypot_image_name Changes to this property will trigger replacement. str
Honeypot mirror name.
honeypot_name str
Honeypot custom name.
node_id Changes to this property will trigger replacement. str
The ID of the honeypot management node.
preset_id str
The custom parameter ID of honeypot.
states Sequence[str]
Honeypot status.
status str
The status of the resource.
honeypotId String
Honeypot ID.
honeypotImageId Changes to this property will trigger replacement. String
The image ID of the honeypot.
honeypotImageName Changes to this property will trigger replacement. String
Honeypot mirror name.
honeypotName String
Honeypot custom name.
nodeId Changes to this property will trigger replacement. String
The ID of the honeypot management node.
presetId String
The custom parameter ID of honeypot.
states List<String>
Honeypot status.
status String
The status of the resource.

Import

Threat Detection Honey Pot can be imported using the id, e.g.

$ pulumi import alicloud:threatdetection/honeyPot:HoneyPot example <id>
Copy

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.