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());
}
}
resources:
exampleS3Bucket:
type: ionoscloud:S3Bucket
exampleS3BucketVersioning:
type: ionoscloud:S3BucketVersioning
properties:
bucket: ${exampleS3Bucket.name}
versioningConfiguration:
- status: Enabled
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 string
- The unique name of the resource.
- args S3BucketVersioningArgs
- 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 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 string
- The unique name of the resource.
- args S3BucketVersioningArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args S3BucketVersioningArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
},
});
example, err := ionoscloud.NewS3BucketVersioning(ctx, "s3bucketVersioningResource", &ionoscloud.S3BucketVersioningArgs{
Bucket: pulumi.String("string"),
VersioningConfiguration: &ionoscloud.S3BucketVersioningVersioningConfigurationArgs{
Status: pulumi.String("string"),
MfaDelete: pulumi.String("string"),
},
})
var s3bucketVersioningResource = new S3BucketVersioning("s3bucketVersioningResource", S3BucketVersioningArgs.builder()
.bucket("string")
.versioningConfiguration(S3BucketVersioningVersioningConfigurationArgs.builder()
.status("string")
.mfaDelete("string")
.build())
.build());
s3bucket_versioning_resource = ionoscloud.S3BucketVersioning("s3bucketVersioningResource",
bucket="string",
versioning_configuration={
"status": "string",
"mfa_delete": "string",
})
const s3bucketVersioningResource = new ionoscloud.S3BucketVersioning("s3bucketVersioningResource", {
bucket: "string",
versioningConfiguration: {
status: "string",
mfaDelete: "string",
},
});
type: ionoscloud:S3BucketVersioning
properties:
bucket: string
versioningConfiguration:
mfaDelete: string
status: string
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 string
- [string] The name of the bucket where the object will be stored.
- Versioning
Configuration S3BucketVersioning Versioning Configuration - [block] A block of versioning_configuration as defined below.
- Bucket string
- [string] The name of the bucket where the object will be stored.
- Versioning
Configuration S3BucketVersioning Versioning Configuration Args - [block] A block of versioning_configuration as defined below.
- bucket String
- [string] The name of the bucket where the object will be stored.
- versioning
Configuration S3BucketVersioning Versioning Configuration - [block] A block of versioning_configuration as defined below.
- bucket string
- [string] The name of the bucket where the object will be stored.
- versioning
Configuration S3BucketVersioning Versioning Configuration - [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 S3BucketVersioning Versioning Configuration Args - [block] A block of versioning_configuration as defined below.
- bucket String
- [string] The name of the bucket where the object will be stored.
- versioning
Configuration 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
- 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.
- Bucket string
- [string] The name of the bucket where the object will be stored.
- Versioning
Configuration S3BucketVersioning Versioning Configuration - [block] A block of versioning_configuration as defined below.
- Bucket string
- [string] The name of the bucket where the object will be stored.
- Versioning
Configuration S3BucketVersioning Versioning Configuration Args - [block] A block of versioning_configuration as defined below.
- bucket String
- [string] The name of the bucket where the object will be stored.
- versioning
Configuration S3BucketVersioning Versioning Configuration - [block] A block of versioning_configuration as defined below.
- bucket string
- [string] The name of the bucket where the object will be stored.
- versioning
Configuration S3BucketVersioning Versioning Configuration - [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 S3BucketVersioning Versioning Configuration Args - [block] A block of versioning_configuration as defined below.
- bucket String
- [string] The name of the bucket where the object will be stored.
- versioning
Configuration Property Map - [block] A block of versioning_configuration as defined below.
Supporting Types
S3BucketVersioningVersioningConfiguration, S3BucketVersioningVersioningConfigurationArgs
- status str
- [string] The versioning state of the bucket. Can be
Enabled
orSuspended
. - mfa_
delete str - [string] Specifies whether MFA delete is enabled or not. Can be
Enabled
orDisabled
.
Import
IONOS Object Storage Bucket Versioning can be imported using the bucket
name.
$ pulumi import ionoscloud:index/s3BucketVersioning:S3BucketVersioning 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.