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

alicloud.aligreen.AuditCallback

Explore with Pulumi AI

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",
    ],
});
Copy
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",
    ])
Copy
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
	})
}
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.Aligreen.AuditCallback("default", new()
    {
        CryptType = "SM3",
        AuditCallbackName = name,
        Url = "https://www.aliyun.com/",
        CallbackTypes = new[]
        {
            "aliyunAudit",
            "selfAduit",
            "example",
        },
        CallbackSuggestions = new[]
        {
            "block",
            "review",
            "pass",
        },
    });

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

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

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 This property is required. string
The unique name of the resource.
args This property is required. AuditCallbackArgs
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. 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 This property is required. string
The unique name of the resource.
args This property is required. AuditCallbackArgs
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. AuditCallbackArgs
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. 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",
});
Copy
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"),
})
Copy
var auditCallbackResource = new AuditCallback("auditCallbackResource", AuditCallbackArgs.builder()
    .auditCallbackName("string")
    .callbackSuggestions("string")
    .callbackTypes("string")
    .cryptType("string")
    .url("string")
    .build());
Copy
audit_callback_resource = alicloud.aligreen.AuditCallback("auditCallbackResource",
    audit_callback_name="string",
    callback_suggestions=["string"],
    callback_types=["string"],
    crypt_type="string",
    url="string")
Copy
const auditCallbackResource = new alicloud.aligreen.AuditCallback("auditCallbackResource", {
    auditCallbackName: "string",
    callbackSuggestions: ["string"],
    callbackTypes: ["string"],
    cryptType: "string",
    url: "string",
});
Copy
type: alicloud:aligreen:AuditCallback
properties:
    auditCallbackName: string
    callbackSuggestions:
        - string
    callbackTypes:
        - string
    cryptType: string
    url: string
Copy

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
This property is required.
Changes to this property will trigger replacement.
string
The AuditCallback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
CallbackSuggestions This property is required. List<string>
List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
CallbackTypes This property is required. List<string>
A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
CryptType This property is required. 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 This property is required. string
The detection result will be called back to the url.
AuditCallbackName
This property is required.
Changes to this property will trigger replacement.
string
The AuditCallback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
CallbackSuggestions This property is required. []string
List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
CallbackTypes This property is required. []string
A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
CryptType This property is required. 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 This property is required. string
The detection result will be called back to the url.
auditCallbackName
This property is required.
Changes to this property will trigger replacement.
String
The AuditCallback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
callbackSuggestions This property is required. List<String>
List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
callbackTypes This property is required. List<String>
A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
cryptType This property is required. 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 This property is required. String
The detection result will be called back to the url.
auditCallbackName
This property is required.
Changes to this property will trigger replacement.
string
The AuditCallback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
callbackSuggestions This property is required. string[]
List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
callbackTypes This property is required. string[]
A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
cryptType This property is required. 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 This property is required. string
The detection result will be called back to the url.
audit_callback_name
This property is required.
Changes to this property will trigger replacement.
str
The AuditCallback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
callback_suggestions This property is required. Sequence[str]
List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
callback_types This property is required. Sequence[str]
A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
crypt_type This property is required. 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 This property is required. str
The detection result will be called back to the url.
auditCallbackName
This property is required.
Changes to this property will trigger replacement.
String
The AuditCallback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
callbackSuggestions This property is required. List<String>
List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
callbackTypes This property is required. List<String>
A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
cryptType This property is required. 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 This property is required. 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)
resources:  _:    type: alicloud:aligreen:AuditCallback    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:
AuditCallbackName Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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>
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.