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

com.pulumi.sumologic.Token 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.TokenArgs;
import com.pulumi.sumologic.Utilities;
import com.pulumi.sumologic.inputs.TokenState;
import java.lang.Integer;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Provides a [Sumologic Token](https://help.sumologic.com/Manage/Security/Installation_Tokens).
 * 
 * ## 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.Token;
 * import com.pulumi.sumologic.TokenArgs;
 * 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 exampleToken = new Token("exampleToken", TokenArgs.builder()
 *             .name("testToken")
 *             .description("Testing resource sumologic_token")
 *             .status("Active")
 *             .type("CollectorRegistration")
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Tokens can be imported using the name, e.g.: * * hcl * * ```sh * $ pulumi import sumologic:index/token:Token test id * ``` * * [1]: https://help.sumologic.com/Manage/Security/Installation_Tokens * */ @ResourceType(type="sumologic:index/token:Token") public class Token extends com.pulumi.resources.CustomResource { /** * The description of the token. * */ @Export(name="description", refs={String.class}, tree="[0]") private Output description; /** * @return The description of the token. * */ public Output> description() { return Codegen.optional(this.description); } /** * The encoded token for collector registration. * */ @Export(name="encodedTokenAndUrl", refs={String.class}, tree="[0]") private Output encodedTokenAndUrl; /** * @return The encoded token for collector registration. * */ public Output encodedTokenAndUrl() { return this.encodedTokenAndUrl; } /** * Display name of the token. This must be unique across all of the tokens. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Display name of the token. This must be unique across all of the tokens. * */ public Output name() { return this.name; } /** * Status of the token. Valid values: * - `Active` * - `Inactive` * * The following attributes are exported: * */ @Export(name="status", refs={String.class}, tree="[0]") private Output status; /** * @return Status of the token. Valid values: * - `Active` * - `Inactive` * * The following attributes are exported: * */ public Output status() { return this.status; } /** * Type of the token. Valid value: * - `CollectorRegistration`. * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return Type of the token. Valid value: * - `CollectorRegistration`. * */ public Output type() { return this.type; } @Export(name="version", refs={Integer.class}, tree="[0]") private Output version; public Output version() { return this.version; } /** * * @param name The _unique_ name of the resulting resource. */ public Token(java.lang.String name) { this(name, TokenArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Token(java.lang.String name, TokenArgs 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 Token(java.lang.String name, TokenArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("sumologic:index/token:Token", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Token(java.lang.String name, Output id, @Nullable TokenState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("sumologic:index/token:Token", name, state, makeResourceOptions(options, id), false); } private static TokenArgs makeArgs(TokenArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? TokenArgs.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 Token get(java.lang.String name, Output id, @Nullable TokenState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Token(name, id, state, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy