import * as pulumi from "@pulumi/pulumi"; /** * Creates a new session. A session can be used to perform transactions that read and/or modify data in a Cloud Spanner database. Sessions are meant to be reused for many consecutive transactions. Sessions can only execute one transaction at a time. To execute multiple concurrent read-write/write-only transactions, create multiple sessions. Note that standalone reads and queries use a transaction internally, and count toward the one transaction limit. Active sessions use additional server resources, so it is a good idea to delete idle and unneeded sessions. Aside from explicit deletes, Cloud Spanner may delete sessions for which no operations are sent for more than an hour. If a session is deleted, requests to it return `NOT_FOUND`. Idle sessions can be kept alive by sending a trivial SQL query periodically, e.g., `"SELECT 1"`. * Auto-naming is currently not supported for this resource. */ export declare class Session extends pulumi.CustomResource { /** * Get an existing Session 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 opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, opts?: pulumi.CustomResourceOptions): Session; /** * Returns true if the given object is an instance of Session. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Session; /** * The approximate timestamp when the session is last used. It is typically earlier than the actual last use time. */ readonly approximateLastUseTime: pulumi.Output; /** * The timestamp when the session is created. */ readonly createTime: pulumi.Output; /** * The database role which created this session. */ readonly creatorRole: pulumi.Output; readonly databaseId: pulumi.Output; readonly instanceId: pulumi.Output; /** * The labels for the session. * Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. * Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. * No more than 64 labels can be associated with a given session. See https://goo.gl/xmQnxf for more information on and examples of labels. */ readonly labels: pulumi.Output<{ [key: string]: string; }>; /** * The name of the session. This is always system-assigned. */ readonly name: pulumi.Output; readonly project: pulumi.Output; /** * Create a Session resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: SessionArgs, opts?: pulumi.CustomResourceOptions); } /** * The set of arguments for constructing a Session resource. */ export interface SessionArgs { /** * The database role which created this session. */ creatorRole?: pulumi.Input; databaseId: pulumi.Input; instanceId: pulumi.Input; /** * The labels for the session. * Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. * Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. * No more than 64 labels can be associated with a given session. See https://goo.gl/xmQnxf for more information on and examples of labels. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; project?: pulumi.Input; }