1. Packages
  2. Ibm Provider
  3. API Docs
  4. CosBucketLifecycleConfiguration
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.CosBucketLifecycleConfiguration

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Example Usage

    For example if there is a cos bucket existing in the .tfstate file with expire_rule applied.

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    // Existing Cos bucket configuration 
    const cosBucket = new ibm.CosBucket("cosBucket", {
        bucketName: _var.bucket_name,
        resourceInstanceId: ibm_resource_instance.cos_instance.id,
        regionLocation: _var.regional_loc,
        storageClass: _var.standard_storage_class,
        expireRules: [{
            ruleId: "id",
            enable: true,
            days: 45,
            prefix: "foo",
        }],
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    # Existing Cos bucket configuration 
    cos_bucket = ibm.CosBucket("cosBucket",
        bucket_name=var["bucket_name"],
        resource_instance_id=ibm_resource_instance["cos_instance"]["id"],
        region_location=var["regional_loc"],
        storage_class=var["standard_storage_class"],
        expire_rules=[{
            "rule_id": "id",
            "enable": True,
            "days": 45,
            "prefix": "foo",
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Existing Cos bucket configuration
    		_, err := ibm.NewCosBucket(ctx, "cosBucket", &ibm.CosBucketArgs{
    			BucketName:         pulumi.Any(_var.Bucket_name),
    			ResourceInstanceId: pulumi.Any(ibm_resource_instance.Cos_instance.Id),
    			RegionLocation:     pulumi.Any(_var.Regional_loc),
    			StorageClass:       pulumi.Any(_var.Standard_storage_class),
    			ExpireRules: ibm.CosBucketExpireRuleArray{
    				&ibm.CosBucketExpireRuleArgs{
    					RuleId: pulumi.String("id"),
    					Enable: pulumi.Bool(true),
    					Days:   pulumi.Float64(45),
    					Prefix: pulumi.String("foo"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        // Existing Cos bucket configuration 
        var cosBucket = new Ibm.CosBucket("cosBucket", new()
        {
            BucketName = @var.Bucket_name,
            ResourceInstanceId = ibm_resource_instance.Cos_instance.Id,
            RegionLocation = @var.Regional_loc,
            StorageClass = @var.Standard_storage_class,
            ExpireRules = new[]
            {
                new Ibm.Inputs.CosBucketExpireRuleArgs
                {
                    RuleId = "id",
                    Enable = true,
                    Days = 45,
                    Prefix = "foo",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.CosBucket;
    import com.pulumi.ibm.CosBucketArgs;
    import com.pulumi.ibm.inputs.CosBucketExpireRuleArgs;
    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) {
            // Existing Cos bucket configuration 
            var cosBucket = new CosBucket("cosBucket", CosBucketArgs.builder()
                .bucketName(var_.bucket_name())
                .resourceInstanceId(ibm_resource_instance.cos_instance().id())
                .regionLocation(var_.regional_loc())
                .storageClass(var_.standard_storage_class())
                .expireRules(CosBucketExpireRuleArgs.builder()
                    .ruleId("id")
                    .enable(true)
                    .days(45)
                    .prefix("foo")
                    .build())
                .build());
    
        }
    }
    
    resources:
      # Existing Cos bucket configuration
      cosBucket:
        type: ibm:CosBucket
        properties:
          bucketName: ${var.bucket_name}
          resourceInstanceId: ${ibm_resource_instance.cos_instance.id}
          regionLocation: ${var.regional_loc}
          storageClass: ${var.standard_storage_class}
          expireRules:
            - ruleId: id
              enable: true
              days: 45
              prefix: foo
    

    Step 1 : Add new ibm.CosBucketLifecycleConfiguration with same configuration as existing.

    ## Import IBM COS lifecycle configuration

    The lifecycle configuration rules for a bucket can be imported into an ibm.CosBucketLifecycleConfiguration resource for a particular bucket using the bucket id.

    id = $CRN:meta:$buckettype:$bucketlocation

    Syntax

    $ terraform import ibm_cos_bucket_lifecycle_configuration.lifecycle `$CRN:meta:$buckettype:$bucketlocation`
    

    Example

    
    $ terraform import ibm_cos_bucket_lifecycle_configuration.lifecycle crn:v1:bluemix:public:cloud-object-storage:global:a/4ea1882a2d3401ed1e459979941966ea:31fa970d-51d0-4b05-893e-251cba75a7b3:bucket:mybucketname:meta:crl:eu:public
    

    Create CosBucketLifecycleConfiguration Resource

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

    Constructor syntax

    new CosBucketLifecycleConfiguration(name: string, args: CosBucketLifecycleConfigurationArgs, opts?: CustomResourceOptions);
    @overload
    def CosBucketLifecycleConfiguration(resource_name: str,
                                        args: CosBucketLifecycleConfigurationArgs,
                                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def CosBucketLifecycleConfiguration(resource_name: str,
                                        opts: Optional[ResourceOptions] = None,
                                        bucket_crn: Optional[str] = None,
                                        bucket_location: Optional[str] = None,
                                        lifecycle_rules: Optional[Sequence[CosBucketLifecycleConfigurationLifecycleRuleArgs]] = None,
                                        cos_bucket_lifecycle_configuration_id: Optional[str] = None,
                                        endpoint_type: Optional[str] = None,
                                        timeouts: Optional[CosBucketLifecycleConfigurationTimeoutsArgs] = None)
    func NewCosBucketLifecycleConfiguration(ctx *Context, name string, args CosBucketLifecycleConfigurationArgs, opts ...ResourceOption) (*CosBucketLifecycleConfiguration, error)
    public CosBucketLifecycleConfiguration(string name, CosBucketLifecycleConfigurationArgs args, CustomResourceOptions? opts = null)
    public CosBucketLifecycleConfiguration(String name, CosBucketLifecycleConfigurationArgs args)
    public CosBucketLifecycleConfiguration(String name, CosBucketLifecycleConfigurationArgs args, CustomResourceOptions options)
    
    type: ibm:CosBucketLifecycleConfiguration
    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 CosBucketLifecycleConfigurationArgs
    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 CosBucketLifecycleConfigurationArgs
    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 CosBucketLifecycleConfigurationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CosBucketLifecycleConfigurationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CosBucketLifecycleConfigurationArgs
    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 cosBucketLifecycleConfigurationResource = new Ibm.CosBucketLifecycleConfiguration("cosBucketLifecycleConfigurationResource", new()
    {
        BucketCrn = "string",
        BucketLocation = "string",
        LifecycleRules = new[]
        {
            new Ibm.Inputs.CosBucketLifecycleConfigurationLifecycleRuleArgs
            {
                Filter = new Ibm.Inputs.CosBucketLifecycleConfigurationLifecycleRuleFilterArgs
                {
                    And = new Ibm.Inputs.CosBucketLifecycleConfigurationLifecycleRuleFilterAndArgs
                    {
                        ObjectSizeGreaterThan = 0,
                        ObjectSizeLessThan = 0,
                        Prefix = "string",
                        Tags = new[]
                        {
                            new Ibm.Inputs.CosBucketLifecycleConfigurationLifecycleRuleFilterAndTagArgs
                            {
                                Key = "string",
                                Value = "string",
                            },
                        },
                    },
                    ObjectSizeGreaterThan = 0,
                    ObjectSizeLessThan = 0,
                    Prefix = "string",
                    Tag = new Ibm.Inputs.CosBucketLifecycleConfigurationLifecycleRuleFilterTagArgs
                    {
                        Key = "string",
                        Value = "string",
                    },
                },
                RuleId = "string",
                Status = "string",
                AbortIncompleteMultipartUpload = new Ibm.Inputs.CosBucketLifecycleConfigurationLifecycleRuleAbortIncompleteMultipartUploadArgs
                {
                    DaysAfterInitiation = 0,
                },
                Expiration = new Ibm.Inputs.CosBucketLifecycleConfigurationLifecycleRuleExpirationArgs
                {
                    Date = "string",
                    Days = 0,
                    ExpiredObjectDeleteMarker = false,
                },
                NoncurrentVersionExpiration = new Ibm.Inputs.CosBucketLifecycleConfigurationLifecycleRuleNoncurrentVersionExpirationArgs
                {
                    NoncurrentDays = 0,
                },
                Transition = new Ibm.Inputs.CosBucketLifecycleConfigurationLifecycleRuleTransitionArgs
                {
                    StorageClass = "string",
                    Date = "string",
                    Days = 0,
                },
            },
        },
        CosBucketLifecycleConfigurationId = "string",
        EndpointType = "string",
        Timeouts = new Ibm.Inputs.CosBucketLifecycleConfigurationTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
    });
    
    example, err := ibm.NewCosBucketLifecycleConfiguration(ctx, "cosBucketLifecycleConfigurationResource", &ibm.CosBucketLifecycleConfigurationArgs{
    	BucketCrn:      pulumi.String("string"),
    	BucketLocation: pulumi.String("string"),
    	LifecycleRules: ibm.CosBucketLifecycleConfigurationLifecycleRuleArray{
    		&ibm.CosBucketLifecycleConfigurationLifecycleRuleArgs{
    			Filter: &ibm.CosBucketLifecycleConfigurationLifecycleRuleFilterArgs{
    				And: &ibm.CosBucketLifecycleConfigurationLifecycleRuleFilterAndArgs{
    					ObjectSizeGreaterThan: pulumi.Float64(0),
    					ObjectSizeLessThan:    pulumi.Float64(0),
    					Prefix:                pulumi.String("string"),
    					Tags: ibm.CosBucketLifecycleConfigurationLifecycleRuleFilterAndTagArray{
    						&ibm.CosBucketLifecycleConfigurationLifecycleRuleFilterAndTagArgs{
    							Key:   pulumi.String("string"),
    							Value: pulumi.String("string"),
    						},
    					},
    				},
    				ObjectSizeGreaterThan: pulumi.Float64(0),
    				ObjectSizeLessThan:    pulumi.Float64(0),
    				Prefix:                pulumi.String("string"),
    				Tag: &ibm.CosBucketLifecycleConfigurationLifecycleRuleFilterTagArgs{
    					Key:   pulumi.String("string"),
    					Value: pulumi.String("string"),
    				},
    			},
    			RuleId: pulumi.String("string"),
    			Status: pulumi.String("string"),
    			AbortIncompleteMultipartUpload: &ibm.CosBucketLifecycleConfigurationLifecycleRuleAbortIncompleteMultipartUploadArgs{
    				DaysAfterInitiation: pulumi.Float64(0),
    			},
    			Expiration: &ibm.CosBucketLifecycleConfigurationLifecycleRuleExpirationArgs{
    				Date:                      pulumi.String("string"),
    				Days:                      pulumi.Float64(0),
    				ExpiredObjectDeleteMarker: pulumi.Bool(false),
    			},
    			NoncurrentVersionExpiration: &ibm.CosBucketLifecycleConfigurationLifecycleRuleNoncurrentVersionExpirationArgs{
    				NoncurrentDays: pulumi.Float64(0),
    			},
    			Transition: &ibm.CosBucketLifecycleConfigurationLifecycleRuleTransitionArgs{
    				StorageClass: pulumi.String("string"),
    				Date:         pulumi.String("string"),
    				Days:         pulumi.Float64(0),
    			},
    		},
    	},
    	CosBucketLifecycleConfigurationId: pulumi.String("string"),
    	EndpointType:                      pulumi.String("string"),
    	Timeouts: &ibm.CosBucketLifecycleConfigurationTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    var cosBucketLifecycleConfigurationResource = new CosBucketLifecycleConfiguration("cosBucketLifecycleConfigurationResource", CosBucketLifecycleConfigurationArgs.builder()
        .bucketCrn("string")
        .bucketLocation("string")
        .lifecycleRules(CosBucketLifecycleConfigurationLifecycleRuleArgs.builder()
            .filter(CosBucketLifecycleConfigurationLifecycleRuleFilterArgs.builder()
                .and(CosBucketLifecycleConfigurationLifecycleRuleFilterAndArgs.builder()
                    .objectSizeGreaterThan(0)
                    .objectSizeLessThan(0)
                    .prefix("string")
                    .tags(CosBucketLifecycleConfigurationLifecycleRuleFilterAndTagArgs.builder()
                        .key("string")
                        .value("string")
                        .build())
                    .build())
                .objectSizeGreaterThan(0)
                .objectSizeLessThan(0)
                .prefix("string")
                .tag(CosBucketLifecycleConfigurationLifecycleRuleFilterTagArgs.builder()
                    .key("string")
                    .value("string")
                    .build())
                .build())
            .ruleId("string")
            .status("string")
            .abortIncompleteMultipartUpload(CosBucketLifecycleConfigurationLifecycleRuleAbortIncompleteMultipartUploadArgs.builder()
                .daysAfterInitiation(0)
                .build())
            .expiration(CosBucketLifecycleConfigurationLifecycleRuleExpirationArgs.builder()
                .date("string")
                .days(0)
                .expiredObjectDeleteMarker(false)
                .build())
            .noncurrentVersionExpiration(CosBucketLifecycleConfigurationLifecycleRuleNoncurrentVersionExpirationArgs.builder()
                .noncurrentDays(0)
                .build())
            .transition(CosBucketLifecycleConfigurationLifecycleRuleTransitionArgs.builder()
                .storageClass("string")
                .date("string")
                .days(0)
                .build())
            .build())
        .cosBucketLifecycleConfigurationId("string")
        .endpointType("string")
        .timeouts(CosBucketLifecycleConfigurationTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .build());
    
    cos_bucket_lifecycle_configuration_resource = ibm.CosBucketLifecycleConfiguration("cosBucketLifecycleConfigurationResource",
        bucket_crn="string",
        bucket_location="string",
        lifecycle_rules=[{
            "filter": {
                "and_": {
                    "object_size_greater_than": 0,
                    "object_size_less_than": 0,
                    "prefix": "string",
                    "tags": [{
                        "key": "string",
                        "value": "string",
                    }],
                },
                "object_size_greater_than": 0,
                "object_size_less_than": 0,
                "prefix": "string",
                "tag": {
                    "key": "string",
                    "value": "string",
                },
            },
            "rule_id": "string",
            "status": "string",
            "abort_incomplete_multipart_upload": {
                "days_after_initiation": 0,
            },
            "expiration": {
                "date": "string",
                "days": 0,
                "expired_object_delete_marker": False,
            },
            "noncurrent_version_expiration": {
                "noncurrent_days": 0,
            },
            "transition": {
                "storage_class": "string",
                "date": "string",
                "days": 0,
            },
        }],
        cos_bucket_lifecycle_configuration_id="string",
        endpoint_type="string",
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        })
    
    const cosBucketLifecycleConfigurationResource = new ibm.CosBucketLifecycleConfiguration("cosBucketLifecycleConfigurationResource", {
        bucketCrn: "string",
        bucketLocation: "string",
        lifecycleRules: [{
            filter: {
                and: {
                    objectSizeGreaterThan: 0,
                    objectSizeLessThan: 0,
                    prefix: "string",
                    tags: [{
                        key: "string",
                        value: "string",
                    }],
                },
                objectSizeGreaterThan: 0,
                objectSizeLessThan: 0,
                prefix: "string",
                tag: {
                    key: "string",
                    value: "string",
                },
            },
            ruleId: "string",
            status: "string",
            abortIncompleteMultipartUpload: {
                daysAfterInitiation: 0,
            },
            expiration: {
                date: "string",
                days: 0,
                expiredObjectDeleteMarker: false,
            },
            noncurrentVersionExpiration: {
                noncurrentDays: 0,
            },
            transition: {
                storageClass: "string",
                date: "string",
                days: 0,
            },
        }],
        cosBucketLifecycleConfigurationId: "string",
        endpointType: "string",
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
    });
    
    type: ibm:CosBucketLifecycleConfiguration
    properties:
        bucketCrn: string
        bucketLocation: string
        cosBucketLifecycleConfigurationId: string
        endpointType: string
        lifecycleRules:
            - abortIncompleteMultipartUpload:
                daysAfterInitiation: 0
              expiration:
                date: string
                days: 0
                expiredObjectDeleteMarker: false
              filter:
                and:
                    objectSizeGreaterThan: 0
                    objectSizeLessThan: 0
                    prefix: string
                    tags:
                        - key: string
                          value: string
                objectSizeGreaterThan: 0
                objectSizeLessThan: 0
                prefix: string
                tag:
                    key: string
                    value: string
              noncurrentVersionExpiration:
                noncurrentDays: 0
              ruleId: string
              status: string
              transition:
                date: string
                days: 0
                storageClass: string
        timeouts:
            create: string
            delete: string
            update: string
    

    CosBucketLifecycleConfiguration 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 CosBucketLifecycleConfiguration resource accepts the following input properties:

    BucketCrn string
    The CRN of the COS bucket.
    BucketLocation string
    The location of the COS bucket.
    LifecycleRules List<CosBucketLifecycleConfigurationLifecycleRule>

    Nested block have the following structure:

    Nested scheme for lifecycle_rule:

    CosBucketLifecycleConfigurationId string
    EndpointType string
    The type of the endpoint either public or private or direct to be used for buckets. Default value is public.
    Timeouts CosBucketLifecycleConfigurationTimeouts
    BucketCrn string
    The CRN of the COS bucket.
    BucketLocation string
    The location of the COS bucket.
    LifecycleRules []CosBucketLifecycleConfigurationLifecycleRuleArgs

    Nested block have the following structure:

    Nested scheme for lifecycle_rule:

    CosBucketLifecycleConfigurationId string
    EndpointType string
    The type of the endpoint either public or private or direct to be used for buckets. Default value is public.
    Timeouts CosBucketLifecycleConfigurationTimeoutsArgs
    bucketCrn String
    The CRN of the COS bucket.
    bucketLocation String
    The location of the COS bucket.
    lifecycleRules List<CosBucketLifecycleConfigurationLifecycleRule>

    Nested block have the following structure:

    Nested scheme for lifecycle_rule:

    cosBucketLifecycleConfigurationId String
    endpointType String
    The type of the endpoint either public or private or direct to be used for buckets. Default value is public.
    timeouts CosBucketLifecycleConfigurationTimeouts
    bucketCrn string
    The CRN of the COS bucket.
    bucketLocation string
    The location of the COS bucket.
    lifecycleRules CosBucketLifecycleConfigurationLifecycleRule[]

    Nested block have the following structure:

    Nested scheme for lifecycle_rule:

    cosBucketLifecycleConfigurationId string
    endpointType string
    The type of the endpoint either public or private or direct to be used for buckets. Default value is public.
    timeouts CosBucketLifecycleConfigurationTimeouts
    bucket_crn str
    The CRN of the COS bucket.
    bucket_location str
    The location of the COS bucket.
    lifecycle_rules Sequence[CosBucketLifecycleConfigurationLifecycleRuleArgs]

    Nested block have the following structure:

    Nested scheme for lifecycle_rule:

    cos_bucket_lifecycle_configuration_id str
    endpoint_type str
    The type of the endpoint either public or private or direct to be used for buckets. Default value is public.
    timeouts CosBucketLifecycleConfigurationTimeoutsArgs
    bucketCrn String
    The CRN of the COS bucket.
    bucketLocation String
    The location of the COS bucket.
    lifecycleRules List<Property Map>

    Nested block have the following structure:

    Nested scheme for lifecycle_rule:

    cosBucketLifecycleConfigurationId String
    endpointType String
    The type of the endpoint either public or private or direct to be used for buckets. Default value is public.
    timeouts Property Map

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing CosBucketLifecycleConfiguration Resource

    Get an existing CosBucketLifecycleConfiguration 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?: CosBucketLifecycleConfigurationState, opts?: CustomResourceOptions): CosBucketLifecycleConfiguration
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            bucket_crn: Optional[str] = None,
            bucket_location: Optional[str] = None,
            cos_bucket_lifecycle_configuration_id: Optional[str] = None,
            endpoint_type: Optional[str] = None,
            lifecycle_rules: Optional[Sequence[CosBucketLifecycleConfigurationLifecycleRuleArgs]] = None,
            timeouts: Optional[CosBucketLifecycleConfigurationTimeoutsArgs] = None) -> CosBucketLifecycleConfiguration
    func GetCosBucketLifecycleConfiguration(ctx *Context, name string, id IDInput, state *CosBucketLifecycleConfigurationState, opts ...ResourceOption) (*CosBucketLifecycleConfiguration, error)
    public static CosBucketLifecycleConfiguration Get(string name, Input<string> id, CosBucketLifecycleConfigurationState? state, CustomResourceOptions? opts = null)
    public static CosBucketLifecycleConfiguration get(String name, Output<String> id, CosBucketLifecycleConfigurationState state, CustomResourceOptions options)
    resources:  _:    type: ibm:CosBucketLifecycleConfiguration    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:
    BucketCrn string
    The CRN of the COS bucket.
    BucketLocation string
    The location of the COS bucket.
    CosBucketLifecycleConfigurationId string
    EndpointType string
    The type of the endpoint either public or private or direct to be used for buckets. Default value is public.
    LifecycleRules List<CosBucketLifecycleConfigurationLifecycleRule>

    Nested block have the following structure:

    Nested scheme for lifecycle_rule:

    Timeouts CosBucketLifecycleConfigurationTimeouts
    BucketCrn string
    The CRN of the COS bucket.
    BucketLocation string
    The location of the COS bucket.
    CosBucketLifecycleConfigurationId string
    EndpointType string
    The type of the endpoint either public or private or direct to be used for buckets. Default value is public.
    LifecycleRules []CosBucketLifecycleConfigurationLifecycleRuleArgs

    Nested block have the following structure:

    Nested scheme for lifecycle_rule:

    Timeouts CosBucketLifecycleConfigurationTimeoutsArgs
    bucketCrn String
    The CRN of the COS bucket.
    bucketLocation String
    The location of the COS bucket.
    cosBucketLifecycleConfigurationId String
    endpointType String
    The type of the endpoint either public or private or direct to be used for buckets. Default value is public.
    lifecycleRules List<CosBucketLifecycleConfigurationLifecycleRule>

    Nested block have the following structure:

    Nested scheme for lifecycle_rule:

    timeouts CosBucketLifecycleConfigurationTimeouts
    bucketCrn string
    The CRN of the COS bucket.
    bucketLocation string
    The location of the COS bucket.
    cosBucketLifecycleConfigurationId string
    endpointType string
    The type of the endpoint either public or private or direct to be used for buckets. Default value is public.
    lifecycleRules CosBucketLifecycleConfigurationLifecycleRule[]

    Nested block have the following structure:

    Nested scheme for lifecycle_rule:

    timeouts CosBucketLifecycleConfigurationTimeouts
    bucket_crn str
    The CRN of the COS bucket.
    bucket_location str
    The location of the COS bucket.
    cos_bucket_lifecycle_configuration_id str
    endpoint_type str
    The type of the endpoint either public or private or direct to be used for buckets. Default value is public.
    lifecycle_rules Sequence[CosBucketLifecycleConfigurationLifecycleRuleArgs]

    Nested block have the following structure:

    Nested scheme for lifecycle_rule:

    timeouts CosBucketLifecycleConfigurationTimeoutsArgs
    bucketCrn String
    The CRN of the COS bucket.
    bucketLocation String
    The location of the COS bucket.
    cosBucketLifecycleConfigurationId String
    endpointType String
    The type of the endpoint either public or private or direct to be used for buckets. Default value is public.
    lifecycleRules List<Property Map>

    Nested block have the following structure:

    Nested scheme for lifecycle_rule:

    timeouts Property Map

    Supporting Types

    CosBucketLifecycleConfigurationLifecycleRule, CosBucketLifecycleConfigurationLifecycleRuleArgs

    Filter CosBucketLifecycleConfigurationLifecycleRuleFilter
    Configuration block used to identify objects that a Lifecycle Rule applies to. If not specified, the rule will be applied to all the objects in a bucket.
    RuleId string
    Status string

    Whether the rule is currently being applied. Valid values: enable or disable.

    Nested scheme for expiration:

    AbortIncompleteMultipartUpload CosBucketLifecycleConfigurationLifecycleRuleAbortIncompleteMultipartUpload
    Configuration block that specifies the days since the initiation of an incomplete multipart upload that Amazon S3 will wait before permanently removing all parts of the upload.
    Expiration CosBucketLifecycleConfigurationLifecycleRuleExpiration
    Configuration block that specifies the expiration for the lifecycle of the object in the form of date, days and, whether the object has a delete marker.
    NoncurrentVersionExpiration CosBucketLifecycleConfigurationLifecycleRuleNoncurrentVersionExpiration
    Transition CosBucketLifecycleConfigurationLifecycleRuleTransition
    Configuration block that specifies the transition for the object.
    Filter CosBucketLifecycleConfigurationLifecycleRuleFilter
    Configuration block used to identify objects that a Lifecycle Rule applies to. If not specified, the rule will be applied to all the objects in a bucket.
    RuleId string
    Status string

    Whether the rule is currently being applied. Valid values: enable or disable.

    Nested scheme for expiration:

    AbortIncompleteMultipartUpload CosBucketLifecycleConfigurationLifecycleRuleAbortIncompleteMultipartUpload
    Configuration block that specifies the days since the initiation of an incomplete multipart upload that Amazon S3 will wait before permanently removing all parts of the upload.
    Expiration CosBucketLifecycleConfigurationLifecycleRuleExpiration
    Configuration block that specifies the expiration for the lifecycle of the object in the form of date, days and, whether the object has a delete marker.
    NoncurrentVersionExpiration CosBucketLifecycleConfigurationLifecycleRuleNoncurrentVersionExpiration
    Transition CosBucketLifecycleConfigurationLifecycleRuleTransition
    Configuration block that specifies the transition for the object.
    filter CosBucketLifecycleConfigurationLifecycleRuleFilter
    Configuration block used to identify objects that a Lifecycle Rule applies to. If not specified, the rule will be applied to all the objects in a bucket.
    ruleId String
    status String

    Whether the rule is currently being applied. Valid values: enable or disable.

    Nested scheme for expiration:

    abortIncompleteMultipartUpload CosBucketLifecycleConfigurationLifecycleRuleAbortIncompleteMultipartUpload
    Configuration block that specifies the days since the initiation of an incomplete multipart upload that Amazon S3 will wait before permanently removing all parts of the upload.
    expiration CosBucketLifecycleConfigurationLifecycleRuleExpiration
    Configuration block that specifies the expiration for the lifecycle of the object in the form of date, days and, whether the object has a delete marker.
    noncurrentVersionExpiration CosBucketLifecycleConfigurationLifecycleRuleNoncurrentVersionExpiration
    transition CosBucketLifecycleConfigurationLifecycleRuleTransition
    Configuration block that specifies the transition for the object.
    filter CosBucketLifecycleConfigurationLifecycleRuleFilter
    Configuration block used to identify objects that a Lifecycle Rule applies to. If not specified, the rule will be applied to all the objects in a bucket.
    ruleId string
    status string

    Whether the rule is currently being applied. Valid values: enable or disable.

    Nested scheme for expiration:

    abortIncompleteMultipartUpload CosBucketLifecycleConfigurationLifecycleRuleAbortIncompleteMultipartUpload
    Configuration block that specifies the days since the initiation of an incomplete multipart upload that Amazon S3 will wait before permanently removing all parts of the upload.
    expiration CosBucketLifecycleConfigurationLifecycleRuleExpiration
    Configuration block that specifies the expiration for the lifecycle of the object in the form of date, days and, whether the object has a delete marker.
    noncurrentVersionExpiration CosBucketLifecycleConfigurationLifecycleRuleNoncurrentVersionExpiration
    transition CosBucketLifecycleConfigurationLifecycleRuleTransition
    Configuration block that specifies the transition for the object.
    filter CosBucketLifecycleConfigurationLifecycleRuleFilter
    Configuration block used to identify objects that a Lifecycle Rule applies to. If not specified, the rule will be applied to all the objects in a bucket.
    rule_id str
    status str

    Whether the rule is currently being applied. Valid values: enable or disable.

    Nested scheme for expiration:

    abort_incomplete_multipart_upload CosBucketLifecycleConfigurationLifecycleRuleAbortIncompleteMultipartUpload
    Configuration block that specifies the days since the initiation of an incomplete multipart upload that Amazon S3 will wait before permanently removing all parts of the upload.
    expiration CosBucketLifecycleConfigurationLifecycleRuleExpiration
    Configuration block that specifies the expiration for the lifecycle of the object in the form of date, days and, whether the object has a delete marker.
    noncurrent_version_expiration CosBucketLifecycleConfigurationLifecycleRuleNoncurrentVersionExpiration
    transition CosBucketLifecycleConfigurationLifecycleRuleTransition
    Configuration block that specifies the transition for the object.
    filter Property Map
    Configuration block used to identify objects that a Lifecycle Rule applies to. If not specified, the rule will be applied to all the objects in a bucket.
    ruleId String
    status String

    Whether the rule is currently being applied. Valid values: enable or disable.

    Nested scheme for expiration:

    abortIncompleteMultipartUpload Property Map
    Configuration block that specifies the days since the initiation of an incomplete multipart upload that Amazon S3 will wait before permanently removing all parts of the upload.
    expiration Property Map
    Configuration block that specifies the expiration for the lifecycle of the object in the form of date, days and, whether the object has a delete marker.
    noncurrentVersionExpiration Property Map
    transition Property Map
    Configuration block that specifies the transition for the object.

    CosBucketLifecycleConfigurationLifecycleRuleAbortIncompleteMultipartUpload, CosBucketLifecycleConfigurationLifecycleRuleAbortIncompleteMultipartUploadArgs

    DaysAfterInitiation double

    Number of days after which incomplete multipart uploads are aborted.

    Nested scheme for filter:

    DaysAfterInitiation float64

    Number of days after which incomplete multipart uploads are aborted.

    Nested scheme for filter:

    daysAfterInitiation Double

    Number of days after which incomplete multipart uploads are aborted.

    Nested scheme for filter:

    daysAfterInitiation number

    Number of days after which incomplete multipart uploads are aborted.

    Nested scheme for filter:

    days_after_initiation float

    Number of days after which incomplete multipart uploads are aborted.

    Nested scheme for filter:

    daysAfterInitiation Number

    Number of days after which incomplete multipart uploads are aborted.

    Nested scheme for filter:

    CosBucketLifecycleConfigurationLifecycleRuleExpiration, CosBucketLifecycleConfigurationLifecycleRuleExpirationArgs

    Date string
    Date objects are transitioned to the specified storage class. The date value must be in RFC3339 full-date format.
    Days double
    Number of days after creation when objects are transitioned to the specified storage class. The value must be a positive integer. If both days and date are not specified, defaults to 0.
    ExpiredObjectDeleteMarker bool

    Indicates whether ibm will remove a delete marker with no noncurrent versions.

    Nested scheme for transition:

    Date string
    Date objects are transitioned to the specified storage class. The date value must be in RFC3339 full-date format.
    Days float64
    Number of days after creation when objects are transitioned to the specified storage class. The value must be a positive integer. If both days and date are not specified, defaults to 0.
    ExpiredObjectDeleteMarker bool

    Indicates whether ibm will remove a delete marker with no noncurrent versions.

    Nested scheme for transition:

    date String
    Date objects are transitioned to the specified storage class. The date value must be in RFC3339 full-date format.
    days Double
    Number of days after creation when objects are transitioned to the specified storage class. The value must be a positive integer. If both days and date are not specified, defaults to 0.
    expiredObjectDeleteMarker Boolean

    Indicates whether ibm will remove a delete marker with no noncurrent versions.

    Nested scheme for transition:

    date string
    Date objects are transitioned to the specified storage class. The date value must be in RFC3339 full-date format.
    days number
    Number of days after creation when objects are transitioned to the specified storage class. The value must be a positive integer. If both days and date are not specified, defaults to 0.
    expiredObjectDeleteMarker boolean

    Indicates whether ibm will remove a delete marker with no noncurrent versions.

    Nested scheme for transition:

    date str
    Date objects are transitioned to the specified storage class. The date value must be in RFC3339 full-date format.
    days float
    Number of days after creation when objects are transitioned to the specified storage class. The value must be a positive integer. If both days and date are not specified, defaults to 0.
    expired_object_delete_marker bool

    Indicates whether ibm will remove a delete marker with no noncurrent versions.

    Nested scheme for transition:

    date String
    Date objects are transitioned to the specified storage class. The date value must be in RFC3339 full-date format.
    days Number
    Number of days after creation when objects are transitioned to the specified storage class. The value must be a positive integer. If both days and date are not specified, defaults to 0.
    expiredObjectDeleteMarker Boolean

    Indicates whether ibm will remove a delete marker with no noncurrent versions.

    Nested scheme for transition:

    CosBucketLifecycleConfigurationLifecycleRuleFilter, CosBucketLifecycleConfigurationLifecycleRuleFilterArgs

    And CosBucketLifecycleConfigurationLifecycleRuleFilterAnd
    ObjectSizeGreaterThan double
    minimum object size to which the rule applies. Value must be at least 0 if specified.
    ObjectSizeLessThan double
    Maximum object size to which the rule applies. Value must be at least 1 if specified.
    Prefix string
    Prefix identifying one or more objects to which the rule applies.
    Tag CosBucketLifecycleConfigurationLifecycleRuleFilterTag
    Key-value map of resource tags.
    And CosBucketLifecycleConfigurationLifecycleRuleFilterAnd
    ObjectSizeGreaterThan float64
    minimum object size to which the rule applies. Value must be at least 0 if specified.
    ObjectSizeLessThan float64
    Maximum object size to which the rule applies. Value must be at least 1 if specified.
    Prefix string
    Prefix identifying one or more objects to which the rule applies.
    Tag CosBucketLifecycleConfigurationLifecycleRuleFilterTag
    Key-value map of resource tags.
    and CosBucketLifecycleConfigurationLifecycleRuleFilterAnd
    objectSizeGreaterThan Double
    minimum object size to which the rule applies. Value must be at least 0 if specified.
    objectSizeLessThan Double
    Maximum object size to which the rule applies. Value must be at least 1 if specified.
    prefix String
    Prefix identifying one or more objects to which the rule applies.
    tag CosBucketLifecycleConfigurationLifecycleRuleFilterTag
    Key-value map of resource tags.
    and CosBucketLifecycleConfigurationLifecycleRuleFilterAnd
    objectSizeGreaterThan number
    minimum object size to which the rule applies. Value must be at least 0 if specified.
    objectSizeLessThan number
    Maximum object size to which the rule applies. Value must be at least 1 if specified.
    prefix string
    Prefix identifying one or more objects to which the rule applies.
    tag CosBucketLifecycleConfigurationLifecycleRuleFilterTag
    Key-value map of resource tags.
    and_ CosBucketLifecycleConfigurationLifecycleRuleFilterAnd
    object_size_greater_than float
    minimum object size to which the rule applies. Value must be at least 0 if specified.
    object_size_less_than float
    Maximum object size to which the rule applies. Value must be at least 1 if specified.
    prefix str
    Prefix identifying one or more objects to which the rule applies.
    tag CosBucketLifecycleConfigurationLifecycleRuleFilterTag
    Key-value map of resource tags.
    and Property Map
    objectSizeGreaterThan Number
    minimum object size to which the rule applies. Value must be at least 0 if specified.
    objectSizeLessThan Number
    Maximum object size to which the rule applies. Value must be at least 1 if specified.
    prefix String
    Prefix identifying one or more objects to which the rule applies.
    tag Property Map
    Key-value map of resource tags.

    CosBucketLifecycleConfigurationLifecycleRuleFilterAnd, CosBucketLifecycleConfigurationLifecycleRuleFilterAndArgs

    ObjectSizeGreaterThan double
    minimum object size to which the rule applies. Value must be at least 0 if specified.
    ObjectSizeLessThan double
    Maximum object size to which the rule applies. Value must be at least 1 if specified.
    Prefix string
    Prefix identifying one or more objects to which the rule applies.
    Tags List<CosBucketLifecycleConfigurationLifecycleRuleFilterAndTag>
    ObjectSizeGreaterThan float64
    minimum object size to which the rule applies. Value must be at least 0 if specified.
    ObjectSizeLessThan float64
    Maximum object size to which the rule applies. Value must be at least 1 if specified.
    Prefix string
    Prefix identifying one or more objects to which the rule applies.
    Tags []CosBucketLifecycleConfigurationLifecycleRuleFilterAndTag
    objectSizeGreaterThan Double
    minimum object size to which the rule applies. Value must be at least 0 if specified.
    objectSizeLessThan Double
    Maximum object size to which the rule applies. Value must be at least 1 if specified.
    prefix String
    Prefix identifying one or more objects to which the rule applies.
    tags List<CosBucketLifecycleConfigurationLifecycleRuleFilterAndTag>
    objectSizeGreaterThan number
    minimum object size to which the rule applies. Value must be at least 0 if specified.
    objectSizeLessThan number
    Maximum object size to which the rule applies. Value must be at least 1 if specified.
    prefix string
    Prefix identifying one or more objects to which the rule applies.
    tags CosBucketLifecycleConfigurationLifecycleRuleFilterAndTag[]
    object_size_greater_than float
    minimum object size to which the rule applies. Value must be at least 0 if specified.
    object_size_less_than float
    Maximum object size to which the rule applies. Value must be at least 1 if specified.
    prefix str
    Prefix identifying one or more objects to which the rule applies.
    tags Sequence[CosBucketLifecycleConfigurationLifecycleRuleFilterAndTag]
    objectSizeGreaterThan Number
    minimum object size to which the rule applies. Value must be at least 0 if specified.
    objectSizeLessThan Number
    Maximum object size to which the rule applies. Value must be at least 1 if specified.
    prefix String
    Prefix identifying one or more objects to which the rule applies.
    tags List<Property Map>

    CosBucketLifecycleConfigurationLifecycleRuleFilterAndTag, CosBucketLifecycleConfigurationLifecycleRuleFilterAndTagArgs

    Key string
    Value string
    Key string
    Value string
    key String
    value String
    key string
    value string
    key str
    value str
    key String
    value String

    CosBucketLifecycleConfigurationLifecycleRuleFilterTag, CosBucketLifecycleConfigurationLifecycleRuleFilterTagArgs

    Key string
    Value string
    Key string
    Value string
    key String
    value String
    key string
    value string
    key str
    value str
    key String
    value String

    CosBucketLifecycleConfigurationLifecycleRuleNoncurrentVersionExpiration, CosBucketLifecycleConfigurationLifecycleRuleNoncurrentVersionExpirationArgs

    NoncurrentDays double

    Number of days an object is noncurrent before lifecycle action is performed. Must be a positive integer.

    Nested scheme for abort_incomplete_multipart_upload:

    NoncurrentDays float64

    Number of days an object is noncurrent before lifecycle action is performed. Must be a positive integer.

    Nested scheme for abort_incomplete_multipart_upload:

    noncurrentDays Double

    Number of days an object is noncurrent before lifecycle action is performed. Must be a positive integer.

    Nested scheme for abort_incomplete_multipart_upload:

    noncurrentDays number

    Number of days an object is noncurrent before lifecycle action is performed. Must be a positive integer.

    Nested scheme for abort_incomplete_multipart_upload:

    noncurrent_days float

    Number of days an object is noncurrent before lifecycle action is performed. Must be a positive integer.

    Nested scheme for abort_incomplete_multipart_upload:

    noncurrentDays Number

    Number of days an object is noncurrent before lifecycle action is performed. Must be a positive integer.

    Nested scheme for abort_incomplete_multipart_upload:

    CosBucketLifecycleConfigurationLifecycleRuleTransition, CosBucketLifecycleConfigurationLifecycleRuleTransitionArgs

    StorageClass string

    Class of storage used to store the object. Valid Values: GLACIER,ACCELERATED.

    Nested scheme for noncurrent_version_expiration:

    Date string
    Date objects are transitioned to the specified storage class. The date value must be in RFC3339 full-date format.
    Days double
    Number of days after creation when objects are transitioned to the specified storage class. The value must be a positive integer. If both days and date are not specified, defaults to 0.
    StorageClass string

    Class of storage used to store the object. Valid Values: GLACIER,ACCELERATED.

    Nested scheme for noncurrent_version_expiration:

    Date string
    Date objects are transitioned to the specified storage class. The date value must be in RFC3339 full-date format.
    Days float64
    Number of days after creation when objects are transitioned to the specified storage class. The value must be a positive integer. If both days and date are not specified, defaults to 0.
    storageClass String

    Class of storage used to store the object. Valid Values: GLACIER,ACCELERATED.

    Nested scheme for noncurrent_version_expiration:

    date String
    Date objects are transitioned to the specified storage class. The date value must be in RFC3339 full-date format.
    days Double
    Number of days after creation when objects are transitioned to the specified storage class. The value must be a positive integer. If both days and date are not specified, defaults to 0.
    storageClass string

    Class of storage used to store the object. Valid Values: GLACIER,ACCELERATED.

    Nested scheme for noncurrent_version_expiration:

    date string
    Date objects are transitioned to the specified storage class. The date value must be in RFC3339 full-date format.
    days number
    Number of days after creation when objects are transitioned to the specified storage class. The value must be a positive integer. If both days and date are not specified, defaults to 0.
    storage_class str

    Class of storage used to store the object. Valid Values: GLACIER,ACCELERATED.

    Nested scheme for noncurrent_version_expiration:

    date str
    Date objects are transitioned to the specified storage class. The date value must be in RFC3339 full-date format.
    days float
    Number of days after creation when objects are transitioned to the specified storage class. The value must be a positive integer. If both days and date are not specified, defaults to 0.
    storageClass String

    Class of storage used to store the object. Valid Values: GLACIER,ACCELERATED.

    Nested scheme for noncurrent_version_expiration:

    date String
    Date objects are transitioned to the specified storage class. The date value must be in RFC3339 full-date format.
    days Number
    Number of days after creation when objects are transitioned to the specified storage class. The value must be a positive integer. If both days and date are not specified, defaults to 0.

    CosBucketLifecycleConfigurationTimeouts, CosBucketLifecycleConfigurationTimeoutsArgs

    Create string
    Delete string
    Update string
    Create string
    Delete string
    Update string
    create String
    delete String
    update String
    create string
    delete string
    update string
    create str
    delete str
    update str
    create String
    delete String
    update String

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud