aws.cfg.RetentionConfiguration
Explore with Pulumi AI
Provides a resource to manage the AWS Config retention configuration. The retention configuration defines the number of days that AWS Config stores historical information.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.cfg.RetentionConfiguration("example", {retentionPeriodInDays: 90});
import pulumi
import pulumi_aws as aws
example = aws.cfg.RetentionConfiguration("example", retention_period_in_days=90)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cfg"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cfg.NewRetentionConfiguration(ctx, "example", &cfg.RetentionConfigurationArgs{
RetentionPeriodInDays: pulumi.Int(90),
})
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.Cfg.RetentionConfiguration("example", new()
{
RetentionPeriodInDays = 90,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cfg.RetentionConfiguration;
import com.pulumi.aws.cfg.RetentionConfigurationArgs;
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 RetentionConfiguration("example", RetentionConfigurationArgs.builder()
.retentionPeriodInDays(90)
.build());
}
}
resources:
example:
type: aws:cfg:RetentionConfiguration
properties:
retentionPeriodInDays: 90
Create RetentionConfiguration Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RetentionConfiguration(name: string, args: RetentionConfigurationArgs, opts?: CustomResourceOptions);
@overload
def RetentionConfiguration(resource_name: str,
args: RetentionConfigurationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RetentionConfiguration(resource_name: str,
opts: Optional[ResourceOptions] = None,
retention_period_in_days: Optional[int] = None)
func NewRetentionConfiguration(ctx *Context, name string, args RetentionConfigurationArgs, opts ...ResourceOption) (*RetentionConfiguration, error)
public RetentionConfiguration(string name, RetentionConfigurationArgs args, CustomResourceOptions? opts = null)
public RetentionConfiguration(String name, RetentionConfigurationArgs args)
public RetentionConfiguration(String name, RetentionConfigurationArgs args, CustomResourceOptions options)
type: aws:cfg:RetentionConfiguration
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 RetentionConfigurationArgs
- 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 RetentionConfigurationArgs
- 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 RetentionConfigurationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RetentionConfigurationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RetentionConfigurationArgs
- 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 retentionConfigurationResource = new Aws.Cfg.RetentionConfiguration("retentionConfigurationResource", new()
{
RetentionPeriodInDays = 0,
});
example, err := cfg.NewRetentionConfiguration(ctx, "retentionConfigurationResource", &cfg.RetentionConfigurationArgs{
RetentionPeriodInDays: pulumi.Int(0),
})
var retentionConfigurationResource = new RetentionConfiguration("retentionConfigurationResource", RetentionConfigurationArgs.builder()
.retentionPeriodInDays(0)
.build());
retention_configuration_resource = aws.cfg.RetentionConfiguration("retentionConfigurationResource", retention_period_in_days=0)
const retentionConfigurationResource = new aws.cfg.RetentionConfiguration("retentionConfigurationResource", {retentionPeriodInDays: 0});
type: aws:cfg:RetentionConfiguration
properties:
retentionPeriodInDays: 0
RetentionConfiguration Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The RetentionConfiguration resource accepts the following input properties:
- Retention
Period intIn Days - The number of days AWS Config stores historical information.
- Retention
Period intIn Days - The number of days AWS Config stores historical information.
- retention
Period IntegerIn Days - The number of days AWS Config stores historical information.
- retention
Period numberIn Days - The number of days AWS Config stores historical information.
- retention_
period_ intin_ days - The number of days AWS Config stores historical information.
- retention
Period NumberIn Days - The number of days AWS Config stores historical information.
Outputs
All input properties are implicitly available as output properties. Additionally, the RetentionConfiguration resource produces the following output properties:
Look up Existing RetentionConfiguration Resource
Get an existing RetentionConfiguration 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?: RetentionConfigurationState, opts?: CustomResourceOptions): RetentionConfiguration
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
retention_period_in_days: Optional[int] = None) -> RetentionConfiguration
func GetRetentionConfiguration(ctx *Context, name string, id IDInput, state *RetentionConfigurationState, opts ...ResourceOption) (*RetentionConfiguration, error)
public static RetentionConfiguration Get(string name, Input<string> id, RetentionConfigurationState? state, CustomResourceOptions? opts = null)
public static RetentionConfiguration get(String name, Output<String> id, RetentionConfigurationState 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.
- Name string
- The name of the retention configuration object. The object is always named default.
- Retention
Period intIn Days - The number of days AWS Config stores historical information.
- Name string
- The name of the retention configuration object. The object is always named default.
- Retention
Period intIn Days - The number of days AWS Config stores historical information.
- name String
- The name of the retention configuration object. The object is always named default.
- retention
Period IntegerIn Days - The number of days AWS Config stores historical information.
- name string
- The name of the retention configuration object. The object is always named default.
- retention
Period numberIn Days - The number of days AWS Config stores historical information.
- name str
- The name of the retention configuration object. The object is always named default.
- retention_
period_ intin_ days - The number of days AWS Config stores historical information.
- name String
- The name of the retention configuration object. The object is always named default.
- retention
Period NumberIn Days - The number of days AWS Config stores historical information.
Import
Using pulumi import
, import the AWS Config retention configuration using the name
. For example:
$ pulumi import aws:cfg/retentionConfiguration:RetentionConfiguration example default
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.