1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. threatdetection
  5. ImageEventOperation
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.threatdetection.ImageEventOperation

Explore with Pulumi AI

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"
  }
]
`,
});
Copy
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"
  }
]
""")
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 := "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
	})
}
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") ?? "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""
  }
]
",
    });

});
Copy
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());

    }
}
Copy
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"
          }
        ]        
Copy

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: Optional[ImageEventOperationArgs] = None,
                        opts: Optional[ResourceOptions] = None)

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

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 Changes to this property will trigger replacement. string
Event Conditions.
EventKey Changes to this property will trigger replacement. string
Image Event Key.
EventName Changes to this property will trigger replacement. string
Image Event Name.
EventType Changes to this property will trigger replacement. string
Image Event Type.
OperationCode Changes to this property will trigger replacement. string
Event Operation Code.
Scenarios string
Event Scenarios.
Conditions Changes to this property will trigger replacement. string
Event Conditions.
EventKey Changes to this property will trigger replacement. string
Image Event Key.
EventName Changes to this property will trigger replacement. string
Image Event Name.
EventType Changes to this property will trigger replacement. string
Image Event Type.
OperationCode Changes to this property will trigger replacement. string
Event Operation Code.
Scenarios string
Event Scenarios.
conditions Changes to this property will trigger replacement. String
Event Conditions.
eventKey Changes to this property will trigger replacement. String
Image Event Key.
eventName Changes to this property will trigger replacement. String
Image Event Name.
eventType Changes to this property will trigger replacement. String
Image Event Type.
operationCode Changes to this property will trigger replacement. String
Event Operation Code.
scenarios String
Event Scenarios.
conditions Changes to this property will trigger replacement. string
Event Conditions.
eventKey Changes to this property will trigger replacement. string
Image Event Key.
eventName Changes to this property will trigger replacement. string
Image Event Name.
eventType Changes to this property will trigger replacement. string
Image Event Type.
operationCode Changes to this property will trigger replacement. string
Event Operation Code.
scenarios string
Event Scenarios.
conditions Changes to this property will trigger replacement. str
Event Conditions.
event_key Changes to this property will trigger replacement. str
Image Event Key.
event_name Changes to this property will trigger replacement. str
Image Event Name.
event_type Changes to this property will trigger replacement. str
Image Event Type.
operation_code Changes to this property will trigger replacement. str
Event Operation Code.
scenarios str
Event Scenarios.
conditions Changes to this property will trigger replacement. String
Event Conditions.
eventKey Changes to this property will trigger replacement. String
Image Event Key.
eventName Changes to this property will trigger replacement. String
Image Event Name.
eventType Changes to this property will trigger replacement. String
Image Event Type.
operationCode Changes to this property will trigger replacement. String
Event Operation Code.
scenarios String
Event Scenarios.

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,
        operation_code: Optional[str] = None,
        scenarios: 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 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:
Conditions Changes to this property will trigger replacement. string
Event Conditions.
EventKey Changes to this property will trigger replacement. string
Image Event Key.
EventName Changes to this property will trigger replacement. string
Image Event Name.
EventType Changes to this property will trigger replacement. string
Image Event Type.
OperationCode Changes to this property will trigger replacement. string
Event Operation Code.
Scenarios string
Event Scenarios.
Conditions Changes to this property will trigger replacement. string
Event Conditions.
EventKey Changes to this property will trigger replacement. string
Image Event Key.
EventName Changes to this property will trigger replacement. string
Image Event Name.
EventType Changes to this property will trigger replacement. string
Image Event Type.
OperationCode Changes to this property will trigger replacement. string
Event Operation Code.
Scenarios string
Event Scenarios.
conditions Changes to this property will trigger replacement. String
Event Conditions.
eventKey Changes to this property will trigger replacement. String
Image Event Key.
eventName Changes to this property will trigger replacement. String
Image Event Name.
eventType Changes to this property will trigger replacement. String
Image Event Type.
operationCode Changes to this property will trigger replacement. String
Event Operation Code.
scenarios String
Event Scenarios.
conditions Changes to this property will trigger replacement. string
Event Conditions.
eventKey Changes to this property will trigger replacement. string
Image Event Key.
eventName Changes to this property will trigger replacement. string
Image Event Name.
eventType Changes to this property will trigger replacement. string
Image Event Type.
operationCode Changes to this property will trigger replacement. string
Event Operation Code.
scenarios string
Event Scenarios.
conditions Changes to this property will trigger replacement. str
Event Conditions.
event_key Changes to this property will trigger replacement. str
Image Event Key.
event_name Changes to this property will trigger replacement. str
Image Event Name.
event_type Changes to this property will trigger replacement. str
Image Event Type.
operation_code Changes to this property will trigger replacement. str
Event Operation Code.
scenarios str
Event Scenarios.
conditions Changes to this property will trigger replacement. String
Event Conditions.
eventKey Changes to this property will trigger replacement. String
Image Event Key.
eventName Changes to this property will trigger replacement. String
Image Event Name.
eventType Changes to this property will trigger replacement. String
Image Event Type.
operationCode Changes to this property will trigger replacement. String
Event Operation Code.
scenarios String
Event Scenarios.

Import

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

$ pulumi import alicloud:threatdetection/imageEventOperation:ImageEventOperation 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.