1. Packages
  2. Google Cloud Native
  3. API Docs
  4. spanner
  5. spanner/v1
  6. getSession

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

google-native.spanner/v1.getSession

Explore with Pulumi AI

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

Gets a session. Returns NOT_FOUND if the session does not exist. This is mainly useful for determining whether a session is still alive.

Using getSession

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getSession(args: GetSessionArgs, opts?: InvokeOptions): Promise<GetSessionResult>
function getSessionOutput(args: GetSessionOutputArgs, opts?: InvokeOptions): Output<GetSessionResult>
Copy
def get_session(database_id: Optional[str] = None,
                instance_id: Optional[str] = None,
                project: Optional[str] = None,
                session_id: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetSessionResult
def get_session_output(database_id: Optional[pulumi.Input[str]] = None,
                instance_id: Optional[pulumi.Input[str]] = None,
                project: Optional[pulumi.Input[str]] = None,
                session_id: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetSessionResult]
Copy
func LookupSession(ctx *Context, args *LookupSessionArgs, opts ...InvokeOption) (*LookupSessionResult, error)
func LookupSessionOutput(ctx *Context, args *LookupSessionOutputArgs, opts ...InvokeOption) LookupSessionResultOutput
Copy

> Note: This function is named LookupSession in the Go SDK.

public static class GetSession 
{
    public static Task<GetSessionResult> InvokeAsync(GetSessionArgs args, InvokeOptions? opts = null)
    public static Output<GetSessionResult> Invoke(GetSessionInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetSessionResult> getSession(GetSessionArgs args, InvokeOptions options)
public static Output<GetSessionResult> getSession(GetSessionArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: google-native:spanner/v1:getSession
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

DatabaseId This property is required. string
InstanceId This property is required. string
SessionId This property is required. string
Project string
DatabaseId This property is required. string
InstanceId This property is required. string
SessionId This property is required. string
Project string
databaseId This property is required. String
instanceId This property is required. String
sessionId This property is required. String
project String
databaseId This property is required. string
instanceId This property is required. string
sessionId This property is required. string
project string
database_id This property is required. str
instance_id This property is required. str
session_id This property is required. str
project str
databaseId This property is required. String
instanceId This property is required. String
sessionId This property is required. String
project String

getSession Result

The following output properties are available:

ApproximateLastUseTime string
The approximate timestamp when the session is last used. It is typically earlier than the actual last use time.
CreateTime string
The timestamp when the session is created.
CreatorRole string
The database role which created this session.
Labels Dictionary<string, string>
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.
Name string
The name of the session. This is always system-assigned.
ApproximateLastUseTime string
The approximate timestamp when the session is last used. It is typically earlier than the actual last use time.
CreateTime string
The timestamp when the session is created.
CreatorRole string
The database role which created this session.
Labels map[string]string
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.
Name string
The name of the session. This is always system-assigned.
approximateLastUseTime String
The approximate timestamp when the session is last used. It is typically earlier than the actual last use time.
createTime String
The timestamp when the session is created.
creatorRole String
The database role which created this session.
labels Map<String,String>
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.
name String
The name of the session. This is always system-assigned.
approximateLastUseTime string
The approximate timestamp when the session is last used. It is typically earlier than the actual last use time.
createTime string
The timestamp when the session is created.
creatorRole string
The database role which created this session.
labels {[key: string]: string}
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.
name string
The name of the session. This is always system-assigned.
approximate_last_use_time str
The approximate timestamp when the session is last used. It is typically earlier than the actual last use time.
create_time str
The timestamp when the session is created.
creator_role str
The database role which created this session.
labels Mapping[str, str]
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.
name str
The name of the session. This is always system-assigned.
approximateLastUseTime String
The approximate timestamp when the session is last used. It is typically earlier than the actual last use time.
createTime String
The timestamp when the session is created.
creatorRole String
The database role which created this session.
labels Map<String>
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.
name String
The name of the session. This is always system-assigned.

Package Details

Repository
Google Cloud Native pulumi/pulumi-google-native
License
Apache-2.0

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi