com.pulumi.alicloud.ots.SearchIndex 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.ots;
import com.pulumi.alicloud.Utilities;
import com.pulumi.alicloud.ots.SearchIndexArgs;
import com.pulumi.alicloud.ots.inputs.SearchIndexState;
import com.pulumi.alicloud.ots.outputs.SearchIndexSchema;
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 an OTS search index resource.
*
* For information about OTS search index and how to use it, see [Search index overview](https://www.alibabacloud.com/help/en/tablestore/latest/search-index-overview).
*
* > **NOTE:** Available since v1.187.0.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* OTS search index can be imported using id, e.g.
*
* ```sh
* $ pulumi import alicloud:ots/searchIndex:SearchIndex index1 <instance_name>:<table_name>:<index_name>:<index_type>
* ```
*
*/
@ResourceType(type="alicloud:ots/searchIndex:SearchIndex")
public class SearchIndex extends com.pulumi.resources.CustomResource {
/**
* The search index create time.
*
*/
@Export(name="createTime", refs={Integer.class}, tree="[0]")
private Output createTime;
/**
* @return The search index create time.
*
*/
public Output createTime() {
return this.createTime;
}
/**
* The timestamp for sync phase.
*
*/
@Export(name="currentSyncTimestamp", refs={Integer.class}, tree="[0]")
private Output currentSyncTimestamp;
/**
* @return The timestamp for sync phase.
*
*/
public Output currentSyncTimestamp() {
return this.currentSyncTimestamp;
}
/**
* The index id of the search index which could not be changed.
*
*/
@Export(name="indexId", refs={String.class}, tree="[0]")
private Output indexId;
/**
* @return The index id of the search index which could not be changed.
*
*/
public Output indexId() {
return this.indexId;
}
/**
* The index name of the OTS Table. If changed, a new index would be created.
*
*/
@Export(name="indexName", refs={String.class}, tree="[0]")
private Output indexName;
/**
* @return The index name of the OTS Table. If changed, a new index would be created.
*
*/
public Output indexName() {
return this.indexName;
}
/**
* The name of the OTS instance in which table will located.
*
*/
@Export(name="instanceName", refs={String.class}, tree="[0]")
private Output instanceName;
/**
* @return The name of the OTS instance in which table will located.
*
*/
public Output instanceName() {
return this.instanceName;
}
/**
* The schema of the search index. If changed, a new index would be created. See `schema` below.
*
*/
@Export(name="schemas", refs={List.class,SearchIndexSchema.class}, tree="[0,1]")
private Output> schemas;
/**
* @return The schema of the search index. If changed, a new index would be created. See `schema` below.
*
*/
public Output> schemas() {
return this.schemas;
}
/**
* The search index sync phase. possible values: `Full`, `Incr`.
*
*/
@Export(name="syncPhase", refs={String.class}, tree="[0]")
private Output syncPhase;
/**
* @return The search index sync phase. possible values: `Full`, `Incr`.
*
*/
public Output syncPhase() {
return this.syncPhase;
}
/**
* The name of the OTS table. If changed, a new table would be created.
*
*/
@Export(name="tableName", refs={String.class}, tree="[0]")
private Output tableName;
/**
* @return The name of the OTS table. If changed, a new table would be created.
*
*/
public Output tableName() {
return this.tableName;
}
/**
* The index type of the OTS Table. Specifies the retention period of data in the search index. Unit: seconds. Default value: -1.
* If the retention period exceeds the TTL value, OTS automatically deletes expired data.
*
*/
@Export(name="timeToLive", refs={Integer.class}, tree="[0]")
private Output timeToLive;
/**
* @return The index type of the OTS Table. Specifies the retention period of data in the search index. Unit: seconds. Default value: -1.
* If the retention period exceeds the TTL value, OTS automatically deletes expired data.
*
*/
public Output> timeToLive() {
return Codegen.optional(this.timeToLive);
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public SearchIndex(String name) {
this(name, SearchIndexArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public SearchIndex(String name, SearchIndexArgs 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 SearchIndex(String name, SearchIndexArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("alicloud:ots/searchIndex:SearchIndex", name, args == null ? SearchIndexArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
}
private SearchIndex(String name, Output id, @Nullable SearchIndexState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("alicloud:ots/searchIndex:SearchIndex", 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 SearchIndex get(String name, Output id, @Nullable SearchIndexState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new SearchIndex(name, id, state, options);
}
}