|
| 1 | +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** |
| 2 | +// *** Do not edit by hand unless you're certain you know what you are doing! *** |
| 3 | + |
| 4 | +using System; |
| 5 | +using System.Collections.Generic; |
| 6 | +using System.Collections.Immutable; |
| 7 | +using System.Threading.Tasks; |
| 8 | +using Pulumi.Serialization; |
| 9 | +using Pulumi; |
| 10 | + |
| 11 | +namespace TencentCloudIAC.PulumiPackage.Tencentcloud.Cls |
| 12 | +{ |
| 13 | + /// <summary> |
| 14 | + /// Provides a resource to create a cls index. |
| 15 | + /// |
| 16 | + /// ## Example Usage |
| 17 | + /// |
| 18 | + /// <!--Start PulumiCodeChooser --> |
| 19 | + /// ```csharp |
| 20 | + /// using System.Collections.Generic; |
| 21 | + /// using System.Linq; |
| 22 | + /// using Pulumi; |
| 23 | + /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud; |
| 24 | + /// |
| 25 | + /// return await Deployment.RunAsync(() => |
| 26 | + /// { |
| 27 | + /// var exampleLogset = new Tencentcloud.Cls.Logset("exampleLogset", new() |
| 28 | + /// { |
| 29 | + /// LogsetName = "tf_example", |
| 30 | + /// Tags = |
| 31 | + /// { |
| 32 | + /// { "demo", "test" }, |
| 33 | + /// }, |
| 34 | + /// }); |
| 35 | + /// |
| 36 | + /// var exampleTopic = new Tencentcloud.Cls.Topic("exampleTopic", new() |
| 37 | + /// { |
| 38 | + /// TopicName = "tf_example", |
| 39 | + /// LogsetId = exampleLogset.Id, |
| 40 | + /// AutoSplit = false, |
| 41 | + /// MaxSplitPartitions = 20, |
| 42 | + /// PartitionCount = 1, |
| 43 | + /// Period = 30, |
| 44 | + /// StorageType = "hot", |
| 45 | + /// Describes = "Test Demo.", |
| 46 | + /// HotPeriod = 10, |
| 47 | + /// Tags = |
| 48 | + /// { |
| 49 | + /// { "test", "test" }, |
| 50 | + /// }, |
| 51 | + /// }); |
| 52 | + /// |
| 53 | + /// var tokenizerValue = "@&?|#()='\",;:<>[]{}"; |
| 54 | + /// |
| 55 | + /// var exampleIndex = new Tencentcloud.Cls.Index("exampleIndex", new() |
| 56 | + /// { |
| 57 | + /// TopicId = exampleTopic.Id, |
| 58 | + /// Rule = new Tencentcloud.Cls.Inputs.IndexRuleArgs |
| 59 | + /// { |
| 60 | + /// FullText = new Tencentcloud.Cls.Inputs.IndexRuleFullTextArgs |
| 61 | + /// { |
| 62 | + /// CaseSensitive = true, |
| 63 | + /// Tokenizer = tokenizerValue, |
| 64 | + /// ContainZH = true, |
| 65 | + /// }, |
| 66 | + /// KeyValue = new Tencentcloud.Cls.Inputs.IndexRuleKeyValueArgs |
| 67 | + /// { |
| 68 | + /// CaseSensitive = true, |
| 69 | + /// KeyValues = new[] |
| 70 | + /// { |
| 71 | + /// new Tencentcloud.Cls.Inputs.IndexRuleKeyValueKeyValueArgs |
| 72 | + /// { |
| 73 | + /// Key = "hello", |
| 74 | + /// Value = new Tencentcloud.Cls.Inputs.IndexRuleKeyValueKeyValueValueArgs |
| 75 | + /// { |
| 76 | + /// ContainZH = true, |
| 77 | + /// SqlFlag = true, |
| 78 | + /// Tokenizer = tokenizerValue, |
| 79 | + /// Type = "text", |
| 80 | + /// }, |
| 81 | + /// }, |
| 82 | + /// new Tencentcloud.Cls.Inputs.IndexRuleKeyValueKeyValueArgs |
| 83 | + /// { |
| 84 | + /// Key = "world", |
| 85 | + /// Value = new Tencentcloud.Cls.Inputs.IndexRuleKeyValueKeyValueValueArgs |
| 86 | + /// { |
| 87 | + /// ContainZH = true, |
| 88 | + /// SqlFlag = true, |
| 89 | + /// Tokenizer = tokenizerValue, |
| 90 | + /// Type = "text", |
| 91 | + /// }, |
| 92 | + /// }, |
| 93 | + /// }, |
| 94 | + /// }, |
| 95 | + /// Tag = new Tencentcloud.Cls.Inputs.IndexRuleTagArgs |
| 96 | + /// { |
| 97 | + /// CaseSensitive = true, |
| 98 | + /// KeyValues = new[] |
| 99 | + /// { |
| 100 | + /// new Tencentcloud.Cls.Inputs.IndexRuleTagKeyValueArgs |
| 101 | + /// { |
| 102 | + /// Key = "terraform", |
| 103 | + /// Value = new Tencentcloud.Cls.Inputs.IndexRuleTagKeyValueValueArgs |
| 104 | + /// { |
| 105 | + /// ContainZH = true, |
| 106 | + /// SqlFlag = true, |
| 107 | + /// Tokenizer = tokenizerValue, |
| 108 | + /// Type = "text", |
| 109 | + /// }, |
| 110 | + /// }, |
| 111 | + /// }, |
| 112 | + /// }, |
| 113 | + /// DynamicIndex = new Tencentcloud.Cls.Inputs.IndexRuleDynamicIndexArgs |
| 114 | + /// { |
| 115 | + /// Status = true, |
| 116 | + /// }, |
| 117 | + /// }, |
| 118 | + /// Status = true, |
| 119 | + /// IncludeInternalFields = true, |
| 120 | + /// MetadataFlag = 1, |
| 121 | + /// }); |
| 122 | + /// |
| 123 | + /// }); |
| 124 | + /// ``` |
| 125 | + /// <!--End PulumiCodeChooser --> |
| 126 | + /// |
| 127 | + /// ## Import |
| 128 | + /// |
| 129 | + /// cls cos index can be imported using the id, e.g. |
| 130 | + /// |
| 131 | + /// ```sh |
| 132 | + /// $ pulumi import tencentcloud:Cls/index:Index example 0937e56f-4008-49d2-ad2d-69c52a9f11cc |
| 133 | + /// ``` |
| 134 | + /// </summary> |
| 135 | + [TencentcloudResourceType("tencentcloud:Cls/index:Index")] |
| 136 | + public partial class Index : global::Pulumi.CustomResource |
| 137 | + { |
| 138 | + /// <summary> |
| 139 | + /// Internal field marker of full-text index. Default value: false. Valid value: false: excluding internal fields; true: including internal fields. |
| 140 | + /// </summary> |
| 141 | + [Output("includeInternalFields")] |
| 142 | + public Output<bool?> IncludeInternalFields { get; private set; } = null!; |
| 143 | + |
| 144 | + /// <summary> |
| 145 | + /// Metadata flag. Default value: 0. Valid value: 0: full-text index (including the metadata field with key-value index enabled); 1: full-text index (including all metadata fields); 2: full-text index (excluding metadata fields).. |
| 146 | + /// </summary> |
| 147 | + [Output("metadataFlag")] |
| 148 | + public Output<int?> MetadataFlag { get; private set; } = null!; |
| 149 | + |
| 150 | + /// <summary> |
| 151 | + /// Index rule. |
| 152 | + /// </summary> |
| 153 | + [Output("rule")] |
| 154 | + public Output<Outputs.IndexRule> Rule { get; private set; } = null!; |
| 155 | + |
| 156 | + /// <summary> |
| 157 | + /// Whether to take effect. Default value: true. |
| 158 | + /// </summary> |
| 159 | + [Output("status")] |
| 160 | + public Output<bool> Status { get; private set; } = null!; |
| 161 | + |
| 162 | + /// <summary> |
| 163 | + /// Log topic ID. |
| 164 | + /// </summary> |
| 165 | + [Output("topicId")] |
| 166 | + public Output<string> TopicId { get; private set; } = null!; |
| 167 | + |
| 168 | + |
| 169 | + /// <summary> |
| 170 | + /// Create a Index resource with the given unique name, arguments, and options. |
| 171 | + /// </summary> |
| 172 | + /// |
| 173 | + /// <param name="name">The unique name of the resource</param> |
| 174 | + /// <param name="args">The arguments used to populate this resource's properties</param> |
| 175 | + /// <param name="options">A bag of options that control this resource's behavior</param> |
| 176 | + public Index(string name, IndexArgs args, CustomResourceOptions? options = null) |
| 177 | + : base("tencentcloud:Cls/index:Index", name, args ?? new IndexArgs(), MakeResourceOptions(options, "")) |
| 178 | + { |
| 179 | + } |
| 180 | + |
| 181 | + private Index(string name, Input<string> id, IndexState? state = null, CustomResourceOptions? options = null) |
| 182 | + : base("tencentcloud:Cls/index:Index", name, state, MakeResourceOptions(options, id)) |
| 183 | + { |
| 184 | + } |
| 185 | + |
| 186 | + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id) |
| 187 | + { |
| 188 | + var defaultOptions = new CustomResourceOptions |
| 189 | + { |
| 190 | + Version = Utilities.Version, |
| 191 | + PluginDownloadURL = "github://api.github.com/tencentcloudstack", |
| 192 | + }; |
| 193 | + var merged = CustomResourceOptions.Merge(defaultOptions, options); |
| 194 | + // Override the ID if one was specified for consistency with other language SDKs. |
| 195 | + merged.Id = id ?? merged.Id; |
| 196 | + return merged; |
| 197 | + } |
| 198 | + /// <summary> |
| 199 | + /// Get an existing Index resource's state with the given name, ID, and optional extra |
| 200 | + /// properties used to qualify the lookup. |
| 201 | + /// </summary> |
| 202 | + /// |
| 203 | + /// <param name="name">The unique name of the resulting resource.</param> |
| 204 | + /// <param name="id">The unique provider ID of the resource to lookup.</param> |
| 205 | + /// <param name="state">Any extra arguments used during the lookup.</param> |
| 206 | + /// <param name="options">A bag of options that control this resource's behavior</param> |
| 207 | + public static Index Get(string name, Input<string> id, IndexState? state = null, CustomResourceOptions? options = null) |
| 208 | + { |
| 209 | + return new Index(name, id, state, options); |
| 210 | + } |
| 211 | + } |
| 212 | + |
| 213 | + public sealed class IndexArgs : global::Pulumi.ResourceArgs |
| 214 | + { |
| 215 | + /// <summary> |
| 216 | + /// Internal field marker of full-text index. Default value: false. Valid value: false: excluding internal fields; true: including internal fields. |
| 217 | + /// </summary> |
| 218 | + [Input("includeInternalFields")] |
| 219 | + public Input<bool>? IncludeInternalFields { get; set; } |
| 220 | + |
| 221 | + /// <summary> |
| 222 | + /// Metadata flag. Default value: 0. Valid value: 0: full-text index (including the metadata field with key-value index enabled); 1: full-text index (including all metadata fields); 2: full-text index (excluding metadata fields).. |
| 223 | + /// </summary> |
| 224 | + [Input("metadataFlag")] |
| 225 | + public Input<int>? MetadataFlag { get; set; } |
| 226 | + |
| 227 | + /// <summary> |
| 228 | + /// Index rule. |
| 229 | + /// </summary> |
| 230 | + [Input("rule")] |
| 231 | + public Input<Inputs.IndexRuleArgs>? Rule { get; set; } |
| 232 | + |
| 233 | + /// <summary> |
| 234 | + /// Whether to take effect. Default value: true. |
| 235 | + /// </summary> |
| 236 | + [Input("status")] |
| 237 | + public Input<bool>? Status { get; set; } |
| 238 | + |
| 239 | + /// <summary> |
| 240 | + /// Log topic ID. |
| 241 | + /// </summary> |
| 242 | + [Input("topicId", required: true)] |
| 243 | + public Input<string> TopicId { get; set; } = null!; |
| 244 | + |
| 245 | + public IndexArgs() |
| 246 | + { |
| 247 | + } |
| 248 | + public static new IndexArgs Empty => new IndexArgs(); |
| 249 | + } |
| 250 | + |
| 251 | + public sealed class IndexState : global::Pulumi.ResourceArgs |
| 252 | + { |
| 253 | + /// <summary> |
| 254 | + /// Internal field marker of full-text index. Default value: false. Valid value: false: excluding internal fields; true: including internal fields. |
| 255 | + /// </summary> |
| 256 | + [Input("includeInternalFields")] |
| 257 | + public Input<bool>? IncludeInternalFields { get; set; } |
| 258 | + |
| 259 | + /// <summary> |
| 260 | + /// Metadata flag. Default value: 0. Valid value: 0: full-text index (including the metadata field with key-value index enabled); 1: full-text index (including all metadata fields); 2: full-text index (excluding metadata fields).. |
| 261 | + /// </summary> |
| 262 | + [Input("metadataFlag")] |
| 263 | + public Input<int>? MetadataFlag { get; set; } |
| 264 | + |
| 265 | + /// <summary> |
| 266 | + /// Index rule. |
| 267 | + /// </summary> |
| 268 | + [Input("rule")] |
| 269 | + public Input<Inputs.IndexRuleGetArgs>? Rule { get; set; } |
| 270 | + |
| 271 | + /// <summary> |
| 272 | + /// Whether to take effect. Default value: true. |
| 273 | + /// </summary> |
| 274 | + [Input("status")] |
| 275 | + public Input<bool>? Status { get; set; } |
| 276 | + |
| 277 | + /// <summary> |
| 278 | + /// Log topic ID. |
| 279 | + /// </summary> |
| 280 | + [Input("topicId")] |
| 281 | + public Input<string>? TopicId { get; set; } |
| 282 | + |
| 283 | + public IndexState() |
| 284 | + { |
| 285 | + } |
| 286 | + public static new IndexState Empty => new IndexState(); |
| 287 | + } |
| 288 | +} |
0 commit comments