@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
168 lines • 6.22 kB
JavaScript
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.Framework = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides an AWS Backup Framework resource.
*
* > **Note:** For the Deployment Status of the Framework to be successful, please turn on resource tracking to enable AWS Config recording to track configuration changes of your backup resources. This can be done from the AWS Console.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.backup.Framework("Example", {
* name: "exampleFramework",
* description: "this is an example framework",
* controls: [
* {
* name: "BACKUP_RECOVERY_POINT_MINIMUM_RETENTION_CHECK",
* inputParameters: [{
* name: "requiredRetentionDays",
* value: "35",
* }],
* },
* {
* name: "BACKUP_PLAN_MIN_FREQUENCY_AND_MIN_RETENTION_CHECK",
* inputParameters: [
* {
* name: "requiredFrequencyUnit",
* value: "hours",
* },
* {
* name: "requiredRetentionDays",
* value: "35",
* },
* {
* name: "requiredFrequencyValue",
* value: "1",
* },
* ],
* },
* {
* name: "BACKUP_RECOVERY_POINT_ENCRYPTED",
* },
* {
* name: "BACKUP_RESOURCES_PROTECTED_BY_BACKUP_PLAN",
* scope: {
* complianceResourceTypes: ["EBS"],
* },
* },
* {
* name: "BACKUP_RECOVERY_POINT_MANUAL_DELETION_DISABLED",
* },
* {
* name: "BACKUP_RESOURCES_PROTECTED_BY_BACKUP_VAULT_LOCK",
* inputParameters: [
* {
* name: "maxRetentionDays",
* value: "100",
* },
* {
* name: "minRetentionDays",
* value: "1",
* },
* ],
* scope: {
* complianceResourceTypes: ["EBS"],
* },
* },
* {
* name: "BACKUP_LAST_RECOVERY_POINT_CREATED",
* inputParameters: [
* {
* name: "recoveryPointAgeUnit",
* value: "days",
* },
* {
* name: "recoveryPointAgeValue",
* value: "1",
* },
* ],
* scope: {
* complianceResourceTypes: ["EBS"],
* },
* },
* ],
* tags: {
* Name: "Example Framework",
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Backup Framework using the `id` which corresponds to the name of the Backup Framework. For example:
*
* ```sh
* $ pulumi import aws:backup/framework:Framework test <id>
* ```
*/
class Framework extends pulumi.CustomResource {
/**
* Get an existing Framework resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new Framework(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of Framework. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Framework.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["controls"] = state?.controls;
resourceInputs["creationTime"] = state?.creationTime;
resourceInputs["deploymentStatus"] = state?.deploymentStatus;
resourceInputs["description"] = state?.description;
resourceInputs["name"] = state?.name;
resourceInputs["region"] = state?.region;
resourceInputs["status"] = state?.status;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
}
else {
const args = argsOrState;
if (args?.controls === undefined && !opts.urn) {
throw new Error("Missing required property 'controls'");
}
resourceInputs["controls"] = args?.controls;
resourceInputs["description"] = args?.description;
resourceInputs["name"] = args?.name;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["creationTime"] = undefined /*out*/;
resourceInputs["deploymentStatus"] = undefined /*out*/;
resourceInputs["status"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Framework.__pulumiType, name, resourceInputs, opts);
}
}
exports.Framework = Framework;
/** @internal */
Framework.__pulumiType = 'aws:backup/framework:Framework';
//# sourceMappingURL=framework.js.map
;