Skip to content

Commit 67cd222

Browse files
author
AWS
committed
Amazon Prometheus Service Update: Add Workspace Configuration APIs for Amazon Prometheus
1 parent 9c9b44f commit 67cd222

File tree

2 files changed

+218
-7
lines changed

2 files changed

+218
-7
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "Amazon Prometheus Service",
4+
"contributor": "",
5+
"description": "Add Workspace Configuration APIs for Amazon Prometheus"
6+
}

services/amp/src/main/resources/codegen-resources/service-2.json

Lines changed: 212 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,24 @@
299299
],
300300
"documentation":"<p>Returns information about an existing workspace. </p>"
301301
},
302+
"DescribeWorkspaceConfiguration":{
303+
"name":"DescribeWorkspaceConfiguration",
304+
"http":{
305+
"method":"GET",
306+
"requestUri":"/workspaces/{workspaceId}/configuration",
307+
"responseCode":200
308+
},
309+
"input":{"shape":"DescribeWorkspaceConfigurationRequest"},
310+
"output":{"shape":"DescribeWorkspaceConfigurationResponse"},
311+
"errors":[
312+
{"shape":"ThrottlingException"},
313+
{"shape":"ValidationException"},
314+
{"shape":"ResourceNotFoundException"},
315+
{"shape":"AccessDeniedException"},
316+
{"shape":"InternalServerException"}
317+
],
318+
"documentation":"<p>Use this operation to return information about the configuration of a workspace. The configuration details returned include workspace configuration status, label set limits, and retention period.</p>"
319+
},
302320
"GetDefaultScraperConfiguration":{
303321
"name":"GetDefaultScraperConfiguration",
304322
"http":{
@@ -523,6 +541,27 @@
523541
],
524542
"documentation":"<p>Updates the alias of an existing workspace. </p>",
525543
"idempotent":true
544+
},
545+
"UpdateWorkspaceConfiguration":{
546+
"name":"UpdateWorkspaceConfiguration",
547+
"http":{
548+
"method":"PATCH",
549+
"requestUri":"/workspaces/{workspaceId}/configuration",
550+
"responseCode":202
551+
},
552+
"input":{"shape":"UpdateWorkspaceConfigurationRequest"},
553+
"output":{"shape":"UpdateWorkspaceConfigurationResponse"},
554+
"errors":[
555+
{"shape":"ThrottlingException"},
556+
{"shape":"ConflictException"},
557+
{"shape":"ValidationException"},
558+
{"shape":"ResourceNotFoundException"},
559+
{"shape":"AccessDeniedException"},
560+
{"shape":"InternalServerException"},
561+
{"shape":"ServiceQuotaExceededException"}
562+
],
563+
"documentation":"<p>Use this operation to create or update the label sets, label set limits, and retention period of a workspace.</p> <p>You must specify at least one of <code>limitsPerLabelSet</code> or <code>retentionPeriodInDays</code> for the request to be valid.</p>",
564+
"idempotent":true
526565
}
527566
},
528567
"shapes":{
@@ -802,7 +841,7 @@
802841
},
803842
"roleConfiguration":{
804843
"shape":"RoleConfiguration",
805-
"documentation":"<p>The scraper role configuration for the workspace.</p>"
844+
"documentation":"<p>Use this structure to enable cross-account access, so that you can use a target account to access Prometheus metrics from source accounts.</p>"
806845
},
807846
"scrapeConfiguration":{
808847
"shape":"ScrapeConfiguration",
@@ -1132,6 +1171,28 @@
11321171
},
11331172
"documentation":"<p>Represents the output of a <code>DescribeScraper</code> operation.</p>"
11341173
},
1174+
"DescribeWorkspaceConfigurationRequest":{
1175+
"type":"structure",
1176+
"required":["workspaceId"],
1177+
"members":{
1178+
"workspaceId":{
1179+
"shape":"WorkspaceId",
1180+
"documentation":"<p>The ID of the workspace that you want to retrieve information for. To find the IDs of your workspaces, use the <a href=\"https://docs.aws.amazon.com/prometheus/latest/APIReference/API_ListWorkspaces.htm\">ListWorkspaces</a> operation.</p>",
1181+
"location":"uri",
1182+
"locationName":"workspaceId"
1183+
}
1184+
}
1185+
},
1186+
"DescribeWorkspaceConfigurationResponse":{
1187+
"type":"structure",
1188+
"required":["workspaceConfiguration"],
1189+
"members":{
1190+
"workspaceConfiguration":{
1191+
"shape":"WorkspaceConfigurationDescription",
1192+
"documentation":"<p>This structure contains the information about the workspace configuration.</p>"
1193+
}
1194+
}
1195+
},
11351196
"DescribeWorkspaceRequest":{
11361197
"type":"structure",
11371198
"required":["workspaceId"],
@@ -1269,6 +1330,57 @@
12691330
"min":20,
12701331
"pattern":"^arn:aws[-a-z]*:kms:[-a-z0-9]+:[0-9]{12}:key/[-a-f0-9]+$"
12711332
},
1333+
"LabelName":{
1334+
"type":"string",
1335+
"min":1,
1336+
"pattern":"^[a-zA-Z_][a-zA-Z0-9_]*$"
1337+
},
1338+
"LabelSet":{
1339+
"type":"map",
1340+
"key":{"shape":"LabelName"},
1341+
"value":{"shape":"LabelValue"}
1342+
},
1343+
"LabelValue":{
1344+
"type":"string",
1345+
"min":1
1346+
},
1347+
"LimitsPerLabelSet":{
1348+
"type":"structure",
1349+
"required":[
1350+
"labelSet",
1351+
"limits"
1352+
],
1353+
"members":{
1354+
"labelSet":{
1355+
"shape":"LabelSet",
1356+
"documentation":"<p>This defines one label set that will have an enforced ingestion limit. </p> <p>Label values accept ASCII characters and must contain at least one character that isn't whitespace. ASCII control characters are not accepted. If the label name is metric name label <code>__<i>name</i>__</code>, then the <i>metric</i> part of the name must conform to the following pattern: <code>[a-zA-Z_:][a-zA-Z0-9_:]*</code> </p>"
1357+
},
1358+
"limits":{
1359+
"shape":"LimitsPerLabelSetEntry",
1360+
"documentation":"<p>This structure contains the information about the limits that apply to time series that match this label set.</p>"
1361+
}
1362+
},
1363+
"documentation":"<p>This structure defines one label set used to enforce ingestion limits for the workspace, and defines the limit for that label set.</p> <p>A label set is a unique combination of label-value pairs. Use them to control time series ingestion limits and to monitor usage by specific label groups. Example label sets might be <code>team:finance</code> or <code>env:prod</code> </p>"
1364+
},
1365+
"LimitsPerLabelSetEntry":{
1366+
"type":"structure",
1367+
"members":{
1368+
"maxSeries":{
1369+
"shape":"LimitsPerLabelSetEntryMaxSeriesLong",
1370+
"documentation":"<p>The maximum number of active series that can be ingested that match this label set. </p> <p>Setting this to 0 causes no label set limit to be enforced, but it does cause Amazon Managed Service for Prometheus to vend label set metrics to CloudWatch</p>"
1371+
}
1372+
},
1373+
"documentation":"<p>This structure contains the information about the limits that apply to time series that match one label set.</p>"
1374+
},
1375+
"LimitsPerLabelSetEntryMaxSeriesLong":{
1376+
"type":"long",
1377+
"box":true,
1378+
"min":0
1379+
},
1380+
"LimitsPerLabelSetList":{
1381+
"type":"list",
1382+
"member":{"shape":"LimitsPerLabelSet"}
1383+
},
12721384
"ListRuleGroupsNamespacesRequest":{
12731385
"type":"structure",
12741386
"required":["workspaceId"],
@@ -1629,14 +1741,14 @@
16291741
"members":{
16301742
"sourceRoleArn":{
16311743
"shape":"IamRoleArn",
1632-
"documentation":"<p>A ARN identifying the source role configuration.</p>"
1744+
"documentation":"<p>The Amazon Resource Name (ARN) of the role used in the source account to enable cross-account scraping. For information about the contents of this policy, see <a href=\"https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-collector-how-to.html#cross-account-remote-write\">Cross-account setup</a>.</p>"
16331745
},
16341746
"targetRoleArn":{
16351747
"shape":"IamRoleArn",
1636-
"documentation":"<p>A ARN identifying the target role configuration.</p>"
1748+
"documentation":"<p>The Amazon Resource Name (ARN) of the role used in the target account to enable cross-account scraping. For information about the contents of this policy, see <a href=\"https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-collector-how-to.html#cross-account-remote-write\">Cross-account setup</a>.</p>"
16371749
}
16381750
},
1639-
"documentation":"<p>To configure roles that allows users to write to an Amazon Managed Service for Prometheus workspace in a different account.</p>"
1751+
"documentation":"<p>Use this structure to enable cross-account access, so that you can use a target account to access Prometheus metrics from source accounts.</p>"
16401752
},
16411753
"RuleGroupsNamespaceArn":{
16421754
"type":"string",
@@ -1824,7 +1936,10 @@
18241936
"shape":"IamRoleArn",
18251937
"documentation":"<p>The Amazon Resource Name (ARN) of the IAM role that provides permissions for the scraper to discover and collect metrics on your behalf.</p> <p>For example, <code>arn:aws:iam::123456789012:role/service-role/AmazonGrafanaServiceRole-12example</code>.</p>"
18261938
},
1827-
"roleConfiguration":{"shape":"RoleConfiguration"},
1939+
"roleConfiguration":{
1940+
"shape":"RoleConfiguration",
1941+
"documentation":"<p>This structure displays information about the IAM roles used for cross-account scraping configuration.</p>"
1942+
},
18281943
"scrapeConfiguration":{
18291944
"shape":"ScrapeConfiguration",
18301945
"documentation":"<p>The configuration in use by the scraper.</p>"
@@ -1934,7 +2049,10 @@
19342049
"shape":"IamRoleArn",
19352050
"documentation":"<p>The Amazon Resource Name (ARN) of the IAM role that provides permissions for the scraper to discover and collect metrics on your behalf.</p>"
19362051
},
1937-
"roleConfiguration":{"shape":"RoleConfiguration"},
2052+
"roleConfiguration":{
2053+
"shape":"RoleConfiguration",
2054+
"documentation":"<p>This structure displays information about the IAM roles used for cross-account scraping configuration.</p>"
2055+
},
19382056
"scraperId":{
19392057
"shape":"ScraperId",
19402058
"documentation":"<p>The ID of the scraper.</p>"
@@ -2214,7 +2332,7 @@
22142332
},
22152333
"roleConfiguration":{
22162334
"shape":"RoleConfiguration",
2217-
"documentation":"<p>The scraper role configuration for the workspace.</p>"
2335+
"documentation":"<p>Use this structure to enable cross-account access, so that you can use a target account to access Prometheus metrics from source accounts.</p>"
22182336
},
22192337
"scrapeConfiguration":{
22202338
"shape":"ScrapeConfiguration",
@@ -2276,6 +2394,46 @@
22762394
},
22772395
"documentation":"<p>Represents the input of an <code>UpdateWorkspaceAlias</code> operation.</p>"
22782396
},
2397+
"UpdateWorkspaceConfigurationRequest":{
2398+
"type":"structure",
2399+
"required":["workspaceId"],
2400+
"members":{
2401+
"clientToken":{
2402+
"shape":"IdempotencyToken",
2403+
"documentation":"<p>You can include a token in your operation to make it an idempotent opeartion. </p>",
2404+
"idempotencyToken":true
2405+
},
2406+
"limitsPerLabelSet":{
2407+
"shape":"LimitsPerLabelSetList",
2408+
"documentation":"<p>This is an array of structures, where each structure defines a label set for the workspace, and defines the ingestion limit for active time series for each of those label sets. Each label name in a label set must be unique.</p>"
2409+
},
2410+
"retentionPeriodInDays":{
2411+
"shape":"UpdateWorkspaceConfigurationRequestRetentionPeriodInDaysInteger",
2412+
"documentation":"<p>Specifies how many days that metrics will be retained in the workspace.</p>"
2413+
},
2414+
"workspaceId":{
2415+
"shape":"WorkspaceId",
2416+
"documentation":"<p>The ID of the workspace that you want to update. To find the IDs of your workspaces, use the <a href=\"https://docs.aws.amazon.com/prometheus/latest/APIReference/API_ListWorkspaces.htm\">ListWorkspaces</a> operation.</p>",
2417+
"location":"uri",
2418+
"locationName":"workspaceId"
2419+
}
2420+
}
2421+
},
2422+
"UpdateWorkspaceConfigurationRequestRetentionPeriodInDaysInteger":{
2423+
"type":"integer",
2424+
"box":true,
2425+
"min":1
2426+
},
2427+
"UpdateWorkspaceConfigurationResponse":{
2428+
"type":"structure",
2429+
"required":["status"],
2430+
"members":{
2431+
"status":{
2432+
"shape":"WorkspaceConfigurationStatus",
2433+
"documentation":"<p>The status of the workspace configuration.</p>"
2434+
}
2435+
}
2436+
},
22792437
"Uri":{
22802438
"type":"string",
22812439
"max":1024,
@@ -2352,6 +2510,53 @@
23522510
"documentation":"<p>An ARN identifying a Workspace.</p>",
23532511
"pattern":"^arn:aws[-a-z]*:aps:[-a-z0-9]+:[0-9]{12}:workspace/.+$"
23542512
},
2513+
"WorkspaceConfigurationDescription":{
2514+
"type":"structure",
2515+
"required":["status"],
2516+
"members":{
2517+
"limitsPerLabelSet":{
2518+
"shape":"LimitsPerLabelSetList",
2519+
"documentation":"<p>This is an array of structures, where each structure displays one label sets for the workspace and the limits for that label set.</p>"
2520+
},
2521+
"retentionPeriodInDays":{
2522+
"shape":"WorkspaceConfigurationDescriptionRetentionPeriodInDaysInteger",
2523+
"documentation":"<p>This field displays how many days that metrics are retained in the workspace.</p>"
2524+
},
2525+
"status":{
2526+
"shape":"WorkspaceConfigurationStatus",
2527+
"documentation":"<p>This structure displays the current status of the workspace configuration, and might also contain a reason for that status.</p>"
2528+
}
2529+
},
2530+
"documentation":"<p>This structure contains the description of the workspace configuration.</p>"
2531+
},
2532+
"WorkspaceConfigurationDescriptionRetentionPeriodInDaysInteger":{
2533+
"type":"integer",
2534+
"box":true,
2535+
"min":1
2536+
},
2537+
"WorkspaceConfigurationStatus":{
2538+
"type":"structure",
2539+
"required":["statusCode"],
2540+
"members":{
2541+
"statusCode":{
2542+
"shape":"WorkspaceConfigurationStatusCode",
2543+
"documentation":"<p>The current status of the workspace configuration.</p>"
2544+
},
2545+
"statusReason":{
2546+
"shape":"String",
2547+
"documentation":"<p>The reason for the current status, if a reason is available.</p>"
2548+
}
2549+
},
2550+
"documentation":"<p>This structure displays the current status of the workspace configuration, and might also contain a reason for that status.</p>"
2551+
},
2552+
"WorkspaceConfigurationStatusCode":{
2553+
"type":"string",
2554+
"enum":[
2555+
"ACTIVE",
2556+
"UPDATING",
2557+
"UPDATE_FAILED"
2558+
]
2559+
},
23552560
"WorkspaceDescription":{
23562561
"type":"structure",
23572562
"required":[

0 commit comments

Comments
 (0)