1. Packages
  2. Ionoscloud Provider
  3. API Docs
  4. S3Bucket
ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud

ionoscloud.S3Bucket

Explore with Pulumi AI

ionoscloud logo
ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud

    Example Usage

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.S3Bucket;
    import com.pulumi.ionoscloud.S3BucketArgs;
    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) {
            var example = new S3Bucket("example", S3BucketArgs.builder()
                .region("eu-central-3")
                .objectLockEnabled(true)
                .forceDestroy(true)
                .tags(Map.ofEntries(
                    Map.entry("key1", "value1"),
                    Map.entry("key2", "value2")
                ))
                .timeouts(S3BucketTimeoutsArgs.builder()
                    .create("10m")
                    .delete("10m")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: ionoscloud:S3Bucket
        properties:
          region: eu-central-3
          objectLockEnabled: true
          forceDestroy: true
          tags:
            key1: value1
            key2: value2
          timeouts:
            - create: 10m
              delete: 10m
    

    Create S3Bucket Resource

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

    Constructor syntax

    new S3Bucket(name: string, args?: S3BucketArgs, opts?: CustomResourceOptions);
    @overload
    def S3Bucket(resource_name: str,
                 args: Optional[S3BucketArgs] = None,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def S3Bucket(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 force_destroy: Optional[bool] = None,
                 name: Optional[str] = None,
                 object_lock_enabled: Optional[bool] = None,
                 region: Optional[str] = None,
                 tags: Optional[Mapping[str, str]] = None,
                 timeouts: Optional[S3BucketTimeoutsArgs] = None)
    func NewS3Bucket(ctx *Context, name string, args *S3BucketArgs, opts ...ResourceOption) (*S3Bucket, error)
    public S3Bucket(string name, S3BucketArgs? args = null, CustomResourceOptions? opts = null)
    public S3Bucket(String name, S3BucketArgs args)
    public S3Bucket(String name, S3BucketArgs args, CustomResourceOptions options)
    
    type: ionoscloud:S3Bucket
    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 S3BucketArgs
    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 S3BucketArgs
    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 S3BucketArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args S3BucketArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args S3BucketArgs
    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 s3bucketResource = new Ionoscloud.S3Bucket("s3bucketResource", new()
    {
        ForceDestroy = false,
        Name = "string",
        ObjectLockEnabled = false,
        Region = "string",
        Tags = 
        {
            { "string", "string" },
        },
        Timeouts = new Ionoscloud.Inputs.S3BucketTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Read = "string",
            Update = "string",
        },
    });
    
    example, err := ionoscloud.NewS3Bucket(ctx, "s3bucketResource", &ionoscloud.S3BucketArgs{
    	ForceDestroy:      pulumi.Bool(false),
    	Name:              pulumi.String("string"),
    	ObjectLockEnabled: pulumi.Bool(false),
    	Region:            pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Timeouts: &ionoscloud.S3BucketTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Read:   pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    var s3bucketResource = new S3Bucket("s3bucketResource", S3BucketArgs.builder()
        .forceDestroy(false)
        .name("string")
        .objectLockEnabled(false)
        .region("string")
        .tags(Map.of("string", "string"))
        .timeouts(S3BucketTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .read("string")
            .update("string")
            .build())
        .build());
    
    s3bucket_resource = ionoscloud.S3Bucket("s3bucketResource",
        force_destroy=False,
        name="string",
        object_lock_enabled=False,
        region="string",
        tags={
            "string": "string",
        },
        timeouts={
            "create": "string",
            "delete": "string",
            "read": "string",
            "update": "string",
        })
    
    const s3bucketResource = new ionoscloud.S3Bucket("s3bucketResource", {
        forceDestroy: false,
        name: "string",
        objectLockEnabled: false,
        region: "string",
        tags: {
            string: "string",
        },
        timeouts: {
            create: "string",
            "delete": "string",
            read: "string",
            update: "string",
        },
    });
    
    type: ionoscloud:S3Bucket
    properties:
        forceDestroy: false
        name: string
        objectLockEnabled: false
        region: string
        tags:
            string: string
        timeouts:
            create: string
            delete: string
            read: string
            update: string
    

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

    ForceDestroy bool
    Whether all objects should be deleted from the bucket so that the bucket can be destroyed
    Name string
    [string] The bucket name. [ 3 .. 63 ] characters
    ObjectLockEnabled bool
    [bool] The object lock configuration status of the bucket. Must be true or false.
    Region string
    [string] Specifies the Region where the bucket will be created. Please refer to the list of available regions
    Tags Dictionary<string, string>
    A mapping of tags to assign to the bucket.
    Timeouts S3BucketTimeouts
    Timeouts for this resource.
    ForceDestroy bool
    Whether all objects should be deleted from the bucket so that the bucket can be destroyed
    Name string
    [string] The bucket name. [ 3 .. 63 ] characters
    ObjectLockEnabled bool
    [bool] The object lock configuration status of the bucket. Must be true or false.
    Region string
    [string] Specifies the Region where the bucket will be created. Please refer to the list of available regions
    Tags map[string]string
    A mapping of tags to assign to the bucket.
    Timeouts S3BucketTimeoutsArgs
    Timeouts for this resource.
    forceDestroy Boolean
    Whether all objects should be deleted from the bucket so that the bucket can be destroyed
    name String
    [string] The bucket name. [ 3 .. 63 ] characters
    objectLockEnabled Boolean
    [bool] The object lock configuration status of the bucket. Must be true or false.
    region String
    [string] Specifies the Region where the bucket will be created. Please refer to the list of available regions
    tags Map<String,String>
    A mapping of tags to assign to the bucket.
    timeouts S3BucketTimeouts
    Timeouts for this resource.
    forceDestroy boolean
    Whether all objects should be deleted from the bucket so that the bucket can be destroyed
    name string
    [string] The bucket name. [ 3 .. 63 ] characters
    objectLockEnabled boolean
    [bool] The object lock configuration status of the bucket. Must be true or false.
    region string
    [string] Specifies the Region where the bucket will be created. Please refer to the list of available regions
    tags {[key: string]: string}
    A mapping of tags to assign to the bucket.
    timeouts S3BucketTimeouts
    Timeouts for this resource.
    force_destroy bool
    Whether all objects should be deleted from the bucket so that the bucket can be destroyed
    name str
    [string] The bucket name. [ 3 .. 63 ] characters
    object_lock_enabled bool
    [bool] The object lock configuration status of the bucket. Must be true or false.
    region str
    [string] Specifies the Region where the bucket will be created. Please refer to the list of available regions
    tags Mapping[str, str]
    A mapping of tags to assign to the bucket.
    timeouts S3BucketTimeoutsArgs
    Timeouts for this resource.
    forceDestroy Boolean
    Whether all objects should be deleted from the bucket so that the bucket can be destroyed
    name String
    [string] The bucket name. [ 3 .. 63 ] characters
    objectLockEnabled Boolean
    [bool] The object lock configuration status of the bucket. Must be true or false.
    region String
    [string] Specifies the Region where the bucket will be created. Please refer to the list of available regions
    tags Map<String>
    A mapping of tags to assign to the bucket.
    timeouts Property Map
    Timeouts for this resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the S3Bucket 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 S3Bucket Resource

    Get an existing S3Bucket 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?: S3BucketState, opts?: CustomResourceOptions): S3Bucket
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            force_destroy: Optional[bool] = None,
            name: Optional[str] = None,
            object_lock_enabled: Optional[bool] = None,
            region: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            timeouts: Optional[S3BucketTimeoutsArgs] = None) -> S3Bucket
    func GetS3Bucket(ctx *Context, name string, id IDInput, state *S3BucketState, opts ...ResourceOption) (*S3Bucket, error)
    public static S3Bucket Get(string name, Input<string> id, S3BucketState? state, CustomResourceOptions? opts = null)
    public static S3Bucket get(String name, Output<String> id, S3BucketState state, CustomResourceOptions options)
    resources:  _:    type: ionoscloud:S3Bucket    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:
    ForceDestroy bool
    Whether all objects should be deleted from the bucket so that the bucket can be destroyed
    Name string
    [string] The bucket name. [ 3 .. 63 ] characters
    ObjectLockEnabled bool
    [bool] The object lock configuration status of the bucket. Must be true or false.
    Region string
    [string] Specifies the Region where the bucket will be created. Please refer to the list of available regions
    Tags Dictionary<string, string>
    A mapping of tags to assign to the bucket.
    Timeouts S3BucketTimeouts
    Timeouts for this resource.
    ForceDestroy bool
    Whether all objects should be deleted from the bucket so that the bucket can be destroyed
    Name string
    [string] The bucket name. [ 3 .. 63 ] characters
    ObjectLockEnabled bool
    [bool] The object lock configuration status of the bucket. Must be true or false.
    Region string
    [string] Specifies the Region where the bucket will be created. Please refer to the list of available regions
    Tags map[string]string
    A mapping of tags to assign to the bucket.
    Timeouts S3BucketTimeoutsArgs
    Timeouts for this resource.
    forceDestroy Boolean
    Whether all objects should be deleted from the bucket so that the bucket can be destroyed
    name String
    [string] The bucket name. [ 3 .. 63 ] characters
    objectLockEnabled Boolean
    [bool] The object lock configuration status of the bucket. Must be true or false.
    region String
    [string] Specifies the Region where the bucket will be created. Please refer to the list of available regions
    tags Map<String,String>
    A mapping of tags to assign to the bucket.
    timeouts S3BucketTimeouts
    Timeouts for this resource.
    forceDestroy boolean
    Whether all objects should be deleted from the bucket so that the bucket can be destroyed
    name string
    [string] The bucket name. [ 3 .. 63 ] characters
    objectLockEnabled boolean
    [bool] The object lock configuration status of the bucket. Must be true or false.
    region string
    [string] Specifies the Region where the bucket will be created. Please refer to the list of available regions
    tags {[key: string]: string}
    A mapping of tags to assign to the bucket.
    timeouts S3BucketTimeouts
    Timeouts for this resource.
    force_destroy bool
    Whether all objects should be deleted from the bucket so that the bucket can be destroyed
    name str
    [string] The bucket name. [ 3 .. 63 ] characters
    object_lock_enabled bool
    [bool] The object lock configuration status of the bucket. Must be true or false.
    region str
    [string] Specifies the Region where the bucket will be created. Please refer to the list of available regions
    tags Mapping[str, str]
    A mapping of tags to assign to the bucket.
    timeouts S3BucketTimeoutsArgs
    Timeouts for this resource.
    forceDestroy Boolean
    Whether all objects should be deleted from the bucket so that the bucket can be destroyed
    name String
    [string] The bucket name. [ 3 .. 63 ] characters
    objectLockEnabled Boolean
    [bool] The object lock configuration status of the bucket. Must be true or false.
    region String
    [string] Specifies the Region where the bucket will be created. Please refer to the list of available regions
    tags Map<String>
    A mapping of tags to assign to the bucket.
    timeouts Property Map
    Timeouts for this resource.

    Supporting Types

    S3BucketTimeouts, S3BucketTimeoutsArgs

    Create string
    [string] Time to wait for the bucket to be created. Default is 10m.
    Delete string
    [string] Time to wait for the bucket to be deleted. Default is 10m.
    Read string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    Update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Create string
    [string] Time to wait for the bucket to be created. Default is 10m.
    Delete string
    [string] Time to wait for the bucket to be deleted. Default is 10m.
    Read string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    Update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create String
    [string] Time to wait for the bucket to be created. Default is 10m.
    delete String
    [string] Time to wait for the bucket to be deleted. Default is 10m.
    read String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    update String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create string
    [string] Time to wait for the bucket to be created. Default is 10m.
    delete string
    [string] Time to wait for the bucket to be deleted. Default is 10m.
    read string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create str
    [string] Time to wait for the bucket to be created. Default is 10m.
    delete str
    [string] Time to wait for the bucket to be deleted. Default is 10m.
    read str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    update str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create String
    [string] Time to wait for the bucket to be created. Default is 10m.
    delete String
    [string] Time to wait for the bucket to be deleted. Default is 10m.
    read String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    update String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

    Import

    Resource Bucket can be imported using the bucket name

    $ pulumi import ionoscloud:index/s3Bucket:S3Bucket example example
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    ionoscloud ionos-cloud/terraform-provider-ionoscloud
    License
    Notes
    This Pulumi package is based on the ionoscloud Terraform Provider.
    ionoscloud logo
    ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud