Skip to main content

workspaces

Creates, updates, deletes or gets a workspace resource or lists workspaces in a region

Overview

Nameworkspaces
TypeResource
DescriptionResource Type definition for AWS::APS::Workspace
Idawscc.aps.workspaces

Fields

NameDatatypeDescription
workspace_idstringRequired to identify a specific APS Workspace.
aliasstringAMP Workspace alias.
arnstringWorkspace arn.
alert_manager_definitionstringThe AMP Workspace alert manager definition data
prometheus_endpointstringAMP Workspace prometheus endpoint
logging_configurationobjectLogging configuration
workspace_configurationobjectWorkspace configuration
query_logging_configurationobjectQuery logging configuration
kms_key_arnstringKMS Key ARN used to encrypt and decrypt AMP workspace data.
tagsarrayAn array of key-value pairs to apply to this resource.
regionstringAWS region.

For more information, see AWS::APS::Workspace.

Methods

NameResourceAccessible byRequired Params
create_resourceworkspacesINSERT, region
delete_resourceworkspacesDELETEIdentifier, region
update_resourceworkspacesUPDATEIdentifier, PatchDocument, region
list_resourcesworkspaces_list_onlySELECTregion
get_resourceworkspacesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual workspace.

SELECT
region,
workspace_id,
alias,
arn,
alert_manager_definition,
prometheus_endpoint,
logging_configuration,
workspace_configuration,
query_logging_configuration,
kms_key_arn,
tags
FROM awscc.aps.workspaces
WHERE
region = 'us-east-1' AND
Identifier = '{{ arn }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.aps.workspaces (
,
region
)
SELECT
'{{ }}',
'{{ region }}';

UPDATE example

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

/*+ update */
UPDATE awscc.aps.workspaces
SET PatchDocument = string('{{ {
"Alias": alias,
"AlertManagerDefinition": alert_manager_definition,
"LoggingConfiguration": logging_configuration,
"WorkspaceConfiguration": workspace_configuration,
"QueryLoggingConfiguration": query_logging_configuration,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';

DELETE example

/*+ delete */
DELETE FROM awscc.aps.workspaces
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';

Permissions

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

aps:CreateWorkspace,
aps:DescribeWorkspace,
aps:TagResource,
aps:CreateAlertManagerDefinition,
aps:DescribeAlertManagerDefinition,
aps:CreateLoggingConfiguration,
aps:CreateQueryLoggingConfiguration,
aps:DescribeWorkspaceConfiguration,
aps:UpdateWorkspaceConfiguration,
logs:CreateLogDelivery,
logs:GetLogDelivery,
logs:ListLogDeliveries,
logs:PutResourcePolicy,
kms:CreateGrant,
kms:Decrypt,
kms:GenerateDataKey