1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. getR2BucketLifecycle
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

cloudflare.getR2BucketLifecycle

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

    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:

    AccountId string
    Account ID
    BucketName string
    Name of the bucket
    AccountId string
    Account ID
    BucketName string
    Name of the bucket
    accountId String
    Account ID
    bucketName String
    Name of the bucket
    accountId string
    Account ID
    bucketName string
    Name of the bucket
    account_id str
    Account ID
    bucket_name str
    Name of the bucket
    accountId String
    Account ID
    bucketName String
    Name of the bucket

    getR2BucketLifecycle Result

    The following output properties are available:

    AccountId string
    Account ID
    BucketName string
    Name of the bucket
    Id string
    The provider-assigned unique ID for this managed resource.
    Rules List<GetR2BucketLifecycleRule>
    AccountId string
    Account ID
    BucketName string
    Name of the bucket
    Id string
    The provider-assigned unique ID for this managed resource.
    Rules []GetR2BucketLifecycleRule
    accountId String
    Account ID
    bucketName String
    Name of the bucket
    id String
    The provider-assigned unique ID for this managed resource.
    rules List<GetR2BucketLifecycleRule>
    accountId string
    Account ID
    bucketName string
    Name of the bucket
    id string
    The provider-assigned unique ID for this managed resource.
    rules GetR2BucketLifecycleRule[]
    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[GetR2BucketLifecycleRule]
    accountId String
    Account ID
    bucketName String
    Name of the bucket
    id String
    The provider-assigned unique ID for this managed resource.
    rules List<Property Map>

    Supporting Types

    GetR2BucketLifecycleRule

    AbortMultipartUploadsTransition GetR2BucketLifecycleRuleAbortMultipartUploadsTransition
    Transition to abort ongoing multipart uploads
    Conditions GetR2BucketLifecycleRuleConditions
    Conditions that apply to all transitions of this rule
    DeleteObjectsTransition GetR2BucketLifecycleRuleDeleteObjectsTransition
    Transition to delete objects
    Enabled bool
    Whether or not this rule is in effect
    Id string
    Unique identifier for this rule
    StorageClassTransitions List<GetR2BucketLifecycleRuleStorageClassTransition>
    Transitions to change the storage class of objects
    AbortMultipartUploadsTransition GetR2BucketLifecycleRuleAbortMultipartUploadsTransition
    Transition to abort ongoing multipart uploads
    Conditions GetR2BucketLifecycleRuleConditions
    Conditions that apply to all transitions of this rule
    DeleteObjectsTransition GetR2BucketLifecycleRuleDeleteObjectsTransition
    Transition to delete objects
    Enabled bool
    Whether or not this rule is in effect
    Id string
    Unique identifier for this rule
    StorageClassTransitions []GetR2BucketLifecycleRuleStorageClassTransition
    Transitions to change the storage class of objects
    abortMultipartUploadsTransition GetR2BucketLifecycleRuleAbortMultipartUploadsTransition
    Transition to abort ongoing multipart uploads
    conditions GetR2BucketLifecycleRuleConditions
    Conditions that apply to all transitions of this rule
    deleteObjectsTransition GetR2BucketLifecycleRuleDeleteObjectsTransition
    Transition to delete objects
    enabled Boolean
    Whether or not this rule is in effect
    id String
    Unique identifier for this rule
    storageClassTransitions List<GetR2BucketLifecycleRuleStorageClassTransition>
    Transitions to change the storage class of objects
    abortMultipartUploadsTransition GetR2BucketLifecycleRuleAbortMultipartUploadsTransition
    Transition to abort ongoing multipart uploads
    conditions GetR2BucketLifecycleRuleConditions
    Conditions that apply to all transitions of this rule
    deleteObjectsTransition GetR2BucketLifecycleRuleDeleteObjectsTransition
    Transition to delete objects
    enabled boolean
    Whether or not this rule is in effect
    id string
    Unique identifier for this rule
    storageClassTransitions GetR2BucketLifecycleRuleStorageClassTransition[]
    Transitions to change the storage class of objects
    abort_multipart_uploads_transition GetR2BucketLifecycleRuleAbortMultipartUploadsTransition
    Transition to abort ongoing multipart uploads
    conditions GetR2BucketLifecycleRuleConditions
    Conditions that apply to all transitions of this rule
    delete_objects_transition GetR2BucketLifecycleRuleDeleteObjectsTransition
    Transition to delete objects
    enabled bool
    Whether or not this rule is in effect
    id str
    Unique identifier for this rule
    storage_class_transitions Sequence[GetR2BucketLifecycleRuleStorageClassTransition]
    Transitions to change the storage class of objects
    abortMultipartUploadsTransition Property Map
    Transition to abort ongoing multipart uploads
    conditions Property Map
    Conditions that apply to all transitions of this rule
    deleteObjectsTransition Property Map
    Transition to delete objects
    enabled Boolean
    Whether or not this rule is in effect
    id String
    Unique identifier for this rule
    storageClassTransitions List<Property Map>
    Transitions to change the storage class of objects

    GetR2BucketLifecycleRuleAbortMultipartUploadsTransition

    Condition GetR2BucketLifecycleRuleAbortMultipartUploadsTransitionCondition
    Condition for lifecycle transitions to apply after an object reaches an age in seconds
    Condition GetR2BucketLifecycleRuleAbortMultipartUploadsTransitionCondition
    Condition for lifecycle transitions to apply after an object reaches an age in seconds
    condition GetR2BucketLifecycleRuleAbortMultipartUploadsTransitionCondition
    Condition for lifecycle transitions to apply after an object reaches an age in seconds
    condition GetR2BucketLifecycleRuleAbortMultipartUploadsTransitionCondition
    Condition for lifecycle transitions to apply after an object reaches an age in seconds
    condition GetR2BucketLifecycleRuleAbortMultipartUploadsTransitionCondition
    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

    MaxAge int
    Type string
    Available values: "Age".
    MaxAge int
    Type string
    Available values: "Age".
    maxAge Integer
    type String
    Available values: "Age".
    maxAge number
    type string
    Available values: "Age".
    max_age int
    type str
    Available values: "Age".
    maxAge Number
    type String
    Available values: "Age".

    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 GetR2BucketLifecycleRuleDeleteObjectsTransitionCondition
    Condition for lifecycle transitions to apply after an object reaches an age in seconds
    Condition GetR2BucketLifecycleRuleDeleteObjectsTransitionCondition
    Condition for lifecycle transitions to apply after an object reaches an age in seconds
    condition GetR2BucketLifecycleRuleDeleteObjectsTransitionCondition
    Condition for lifecycle transitions to apply after an object reaches an age in seconds
    condition GetR2BucketLifecycleRuleDeleteObjectsTransitionCondition
    Condition for lifecycle transitions to apply after an object reaches an age in seconds
    condition GetR2BucketLifecycleRuleDeleteObjectsTransitionCondition
    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

    Date string
    MaxAge int
    Type string
    Available values: "Age".
    Date string
    MaxAge int
    Type string
    Available values: "Age".
    date String
    maxAge Integer
    type String
    Available values: "Age".
    date string
    maxAge number
    type string
    Available values: "Age".
    date str
    max_age int
    type str
    Available values: "Age".
    date String
    maxAge Number
    type String
    Available values: "Age".

    GetR2BucketLifecycleRuleStorageClassTransition

    Condition GetR2BucketLifecycleRuleStorageClassTransitionCondition
    Condition for lifecycle transitions to apply after an object reaches an age in seconds
    StorageClass string
    Available values: "InfrequentAccess".
    Condition GetR2BucketLifecycleRuleStorageClassTransitionCondition
    Condition for lifecycle transitions to apply after an object reaches an age in seconds
    StorageClass string
    Available values: "InfrequentAccess".
    condition GetR2BucketLifecycleRuleStorageClassTransitionCondition
    Condition for lifecycle transitions to apply after an object reaches an age in seconds
    storageClass String
    Available values: "InfrequentAccess".
    condition GetR2BucketLifecycleRuleStorageClassTransitionCondition
    Condition for lifecycle transitions to apply after an object reaches an age in seconds
    storageClass string
    Available values: "InfrequentAccess".
    condition GetR2BucketLifecycleRuleStorageClassTransitionCondition
    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
    storageClass String
    Available values: "InfrequentAccess".

    GetR2BucketLifecycleRuleStorageClassTransitionCondition

    Date string
    MaxAge int
    Type string
    Available values: "Age".
    Date string
    MaxAge int
    Type string
    Available values: "Age".
    date String
    maxAge Integer
    type String
    Available values: "Age".
    date string
    maxAge number
    type string
    Available values: "Age".
    date str
    max_age int
    type str
    Available values: "Age".
    date String
    maxAge Number
    type String
    Available values: "Age".

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi