Skip to main content

environments

Creates, updates, deletes or gets an environment resource or lists environments in a region

Overview

Nameenvironments
TypeResource
DescriptionAn example resource schema demonstrating some basic constructs and validation rules.
Idawscc.finspace.environments

Fields

NameDatatypeDescription
environment_idstringUnique identifier for representing FinSpace Environment
namestringName of the Environment
aws_account_idstringAWS account ID associated with the Environment
descriptionstringDescription of the Environment
statusstringState of the Environment
environment_urlstringURL used to login to the Environment
environment_arnstringARN of the Environment
sage_maker_studio_domain_urlstringSageMaker Studio Domain URL associated with the Environment
kms_key_idstringKMS key used to encrypt customer data within FinSpace Environment infrastructure
dedicated_service_account_idstringID for FinSpace created account used to store Environment artifacts
federation_modestringFederation mode used with the Environment
federation_parametersobjectAdditional parameters to identify Federation mode
superuser_parametersobjectParameters of the first Superuser for the FinSpace Environment
data_bundlesarrayARNs of FinSpace Data Bundles to install
tagsarrayAn array of key-value pairs to apply to this resource.
regionstringAWS region.

For more information, see AWS::FinSpace::Environment.

Methods

NameResourceAccessible byRequired Params
create_resourceenvironmentsINSERTName, region
delete_resourceenvironmentsDELETEIdentifier, region
update_resourceenvironmentsUPDATEIdentifier, PatchDocument, region
list_resourcesenvironments_list_onlySELECTregion
get_resourceenvironmentsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual environment.

SELECT
region,
environment_id,
name,
aws_account_id,
description,
status,
environment_url,
environment_arn,
sage_maker_studio_domain_url,
kms_key_id,
dedicated_service_account_id,
federation_mode,
federation_parameters,
superuser_parameters,
data_bundles,
tags
FROM awscc.finspace.environments
WHERE
region = '{{ region }}' AND
Identifier = '{{ environment_id }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.finspace.environments (
Name,
region
)
SELECT
'{{ name }}',
'{{ 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 environment resource, using stack-deploy.

/*+ update */
UPDATE awscc.finspace.environments
SET PatchDocument = string('{{ {
"Name": name,
"Description": description,
"FederationMode": federation_mode
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ environment_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

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

finspace:CreateEnvironment,
finspace:GetEnvironment,
finspace:ListEnvironments,
sts:AssumeRole