CreateFrameworkCommand

Creates a framework with one or more controls. A framework is a collection of controls that you can use to evaluate your backup practices. By using pre-built customizable controls to define your policies, you can evaluate whether your backup practices comply with your policies and which resources are not yet in compliance.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { BackupClient, CreateFrameworkCommand } from "@aws-sdk/client-backup"; // ES Modules import
// const { BackupClient, CreateFrameworkCommand } = require("@aws-sdk/client-backup"); // CommonJS import
const client = new BackupClient(config);
const input = { // CreateFrameworkInput
  FrameworkName: "STRING_VALUE", // required
  FrameworkDescription: "STRING_VALUE",
  FrameworkControls: [ // FrameworkControls // required
    { // FrameworkControl
      ControlName: "STRING_VALUE", // required
      ControlInputParameters: [ // ControlInputParameters
        { // ControlInputParameter
          ParameterName: "STRING_VALUE",
          ParameterValue: "STRING_VALUE",
        },
      ],
      ControlScope: { // ControlScope
        ComplianceResourceIds: [ // ComplianceResourceIdList
          "STRING_VALUE",
        ],
        ComplianceResourceTypes: [ // ResourceTypeList
          "STRING_VALUE",
        ],
        Tags: { // stringMap
          "<keys>": "STRING_VALUE",
        },
      },
    },
  ],
  IdempotencyToken: "STRING_VALUE",
  FrameworkTags: {
    "<keys>": "STRING_VALUE",
  },
};
const command = new CreateFrameworkCommand(input);
const response = await client.send(command);
// { // CreateFrameworkOutput
//   FrameworkName: "STRING_VALUE",
//   FrameworkArn: "STRING_VALUE",
// };

CreateFrameworkCommand Input

See CreateFrameworkCommandInput for more details

Parameter
Type
Description
FrameworkControls
Required
FrameworkControl[] | undefined

The controls that make up the framework. Each control in the list has a name, input parameters, and scope.

FrameworkName
Required
string | undefined

The unique name of the framework. The name must be between 1 and 256 characters, starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).

FrameworkDescription
string | undefined

An optional description of the framework with a maximum of 1,024 characters.

FrameworkTags
Record<string, string> | undefined

The tags to assign to the framework.

IdempotencyToken
string | undefined

A customer-chosen string that you can use to distinguish between otherwise identical calls to CreateFrameworkInput. Retrying a successful request with the same idempotency token results in a success message with no action taken.

CreateFrameworkCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
FrameworkArn
string | undefined

An Amazon Resource Name (ARN) that uniquely identifies a resource. The format of the ARN depends on the resource type.

FrameworkName
string | undefined

The unique name of the framework. The name must be between 1 and 256 characters, starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).

Throws

Name
Fault
Details
AlreadyExistsException
client

The required resource already exists.

InvalidParameterValueException
client

Indicates that something is wrong with a parameter's value. For example, the value is out of range.

LimitExceededException
client

A limit in the request has been exceeded; for example, a maximum number of items allowed in a request.

MissingParameterValueException
client

Indicates that a required parameter is missing.

ServiceUnavailableException
server

The request failed due to a temporary failure of the server.

BackupServiceException
Base exception class for all service exceptions from Backup service.