1. Packages
  2. AWS
  3. API Docs
  4. backup
  5. VaultLockConfiguration
AWS v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

aws.backup.VaultLockConfiguration

Explore with Pulumi AI

Provides an AWS Backup vault lock configuration resource.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const test = new aws.backup.VaultLockConfiguration("test", {
    backupVaultName: "example_backup_vault",
    changeableForDays: 3,
    maxRetentionDays: 1200,
    minRetentionDays: 7,
});
Copy
import pulumi
import pulumi_aws as aws

test = aws.backup.VaultLockConfiguration("test",
    backup_vault_name="example_backup_vault",
    changeable_for_days=3,
    max_retention_days=1200,
    min_retention_days=7)
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/backup"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := backup.NewVaultLockConfiguration(ctx, "test", &backup.VaultLockConfigurationArgs{
			BackupVaultName:   pulumi.String("example_backup_vault"),
			ChangeableForDays: pulumi.Int(3),
			MaxRetentionDays:  pulumi.Int(1200),
			MinRetentionDays:  pulumi.Int(7),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var test = new Aws.Backup.VaultLockConfiguration("test", new()
    {
        BackupVaultName = "example_backup_vault",
        ChangeableForDays = 3,
        MaxRetentionDays = 1200,
        MinRetentionDays = 7,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.backup.VaultLockConfiguration;
import com.pulumi.aws.backup.VaultLockConfigurationArgs;
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 test = new VaultLockConfiguration("test", VaultLockConfigurationArgs.builder()
            .backupVaultName("example_backup_vault")
            .changeableForDays(3)
            .maxRetentionDays(1200)
            .minRetentionDays(7)
            .build());

    }
}
Copy
resources:
  test:
    type: aws:backup:VaultLockConfiguration
    properties:
      backupVaultName: example_backup_vault
      changeableForDays: 3
      maxRetentionDays: 1200
      minRetentionDays: 7
Copy

Create VaultLockConfiguration Resource

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

Constructor syntax

new VaultLockConfiguration(name: string, args: VaultLockConfigurationArgs, opts?: CustomResourceOptions);
@overload
def VaultLockConfiguration(resource_name: str,
                           args: VaultLockConfigurationArgs,
                           opts: Optional[ResourceOptions] = None)

@overload
def VaultLockConfiguration(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           backup_vault_name: Optional[str] = None,
                           changeable_for_days: Optional[int] = None,
                           max_retention_days: Optional[int] = None,
                           min_retention_days: Optional[int] = None)
func NewVaultLockConfiguration(ctx *Context, name string, args VaultLockConfigurationArgs, opts ...ResourceOption) (*VaultLockConfiguration, error)
public VaultLockConfiguration(string name, VaultLockConfigurationArgs args, CustomResourceOptions? opts = null)
public VaultLockConfiguration(String name, VaultLockConfigurationArgs args)
public VaultLockConfiguration(String name, VaultLockConfigurationArgs args, CustomResourceOptions options)
type: aws:backup:VaultLockConfiguration
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. VaultLockConfigurationArgs
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. VaultLockConfigurationArgs
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. VaultLockConfigurationArgs
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. VaultLockConfigurationArgs
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. VaultLockConfigurationArgs
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 vaultLockConfigurationResource = new Aws.Backup.VaultLockConfiguration("vaultLockConfigurationResource", new()
{
    BackupVaultName = "string",
    ChangeableForDays = 0,
    MaxRetentionDays = 0,
    MinRetentionDays = 0,
});
Copy
example, err := backup.NewVaultLockConfiguration(ctx, "vaultLockConfigurationResource", &backup.VaultLockConfigurationArgs{
	BackupVaultName:   pulumi.String("string"),
	ChangeableForDays: pulumi.Int(0),
	MaxRetentionDays:  pulumi.Int(0),
	MinRetentionDays:  pulumi.Int(0),
})
Copy
var vaultLockConfigurationResource = new VaultLockConfiguration("vaultLockConfigurationResource", VaultLockConfigurationArgs.builder()
    .backupVaultName("string")
    .changeableForDays(0)
    .maxRetentionDays(0)
    .minRetentionDays(0)
    .build());
Copy
vault_lock_configuration_resource = aws.backup.VaultLockConfiguration("vaultLockConfigurationResource",
    backup_vault_name="string",
    changeable_for_days=0,
    max_retention_days=0,
    min_retention_days=0)
Copy
const vaultLockConfigurationResource = new aws.backup.VaultLockConfiguration("vaultLockConfigurationResource", {
    backupVaultName: "string",
    changeableForDays: 0,
    maxRetentionDays: 0,
    minRetentionDays: 0,
});
Copy
type: aws:backup:VaultLockConfiguration
properties:
    backupVaultName: string
    changeableForDays: 0
    maxRetentionDays: 0
    minRetentionDays: 0
Copy

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

BackupVaultName
This property is required.
Changes to this property will trigger replacement.
string
Name of the backup vault to add a lock configuration for.
ChangeableForDays Changes to this property will trigger replacement. int
The number of days before the lock date. If omitted creates a vault lock in governance mode, otherwise it will create a vault lock in compliance mode.
MaxRetentionDays Changes to this property will trigger replacement. int
The maximum retention period that the vault retains its recovery points.
MinRetentionDays Changes to this property will trigger replacement. int
The minimum retention period that the vault retains its recovery points.
BackupVaultName
This property is required.
Changes to this property will trigger replacement.
string
Name of the backup vault to add a lock configuration for.
ChangeableForDays Changes to this property will trigger replacement. int
The number of days before the lock date. If omitted creates a vault lock in governance mode, otherwise it will create a vault lock in compliance mode.
MaxRetentionDays Changes to this property will trigger replacement. int
The maximum retention period that the vault retains its recovery points.
MinRetentionDays Changes to this property will trigger replacement. int
The minimum retention period that the vault retains its recovery points.
backupVaultName
This property is required.
Changes to this property will trigger replacement.
String
Name of the backup vault to add a lock configuration for.
changeableForDays Changes to this property will trigger replacement. Integer
The number of days before the lock date. If omitted creates a vault lock in governance mode, otherwise it will create a vault lock in compliance mode.
maxRetentionDays Changes to this property will trigger replacement. Integer
The maximum retention period that the vault retains its recovery points.
minRetentionDays Changes to this property will trigger replacement. Integer
The minimum retention period that the vault retains its recovery points.
backupVaultName
This property is required.
Changes to this property will trigger replacement.
string
Name of the backup vault to add a lock configuration for.
changeableForDays Changes to this property will trigger replacement. number
The number of days before the lock date. If omitted creates a vault lock in governance mode, otherwise it will create a vault lock in compliance mode.
maxRetentionDays Changes to this property will trigger replacement. number
The maximum retention period that the vault retains its recovery points.
minRetentionDays Changes to this property will trigger replacement. number
The minimum retention period that the vault retains its recovery points.
backup_vault_name
This property is required.
Changes to this property will trigger replacement.
str
Name of the backup vault to add a lock configuration for.
changeable_for_days Changes to this property will trigger replacement. int
The number of days before the lock date. If omitted creates a vault lock in governance mode, otherwise it will create a vault lock in compliance mode.
max_retention_days Changes to this property will trigger replacement. int
The maximum retention period that the vault retains its recovery points.
min_retention_days Changes to this property will trigger replacement. int
The minimum retention period that the vault retains its recovery points.
backupVaultName
This property is required.
Changes to this property will trigger replacement.
String
Name of the backup vault to add a lock configuration for.
changeableForDays Changes to this property will trigger replacement. Number
The number of days before the lock date. If omitted creates a vault lock in governance mode, otherwise it will create a vault lock in compliance mode.
maxRetentionDays Changes to this property will trigger replacement. Number
The maximum retention period that the vault retains its recovery points.
minRetentionDays Changes to this property will trigger replacement. Number
The minimum retention period that the vault retains its recovery points.

Outputs

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

BackupVaultArn string
The ARN of the vault.
Id string
The provider-assigned unique ID for this managed resource.
BackupVaultArn string
The ARN of the vault.
Id string
The provider-assigned unique ID for this managed resource.
backupVaultArn String
The ARN of the vault.
id String
The provider-assigned unique ID for this managed resource.
backupVaultArn string
The ARN of the vault.
id string
The provider-assigned unique ID for this managed resource.
backup_vault_arn str
The ARN of the vault.
id str
The provider-assigned unique ID for this managed resource.
backupVaultArn String
The ARN of the vault.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing VaultLockConfiguration Resource

Get an existing VaultLockConfiguration 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?: VaultLockConfigurationState, opts?: CustomResourceOptions): VaultLockConfiguration
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        backup_vault_arn: Optional[str] = None,
        backup_vault_name: Optional[str] = None,
        changeable_for_days: Optional[int] = None,
        max_retention_days: Optional[int] = None,
        min_retention_days: Optional[int] = None) -> VaultLockConfiguration
func GetVaultLockConfiguration(ctx *Context, name string, id IDInput, state *VaultLockConfigurationState, opts ...ResourceOption) (*VaultLockConfiguration, error)
public static VaultLockConfiguration Get(string name, Input<string> id, VaultLockConfigurationState? state, CustomResourceOptions? opts = null)
public static VaultLockConfiguration get(String name, Output<String> id, VaultLockConfigurationState state, CustomResourceOptions options)
resources:  _:    type: aws:backup:VaultLockConfiguration    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.
The following state arguments are supported:
BackupVaultArn string
The ARN of the vault.
BackupVaultName Changes to this property will trigger replacement. string
Name of the backup vault to add a lock configuration for.
ChangeableForDays Changes to this property will trigger replacement. int
The number of days before the lock date. If omitted creates a vault lock in governance mode, otherwise it will create a vault lock in compliance mode.
MaxRetentionDays Changes to this property will trigger replacement. int
The maximum retention period that the vault retains its recovery points.
MinRetentionDays Changes to this property will trigger replacement. int
The minimum retention period that the vault retains its recovery points.
BackupVaultArn string
The ARN of the vault.
BackupVaultName Changes to this property will trigger replacement. string
Name of the backup vault to add a lock configuration for.
ChangeableForDays Changes to this property will trigger replacement. int
The number of days before the lock date. If omitted creates a vault lock in governance mode, otherwise it will create a vault lock in compliance mode.
MaxRetentionDays Changes to this property will trigger replacement. int
The maximum retention period that the vault retains its recovery points.
MinRetentionDays Changes to this property will trigger replacement. int
The minimum retention period that the vault retains its recovery points.
backupVaultArn String
The ARN of the vault.
backupVaultName Changes to this property will trigger replacement. String
Name of the backup vault to add a lock configuration for.
changeableForDays Changes to this property will trigger replacement. Integer
The number of days before the lock date. If omitted creates a vault lock in governance mode, otherwise it will create a vault lock in compliance mode.
maxRetentionDays Changes to this property will trigger replacement. Integer
The maximum retention period that the vault retains its recovery points.
minRetentionDays Changes to this property will trigger replacement. Integer
The minimum retention period that the vault retains its recovery points.
backupVaultArn string
The ARN of the vault.
backupVaultName Changes to this property will trigger replacement. string
Name of the backup vault to add a lock configuration for.
changeableForDays Changes to this property will trigger replacement. number
The number of days before the lock date. If omitted creates a vault lock in governance mode, otherwise it will create a vault lock in compliance mode.
maxRetentionDays Changes to this property will trigger replacement. number
The maximum retention period that the vault retains its recovery points.
minRetentionDays Changes to this property will trigger replacement. number
The minimum retention period that the vault retains its recovery points.
backup_vault_arn str
The ARN of the vault.
backup_vault_name Changes to this property will trigger replacement. str
Name of the backup vault to add a lock configuration for.
changeable_for_days Changes to this property will trigger replacement. int
The number of days before the lock date. If omitted creates a vault lock in governance mode, otherwise it will create a vault lock in compliance mode.
max_retention_days Changes to this property will trigger replacement. int
The maximum retention period that the vault retains its recovery points.
min_retention_days Changes to this property will trigger replacement. int
The minimum retention period that the vault retains its recovery points.
backupVaultArn String
The ARN of the vault.
backupVaultName Changes to this property will trigger replacement. String
Name of the backup vault to add a lock configuration for.
changeableForDays Changes to this property will trigger replacement. Number
The number of days before the lock date. If omitted creates a vault lock in governance mode, otherwise it will create a vault lock in compliance mode.
maxRetentionDays Changes to this property will trigger replacement. Number
The maximum retention period that the vault retains its recovery points.
minRetentionDays Changes to this property will trigger replacement. Number
The minimum retention period that the vault retains its recovery points.

Import

Using pulumi import, import Backup vault lock configuration using the name. For example:

$ pulumi import aws:backup/vaultLockConfiguration:VaultLockConfiguration test TestVault
Copy

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.