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

ionoscloud.S3BucketVersioning

Explore with Pulumi AI

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.S3BucketVersioning;
import com.pulumi.ionoscloud.S3BucketVersioningArgs;
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 exampleS3Bucket = new S3Bucket("exampleS3Bucket");

        var exampleS3BucketVersioning = new S3BucketVersioning("exampleS3BucketVersioning", S3BucketVersioningArgs.builder()
            .bucket(exampleS3Bucket.name())
            .versioningConfiguration(S3BucketVersioningVersioningConfigurationArgs.builder()
                .status("Enabled")
                .build())
            .build());

    }
}
Copy
resources:
  exampleS3Bucket:
    type: ionoscloud:S3Bucket
  exampleS3BucketVersioning:
    type: ionoscloud:S3BucketVersioning
    properties:
      bucket: ${exampleS3Bucket.name}
      versioningConfiguration:
        - status: Enabled
Copy

Create S3BucketVersioning Resource

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

Constructor syntax

new S3BucketVersioning(name: string, args: S3BucketVersioningArgs, opts?: CustomResourceOptions);
@overload
def S3BucketVersioning(resource_name: str,
                       args: S3BucketVersioningArgs,
                       opts: Optional[ResourceOptions] = None)

@overload
def S3BucketVersioning(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       bucket: Optional[str] = None,
                       versioning_configuration: Optional[S3BucketVersioningVersioningConfigurationArgs] = None)
func NewS3BucketVersioning(ctx *Context, name string, args S3BucketVersioningArgs, opts ...ResourceOption) (*S3BucketVersioning, error)
public S3BucketVersioning(string name, S3BucketVersioningArgs args, CustomResourceOptions? opts = null)
public S3BucketVersioning(String name, S3BucketVersioningArgs args)
public S3BucketVersioning(String name, S3BucketVersioningArgs args, CustomResourceOptions options)
type: ionoscloud:S3BucketVersioning
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. S3BucketVersioningArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. S3BucketVersioningArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. S3BucketVersioningArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. S3BucketVersioningArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. S3BucketVersioningArgs
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 s3bucketVersioningResource = new Ionoscloud.S3BucketVersioning("s3bucketVersioningResource", new()
{
    Bucket = "string",
    VersioningConfiguration = new Ionoscloud.Inputs.S3BucketVersioningVersioningConfigurationArgs
    {
        Status = "string",
        MfaDelete = "string",
    },
});
Copy
example, err := ionoscloud.NewS3BucketVersioning(ctx, "s3bucketVersioningResource", &ionoscloud.S3BucketVersioningArgs{
	Bucket: pulumi.String("string"),
	VersioningConfiguration: &ionoscloud.S3BucketVersioningVersioningConfigurationArgs{
		Status:    pulumi.String("string"),
		MfaDelete: pulumi.String("string"),
	},
})
Copy
var s3bucketVersioningResource = new S3BucketVersioning("s3bucketVersioningResource", S3BucketVersioningArgs.builder()
    .bucket("string")
    .versioningConfiguration(S3BucketVersioningVersioningConfigurationArgs.builder()
        .status("string")
        .mfaDelete("string")
        .build())
    .build());
Copy
s3bucket_versioning_resource = ionoscloud.S3BucketVersioning("s3bucketVersioningResource",
    bucket="string",
    versioning_configuration={
        "status": "string",
        "mfa_delete": "string",
    })
Copy
const s3bucketVersioningResource = new ionoscloud.S3BucketVersioning("s3bucketVersioningResource", {
    bucket: "string",
    versioningConfiguration: {
        status: "string",
        mfaDelete: "string",
    },
});
Copy
type: ionoscloud:S3BucketVersioning
properties:
    bucket: string
    versioningConfiguration:
        mfaDelete: string
        status: string
Copy

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

Bucket This property is required. string
[string] The name of the bucket where the object will be stored.
VersioningConfiguration S3BucketVersioningVersioningConfiguration
[block] A block of versioning_configuration as defined below.
Bucket This property is required. string
[string] The name of the bucket where the object will be stored.
VersioningConfiguration S3BucketVersioningVersioningConfigurationArgs
[block] A block of versioning_configuration as defined below.
bucket This property is required. String
[string] The name of the bucket where the object will be stored.
versioningConfiguration S3BucketVersioningVersioningConfiguration
[block] A block of versioning_configuration as defined below.
bucket This property is required. string
[string] The name of the bucket where the object will be stored.
versioningConfiguration S3BucketVersioningVersioningConfiguration
[block] A block of versioning_configuration as defined below.
bucket This property is required. str
[string] The name of the bucket where the object will be stored.
versioning_configuration S3BucketVersioningVersioningConfigurationArgs
[block] A block of versioning_configuration as defined below.
bucket This property is required. String
[string] The name of the bucket where the object will be stored.
versioningConfiguration Property Map
[block] A block of versioning_configuration as defined below.

Outputs

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

Get an existing S3BucketVersioning 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?: S3BucketVersioningState, opts?: CustomResourceOptions): S3BucketVersioning
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        bucket: Optional[str] = None,
        versioning_configuration: Optional[S3BucketVersioningVersioningConfigurationArgs] = None) -> S3BucketVersioning
func GetS3BucketVersioning(ctx *Context, name string, id IDInput, state *S3BucketVersioningState, opts ...ResourceOption) (*S3BucketVersioning, error)
public static S3BucketVersioning Get(string name, Input<string> id, S3BucketVersioningState? state, CustomResourceOptions? opts = null)
public static S3BucketVersioning get(String name, Output<String> id, S3BucketVersioningState state, CustomResourceOptions options)
resources:  _:    type: ionoscloud:S3BucketVersioning    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Bucket string
[string] The name of the bucket where the object will be stored.
VersioningConfiguration S3BucketVersioningVersioningConfiguration
[block] A block of versioning_configuration as defined below.
Bucket string
[string] The name of the bucket where the object will be stored.
VersioningConfiguration S3BucketVersioningVersioningConfigurationArgs
[block] A block of versioning_configuration as defined below.
bucket String
[string] The name of the bucket where the object will be stored.
versioningConfiguration S3BucketVersioningVersioningConfiguration
[block] A block of versioning_configuration as defined below.
bucket string
[string] The name of the bucket where the object will be stored.
versioningConfiguration S3BucketVersioningVersioningConfiguration
[block] A block of versioning_configuration as defined below.
bucket str
[string] The name of the bucket where the object will be stored.
versioning_configuration S3BucketVersioningVersioningConfigurationArgs
[block] A block of versioning_configuration as defined below.
bucket String
[string] The name of the bucket where the object will be stored.
versioningConfiguration Property Map
[block] A block of versioning_configuration as defined below.

Supporting Types

S3BucketVersioningVersioningConfiguration
, S3BucketVersioningVersioningConfigurationArgs

Status This property is required. string
[string] The versioning state of the bucket. Can be Enabled or Suspended.
MfaDelete string
[string] Specifies whether MFA delete is enabled or not. Can be Enabled or Disabled.
Status This property is required. string
[string] The versioning state of the bucket. Can be Enabled or Suspended.
MfaDelete string
[string] Specifies whether MFA delete is enabled or not. Can be Enabled or Disabled.
status This property is required. String
[string] The versioning state of the bucket. Can be Enabled or Suspended.
mfaDelete String
[string] Specifies whether MFA delete is enabled or not. Can be Enabled or Disabled.
status This property is required. string
[string] The versioning state of the bucket. Can be Enabled or Suspended.
mfaDelete string
[string] Specifies whether MFA delete is enabled or not. Can be Enabled or Disabled.
status This property is required. str
[string] The versioning state of the bucket. Can be Enabled or Suspended.
mfa_delete str
[string] Specifies whether MFA delete is enabled or not. Can be Enabled or Disabled.
status This property is required. String
[string] The versioning state of the bucket. Can be Enabled or Suspended.
mfaDelete String
[string] Specifies whether MFA delete is enabled or not. Can be Enabled or Disabled.

Import

IONOS Object Storage Bucket Versioning can be imported using the bucket name.

$ pulumi import ionoscloud:index/s3BucketVersioning:S3BucketVersioning example example
Copy

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.