Namespace Pulumi.Aws.Backup
Classes
GetPlan
GetPlanArgs
GetPlanResult
GetSelection
GetSelectionArgs
GetSelectionResult
GetVault
GetVaultArgs
GetVaultResult
Plan
Provides an AWS Backup plan resource.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.Backup.Plan("example", new Aws.Backup.PlanArgs
{
Rules =
{
new Aws.Backup.Inputs.PlanRuleArgs
{
RuleName = "tf_example_backup_rule",
Schedule = "cron(0 12 * * ? *)",
TargetVaultName = aws_backup_vault.Test.Name,
},
},
});
}
}
PlanArgs
PlanState
Selection
Manages selection conditions for AWS Backup plan resources.
Example Usage
IAM Role
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var exampleRole = new Aws.Iam.Role("exampleRole", new Aws.Iam.RoleArgs
{
AssumeRolePolicy = @"{
""Version"": ""2012-10-17"",
""Statement"": [
{
""Action"": [""sts:AssumeRole""],
""Effect"": ""allow"",
""Principal"": {
""Service"": [""backup.amazonaws.com""]
}
}
]
}
",
});
var exampleRolePolicyAttachment = new Aws.Iam.RolePolicyAttachment("exampleRolePolicyAttachment", new Aws.Iam.RolePolicyAttachmentArgs
{
PolicyArn = "arn:aws:iam::aws:policy/service-role/AWSBackupServiceRolePolicyForBackup",
Role = exampleRole.Name,
});
var exampleSelection = new Aws.Backup.Selection("exampleSelection", new Aws.Backup.SelectionArgs
{
IamRoleArn = exampleRole.Arn,
});
}
}
Selecting Backups By Tag
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.Backup.Selection("example", new Aws.Backup.SelectionArgs
{
IamRoleArn = aws_iam_role.Example.Arn,
PlanId = aws_backup_plan.Example.Id,
SelectionTags =
{
new Aws.Backup.Inputs.SelectionSelectionTagArgs
{
Key = "foo",
Type = "STRINGEQUALS",
Value = "bar",
},
},
});
}
}
Selecting Backups By Resource
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.Backup.Selection("example", new Aws.Backup.SelectionArgs
{
IamRoleArn = aws_iam_role.Example.Arn,
PlanId = aws_backup_plan.Example.Id,
Resources =
{
aws_db_instance.Example.Arn,
aws_ebs_volume.Example.Arn,
aws_efs_file_system.Example.Arn,
},
});
}
}
SelectionArgs
SelectionState
Vault
Provides an AWS Backup vault resource.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.Backup.Vault("example", new Aws.Backup.VaultArgs
{
KmsKeyArn = aws_kms_key.Example.Arn,
});
}
}