1. Packages
  2. AWS Classic
  3. API Docs
  4. backup
  5. VaultLockConfiguration

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.31.0 published on Monday, Apr 15, 2024 by Pulumi

aws.backup.VaultLockConfiguration

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.31.0 published on Monday, Apr 15, 2024 by Pulumi

    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.

    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:

    BackupVaultName string
    Name of the backup vault to add a lock configuration for.
    ChangeableForDays 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 int
    The maximum retention period that the vault retains its recovery points.
    MinRetentionDays int
    The minimum retention period that the vault retains its recovery points.
    BackupVaultName string
    Name of the backup vault to add a lock configuration for.
    ChangeableForDays 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 int
    The maximum retention period that the vault retains its recovery points.
    MinRetentionDays int
    The minimum retention period that the vault retains its recovery points.
    backupVaultName String
    Name of the backup vault to add a lock configuration for.
    changeableForDays 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 Integer
    The maximum retention period that the vault retains its recovery points.
    minRetentionDays Integer
    The minimum retention period that the vault retains its recovery points.
    backupVaultName string
    Name of the backup vault to add a lock configuration for.
    changeableForDays 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 number
    The maximum retention period that the vault retains its recovery points.
    minRetentionDays number
    The minimum retention period that the vault retains its recovery points.
    backup_vault_name str
    Name of the backup vault to add a lock configuration for.
    changeable_for_days 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 int
    The maximum retention period that the vault retains its recovery points.
    min_retention_days int
    The minimum retention period that the vault retains its recovery points.
    backupVaultName String
    Name of the backup vault to add a lock configuration for.
    changeableForDays 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 Number
    The maximum retention period that the vault retains its recovery points.
    minRetentionDays 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)
    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:
    BackupVaultArn string
    The ARN of the vault.
    BackupVaultName string
    Name of the backup vault to add a lock configuration for.
    ChangeableForDays 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 int
    The maximum retention period that the vault retains its recovery points.
    MinRetentionDays int
    The minimum retention period that the vault retains its recovery points.
    BackupVaultArn string
    The ARN of the vault.
    BackupVaultName string
    Name of the backup vault to add a lock configuration for.
    ChangeableForDays 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 int
    The maximum retention period that the vault retains its recovery points.
    MinRetentionDays int
    The minimum retention period that the vault retains its recovery points.
    backupVaultArn String
    The ARN of the vault.
    backupVaultName String
    Name of the backup vault to add a lock configuration for.
    changeableForDays 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 Integer
    The maximum retention period that the vault retains its recovery points.
    minRetentionDays Integer
    The minimum retention period that the vault retains its recovery points.
    backupVaultArn string
    The ARN of the vault.
    backupVaultName string
    Name of the backup vault to add a lock configuration for.
    changeableForDays 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 number
    The maximum retention period that the vault retains its recovery points.
    minRetentionDays number
    The minimum retention period that the vault retains its recovery points.
    backup_vault_arn str
    The ARN of the vault.
    backup_vault_name str
    Name of the backup vault to add a lock configuration for.
    changeable_for_days 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 int
    The maximum retention period that the vault retains its recovery points.
    min_retention_days int
    The minimum retention period that the vault retains its recovery points.
    backupVaultArn String
    The ARN of the vault.
    backupVaultName String
    Name of the backup vault to add a lock configuration for.
    changeableForDays 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 Number
    The maximum retention period that the vault retains its recovery points.
    minRetentionDays 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
    

    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

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.31.0 published on Monday, Apr 15, 2024 by Pulumi