1. Packages
  2. Packages
  3. Cloudflare Provider
  4. API Docs
  5. getR2DataCatalog
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 = cloudflare.getR2DataCatalog({
        accountId: "0123456789abcdef0123456789abcdef",
        bucketName: "my-data-bucket",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_r2_data_catalog = cloudflare.get_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.GetR2DataCatalog(ctx, &cloudflare.LookupR2DataCatalogArgs{
    			AccountId:  pulumi.StringRef("0123456789abcdef0123456789abcdef"),
    			BucketName: "my-data-bucket",
    		}, 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 exampleR2DataCatalog = Cloudflare.Index.GetR2DataCatalog.Invoke(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.CloudflareFunctions;
    import com.pulumi.cloudflare.inputs.GetR2DataCatalogArgs;
    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 exampleR2DataCatalog = CloudflareFunctions.getR2DataCatalog(GetR2DataCatalogArgs.builder()
                .accountId("0123456789abcdef0123456789abcdef")
                .bucketName("my-data-bucket")
                .build());
    
        }
    }
    
    variables:
      exampleR2DataCatalog:
        fn::invoke:
          function: cloudflare:getR2DataCatalog
          arguments:
            accountId: 0123456789abcdef0123456789abcdef
            bucketName: my-data-bucket
    

    Using getR2DataCatalog

    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 getR2DataCatalog(args: GetR2DataCatalogArgs, opts?: InvokeOptions): Promise<GetR2DataCatalogResult>
    function getR2DataCatalogOutput(args: GetR2DataCatalogOutputArgs, opts?: InvokeOptions): Output<GetR2DataCatalogResult>
    def get_r2_data_catalog(account_id: Optional[str] = None,
                            bucket_name: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetR2DataCatalogResult
    def get_r2_data_catalog_output(account_id: Optional[pulumi.Input[str]] = None,
                            bucket_name: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetR2DataCatalogResult]
    func LookupR2DataCatalog(ctx *Context, args *LookupR2DataCatalogArgs, opts ...InvokeOption) (*LookupR2DataCatalogResult, error)
    func LookupR2DataCatalogOutput(ctx *Context, args *LookupR2DataCatalogOutputArgs, opts ...InvokeOption) LookupR2DataCatalogResultOutput

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

    public static class GetR2DataCatalog 
    {
        public static Task<GetR2DataCatalogResult> InvokeAsync(GetR2DataCatalogArgs args, InvokeOptions? opts = null)
        public static Output<GetR2DataCatalogResult> Invoke(GetR2DataCatalogInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetR2DataCatalogResult> getR2DataCatalog(GetR2DataCatalogArgs args, InvokeOptions options)
    public static Output<GetR2DataCatalogResult> getR2DataCatalog(GetR2DataCatalogArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getR2DataCatalog:getR2DataCatalog
      arguments:
        # arguments dictionary

    The following arguments are supported:

    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.

    getR2DataCatalog Result

    The following output properties are available:

    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".
    Id string
    Specifies the R2 bucket name.
    MaintenanceConfig GetR2DataCatalogMaintenanceConfig
    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".
    Id string
    Specifies the R2 bucket name.
    MaintenanceConfig GetR2DataCatalogMaintenanceConfig
    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".
    id String
    Specifies the R2 bucket name.
    maintenanceConfig GetR2DataCatalogMaintenanceConfig
    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".
    id string
    Specifies the R2 bucket name.
    maintenanceConfig GetR2DataCatalogMaintenanceConfig
    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 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".
    id str
    Specifies the R2 bucket name.
    maintenance_config GetR2DataCatalogMaintenanceConfig
    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".
    account_id str
    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".
    id String
    Specifies the R2 bucket name.
    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".
    accountId String
    Use this to identify the account.

    Supporting Types

    GetR2DataCatalogMaintenanceConfig

    Compaction GetR2DataCatalogMaintenanceConfigCompaction
    Configures compaction for catalog maintenance.
    SnapshotExpiration GetR2DataCatalogMaintenanceConfigSnapshotExpiration
    Configures snapshot expiration settings.
    Compaction GetR2DataCatalogMaintenanceConfigCompaction
    Configures compaction for catalog maintenance.
    SnapshotExpiration GetR2DataCatalogMaintenanceConfigSnapshotExpiration
    Configures snapshot expiration settings.
    compaction GetR2DataCatalogMaintenanceConfigCompaction
    Configures compaction for catalog maintenance.
    snapshotExpiration GetR2DataCatalogMaintenanceConfigSnapshotExpiration
    Configures snapshot expiration settings.
    compaction GetR2DataCatalogMaintenanceConfigCompaction
    Configures compaction for catalog maintenance.
    snapshotExpiration GetR2DataCatalogMaintenanceConfigSnapshotExpiration
    Configures snapshot expiration settings.
    compaction GetR2DataCatalogMaintenanceConfigCompaction
    Configures compaction for catalog maintenance.
    snapshot_expiration GetR2DataCatalogMaintenanceConfigSnapshotExpiration
    Configures snapshot expiration settings.
    compaction Property Map
    Configures compaction for catalog maintenance.
    snapshotExpiration Property Map
    Configures snapshot expiration settings.

    GetR2DataCatalogMaintenanceConfigCompaction

    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".

    GetR2DataCatalogMaintenanceConfigSnapshotExpiration

    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".

    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.