Skip to main content

frameworks

Creates, updates, deletes or gets a framework resource or lists frameworks in a region

Overview

Nameframeworks
TypeResource
DescriptionContains detailed information about a framework. Frameworks contain controls, which evaluate and report on your backup events and resources. Frameworks generate daily compliance results.
Idawscc.backup.frameworks

Fields

NameDatatypeDescription
framework_namestringThe unique name of a framework. This name is between 1 and 256 characters, starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).
framework_descriptionstringAn optional description of the framework with a maximum 1,024 characters.
framework_arnstringAn Amazon Resource Name (ARN) that uniquely identifies Framework as a resource
deployment_statusstringThe deployment status of a framework. The statuses are: CREATE_IN_PROGRESS | UPDATE_IN_PROGRESS | DELETE_IN_PROGRESS | COMPLETED | FAILED
creation_timestringThe date and time that a framework is created, in ISO 8601 representation. The value of CreationTime is accurate to milliseconds. For example, 2020-07-10T15:00:00.000-08:00 represents the 10th of July 2020 at 3:00 PM 8 hours behind UTC.
framework_controlsarrayContains detailed information about all of the controls of a framework. Each framework must contain at least one control.
framework_statusstring
A framework consists of one or more controls. Each control governs a resource, such as backup plans, backup selections, backup vaults, or recovery points. You can also turn AWS Config recording on or off for each resource. The statuses are:ACTIVE when recording is turned on for all resources governed by the framework.
PARTIALLY_ACTIVE when recording is turned off for at least one resource governed by the framework.
INACTIVE when recording is turned off for all resources governed by the framework.
UNAVAILABLE when AWS Backup is unable to validate recording status at this time.
framework_tagsarrayMetadata that you can assign to help organize the frameworks that you create. Each tag is a key-value pair.
regionstringAWS region.

For more information, see AWS::Backup::Framework.

Methods

NameResourceAccessible byRequired Params
create_resourceframeworksINSERTFrameworkControls, region
delete_resourceframeworksDELETEIdentifier, region
update_resourceframeworksUPDATEIdentifier, PatchDocument, region
list_resourcesframeworks_list_onlySELECTregion
get_resourceframeworksSELECTIdentifier, region

SELECT examples

Gets all properties from an individual framework.

SELECT
region,
framework_name,
framework_description,
framework_arn,
deployment_status,
creation_time,
framework_controls,
framework_status,
framework_tags
FROM awscc.backup.frameworks
WHERE
region = '{{ region }}' AND
Identifier = '{{ framework_arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new framework resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.backup.frameworks (
FrameworkControls,
region
)
SELECT
'{{ framework_controls }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a framework resource, using stack-deploy.

/*+ update */
UPDATE awscc.backup.frameworks
SET PatchDocument = string('{{ {
"FrameworkDescription": framework_description,
"FrameworkControls": framework_controls,
"FrameworkTags": framework_tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ framework_arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.backup.frameworks
WHERE
Identifier = '{{ framework_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the frameworks resource, the following permissions are required:

backup:CreateFramework,
backup:DescribeFramework,
backup:ListTags,
backup:TagResource,
iam:CreateServiceLinkedRole