We recommend using Azure Native.
Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi
azure.cosmosdb.getRestorableDatabaseAccounts
Explore with Pulumi AI
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/v6/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:
getRestorableDatabaseAccounts Result
The following output properties are available:
- Accounts
List<Get
Restorable Database Accounts Account> - 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
[]Get
Restorable Database Accounts Account - 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<Get
Restorable Database Accounts Account> - 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
Get
Restorable Database Accounts Account[] - 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[Get
Restorable Database Accounts Account] - 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
- Api
Type string - The API type of the Cosmos DB Restorable Database Account.
- Creation
Time string - The creation time of the regional Cosmos DB Restorable Database Account.
- Deletion
Time string - The deletion time of the regional Cosmos DB Restorable Database Account.
- Id string
- The ID of the Cosmos DB Restorable Database Account.
- Restorable
Locations List<GetRestorable Database Accounts Account Restorable Location> - One or more
restorable_locations
blocks as defined below.
- Api
Type string - The API type of the Cosmos DB Restorable Database Account.
- Creation
Time string - The creation time of the regional Cosmos DB Restorable Database Account.
- Deletion
Time string - The deletion time of the regional Cosmos DB Restorable Database Account.
- Id string
- The ID of the Cosmos DB Restorable Database Account.
- Restorable
Locations []GetRestorable Database Accounts Account Restorable Location - One or more
restorable_locations
blocks as defined below.
- api
Type String - The API type of the Cosmos DB Restorable Database Account.
- creation
Time String - The creation time of the regional Cosmos DB Restorable Database Account.
- deletion
Time String - The deletion time of the regional Cosmos DB Restorable Database Account.
- id String
- The ID of the Cosmos DB Restorable Database Account.
- restorable
Locations List<GetRestorable Database Accounts Account Restorable Location> - One or more
restorable_locations
blocks as defined below.
- api
Type string - The API type of the Cosmos DB Restorable Database Account.
- creation
Time string - The creation time of the regional Cosmos DB Restorable Database Account.
- deletion
Time string - The deletion time of the regional Cosmos DB Restorable Database Account.
- id string
- The ID of the Cosmos DB Restorable Database Account.
- restorable
Locations GetRestorable Database Accounts Account Restorable Location[] - 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[GetRestorable Database Accounts Account Restorable Location] - One or more
restorable_locations
blocks as defined below.
- api
Type String - The API type of the Cosmos DB Restorable Database Account.
- creation
Time String - The creation time of the regional Cosmos DB Restorable Database Account.
- deletion
Time String - The deletion time of the regional Cosmos DB Restorable Database Account.
- id String
- The ID of the Cosmos DB Restorable Database Account.
- restorable
Locations List<Property Map> - One or more
restorable_locations
blocks as defined below.
GetRestorableDatabaseAccountsAccountRestorableLocation
- Creation
Time string - The creation time of the regional Cosmos DB Restorable Database Account.
- Deletion
Time string - The deletion time of the regional Cosmos DB Restorable Database Account.
- Location string
- The location where the Cosmos DB Database Account.
- Regional
Database stringAccount Instance Id - The instance ID of the regional Cosmos DB Restorable Database Account.
- Creation
Time string - The creation time of the regional Cosmos DB Restorable Database Account.
- Deletion
Time string - The deletion time of the regional Cosmos DB Restorable Database Account.
- Location string
- The location where the Cosmos DB Database Account.
- Regional
Database stringAccount Instance Id - The instance ID of the regional Cosmos DB Restorable Database Account.
- creation
Time String - The creation time of the regional Cosmos DB Restorable Database Account.
- deletion
Time String - The deletion time of the regional Cosmos DB Restorable Database Account.
- location String
- The location where the Cosmos DB Database Account.
- regional
Database StringAccount Instance Id - The instance ID of the regional Cosmos DB Restorable Database Account.
- creation
Time string - The creation time of the regional Cosmos DB Restorable Database Account.
- deletion
Time string - The deletion time of the regional Cosmos DB Restorable Database Account.
- location string
- The location where the Cosmos DB Database Account.
- regional
Database stringAccount Instance Id - 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_ straccount_ instance_ id - The instance ID of the regional Cosmos DB Restorable Database Account.
- creation
Time String - The creation time of the regional Cosmos DB Restorable Database Account.
- deletion
Time String - The deletion time of the regional Cosmos DB Restorable Database Account.
- location String
- The location where the Cosmos DB Database Account.
- regional
Database StringAccount Instance Id - 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.