minio.IlmPolicy
Explore with Pulumi AI
minio.IlmPolicy
handles lifecycle settings for a given minio.S3Bucket
.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as minio from "@pulumi/minio";
const bucket = new minio.S3Bucket("bucket", {bucket: "bucket"});
const bucket_lifecycle_rules = new minio.IlmPolicy("bucket-lifecycle-rules", {
bucket: bucket.bucket,
rules: [{
id: "expire-7d",
expiration: "7d",
}],
});
import pulumi
import pulumi_minio as minio
bucket = minio.S3Bucket("bucket", bucket="bucket")
bucket_lifecycle_rules = minio.IlmPolicy("bucket-lifecycle-rules",
bucket=bucket.bucket,
rules=[{
"id": "expire-7d",
"expiration": "7d",
}])
package main
import (
"github.com/pulumi/pulumi-minio/sdk/go/minio"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
bucket, err := minio.NewS3Bucket(ctx, "bucket", &minio.S3BucketArgs{
Bucket: pulumi.String("bucket"),
})
if err != nil {
return err
}
_, err = minio.NewIlmPolicy(ctx, "bucket-lifecycle-rules", &minio.IlmPolicyArgs{
Bucket: bucket.Bucket,
Rules: minio.IlmPolicyRuleArray{
&minio.IlmPolicyRuleArgs{
Id: pulumi.String("expire-7d"),
Expiration: pulumi.String("7d"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Minio = Pulumi.Minio;
return await Deployment.RunAsync(() =>
{
var bucket = new Minio.S3Bucket("bucket", new()
{
Bucket = "bucket",
});
var bucket_lifecycle_rules = new Minio.IlmPolicy("bucket-lifecycle-rules", new()
{
Bucket = bucket.Bucket,
Rules = new[]
{
new Minio.Inputs.IlmPolicyRuleArgs
{
Id = "expire-7d",
Expiration = "7d",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.minio.S3Bucket;
import com.pulumi.minio.S3BucketArgs;
import com.pulumi.minio.IlmPolicy;
import com.pulumi.minio.IlmPolicyArgs;
import com.pulumi.minio.inputs.IlmPolicyRuleArgs;
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 bucket = new S3Bucket("bucket", S3BucketArgs.builder()
.bucket("bucket")
.build());
var bucket_lifecycle_rules = new IlmPolicy("bucket-lifecycle-rules", IlmPolicyArgs.builder()
.bucket(bucket.bucket())
.rules(IlmPolicyRuleArgs.builder()
.id("expire-7d")
.expiration("7d")
.build())
.build());
}
}
resources:
bucket:
type: minio:S3Bucket
properties:
bucket: bucket
bucket-lifecycle-rules:
type: minio:IlmPolicy
properties:
bucket: ${bucket.bucket}
rules:
- id: expire-7d
expiration: 7d
Create IlmPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IlmPolicy(name: string, args: IlmPolicyArgs, opts?: CustomResourceOptions);
@overload
def IlmPolicy(resource_name: str,
args: IlmPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def IlmPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
bucket: Optional[str] = None,
rules: Optional[Sequence[IlmPolicyRuleArgs]] = None)
func NewIlmPolicy(ctx *Context, name string, args IlmPolicyArgs, opts ...ResourceOption) (*IlmPolicy, error)
public IlmPolicy(string name, IlmPolicyArgs args, CustomResourceOptions? opts = null)
public IlmPolicy(String name, IlmPolicyArgs args)
public IlmPolicy(String name, IlmPolicyArgs args, CustomResourceOptions options)
type: minio:IlmPolicy
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. IlmPolicyArgs - 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. IlmPolicyArgs - 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. IlmPolicyArgs - 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. IlmPolicyArgs - 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. IlmPolicyArgs - 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 ilmPolicyResource = new Minio.IlmPolicy("ilmPolicyResource", new()
{
Bucket = "string",
Rules = new[]
{
new Minio.Inputs.IlmPolicyRuleArgs
{
Id = "string",
Expiration = "string",
Filter = "string",
NoncurrentVersionExpirationDays = 0,
Status = "string",
Tags =
{
{ "string", "string" },
},
},
},
});
example, err := minio.NewIlmPolicy(ctx, "ilmPolicyResource", &minio.IlmPolicyArgs{
Bucket: pulumi.String("string"),
Rules: minio.IlmPolicyRuleArray{
&minio.IlmPolicyRuleArgs{
Id: pulumi.String("string"),
Expiration: pulumi.String("string"),
Filter: pulumi.String("string"),
NoncurrentVersionExpirationDays: pulumi.Int(0),
Status: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
},
},
})
var ilmPolicyResource = new IlmPolicy("ilmPolicyResource", IlmPolicyArgs.builder()
.bucket("string")
.rules(IlmPolicyRuleArgs.builder()
.id("string")
.expiration("string")
.filter("string")
.noncurrentVersionExpirationDays(0)
.status("string")
.tags(Map.of("string", "string"))
.build())
.build());
ilm_policy_resource = minio.IlmPolicy("ilmPolicyResource",
bucket="string",
rules=[{
"id": "string",
"expiration": "string",
"filter": "string",
"noncurrent_version_expiration_days": 0,
"status": "string",
"tags": {
"string": "string",
},
}])
const ilmPolicyResource = new minio.IlmPolicy("ilmPolicyResource", {
bucket: "string",
rules: [{
id: "string",
expiration: "string",
filter: "string",
noncurrentVersionExpirationDays: 0,
status: "string",
tags: {
string: "string",
},
}],
});
type: minio:IlmPolicy
properties:
bucket: string
rules:
- expiration: string
filter: string
id: string
noncurrentVersionExpirationDays: 0
status: string
tags:
string: string
IlmPolicy 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 IlmPolicy resource accepts the following input properties:
- Bucket
This property is required. Changes to this property will trigger replacement.
- Rules
This property is required. List<IlmPolicy Rule>
- Bucket
This property is required. Changes to this property will trigger replacement.
- Rules
This property is required. []IlmPolicy Rule Args
- bucket
This property is required. Changes to this property will trigger replacement.
- rules
This property is required. List<IlmPolicy Rule>
- bucket
This property is required. Changes to this property will trigger replacement.
- rules
This property is required. IlmPolicy Rule[]
- bucket
This property is required. Changes to this property will trigger replacement.
- rules
This property is required. Sequence[IlmPolicy Rule Args]
- bucket
This property is required. Changes to this property will trigger replacement.
- rules
This property is required. List<Property Map>
Outputs
All input properties are implicitly available as output properties. Additionally, the IlmPolicy 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 IlmPolicy Resource
Get an existing IlmPolicy 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?: IlmPolicyState, opts?: CustomResourceOptions): IlmPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bucket: Optional[str] = None,
rules: Optional[Sequence[IlmPolicyRuleArgs]] = None) -> IlmPolicy
func GetIlmPolicy(ctx *Context, name string, id IDInput, state *IlmPolicyState, opts ...ResourceOption) (*IlmPolicy, error)
public static IlmPolicy Get(string name, Input<string> id, IlmPolicyState? state, CustomResourceOptions? opts = null)
public static IlmPolicy get(String name, Output<String> id, IlmPolicyState state, CustomResourceOptions options)
resources: _: type: minio:IlmPolicy 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.
- Bucket
Changes to this property will trigger replacement.
- Rules
List<Ilm
Policy Rule>
- Bucket
Changes to this property will trigger replacement.
- Rules
[]Ilm
Policy Rule Args
- bucket
Changes to this property will trigger replacement.
- rules
List<Ilm
Policy Rule>
- bucket
Changes to this property will trigger replacement.
- rules
Ilm
Policy Rule[]
- bucket
Changes to this property will trigger replacement.
- rules
Sequence[Ilm
Policy Rule Args]
- bucket
Changes to this property will trigger replacement.
- rules List<Property Map>
Supporting Types
IlmPolicyRule, IlmPolicyRuleArgs
- Id
This property is required. string - The ID of this resource.
- Expiration string
- Filter string
- Noncurrent
Version intExpiration Days - Status string
- Dictionary<string, string>
- Id
This property is required. string - The ID of this resource.
- Expiration string
- Filter string
- Noncurrent
Version intExpiration Days - Status string
- map[string]string
- id
This property is required. String - The ID of this resource.
- expiration String
- filter String
- noncurrent
Version IntegerExpiration Days - status String
- Map<String,String>
- id
This property is required. string - The ID of this resource.
- expiration string
- filter string
- noncurrent
Version numberExpiration Days - status string
- {[key: string]: string}
- id
This property is required. str - The ID of this resource.
- expiration str
- filter str
- noncurrent_
version_ intexpiration_ days - status str
- Mapping[str, str]
- id
This property is required. String - The ID of this resource.
- expiration String
- filter String
- noncurrent
Version NumberExpiration Days - status String
- Map<String>
Package Details
- Repository
- MinIO pulumi/pulumi-minio
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
minio
Terraform Provider.