Viewing docs for Cloudflare v6.13.0
published on Wednesday, Jan 21, 2026 by Pulumi
published on Wednesday, Jan 21, 2026 by Pulumi
Viewing docs for Cloudflare v6.13.0
published on Wednesday, Jan 21, 2026 by Pulumi
published on Wednesday, Jan 21, 2026 by Pulumi
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleR2BucketLock = cloudflare.getR2BucketLock({
accountId: "023e105f4ecef8ad9ca31a8372d0c353",
bucketName: "example-bucket",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_r2_bucket_lock = cloudflare.get_r2_bucket_lock(account_id="023e105f4ecef8ad9ca31a8372d0c353",
bucket_name="example-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.LookupR2BucketLock(ctx, &cloudflare.LookupR2BucketLockArgs{
AccountId: "023e105f4ecef8ad9ca31a8372d0c353",
BucketName: "example-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 exampleR2BucketLock = Cloudflare.GetR2BucketLock.Invoke(new()
{
AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
BucketName = "example-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.GetR2BucketLockArgs;
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 exampleR2BucketLock = CloudflareFunctions.getR2BucketLock(GetR2BucketLockArgs.builder()
.accountId("023e105f4ecef8ad9ca31a8372d0c353")
.bucketName("example-bucket")
.build());
}
}
variables:
exampleR2BucketLock:
fn::invoke:
function: cloudflare:getR2BucketLock
arguments:
accountId: 023e105f4ecef8ad9ca31a8372d0c353
bucketName: example-bucket
Using getR2BucketLock
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 getR2BucketLock(args: GetR2BucketLockArgs, opts?: InvokeOptions): Promise<GetR2BucketLockResult>
function getR2BucketLockOutput(args: GetR2BucketLockOutputArgs, opts?: InvokeOptions): Output<GetR2BucketLockResult>def get_r2_bucket_lock(account_id: Optional[str] = None,
bucket_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetR2BucketLockResult
def get_r2_bucket_lock_output(account_id: Optional[pulumi.Input[str]] = None,
bucket_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetR2BucketLockResult]func LookupR2BucketLock(ctx *Context, args *LookupR2BucketLockArgs, opts ...InvokeOption) (*LookupR2BucketLockResult, error)
func LookupR2BucketLockOutput(ctx *Context, args *LookupR2BucketLockOutputArgs, opts ...InvokeOption) LookupR2BucketLockResultOutput> Note: This function is named LookupR2BucketLock in the Go SDK.
public static class GetR2BucketLock
{
public static Task<GetR2BucketLockResult> InvokeAsync(GetR2BucketLockArgs args, InvokeOptions? opts = null)
public static Output<GetR2BucketLockResult> Invoke(GetR2BucketLockInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetR2BucketLockResult> getR2BucketLock(GetR2BucketLockArgs args, InvokeOptions options)
public static Output<GetR2BucketLockResult> getR2BucketLock(GetR2BucketLockArgs args, InvokeOptions options)
fn::invoke:
function: cloudflare:index/getR2BucketLock:getR2BucketLock
arguments:
# arguments dictionaryThe following arguments are supported:
- Account
Id string - Account ID.
- Bucket
Name string - Name of the bucket.
- Account
Id string - Account ID.
- Bucket
Name string - Name of the bucket.
- account
Id String - Account ID.
- bucket
Name String - Name of the bucket.
- account
Id string - Account ID.
- bucket
Name string - Name of the bucket.
- account_
id str - Account ID.
- bucket_
name str - Name of the bucket.
- account
Id String - Account ID.
- bucket
Name String - Name of the bucket.
getR2BucketLock Result
The following output properties are available:
- Account
Id string - Account ID.
- Bucket
Name string - Name of the bucket.
- Id string
- The provider-assigned unique ID for this managed resource.
- Rules
List<Get
R2Bucket Lock Rule>
- Account
Id string - Account ID.
- Bucket
Name string - Name of the bucket.
- Id string
- The provider-assigned unique ID for this managed resource.
- Rules
[]Get
R2Bucket Lock Rule
- account
Id String - Account ID.
- bucket
Name String - Name of the bucket.
- id String
- The provider-assigned unique ID for this managed resource.
- rules
List<Get
R2Bucket Lock Rule>
- account
Id string - Account ID.
- bucket
Name string - Name of the bucket.
- id string
- The provider-assigned unique ID for this managed resource.
- rules
Get
R2Bucket Lock Rule[]
- account_
id str - Account ID.
- bucket_
name str - Name of the bucket.
- id str
- The provider-assigned unique ID for this managed resource.
- rules
Sequence[Get
R2Bucket Lock Rule]
- account
Id String - Account ID.
- bucket
Name String - Name of the bucket.
- id String
- The provider-assigned unique ID for this managed resource.
- rules List<Property Map>
Supporting Types
GetR2BucketLockRule
- Condition
Get
R2Bucket Lock Rule Condition - Condition to apply a lock rule to an object for how long in seconds.
- Enabled bool
- Whether or not this rule is in effect.
- Id string
- Unique identifier for this rule.
- Prefix string
- Rule will only apply to objects/uploads in the bucket that start with the given prefix, an empty prefix can be provided to scope rule to all objects/uploads.
- Condition
Get
R2Bucket Lock Rule Condition - Condition to apply a lock rule to an object for how long in seconds.
- Enabled bool
- Whether or not this rule is in effect.
- Id string
- Unique identifier for this rule.
- Prefix string
- Rule will only apply to objects/uploads in the bucket that start with the given prefix, an empty prefix can be provided to scope rule to all objects/uploads.
- condition
Get
R2Bucket Lock Rule Condition - Condition to apply a lock rule to an object for how long in seconds.
- enabled Boolean
- Whether or not this rule is in effect.
- id String
- Unique identifier for this rule.
- prefix String
- Rule will only apply to objects/uploads in the bucket that start with the given prefix, an empty prefix can be provided to scope rule to all objects/uploads.
- condition
Get
R2Bucket Lock Rule Condition - Condition to apply a lock rule to an object for how long in seconds.
- enabled boolean
- Whether or not this rule is in effect.
- id string
- Unique identifier for this rule.
- prefix string
- Rule will only apply to objects/uploads in the bucket that start with the given prefix, an empty prefix can be provided to scope rule to all objects/uploads.
- condition
Get
R2Bucket Lock Rule Condition - Condition to apply a lock rule to an object for how long in seconds.
- enabled bool
- Whether or not this rule is in effect.
- id str
- Unique identifier for this rule.
- prefix str
- Rule will only apply to objects/uploads in the bucket that start with the given prefix, an empty prefix can be provided to scope rule to all objects/uploads.
- condition Property Map
- Condition to apply a lock rule to an object for how long in seconds.
- enabled Boolean
- Whether or not this rule is in effect.
- id String
- Unique identifier for this rule.
- prefix String
- Rule will only apply to objects/uploads in the bucket that start with the given prefix, an empty prefix can be provided to scope rule to all objects/uploads.
GetR2BucketLockRuleCondition
- Date string
- Max
Age intSeconds - Type string
- Available values: "Age", "Date", "Indefinite".
- Date string
- Max
Age intSeconds - Type string
- Available values: "Age", "Date", "Indefinite".
- date String
- max
Age IntegerSeconds - type String
- Available values: "Age", "Date", "Indefinite".
- date string
- max
Age numberSeconds - type string
- Available values: "Age", "Date", "Indefinite".
- date str
- max_
age_ intseconds - type str
- Available values: "Age", "Date", "Indefinite".
- date String
- max
Age NumberSeconds - type String
- Available values: "Age", "Date", "Indefinite".
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflareTerraform Provider.
Viewing docs for Cloudflare v6.13.0
published on Wednesday, Jan 21, 2026 by Pulumi
published on Wednesday, Jan 21, 2026 by Pulumi
