com.pulumi.alicloud.aligreen.ImageLib 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.ImageLibArgs;
import com.pulumi.alicloud.aligreen.inputs.ImageLibState;
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.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Provides a Aligreen Image Lib resource.
*
* Image library for image detection.
*
* For information about Aligreen Image Lib and how to use it, see [What is Image Lib](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.BizType;
* import com.pulumi.alicloud.aligreen.BizTypeArgs;
* import com.pulumi.alicloud.aligreen.ImageLib;
* import com.pulumi.alicloud.aligreen.ImageLibArgs;
* 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");
* var defaultUalunB = new BizType("defaultUalunB", BizTypeArgs.builder()
* .bizTypeName(name)
* .build());
*
* var default_ = new ImageLib("default", ImageLibArgs.builder()
* .category("BLACK")
* .enable(true)
* .scene("PORN")
* .imageLibName(name)
* .bizTypes(defaultUalunB.bizTypeName())
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Aligreen Image Lib can be imported using the id, e.g.
*
* ```sh
* $ pulumi import alicloud:aligreen/imageLib:ImageLib example <id>
* ```
*
*/
@ResourceType(type="alicloud:aligreen/imageLib:ImageLib")
public class ImageLib extends com.pulumi.resources.CustomResource {
/**
* List of business scenarios. For example: ["bizTypeA", "bizTypeB", "bizTypeC"]
*
*/
@Export(name="bizTypes", refs={List.class,String.class}, tree="[0,1]")
private Output* @Nullable */ List> bizTypes;
/**
* @return List of business scenarios. For example: ["bizTypeA", "bizTypeB", "bizTypeC"]
*
*/
public Output>> bizTypes() {
return Codegen.optional(this.bizTypes);
}
/**
* The category of the image library. Valid values: BLACK: a blacklist, WHITE: a whitelist, REVIEW: a review list
*
*/
@Export(name="category", refs={String.class}, tree="[0]")
private Output category;
/**
* @return The category of the image library. Valid values: BLACK: a blacklist, WHITE: a whitelist, REVIEW: a review list
*
*/
public Output category() {
return this.category;
}
/**
* Specifies whether to enable the image library. Valid values: true: Enable the image library. This is the default value. false: Disable the image library.
*
*/
@Export(name="enable", refs={Boolean.class}, tree="[0]")
private Output enable;
/**
* @return Specifies whether to enable the image library. Valid values: true: Enable the image library. This is the default value. false: Disable the image library.
*
*/
public Output enable() {
return this.enable;
}
/**
* The name of the image library defined by the customer. It can contain no more than 20 characters in Chinese, English, and underscore (_).
*
*/
@Export(name="imageLibName", refs={String.class}, tree="[0]")
private Output imageLibName;
/**
* @return The name of the image library defined by the customer. It can contain no more than 20 characters in Chinese, English, and underscore (_).
*
*/
public Output imageLibName() {
return this.imageLibName;
}
/**
* The moderation scenario to which the custom image library applies. Valid values: PORN: pornography detection, AD: ad detection, ILLEGAL: terrorist content detection
*
*/
@Export(name="scene", refs={String.class}, tree="[0]")
private Output scene;
/**
* @return The moderation scenario to which the custom image library applies. Valid values: PORN: pornography detection, AD: ad detection, ILLEGAL: terrorist content detection
*
*/
public Output scene() {
return this.scene;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public ImageLib(java.lang.String name) {
this(name, ImageLibArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public ImageLib(java.lang.String name, ImageLibArgs 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 ImageLib(java.lang.String name, ImageLibArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("alicloud:aligreen/imageLib:ImageLib", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private ImageLib(java.lang.String name, Output id, @Nullable ImageLibState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("alicloud:aligreen/imageLib:ImageLib", name, state, makeResourceOptions(options, id), false);
}
private static ImageLibArgs makeArgs(ImageLibArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? ImageLibArgs.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 ImageLib get(java.lang.String name, Output id, @Nullable ImageLibState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new ImageLib(name, id, state, options);
}
}