CallbackArgs

data class CallbackArgs(val callbackName: Output<String>? = null, val callbackSuggestions: Output<List<String>>? = null, val callbackTypes: Output<List<String>>? = null, val callbackUrl: Output<String>? = null, val cryptType: Output<Int>? = null) : ConvertibleToJava<CallbackArgs>

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",
],
});
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",
])
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",
},
});
});
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
})
}
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());
}
}
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

Import

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

$ pulumi import alicloud:aligreen/callback:Callback example <id>

Constructors

Link copied to clipboard
constructor(callbackName: Output<String>? = null, callbackSuggestions: Output<List<String>>? = null, callbackTypes: Output<List<String>>? = null, callbackUrl: Output<String>? = null, cryptType: Output<Int>? = null)

Properties

Link copied to clipboard
val callbackName: Output<String>? = null

The Callback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.

Link copied to clipboard
val callbackSuggestions: Output<List<String>>? = null

List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.

Link copied to clipboard
val callbackTypes: Output<List<String>>? = null

A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.

Link copied to clipboard
val callbackUrl: Output<String>? = null

The detection result will be called back to the url.

Link copied to clipboard
val cryptType: Output<Int>? = null

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.

Functions

Link copied to clipboard
open override fun toJava(): CallbackArgs