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,
});
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)
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
})
}
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,
});
});
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());
}
}
resources:
test:
type: aws:backup:VaultLockConfiguration
properties:
backupVaultName: example_backup_vault
changeableForDays: 3
maxRetentionDays: 1200
minRetentionDays: 7
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 string
- The unique name of the resource.
- args VaultLockConfigurationArgs
- 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 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 string
- The unique name of the resource.
- args VaultLockConfigurationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VaultLockConfigurationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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,
});
example, err := backup.NewVaultLockConfiguration(ctx, "vaultLockConfigurationResource", &backup.VaultLockConfigurationArgs{
BackupVaultName: pulumi.String("string"),
ChangeableForDays: pulumi.Int(0),
MaxRetentionDays: pulumi.Int(0),
MinRetentionDays: pulumi.Int(0),
})
var vaultLockConfigurationResource = new VaultLockConfiguration("vaultLockConfigurationResource", VaultLockConfigurationArgs.builder()
.backupVaultName("string")
.changeableForDays(0)
.maxRetentionDays(0)
.minRetentionDays(0)
.build());
vault_lock_configuration_resource = aws.backup.VaultLockConfiguration("vaultLockConfigurationResource",
backup_vault_name="string",
changeable_for_days=0,
max_retention_days=0,
min_retention_days=0)
const vaultLockConfigurationResource = new aws.backup.VaultLockConfiguration("vaultLockConfigurationResource", {
backupVaultName: "string",
changeableForDays: 0,
maxRetentionDays: 0,
minRetentionDays: 0,
});
type: aws:backup:VaultLockConfiguration
properties:
backupVaultName: string
changeableForDays: 0
maxRetentionDays: 0
minRetentionDays: 0
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
The VaultLockConfiguration resource accepts the following input properties:
- Backup
Vault stringName - Name of the backup vault to add a lock configuration for.
- Changeable
For intDays - The number of days before the lock date. If omitted creates a vault lock in
governance
mode, otherwise it will create a vault lock incompliance
mode. - Max
Retention intDays - The maximum retention period that the vault retains its recovery points.
- Min
Retention intDays - The minimum retention period that the vault retains its recovery points.
- Backup
Vault stringName - Name of the backup vault to add a lock configuration for.
- Changeable
For intDays - The number of days before the lock date. If omitted creates a vault lock in
governance
mode, otherwise it will create a vault lock incompliance
mode. - Max
Retention intDays - The maximum retention period that the vault retains its recovery points.
- Min
Retention intDays - The minimum retention period that the vault retains its recovery points.
- backup
Vault StringName - Name of the backup vault to add a lock configuration for.
- changeable
For IntegerDays - The number of days before the lock date. If omitted creates a vault lock in
governance
mode, otherwise it will create a vault lock incompliance
mode. - max
Retention IntegerDays - The maximum retention period that the vault retains its recovery points.
- min
Retention IntegerDays - The minimum retention period that the vault retains its recovery points.
- backup
Vault stringName - Name of the backup vault to add a lock configuration for.
- changeable
For numberDays - The number of days before the lock date. If omitted creates a vault lock in
governance
mode, otherwise it will create a vault lock incompliance
mode. - max
Retention numberDays - The maximum retention period that the vault retains its recovery points.
- min
Retention numberDays - The minimum retention period that the vault retains its recovery points.
- backup_
vault_ strname - Name of the backup vault to add a lock configuration for.
- changeable_
for_ intdays - The number of days before the lock date. If omitted creates a vault lock in
governance
mode, otherwise it will create a vault lock incompliance
mode. - max_
retention_ intdays - The maximum retention period that the vault retains its recovery points.
- min_
retention_ intdays - The minimum retention period that the vault retains its recovery points.
- backup
Vault StringName - Name of the backup vault to add a lock configuration for.
- changeable
For NumberDays - The number of days before the lock date. If omitted creates a vault lock in
governance
mode, otherwise it will create a vault lock incompliance
mode. - max
Retention NumberDays - The maximum retention period that the vault retains its recovery points.
- min
Retention NumberDays - 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:
- Backup
Vault stringArn - The ARN of the vault.
- Id string
- The provider-assigned unique ID for this managed resource.
- Backup
Vault stringArn - The ARN of the vault.
- Id string
- The provider-assigned unique ID for this managed resource.
- backup
Vault StringArn - The ARN of the vault.
- id String
- The provider-assigned unique ID for this managed resource.
- backup
Vault stringArn - The ARN of the vault.
- id string
- The provider-assigned unique ID for this managed resource.
- backup_
vault_ strarn - The ARN of the vault.
- id str
- The provider-assigned unique ID for this managed resource.
- backup
Vault StringArn - 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)
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.
- Backup
Vault stringArn - The ARN of the vault.
- Backup
Vault stringName - Name of the backup vault to add a lock configuration for.
- Changeable
For intDays - The number of days before the lock date. If omitted creates a vault lock in
governance
mode, otherwise it will create a vault lock incompliance
mode. - Max
Retention intDays - The maximum retention period that the vault retains its recovery points.
- Min
Retention intDays - The minimum retention period that the vault retains its recovery points.
- Backup
Vault stringArn - The ARN of the vault.
- Backup
Vault stringName - Name of the backup vault to add a lock configuration for.
- Changeable
For intDays - The number of days before the lock date. If omitted creates a vault lock in
governance
mode, otherwise it will create a vault lock incompliance
mode. - Max
Retention intDays - The maximum retention period that the vault retains its recovery points.
- Min
Retention intDays - The minimum retention period that the vault retains its recovery points.
- backup
Vault StringArn - The ARN of the vault.
- backup
Vault StringName - Name of the backup vault to add a lock configuration for.
- changeable
For IntegerDays - The number of days before the lock date. If omitted creates a vault lock in
governance
mode, otherwise it will create a vault lock incompliance
mode. - max
Retention IntegerDays - The maximum retention period that the vault retains its recovery points.
- min
Retention IntegerDays - The minimum retention period that the vault retains its recovery points.
- backup
Vault stringArn - The ARN of the vault.
- backup
Vault stringName - Name of the backup vault to add a lock configuration for.
- changeable
For numberDays - The number of days before the lock date. If omitted creates a vault lock in
governance
mode, otherwise it will create a vault lock incompliance
mode. - max
Retention numberDays - The maximum retention period that the vault retains its recovery points.
- min
Retention numberDays - The minimum retention period that the vault retains its recovery points.
- backup_
vault_ strarn - The ARN of the vault.
- backup_
vault_ strname - Name of the backup vault to add a lock configuration for.
- changeable_
for_ intdays - The number of days before the lock date. If omitted creates a vault lock in
governance
mode, otherwise it will create a vault lock incompliance
mode. - max_
retention_ intdays - The maximum retention period that the vault retains its recovery points.
- min_
retention_ intdays - The minimum retention period that the vault retains its recovery points.
- backup
Vault StringArn - The ARN of the vault.
- backup
Vault StringName - Name of the backup vault to add a lock configuration for.
- changeable
For NumberDays - The number of days before the lock date. If omitted creates a vault lock in
governance
mode, otherwise it will create a vault lock incompliance
mode. - max
Retention NumberDays - The maximum retention period that the vault retains its recovery points.
- min
Retention NumberDays - 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
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.