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-native logo

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>
    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:

    DatabaseId string
    InstanceId string
    SessionId string
    Project string
    DatabaseId string
    InstanceId string
    SessionId string
    Project string
    databaseId String
    instanceId String
    sessionId String
    project String
    databaseId string
    instanceId string
    sessionId string
    project string
    databaseId String
    instanceId String
    sessionId 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-native logo

    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