1. Packages
  2. Sumologic Provider
  3. API Docs
  4. Token
Sumo Logic v0.23.7 published on Thursday, Oct 24, 2024 by Pulumi

sumologic.Token

Explore with Pulumi AI

sumologic logo
Sumo Logic v0.23.7 published on Thursday, Oct 24, 2024 by Pulumi

    Provides a Sumologic Token.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as sumologic from "@pulumi/sumologic";
    
    const exampleToken = new sumologic.Token("example_token", {
        name: "testToken",
        description: "Testing resource sumologic_token",
        status: "Active",
        type: "CollectorRegistration",
    });
    
    import pulumi
    import pulumi_sumologic as sumologic
    
    example_token = sumologic.Token("example_token",
        name="testToken",
        description="Testing resource sumologic_token",
        status="Active",
        type="CollectorRegistration")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-sumologic/sdk/go/sumologic"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := sumologic.NewToken(ctx, "example_token", &sumologic.TokenArgs{
    			Name:        pulumi.String("testToken"),
    			Description: pulumi.String("Testing resource sumologic_token"),
    			Status:      pulumi.String("Active"),
    			Type:        pulumi.String("CollectorRegistration"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using SumoLogic = Pulumi.SumoLogic;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleToken = new SumoLogic.Token("example_token", new()
        {
            Name = "testToken",
            Description = "Testing resource sumologic_token",
            Status = "Active",
            Type = "CollectorRegistration",
        });
    
    });
    
    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());
    
        }
    }
    
    resources:
      exampleToken:
        type: sumologic:Token
        name: example_token
        properties:
          name: testToken
          description: Testing resource sumologic_token
          status: Active
          type: CollectorRegistration
    

    Create Token Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Token(name: string, args: TokenArgs, opts?: CustomResourceOptions);
    @overload
    def Token(resource_name: str,
              args: TokenArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Token(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              status: Optional[str] = None,
              type: Optional[str] = None,
              description: Optional[str] = None,
              name: Optional[str] = None,
              version: Optional[int] = None)
    func NewToken(ctx *Context, name string, args TokenArgs, opts ...ResourceOption) (*Token, error)
    public Token(string name, TokenArgs args, CustomResourceOptions? opts = null)
    public Token(String name, TokenArgs args)
    public Token(String name, TokenArgs args, CustomResourceOptions options)
    
    type: sumologic:Token
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args TokenArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args TokenArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args TokenArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TokenArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TokenArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var tokenResource = new SumoLogic.Token("tokenResource", new()
    {
        Status = "string",
        Type = "string",
        Description = "string",
        Name = "string",
        Version = 0,
    });
    
    example, err := sumologic.NewToken(ctx, "tokenResource", &sumologic.TokenArgs{
    	Status:      pulumi.String("string"),
    	Type:        pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Version:     pulumi.Int(0),
    })
    
    var tokenResource = new Token("tokenResource", TokenArgs.builder()
        .status("string")
        .type("string")
        .description("string")
        .name("string")
        .version(0)
        .build());
    
    token_resource = sumologic.Token("tokenResource",
        status="string",
        type="string",
        description="string",
        name="string",
        version=0)
    
    const tokenResource = new sumologic.Token("tokenResource", {
        status: "string",
        type: "string",
        description: "string",
        name: "string",
        version: 0,
    });
    
    type: sumologic:Token
    properties:
        description: string
        name: string
        status: string
        type: string
        version: 0
    

    Token Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Token resource accepts the following input properties:

    Status string

    Status of the token. Valid values:

    • Active
    • Inactive

    The following attributes are exported:

    Type string
    Type of the token. Valid value:

    • CollectorRegistration.
    Description string
    The description of the token.
    Name string
    Display name of the token. This must be unique across all of the tokens.
    Version int
    Status string

    Status of the token. Valid values:

    • Active
    • Inactive

    The following attributes are exported:

    Type string
    Type of the token. Valid value:

    • CollectorRegistration.
    Description string
    The description of the token.
    Name string
    Display name of the token. This must be unique across all of the tokens.
    Version int
    status String

    Status of the token. Valid values:

    • Active
    • Inactive

    The following attributes are exported:

    type String
    Type of the token. Valid value:

    • CollectorRegistration.
    description String
    The description of the token.
    name String
    Display name of the token. This must be unique across all of the tokens.
    version Integer
    status string

    Status of the token. Valid values:

    • Active
    • Inactive

    The following attributes are exported:

    type string
    Type of the token. Valid value:

    • CollectorRegistration.
    description string
    The description of the token.
    name string
    Display name of the token. This must be unique across all of the tokens.
    version number
    status str

    Status of the token. Valid values:

    • Active
    • Inactive

    The following attributes are exported:

    type str
    Type of the token. Valid value:

    • CollectorRegistration.
    description str
    The description of the token.
    name str
    Display name of the token. This must be unique across all of the tokens.
    version int
    status String

    Status of the token. Valid values:

    • Active
    • Inactive

    The following attributes are exported:

    type String
    Type of the token. Valid value:

    • CollectorRegistration.
    description String
    The description of the token.
    name String
    Display name of the token. This must be unique across all of the tokens.
    version Number

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Token resource produces the following output properties:

    EncodedTokenAndUrl string
    The encoded token for collector registration.
    Id string
    The provider-assigned unique ID for this managed resource.
    EncodedTokenAndUrl string
    The encoded token for collector registration.
    Id string
    The provider-assigned unique ID for this managed resource.
    encodedTokenAndUrl String
    The encoded token for collector registration.
    id String
    The provider-assigned unique ID for this managed resource.
    encodedTokenAndUrl string
    The encoded token for collector registration.
    id string
    The provider-assigned unique ID for this managed resource.
    encoded_token_and_url str
    The encoded token for collector registration.
    id str
    The provider-assigned unique ID for this managed resource.
    encodedTokenAndUrl String
    The encoded token for collector registration.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Token Resource

    Get an existing Token resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: TokenState, opts?: CustomResourceOptions): Token
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            encoded_token_and_url: Optional[str] = None,
            name: Optional[str] = None,
            status: Optional[str] = None,
            type: Optional[str] = None,
            version: Optional[int] = None) -> Token
    func GetToken(ctx *Context, name string, id IDInput, state *TokenState, opts ...ResourceOption) (*Token, error)
    public static Token Get(string name, Input<string> id, TokenState? state, CustomResourceOptions? opts = null)
    public static Token get(String name, Output<String> id, TokenState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Description string
    The description of the token.
    EncodedTokenAndUrl string
    The encoded token for collector registration.
    Name string
    Display name of the token. This must be unique across all of the tokens.
    Status string

    Status of the token. Valid values:

    • Active
    • Inactive

    The following attributes are exported:

    Type string
    Type of the token. Valid value:

    • CollectorRegistration.
    Version int
    Description string
    The description of the token.
    EncodedTokenAndUrl string
    The encoded token for collector registration.
    Name string
    Display name of the token. This must be unique across all of the tokens.
    Status string

    Status of the token. Valid values:

    • Active
    • Inactive

    The following attributes are exported:

    Type string
    Type of the token. Valid value:

    • CollectorRegistration.
    Version int
    description String
    The description of the token.
    encodedTokenAndUrl String
    The encoded token for collector registration.
    name String
    Display name of the token. This must be unique across all of the tokens.
    status String

    Status of the token. Valid values:

    • Active
    • Inactive

    The following attributes are exported:

    type String
    Type of the token. Valid value:

    • CollectorRegistration.
    version Integer
    description string
    The description of the token.
    encodedTokenAndUrl string
    The encoded token for collector registration.
    name string
    Display name of the token. This must be unique across all of the tokens.
    status string

    Status of the token. Valid values:

    • Active
    • Inactive

    The following attributes are exported:

    type string
    Type of the token. Valid value:

    • CollectorRegistration.
    version number
    description str
    The description of the token.
    encoded_token_and_url str
    The encoded token for collector registration.
    name str
    Display name of the token. This must be unique across all of the tokens.
    status str

    Status of the token. Valid values:

    • Active
    • Inactive

    The following attributes are exported:

    type str
    Type of the token. Valid value:

    • CollectorRegistration.
    version int
    description String
    The description of the token.
    encodedTokenAndUrl String
    The encoded token for collector registration.
    name String
    Display name of the token. This must be unique across all of the tokens.
    status String

    Status of the token. Valid values:

    • Active
    • Inactive

    The following attributes are exported:

    type String
    Type of the token. Valid value:

    • CollectorRegistration.
    version Number

    Import

    Tokens can be imported using the name, e.g.:

    hcl

    $ pulumi import sumologic:index/token:Token test id
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Sumo Logic pulumi/pulumi-sumologic
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the sumologic Terraform Provider.
    sumologic logo
    Sumo Logic v0.23.7 published on Thursday, Oct 24, 2024 by Pulumi