Cloudflare v6.3.0 published on Tuesday, Jun 10, 2025 by Pulumi
cloudflare.getD1Database
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleD1Database = cloudflare.getD1Database({
accountId: "023e105f4ecef8ad9ca31a8372d0c353",
databaseId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_d1_database = cloudflare.get_d1_database(account_id="023e105f4ecef8ad9ca31a8372d0c353",
database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudflare.LookupD1Database(ctx, &cloudflare.LookupD1DatabaseArgs{
AccountId: "023e105f4ecef8ad9ca31a8372d0c353",
DatabaseId: pulumi.StringRef("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var exampleD1Database = Cloudflare.GetD1Database.Invoke(new()
{
AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
DatabaseId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.CloudflareFunctions;
import com.pulumi.cloudflare.inputs.GetD1DatabaseArgs;
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 exampleD1Database = CloudflareFunctions.getD1Database(GetD1DatabaseArgs.builder()
.accountId("023e105f4ecef8ad9ca31a8372d0c353")
.databaseId("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
.build());
}
}
variables:
exampleD1Database:
fn::invoke:
function: cloudflare:getD1Database
arguments:
accountId: 023e105f4ecef8ad9ca31a8372d0c353
databaseId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Using getD1Database
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 getD1Database(args: GetD1DatabaseArgs, opts?: InvokeOptions): Promise<GetD1DatabaseResult>
function getD1DatabaseOutput(args: GetD1DatabaseOutputArgs, opts?: InvokeOptions): Output<GetD1DatabaseResult>
def get_d1_database(account_id: Optional[str] = None,
database_id: Optional[str] = None,
filter: Optional[GetD1DatabaseFilter] = None,
opts: Optional[InvokeOptions] = None) -> GetD1DatabaseResult
def get_d1_database_output(account_id: Optional[pulumi.Input[str]] = None,
database_id: Optional[pulumi.Input[str]] = None,
filter: Optional[pulumi.Input[GetD1DatabaseFilterArgs]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetD1DatabaseResult]
func LookupD1Database(ctx *Context, args *LookupD1DatabaseArgs, opts ...InvokeOption) (*LookupD1DatabaseResult, error)
func LookupD1DatabaseOutput(ctx *Context, args *LookupD1DatabaseOutputArgs, opts ...InvokeOption) LookupD1DatabaseResultOutput
> Note: This function is named LookupD1Database
in the Go SDK.
public static class GetD1Database
{
public static Task<GetD1DatabaseResult> InvokeAsync(GetD1DatabaseArgs args, InvokeOptions? opts = null)
public static Output<GetD1DatabaseResult> Invoke(GetD1DatabaseInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetD1DatabaseResult> getD1Database(GetD1DatabaseArgs args, InvokeOptions options)
public static Output<GetD1DatabaseResult> getD1Database(GetD1DatabaseArgs args, InvokeOptions options)
fn::invoke:
function: cloudflare:index/getD1Database:getD1Database
arguments:
# arguments dictionary
The following arguments are supported:
- Account
Id string - Account identifier tag.
- Database
Id string - D1 database identifier (UUID).
- Filter
Get
D1Database Filter
- Account
Id string - Account identifier tag.
- Database
Id string - D1 database identifier (UUID).
- Filter
Get
D1Database Filter
- account
Id String - Account identifier tag.
- database
Id String - D1 database identifier (UUID).
- filter
Get
D1Database Filter
- account
Id string - Account identifier tag.
- database
Id string - D1 database identifier (UUID).
- filter
Get
D1Database Filter
- account_
id str - Account identifier tag.
- database_
id str - D1 database identifier (UUID).
- filter
Get
D1Database Filter
- account
Id String - Account identifier tag.
- database
Id String - D1 database identifier (UUID).
- filter Property Map
getD1Database Result
The following output properties are available:
- Account
Id string - Account identifier tag.
- Created
At string - Specifies the timestamp the resource was created as an ISO8601 string.
- File
Size double - The D1 database's size, in bytes.
- Id string
- D1 database identifier (UUID).
- Name string
- D1 database name.
- Num
Tables double - Read
Replication GetD1Database Read Replication - Configuration for D1 read replication.
- Uuid string
- D1 database identifier (UUID).
- Version string
- Database
Id string - D1 database identifier (UUID).
- Filter
Get
D1Database Filter
- Account
Id string - Account identifier tag.
- Created
At string - Specifies the timestamp the resource was created as an ISO8601 string.
- File
Size float64 - The D1 database's size, in bytes.
- Id string
- D1 database identifier (UUID).
- Name string
- D1 database name.
- Num
Tables float64 - Read
Replication GetD1Database Read Replication - Configuration for D1 read replication.
- Uuid string
- D1 database identifier (UUID).
- Version string
- Database
Id string - D1 database identifier (UUID).
- Filter
Get
D1Database Filter
- account
Id String - Account identifier tag.
- created
At String - Specifies the timestamp the resource was created as an ISO8601 string.
- file
Size Double - The D1 database's size, in bytes.
- id String
- D1 database identifier (UUID).
- name String
- D1 database name.
- num
Tables Double - read
Replication GetD1Database Read Replication - Configuration for D1 read replication.
- uuid String
- D1 database identifier (UUID).
- version String
- database
Id String - D1 database identifier (UUID).
- filter
Get
D1Database Filter
- account
Id string - Account identifier tag.
- created
At string - Specifies the timestamp the resource was created as an ISO8601 string.
- file
Size number - The D1 database's size, in bytes.
- id string
- D1 database identifier (UUID).
- name string
- D1 database name.
- num
Tables number - read
Replication GetD1Database Read Replication - Configuration for D1 read replication.
- uuid string
- D1 database identifier (UUID).
- version string
- database
Id string - D1 database identifier (UUID).
- filter
Get
D1Database Filter
- account_
id str - Account identifier tag.
- created_
at str - Specifies the timestamp the resource was created as an ISO8601 string.
- file_
size float - The D1 database's size, in bytes.
- id str
- D1 database identifier (UUID).
- name str
- D1 database name.
- num_
tables float - read_
replication GetD1Database Read Replication - Configuration for D1 read replication.
- uuid str
- D1 database identifier (UUID).
- version str
- database_
id str - D1 database identifier (UUID).
- filter
Get
D1Database Filter
- account
Id String - Account identifier tag.
- created
At String - Specifies the timestamp the resource was created as an ISO8601 string.
- file
Size Number - The D1 database's size, in bytes.
- id String
- D1 database identifier (UUID).
- name String
- D1 database name.
- num
Tables Number - read
Replication Property Map - Configuration for D1 read replication.
- uuid String
- D1 database identifier (UUID).
- version String
- database
Id String - D1 database identifier (UUID).
- filter Property Map
Supporting Types
GetD1DatabaseFilter
- Name string
- a database name to search for.
- Name string
- a database name to search for.
- name String
- a database name to search for.
- name string
- a database name to search for.
- name str
- a database name to search for.
- name String
- a database name to search for.
GetD1DatabaseReadReplication
- Mode string
- The read replication mode for the database. Use 'auto' to create replicas and allow D1 automatically place them around the world, or 'disabled' to not use any database replicas (it can take a few hours for all replicas to be deleted). Available values: "auto", "disabled".
- Mode string
- The read replication mode for the database. Use 'auto' to create replicas and allow D1 automatically place them around the world, or 'disabled' to not use any database replicas (it can take a few hours for all replicas to be deleted). Available values: "auto", "disabled".
- mode String
- The read replication mode for the database. Use 'auto' to create replicas and allow D1 automatically place them around the world, or 'disabled' to not use any database replicas (it can take a few hours for all replicas to be deleted). Available values: "auto", "disabled".
- mode string
- The read replication mode for the database. Use 'auto' to create replicas and allow D1 automatically place them around the world, or 'disabled' to not use any database replicas (it can take a few hours for all replicas to be deleted). Available values: "auto", "disabled".
- mode str
- The read replication mode for the database. Use 'auto' to create replicas and allow D1 automatically place them around the world, or 'disabled' to not use any database replicas (it can take a few hours for all replicas to be deleted). Available values: "auto", "disabled".
- mode String
- The read replication mode for the database. Use 'auto' to create replicas and allow D1 automatically place them around the world, or 'disabled' to not use any database replicas (it can take a few hours for all replicas to be deleted). Available values: "auto", "disabled".
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.