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

alicloud.threatdetection.ImageEventOperation

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 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: 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 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",
        EventKey = "string",
        EventName = "string",
        EventType = "string",
        OperationCode = "string",
        Scenarios = "string",
    });
    
    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"),
    })
    
    var imageEventOperationResource = new ImageEventOperation("imageEventOperationResource", ImageEventOperationArgs.builder()
        .conditions("string")
        .eventKey("string")
        .eventName("string")
        .eventType("string")
        .operationCode("string")
        .scenarios("string")
        .build());
    
    image_event_operation_resource = alicloud.threatdetection.ImageEventOperation("imageEventOperationResource",
        conditions="string",
        event_key="string",
        event_name="string",
        event_type="string",
        operation_code="string",
        scenarios="string")
    
    const imageEventOperationResource = new alicloud.threatdetection.ImageEventOperation("imageEventOperationResource", {
        conditions: "string",
        eventKey: "string",
        eventName: "string",
        eventType: "string",
        operationCode: "string",
        scenarios: "string",
    });
    
    type: alicloud:threatdetection:ImageEventOperation
    properties:
        conditions: string
        eventKey: string
        eventName: string
        eventType: string
        operationCode: string
        scenarios: 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
    Event Conditions.
    EventKey string
    Image Event Key.
    EventName string
    Image Event Name.
    EventType string
    Image Event Type.
    OperationCode string
    Event Operation Code.
    Scenarios string
    Event Scenarios.
    Conditions string
    Event Conditions.
    EventKey string
    Image Event Key.
    EventName string
    Image Event Name.
    EventType string
    Image Event Type.
    OperationCode string
    Event Operation Code.
    Scenarios string
    Event Scenarios.
    conditions String
    Event Conditions.
    eventKey String
    Image Event Key.
    eventName String
    Image Event Name.
    eventType String
    Image Event Type.
    operationCode String
    Event Operation Code.
    scenarios String
    Event Scenarios.
    conditions string
    Event Conditions.
    eventKey string
    Image Event Key.
    eventName string
    Image Event Name.
    eventType string
    Image Event Type.
    operationCode string
    Event Operation Code.
    scenarios string
    Event Scenarios.
    conditions str
    Event Conditions.
    event_key str
    Image Event Key.
    event_name str
    Image Event Name.
    event_type str
    Image Event Type.
    operation_code str
    Event Operation Code.
    scenarios str
    Event Scenarios.
    conditions String
    Event Conditions.
    eventKey String
    Image Event Key.
    eventName String
    Image Event Name.
    eventType String
    Image Event Type.
    operationCode 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)
    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:
    Conditions string
    Event Conditions.
    EventKey string
    Image Event Key.
    EventName string
    Image Event Name.
    EventType string
    Image Event Type.
    OperationCode string
    Event Operation Code.
    Scenarios string
    Event Scenarios.
    Conditions string
    Event Conditions.
    EventKey string
    Image Event Key.
    EventName string
    Image Event Name.
    EventType string
    Image Event Type.
    OperationCode string
    Event Operation Code.
    Scenarios string
    Event Scenarios.
    conditions String
    Event Conditions.
    eventKey String
    Image Event Key.
    eventName String
    Image Event Name.
    eventType String
    Image Event Type.
    operationCode String
    Event Operation Code.
    scenarios String
    Event Scenarios.
    conditions string
    Event Conditions.
    eventKey string
    Image Event Key.
    eventName string
    Image Event Name.
    eventType string
    Image Event Type.
    operationCode string
    Event Operation Code.
    scenarios string
    Event Scenarios.
    conditions str
    Event Conditions.
    event_key str
    Image Event Key.
    event_name str
    Image Event Name.
    event_type str
    Image Event Type.
    operation_code str
    Event Operation Code.
    scenarios str
    Event Scenarios.
    conditions String
    Event Conditions.
    eventKey String
    Image Event Key.
    eventName String
    Image Event Name.
    eventType String
    Image Event Type.
    operationCode 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>
    

    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