1. Packages
  2. InfluxDB V3
  3. API Docs
  4. Token
InfluxDB3 v1.2.3 published on Sunday, Sep 29, 2024 by komminarlabs

influxdb3.Token

Explore with Pulumi AI

influxdb3 logo
InfluxDB3 v1.2.3 published on Sunday, Sep 29, 2024 by komminarlabs

    Creates and manages a token and returns the generated database token. Use this resource to create/manage a token, which generates an database token with permissions to read or write to a specific database.

    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,
              description: Optional[str] = None,
              permissions: Optional[Sequence[TokenPermissionArgs]] = 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: influxdb3: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 InfluxDB3.Token("tokenResource", new()
    {
        Description = "string",
        Permissions = new[]
        {
            new InfluxDB3.Inputs.TokenPermissionArgs
            {
                Action = "string",
                Resource = "string",
            },
        },
    });
    
    example, err := influxdb3.NewToken(ctx, "tokenResource", &influxdb3.TokenArgs{
    	Description: pulumi.String("string"),
    	Permissions: influxdb3.TokenPermissionArray{
    		&influxdb3.TokenPermissionArgs{
    			Action:   pulumi.String("string"),
    			Resource: pulumi.String("string"),
    		},
    	},
    })
    
    var tokenResource = new Token("tokenResource", TokenArgs.builder()
        .description("string")
        .permissions(TokenPermissionArgs.builder()
            .action("string")
            .resource("string")
            .build())
        .build());
    
    token_resource = influxdb3.Token("tokenResource",
        description="string",
        permissions=[{
            "action": "string",
            "resource": "string",
        }])
    
    const tokenResource = new influxdb3.Token("tokenResource", {
        description: "string",
        permissions: [{
            action: "string",
            resource: "string",
        }],
    });
    
    type: influxdb3:Token
    properties:
        description: string
        permissions:
            - action: string
              resource: string
    

    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:

    Description string
    The description of the database token.
    Permissions List<KomminarLabs.InfluxDB3.Inputs.TokenPermission>
    The list of permissions the database token allows.
    Description string
    The description of the database token.
    Permissions []TokenPermissionArgs
    The list of permissions the database token allows.
    description String
    The description of the database token.
    permissions List<TokenPermission>
    The list of permissions the database token allows.
    description string
    The description of the database token.
    permissions TokenPermission[]
    The list of permissions the database token allows.
    description str
    The description of the database token.
    permissions Sequence[TokenPermissionArgs]
    The list of permissions the database token allows.
    description String
    The description of the database token.
    permissions List<Property Map>
    The list of permissions the database token allows.

    Outputs

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

    AccessToken string
    The access token that can be used to authenticate query and write requests to the cluster. The access token is never stored by InfluxDB and is only returned once when the token is created. If the access token is lost, a new token must be created.
    AccountId string
    The ID of the account that the database token belongs to.
    ClusterId string
    The ID of the cluster that the database token belongs to.
    CreatedAt string
    The date and time that the database token was created. Uses RFC3339 format.
    Id string
    The provider-assigned unique ID for this managed resource.
    AccessToken string
    The access token that can be used to authenticate query and write requests to the cluster. The access token is never stored by InfluxDB and is only returned once when the token is created. If the access token is lost, a new token must be created.
    AccountId string
    The ID of the account that the database token belongs to.
    ClusterId string
    The ID of the cluster that the database token belongs to.
    CreatedAt string
    The date and time that the database token was created. Uses RFC3339 format.
    Id string
    The provider-assigned unique ID for this managed resource.
    accessToken String
    The access token that can be used to authenticate query and write requests to the cluster. The access token is never stored by InfluxDB and is only returned once when the token is created. If the access token is lost, a new token must be created.
    accountId String
    The ID of the account that the database token belongs to.
    clusterId String
    The ID of the cluster that the database token belongs to.
    createdAt String
    The date and time that the database token was created. Uses RFC3339 format.
    id String
    The provider-assigned unique ID for this managed resource.
    accessToken string
    The access token that can be used to authenticate query and write requests to the cluster. The access token is never stored by InfluxDB and is only returned once when the token is created. If the access token is lost, a new token must be created.
    accountId string
    The ID of the account that the database token belongs to.
    clusterId string
    The ID of the cluster that the database token belongs to.
    createdAt string
    The date and time that the database token was created. Uses RFC3339 format.
    id string
    The provider-assigned unique ID for this managed resource.
    access_token str
    The access token that can be used to authenticate query and write requests to the cluster. The access token is never stored by InfluxDB and is only returned once when the token is created. If the access token is lost, a new token must be created.
    account_id str
    The ID of the account that the database token belongs to.
    cluster_id str
    The ID of the cluster that the database token belongs to.
    created_at str
    The date and time that the database token was created. Uses RFC3339 format.
    id str
    The provider-assigned unique ID for this managed resource.
    accessToken String
    The access token that can be used to authenticate query and write requests to the cluster. The access token is never stored by InfluxDB and is only returned once when the token is created. If the access token is lost, a new token must be created.
    accountId String
    The ID of the account that the database token belongs to.
    clusterId String
    The ID of the cluster that the database token belongs to.
    createdAt String
    The date and time that the database token was created. Uses RFC3339 format.
    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,
            access_token: Optional[str] = None,
            account_id: Optional[str] = None,
            cluster_id: Optional[str] = None,
            created_at: Optional[str] = None,
            description: Optional[str] = None,
            permissions: Optional[Sequence[TokenPermissionArgs]] = 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:
    AccessToken string
    The access token that can be used to authenticate query and write requests to the cluster. The access token is never stored by InfluxDB and is only returned once when the token is created. If the access token is lost, a new token must be created.
    AccountId string
    The ID of the account that the database token belongs to.
    ClusterId string
    The ID of the cluster that the database token belongs to.
    CreatedAt string
    The date and time that the database token was created. Uses RFC3339 format.
    Description string
    The description of the database token.
    Permissions List<KomminarLabs.InfluxDB3.Inputs.TokenPermission>
    The list of permissions the database token allows.
    AccessToken string
    The access token that can be used to authenticate query and write requests to the cluster. The access token is never stored by InfluxDB and is only returned once when the token is created. If the access token is lost, a new token must be created.
    AccountId string
    The ID of the account that the database token belongs to.
    ClusterId string
    The ID of the cluster that the database token belongs to.
    CreatedAt string
    The date and time that the database token was created. Uses RFC3339 format.
    Description string
    The description of the database token.
    Permissions []TokenPermissionArgs
    The list of permissions the database token allows.
    accessToken String
    The access token that can be used to authenticate query and write requests to the cluster. The access token is never stored by InfluxDB and is only returned once when the token is created. If the access token is lost, a new token must be created.
    accountId String
    The ID of the account that the database token belongs to.
    clusterId String
    The ID of the cluster that the database token belongs to.
    createdAt String
    The date and time that the database token was created. Uses RFC3339 format.
    description String
    The description of the database token.
    permissions List<TokenPermission>
    The list of permissions the database token allows.
    accessToken string
    The access token that can be used to authenticate query and write requests to the cluster. The access token is never stored by InfluxDB and is only returned once when the token is created. If the access token is lost, a new token must be created.
    accountId string
    The ID of the account that the database token belongs to.
    clusterId string
    The ID of the cluster that the database token belongs to.
    createdAt string
    The date and time that the database token was created. Uses RFC3339 format.
    description string
    The description of the database token.
    permissions TokenPermission[]
    The list of permissions the database token allows.
    access_token str
    The access token that can be used to authenticate query and write requests to the cluster. The access token is never stored by InfluxDB and is only returned once when the token is created. If the access token is lost, a new token must be created.
    account_id str
    The ID of the account that the database token belongs to.
    cluster_id str
    The ID of the cluster that the database token belongs to.
    created_at str
    The date and time that the database token was created. Uses RFC3339 format.
    description str
    The description of the database token.
    permissions Sequence[TokenPermissionArgs]
    The list of permissions the database token allows.
    accessToken String
    The access token that can be used to authenticate query and write requests to the cluster. The access token is never stored by InfluxDB and is only returned once when the token is created. If the access token is lost, a new token must be created.
    accountId String
    The ID of the account that the database token belongs to.
    clusterId String
    The ID of the cluster that the database token belongs to.
    createdAt String
    The date and time that the database token was created. Uses RFC3339 format.
    description String
    The description of the database token.
    permissions List<Property Map>
    The list of permissions the database token allows.

    Supporting Types

    TokenPermission, TokenPermissionArgs

    Action string
    The action the database token permission allows. Valid values are read or write.
    Resource string
    The resource the database token permission applies to. * refers to all databases.
    Action string
    The action the database token permission allows. Valid values are read or write.
    Resource string
    The resource the database token permission applies to. * refers to all databases.
    action String
    The action the database token permission allows. Valid values are read or write.
    resource String
    The resource the database token permission applies to. * refers to all databases.
    action string
    The action the database token permission allows. Valid values are read or write.
    resource string
    The resource the database token permission applies to. * refers to all databases.
    action str
    The action the database token permission allows. Valid values are read or write.
    resource str
    The resource the database token permission applies to. * refers to all databases.
    action String
    The action the database token permission allows. Valid values are read or write.
    resource String
    The resource the database token permission applies to. * refers to all databases.

    Package Details

    Repository
    influxdb3 komminarlabs/pulumi-influxdb3
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the influxdb3 Terraform Provider.
    influxdb3 logo
    InfluxDB3 v1.2.3 published on Sunday, Sep 29, 2024 by komminarlabs