All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.alicloud.log.StoreIndex Maven / Gradle / Ivy

There is a newer version: 3.63.0-alpha.1727424957
Show newest version
// *** 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.log;

import com.pulumi.alicloud.Utilities;
import com.pulumi.alicloud.log.StoreIndexArgs;
import com.pulumi.alicloud.log.inputs.StoreIndexState;
import com.pulumi.alicloud.log.outputs.StoreIndexFieldSearch;
import com.pulumi.alicloud.log.outputs.StoreIndexFullText;
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.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Log Service provides the LogSearch/Analytics function to query and analyze large amounts of logs in real time.
 * You can use this function by enabling the index and field statistics. [Refer to details](https://www.alibabacloud.com/help/doc-detail/43772.htm)
 * 
 * ## 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.random.integer;
 * import com.pulumi.random.IntegerArgs;
 * import com.pulumi.alicloud.log.Project;
 * import com.pulumi.alicloud.log.ProjectArgs;
 * import com.pulumi.alicloud.log.Store;
 * import com.pulumi.alicloud.log.StoreArgs;
 * import com.pulumi.alicloud.log.StoreIndex;
 * import com.pulumi.alicloud.log.StoreIndexArgs;
 * import com.pulumi.alicloud.log.inputs.StoreIndexFullTextArgs;
 * import com.pulumi.alicloud.log.inputs.StoreIndexFieldSearchArgs;
 * 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) {
 *         var default_ = new Integer("default", IntegerArgs.builder()
 *             .max(99999)
 *             .min(10000)
 *             .build());
 * 
 *         var example = new Project("example", ProjectArgs.builder()
 *             .name(String.format("terraform-example-%s", default_.result()))
 *             .description("terraform-example")
 *             .build());
 * 
 *         var exampleStore = new Store("exampleStore", StoreArgs.builder()
 *             .project(example.name())
 *             .name("example-store")
 *             .shardCount(3)
 *             .autoSplit(true)
 *             .maxSplitShardCount(60)
 *             .appendMeta(true)
 *             .build());
 * 
 *         var exampleStoreIndex = new StoreIndex("exampleStoreIndex", StoreIndexArgs.builder()
 *             .project(example.name())
 *             .logstore(exampleStore.name())
 *             .fullText(StoreIndexFullTextArgs.builder()
 *                 .caseSensitive(true)
 *                 .token("""
 *  #$^*
 * 	                """)
 *                 .build())
 *             .fieldSearches(StoreIndexFieldSearchArgs.builder()
 *                 .name("terraform-example")
 *                 .enableAnalytics(true)
 *                 .type("text")
 *                 .token("""
 *  #$^*
 * 	                """)
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Module Support * * You can use the existing sls module * to create SLS project, store and store index one-click, like ECS instances. * * ## Import * * Log store index can be imported using the id, e.g. * * ```sh * $ pulumi import alicloud:log/storeIndex:StoreIndex example tf-log:tf-log-store * ``` * */ @ResourceType(type="alicloud:log/storeIndex:StoreIndex") public class StoreIndex extends com.pulumi.resources.CustomResource { /** * List configurations of field search index. Valid item as follows: * */ @Export(name="fieldSearches", refs={List.class,StoreIndexFieldSearch.class}, tree="[0,1]") private Output> fieldSearches; /** * @return List configurations of field search index. Valid item as follows: * */ public Output>> fieldSearches() { return Codegen.optional(this.fieldSearches); } /** * The configuration of full text index. Valid item as follows: * */ @Export(name="fullText", refs={StoreIndexFullText.class}, tree="[0]") private Output fullText; /** * @return The configuration of full text index. Valid item as follows: * */ public Output> fullText() { return Codegen.optional(this.fullText); } /** * The log store name to the query index belongs. * */ @Export(name="logstore", refs={String.class}, tree="[0]") private Output logstore; /** * @return The log store name to the query index belongs. * */ public Output logstore() { return this.logstore; } /** * The project name to the log store belongs. * */ @Export(name="project", refs={String.class}, tree="[0]") private Output project; /** * @return The project name to the log store belongs. * */ public Output project() { return this.project; } /** * * @param name The _unique_ name of the resulting resource. */ public StoreIndex(String name) { this(name, StoreIndexArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public StoreIndex(String name, StoreIndexArgs 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 StoreIndex(String name, StoreIndexArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:log/storeIndex:StoreIndex", name, args == null ? StoreIndexArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); } private StoreIndex(String name, Output id, @Nullable StoreIndexState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:log/storeIndex:StoreIndex", name, state, makeResourceOptions(options, id)); } 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 StoreIndex get(String name, Output id, @Nullable StoreIndexState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new StoreIndex(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy