Skip to main content

enabled_baselines

Creates, updates, deletes or gets an enabled_baseline resource or lists enabled_baselines in a region

Overview

Nameenabled_baselines
TypeResource
DescriptionDefinition of AWS::ControlTower::EnabledBaseline Resource Type
Idawscc.controltower.enabled_baselines

Fields

NameDatatypeDescription
baseline_identifierstring
baseline_versionstring
enabled_baseline_identifierstring
target_identifierstring
parametersarray
tagsarray
regionstringAWS region.

For more information, see AWS::ControlTower::EnabledBaseline.

Methods

NameResourceAccessible byRequired Params
create_resourceenabled_baselinesINSERTBaselineIdentifier, TargetIdentifier, BaselineVersion, region
delete_resourceenabled_baselinesDELETEIdentifier, region
update_resourceenabled_baselinesUPDATEIdentifier, PatchDocument, region
list_resourcesenabled_baselines_list_onlySELECTregion
get_resourceenabled_baselinesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual enabled_baseline.

SELECT
region,
baseline_identifier,
baseline_version,
enabled_baseline_identifier,
target_identifier,
parameters,
tags
FROM awscc.controltower.enabled_baselines
WHERE
region = '{{ region }}' AND
Identifier = '{{ enabled_baseline_identifier }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.controltower.enabled_baselines (
BaselineIdentifier,
BaselineVersion,
TargetIdentifier,
region
)
SELECT
'{{ baseline_identifier }}',
'{{ baseline_version }}',
'{{ target_identifier }}',
'{{ 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 enabled_baseline resource, using stack-deploy.

/*+ update */
UPDATE awscc.controltower.enabled_baselines
SET PatchDocument = string('{{ {
"BaselineVersion": baseline_version,
"Parameters": parameters,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ enabled_baseline_identifier }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.controltower.enabled_baselines
WHERE
Identifier = '{{ enabled_baseline_identifier }}' 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 enabled_baselines resource, the following permissions are required:

controltower:EnableBaseline,
controltower:TagResource,
controltower:UntagResource,
controltower:GetBaselineOperation,
controltower:GetEnabledBaseline,
controltower:ListTagsForResource,
organizations:CreateOrganizationalUnit,
organizations:CreateOrganization,
organizations:UpdatePolicy,
organizations:CreatePolicy,
organizations:AttachPolicy,
organizations:DetachPolicy,
organizations:DeletePolicy,
organizations:EnablePolicyType,
organizations:EnableAWSServiceAccess,
organizations:ListRoots,
servicecatalog:AssociatePrincipalWithPortfolio,
servicecatalog:AssociateProductWithPortfolio,
servicecatalog:CreatePortfolio,
servicecatalog:CreateProduct,
servicecatalog:CreateProvisioningArtifact,
servicecatalog:ListPortfolios,
servicecatalog:ListProvisioningArtifacts,
servicecatalog:SearchProductsAsAdmin,
servicecatalog:UpdatePortfolio,
servicecatalog:UpdateProvisioningArtifact,
servicecatalog:ListPrincipalsForPortfolio,
servicecatalog:DeleteProvisioningArtifact