1. Packages
  2. Packages
  3. Cloudflare Provider
  4. API Docs
  5. R2DataCatalog
Viewing docs for Cloudflare v6.15.0
published on Saturday, May 2, 2026 by Pulumi
cloudflare logo
Viewing docs for Cloudflare v6.15.0
published on Saturday, May 2, 2026 by Pulumi

    Accepted Permissions

    • Workers R2 Data Catalog Read
    • Workers R2 Data Catalog Write

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleR2DataCatalog = new cloudflare.R2DataCatalog("example_r2_data_catalog", {
        accountId: "0123456789abcdef0123456789abcdef",
        bucketName: "my-data-bucket",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_r2_data_catalog = cloudflare.R2DataCatalog("example_r2_data_catalog",
        account_id="0123456789abcdef0123456789abcdef",
        bucket_name="my-data-bucket")
    
    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.NewR2DataCatalog(ctx, "example_r2_data_catalog", &cloudflare.R2DataCatalogArgs{
    			AccountId:  pulumi.String("0123456789abcdef0123456789abcdef"),
    			BucketName: pulumi.String("my-data-bucket"),
    		})
    		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 exampleR2DataCatalog = new Cloudflare.Index.R2DataCatalog("example_r2_data_catalog", new()
        {
            AccountId = "0123456789abcdef0123456789abcdef",
            BucketName = "my-data-bucket",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.R2DataCatalog;
    import com.pulumi.cloudflare.R2DataCatalogArgs;
    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) {
            var exampleR2DataCatalog = new R2DataCatalog("exampleR2DataCatalog", R2DataCatalogArgs.builder()
                .accountId("0123456789abcdef0123456789abcdef")
                .bucketName("my-data-bucket")
                .build());
    
        }
    }
    
    resources:
      exampleR2DataCatalog:
        type: cloudflare:R2DataCatalog
        name: example_r2_data_catalog
        properties:
          accountId: 0123456789abcdef0123456789abcdef
          bucketName: my-data-bucket
    

    Create R2DataCatalog Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new R2DataCatalog(name: string, args: R2DataCatalogArgs, opts?: CustomResourceOptions);
    @overload
    def R2DataCatalog(resource_name: str,
                      args: R2DataCatalogArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def R2DataCatalog(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      bucket_name: Optional[str] = None,
                      account_id: Optional[str] = None)
    func NewR2DataCatalog(ctx *Context, name string, args R2DataCatalogArgs, opts ...ResourceOption) (*R2DataCatalog, error)
    public R2DataCatalog(string name, R2DataCatalogArgs args, CustomResourceOptions? opts = null)
    public R2DataCatalog(String name, R2DataCatalogArgs args)
    public R2DataCatalog(String name, R2DataCatalogArgs args, CustomResourceOptions options)
    
    type: cloudflare:R2DataCatalog
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args R2DataCatalogArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args R2DataCatalogArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args R2DataCatalogArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args R2DataCatalogArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args R2DataCatalogArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var r2dataCatalogResource = new Cloudflare.R2DataCatalog("r2dataCatalogResource", new()
    {
        BucketName = "string",
        AccountId = "string",
    });
    
    example, err := cloudflare.NewR2DataCatalog(ctx, "r2dataCatalogResource", &cloudflare.R2DataCatalogArgs{
    	BucketName: pulumi.String("string"),
    	AccountId:  pulumi.String("string"),
    })
    
    var r2dataCatalogResource = new R2DataCatalog("r2dataCatalogResource", R2DataCatalogArgs.builder()
        .bucketName("string")
        .accountId("string")
        .build());
    
    r2data_catalog_resource = cloudflare.R2DataCatalog("r2dataCatalogResource",
        bucket_name="string",
        account_id="string")
    
    const r2dataCatalogResource = new cloudflare.R2DataCatalog("r2dataCatalogResource", {
        bucketName: "string",
        accountId: "string",
    });
    
    type: cloudflare:R2DataCatalog
    properties:
        accountId: string
        bucketName: string
    

    R2DataCatalog Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The R2DataCatalog resource accepts the following input properties:

    BucketName string
    Specifies the R2 bucket name.
    AccountId string
    Use this to identify the account.
    BucketName string
    Specifies the R2 bucket name.
    AccountId string
    Use this to identify the account.
    bucketName String
    Specifies the R2 bucket name.
    accountId String
    Use this to identify the account.
    bucketName string
    Specifies the R2 bucket name.
    accountId string
    Use this to identify the account.
    bucket_name str
    Specifies the R2 bucket name.
    account_id str
    Use this to identify the account.
    bucketName String
    Specifies the R2 bucket name.
    accountId String
    Use this to identify the account.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the R2DataCatalog resource produces the following output properties:

    Bucket string
    Specifies the associated R2 bucket name.
    CredentialStatus string
    Shows the credential configuration status. Available values: "present", "absent".
    Id string
    The provider-assigned unique ID for this managed resource.
    MaintenanceConfig R2DataCatalogMaintenanceConfig
    Configures maintenance for the catalog.
    Name string
    Specifies the catalog name (generated from account and bucket name).
    Status string
    Indicates the status of the catalog. Available values: "active", "inactive".
    Bucket string
    Specifies the associated R2 bucket name.
    CredentialStatus string
    Shows the credential configuration status. Available values: "present", "absent".
    Id string
    The provider-assigned unique ID for this managed resource.
    MaintenanceConfig R2DataCatalogMaintenanceConfig
    Configures maintenance for the catalog.
    Name string
    Specifies the catalog name (generated from account and bucket name).
    Status string
    Indicates the status of the catalog. Available values: "active", "inactive".
    bucket String
    Specifies the associated R2 bucket name.
    credentialStatus String
    Shows the credential configuration status. Available values: "present", "absent".
    id String
    The provider-assigned unique ID for this managed resource.
    maintenanceConfig R2DataCatalogMaintenanceConfig
    Configures maintenance for the catalog.
    name String
    Specifies the catalog name (generated from account and bucket name).
    status String
    Indicates the status of the catalog. Available values: "active", "inactive".
    bucket string
    Specifies the associated R2 bucket name.
    credentialStatus string
    Shows the credential configuration status. Available values: "present", "absent".
    id string
    The provider-assigned unique ID for this managed resource.
    maintenanceConfig R2DataCatalogMaintenanceConfig
    Configures maintenance for the catalog.
    name string
    Specifies the catalog name (generated from account and bucket name).
    status string
    Indicates the status of the catalog. Available values: "active", "inactive".
    bucket str
    Specifies the associated R2 bucket name.
    credential_status str
    Shows the credential configuration status. Available values: "present", "absent".
    id str
    The provider-assigned unique ID for this managed resource.
    maintenance_config R2DataCatalogMaintenanceConfig
    Configures maintenance for the catalog.
    name str
    Specifies the catalog name (generated from account and bucket name).
    status str
    Indicates the status of the catalog. Available values: "active", "inactive".
    bucket String
    Specifies the associated R2 bucket name.
    credentialStatus String
    Shows the credential configuration status. Available values: "present", "absent".
    id String
    The provider-assigned unique ID for this managed resource.
    maintenanceConfig Property Map
    Configures maintenance for the catalog.
    name String
    Specifies the catalog name (generated from account and bucket name).
    status String
    Indicates the status of the catalog. Available values: "active", "inactive".

    Look up Existing R2DataCatalog Resource

    Get an existing R2DataCatalog resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: R2DataCatalogState, opts?: CustomResourceOptions): R2DataCatalog
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            bucket: Optional[str] = None,
            bucket_name: Optional[str] = None,
            credential_status: Optional[str] = None,
            maintenance_config: Optional[R2DataCatalogMaintenanceConfigArgs] = None,
            name: Optional[str] = None,
            status: Optional[str] = None) -> R2DataCatalog
    func GetR2DataCatalog(ctx *Context, name string, id IDInput, state *R2DataCatalogState, opts ...ResourceOption) (*R2DataCatalog, error)
    public static R2DataCatalog Get(string name, Input<string> id, R2DataCatalogState? state, CustomResourceOptions? opts = null)
    public static R2DataCatalog get(String name, Output<String> id, R2DataCatalogState state, CustomResourceOptions options)
    resources:  _:    type: cloudflare:R2DataCatalog    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AccountId string
    Use this to identify the account.
    Bucket string
    Specifies the associated R2 bucket name.
    BucketName string
    Specifies the R2 bucket name.
    CredentialStatus string
    Shows the credential configuration status. Available values: "present", "absent".
    MaintenanceConfig R2DataCatalogMaintenanceConfig
    Configures maintenance for the catalog.
    Name string
    Specifies the catalog name (generated from account and bucket name).
    Status string
    Indicates the status of the catalog. Available values: "active", "inactive".
    AccountId string
    Use this to identify the account.
    Bucket string
    Specifies the associated R2 bucket name.
    BucketName string
    Specifies the R2 bucket name.
    CredentialStatus string
    Shows the credential configuration status. Available values: "present", "absent".
    MaintenanceConfig R2DataCatalogMaintenanceConfigArgs
    Configures maintenance for the catalog.
    Name string
    Specifies the catalog name (generated from account and bucket name).
    Status string
    Indicates the status of the catalog. Available values: "active", "inactive".
    accountId String
    Use this to identify the account.
    bucket String
    Specifies the associated R2 bucket name.
    bucketName String
    Specifies the R2 bucket name.
    credentialStatus String
    Shows the credential configuration status. Available values: "present", "absent".
    maintenanceConfig R2DataCatalogMaintenanceConfig
    Configures maintenance for the catalog.
    name String
    Specifies the catalog name (generated from account and bucket name).
    status String
    Indicates the status of the catalog. Available values: "active", "inactive".
    accountId string
    Use this to identify the account.
    bucket string
    Specifies the associated R2 bucket name.
    bucketName string
    Specifies the R2 bucket name.
    credentialStatus string
    Shows the credential configuration status. Available values: "present", "absent".
    maintenanceConfig R2DataCatalogMaintenanceConfig
    Configures maintenance for the catalog.
    name string
    Specifies the catalog name (generated from account and bucket name).
    status string
    Indicates the status of the catalog. Available values: "active", "inactive".
    account_id str
    Use this to identify the account.
    bucket str
    Specifies the associated R2 bucket name.
    bucket_name str
    Specifies the R2 bucket name.
    credential_status str
    Shows the credential configuration status. Available values: "present", "absent".
    maintenance_config R2DataCatalogMaintenanceConfigArgs
    Configures maintenance for the catalog.
    name str
    Specifies the catalog name (generated from account and bucket name).
    status str
    Indicates the status of the catalog. Available values: "active", "inactive".
    accountId String
    Use this to identify the account.
    bucket String
    Specifies the associated R2 bucket name.
    bucketName String
    Specifies the R2 bucket name.
    credentialStatus String
    Shows the credential configuration status. Available values: "present", "absent".
    maintenanceConfig Property Map
    Configures maintenance for the catalog.
    name String
    Specifies the catalog name (generated from account and bucket name).
    status String
    Indicates the status of the catalog. Available values: "active", "inactive".

    Supporting Types

    R2DataCatalogMaintenanceConfig, R2DataCatalogMaintenanceConfigArgs

    Compaction R2DataCatalogMaintenanceConfigCompaction
    Configures compaction for catalog maintenance.
    SnapshotExpiration R2DataCatalogMaintenanceConfigSnapshotExpiration
    Configures snapshot expiration settings.
    Compaction R2DataCatalogMaintenanceConfigCompaction
    Configures compaction for catalog maintenance.
    SnapshotExpiration R2DataCatalogMaintenanceConfigSnapshotExpiration
    Configures snapshot expiration settings.
    compaction R2DataCatalogMaintenanceConfigCompaction
    Configures compaction for catalog maintenance.
    snapshotExpiration R2DataCatalogMaintenanceConfigSnapshotExpiration
    Configures snapshot expiration settings.
    compaction R2DataCatalogMaintenanceConfigCompaction
    Configures compaction for catalog maintenance.
    snapshotExpiration R2DataCatalogMaintenanceConfigSnapshotExpiration
    Configures snapshot expiration settings.
    compaction R2DataCatalogMaintenanceConfigCompaction
    Configures compaction for catalog maintenance.
    snapshot_expiration R2DataCatalogMaintenanceConfigSnapshotExpiration
    Configures snapshot expiration settings.
    compaction Property Map
    Configures compaction for catalog maintenance.
    snapshotExpiration Property Map
    Configures snapshot expiration settings.

    R2DataCatalogMaintenanceConfigCompaction, R2DataCatalogMaintenanceConfigCompactionArgs

    State string
    Specifies the state of maintenance operations. Available values: "enabled", "disabled".
    TargetSizeMb string
    Sets the target file size for compaction in megabytes. Defaults to "128". Available values: "64", "128", "256", "512".
    State string
    Specifies the state of maintenance operations. Available values: "enabled", "disabled".
    TargetSizeMb string
    Sets the target file size for compaction in megabytes. Defaults to "128". Available values: "64", "128", "256", "512".
    state String
    Specifies the state of maintenance operations. Available values: "enabled", "disabled".
    targetSizeMb String
    Sets the target file size for compaction in megabytes. Defaults to "128". Available values: "64", "128", "256", "512".
    state string
    Specifies the state of maintenance operations. Available values: "enabled", "disabled".
    targetSizeMb string
    Sets the target file size for compaction in megabytes. Defaults to "128". Available values: "64", "128", "256", "512".
    state str
    Specifies the state of maintenance operations. Available values: "enabled", "disabled".
    target_size_mb str
    Sets the target file size for compaction in megabytes. Defaults to "128". Available values: "64", "128", "256", "512".
    state String
    Specifies the state of maintenance operations. Available values: "enabled", "disabled".
    targetSizeMb String
    Sets the target file size for compaction in megabytes. Defaults to "128". Available values: "64", "128", "256", "512".

    R2DataCatalogMaintenanceConfigSnapshotExpiration, R2DataCatalogMaintenanceConfigSnapshotExpirationArgs

    MaxSnapshotAge string
    Specifies the maximum age for snapshots. The system deletes snapshots older than this age. Format: \n\n\n\n where unit is d (days), h (hours), m (minutes), or s (seconds). Examples: "7d" (7 days), "48h" (48 hours), "2880m" (2,880 minutes). Defaults to "7d".
    MinSnapshotsToKeep int
    Specifies the minimum number of snapshots to retain. Defaults to 100.
    State string
    Specifies the state of maintenance operations. Available values: "enabled", "disabled".
    MaxSnapshotAge string
    Specifies the maximum age for snapshots. The system deletes snapshots older than this age. Format: \n\n\n\n where unit is d (days), h (hours), m (minutes), or s (seconds). Examples: "7d" (7 days), "48h" (48 hours), "2880m" (2,880 minutes). Defaults to "7d".
    MinSnapshotsToKeep int
    Specifies the minimum number of snapshots to retain. Defaults to 100.
    State string
    Specifies the state of maintenance operations. Available values: "enabled", "disabled".
    maxSnapshotAge String
    Specifies the maximum age for snapshots. The system deletes snapshots older than this age. Format: \n\n\n\n where unit is d (days), h (hours), m (minutes), or s (seconds). Examples: "7d" (7 days), "48h" (48 hours), "2880m" (2,880 minutes). Defaults to "7d".
    minSnapshotsToKeep Integer
    Specifies the minimum number of snapshots to retain. Defaults to 100.
    state String
    Specifies the state of maintenance operations. Available values: "enabled", "disabled".
    maxSnapshotAge string
    Specifies the maximum age for snapshots. The system deletes snapshots older than this age. Format: \n\n\n\n where unit is d (days), h (hours), m (minutes), or s (seconds). Examples: "7d" (7 days), "48h" (48 hours), "2880m" (2,880 minutes). Defaults to "7d".
    minSnapshotsToKeep number
    Specifies the minimum number of snapshots to retain. Defaults to 100.
    state string
    Specifies the state of maintenance operations. Available values: "enabled", "disabled".
    max_snapshot_age str
    Specifies the maximum age for snapshots. The system deletes snapshots older than this age. Format: \n\n\n\n where unit is d (days), h (hours), m (minutes), or s (seconds). Examples: "7d" (7 days), "48h" (48 hours), "2880m" (2,880 minutes). Defaults to "7d".
    min_snapshots_to_keep int
    Specifies the minimum number of snapshots to retain. Defaults to 100.
    state str
    Specifies the state of maintenance operations. Available values: "enabled", "disabled".
    maxSnapshotAge String
    Specifies the maximum age for snapshots. The system deletes snapshots older than this age. Format: \n\n\n\n where unit is d (days), h (hours), m (minutes), or s (seconds). Examples: "7d" (7 days), "48h" (48 hours), "2880m" (2,880 minutes). Defaults to "7d".
    minSnapshotsToKeep Number
    Specifies the minimum number of snapshots to retain. Defaults to 100.
    state String
    Specifies the state of maintenance operations. Available values: "enabled", "disabled".

    Import

    $ pulumi import cloudflare:index/r2DataCatalog:R2DataCatalog example '<account_id>/<bucket_name>'
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Viewing docs for Cloudflare v6.15.0
    published on Saturday, May 2, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.