1. Packages
  2. Azure Classic
  3. API Docs
  4. cosmosdb
  5. getRestorableDatabaseAccounts

We recommend using Azure Native.

Azure Classic v5.72.0 published on Monday, Apr 15, 2024 by Pulumi

azure.cosmosdb.getRestorableDatabaseAccounts

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.72.0 published on Monday, Apr 15, 2024 by Pulumi

    Use this data source to access information about Cosmos DB Restorable Database Accounts.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.cosmosdb.getRestorableDatabaseAccounts({
        name: "example-ca",
        location: "West Europe",
    });
    export const id = example.then(example => example.id);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.cosmosdb.get_restorable_database_accounts(name="example-ca",
        location="West Europe")
    pulumi.export("id", example.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/cosmosdb"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := cosmosdb.GetRestorableDatabaseAccounts(ctx, &cosmosdb.GetRestorableDatabaseAccountsArgs{
    			Name:     "example-ca",
    			Location: "West Europe",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("id", example.Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.CosmosDB.GetRestorableDatabaseAccounts.Invoke(new()
        {
            Name = "example-ca",
            Location = "West Europe",
        });
    
        return new Dictionary<string, object?>
        {
            ["id"] = example.Apply(getRestorableDatabaseAccountsResult => getRestorableDatabaseAccountsResult.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.cosmosdb.CosmosdbFunctions;
    import com.pulumi.azure.cosmosdb.inputs.GetRestorableDatabaseAccountsArgs;
    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 example = CosmosdbFunctions.getRestorableDatabaseAccounts(GetRestorableDatabaseAccountsArgs.builder()
                .name("example-ca")
                .location("West Europe")
                .build());
    
            ctx.export("id", example.applyValue(getRestorableDatabaseAccountsResult -> getRestorableDatabaseAccountsResult.id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:cosmosdb:getRestorableDatabaseAccounts
          Arguments:
            name: example-ca
            location: West Europe
    outputs:
      id: ${example.id}
    

    Using getRestorableDatabaseAccounts

    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 getRestorableDatabaseAccounts(args: GetRestorableDatabaseAccountsArgs, opts?: InvokeOptions): Promise<GetRestorableDatabaseAccountsResult>
    function getRestorableDatabaseAccountsOutput(args: GetRestorableDatabaseAccountsOutputArgs, opts?: InvokeOptions): Output<GetRestorableDatabaseAccountsResult>
    def get_restorable_database_accounts(location: Optional[str] = None,
                                         name: Optional[str] = None,
                                         opts: Optional[InvokeOptions] = None) -> GetRestorableDatabaseAccountsResult
    def get_restorable_database_accounts_output(location: Optional[pulumi.Input[str]] = None,
                                         name: Optional[pulumi.Input[str]] = None,
                                         opts: Optional[InvokeOptions] = None) -> Output[GetRestorableDatabaseAccountsResult]
    func GetRestorableDatabaseAccounts(ctx *Context, args *GetRestorableDatabaseAccountsArgs, opts ...InvokeOption) (*GetRestorableDatabaseAccountsResult, error)
    func GetRestorableDatabaseAccountsOutput(ctx *Context, args *GetRestorableDatabaseAccountsOutputArgs, opts ...InvokeOption) GetRestorableDatabaseAccountsResultOutput

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

    public static class GetRestorableDatabaseAccounts 
    {
        public static Task<GetRestorableDatabaseAccountsResult> InvokeAsync(GetRestorableDatabaseAccountsArgs args, InvokeOptions? opts = null)
        public static Output<GetRestorableDatabaseAccountsResult> Invoke(GetRestorableDatabaseAccountsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRestorableDatabaseAccountsResult> getRestorableDatabaseAccounts(GetRestorableDatabaseAccountsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:cosmosdb/getRestorableDatabaseAccounts:getRestorableDatabaseAccounts
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Location string
    The location where the Cosmos DB Database Account.
    Name string
    The name of this Cosmos DB Database Account.
    Location string
    The location where the Cosmos DB Database Account.
    Name string
    The name of this Cosmos DB Database Account.
    location String
    The location where the Cosmos DB Database Account.
    name String
    The name of this Cosmos DB Database Account.
    location string
    The location where the Cosmos DB Database Account.
    name string
    The name of this Cosmos DB Database Account.
    location str
    The location where the Cosmos DB Database Account.
    name str
    The name of this Cosmos DB Database Account.
    location String
    The location where the Cosmos DB Database Account.
    name String
    The name of this Cosmos DB Database Account.

    getRestorableDatabaseAccounts Result

    The following output properties are available:

    Accounts List<GetRestorableDatabaseAccountsAccount>
    One or more accounts blocks as defined below.
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    The location of the regional Cosmos DB Restorable Database Account.
    Name string
    Accounts []GetRestorableDatabaseAccountsAccount
    One or more accounts blocks as defined below.
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    The location of the regional Cosmos DB Restorable Database Account.
    Name string
    accounts List<GetRestorableDatabaseAccountsAccount>
    One or more accounts blocks as defined below.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    The location of the regional Cosmos DB Restorable Database Account.
    name String
    accounts GetRestorableDatabaseAccountsAccount[]
    One or more accounts blocks as defined below.
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    The location of the regional Cosmos DB Restorable Database Account.
    name string
    accounts Sequence[GetRestorableDatabaseAccountsAccount]
    One or more accounts blocks as defined below.
    id str
    The provider-assigned unique ID for this managed resource.
    location str
    The location of the regional Cosmos DB Restorable Database Account.
    name str
    accounts List<Property Map>
    One or more accounts blocks as defined below.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    The location of the regional Cosmos DB Restorable Database Account.
    name String

    Supporting Types

    GetRestorableDatabaseAccountsAccount

    ApiType string
    The API type of the Cosmos DB Restorable Database Account.
    CreationTime string
    The creation time of the regional Cosmos DB Restorable Database Account.
    DeletionTime string
    The deletion time of the regional Cosmos DB Restorable Database Account.
    Id string
    The ID of the Cosmos DB Restorable Database Account.
    RestorableLocations List<GetRestorableDatabaseAccountsAccountRestorableLocation>
    One or more restorable_locations blocks as defined below.
    ApiType string
    The API type of the Cosmos DB Restorable Database Account.
    CreationTime string
    The creation time of the regional Cosmos DB Restorable Database Account.
    DeletionTime string
    The deletion time of the regional Cosmos DB Restorable Database Account.
    Id string
    The ID of the Cosmos DB Restorable Database Account.
    RestorableLocations []GetRestorableDatabaseAccountsAccountRestorableLocation
    One or more restorable_locations blocks as defined below.
    apiType String
    The API type of the Cosmos DB Restorable Database Account.
    creationTime String
    The creation time of the regional Cosmos DB Restorable Database Account.
    deletionTime String
    The deletion time of the regional Cosmos DB Restorable Database Account.
    id String
    The ID of the Cosmos DB Restorable Database Account.
    restorableLocations List<GetRestorableDatabaseAccountsAccountRestorableLocation>
    One or more restorable_locations blocks as defined below.
    apiType string
    The API type of the Cosmos DB Restorable Database Account.
    creationTime string
    The creation time of the regional Cosmos DB Restorable Database Account.
    deletionTime string
    The deletion time of the regional Cosmos DB Restorable Database Account.
    id string
    The ID of the Cosmos DB Restorable Database Account.
    restorableLocations GetRestorableDatabaseAccountsAccountRestorableLocation[]
    One or more restorable_locations blocks as defined below.
    api_type str
    The API type of the Cosmos DB Restorable Database Account.
    creation_time str
    The creation time of the regional Cosmos DB Restorable Database Account.
    deletion_time str
    The deletion time of the regional Cosmos DB Restorable Database Account.
    id str
    The ID of the Cosmos DB Restorable Database Account.
    restorable_locations Sequence[GetRestorableDatabaseAccountsAccountRestorableLocation]
    One or more restorable_locations blocks as defined below.
    apiType String
    The API type of the Cosmos DB Restorable Database Account.
    creationTime String
    The creation time of the regional Cosmos DB Restorable Database Account.
    deletionTime String
    The deletion time of the regional Cosmos DB Restorable Database Account.
    id String
    The ID of the Cosmos DB Restorable Database Account.
    restorableLocations List<Property Map>
    One or more restorable_locations blocks as defined below.

    GetRestorableDatabaseAccountsAccountRestorableLocation

    CreationTime string
    The creation time of the regional Cosmos DB Restorable Database Account.
    DeletionTime string
    The deletion time of the regional Cosmos DB Restorable Database Account.
    Location string
    The location where the Cosmos DB Database Account.
    RegionalDatabaseAccountInstanceId string
    The instance ID of the regional Cosmos DB Restorable Database Account.
    CreationTime string
    The creation time of the regional Cosmos DB Restorable Database Account.
    DeletionTime string
    The deletion time of the regional Cosmos DB Restorable Database Account.
    Location string
    The location where the Cosmos DB Database Account.
    RegionalDatabaseAccountInstanceId string
    The instance ID of the regional Cosmos DB Restorable Database Account.
    creationTime String
    The creation time of the regional Cosmos DB Restorable Database Account.
    deletionTime String
    The deletion time of the regional Cosmos DB Restorable Database Account.
    location String
    The location where the Cosmos DB Database Account.
    regionalDatabaseAccountInstanceId String
    The instance ID of the regional Cosmos DB Restorable Database Account.
    creationTime string
    The creation time of the regional Cosmos DB Restorable Database Account.
    deletionTime string
    The deletion time of the regional Cosmos DB Restorable Database Account.
    location string
    The location where the Cosmos DB Database Account.
    regionalDatabaseAccountInstanceId string
    The instance ID of the regional Cosmos DB Restorable Database Account.
    creation_time str
    The creation time of the regional Cosmos DB Restorable Database Account.
    deletion_time str
    The deletion time of the regional Cosmos DB Restorable Database Account.
    location str
    The location where the Cosmos DB Database Account.
    regional_database_account_instance_id str
    The instance ID of the regional Cosmos DB Restorable Database Account.
    creationTime String
    The creation time of the regional Cosmos DB Restorable Database Account.
    deletionTime String
    The deletion time of the regional Cosmos DB Restorable Database Account.
    location String
    The location where the Cosmos DB Database Account.
    regionalDatabaseAccountInstanceId String
    The instance ID of the regional Cosmos DB Restorable Database Account.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.72.0 published on Monday, Apr 15, 2024 by Pulumi