Azure Classic

Pulumi Official
Package maintained by Pulumi
v5.10.0 published on Friday, Jun 10, 2022 by Pulumi

getRestorableDatabaseAccounts

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

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Azure.CosmosDB.GetRestorableDatabaseAccounts.InvokeAsync(new Azure.CosmosDB.GetRestorableDatabaseAccountsArgs
        {
            Name = "example-ca",
            Location = "West Europe",
        }));
        this.Id = example.Apply(example => example.Id);
    }

    [Output("id")]
    public Output<string> Id { get; set; }
}
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
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = Output.of(CosmosdbFunctions.getRestorableDatabaseAccounts(GetRestorableDatabaseAccountsArgs.builder()
            .name("example-ca")
            .location("West Europe")
            .build()));

        ctx.export("id", example.apply(getRestorableDatabaseAccountsResult -> getRestorableDatabaseAccountsResult.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)
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);
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
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.