1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. threatdetection
  5. ImageEventOperation
Alibaba Cloud v3.86.1 published on Saturday, Sep 27, 2025 by Pulumi

alicloud.threatdetection.ImageEventOperation

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.86.1 published on Saturday, Sep 27, 2025 by Pulumi

    Provides a Threat Detection Image Event Operation resource.

    Image Event Operation.

    For information about Threat Detection Image Event Operation and how to use it, see What is Image Event Operation.

    NOTE: Available since v1.212.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") || "terraform-example";
    const _default = new alicloud.threatdetection.ImageEventOperation("default", {
        eventType: "maliciousFile",
        operationCode: "whitelist",
        eventKey: "alibabacloud_ak",
        scenarios: `{
      \\"type\\":\\"default\\",
      \\"value\\":\\"\\"
    }
    `,
        eventName: "阿里云AK",
        conditions: `[
      {
          \\"condition\\":\\"MD5\\",
          \\"type\\":\\"equals\\",
          \\"value\\":\\"0083a31cc0083a31ccf7c10367a6e783e\\"
      }
    ]
    `,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default = alicloud.threatdetection.ImageEventOperation("default",
        event_type="maliciousFile",
        operation_code="whitelist",
        event_key="alibabacloud_ak",
        scenarios="""{
      \"type\":\"default\",
      \"value\":\"\"
    }
    """,
        event_name="阿里云AK",
        conditions="""[
      {
          \"condition\":\"MD5\",
          \"type\":\"equals\",
          \"value\":\"0083a31cc0083a31ccf7c10367a6e783e\"
      }
    ]
    """)
    
    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 := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_, err := threatdetection.NewImageEventOperation(ctx, "default", &threatdetection.ImageEventOperationArgs{
    			EventType:     pulumi.String("maliciousFile"),
    			OperationCode: pulumi.String("whitelist"),
    			EventKey:      pulumi.String("alibabacloud_ak"),
    			Scenarios:     pulumi.String("{\n  \\\"type\\\":\\\"default\\\",\n  \\\"value\\\":\\\"\\\"\n}\n"),
    			EventName:     pulumi.String("阿里云AK"),
    			Conditions: pulumi.String(`[
      {
          \"condition\":\"MD5\",
          \"type\":\"equals\",
          \"value\":\"0083a31cc0083a31ccf7c10367a6e783e\"
      }
    ]
    `),
    		})
    		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") ?? "terraform-example";
        var @default = new AliCloud.ThreatDetection.ImageEventOperation("default", new()
        {
            EventType = "maliciousFile",
            OperationCode = "whitelist",
            EventKey = "alibabacloud_ak",
            Scenarios = @"{
      \""type\"":\""default\"",
      \""value\"":\""\""
    }
    ",
            EventName = "阿里云AK",
            Conditions = @"[
      {
          \""condition\"":\""MD5\"",
          \""type\"":\""equals\"",
          \""value\"":\""0083a31cc0083a31ccf7c10367a6e783e\""
      }
    ]
    ",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.threatdetection.ImageEventOperation;
    import com.pulumi.alicloud.threatdetection.ImageEventOperationArgs;
    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("terraform-example");
            var default_ = new ImageEventOperation("default", ImageEventOperationArgs.builder()
                .eventType("maliciousFile")
                .operationCode("whitelist")
                .eventKey("alibabacloud_ak")
                .scenarios("""
    {
      \"type\":\"default\",
      \"value\":\"\"
    }
                """)
                .eventName("阿里云AK")
                .conditions("""
    [
      {
          \"condition\":\"MD5\",
          \"type\":\"equals\",
          \"value\":\"0083a31cc0083a31ccf7c10367a6e783e\"
      }
    ]
                """)
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      default:
        type: alicloud:threatdetection:ImageEventOperation
        properties:
          eventType: maliciousFile
          operationCode: whitelist
          eventKey: alibabacloud_ak
          scenarios: |
            {
              \"type\":\"default\",
              \"value\":\"\"
            }        
          eventName: 阿里云AK
          conditions: |
            [
              {
                  \"condition\":\"MD5\",
                  \"type\":\"equals\",
                  \"value\":\"0083a31cc0083a31ccf7c10367a6e783e\"
              }
            ]        
    

    Create ImageEventOperation Resource

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

    Constructor syntax

    new ImageEventOperation(name: string, args: ImageEventOperationArgs, opts?: CustomResourceOptions);
    @overload
    def ImageEventOperation(resource_name: str,
                            args: ImageEventOperationArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def ImageEventOperation(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            conditions: Optional[str] = None,
                            event_type: Optional[str] = None,
                            operation_code: Optional[str] = None,
                            event_key: Optional[str] = None,
                            event_name: Optional[str] = None,
                            note: Optional[str] = None,
                            scenarios: Optional[str] = None,
                            source: Optional[str] = None)
    func NewImageEventOperation(ctx *Context, name string, args ImageEventOperationArgs, opts ...ResourceOption) (*ImageEventOperation, error)
    public ImageEventOperation(string name, ImageEventOperationArgs args, CustomResourceOptions? opts = null)
    public ImageEventOperation(String name, ImageEventOperationArgs args)
    public ImageEventOperation(String name, ImageEventOperationArgs args, CustomResourceOptions options)
    
    type: alicloud:threatdetection:ImageEventOperation
    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 ImageEventOperationArgs
    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 ImageEventOperationArgs
    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 ImageEventOperationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ImageEventOperationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ImageEventOperationArgs
    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 imageEventOperationResource = new AliCloud.ThreatDetection.ImageEventOperation("imageEventOperationResource", new()
    {
        Conditions = "string",
        EventType = "string",
        OperationCode = "string",
        EventKey = "string",
        EventName = "string",
        Note = "string",
        Scenarios = "string",
        Source = "string",
    });
    
    example, err := threatdetection.NewImageEventOperation(ctx, "imageEventOperationResource", &threatdetection.ImageEventOperationArgs{
    	Conditions:    pulumi.String("string"),
    	EventType:     pulumi.String("string"),
    	OperationCode: pulumi.String("string"),
    	EventKey:      pulumi.String("string"),
    	EventName:     pulumi.String("string"),
    	Note:          pulumi.String("string"),
    	Scenarios:     pulumi.String("string"),
    	Source:        pulumi.String("string"),
    })
    
    var imageEventOperationResource = new ImageEventOperation("imageEventOperationResource", ImageEventOperationArgs.builder()
        .conditions("string")
        .eventType("string")
        .operationCode("string")
        .eventKey("string")
        .eventName("string")
        .note("string")
        .scenarios("string")
        .source("string")
        .build());
    
    image_event_operation_resource = alicloud.threatdetection.ImageEventOperation("imageEventOperationResource",
        conditions="string",
        event_type="string",
        operation_code="string",
        event_key="string",
        event_name="string",
        note="string",
        scenarios="string",
        source="string")
    
    const imageEventOperationResource = new alicloud.threatdetection.ImageEventOperation("imageEventOperationResource", {
        conditions: "string",
        eventType: "string",
        operationCode: "string",
        eventKey: "string",
        eventName: "string",
        note: "string",
        scenarios: "string",
        source: "string",
    });
    
    type: alicloud:threatdetection:ImageEventOperation
    properties:
        conditions: string
        eventKey: string
        eventName: string
        eventType: string
        note: string
        operationCode: string
        scenarios: string
        source: string
    

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

    Conditions string
    The rule conditions. The value is in the JSON format. For more information, see How to use it. NOTE: From version 1.255.0, conditions can be modified.
    EventType string
    The alert type.
    OperationCode string
    The operation code.
    EventKey string
    The keyword of the alert item.
    EventName string
    The name of the alert item.
    Note string
    The remarks.
    Scenarios string
    The application scope of the rule.
    Source string
    The source of the whitelist. Valid values:
    Conditions string
    The rule conditions. The value is in the JSON format. For more information, see How to use it. NOTE: From version 1.255.0, conditions can be modified.
    EventType string
    The alert type.
    OperationCode string
    The operation code.
    EventKey string
    The keyword of the alert item.
    EventName string
    The name of the alert item.
    Note string
    The remarks.
    Scenarios string
    The application scope of the rule.
    Source string
    The source of the whitelist. Valid values:
    conditions String
    The rule conditions. The value is in the JSON format. For more information, see How to use it. NOTE: From version 1.255.0, conditions can be modified.
    eventType String
    The alert type.
    operationCode String
    The operation code.
    eventKey String
    The keyword of the alert item.
    eventName String
    The name of the alert item.
    note String
    The remarks.
    scenarios String
    The application scope of the rule.
    source String
    The source of the whitelist. Valid values:
    conditions string
    The rule conditions. The value is in the JSON format. For more information, see How to use it. NOTE: From version 1.255.0, conditions can be modified.
    eventType string
    The alert type.
    operationCode string
    The operation code.
    eventKey string
    The keyword of the alert item.
    eventName string
    The name of the alert item.
    note string
    The remarks.
    scenarios string
    The application scope of the rule.
    source string
    The source of the whitelist. Valid values:
    conditions str
    The rule conditions. The value is in the JSON format. For more information, see How to use it. NOTE: From version 1.255.0, conditions can be modified.
    event_type str
    The alert type.
    operation_code str
    The operation code.
    event_key str
    The keyword of the alert item.
    event_name str
    The name of the alert item.
    note str
    The remarks.
    scenarios str
    The application scope of the rule.
    source str
    The source of the whitelist. Valid values:
    conditions String
    The rule conditions. The value is in the JSON format. For more information, see How to use it. NOTE: From version 1.255.0, conditions can be modified.
    eventType String
    The alert type.
    operationCode String
    The operation code.
    eventKey String
    The keyword of the alert item.
    eventName String
    The name of the alert item.
    note String
    The remarks.
    scenarios String
    The application scope of the rule.
    source String
    The source of the whitelist. Valid values:

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ImageEventOperation 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 ImageEventOperation Resource

    Get an existing ImageEventOperation 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?: ImageEventOperationState, opts?: CustomResourceOptions): ImageEventOperation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            conditions: Optional[str] = None,
            event_key: Optional[str] = None,
            event_name: Optional[str] = None,
            event_type: Optional[str] = None,
            note: Optional[str] = None,
            operation_code: Optional[str] = None,
            scenarios: Optional[str] = None,
            source: Optional[str] = None) -> ImageEventOperation
    func GetImageEventOperation(ctx *Context, name string, id IDInput, state *ImageEventOperationState, opts ...ResourceOption) (*ImageEventOperation, error)
    public static ImageEventOperation Get(string name, Input<string> id, ImageEventOperationState? state, CustomResourceOptions? opts = null)
    public static ImageEventOperation get(String name, Output<String> id, ImageEventOperationState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:threatdetection:ImageEventOperation    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.
    The following state arguments are supported:
    Conditions string
    The rule conditions. The value is in the JSON format. For more information, see How to use it. NOTE: From version 1.255.0, conditions can be modified.
    EventKey string
    The keyword of the alert item.
    EventName string
    The name of the alert item.
    EventType string
    The alert type.
    Note string
    The remarks.
    OperationCode string
    The operation code.
    Scenarios string
    The application scope of the rule.
    Source string
    The source of the whitelist. Valid values:
    Conditions string
    The rule conditions. The value is in the JSON format. For more information, see How to use it. NOTE: From version 1.255.0, conditions can be modified.
    EventKey string
    The keyword of the alert item.
    EventName string
    The name of the alert item.
    EventType string
    The alert type.
    Note string
    The remarks.
    OperationCode string
    The operation code.
    Scenarios string
    The application scope of the rule.
    Source string
    The source of the whitelist. Valid values:
    conditions String
    The rule conditions. The value is in the JSON format. For more information, see How to use it. NOTE: From version 1.255.0, conditions can be modified.
    eventKey String
    The keyword of the alert item.
    eventName String
    The name of the alert item.
    eventType String
    The alert type.
    note String
    The remarks.
    operationCode String
    The operation code.
    scenarios String
    The application scope of the rule.
    source String
    The source of the whitelist. Valid values:
    conditions string
    The rule conditions. The value is in the JSON format. For more information, see How to use it. NOTE: From version 1.255.0, conditions can be modified.
    eventKey string
    The keyword of the alert item.
    eventName string
    The name of the alert item.
    eventType string
    The alert type.
    note string
    The remarks.
    operationCode string
    The operation code.
    scenarios string
    The application scope of the rule.
    source string
    The source of the whitelist. Valid values:
    conditions str
    The rule conditions. The value is in the JSON format. For more information, see How to use it. NOTE: From version 1.255.0, conditions can be modified.
    event_key str
    The keyword of the alert item.
    event_name str
    The name of the alert item.
    event_type str
    The alert type.
    note str
    The remarks.
    operation_code str
    The operation code.
    scenarios str
    The application scope of the rule.
    source str
    The source of the whitelist. Valid values:
    conditions String
    The rule conditions. The value is in the JSON format. For more information, see How to use it. NOTE: From version 1.255.0, conditions can be modified.
    eventKey String
    The keyword of the alert item.
    eventName String
    The name of the alert item.
    eventType String
    The alert type.
    note String
    The remarks.
    operationCode String
    The operation code.
    scenarios String
    The application scope of the rule.
    source String
    The source of the whitelist. Valid values:

    Import

    Threat Detection Image Event Operation can be imported using the id, e.g.

    $ pulumi import alicloud:threatdetection/imageEventOperation:ImageEventOperation 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.86.1 published on Saturday, Sep 27, 2025 by Pulumi
      AI Agentic Workflows: Register now