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
Idaws.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
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.

Methods

NameAccessible byRequired Params
create_resourceINSERT, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all workspaces in a region.

SELECT
region,
workspace_id,
alias,
arn,
alert_manager_definition,
prometheus_endpoint,
logging_configuration,
kms_key_arn,
tags
FROM aws.aps.workspaces
WHERE region = 'us-east-1';

Gets all properties from an individual workspace.

SELECT
region,
workspace_id,
alias,
arn,
alert_manager_definition,
prometheus_endpoint,
logging_configuration,
kms_key_arn,
tags
FROM aws.aps.workspaces
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';

INSERT example

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

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

DELETE example

/*+ delete */
DELETE FROM aws.aps.workspaces
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';

Permissions

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

Create

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

Read

aps:DescribeWorkspace,
aps:ListTagsForResource,
aps:DescribeAlertManagerDefinition,
aps:DescribeLoggingConfiguration

Update

aps:UpdateWorkspaceAlias,
aps:DescribeWorkspace,
aps:TagResource,
aps:UntagResource,
aps:ListTagsForResource,
aps:CreateAlertManagerDefinition,
aps:PutAlertManagerDefinition,
aps:DeleteAlertManagerDefinition,
aps:CreateLoggingConfiguration,
aps:DescribeLoggingConfiguration,
aps:UpdateLoggingConfiguration,
aps:DeleteLoggingConfiguration,
logs:CreateLogDelivery,
logs:GetLogDelivery,
logs:UpdateLogDelivery,
logs:ListLogDeliveries,
logs:DeleteLogDelivery,
logs:PutResourcePolicy

Delete

aps:DeleteWorkspace,
aps:DescribeWorkspace,
aps:DeleteAlertManagerDefinition,
aps:DeleteLoggingConfiguration,
logs:DeleteLogDelivery

List

aps:ListWorkspaces,
aps:ListTagsForResource