Rule
Resource for managing an AWS RBin Rule.
Example Usage
Basic Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.rbin.Rule;
import com.pulumi.aws.rbin.RuleArgs;
import com.pulumi.aws.rbin.inputs.RuleResourceTagArgs;
import com.pulumi.aws.rbin.inputs.RuleRetentionPeriodArgs;
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 Rule("example", RuleArgs.builder()
.description("example_rule")
.resourceTags(RuleResourceTagArgs.builder()
.resourceTagKey("tag_key")
.resourceTagValue("tag_value")
.build())
.resourceType("EBS_SNAPSHOT")
.retentionPeriod(RuleRetentionPeriodArgs.builder()
.retentionPeriodUnit("DAYS")
.retentionPeriodValue(10)
.build())
.tags(Map.of("test_tag_key", "test_tag_value"))
.build());
}
}
Import
RBin Rule can be imported using the id
, e.g.,
$ pulumi import aws:rbin/rule:Rule example examplerule
Properties
The retention rule description.
Information about the retention rule lock configuration. See lock_configuration
below.
(Timestamp) The date and time at which the unlock delay is set to expire. Only returned for retention rules that have been unlocked and that are still within the unlock delay period.
Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. See resource_tags
below.
The resource type to be retained by the retention rule. Valid values are EBS_SNAPSHOT
and EC2_IMAGE
.
Information about the retention period for which the retention rule is to retain resources. See retention_period
below. The following arguments are optional: