Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi
cloudflare.getR2BucketLifecycle
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleR2BucketLifecycle = cloudflare.getR2BucketLifecycle({
accountId: "023e105f4ecef8ad9ca31a8372d0c353",
bucketName: "example-bucket",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_r2_bucket_lifecycle = cloudflare.get_r2_bucket_lifecycle(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.LookupR2BucketLifecycle(ctx, &cloudflare.LookupR2BucketLifecycleArgs{
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 exampleR2BucketLifecycle = Cloudflare.GetR2BucketLifecycle.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.GetR2BucketLifecycleArgs;
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 exampleR2BucketLifecycle = CloudflareFunctions.getR2BucketLifecycle(GetR2BucketLifecycleArgs.builder()
.accountId("023e105f4ecef8ad9ca31a8372d0c353")
.bucketName("example-bucket")
.build());
}
}
variables:
exampleR2BucketLifecycle:
fn::invoke:
function: cloudflare:getR2BucketLifecycle
arguments:
accountId: 023e105f4ecef8ad9ca31a8372d0c353
bucketName: example-bucket
Using getR2BucketLifecycle
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 getR2BucketLifecycle(args: GetR2BucketLifecycleArgs, opts?: InvokeOptions): Promise<GetR2BucketLifecycleResult>
function getR2BucketLifecycleOutput(args: GetR2BucketLifecycleOutputArgs, opts?: InvokeOptions): Output<GetR2BucketLifecycleResult>
def get_r2_bucket_lifecycle(account_id: Optional[str] = None,
bucket_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetR2BucketLifecycleResult
def get_r2_bucket_lifecycle_output(account_id: Optional[pulumi.Input[str]] = None,
bucket_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetR2BucketLifecycleResult]
func LookupR2BucketLifecycle(ctx *Context, args *LookupR2BucketLifecycleArgs, opts ...InvokeOption) (*LookupR2BucketLifecycleResult, error)
func LookupR2BucketLifecycleOutput(ctx *Context, args *LookupR2BucketLifecycleOutputArgs, opts ...InvokeOption) LookupR2BucketLifecycleResultOutput
> Note: This function is named LookupR2BucketLifecycle
in the Go SDK.
public static class GetR2BucketLifecycle
{
public static Task<GetR2BucketLifecycleResult> InvokeAsync(GetR2BucketLifecycleArgs args, InvokeOptions? opts = null)
public static Output<GetR2BucketLifecycleResult> Invoke(GetR2BucketLifecycleInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetR2BucketLifecycleResult> getR2BucketLifecycle(GetR2BucketLifecycleArgs args, InvokeOptions options)
public static Output<GetR2BucketLifecycleResult> getR2BucketLifecycle(GetR2BucketLifecycleArgs args, InvokeOptions options)
fn::invoke:
function: cloudflare:index/getR2BucketLifecycle:getR2BucketLifecycle
arguments:
# arguments dictionary
The 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
getR2BucketLifecycle 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 Lifecycle 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 Lifecycle 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 Lifecycle 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 Lifecycle 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 Lifecycle 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
GetR2BucketLifecycleRule
- Abort
Multipart GetUploads Transition R2Bucket Lifecycle Rule Abort Multipart Uploads Transition - Transition to abort ongoing multipart uploads
- Conditions
Get
R2Bucket Lifecycle Rule Conditions - Conditions that apply to all transitions of this rule
- Delete
Objects GetTransition R2Bucket Lifecycle Rule Delete Objects Transition - Transition to delete objects
- Enabled bool
- Whether or not this rule is in effect
- Id string
- Unique identifier for this rule
- Storage
Class List<GetTransitions R2Bucket Lifecycle Rule Storage Class Transition> - Transitions to change the storage class of objects
- Abort
Multipart GetUploads Transition R2Bucket Lifecycle Rule Abort Multipart Uploads Transition - Transition to abort ongoing multipart uploads
- Conditions
Get
R2Bucket Lifecycle Rule Conditions - Conditions that apply to all transitions of this rule
- Delete
Objects GetTransition R2Bucket Lifecycle Rule Delete Objects Transition - Transition to delete objects
- Enabled bool
- Whether or not this rule is in effect
- Id string
- Unique identifier for this rule
- Storage
Class []GetTransitions R2Bucket Lifecycle Rule Storage Class Transition - Transitions to change the storage class of objects
- abort
Multipart GetUploads Transition R2Bucket Lifecycle Rule Abort Multipart Uploads Transition - Transition to abort ongoing multipart uploads
- conditions
Get
R2Bucket Lifecycle Rule Conditions - Conditions that apply to all transitions of this rule
- delete
Objects GetTransition R2Bucket Lifecycle Rule Delete Objects Transition - Transition to delete objects
- enabled Boolean
- Whether or not this rule is in effect
- id String
- Unique identifier for this rule
- storage
Class List<GetTransitions R2Bucket Lifecycle Rule Storage Class Transition> - Transitions to change the storage class of objects
- abort
Multipart GetUploads Transition R2Bucket Lifecycle Rule Abort Multipart Uploads Transition - Transition to abort ongoing multipart uploads
- conditions
Get
R2Bucket Lifecycle Rule Conditions - Conditions that apply to all transitions of this rule
- delete
Objects GetTransition R2Bucket Lifecycle Rule Delete Objects Transition - Transition to delete objects
- enabled boolean
- Whether or not this rule is in effect
- id string
- Unique identifier for this rule
- storage
Class GetTransitions R2Bucket Lifecycle Rule Storage Class Transition[] - Transitions to change the storage class of objects
- abort_
multipart_ Getuploads_ transition R2Bucket Lifecycle Rule Abort Multipart Uploads Transition - Transition to abort ongoing multipart uploads
- conditions
Get
R2Bucket Lifecycle Rule Conditions - Conditions that apply to all transitions of this rule
- delete_
objects_ Gettransition R2Bucket Lifecycle Rule Delete Objects Transition - Transition to delete objects
- enabled bool
- Whether or not this rule is in effect
- id str
- Unique identifier for this rule
- storage_
class_ Sequence[Gettransitions R2Bucket Lifecycle Rule Storage Class Transition] - Transitions to change the storage class of objects
- abort
Multipart Property MapUploads Transition - Transition to abort ongoing multipart uploads
- conditions Property Map
- Conditions that apply to all transitions of this rule
- delete
Objects Property MapTransition - Transition to delete objects
- enabled Boolean
- Whether or not this rule is in effect
- id String
- Unique identifier for this rule
- storage
Class List<Property Map>Transitions - Transitions to change the storage class of objects
GetR2BucketLifecycleRuleAbortMultipartUploadsTransition
- Condition
Get
R2Bucket Lifecycle Rule Abort Multipart Uploads Transition Condition - Condition for lifecycle transitions to apply after an object reaches an age in seconds
- Condition
Get
R2Bucket Lifecycle Rule Abort Multipart Uploads Transition Condition - Condition for lifecycle transitions to apply after an object reaches an age in seconds
- condition
Get
R2Bucket Lifecycle Rule Abort Multipart Uploads Transition Condition - Condition for lifecycle transitions to apply after an object reaches an age in seconds
- condition
Get
R2Bucket Lifecycle Rule Abort Multipart Uploads Transition Condition - Condition for lifecycle transitions to apply after an object reaches an age in seconds
- condition
Get
R2Bucket Lifecycle Rule Abort Multipart Uploads Transition Condition - Condition for lifecycle transitions to apply after an object reaches an age in seconds
- condition Property Map
- Condition for lifecycle transitions to apply after an object reaches an age in seconds
GetR2BucketLifecycleRuleAbortMultipartUploadsTransitionCondition
GetR2BucketLifecycleRuleConditions
- Prefix string
- Transitions 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
- Prefix string
- Transitions 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
- prefix String
- Transitions 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
- prefix string
- Transitions 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
- prefix str
- Transitions 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
- prefix String
- Transitions 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
GetR2BucketLifecycleRuleDeleteObjectsTransition
- Condition
Get
R2Bucket Lifecycle Rule Delete Objects Transition Condition - Condition for lifecycle transitions to apply after an object reaches an age in seconds
- Condition
Get
R2Bucket Lifecycle Rule Delete Objects Transition Condition - Condition for lifecycle transitions to apply after an object reaches an age in seconds
- condition
Get
R2Bucket Lifecycle Rule Delete Objects Transition Condition - Condition for lifecycle transitions to apply after an object reaches an age in seconds
- condition
Get
R2Bucket Lifecycle Rule Delete Objects Transition Condition - Condition for lifecycle transitions to apply after an object reaches an age in seconds
- condition
Get
R2Bucket Lifecycle Rule Delete Objects Transition Condition - Condition for lifecycle transitions to apply after an object reaches an age in seconds
- condition Property Map
- Condition for lifecycle transitions to apply after an object reaches an age in seconds
GetR2BucketLifecycleRuleDeleteObjectsTransitionCondition
GetR2BucketLifecycleRuleStorageClassTransition
- Condition
Get
R2Bucket Lifecycle Rule Storage Class Transition Condition - Condition for lifecycle transitions to apply after an object reaches an age in seconds
- Storage
Class string - Available values: "InfrequentAccess".
- Condition
Get
R2Bucket Lifecycle Rule Storage Class Transition Condition - Condition for lifecycle transitions to apply after an object reaches an age in seconds
- Storage
Class string - Available values: "InfrequentAccess".
- condition
Get
R2Bucket Lifecycle Rule Storage Class Transition Condition - Condition for lifecycle transitions to apply after an object reaches an age in seconds
- storage
Class String - Available values: "InfrequentAccess".
- condition
Get
R2Bucket Lifecycle Rule Storage Class Transition Condition - Condition for lifecycle transitions to apply after an object reaches an age in seconds
- storage
Class string - Available values: "InfrequentAccess".
- condition
Get
R2Bucket Lifecycle Rule Storage Class Transition Condition - Condition for lifecycle transitions to apply after an object reaches an age in seconds
- storage_
class str - Available values: "InfrequentAccess".
- condition Property Map
- Condition for lifecycle transitions to apply after an object reaches an age in seconds
- storage
Class String - Available values: "InfrequentAccess".
GetR2BucketLifecycleRuleStorageClassTransitionCondition
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.