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

alicloud.aligreen.Callback

Explore with Pulumi AI

Provides a Aligreen Callback resource.

Detection Result Callback.

For information about Aligreen Callback and how to use it, see What is 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.Callback("default", {
    callbackUrl: "https://www.aliyun.com",
    cryptType: 0,
    callbackName: name,
    callbackTypes: [
        "machineScan",
        "selfAudit",
        "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.Callback("default",
    callback_url="https://www.aliyun.com",
    crypt_type=0,
    callback_name=name,
    callback_types=[
        "machineScan",
        "selfAudit",
        "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.NewCallback(ctx, "default", &aligreen.CallbackArgs{
			CallbackUrl:  pulumi.String("https://www.aliyun.com"),
			CryptType:    pulumi.Int(0),
			CallbackName: pulumi.String(name),
			CallbackTypes: pulumi.StringArray{
				pulumi.String("machineScan"),
				pulumi.String("selfAudit"),
				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.Callback("default", new()
    {
        CallbackUrl = "https://www.aliyun.com",
        CryptType = 0,
        CallbackName = name,
        CallbackTypes = new[]
        {
            "machineScan",
            "selfAudit",
            "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.Callback;
import com.pulumi.alicloud.aligreen.CallbackArgs;
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 Callback("default", CallbackArgs.builder()
            .callbackUrl("https://www.aliyun.com")
            .cryptType("0")
            .callbackName(name)
            .callbackTypes(            
                "machineScan",
                "selfAudit",
                "example")
            .callbackSuggestions(            
                "block",
                "review",
                "pass")
            .build());

    }
}
Copy
configuration:
  name:
    type: string
    default: terraform_example
resources:
  default:
    type: alicloud:aligreen:Callback
    properties:
      callbackUrl: https://www.aliyun.com
      cryptType: '0'
      callbackName: ${name}
      callbackTypes:
        - machineScan
        - selfAudit
        - example
      callbackSuggestions:
        - block
        - review
        - pass
Copy

Create Callback Resource

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

Constructor syntax

new Callback(name: string, args: CallbackArgs, opts?: CustomResourceOptions);
@overload
def Callback(resource_name: str,
             args: CallbackArgs,
             opts: Optional[ResourceOptions] = None)

@overload
def Callback(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             callback_name: Optional[str] = None,
             callback_suggestions: Optional[Sequence[str]] = None,
             callback_types: Optional[Sequence[str]] = None,
             callback_url: Optional[str] = None,
             crypt_type: Optional[int] = None)
func NewCallback(ctx *Context, name string, args CallbackArgs, opts ...ResourceOption) (*Callback, error)
public Callback(string name, CallbackArgs args, CustomResourceOptions? opts = null)
public Callback(String name, CallbackArgs args)
public Callback(String name, CallbackArgs args, CustomResourceOptions options)
type: alicloud:aligreen:Callback
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. CallbackArgs
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. CallbackArgs
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. CallbackArgs
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. CallbackArgs
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. CallbackArgs
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 callbackResource = new AliCloud.Aligreen.Callback("callbackResource", new()
{
    CallbackName = "string",
    CallbackSuggestions = new[]
    {
        "string",
    },
    CallbackTypes = new[]
    {
        "string",
    },
    CallbackUrl = "string",
    CryptType = 0,
});
Copy
example, err := aligreen.NewCallback(ctx, "callbackResource", &aligreen.CallbackArgs{
	CallbackName: pulumi.String("string"),
	CallbackSuggestions: pulumi.StringArray{
		pulumi.String("string"),
	},
	CallbackTypes: pulumi.StringArray{
		pulumi.String("string"),
	},
	CallbackUrl: pulumi.String("string"),
	CryptType:   pulumi.Int(0),
})
Copy
var callbackResource = new Callback("callbackResource", CallbackArgs.builder()
    .callbackName("string")
    .callbackSuggestions("string")
    .callbackTypes("string")
    .callbackUrl("string")
    .cryptType(0)
    .build());
Copy
callback_resource = alicloud.aligreen.Callback("callbackResource",
    callback_name="string",
    callback_suggestions=["string"],
    callback_types=["string"],
    callback_url="string",
    crypt_type=0)
Copy
const callbackResource = new alicloud.aligreen.Callback("callbackResource", {
    callbackName: "string",
    callbackSuggestions: ["string"],
    callbackTypes: ["string"],
    callbackUrl: "string",
    cryptType: 0,
});
Copy
type: alicloud:aligreen:Callback
properties:
    callbackName: string
    callbackSuggestions:
        - string
    callbackTypes:
        - string
    callbackUrl: string
    cryptType: 0
Copy

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

CallbackName This property is required. string
The Callback 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.
CallbackUrl This property is required. string
The detection result will be called back to the url.
CryptType Changes to this property will trigger replacement. int
The encryption algorithm is used to verify that the callback request is sent by the Aliyun Green Service to your business service. Value: 0:SHA256,1: SM3.
CallbackName This property is required. string
The Callback 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.
CallbackUrl This property is required. string
The detection result will be called back to the url.
CryptType Changes to this property will trigger replacement. int
The encryption algorithm is used to verify that the callback request is sent by the Aliyun Green Service to your business service. Value: 0:SHA256,1: SM3.
callbackName This property is required. String
The Callback 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.
callbackUrl This property is required. String
The detection result will be called back to the url.
cryptType Changes to this property will trigger replacement. Integer
The encryption algorithm is used to verify that the callback request is sent by the Aliyun Green Service to your business service. Value: 0:SHA256,1: SM3.
callbackName This property is required. string
The Callback 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.
callbackUrl This property is required. string
The detection result will be called back to the url.
cryptType Changes to this property will trigger replacement. number
The encryption algorithm is used to verify that the callback request is sent by the Aliyun Green Service to your business service. Value: 0:SHA256,1: SM3.
callback_name This property is required. str
The Callback 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.
callback_url This property is required. str
The detection result will be called back to the url.
crypt_type Changes to this property will trigger replacement. int
The encryption algorithm is used to verify that the callback request is sent by the Aliyun Green Service to your business service. Value: 0:SHA256,1: SM3.
callbackName This property is required. String
The Callback 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.
callbackUrl This property is required. String
The detection result will be called back to the url.
cryptType Changes to this property will trigger replacement. Number
The encryption algorithm is used to verify that the callback request is sent by the Aliyun Green Service to your business service. Value: 0:SHA256,1: SM3.

Outputs

All input properties are implicitly available as output properties. Additionally, the Callback resource produces the following output properties:

CreateTime string
The creation time of the Callback.
Id string
The provider-assigned unique ID for this managed resource.
CreateTime string
The creation time of the Callback.
Id string
The provider-assigned unique ID for this managed resource.
createTime String
The creation time of the Callback.
id String
The provider-assigned unique ID for this managed resource.
createTime string
The creation time of the Callback.
id string
The provider-assigned unique ID for this managed resource.
create_time str
The creation time of the Callback.
id str
The provider-assigned unique ID for this managed resource.
createTime String
The creation time of the Callback.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing Callback Resource

Get an existing Callback 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?: CallbackState, opts?: CustomResourceOptions): Callback
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        callback_name: Optional[str] = None,
        callback_suggestions: Optional[Sequence[str]] = None,
        callback_types: Optional[Sequence[str]] = None,
        callback_url: Optional[str] = None,
        create_time: Optional[str] = None,
        crypt_type: Optional[int] = None) -> Callback
func GetCallback(ctx *Context, name string, id IDInput, state *CallbackState, opts ...ResourceOption) (*Callback, error)
public static Callback Get(string name, Input<string> id, CallbackState? state, CustomResourceOptions? opts = null)
public static Callback get(String name, Output<String> id, CallbackState state, CustomResourceOptions options)
resources:  _:    type: alicloud:aligreen:Callback    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:
CallbackName string
The Callback 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.
CallbackUrl string
The detection result will be called back to the url.
CreateTime string
The creation time of the Callback.
CryptType Changes to this property will trigger replacement. int
The encryption algorithm is used to verify that the callback request is sent by the Aliyun Green Service to your business service. Value: 0:SHA256,1: SM3.
CallbackName string
The Callback 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.
CallbackUrl string
The detection result will be called back to the url.
CreateTime string
The creation time of the Callback.
CryptType Changes to this property will trigger replacement. int
The encryption algorithm is used to verify that the callback request is sent by the Aliyun Green Service to your business service. Value: 0:SHA256,1: SM3.
callbackName String
The Callback 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.
callbackUrl String
The detection result will be called back to the url.
createTime String
The creation time of the Callback.
cryptType Changes to this property will trigger replacement. Integer
The encryption algorithm is used to verify that the callback request is sent by the Aliyun Green Service to your business service. Value: 0:SHA256,1: SM3.
callbackName string
The Callback 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.
callbackUrl string
The detection result will be called back to the url.
createTime string
The creation time of the Callback.
cryptType Changes to this property will trigger replacement. number
The encryption algorithm is used to verify that the callback request is sent by the Aliyun Green Service to your business service. Value: 0:SHA256,1: SM3.
callback_name str
The Callback 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.
callback_url str
The detection result will be called back to the url.
create_time str
The creation time of the Callback.
crypt_type Changes to this property will trigger replacement. int
The encryption algorithm is used to verify that the callback request is sent by the Aliyun Green Service to your business service. Value: 0:SHA256,1: SM3.
callbackName String
The Callback 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.
callbackUrl String
The detection result will be called back to the url.
createTime String
The creation time of the Callback.
cryptType Changes to this property will trigger replacement. Number
The encryption algorithm is used to verify that the callback request is sent by the Aliyun Green Service to your business service. Value: 0:SHA256,1: SM3.

Import

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

$ pulumi import alicloud:aligreen/callback:Callback 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.