Google Cloud Native is in preview. Google Cloud Classic is fully supported.
google-native.spanner/v1.getSession
Explore with Pulumi AI
Google Cloud Native is in preview. Google Cloud Classic is fully supported.
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>
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]
func LookupSession(ctx *Context, args *LookupSessionArgs, opts ...InvokeOption) (*LookupSessionResult, error)
func LookupSessionOutput(ctx *Context, args *LookupSessionOutputArgs, opts ...InvokeOption) LookupSessionResultOutput
> 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)
}
public static CompletableFuture<GetSessionResult> getSession(GetSessionArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: google-native:spanner/v1:getSession
arguments:
# arguments dictionary
The following arguments are supported:
- Database
Id string - Instance
Id string - Session
Id string - Project string
- Database
Id string - Instance
Id string - Session
Id string - Project string
- database
Id String - instance
Id String - session
Id String - project String
- database
Id string - instance
Id string - session
Id string - project string
- database_
id str - instance_
id str - session_
id str - project str
- database
Id String - instance
Id String - session
Id String - project String
getSession Result
The following output properties are available:
- Approximate
Last stringUse Time - The approximate timestamp when the session is last used. It is typically earlier than the actual last use time.
- Create
Time string - The timestamp when the session is created.
- Creator
Role 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.
- Approximate
Last stringUse Time - The approximate timestamp when the session is last used. It is typically earlier than the actual last use time.
- Create
Time string - The timestamp when the session is created.
- Creator
Role 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.
- approximate
Last StringUse Time - The approximate timestamp when the session is last used. It is typically earlier than the actual last use time.
- create
Time String - The timestamp when the session is created.
- creator
Role 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.
- approximate
Last stringUse Time - The approximate timestamp when the session is last used. It is typically earlier than the actual last use time.
- create
Time string - The timestamp when the session is created.
- creator
Role 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_ struse_ time - 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.
- approximate
Last StringUse Time - The approximate timestamp when the session is last used. It is typically earlier than the actual last use time.
- create
Time String - The timestamp when the session is created.
- creator
Role 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.