1. Packages
  2. AWS
  3. API Docs
  4. rbin
  5. Rule
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.rbin.Rule

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Resource for managing an AWS RBin Rule.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.rbin.Rule("example", {
        description: "example_rule",
        resourceType: "EBS_SNAPSHOT",
        resourceTags: [{
            resourceTagKey: "tag_key",
            resourceTagValue: "tag_value",
        }],
        retentionPeriod: {
            retentionPeriodValue: 10,
            retentionPeriodUnit: "DAYS",
        },
        tags: {
            test_tag_key: "test_tag_value",
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.rbin.Rule("example",
        description="example_rule",
        resource_type="EBS_SNAPSHOT",
        resource_tags=[{
            "resource_tag_key": "tag_key",
            "resource_tag_value": "tag_value",
        }],
        retention_period={
            "retention_period_value": 10,
            "retention_period_unit": "DAYS",
        },
        tags={
            "test_tag_key": "test_tag_value",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rbin"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := rbin.NewRule(ctx, "example", &rbin.RuleArgs{
    			Description:  pulumi.String("example_rule"),
    			ResourceType: pulumi.String("EBS_SNAPSHOT"),
    			ResourceTags: rbin.RuleResourceTagArray{
    				&rbin.RuleResourceTagArgs{
    					ResourceTagKey:   pulumi.String("tag_key"),
    					ResourceTagValue: pulumi.String("tag_value"),
    				},
    			},
    			RetentionPeriod: &rbin.RuleRetentionPeriodArgs{
    				RetentionPeriodValue: pulumi.Int(10),
    				RetentionPeriodUnit:  pulumi.String("DAYS"),
    			},
    			Tags: pulumi.StringMap{
    				"test_tag_key": pulumi.String("test_tag_value"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Rbin.Rule("example", new()
        {
            Description = "example_rule",
            ResourceType = "EBS_SNAPSHOT",
            ResourceTags = new[]
            {
                new Aws.Rbin.Inputs.RuleResourceTagArgs
                {
                    ResourceTagKey = "tag_key",
                    ResourceTagValue = "tag_value",
                },
            },
            RetentionPeriod = new Aws.Rbin.Inputs.RuleRetentionPeriodArgs
            {
                RetentionPeriodValue = 10,
                RetentionPeriodUnit = "DAYS",
            },
            Tags = 
            {
                { "test_tag_key", "test_tag_value" },
            },
        });
    
    });
    
    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")
                .resourceType("EBS_SNAPSHOT")
                .resourceTags(RuleResourceTagArgs.builder()
                    .resourceTagKey("tag_key")
                    .resourceTagValue("tag_value")
                    .build())
                .retentionPeriod(RuleRetentionPeriodArgs.builder()
                    .retentionPeriodValue(10)
                    .retentionPeriodUnit("DAYS")
                    .build())
                .tags(Map.of("test_tag_key", "test_tag_value"))
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:rbin:Rule
        properties:
          description: example_rule
          resourceType: EBS_SNAPSHOT
          resourceTags:
            - resourceTagKey: tag_key
              resourceTagValue: tag_value
          retentionPeriod:
            retentionPeriodValue: 10
            retentionPeriodUnit: DAYS
          tags:
            test_tag_key: test_tag_value
    

    Create Rule Resource

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

    Constructor syntax

    new Rule(name: string, args: RuleArgs, opts?: CustomResourceOptions);
    @overload
    def Rule(resource_name: str,
             args: RuleArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Rule(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             resource_type: Optional[str] = None,
             retention_period: Optional[RuleRetentionPeriodArgs] = None,
             description: Optional[str] = None,
             lock_configuration: Optional[RuleLockConfigurationArgs] = None,
             resource_tags: Optional[Sequence[RuleResourceTagArgs]] = None,
             tags: Optional[Mapping[str, str]] = None)
    func NewRule(ctx *Context, name string, args RuleArgs, opts ...ResourceOption) (*Rule, error)
    public Rule(string name, RuleArgs args, CustomResourceOptions? opts = null)
    public Rule(String name, RuleArgs args)
    public Rule(String name, RuleArgs args, CustomResourceOptions options)
    
    type: aws:rbin:Rule
    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 RuleArgs
    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 RuleArgs
    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 RuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RuleArgs
    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 awsRuleResource = new Aws.Rbin.Rule("awsRuleResource", new()
    {
        ResourceType = "string",
        RetentionPeriod = new Aws.Rbin.Inputs.RuleRetentionPeriodArgs
        {
            RetentionPeriodUnit = "string",
            RetentionPeriodValue = 0,
        },
        Description = "string",
        LockConfiguration = new Aws.Rbin.Inputs.RuleLockConfigurationArgs
        {
            UnlockDelay = new Aws.Rbin.Inputs.RuleLockConfigurationUnlockDelayArgs
            {
                UnlockDelayUnit = "string",
                UnlockDelayValue = 0,
            },
        },
        ResourceTags = new[]
        {
            new Aws.Rbin.Inputs.RuleResourceTagArgs
            {
                ResourceTagKey = "string",
                ResourceTagValue = "string",
            },
        },
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := rbin.NewRule(ctx, "awsRuleResource", &rbin.RuleArgs{
    	ResourceType: pulumi.String("string"),
    	RetentionPeriod: &rbin.RuleRetentionPeriodArgs{
    		RetentionPeriodUnit:  pulumi.String("string"),
    		RetentionPeriodValue: pulumi.Int(0),
    	},
    	Description: pulumi.String("string"),
    	LockConfiguration: &rbin.RuleLockConfigurationArgs{
    		UnlockDelay: &rbin.RuleLockConfigurationUnlockDelayArgs{
    			UnlockDelayUnit:  pulumi.String("string"),
    			UnlockDelayValue: pulumi.Int(0),
    		},
    	},
    	ResourceTags: rbin.RuleResourceTagArray{
    		&rbin.RuleResourceTagArgs{
    			ResourceTagKey:   pulumi.String("string"),
    			ResourceTagValue: pulumi.String("string"),
    		},
    	},
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var awsRuleResource = new Rule("awsRuleResource", RuleArgs.builder()
        .resourceType("string")
        .retentionPeriod(RuleRetentionPeriodArgs.builder()
            .retentionPeriodUnit("string")
            .retentionPeriodValue(0)
            .build())
        .description("string")
        .lockConfiguration(RuleLockConfigurationArgs.builder()
            .unlockDelay(RuleLockConfigurationUnlockDelayArgs.builder()
                .unlockDelayUnit("string")
                .unlockDelayValue(0)
                .build())
            .build())
        .resourceTags(RuleResourceTagArgs.builder()
            .resourceTagKey("string")
            .resourceTagValue("string")
            .build())
        .tags(Map.of("string", "string"))
        .build());
    
    aws_rule_resource = aws.rbin.Rule("awsRuleResource",
        resource_type="string",
        retention_period={
            "retention_period_unit": "string",
            "retention_period_value": 0,
        },
        description="string",
        lock_configuration={
            "unlock_delay": {
                "unlock_delay_unit": "string",
                "unlock_delay_value": 0,
            },
        },
        resource_tags=[{
            "resource_tag_key": "string",
            "resource_tag_value": "string",
        }],
        tags={
            "string": "string",
        })
    
    const awsRuleResource = new aws.rbin.Rule("awsRuleResource", {
        resourceType: "string",
        retentionPeriod: {
            retentionPeriodUnit: "string",
            retentionPeriodValue: 0,
        },
        description: "string",
        lockConfiguration: {
            unlockDelay: {
                unlockDelayUnit: "string",
                unlockDelayValue: 0,
            },
        },
        resourceTags: [{
            resourceTagKey: "string",
            resourceTagValue: "string",
        }],
        tags: {
            string: "string",
        },
    });
    
    type: aws:rbin:Rule
    properties:
        description: string
        lockConfiguration:
            unlockDelay:
                unlockDelayUnit: string
                unlockDelayValue: 0
        resourceTags:
            - resourceTagKey: string
              resourceTagValue: string
        resourceType: string
        retentionPeriod:
            retentionPeriodUnit: string
            retentionPeriodValue: 0
        tags:
            string: string
    

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

    ResourceType string
    The resource type to be retained by the retention rule. Valid values are EBS_SNAPSHOT and EC2_IMAGE.
    RetentionPeriod RuleRetentionPeriod

    Information about the retention period for which the retention rule is to retain resources. See retention_period below.

    The following arguments are optional:

    Description string
    The retention rule description.
    LockConfiguration RuleLockConfiguration
    Information about the retention rule lock configuration. See lock_configuration below.
    ResourceTags List<RuleResourceTag>
    Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. See resource_tags below.
    Tags Dictionary<string, string>
    ResourceType string
    The resource type to be retained by the retention rule. Valid values are EBS_SNAPSHOT and EC2_IMAGE.
    RetentionPeriod RuleRetentionPeriodArgs

    Information about the retention period for which the retention rule is to retain resources. See retention_period below.

    The following arguments are optional:

    Description string
    The retention rule description.
    LockConfiguration RuleLockConfigurationArgs
    Information about the retention rule lock configuration. See lock_configuration below.
    ResourceTags []RuleResourceTagArgs
    Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. See resource_tags below.
    Tags map[string]string
    resourceType String
    The resource type to be retained by the retention rule. Valid values are EBS_SNAPSHOT and EC2_IMAGE.
    retentionPeriod RuleRetentionPeriod

    Information about the retention period for which the retention rule is to retain resources. See retention_period below.

    The following arguments are optional:

    description String
    The retention rule description.
    lockConfiguration RuleLockConfiguration
    Information about the retention rule lock configuration. See lock_configuration below.
    resourceTags List<RuleResourceTag>
    Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. See resource_tags below.
    tags Map<String,String>
    resourceType string
    The resource type to be retained by the retention rule. Valid values are EBS_SNAPSHOT and EC2_IMAGE.
    retentionPeriod RuleRetentionPeriod

    Information about the retention period for which the retention rule is to retain resources. See retention_period below.

    The following arguments are optional:

    description string
    The retention rule description.
    lockConfiguration RuleLockConfiguration
    Information about the retention rule lock configuration. See lock_configuration below.
    resourceTags RuleResourceTag[]
    Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. See resource_tags below.
    tags {[key: string]: string}
    resource_type str
    The resource type to be retained by the retention rule. Valid values are EBS_SNAPSHOT and EC2_IMAGE.
    retention_period RuleRetentionPeriodArgs

    Information about the retention period for which the retention rule is to retain resources. See retention_period below.

    The following arguments are optional:

    description str
    The retention rule description.
    lock_configuration RuleLockConfigurationArgs
    Information about the retention rule lock configuration. See lock_configuration below.
    resource_tags Sequence[RuleResourceTagArgs]
    Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. See resource_tags below.
    tags Mapping[str, str]
    resourceType String
    The resource type to be retained by the retention rule. Valid values are EBS_SNAPSHOT and EC2_IMAGE.
    retentionPeriod Property Map

    Information about the retention period for which the retention rule is to retain resources. See retention_period below.

    The following arguments are optional:

    description String
    The retention rule description.
    lockConfiguration Property Map
    Information about the retention rule lock configuration. See lock_configuration below.
    resourceTags List<Property Map>
    Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. See resource_tags below.
    tags Map<String>

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Rule resource produces the following output properties:

    Arn string
    Id string
    The provider-assigned unique ID for this managed resource.
    LockEndTime string
    (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.
    LockState string
    (Optional) The lock state of the retention rules to list. Only retention rules with the specified lock state are returned. Valid values are locked, pending_unlock, unlocked.
    Status string
    (String) The state of the retention rule. Only retention rules that are in the available state retain resources. Valid values include pending and available.
    TagsAll Dictionary<string, string>

    Deprecated: Please use tags instead.

    Arn string
    Id string
    The provider-assigned unique ID for this managed resource.
    LockEndTime string
    (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.
    LockState string
    (Optional) The lock state of the retention rules to list. Only retention rules with the specified lock state are returned. Valid values are locked, pending_unlock, unlocked.
    Status string
    (String) The state of the retention rule. Only retention rules that are in the available state retain resources. Valid values include pending and available.
    TagsAll map[string]string

    Deprecated: Please use tags instead.

    arn String
    id String
    The provider-assigned unique ID for this managed resource.
    lockEndTime String
    (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.
    lockState String
    (Optional) The lock state of the retention rules to list. Only retention rules with the specified lock state are returned. Valid values are locked, pending_unlock, unlocked.
    status String
    (String) The state of the retention rule. Only retention rules that are in the available state retain resources. Valid values include pending and available.
    tagsAll Map<String,String>

    Deprecated: Please use tags instead.

    arn string
    id string
    The provider-assigned unique ID for this managed resource.
    lockEndTime string
    (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.
    lockState string
    (Optional) The lock state of the retention rules to list. Only retention rules with the specified lock state are returned. Valid values are locked, pending_unlock, unlocked.
    status string
    (String) The state of the retention rule. Only retention rules that are in the available state retain resources. Valid values include pending and available.
    tagsAll {[key: string]: string}

    Deprecated: Please use tags instead.

    arn str
    id str
    The provider-assigned unique ID for this managed resource.
    lock_end_time str
    (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.
    lock_state str
    (Optional) The lock state of the retention rules to list. Only retention rules with the specified lock state are returned. Valid values are locked, pending_unlock, unlocked.
    status str
    (String) The state of the retention rule. Only retention rules that are in the available state retain resources. Valid values include pending and available.
    tags_all Mapping[str, str]

    Deprecated: Please use tags instead.

    arn String
    id String
    The provider-assigned unique ID for this managed resource.
    lockEndTime String
    (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.
    lockState String
    (Optional) The lock state of the retention rules to list. Only retention rules with the specified lock state are returned. Valid values are locked, pending_unlock, unlocked.
    status String
    (String) The state of the retention rule. Only retention rules that are in the available state retain resources. Valid values include pending and available.
    tagsAll Map<String>

    Deprecated: Please use tags instead.

    Look up Existing Rule Resource

    Get an existing Rule 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?: RuleState, opts?: CustomResourceOptions): Rule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            description: Optional[str] = None,
            lock_configuration: Optional[RuleLockConfigurationArgs] = None,
            lock_end_time: Optional[str] = None,
            lock_state: Optional[str] = None,
            resource_tags: Optional[Sequence[RuleResourceTagArgs]] = None,
            resource_type: Optional[str] = None,
            retention_period: Optional[RuleRetentionPeriodArgs] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None) -> Rule
    func GetRule(ctx *Context, name string, id IDInput, state *RuleState, opts ...ResourceOption) (*Rule, error)
    public static Rule Get(string name, Input<string> id, RuleState? state, CustomResourceOptions? opts = null)
    public static Rule get(String name, Output<String> id, RuleState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Arn string
    Description string
    The retention rule description.
    LockConfiguration RuleLockConfiguration
    Information about the retention rule lock configuration. See lock_configuration below.
    LockEndTime string
    (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.
    LockState string
    (Optional) The lock state of the retention rules to list. Only retention rules with the specified lock state are returned. Valid values are locked, pending_unlock, unlocked.
    ResourceTags List<RuleResourceTag>
    Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. See resource_tags below.
    ResourceType string
    The resource type to be retained by the retention rule. Valid values are EBS_SNAPSHOT and EC2_IMAGE.
    RetentionPeriod RuleRetentionPeriod

    Information about the retention period for which the retention rule is to retain resources. See retention_period below.

    The following arguments are optional:

    Status string
    (String) The state of the retention rule. Only retention rules that are in the available state retain resources. Valid values include pending and available.
    Tags Dictionary<string, string>
    TagsAll Dictionary<string, string>

    Deprecated: Please use tags instead.

    Arn string
    Description string
    The retention rule description.
    LockConfiguration RuleLockConfigurationArgs
    Information about the retention rule lock configuration. See lock_configuration below.
    LockEndTime string
    (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.
    LockState string
    (Optional) The lock state of the retention rules to list. Only retention rules with the specified lock state are returned. Valid values are locked, pending_unlock, unlocked.
    ResourceTags []RuleResourceTagArgs
    Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. See resource_tags below.
    ResourceType string
    The resource type to be retained by the retention rule. Valid values are EBS_SNAPSHOT and EC2_IMAGE.
    RetentionPeriod RuleRetentionPeriodArgs

    Information about the retention period for which the retention rule is to retain resources. See retention_period below.

    The following arguments are optional:

    Status string
    (String) The state of the retention rule. Only retention rules that are in the available state retain resources. Valid values include pending and available.
    Tags map[string]string
    TagsAll map[string]string

    Deprecated: Please use tags instead.

    arn String
    description String
    The retention rule description.
    lockConfiguration RuleLockConfiguration
    Information about the retention rule lock configuration. See lock_configuration below.
    lockEndTime String
    (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.
    lockState String
    (Optional) The lock state of the retention rules to list. Only retention rules with the specified lock state are returned. Valid values are locked, pending_unlock, unlocked.
    resourceTags List<RuleResourceTag>
    Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. See resource_tags below.
    resourceType String
    The resource type to be retained by the retention rule. Valid values are EBS_SNAPSHOT and EC2_IMAGE.
    retentionPeriod RuleRetentionPeriod

    Information about the retention period for which the retention rule is to retain resources. See retention_period below.

    The following arguments are optional:

    status String
    (String) The state of the retention rule. Only retention rules that are in the available state retain resources. Valid values include pending and available.
    tags Map<String,String>
    tagsAll Map<String,String>

    Deprecated: Please use tags instead.

    arn string
    description string
    The retention rule description.
    lockConfiguration RuleLockConfiguration
    Information about the retention rule lock configuration. See lock_configuration below.
    lockEndTime string
    (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.
    lockState string
    (Optional) The lock state of the retention rules to list. Only retention rules with the specified lock state are returned. Valid values are locked, pending_unlock, unlocked.
    resourceTags RuleResourceTag[]
    Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. See resource_tags below.
    resourceType string
    The resource type to be retained by the retention rule. Valid values are EBS_SNAPSHOT and EC2_IMAGE.
    retentionPeriod RuleRetentionPeriod

    Information about the retention period for which the retention rule is to retain resources. See retention_period below.

    The following arguments are optional:

    status string
    (String) The state of the retention rule. Only retention rules that are in the available state retain resources. Valid values include pending and available.
    tags {[key: string]: string}
    tagsAll {[key: string]: string}

    Deprecated: Please use tags instead.

    arn str
    description str
    The retention rule description.
    lock_configuration RuleLockConfigurationArgs
    Information about the retention rule lock configuration. See lock_configuration below.
    lock_end_time str
    (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.
    lock_state str
    (Optional) The lock state of the retention rules to list. Only retention rules with the specified lock state are returned. Valid values are locked, pending_unlock, unlocked.
    resource_tags Sequence[RuleResourceTagArgs]
    Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. See resource_tags below.
    resource_type str
    The resource type to be retained by the retention rule. Valid values are EBS_SNAPSHOT and EC2_IMAGE.
    retention_period RuleRetentionPeriodArgs

    Information about the retention period for which the retention rule is to retain resources. See retention_period below.

    The following arguments are optional:

    status str
    (String) The state of the retention rule. Only retention rules that are in the available state retain resources. Valid values include pending and available.
    tags Mapping[str, str]
    tags_all Mapping[str, str]

    Deprecated: Please use tags instead.

    arn String
    description String
    The retention rule description.
    lockConfiguration Property Map
    Information about the retention rule lock configuration. See lock_configuration below.
    lockEndTime String
    (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.
    lockState String
    (Optional) The lock state of the retention rules to list. Only retention rules with the specified lock state are returned. Valid values are locked, pending_unlock, unlocked.
    resourceTags List<Property Map>
    Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. See resource_tags below.
    resourceType String
    The resource type to be retained by the retention rule. Valid values are EBS_SNAPSHOT and EC2_IMAGE.
    retentionPeriod Property Map

    Information about the retention period for which the retention rule is to retain resources. See retention_period below.

    The following arguments are optional:

    status String
    (String) The state of the retention rule. Only retention rules that are in the available state retain resources. Valid values include pending and available.
    tags Map<String>
    tagsAll Map<String>

    Deprecated: Please use tags instead.

    Supporting Types

    RuleLockConfiguration, RuleLockConfigurationArgs

    UnlockDelay RuleLockConfigurationUnlockDelay
    Information about the retention rule unlock delay. See unlock_delay below.
    UnlockDelay RuleLockConfigurationUnlockDelay
    Information about the retention rule unlock delay. See unlock_delay below.
    unlockDelay RuleLockConfigurationUnlockDelay
    Information about the retention rule unlock delay. See unlock_delay below.
    unlockDelay RuleLockConfigurationUnlockDelay
    Information about the retention rule unlock delay. See unlock_delay below.
    unlock_delay RuleLockConfigurationUnlockDelay
    Information about the retention rule unlock delay. See unlock_delay below.
    unlockDelay Property Map
    Information about the retention rule unlock delay. See unlock_delay below.

    RuleLockConfigurationUnlockDelay, RuleLockConfigurationUnlockDelayArgs

    UnlockDelayUnit string
    The unit of time in which to measure the unlock delay. Currently, the unlock delay can be measure only in days.
    UnlockDelayValue int
    The unlock delay period, measured in the unit specified for UnlockDelayUnit.
    UnlockDelayUnit string
    The unit of time in which to measure the unlock delay. Currently, the unlock delay can be measure only in days.
    UnlockDelayValue int
    The unlock delay period, measured in the unit specified for UnlockDelayUnit.
    unlockDelayUnit String
    The unit of time in which to measure the unlock delay. Currently, the unlock delay can be measure only in days.
    unlockDelayValue Integer
    The unlock delay period, measured in the unit specified for UnlockDelayUnit.
    unlockDelayUnit string
    The unit of time in which to measure the unlock delay. Currently, the unlock delay can be measure only in days.
    unlockDelayValue number
    The unlock delay period, measured in the unit specified for UnlockDelayUnit.
    unlock_delay_unit str
    The unit of time in which to measure the unlock delay. Currently, the unlock delay can be measure only in days.
    unlock_delay_value int
    The unlock delay period, measured in the unit specified for UnlockDelayUnit.
    unlockDelayUnit String
    The unit of time in which to measure the unlock delay. Currently, the unlock delay can be measure only in days.
    unlockDelayValue Number
    The unlock delay period, measured in the unit specified for UnlockDelayUnit.

    RuleResourceTag, RuleResourceTagArgs

    ResourceTagKey string

    The tag key.

    The following argument is optional:

    ResourceTagValue string
    The tag value.
    ResourceTagKey string

    The tag key.

    The following argument is optional:

    ResourceTagValue string
    The tag value.
    resourceTagKey String

    The tag key.

    The following argument is optional:

    resourceTagValue String
    The tag value.
    resourceTagKey string

    The tag key.

    The following argument is optional:

    resourceTagValue string
    The tag value.
    resource_tag_key str

    The tag key.

    The following argument is optional:

    resource_tag_value str
    The tag value.
    resourceTagKey String

    The tag key.

    The following argument is optional:

    resourceTagValue String
    The tag value.

    RuleRetentionPeriod, RuleRetentionPeriodArgs

    RetentionPeriodUnit string
    The unit of time in which the retention period is measured. Currently, only DAYS is supported.
    RetentionPeriodValue int
    The period value for which the retention rule is to retain resources. The period is measured using the unit specified for RetentionPeriodUnit.
    RetentionPeriodUnit string
    The unit of time in which the retention period is measured. Currently, only DAYS is supported.
    RetentionPeriodValue int
    The period value for which the retention rule is to retain resources. The period is measured using the unit specified for RetentionPeriodUnit.
    retentionPeriodUnit String
    The unit of time in which the retention period is measured. Currently, only DAYS is supported.
    retentionPeriodValue Integer
    The period value for which the retention rule is to retain resources. The period is measured using the unit specified for RetentionPeriodUnit.
    retentionPeriodUnit string
    The unit of time in which the retention period is measured. Currently, only DAYS is supported.
    retentionPeriodValue number
    The period value for which the retention rule is to retain resources. The period is measured using the unit specified for RetentionPeriodUnit.
    retention_period_unit str
    The unit of time in which the retention period is measured. Currently, only DAYS is supported.
    retention_period_value int
    The period value for which the retention rule is to retain resources. The period is measured using the unit specified for RetentionPeriodUnit.
    retentionPeriodUnit String
    The unit of time in which the retention period is measured. Currently, only DAYS is supported.
    retentionPeriodValue Number
    The period value for which the retention rule is to retain resources. The period is measured using the unit specified for RetentionPeriodUnit.

    Import

    Using pulumi import, import RBin Rule using the id. For example:

    $ pulumi import aws:rbin/rule:Rule example examplerule
    

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

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi