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

alicloud.aligreen.AuditCallback

Explore with Pulumi AI

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

    Provides a Aligreen Audit Callback resource.

    Callback notification after detection is completed.

    For information about Aligreen Audit Callback and how to use it, see What is Audit Callback.

    NOTE: Available since v1.228.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.aligreen.AuditCallback("default", {
        cryptType: "SM3",
        auditCallbackName: name,
        url: "https://www.aliyun.com/",
        callbackTypes: [
            "aliyunAudit",
            "selfAduit",
            "example",
        ],
        callbackSuggestions: [
            "block",
            "review",
            "pass",
        ],
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform_example"
    default = alicloud.aligreen.AuditCallback("default",
        crypt_type="SM3",
        audit_callback_name=name,
        url="https://www.aliyun.com/",
        callback_types=[
            "aliyunAudit",
            "selfAduit",
            "example",
        ],
        callback_suggestions=[
            "block",
            "review",
            "pass",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/aligreen"
    	"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 := aligreen.NewAuditCallback(ctx, "default", &aligreen.AuditCallbackArgs{
    			CryptType:         pulumi.String("SM3"),
    			AuditCallbackName: pulumi.String(name),
    			Url:               pulumi.String("https://www.aliyun.com/"),
    			CallbackTypes: pulumi.StringArray{
    				pulumi.String("aliyunAudit"),
    				pulumi.String("selfAduit"),
    				pulumi.String("example"),
    			},
    			CallbackSuggestions: pulumi.StringArray{
    				pulumi.String("block"),
    				pulumi.String("review"),
    				pulumi.String("pass"),
    			},
    		})
    		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.Aligreen.AuditCallback("default", new()
        {
            CryptType = "SM3",
            AuditCallbackName = name,
            Url = "https://www.aliyun.com/",
            CallbackTypes = new[]
            {
                "aliyunAudit",
                "selfAduit",
                "example",
            },
            CallbackSuggestions = new[]
            {
                "block",
                "review",
                "pass",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.aligreen.AuditCallback;
    import com.pulumi.alicloud.aligreen.AuditCallbackArgs;
    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 AuditCallback("default", AuditCallbackArgs.builder()
                .cryptType("SM3")
                .auditCallbackName(name)
                .url("https://www.aliyun.com/")
                .callbackTypes(            
                    "aliyunAudit",
                    "selfAduit",
                    "example")
                .callbackSuggestions(            
                    "block",
                    "review",
                    "pass")
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform_example
    resources:
      default:
        type: alicloud:aligreen:AuditCallback
        properties:
          cryptType: SM3
          auditCallbackName: ${name}
          url: https://www.aliyun.com/
          callbackTypes:
            - aliyunAudit
            - selfAduit
            - example
          callbackSuggestions:
            - block
            - review
            - pass
    

    Create AuditCallback Resource

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

    Constructor syntax

    new AuditCallback(name: string, args: AuditCallbackArgs, opts?: CustomResourceOptions);
    @overload
    def AuditCallback(resource_name: str,
                      args: AuditCallbackArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def AuditCallback(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      audit_callback_name: Optional[str] = None,
                      callback_suggestions: Optional[Sequence[str]] = None,
                      callback_types: Optional[Sequence[str]] = None,
                      crypt_type: Optional[str] = None,
                      url: Optional[str] = None)
    func NewAuditCallback(ctx *Context, name string, args AuditCallbackArgs, opts ...ResourceOption) (*AuditCallback, error)
    public AuditCallback(string name, AuditCallbackArgs args, CustomResourceOptions? opts = null)
    public AuditCallback(String name, AuditCallbackArgs args)
    public AuditCallback(String name, AuditCallbackArgs args, CustomResourceOptions options)
    
    type: alicloud:aligreen:AuditCallback
    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 AuditCallbackArgs
    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 AuditCallbackArgs
    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 AuditCallbackArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AuditCallbackArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AuditCallbackArgs
    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 auditCallbackResource = new AliCloud.Aligreen.AuditCallback("auditCallbackResource", new()
    {
        AuditCallbackName = "string",
        CallbackSuggestions = new[]
        {
            "string",
        },
        CallbackTypes = new[]
        {
            "string",
        },
        CryptType = "string",
        Url = "string",
    });
    
    example, err := aligreen.NewAuditCallback(ctx, "auditCallbackResource", &aligreen.AuditCallbackArgs{
    	AuditCallbackName: pulumi.String("string"),
    	CallbackSuggestions: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	CallbackTypes: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	CryptType: pulumi.String("string"),
    	Url:       pulumi.String("string"),
    })
    
    var auditCallbackResource = new AuditCallback("auditCallbackResource", AuditCallbackArgs.builder()
        .auditCallbackName("string")
        .callbackSuggestions("string")
        .callbackTypes("string")
        .cryptType("string")
        .url("string")
        .build());
    
    audit_callback_resource = alicloud.aligreen.AuditCallback("auditCallbackResource",
        audit_callback_name="string",
        callback_suggestions=["string"],
        callback_types=["string"],
        crypt_type="string",
        url="string")
    
    const auditCallbackResource = new alicloud.aligreen.AuditCallback("auditCallbackResource", {
        auditCallbackName: "string",
        callbackSuggestions: ["string"],
        callbackTypes: ["string"],
        cryptType: "string",
        url: "string",
    });
    
    type: alicloud:aligreen:AuditCallback
    properties:
        auditCallbackName: string
        callbackSuggestions:
            - string
        callbackTypes:
            - string
        cryptType: string
        url: string
    

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

    AuditCallbackName string
    The AuditCallback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
    CallbackSuggestions List<string>
    List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
    CallbackTypes List<string>
    A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
    CryptType string
    The encryption algorithm is used to verify that the callback request is sent by the content security service to your business service. The value is SHA256:SHA256 encryption algorithm and SM3: SM3 encryption algorithm.
    Url string
    The detection result will be called back to the url.
    AuditCallbackName string
    The AuditCallback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
    CallbackSuggestions []string
    List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
    CallbackTypes []string
    A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
    CryptType string
    The encryption algorithm is used to verify that the callback request is sent by the content security service to your business service. The value is SHA256:SHA256 encryption algorithm and SM3: SM3 encryption algorithm.
    Url string
    The detection result will be called back to the url.
    auditCallbackName String
    The AuditCallback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
    callbackSuggestions List<String>
    List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
    callbackTypes List<String>
    A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
    cryptType String
    The encryption algorithm is used to verify that the callback request is sent by the content security service to your business service. The value is SHA256:SHA256 encryption algorithm and SM3: SM3 encryption algorithm.
    url String
    The detection result will be called back to the url.
    auditCallbackName string
    The AuditCallback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
    callbackSuggestions string[]
    List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
    callbackTypes string[]
    A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
    cryptType string
    The encryption algorithm is used to verify that the callback request is sent by the content security service to your business service. The value is SHA256:SHA256 encryption algorithm and SM3: SM3 encryption algorithm.
    url string
    The detection result will be called back to the url.
    audit_callback_name str
    The AuditCallback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
    callback_suggestions Sequence[str]
    List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
    callback_types Sequence[str]
    A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
    crypt_type str
    The encryption algorithm is used to verify that the callback request is sent by the content security service to your business service. The value is SHA256:SHA256 encryption algorithm and SM3: SM3 encryption algorithm.
    url str
    The detection result will be called back to the url.
    auditCallbackName String
    The AuditCallback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
    callbackSuggestions List<String>
    List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
    callbackTypes List<String>
    A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
    cryptType String
    The encryption algorithm is used to verify that the callback request is sent by the content security service to your business service. The value is SHA256:SHA256 encryption algorithm and SM3: SM3 encryption algorithm.
    url String
    The detection result will be called back to the url.

    Outputs

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

    Get an existing AuditCallback 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?: AuditCallbackState, opts?: CustomResourceOptions): AuditCallback
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            audit_callback_name: Optional[str] = None,
            callback_suggestions: Optional[Sequence[str]] = None,
            callback_types: Optional[Sequence[str]] = None,
            crypt_type: Optional[str] = None,
            url: Optional[str] = None) -> AuditCallback
    func GetAuditCallback(ctx *Context, name string, id IDInput, state *AuditCallbackState, opts ...ResourceOption) (*AuditCallback, error)
    public static AuditCallback Get(string name, Input<string> id, AuditCallbackState? state, CustomResourceOptions? opts = null)
    public static AuditCallback get(String name, Output<String> id, AuditCallbackState 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:
    AuditCallbackName string
    The AuditCallback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
    CallbackSuggestions List<string>
    List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
    CallbackTypes List<string>
    A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
    CryptType string
    The encryption algorithm is used to verify that the callback request is sent by the content security service to your business service. The value is SHA256:SHA256 encryption algorithm and SM3: SM3 encryption algorithm.
    Url string
    The detection result will be called back to the url.
    AuditCallbackName string
    The AuditCallback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
    CallbackSuggestions []string
    List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
    CallbackTypes []string
    A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
    CryptType string
    The encryption algorithm is used to verify that the callback request is sent by the content security service to your business service. The value is SHA256:SHA256 encryption algorithm and SM3: SM3 encryption algorithm.
    Url string
    The detection result will be called back to the url.
    auditCallbackName String
    The AuditCallback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
    callbackSuggestions List<String>
    List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
    callbackTypes List<String>
    A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
    cryptType String
    The encryption algorithm is used to verify that the callback request is sent by the content security service to your business service. The value is SHA256:SHA256 encryption algorithm and SM3: SM3 encryption algorithm.
    url String
    The detection result will be called back to the url.
    auditCallbackName string
    The AuditCallback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
    callbackSuggestions string[]
    List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
    callbackTypes string[]
    A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
    cryptType string
    The encryption algorithm is used to verify that the callback request is sent by the content security service to your business service. The value is SHA256:SHA256 encryption algorithm and SM3: SM3 encryption algorithm.
    url string
    The detection result will be called back to the url.
    audit_callback_name str
    The AuditCallback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
    callback_suggestions Sequence[str]
    List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
    callback_types Sequence[str]
    A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
    crypt_type str
    The encryption algorithm is used to verify that the callback request is sent by the content security service to your business service. The value is SHA256:SHA256 encryption algorithm and SM3: SM3 encryption algorithm.
    url str
    The detection result will be called back to the url.
    auditCallbackName String
    The AuditCallback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
    callbackSuggestions List<String>
    List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
    callbackTypes List<String>
    A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
    cryptType String
    The encryption algorithm is used to verify that the callback request is sent by the content security service to your business service. The value is SHA256:SHA256 encryption algorithm and SM3: SM3 encryption algorithm.
    url String
    The detection result will be called back to the url.

    Import

    Aligreen Audit Callback can be imported using the id, e.g.

    $ pulumi import alicloud:aligreen/auditCallback:AuditCallback 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