influxdb3.Token
Explore with Pulumi AI
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)
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<Komminar
Labs. Influx DB3. Inputs. Token Permission> - The list of permissions the database token allows.
- Description string
- The description of the database token.
- Permissions
[]Token
Permission Args - The list of permissions the database token allows.
- description String
- The description of the database token.
- permissions
List<Token
Permission> - The list of permissions the database token allows.
- description string
- The description of the database token.
- permissions
Token
Permission[] - The list of permissions the database token allows.
- description str
- The description of the database token.
- permissions
Sequence[Token
Permission Args] - 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:
- Access
Token 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.
- Account
Id string - The ID of the account that the database token belongs to.
- Cluster
Id string - The ID of the cluster that the database token belongs to.
- Created
At 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 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.
- Account
Id string - The ID of the account that the database token belongs to.
- Cluster
Id string - The ID of the cluster that the database token belongs to.
- Created
At 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 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.
- account
Id String - The ID of the account that the database token belongs to.
- cluster
Id String - The ID of the cluster that the database token belongs to.
- created
At 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 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.
- account
Id string - The ID of the account that the database token belongs to.
- cluster
Id string - The ID of the cluster that the database token belongs to.
- created
At 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.
- access
Token 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.
- account
Id String - The ID of the account that the database token belongs to.
- cluster
Id String - The ID of the cluster that the database token belongs to.
- created
At 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.
- Access
Token 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.
- Account
Id string - The ID of the account that the database token belongs to.
- Cluster
Id string - The ID of the cluster that the database token belongs to.
- Created
At string - The date and time that the database token was created. Uses RFC3339 format.
- Description string
- The description of the database token.
- Permissions
List<Komminar
Labs. Influx DB3. Inputs. Token Permission> - The list of permissions the database token allows.
- Access
Token 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.
- Account
Id string - The ID of the account that the database token belongs to.
- Cluster
Id string - The ID of the cluster that the database token belongs to.
- Created
At string - The date and time that the database token was created. Uses RFC3339 format.
- Description string
- The description of the database token.
- Permissions
[]Token
Permission Args - The list of permissions the database token allows.
- access
Token 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.
- account
Id String - The ID of the account that the database token belongs to.
- cluster
Id String - The ID of the cluster that the database token belongs to.
- created
At String - The date and time that the database token was created. Uses RFC3339 format.
- description String
- The description of the database token.
- permissions
List<Token
Permission> - The list of permissions the database token allows.
- access
Token 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.
- account
Id string - The ID of the account that the database token belongs to.
- cluster
Id string - The ID of the cluster that the database token belongs to.
- created
At string - The date and time that the database token was created. Uses RFC3339 format.
- description string
- The description of the database token.
- permissions
Token
Permission[] - 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[Token
Permission Args] - The list of permissions the database token allows.
- access
Token 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.
- account
Id String - The ID of the account that the database token belongs to.
- cluster
Id String - The ID of the cluster that the database token belongs to.
- created
At 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
Package Details
- Repository
- influxdb3 komminarlabs/pulumi-influxdb3
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
influxdb3
Terraform Provider.