aws.rbin.Rule
Explore with Pulumi AI
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 tag-level retention 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 tag-level retention 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/v7/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 tag-level retention 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 tag-level retention 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 tag-level retention 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 tag-level retention rule
resourceType: EBS_SNAPSHOT
resourceTags:
- resourceTagKey: tag_key
resourceTagValue: tag_value
retentionPeriod:
retentionPeriodValue: 10
retentionPeriodUnit: DAYS
tags:
test_tag_key: test_tag_value
Region-Level Retention Rule
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.rbin.Rule("example", {
description: "Example region-level retention rule with exclusion tags",
resourceType: "EC2_IMAGE",
excludeResourceTags: [{
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 region-level retention rule with exclusion tags",
resource_type="EC2_IMAGE",
exclude_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/v7/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 region-level retention rule with exclusion tags"),
ResourceType: pulumi.String("EC2_IMAGE"),
ExcludeResourceTags: rbin.RuleExcludeResourceTagArray{
&rbin.RuleExcludeResourceTagArgs{
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 region-level retention rule with exclusion tags",
ResourceType = "EC2_IMAGE",
ExcludeResourceTags = new[]
{
new Aws.Rbin.Inputs.RuleExcludeResourceTagArgs
{
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.RuleExcludeResourceTagArgs;
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 region-level retention rule with exclusion tags")
.resourceType("EC2_IMAGE")
.excludeResourceTags(RuleExcludeResourceTagArgs.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 region-level retention rule with exclusion tags
resourceType: EC2_IMAGE
excludeResourceTags:
- 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,
exclude_resource_tags: Optional[Sequence[RuleExcludeResourceTagArgs]] = None,
lock_configuration: Optional[RuleLockConfigurationArgs] = None,
region: Optional[str] = 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)
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",
ExcludeResourceTags = new[]
{
new Aws.Rbin.Inputs.RuleExcludeResourceTagArgs
{
ResourceTagKey = "string",
ResourceTagValue = "string",
},
},
LockConfiguration = new Aws.Rbin.Inputs.RuleLockConfigurationArgs
{
UnlockDelay = new Aws.Rbin.Inputs.RuleLockConfigurationUnlockDelayArgs
{
UnlockDelayUnit = "string",
UnlockDelayValue = 0,
},
},
Region = "string",
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"),
ExcludeResourceTags: rbin.RuleExcludeResourceTagArray{
&rbin.RuleExcludeResourceTagArgs{
ResourceTagKey: pulumi.String("string"),
ResourceTagValue: pulumi.String("string"),
},
},
LockConfiguration: &rbin.RuleLockConfigurationArgs{
UnlockDelay: &rbin.RuleLockConfigurationUnlockDelayArgs{
UnlockDelayUnit: pulumi.String("string"),
UnlockDelayValue: pulumi.Int(0),
},
},
Region: pulumi.String("string"),
ResourceTags: rbin.RuleResourceTagArray{
&rbin.RuleResourceTagArgs{
ResourceTagKey: pulumi.String("string"),
ResourceTagValue: pulumi.String("string"),
},
},
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var awsRuleResource = new com.pulumi.aws.rbin.Rule("awsRuleResource", com.pulumi.aws.rbin.RuleArgs.builder()
.resourceType("string")
.retentionPeriod(RuleRetentionPeriodArgs.builder()
.retentionPeriodUnit("string")
.retentionPeriodValue(0)
.build())
.description("string")
.excludeResourceTags(RuleExcludeResourceTagArgs.builder()
.resourceTagKey("string")
.resourceTagValue("string")
.build())
.lockConfiguration(RuleLockConfigurationArgs.builder()
.unlockDelay(RuleLockConfigurationUnlockDelayArgs.builder()
.unlockDelayUnit("string")
.unlockDelayValue(0)
.build())
.build())
.region("string")
.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",
exclude_resource_tags=[{
"resource_tag_key": "string",
"resource_tag_value": "string",
}],
lock_configuration={
"unlock_delay": {
"unlock_delay_unit": "string",
"unlock_delay_value": 0,
},
},
region="string",
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",
excludeResourceTags: [{
resourceTagKey: "string",
resourceTagValue: "string",
}],
lockConfiguration: {
unlockDelay: {
unlockDelayUnit: "string",
unlockDelayValue: 0,
},
},
region: "string",
resourceTags: [{
resourceTagKey: "string",
resourceTagValue: "string",
}],
tags: {
string: "string",
},
});
type: aws:rbin:Rule
properties:
description: string
excludeResourceTags:
- resourceTagKey: string
resourceTagValue: string
lockConfiguration:
unlockDelay:
unlockDelayUnit: string
unlockDelayValue: 0
region: string
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:
- Resource
Type string - Resource type to be retained by the retention rule. Valid values are
EBS_SNAPSHOT
andEC2_IMAGE
. - Retention
Period RuleRetention Period 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
- Retention rule description.
- List<Rule
Exclude Resource Tag> - Exclusion tags to use to identify resources that are to be excluded, or ignored, by a Region-level retention rule. See
exclude_resource_tags
below. - Lock
Configuration RuleLock Configuration - Information about the retention rule lock configuration. See
lock_configuration
below. - Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- List<Rule
Resource Tag> - Resource tags to use to identify resources that are to be retained by a tag-level retention rule. See
resource_tags
below. - Dictionary<string, string>
- Resource
Type string - Resource type to be retained by the retention rule. Valid values are
EBS_SNAPSHOT
andEC2_IMAGE
. - Retention
Period RuleRetention Period Args 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
- Retention rule description.
- []Rule
Exclude Resource Tag Args - Exclusion tags to use to identify resources that are to be excluded, or ignored, by a Region-level retention rule. See
exclude_resource_tags
below. - Lock
Configuration RuleLock Configuration Args - Information about the retention rule lock configuration. See
lock_configuration
below. - Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- []Rule
Resource Tag Args - Resource tags to use to identify resources that are to be retained by a tag-level retention rule. See
resource_tags
below. - map[string]string
- resource
Type String - Resource type to be retained by the retention rule. Valid values are
EBS_SNAPSHOT
andEC2_IMAGE
. - retention
Period RuleRetention Period 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
- Retention rule description.
- List<Rule
Exclude Resource Tag> - Exclusion tags to use to identify resources that are to be excluded, or ignored, by a Region-level retention rule. See
exclude_resource_tags
below. - lock
Configuration RuleLock Configuration - Information about the retention rule lock configuration. See
lock_configuration
below. - region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- List<Rule
Resource Tag> - Resource tags to use to identify resources that are to be retained by a tag-level retention rule. See
resource_tags
below. - Map<String,String>
- resource
Type string - Resource type to be retained by the retention rule. Valid values are
EBS_SNAPSHOT
andEC2_IMAGE
. - retention
Period RuleRetention Period 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
- Retention rule description.
- Rule
Exclude Resource Tag[] - Exclusion tags to use to identify resources that are to be excluded, or ignored, by a Region-level retention rule. See
exclude_resource_tags
below. - lock
Configuration RuleLock Configuration - Information about the retention rule lock configuration. See
lock_configuration
below. - region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Rule
Resource Tag[] - Resource tags to use to identify resources that are to be retained by a tag-level retention rule. See
resource_tags
below. - {[key: string]: string}
- resource_
type str - Resource type to be retained by the retention rule. Valid values are
EBS_SNAPSHOT
andEC2_IMAGE
. - retention_
period RuleRetention Period Args 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
- Retention rule description.
- Sequence[Rule
Exclude Resource Tag Args] - Exclusion tags to use to identify resources that are to be excluded, or ignored, by a Region-level retention rule. See
exclude_resource_tags
below. - lock_
configuration RuleLock Configuration Args - Information about the retention rule lock configuration. See
lock_configuration
below. - region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Sequence[Rule
Resource Tag Args] - Resource tags to use to identify resources that are to be retained by a tag-level retention rule. See
resource_tags
below. - Mapping[str, str]
- resource
Type String - Resource type to be retained by the retention rule. Valid values are
EBS_SNAPSHOT
andEC2_IMAGE
. - retention
Period 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
- Retention rule description.
- List<Property Map>
- Exclusion tags to use to identify resources that are to be excluded, or ignored, by a Region-level retention rule. See
exclude_resource_tags
below. - lock
Configuration Property Map - Information about the retention rule lock configuration. See
lock_configuration
below. - region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- List<Property Map>
- Resource tags to use to identify resources that are to be retained by a tag-level retention rule. See
resource_tags
below. - 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.
- Lock
End stringTime - (Timestamp) 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 string - (Optional) 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) State of the retention rule. Only retention rules that are in the
available
state retain resources. Valid values includepending
andavailable
. - Dictionary<string, string>
- Arn string
- Id string
- The provider-assigned unique ID for this managed resource.
- Lock
End stringTime - (Timestamp) 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 string - (Optional) 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) State of the retention rule. Only retention rules that are in the
available
state retain resources. Valid values includepending
andavailable
. - map[string]string
- arn String
- id String
- The provider-assigned unique ID for this managed resource.
- lock
End StringTime - (Timestamp) 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 String - (Optional) 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) State of the retention rule. Only retention rules that are in the
available
state retain resources. Valid values includepending
andavailable
. - Map<String,String>
- arn string
- id string
- The provider-assigned unique ID for this managed resource.
- lock
End stringTime - (Timestamp) 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 string - (Optional) 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) State of the retention rule. Only retention rules that are in the
available
state retain resources. Valid values includepending
andavailable
. - {[key: string]: string}
- arn str
- id str
- The provider-assigned unique ID for this managed resource.
- lock_
end_ strtime - (Timestamp) 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) 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) State of the retention rule. Only retention rules that are in the
available
state retain resources. Valid values includepending
andavailable
. - Mapping[str, str]
- arn String
- id String
- The provider-assigned unique ID for this managed resource.
- lock
End StringTime - (Timestamp) 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 String - (Optional) 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) State of the retention rule. Only retention rules that are in the
available
state retain resources. Valid values includepending
andavailable
. - Map<String>
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,
exclude_resource_tags: Optional[Sequence[RuleExcludeResourceTagArgs]] = None,
lock_configuration: Optional[RuleLockConfigurationArgs] = None,
lock_end_time: Optional[str] = None,
lock_state: Optional[str] = None,
region: 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)
resources: _: type: aws:rbin:Rule 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.
- Arn string
- Description string
- Retention rule description.
- List<Rule
Exclude Resource Tag> - Exclusion tags to use to identify resources that are to be excluded, or ignored, by a Region-level retention rule. See
exclude_resource_tags
below. - Lock
Configuration RuleLock Configuration - Information about the retention rule lock configuration. See
lock_configuration
below. - Lock
End stringTime - (Timestamp) 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 string - (Optional) 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
. - Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- List<Rule
Resource Tag> - Resource tags to use to identify resources that are to be retained by a tag-level retention rule. See
resource_tags
below. - Resource
Type string - Resource type to be retained by the retention rule. Valid values are
EBS_SNAPSHOT
andEC2_IMAGE
. - Retention
Period RuleRetention Period 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) State of the retention rule. Only retention rules that are in the
available
state retain resources. Valid values includepending
andavailable
. - Dictionary<string, string>
- Dictionary<string, string>
- Arn string
- Description string
- Retention rule description.
- []Rule
Exclude Resource Tag Args - Exclusion tags to use to identify resources that are to be excluded, or ignored, by a Region-level retention rule. See
exclude_resource_tags
below. - Lock
Configuration RuleLock Configuration Args - Information about the retention rule lock configuration. See
lock_configuration
below. - Lock
End stringTime - (Timestamp) 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 string - (Optional) 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
. - Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- []Rule
Resource Tag Args - Resource tags to use to identify resources that are to be retained by a tag-level retention rule. See
resource_tags
below. - Resource
Type string - Resource type to be retained by the retention rule. Valid values are
EBS_SNAPSHOT
andEC2_IMAGE
. - Retention
Period RuleRetention Period Args 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) State of the retention rule. Only retention rules that are in the
available
state retain resources. Valid values includepending
andavailable
. - map[string]string
- map[string]string
- arn String
- description String
- Retention rule description.
- List<Rule
Exclude Resource Tag> - Exclusion tags to use to identify resources that are to be excluded, or ignored, by a Region-level retention rule. See
exclude_resource_tags
below. - lock
Configuration RuleLock Configuration - Information about the retention rule lock configuration. See
lock_configuration
below. - lock
End StringTime - (Timestamp) 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 String - (Optional) 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
. - region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- List<Rule
Resource Tag> - Resource tags to use to identify resources that are to be retained by a tag-level retention rule. See
resource_tags
below. - resource
Type String - Resource type to be retained by the retention rule. Valid values are
EBS_SNAPSHOT
andEC2_IMAGE
. - retention
Period RuleRetention Period 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) State of the retention rule. Only retention rules that are in the
available
state retain resources. Valid values includepending
andavailable
. - Map<String,String>
- Map<String,String>
- arn string
- description string
- Retention rule description.
- Rule
Exclude Resource Tag[] - Exclusion tags to use to identify resources that are to be excluded, or ignored, by a Region-level retention rule. See
exclude_resource_tags
below. - lock
Configuration RuleLock Configuration - Information about the retention rule lock configuration. See
lock_configuration
below. - lock
End stringTime - (Timestamp) 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 string - (Optional) 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
. - region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Rule
Resource Tag[] - Resource tags to use to identify resources that are to be retained by a tag-level retention rule. See
resource_tags
below. - resource
Type string - Resource type to be retained by the retention rule. Valid values are
EBS_SNAPSHOT
andEC2_IMAGE
. - retention
Period RuleRetention Period 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) State of the retention rule. Only retention rules that are in the
available
state retain resources. Valid values includepending
andavailable
. - {[key: string]: string}
- {[key: string]: string}
- arn str
- description str
- Retention rule description.
- Sequence[Rule
Exclude Resource Tag Args] - Exclusion tags to use to identify resources that are to be excluded, or ignored, by a Region-level retention rule. See
exclude_resource_tags
below. - lock_
configuration RuleLock Configuration Args - Information about the retention rule lock configuration. See
lock_configuration
below. - lock_
end_ strtime - (Timestamp) 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) 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
. - region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Sequence[Rule
Resource Tag Args] - 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 - Resource type to be retained by the retention rule. Valid values are
EBS_SNAPSHOT
andEC2_IMAGE
. - retention_
period RuleRetention Period Args 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) State of the retention rule. Only retention rules that are in the
available
state retain resources. Valid values includepending
andavailable
. - Mapping[str, str]
- Mapping[str, str]
- arn String
- description String
- Retention rule description.
- List<Property Map>
- Exclusion tags to use to identify resources that are to be excluded, or ignored, by a Region-level retention rule. See
exclude_resource_tags
below. - lock
Configuration Property Map - Information about the retention rule lock configuration. See
lock_configuration
below. - lock
End StringTime - (Timestamp) 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 String - (Optional) 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
. - region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- List<Property Map>
- Resource tags to use to identify resources that are to be retained by a tag-level retention rule. See
resource_tags
below. - resource
Type String - Resource type to be retained by the retention rule. Valid values are
EBS_SNAPSHOT
andEC2_IMAGE
. - retention
Period 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) State of the retention rule. Only retention rules that are in the
available
state retain resources. Valid values includepending
andavailable
. - Map<String>
- Map<String>
Supporting Types
RuleExcludeResourceTag, RuleExcludeResourceTagArgs
- Resource
Tag stringKey Tag key.
The following argument is optional:
- Resource
Tag stringValue - Tag value.
- Resource
Tag stringKey Tag key.
The following argument is optional:
- Resource
Tag stringValue - Tag value.
- resource
Tag StringKey Tag key.
The following argument is optional:
- resource
Tag StringValue - Tag value.
- resource
Tag stringKey Tag key.
The following argument is optional:
- resource
Tag stringValue - Tag value.
- resource_
tag_ strkey Tag key.
The following argument is optional:
- resource_
tag_ strvalue - Tag value.
- resource
Tag StringKey Tag key.
The following argument is optional:
- resource
Tag StringValue - Tag value.
RuleLockConfiguration, RuleLockConfigurationArgs
- Unlock
Delay RuleLock Configuration Unlock Delay - Information about the retention rule unlock delay. See
unlock_delay
below.
- Unlock
Delay RuleLock Configuration Unlock Delay - Information about the retention rule unlock delay. See
unlock_delay
below.
- unlock
Delay RuleLock Configuration Unlock Delay - Information about the retention rule unlock delay. See
unlock_delay
below.
- unlock
Delay RuleLock Configuration Unlock Delay - Information about the retention rule unlock delay. See
unlock_delay
below.
- unlock_
delay RuleLock Configuration Unlock Delay - Information about the retention rule unlock delay. See
unlock_delay
below.
- unlock
Delay Property Map - Information about the retention rule unlock delay. See
unlock_delay
below.
RuleLockConfigurationUnlockDelay, RuleLockConfigurationUnlockDelayArgs
- Unlock
Delay stringUnit - Unit of time in which to measure the unlock delay. Currently, the unlock delay can be measure only in days.
- Unlock
Delay intValue - Unlock delay period, measured in the unit specified for UnlockDelayUnit.
- Unlock
Delay stringUnit - Unit of time in which to measure the unlock delay. Currently, the unlock delay can be measure only in days.
- Unlock
Delay intValue - Unlock delay period, measured in the unit specified for UnlockDelayUnit.
- unlock
Delay StringUnit - Unit of time in which to measure the unlock delay. Currently, the unlock delay can be measure only in days.
- unlock
Delay IntegerValue - Unlock delay period, measured in the unit specified for UnlockDelayUnit.
- unlock
Delay stringUnit - Unit of time in which to measure the unlock delay. Currently, the unlock delay can be measure only in days.
- unlock
Delay numberValue - Unlock delay period, measured in the unit specified for UnlockDelayUnit.
- unlock_
delay_ strunit - Unit of time in which to measure the unlock delay. Currently, the unlock delay can be measure only in days.
- unlock_
delay_ intvalue - Unlock delay period, measured in the unit specified for UnlockDelayUnit.
- unlock
Delay StringUnit - Unit of time in which to measure the unlock delay. Currently, the unlock delay can be measure only in days.
- unlock
Delay NumberValue - Unlock delay period, measured in the unit specified for UnlockDelayUnit.
RuleResourceTag, RuleResourceTagArgs
- Resource
Tag stringKey Tag key.
The following argument is optional:
- Resource
Tag stringValue - Tag value.
- Resource
Tag stringKey Tag key.
The following argument is optional:
- Resource
Tag stringValue - Tag value.
- resource
Tag StringKey Tag key.
The following argument is optional:
- resource
Tag StringValue - Tag value.
- resource
Tag stringKey Tag key.
The following argument is optional:
- resource
Tag stringValue - Tag value.
- resource_
tag_ strkey Tag key.
The following argument is optional:
- resource_
tag_ strvalue - Tag value.
- resource
Tag StringKey Tag key.
The following argument is optional:
- resource
Tag StringValue - Tag value.
RuleRetentionPeriod, RuleRetentionPeriodArgs
- Retention
Period stringUnit - Unit of time in which the retention period is measured. Currently, only DAYS is supported.
- Retention
Period intValue - Period value for which the retention rule is to retain resources. The period is measured using the unit specified for RetentionPeriodUnit.
- Retention
Period stringUnit - Unit of time in which the retention period is measured. Currently, only DAYS is supported.
- Retention
Period intValue - Period value for which the retention rule is to retain resources. The period is measured using the unit specified for RetentionPeriodUnit.
- retention
Period StringUnit - Unit of time in which the retention period is measured. Currently, only DAYS is supported.
- retention
Period IntegerValue - Period value for which the retention rule is to retain resources. The period is measured using the unit specified for RetentionPeriodUnit.
- retention
Period stringUnit - Unit of time in which the retention period is measured. Currently, only DAYS is supported.
- retention
Period numberValue - Period value for which the retention rule is to retain resources. The period is measured using the unit specified for RetentionPeriodUnit.
- retention_
period_ strunit - Unit of time in which the retention period is measured. Currently, only DAYS is supported.
- retention_
period_ intvalue - Period value for which the retention rule is to retain resources. The period is measured using the unit specified for RetentionPeriodUnit.
- retention
Period StringUnit - Unit of time in which the retention period is measured. Currently, only DAYS is supported.
- retention
Period NumberValue - 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.