workspaces
Creates, updates, deletes or gets a workspace
resource or lists workspaces
in a region
Overview
Name | workspaces |
Type | Resource |
Description | Resource Type definition for AWS::APS::Workspace |
Id | aws.aps.workspaces |
Fields
Name | Datatype | Description |
---|---|---|
workspace_id | string | Required to identify a specific APS Workspace. |
alias | string | AMP Workspace alias. |
arn | string | Workspace arn. |
alert_manager_definition | string | The AMP Workspace alert manager definition data |
prometheus_endpoint | string | AMP Workspace prometheus endpoint |
logging_configuration | object | Logging configuration |
kms_key_arn | string | KMS Key ARN used to encrypt and decrypt AMP workspace data. |
tags | array | An array of key-value pairs to apply to this resource. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | , region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.aps.workspaces (
,
region
)
SELECT
'{{ }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.aps.workspaces (
Alias,
AlertManagerDefinition,
LoggingConfiguration,
KmsKeyArn,
Tags,
region
)
SELECT
'{{ Alias }}',
'{{ AlertManagerDefinition }}',
'{{ LoggingConfiguration }}',
'{{ KmsKeyArn }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: workspace
props:
- name: Alias
value: '{{ Alias }}'
- name: AlertManagerDefinition
value: '{{ AlertManagerDefinition }}'
- name: LoggingConfiguration
value:
LogGroupArn: '{{ LogGroupArn }}'
- name: KmsKeyArn
value: '{{ KmsKeyArn }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
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