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 = '{{ region }}' 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.aps.workspaces
WHERE
Identifier = '{{ arn }}' 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 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