1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. sql
  5. getDatabaseInstanceLatestRecoveryTime
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

gcp.sql.getDatabaseInstanceLatestRecoveryTime

Explore with Pulumi AI

gcp logo
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

    Get Latest Recovery Time for a given instance. For more information see the official documentation and API.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const default = gcp.sql.getDatabaseInstanceLatestRecoveryTime({
        instance: "sample-instance",
    });
    export const latestRecoveryTime = _default;
    
    import pulumi
    import pulumi_gcp as gcp
    
    default = gcp.sql.get_database_instance_latest_recovery_time(instance="sample-instance")
    pulumi.export("latestRecoveryTime", default)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/sql"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_default, err := sql.GetDatabaseInstanceLatestRecoveryTime(ctx, &sql.GetDatabaseInstanceLatestRecoveryTimeArgs{
    			Instance: "sample-instance",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("latestRecoveryTime", _default)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = Gcp.Sql.GetDatabaseInstanceLatestRecoveryTime.Invoke(new()
        {
            Instance = "sample-instance",
        });
    
        return new Dictionary<string, object?>
        {
            ["latestRecoveryTime"] = @default,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.sql.SqlFunctions;
    import com.pulumi.gcp.sql.inputs.GetDatabaseInstanceLatestRecoveryTimeArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var default = SqlFunctions.getDatabaseInstanceLatestRecoveryTime(GetDatabaseInstanceLatestRecoveryTimeArgs.builder()
                .instance("sample-instance")
                .build());
    
            ctx.export("latestRecoveryTime", default_);
        }
    }
    
    variables:
      default:
        fn::invoke:
          Function: gcp:sql:getDatabaseInstanceLatestRecoveryTime
          Arguments:
            instance: sample-instance
    outputs:
      latestRecoveryTime: ${default}
    

    Using getDatabaseInstanceLatestRecoveryTime

    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 getDatabaseInstanceLatestRecoveryTime(args: GetDatabaseInstanceLatestRecoveryTimeArgs, opts?: InvokeOptions): Promise<GetDatabaseInstanceLatestRecoveryTimeResult>
    function getDatabaseInstanceLatestRecoveryTimeOutput(args: GetDatabaseInstanceLatestRecoveryTimeOutputArgs, opts?: InvokeOptions): Output<GetDatabaseInstanceLatestRecoveryTimeResult>
    def get_database_instance_latest_recovery_time(instance: Optional[str] = None,
                                                   project: Optional[str] = None,
                                                   opts: Optional[InvokeOptions] = None) -> GetDatabaseInstanceLatestRecoveryTimeResult
    def get_database_instance_latest_recovery_time_output(instance: Optional[pulumi.Input[str]] = None,
                                                   project: Optional[pulumi.Input[str]] = None,
                                                   opts: Optional[InvokeOptions] = None) -> Output[GetDatabaseInstanceLatestRecoveryTimeResult]
    func GetDatabaseInstanceLatestRecoveryTime(ctx *Context, args *GetDatabaseInstanceLatestRecoveryTimeArgs, opts ...InvokeOption) (*GetDatabaseInstanceLatestRecoveryTimeResult, error)
    func GetDatabaseInstanceLatestRecoveryTimeOutput(ctx *Context, args *GetDatabaseInstanceLatestRecoveryTimeOutputArgs, opts ...InvokeOption) GetDatabaseInstanceLatestRecoveryTimeResultOutput

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

    public static class GetDatabaseInstanceLatestRecoveryTime 
    {
        public static Task<GetDatabaseInstanceLatestRecoveryTimeResult> InvokeAsync(GetDatabaseInstanceLatestRecoveryTimeArgs args, InvokeOptions? opts = null)
        public static Output<GetDatabaseInstanceLatestRecoveryTimeResult> Invoke(GetDatabaseInstanceLatestRecoveryTimeInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDatabaseInstanceLatestRecoveryTimeResult> getDatabaseInstanceLatestRecoveryTime(GetDatabaseInstanceLatestRecoveryTimeArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gcp:sql/getDatabaseInstanceLatestRecoveryTime:getDatabaseInstanceLatestRecoveryTime
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Instance string
    The name of the instance.
    Project string
    The ID of the project in which the resource belongs.
    Instance string
    The name of the instance.
    Project string
    The ID of the project in which the resource belongs.
    instance String
    The name of the instance.
    project String
    The ID of the project in which the resource belongs.
    instance string
    The name of the instance.
    project string
    The ID of the project in which the resource belongs.
    instance str
    The name of the instance.
    project str
    The ID of the project in which the resource belongs.
    instance String
    The name of the instance.
    project String
    The ID of the project in which the resource belongs.

    getDatabaseInstanceLatestRecoveryTime Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Instance string
    The name of the instance.
    LatestRecoveryTime string
    Timestamp, identifies the latest recovery time of the source instance.
    Project string
    The ID of the project in which the resource belongs.
    Id string
    The provider-assigned unique ID for this managed resource.
    Instance string
    The name of the instance.
    LatestRecoveryTime string
    Timestamp, identifies the latest recovery time of the source instance.
    Project string
    The ID of the project in which the resource belongs.
    id String
    The provider-assigned unique ID for this managed resource.
    instance String
    The name of the instance.
    latestRecoveryTime String
    Timestamp, identifies the latest recovery time of the source instance.
    project String
    The ID of the project in which the resource belongs.
    id string
    The provider-assigned unique ID for this managed resource.
    instance string
    The name of the instance.
    latestRecoveryTime string
    Timestamp, identifies the latest recovery time of the source instance.
    project string
    The ID of the project in which the resource belongs.
    id str
    The provider-assigned unique ID for this managed resource.
    instance str
    The name of the instance.
    latest_recovery_time str
    Timestamp, identifies the latest recovery time of the source instance.
    project str
    The ID of the project in which the resource belongs.
    id String
    The provider-assigned unique ID for this managed resource.
    instance String
    The name of the instance.
    latestRecoveryTime String
    Timestamp, identifies the latest recovery time of the source instance.
    project String
    The ID of the project in which the resource belongs.

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi