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",
],
});
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",
])
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
})
}
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 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
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 string
- The unique name of the resource.
- args CallbackArgs
- 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 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 string
- The unique name of the resource.
- args CallbackArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CallbackArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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,
});
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),
})
var callbackResource = new Callback("callbackResource", CallbackArgs.builder()
.callbackName("string")
.callbackSuggestions("string")
.callbackTypes("string")
.callbackUrl("string")
.cryptType(0)
.build());
callback_resource = alicloud.aligreen.Callback("callbackResource",
callback_name="string",
callback_suggestions=["string"],
callback_types=["string"],
callback_url="string",
crypt_type=0)
const callbackResource = new alicloud.aligreen.Callback("callbackResource", {
callbackName: "string",
callbackSuggestions: ["string"],
callbackTypes: ["string"],
callbackUrl: "string",
cryptType: 0,
});
type: alicloud:aligreen:Callback
properties:
callbackName: string
callbackSuggestions:
- string
callbackTypes:
- string
callbackUrl: string
cryptType: 0
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:
- Callback
Name string - The Callback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
- Callback
Suggestions List<string> - List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
- Callback
Types List<string> - A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
- Callback
Url string - The detection result will be called back to the url.
- Crypt
Type 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.
- Callback
Name string - The Callback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
- Callback
Suggestions []string - List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
- Callback
Types []string - A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
- Callback
Url string - The detection result will be called back to the url.
- Crypt
Type 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.
- callback
Name String - The Callback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
- callback
Suggestions List<String> - List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
- callback
Types List<String> - A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
- callback
Url String - The detection result will be called back to the url.
- crypt
Type 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.
- callback
Name string - The Callback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
- callback
Suggestions string[] - List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
- callback
Types string[] - A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
- callback
Url string - The detection result will be called back to the url.
- crypt
Type 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.
- crypt_
type 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.
- callback
Name String - The Callback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
- callback
Suggestions List<String> - List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
- callback
Types List<String> - A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
- callback
Url String - The detection result will be called back to the url.
- crypt
Type 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:
- Create
Time string - The creation time of the Callback.
- Id string
- The provider-assigned unique ID for this managed resource.
- Create
Time string - The creation time of the Callback.
- Id string
- The provider-assigned unique ID for this managed resource.
- create
Time String - The creation time of the Callback.
- id String
- The provider-assigned unique ID for this managed resource.
- create
Time 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.
- create
Time 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)
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.
- Callback
Name string - The Callback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
- Callback
Suggestions List<string> - List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
- Callback
Types List<string> - A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
- Callback
Url string - The detection result will be called back to the url.
- Create
Time string - The creation time of the Callback.
- Crypt
Type 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.
- Callback
Name string - The Callback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
- Callback
Suggestions []string - List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
- Callback
Types []string - A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
- Callback
Url string - The detection result will be called back to the url.
- Create
Time string - The creation time of the Callback.
- Crypt
Type 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.
- callback
Name String - The Callback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
- callback
Suggestions List<String> - List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
- callback
Types List<String> - A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
- callback
Url String - The detection result will be called back to the url.
- create
Time String - The creation time of the Callback.
- crypt
Type 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.
- callback
Name string - The Callback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
- callback
Suggestions string[] - List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
- callback
Types string[] - A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
- callback
Url string - The detection result will be called back to the url.
- create
Time string - The creation time of the Callback.
- crypt
Type 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 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.
- callback
Name String - The Callback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
- callback
Suggestions List<String> - List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
- callback
Types List<String> - A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
- callback
Url String - The detection result will be called back to the url.
- create
Time String - The creation time of the Callback.
- crypt
Type 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>
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.