@aws-sdk/client-amp 3.864.0 → 3.869.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/dist-cjs/index.js +157 -1
- package/dist-es/Amp.js +6 -0
- package/dist-es/commands/DeleteResourcePolicyCommand.js +22 -0
- package/dist-es/commands/DescribeResourcePolicyCommand.js +22 -0
- package/dist-es/commands/PutResourcePolicyCommand.js +22 -0
- package/dist-es/commands/index.js +3 -0
- package/dist-es/models/models_0.js +6 -0
- package/dist-es/protocols/Aws_restJson1.js +80 -0
- package/dist-types/Amp.d.ts +21 -0
- package/dist-types/AmpClient.d.ts +5 -2
- package/dist-types/commands/DeleteResourcePolicyCommand.d.ts +90 -0
- package/dist-types/commands/DescribeResourcePolicyCommand.d.ts +89 -0
- package/dist-types/commands/PutResourcePolicyCommand.d.ts +94 -0
- package/dist-types/commands/index.d.ts +3 -0
- package/dist-types/models/models_0.d.ts +116 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +27 -0
- package/dist-types/ts3.4/Amp.d.ts +51 -0
- package/dist-types/ts3.4/AmpClient.d.ts +18 -0
- package/dist-types/ts3.4/commands/DeleteResourcePolicyCommand.d.ts +46 -0
- package/dist-types/ts3.4/commands/DescribeResourcePolicyCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/PutResourcePolicyCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +3 -0
- package/dist-types/ts3.4/models/models_0.d.ts +31 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +36 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -274,6 +274,14 @@ DeleteQueryLoggingConfiguration
|
|
|
274
274
|
|
|
275
275
|
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/amp/command/DeleteQueryLoggingConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/DeleteQueryLoggingConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/DeleteQueryLoggingConfigurationCommandOutput/)
|
|
276
276
|
|
|
277
|
+
</details>
|
|
278
|
+
<details>
|
|
279
|
+
<summary>
|
|
280
|
+
DeleteResourcePolicy
|
|
281
|
+
</summary>
|
|
282
|
+
|
|
283
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/amp/command/DeleteResourcePolicyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/DeleteResourcePolicyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/DeleteResourcePolicyCommandOutput/)
|
|
284
|
+
|
|
277
285
|
</details>
|
|
278
286
|
<details>
|
|
279
287
|
<summary>
|
|
@@ -322,6 +330,14 @@ DescribeQueryLoggingConfiguration
|
|
|
322
330
|
|
|
323
331
|
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/amp/command/DescribeQueryLoggingConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/DescribeQueryLoggingConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/DescribeQueryLoggingConfigurationCommandOutput/)
|
|
324
332
|
|
|
333
|
+
</details>
|
|
334
|
+
<details>
|
|
335
|
+
<summary>
|
|
336
|
+
DescribeResourcePolicy
|
|
337
|
+
</summary>
|
|
338
|
+
|
|
339
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/amp/command/DescribeResourcePolicyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/DescribeResourcePolicyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/DescribeResourcePolicyCommandOutput/)
|
|
340
|
+
|
|
325
341
|
</details>
|
|
326
342
|
<details>
|
|
327
343
|
<summary>
|
|
@@ -402,6 +418,14 @@ PutAlertManagerDefinition
|
|
|
402
418
|
|
|
403
419
|
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/amp/command/PutAlertManagerDefinitionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/PutAlertManagerDefinitionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/PutAlertManagerDefinitionCommandOutput/)
|
|
404
420
|
|
|
421
|
+
</details>
|
|
422
|
+
<details>
|
|
423
|
+
<summary>
|
|
424
|
+
PutResourcePolicy
|
|
425
|
+
</summary>
|
|
426
|
+
|
|
427
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/amp/command/PutResourcePolicyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/PutResourcePolicyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-amp/Interface/PutResourcePolicyCommandOutput/)
|
|
428
|
+
|
|
405
429
|
</details>
|
|
406
430
|
<details>
|
|
407
431
|
<summary>
|
package/dist-cjs/index.js
CHANGED
|
@@ -36,12 +36,14 @@ __export(index_exports, {
|
|
|
36
36
|
DeleteAlertManagerDefinitionCommand: () => DeleteAlertManagerDefinitionCommand,
|
|
37
37
|
DeleteLoggingConfigurationCommand: () => DeleteLoggingConfigurationCommand,
|
|
38
38
|
DeleteQueryLoggingConfigurationCommand: () => DeleteQueryLoggingConfigurationCommand,
|
|
39
|
+
DeleteResourcePolicyCommand: () => DeleteResourcePolicyCommand,
|
|
39
40
|
DeleteRuleGroupsNamespaceCommand: () => DeleteRuleGroupsNamespaceCommand,
|
|
40
41
|
DeleteScraperCommand: () => DeleteScraperCommand,
|
|
41
42
|
DeleteWorkspaceCommand: () => DeleteWorkspaceCommand,
|
|
42
43
|
DescribeAlertManagerDefinitionCommand: () => DescribeAlertManagerDefinitionCommand,
|
|
43
44
|
DescribeLoggingConfigurationCommand: () => DescribeLoggingConfigurationCommand,
|
|
44
45
|
DescribeQueryLoggingConfigurationCommand: () => DescribeQueryLoggingConfigurationCommand,
|
|
46
|
+
DescribeResourcePolicyCommand: () => DescribeResourcePolicyCommand,
|
|
45
47
|
DescribeRuleGroupsNamespaceCommand: () => DescribeRuleGroupsNamespaceCommand,
|
|
46
48
|
DescribeScraperCommand: () => DescribeScraperCommand,
|
|
47
49
|
DescribeWorkspaceCommand: () => DescribeWorkspaceCommand,
|
|
@@ -55,6 +57,7 @@ __export(index_exports, {
|
|
|
55
57
|
ListWorkspacesCommand: () => ListWorkspacesCommand,
|
|
56
58
|
LoggingConfigurationStatusCode: () => LoggingConfigurationStatusCode,
|
|
57
59
|
PutAlertManagerDefinitionCommand: () => PutAlertManagerDefinitionCommand,
|
|
60
|
+
PutResourcePolicyCommand: () => PutResourcePolicyCommand,
|
|
58
61
|
PutRuleGroupsNamespaceCommand: () => PutRuleGroupsNamespaceCommand,
|
|
59
62
|
QueryLoggingConfigurationStatusCode: () => QueryLoggingConfigurationStatusCode,
|
|
60
63
|
ResourceNotFoundException: () => ResourceNotFoundException,
|
|
@@ -74,6 +77,7 @@ __export(index_exports, {
|
|
|
74
77
|
ValidationException: () => ValidationException,
|
|
75
78
|
ValidationExceptionReason: () => ValidationExceptionReason,
|
|
76
79
|
WorkspaceConfigurationStatusCode: () => WorkspaceConfigurationStatusCode,
|
|
80
|
+
WorkspacePolicyStatusCode: () => WorkspacePolicyStatusCode,
|
|
77
81
|
WorkspaceStatusCode: () => WorkspaceStatusCode,
|
|
78
82
|
__Client: () => import_smithy_client.Client,
|
|
79
83
|
paginateListRuleGroupsNamespaces: () => paginateListRuleGroupsNamespaces,
|
|
@@ -670,6 +674,24 @@ var WorkspaceConfigurationStatusCode = {
|
|
|
670
674
|
*/
|
|
671
675
|
UPDATING: "UPDATING"
|
|
672
676
|
};
|
|
677
|
+
var WorkspacePolicyStatusCode = {
|
|
678
|
+
/**
|
|
679
|
+
* Resource-based Policy has been created/updated. Update/Deletion is disallowed until Resource-based Policy is ACTIVE and Workspace is ACTIVE.
|
|
680
|
+
*/
|
|
681
|
+
ACTIVE: "ACTIVE",
|
|
682
|
+
/**
|
|
683
|
+
* Resource-based Policy is being created. Update/Deletion is disallowed until Resource-based Policy is ACTIVE and Workspace is ACTIVE.
|
|
684
|
+
*/
|
|
685
|
+
CREATING: "CREATING",
|
|
686
|
+
/**
|
|
687
|
+
* Resource-based Policy is being deleting. Update/Deletion is disallowed until Resource-based Policy is ACTIVE and Workspace is ACTIVE.
|
|
688
|
+
*/
|
|
689
|
+
DELETING: "DELETING",
|
|
690
|
+
/**
|
|
691
|
+
* Resource-based Policy is being updated. Update/Deletion is disallowed until Resource-based Policy is ACTIVE and Workspace is ACTIVE.
|
|
692
|
+
*/
|
|
693
|
+
UPDATING: "UPDATING"
|
|
694
|
+
};
|
|
673
695
|
|
|
674
696
|
// src/protocols/Aws_restJson1.ts
|
|
675
697
|
var se_CreateAlertManagerDefinitionCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
@@ -817,6 +839,19 @@ var se_DeleteQueryLoggingConfigurationCommand = /* @__PURE__ */ __name(async (in
|
|
|
817
839
|
b.m("DELETE").h(headers).q(query).b(body);
|
|
818
840
|
return b.build();
|
|
819
841
|
}, "se_DeleteQueryLoggingConfigurationCommand");
|
|
842
|
+
var se_DeleteResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
843
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
844
|
+
const headers = {};
|
|
845
|
+
b.bp("/workspaces/{workspaceId}/policy");
|
|
846
|
+
b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
847
|
+
const query = (0, import_smithy_client.map)({
|
|
848
|
+
[_cT]: [, input[_cT] ?? (0, import_uuid.v4)()],
|
|
849
|
+
[_rI]: [, input[_rI]]
|
|
850
|
+
});
|
|
851
|
+
let body;
|
|
852
|
+
b.m("DELETE").h(headers).q(query).b(body);
|
|
853
|
+
return b.build();
|
|
854
|
+
}, "se_DeleteResourcePolicyCommand");
|
|
820
855
|
var se_DeleteRuleGroupsNamespaceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
821
856
|
const b = (0, import_core.requestBuilder)(input, context);
|
|
822
857
|
const headers = {};
|
|
@@ -881,6 +916,15 @@ var se_DescribeQueryLoggingConfigurationCommand = /* @__PURE__ */ __name(async (
|
|
|
881
916
|
b.m("GET").h(headers).b(body);
|
|
882
917
|
return b.build();
|
|
883
918
|
}, "se_DescribeQueryLoggingConfigurationCommand");
|
|
919
|
+
var se_DescribeResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
920
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
921
|
+
const headers = {};
|
|
922
|
+
b.bp("/workspaces/{workspaceId}/policy");
|
|
923
|
+
b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
924
|
+
let body;
|
|
925
|
+
b.m("GET").h(headers).b(body);
|
|
926
|
+
return b.build();
|
|
927
|
+
}, "se_DescribeResourcePolicyCommand");
|
|
884
928
|
var se_DescribeRuleGroupsNamespaceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
885
929
|
const b = (0, import_core.requestBuilder)(input, context);
|
|
886
930
|
const headers = {};
|
|
@@ -992,6 +1036,24 @@ var se_PutAlertManagerDefinitionCommand = /* @__PURE__ */ __name(async (input, c
|
|
|
992
1036
|
b.m("PUT").h(headers).b(body);
|
|
993
1037
|
return b.build();
|
|
994
1038
|
}, "se_PutAlertManagerDefinitionCommand");
|
|
1039
|
+
var se_PutResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
1040
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
1041
|
+
const headers = {
|
|
1042
|
+
"content-type": "application/json"
|
|
1043
|
+
};
|
|
1044
|
+
b.bp("/workspaces/{workspaceId}/policy");
|
|
1045
|
+
b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
1046
|
+
let body;
|
|
1047
|
+
body = JSON.stringify(
|
|
1048
|
+
(0, import_smithy_client.take)(input, {
|
|
1049
|
+
clientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
|
|
1050
|
+
policyDocument: [],
|
|
1051
|
+
revisionId: []
|
|
1052
|
+
})
|
|
1053
|
+
);
|
|
1054
|
+
b.m("PUT").h(headers).b(body);
|
|
1055
|
+
return b.build();
|
|
1056
|
+
}, "se_PutResourcePolicyCommand");
|
|
995
1057
|
var se_PutRuleGroupsNamespaceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
996
1058
|
const b = (0, import_core.requestBuilder)(input, context);
|
|
997
1059
|
const headers = {
|
|
@@ -1251,6 +1313,16 @@ var de_DeleteQueryLoggingConfigurationCommand = /* @__PURE__ */ __name(async (ou
|
|
|
1251
1313
|
await (0, import_smithy_client.collectBody)(output.body, context);
|
|
1252
1314
|
return contents;
|
|
1253
1315
|
}, "de_DeleteQueryLoggingConfigurationCommand");
|
|
1316
|
+
var de_DeleteResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
1317
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1318
|
+
return de_CommandError(output, context);
|
|
1319
|
+
}
|
|
1320
|
+
const contents = (0, import_smithy_client.map)({
|
|
1321
|
+
$metadata: deserializeMetadata(output)
|
|
1322
|
+
});
|
|
1323
|
+
await (0, import_smithy_client.collectBody)(output.body, context);
|
|
1324
|
+
return contents;
|
|
1325
|
+
}, "de_DeleteResourcePolicyCommand");
|
|
1254
1326
|
var de_DeleteRuleGroupsNamespaceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
1255
1327
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1256
1328
|
return de_CommandError(output, context);
|
|
@@ -1328,6 +1400,22 @@ var de_DescribeQueryLoggingConfigurationCommand = /* @__PURE__ */ __name(async (
|
|
|
1328
1400
|
Object.assign(contents, doc);
|
|
1329
1401
|
return contents;
|
|
1330
1402
|
}, "de_DescribeQueryLoggingConfigurationCommand");
|
|
1403
|
+
var de_DescribeResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
1404
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1405
|
+
return de_CommandError(output, context);
|
|
1406
|
+
}
|
|
1407
|
+
const contents = (0, import_smithy_client.map)({
|
|
1408
|
+
$metadata: deserializeMetadata(output)
|
|
1409
|
+
});
|
|
1410
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1411
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
1412
|
+
policyDocument: import_smithy_client.expectString,
|
|
1413
|
+
policyStatus: import_smithy_client.expectString,
|
|
1414
|
+
revisionId: import_smithy_client.expectString
|
|
1415
|
+
});
|
|
1416
|
+
Object.assign(contents, doc);
|
|
1417
|
+
return contents;
|
|
1418
|
+
}, "de_DescribeResourcePolicyCommand");
|
|
1331
1419
|
var de_DescribeRuleGroupsNamespaceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
1332
1420
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1333
1421
|
return de_CommandError(output, context);
|
|
@@ -1471,6 +1559,21 @@ var de_PutAlertManagerDefinitionCommand = /* @__PURE__ */ __name(async (output,
|
|
|
1471
1559
|
Object.assign(contents, doc);
|
|
1472
1560
|
return contents;
|
|
1473
1561
|
}, "de_PutAlertManagerDefinitionCommand");
|
|
1562
|
+
var de_PutResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
1563
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1564
|
+
return de_CommandError(output, context);
|
|
1565
|
+
}
|
|
1566
|
+
const contents = (0, import_smithy_client.map)({
|
|
1567
|
+
$metadata: deserializeMetadata(output)
|
|
1568
|
+
});
|
|
1569
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
1570
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
1571
|
+
policyStatus: import_smithy_client.expectString,
|
|
1572
|
+
revisionId: import_smithy_client.expectString
|
|
1573
|
+
});
|
|
1574
|
+
Object.assign(contents, doc);
|
|
1575
|
+
return contents;
|
|
1576
|
+
}, "de_PutResourcePolicyCommand");
|
|
1474
1577
|
var de_PutRuleGroupsNamespaceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
1475
1578
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1476
1579
|
return de_CommandError(output, context);
|
|
@@ -1869,6 +1972,7 @@ var _mR = "maxResults";
|
|
|
1869
1972
|
var _n = "name";
|
|
1870
1973
|
var _nT = "nextToken";
|
|
1871
1974
|
var _rAS = "retryAfterSeconds";
|
|
1975
|
+
var _rI = "revisionId";
|
|
1872
1976
|
var _ra = "retry-after";
|
|
1873
1977
|
var _tK = "tagKeys";
|
|
1874
1978
|
|
|
@@ -2004,6 +2108,21 @@ var DeleteQueryLoggingConfigurationCommand = class extends import_smithy_client.
|
|
|
2004
2108
|
}
|
|
2005
2109
|
};
|
|
2006
2110
|
|
|
2111
|
+
// src/commands/DeleteResourcePolicyCommand.ts
|
|
2112
|
+
|
|
2113
|
+
|
|
2114
|
+
|
|
2115
|
+
var DeleteResourcePolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
|
|
2116
|
+
return [
|
|
2117
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
2118
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
2119
|
+
];
|
|
2120
|
+
}).s("AmazonPrometheusService", "DeleteResourcePolicy", {}).n("AmpClient", "DeleteResourcePolicyCommand").f(void 0, void 0).ser(se_DeleteResourcePolicyCommand).de(de_DeleteResourcePolicyCommand).build() {
|
|
2121
|
+
static {
|
|
2122
|
+
__name(this, "DeleteResourcePolicyCommand");
|
|
2123
|
+
}
|
|
2124
|
+
};
|
|
2125
|
+
|
|
2007
2126
|
// src/commands/DeleteRuleGroupsNamespaceCommand.ts
|
|
2008
2127
|
|
|
2009
2128
|
|
|
@@ -2094,6 +2213,21 @@ var DescribeQueryLoggingConfigurationCommand = class extends import_smithy_clien
|
|
|
2094
2213
|
}
|
|
2095
2214
|
};
|
|
2096
2215
|
|
|
2216
|
+
// src/commands/DescribeResourcePolicyCommand.ts
|
|
2217
|
+
|
|
2218
|
+
|
|
2219
|
+
|
|
2220
|
+
var DescribeResourcePolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
|
|
2221
|
+
return [
|
|
2222
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
2223
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
2224
|
+
];
|
|
2225
|
+
}).s("AmazonPrometheusService", "DescribeResourcePolicy", {}).n("AmpClient", "DescribeResourcePolicyCommand").f(void 0, void 0).ser(se_DescribeResourcePolicyCommand).de(de_DescribeResourcePolicyCommand).build() {
|
|
2226
|
+
static {
|
|
2227
|
+
__name(this, "DescribeResourcePolicyCommand");
|
|
2228
|
+
}
|
|
2229
|
+
};
|
|
2230
|
+
|
|
2097
2231
|
// src/commands/DescribeRuleGroupsNamespaceCommand.ts
|
|
2098
2232
|
|
|
2099
2233
|
|
|
@@ -2244,6 +2378,21 @@ var PutAlertManagerDefinitionCommand = class extends import_smithy_client.Comman
|
|
|
2244
2378
|
}
|
|
2245
2379
|
};
|
|
2246
2380
|
|
|
2381
|
+
// src/commands/PutResourcePolicyCommand.ts
|
|
2382
|
+
|
|
2383
|
+
|
|
2384
|
+
|
|
2385
|
+
var PutResourcePolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
|
|
2386
|
+
return [
|
|
2387
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
2388
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
2389
|
+
];
|
|
2390
|
+
}).s("AmazonPrometheusService", "PutResourcePolicy", {}).n("AmpClient", "PutResourcePolicyCommand").f(void 0, void 0).ser(se_PutResourcePolicyCommand).de(de_PutResourcePolicyCommand).build() {
|
|
2391
|
+
static {
|
|
2392
|
+
__name(this, "PutResourcePolicyCommand");
|
|
2393
|
+
}
|
|
2394
|
+
};
|
|
2395
|
+
|
|
2247
2396
|
// src/commands/PutRuleGroupsNamespaceCommand.ts
|
|
2248
2397
|
|
|
2249
2398
|
|
|
@@ -2375,12 +2524,14 @@ var commands = {
|
|
|
2375
2524
|
DeleteAlertManagerDefinitionCommand,
|
|
2376
2525
|
DeleteLoggingConfigurationCommand,
|
|
2377
2526
|
DeleteQueryLoggingConfigurationCommand,
|
|
2527
|
+
DeleteResourcePolicyCommand,
|
|
2378
2528
|
DeleteRuleGroupsNamespaceCommand,
|
|
2379
2529
|
DeleteScraperCommand,
|
|
2380
2530
|
DeleteWorkspaceCommand,
|
|
2381
2531
|
DescribeAlertManagerDefinitionCommand,
|
|
2382
2532
|
DescribeLoggingConfigurationCommand,
|
|
2383
2533
|
DescribeQueryLoggingConfigurationCommand,
|
|
2534
|
+
DescribeResourcePolicyCommand,
|
|
2384
2535
|
DescribeRuleGroupsNamespaceCommand,
|
|
2385
2536
|
DescribeScraperCommand,
|
|
2386
2537
|
DescribeWorkspaceCommand,
|
|
@@ -2391,6 +2542,7 @@ var commands = {
|
|
|
2391
2542
|
ListTagsForResourceCommand,
|
|
2392
2543
|
ListWorkspacesCommand,
|
|
2393
2544
|
PutAlertManagerDefinitionCommand,
|
|
2545
|
+
PutResourcePolicyCommand,
|
|
2394
2546
|
PutRuleGroupsNamespaceCommand,
|
|
2395
2547
|
TagResourceCommand,
|
|
2396
2548
|
UntagResourceCommand,
|
|
@@ -2592,12 +2744,14 @@ var waitUntilWorkspaceDeleted = /* @__PURE__ */ __name(async (params, input) =>
|
|
|
2592
2744
|
DeleteAlertManagerDefinitionCommand,
|
|
2593
2745
|
DeleteLoggingConfigurationCommand,
|
|
2594
2746
|
DeleteQueryLoggingConfigurationCommand,
|
|
2747
|
+
DeleteResourcePolicyCommand,
|
|
2595
2748
|
DeleteRuleGroupsNamespaceCommand,
|
|
2596
2749
|
DeleteScraperCommand,
|
|
2597
2750
|
DeleteWorkspaceCommand,
|
|
2598
2751
|
DescribeAlertManagerDefinitionCommand,
|
|
2599
2752
|
DescribeLoggingConfigurationCommand,
|
|
2600
2753
|
DescribeQueryLoggingConfigurationCommand,
|
|
2754
|
+
DescribeResourcePolicyCommand,
|
|
2601
2755
|
DescribeRuleGroupsNamespaceCommand,
|
|
2602
2756
|
DescribeScraperCommand,
|
|
2603
2757
|
DescribeWorkspaceCommand,
|
|
@@ -2608,6 +2762,7 @@ var waitUntilWorkspaceDeleted = /* @__PURE__ */ __name(async (params, input) =>
|
|
|
2608
2762
|
ListTagsForResourceCommand,
|
|
2609
2763
|
ListWorkspacesCommand,
|
|
2610
2764
|
PutAlertManagerDefinitionCommand,
|
|
2765
|
+
PutResourcePolicyCommand,
|
|
2611
2766
|
PutRuleGroupsNamespaceCommand,
|
|
2612
2767
|
TagResourceCommand,
|
|
2613
2768
|
UntagResourceCommand,
|
|
@@ -2644,6 +2799,7 @@ var waitUntilWorkspaceDeleted = /* @__PURE__ */ __name(async (params, input) =>
|
|
|
2644
2799
|
LoggingConfigurationStatusCode,
|
|
2645
2800
|
QueryLoggingConfigurationStatusCode,
|
|
2646
2801
|
RuleGroupsNamespaceStatusCode,
|
|
2647
|
-
WorkspaceConfigurationStatusCode
|
|
2802
|
+
WorkspaceConfigurationStatusCode,
|
|
2803
|
+
WorkspacePolicyStatusCode
|
|
2648
2804
|
});
|
|
2649
2805
|
|
package/dist-es/Amp.js
CHANGED
|
@@ -9,12 +9,14 @@ import { CreateWorkspaceCommand, } from "./commands/CreateWorkspaceCommand";
|
|
|
9
9
|
import { DeleteAlertManagerDefinitionCommand, } from "./commands/DeleteAlertManagerDefinitionCommand";
|
|
10
10
|
import { DeleteLoggingConfigurationCommand, } from "./commands/DeleteLoggingConfigurationCommand";
|
|
11
11
|
import { DeleteQueryLoggingConfigurationCommand, } from "./commands/DeleteQueryLoggingConfigurationCommand";
|
|
12
|
+
import { DeleteResourcePolicyCommand, } from "./commands/DeleteResourcePolicyCommand";
|
|
12
13
|
import { DeleteRuleGroupsNamespaceCommand, } from "./commands/DeleteRuleGroupsNamespaceCommand";
|
|
13
14
|
import { DeleteScraperCommand, } from "./commands/DeleteScraperCommand";
|
|
14
15
|
import { DeleteWorkspaceCommand, } from "./commands/DeleteWorkspaceCommand";
|
|
15
16
|
import { DescribeAlertManagerDefinitionCommand, } from "./commands/DescribeAlertManagerDefinitionCommand";
|
|
16
17
|
import { DescribeLoggingConfigurationCommand, } from "./commands/DescribeLoggingConfigurationCommand";
|
|
17
18
|
import { DescribeQueryLoggingConfigurationCommand, } from "./commands/DescribeQueryLoggingConfigurationCommand";
|
|
19
|
+
import { DescribeResourcePolicyCommand, } from "./commands/DescribeResourcePolicyCommand";
|
|
18
20
|
import { DescribeRuleGroupsNamespaceCommand, } from "./commands/DescribeRuleGroupsNamespaceCommand";
|
|
19
21
|
import { DescribeScraperCommand, } from "./commands/DescribeScraperCommand";
|
|
20
22
|
import { DescribeWorkspaceCommand, } from "./commands/DescribeWorkspaceCommand";
|
|
@@ -25,6 +27,7 @@ import { ListScrapersCommand, } from "./commands/ListScrapersCommand";
|
|
|
25
27
|
import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
|
|
26
28
|
import { ListWorkspacesCommand, } from "./commands/ListWorkspacesCommand";
|
|
27
29
|
import { PutAlertManagerDefinitionCommand, } from "./commands/PutAlertManagerDefinitionCommand";
|
|
30
|
+
import { PutResourcePolicyCommand, } from "./commands/PutResourcePolicyCommand";
|
|
28
31
|
import { PutRuleGroupsNamespaceCommand, } from "./commands/PutRuleGroupsNamespaceCommand";
|
|
29
32
|
import { TagResourceCommand } from "./commands/TagResourceCommand";
|
|
30
33
|
import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
|
|
@@ -43,12 +46,14 @@ const commands = {
|
|
|
43
46
|
DeleteAlertManagerDefinitionCommand,
|
|
44
47
|
DeleteLoggingConfigurationCommand,
|
|
45
48
|
DeleteQueryLoggingConfigurationCommand,
|
|
49
|
+
DeleteResourcePolicyCommand,
|
|
46
50
|
DeleteRuleGroupsNamespaceCommand,
|
|
47
51
|
DeleteScraperCommand,
|
|
48
52
|
DeleteWorkspaceCommand,
|
|
49
53
|
DescribeAlertManagerDefinitionCommand,
|
|
50
54
|
DescribeLoggingConfigurationCommand,
|
|
51
55
|
DescribeQueryLoggingConfigurationCommand,
|
|
56
|
+
DescribeResourcePolicyCommand,
|
|
52
57
|
DescribeRuleGroupsNamespaceCommand,
|
|
53
58
|
DescribeScraperCommand,
|
|
54
59
|
DescribeWorkspaceCommand,
|
|
@@ -59,6 +64,7 @@ const commands = {
|
|
|
59
64
|
ListTagsForResourceCommand,
|
|
60
65
|
ListWorkspacesCommand,
|
|
61
66
|
PutAlertManagerDefinitionCommand,
|
|
67
|
+
PutResourcePolicyCommand,
|
|
62
68
|
PutRuleGroupsNamespaceCommand,
|
|
63
69
|
TagResourceCommand,
|
|
64
70
|
UntagResourceCommand,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
+
import { de_DeleteResourcePolicyCommand, se_DeleteResourcePolicyCommand } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class DeleteResourcePolicyCommand extends $Command
|
|
8
|
+
.classBuilder()
|
|
9
|
+
.ep(commonParams)
|
|
10
|
+
.m(function (Command, cs, config, o) {
|
|
11
|
+
return [
|
|
12
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
13
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
14
|
+
];
|
|
15
|
+
})
|
|
16
|
+
.s("AmazonPrometheusService", "DeleteResourcePolicy", {})
|
|
17
|
+
.n("AmpClient", "DeleteResourcePolicyCommand")
|
|
18
|
+
.f(void 0, void 0)
|
|
19
|
+
.ser(se_DeleteResourcePolicyCommand)
|
|
20
|
+
.de(de_DeleteResourcePolicyCommand)
|
|
21
|
+
.build() {
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
+
import { de_DescribeResourcePolicyCommand, se_DescribeResourcePolicyCommand } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class DescribeResourcePolicyCommand extends $Command
|
|
8
|
+
.classBuilder()
|
|
9
|
+
.ep(commonParams)
|
|
10
|
+
.m(function (Command, cs, config, o) {
|
|
11
|
+
return [
|
|
12
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
13
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
14
|
+
];
|
|
15
|
+
})
|
|
16
|
+
.s("AmazonPrometheusService", "DescribeResourcePolicy", {})
|
|
17
|
+
.n("AmpClient", "DescribeResourcePolicyCommand")
|
|
18
|
+
.f(void 0, void 0)
|
|
19
|
+
.ser(se_DescribeResourcePolicyCommand)
|
|
20
|
+
.de(de_DescribeResourcePolicyCommand)
|
|
21
|
+
.build() {
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
+
import { de_PutResourcePolicyCommand, se_PutResourcePolicyCommand } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class PutResourcePolicyCommand extends $Command
|
|
8
|
+
.classBuilder()
|
|
9
|
+
.ep(commonParams)
|
|
10
|
+
.m(function (Command, cs, config, o) {
|
|
11
|
+
return [
|
|
12
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
13
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
14
|
+
];
|
|
15
|
+
})
|
|
16
|
+
.s("AmazonPrometheusService", "PutResourcePolicy", {})
|
|
17
|
+
.n("AmpClient", "PutResourcePolicyCommand")
|
|
18
|
+
.f(void 0, void 0)
|
|
19
|
+
.ser(se_PutResourcePolicyCommand)
|
|
20
|
+
.de(de_PutResourcePolicyCommand)
|
|
21
|
+
.build() {
|
|
22
|
+
}
|
|
@@ -7,12 +7,14 @@ export * from "./CreateWorkspaceCommand";
|
|
|
7
7
|
export * from "./DeleteAlertManagerDefinitionCommand";
|
|
8
8
|
export * from "./DeleteLoggingConfigurationCommand";
|
|
9
9
|
export * from "./DeleteQueryLoggingConfigurationCommand";
|
|
10
|
+
export * from "./DeleteResourcePolicyCommand";
|
|
10
11
|
export * from "./DeleteRuleGroupsNamespaceCommand";
|
|
11
12
|
export * from "./DeleteScraperCommand";
|
|
12
13
|
export * from "./DeleteWorkspaceCommand";
|
|
13
14
|
export * from "./DescribeAlertManagerDefinitionCommand";
|
|
14
15
|
export * from "./DescribeLoggingConfigurationCommand";
|
|
15
16
|
export * from "./DescribeQueryLoggingConfigurationCommand";
|
|
17
|
+
export * from "./DescribeResourcePolicyCommand";
|
|
16
18
|
export * from "./DescribeRuleGroupsNamespaceCommand";
|
|
17
19
|
export * from "./DescribeScraperCommand";
|
|
18
20
|
export * from "./DescribeWorkspaceCommand";
|
|
@@ -23,6 +25,7 @@ export * from "./ListScrapersCommand";
|
|
|
23
25
|
export * from "./ListTagsForResourceCommand";
|
|
24
26
|
export * from "./ListWorkspacesCommand";
|
|
25
27
|
export * from "./PutAlertManagerDefinitionCommand";
|
|
28
|
+
export * from "./PutResourcePolicyCommand";
|
|
26
29
|
export * from "./PutRuleGroupsNamespaceCommand";
|
|
27
30
|
export * from "./TagResourceCommand";
|
|
28
31
|
export * from "./UntagResourceCommand";
|
|
@@ -196,3 +196,9 @@ export const WorkspaceConfigurationStatusCode = {
|
|
|
196
196
|
UPDATE_FAILED: "UPDATE_FAILED",
|
|
197
197
|
UPDATING: "UPDATING",
|
|
198
198
|
};
|
|
199
|
+
export const WorkspacePolicyStatusCode = {
|
|
200
|
+
ACTIVE: "ACTIVE",
|
|
201
|
+
CREATING: "CREATING",
|
|
202
|
+
DELETING: "DELETING",
|
|
203
|
+
UPDATING: "UPDATING",
|
|
204
|
+
};
|
|
@@ -137,6 +137,19 @@ export const se_DeleteQueryLoggingConfigurationCommand = async (input, context)
|
|
|
137
137
|
b.m("DELETE").h(headers).q(query).b(body);
|
|
138
138
|
return b.build();
|
|
139
139
|
};
|
|
140
|
+
export const se_DeleteResourcePolicyCommand = async (input, context) => {
|
|
141
|
+
const b = rb(input, context);
|
|
142
|
+
const headers = {};
|
|
143
|
+
b.bp("/workspaces/{workspaceId}/policy");
|
|
144
|
+
b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
145
|
+
const query = map({
|
|
146
|
+
[_cT]: [, input[_cT] ?? generateIdempotencyToken()],
|
|
147
|
+
[_rI]: [, input[_rI]],
|
|
148
|
+
});
|
|
149
|
+
let body;
|
|
150
|
+
b.m("DELETE").h(headers).q(query).b(body);
|
|
151
|
+
return b.build();
|
|
152
|
+
};
|
|
140
153
|
export const se_DeleteRuleGroupsNamespaceCommand = async (input, context) => {
|
|
141
154
|
const b = rb(input, context);
|
|
142
155
|
const headers = {};
|
|
@@ -201,6 +214,15 @@ export const se_DescribeQueryLoggingConfigurationCommand = async (input, context
|
|
|
201
214
|
b.m("GET").h(headers).b(body);
|
|
202
215
|
return b.build();
|
|
203
216
|
};
|
|
217
|
+
export const se_DescribeResourcePolicyCommand = async (input, context) => {
|
|
218
|
+
const b = rb(input, context);
|
|
219
|
+
const headers = {};
|
|
220
|
+
b.bp("/workspaces/{workspaceId}/policy");
|
|
221
|
+
b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
222
|
+
let body;
|
|
223
|
+
b.m("GET").h(headers).b(body);
|
|
224
|
+
return b.build();
|
|
225
|
+
};
|
|
204
226
|
export const se_DescribeRuleGroupsNamespaceCommand = async (input, context) => {
|
|
205
227
|
const b = rb(input, context);
|
|
206
228
|
const headers = {};
|
|
@@ -310,6 +332,22 @@ export const se_PutAlertManagerDefinitionCommand = async (input, context) => {
|
|
|
310
332
|
b.m("PUT").h(headers).b(body);
|
|
311
333
|
return b.build();
|
|
312
334
|
};
|
|
335
|
+
export const se_PutResourcePolicyCommand = async (input, context) => {
|
|
336
|
+
const b = rb(input, context);
|
|
337
|
+
const headers = {
|
|
338
|
+
"content-type": "application/json",
|
|
339
|
+
};
|
|
340
|
+
b.bp("/workspaces/{workspaceId}/policy");
|
|
341
|
+
b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
342
|
+
let body;
|
|
343
|
+
body = JSON.stringify(take(input, {
|
|
344
|
+
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
345
|
+
policyDocument: [],
|
|
346
|
+
revisionId: [],
|
|
347
|
+
}));
|
|
348
|
+
b.m("PUT").h(headers).b(body);
|
|
349
|
+
return b.build();
|
|
350
|
+
};
|
|
313
351
|
export const se_PutRuleGroupsNamespaceCommand = async (input, context) => {
|
|
314
352
|
const b = rb(input, context);
|
|
315
353
|
const headers = {
|
|
@@ -555,6 +593,16 @@ export const de_DeleteQueryLoggingConfigurationCommand = async (output, context)
|
|
|
555
593
|
await collectBody(output.body, context);
|
|
556
594
|
return contents;
|
|
557
595
|
};
|
|
596
|
+
export const de_DeleteResourcePolicyCommand = async (output, context) => {
|
|
597
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
598
|
+
return de_CommandError(output, context);
|
|
599
|
+
}
|
|
600
|
+
const contents = map({
|
|
601
|
+
$metadata: deserializeMetadata(output),
|
|
602
|
+
});
|
|
603
|
+
await collectBody(output.body, context);
|
|
604
|
+
return contents;
|
|
605
|
+
};
|
|
558
606
|
export const de_DeleteRuleGroupsNamespaceCommand = async (output, context) => {
|
|
559
607
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
560
608
|
return de_CommandError(output, context);
|
|
@@ -632,6 +680,22 @@ export const de_DescribeQueryLoggingConfigurationCommand = async (output, contex
|
|
|
632
680
|
Object.assign(contents, doc);
|
|
633
681
|
return contents;
|
|
634
682
|
};
|
|
683
|
+
export const de_DescribeResourcePolicyCommand = async (output, context) => {
|
|
684
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
685
|
+
return de_CommandError(output, context);
|
|
686
|
+
}
|
|
687
|
+
const contents = map({
|
|
688
|
+
$metadata: deserializeMetadata(output),
|
|
689
|
+
});
|
|
690
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
691
|
+
const doc = take(data, {
|
|
692
|
+
policyDocument: __expectString,
|
|
693
|
+
policyStatus: __expectString,
|
|
694
|
+
revisionId: __expectString,
|
|
695
|
+
});
|
|
696
|
+
Object.assign(contents, doc);
|
|
697
|
+
return contents;
|
|
698
|
+
};
|
|
635
699
|
export const de_DescribeRuleGroupsNamespaceCommand = async (output, context) => {
|
|
636
700
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
637
701
|
return de_CommandError(output, context);
|
|
@@ -775,6 +839,21 @@ export const de_PutAlertManagerDefinitionCommand = async (output, context) => {
|
|
|
775
839
|
Object.assign(contents, doc);
|
|
776
840
|
return contents;
|
|
777
841
|
};
|
|
842
|
+
export const de_PutResourcePolicyCommand = async (output, context) => {
|
|
843
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
844
|
+
return de_CommandError(output, context);
|
|
845
|
+
}
|
|
846
|
+
const contents = map({
|
|
847
|
+
$metadata: deserializeMetadata(output),
|
|
848
|
+
});
|
|
849
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
850
|
+
const doc = take(data, {
|
|
851
|
+
policyStatus: __expectString,
|
|
852
|
+
revisionId: __expectString,
|
|
853
|
+
});
|
|
854
|
+
Object.assign(contents, doc);
|
|
855
|
+
return contents;
|
|
856
|
+
};
|
|
778
857
|
export const de_PutRuleGroupsNamespaceCommand = async (output, context) => {
|
|
779
858
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
780
859
|
return de_CommandError(output, context);
|
|
@@ -1180,5 +1259,6 @@ const _mR = "maxResults";
|
|
|
1180
1259
|
const _n = "name";
|
|
1181
1260
|
const _nT = "nextToken";
|
|
1182
1261
|
const _rAS = "retryAfterSeconds";
|
|
1262
|
+
const _rI = "revisionId";
|
|
1183
1263
|
const _ra = "retry-after";
|
|
1184
1264
|
const _tK = "tagKeys";
|