Skip to content

Commit e847d8a

Browse files
committed
Adding ARN for Managed Prometheus workspace
1 parent ec12489 commit e847d8a

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/compose_x_common/aws/aps.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
# Copyright 2020-2022 John Mille <[email protected]>
3+
4+
5+
"""AWS Managed Prometheus Service"""
6+
7+
import re
8+
9+
APS_WORKSPACE_ARN_RE = re.compile(
10+
r"arn:(?P<partition>[a-z\d\-]+):aps:(?P<region>[a-z\d\-]+):(?P<accountid>[\d]{12})"
11+
r":workspace/(?P<id>[a-zA-Z\d\-]+)$"
12+
)

src/compose_x_common/aws/arns.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Copyright 2020-2022 John Mille <[email protected]>
33

44
from compose_x_common.aws.acm import ACM_ARN_RE
5+
from compose_x_common.aws.aps import APS_WORKSPACE_ARN_RE
56
from compose_x_common.aws.cloudmap import NAMESPACE_ARN_RE
67
from compose_x_common.aws.codeguru_profiler import PROFILER_ARN_RE
78
from compose_x_common.aws.cognito_userpool import USER_POOL_RE
@@ -59,6 +60,7 @@
5960
"AWS::MSK::Configuration": MSK_CONFIGURATION_ARN_RE,
6061
"AWS::MSK::ServerlessCluster": MSK_CLUSTER_ARN_RE,
6162
"AWS::Glue::Registry": GLUE_SR_ARN_RE,
63+
"AWS::APS::Workspace": APS_WORKSPACE_ARN_RE,
6264
}
6365

6466
ARNS_PER_TAGGINGAPI_TYPE = {
@@ -83,4 +85,5 @@
8385
"firehose:deliverystream": KINESIS_FIREHOSE_ARN_RE,
8486
"ecs:service": SERVICE_ARN_RE,
8587
"kafka:cluster": MSK_CLUSTER_ARN_RE,
88+
"aps:workspace": APS_WORKSPACE_ARN_RE,
8689
}

0 commit comments

Comments
 (0)