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

com.pulumi.sumologic.Collector Maven / Gradle / Ivy

The 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.sumologic;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import com.pulumi.sumologic.CollectorArgs;
import com.pulumi.sumologic.Utilities;
import com.pulumi.sumologic.inputs.CollectorState;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Provides a [Sumologic (Hosted) Collector][1].
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.sumologic.Collector;
 * import com.pulumi.sumologic.CollectorArgs;
 * 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 collector = new Collector("collector", CollectorArgs.builder()
 *             .name("my-collector")
 *             .description("Just testing this")
 *             .fields(Map.of("environment", "production"))
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Collectors can be imported using the collector id, e.g.: * * hcl * * ```sh * $ pulumi import sumologic:index/collector:Collector test 1234567890 * ``` * * Collectors can also be imported using the collector name, which is unique per Sumo Logic account, e.g.: * * hcl * * ```sh * $ pulumi import sumologic:index/collector:Collector test my_test_collector * ``` * * [1]: https://help.sumologic.com/docs/send-data/hosted-collectors/ * * [2]: https://en.wikipedia.org/wiki/Tz_database * * [3]: https://help.sumologic.com/Manage/Fields * */ @ResourceType(type="sumologic:index/collector:Collector") public class Collector extends com.pulumi.resources.CustomResource { /** * The default source category for any source attached to this collector. Can be overridden in the configuration of said sources. * */ @Export(name="category", refs={String.class}, tree="[0]") private Output category; /** * @return The default source category for any source attached to this collector. Can be overridden in the configuration of said sources. * */ public Output> category() { return Codegen.optional(this.category); } /** * The description of the collector. * */ @Export(name="description", refs={String.class}, tree="[0]") private Output description; /** * @return The description of the collector. * */ public Output> description() { return Codegen.optional(this.description); } /** * Map containing [key/value pairs][3]. * */ @Export(name="fields", refs={Map.class,String.class}, tree="[0,1,1]") private Output> fields; /** * @return Map containing [key/value pairs][3]. * */ public Output>> fields() { return Codegen.optional(this.fields); } /** * The name of the collector. This is required, and has to be unique. Changing this will force recreation the collector. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of the collector. This is required, and has to be unique. Changing this will force recreation the collector. * */ public Output name() { return this.name; } /** * The time zone to use for this collector. The value follows the [tzdata](https://en.wikipedia.org/wiki/Tz_database) naming convention. * */ @Export(name="timezone", refs={String.class}, tree="[0]") private Output timezone; /** * @return The time zone to use for this collector. The value follows the [tzdata](https://en.wikipedia.org/wiki/Tz_database) naming convention. * */ public Output> timezone() { return Codegen.optional(this.timezone); } /** * * @param name The _unique_ name of the resulting resource. */ public Collector(java.lang.String name) { this(name, CollectorArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Collector(java.lang.String name, @Nullable CollectorArgs 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 Collector(java.lang.String name, @Nullable CollectorArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("sumologic:index/collector:Collector", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Collector(java.lang.String name, Output id, @Nullable CollectorState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("sumologic:index/collector:Collector", name, state, makeResourceOptions(options, id), false); } private static CollectorArgs makeArgs(@Nullable CollectorArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? CollectorArgs.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 Collector get(java.lang.String name, Output id, @Nullable CollectorState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Collector(name, id, state, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy