com.pulumi.alicloud.aligreen.Callback Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alicloud Show documentation
Show all versions of alicloud Show documentation
A Pulumi package for creating and managing AliCloud resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.alicloud.aligreen;
import com.pulumi.alicloud.Utilities;
import com.pulumi.alicloud.aligreen.CallbackArgs;
import com.pulumi.alicloud.aligreen.inputs.CallbackState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Provides a Aligreen Callback resource.
*
* Detection Result Callback.
*
* For information about Aligreen Callback and how to use it, see [What is Callback](https://www.alibabacloud.com/help/en/).
*
* > **NOTE:** Available since v1.228.0.
*
* ## Example Usage
*
* Basic Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Aligreen Callback can be imported using the id, e.g.
*
* ```sh
* $ pulumi import alicloud:aligreen/callback:Callback example <id>
* ```
*
*/
@ResourceType(type="alicloud:aligreen/callback:Callback")
public class Callback extends com.pulumi.resources.CustomResource {
/**
* The Callback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
*
*/
@Export(name="callbackName", refs={String.class}, tree="[0]")
private Output callbackName;
/**
* @return The Callback name defined by the customer. It can contain no more than 20 characters in Chinese, English, underscore (_), and digits.
*
*/
public Output callbackName() {
return this.callbackName;
}
/**
* List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
*
*/
@Export(name="callbackSuggestions", refs={List.class,String.class}, tree="[0,1]")
private Output> callbackSuggestions;
/**
* @return List of audit results supported by message notification. Value: block: confirmed violation, review: Suspected violation, review: normal.
*
*/
public Output> callbackSuggestions() {
return this.callbackSuggestions;
}
/**
* A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
*
*/
@Export(name="callbackTypes", refs={List.class,String.class}, tree="[0,1]")
private Output> callbackTypes;
/**
* @return A list of Callback types. Value: machineScan: Machine audit result notification, selfAudit: self-service audit notification.
*
*/
public Output> callbackTypes() {
return this.callbackTypes;
}
/**
* The detection result will be called back to the url.
*
*/
@Export(name="callbackUrl", refs={String.class}, tree="[0]")
private Output callbackUrl;
/**
* @return The detection result will be called back to the url.
*
*/
public Output callbackUrl() {
return this.callbackUrl;
}
/**
* The creation time of the Callback.
*
*/
@Export(name="createTime", refs={String.class}, tree="[0]")
private Output createTime;
/**
* @return The creation time of the Callback.
*
*/
public Output createTime() {
return this.createTime;
}
/**
* 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.
*
*/
@Export(name="cryptType", refs={Integer.class}, tree="[0]")
private Output cryptType;
/**
* @return 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.
*
*/
public Output> cryptType() {
return Codegen.optional(this.cryptType);
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public Callback(java.lang.String name) {
this(name, CallbackArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public Callback(java.lang.String name, CallbackArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public Callback(java.lang.String name, CallbackArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("alicloud:aligreen/callback:Callback", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private Callback(java.lang.String name, Output id, @Nullable CallbackState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("alicloud:aligreen/callback:Callback", name, state, makeResourceOptions(options, id), false);
}
private static CallbackArgs makeArgs(CallbackArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? CallbackArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static Callback get(java.lang.String name, Output id, @Nullable CallbackState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new Callback(name, id, state, options);
}
}