@aws-sdk/client-rum 3.758.0 → 3.760.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.
@@ -2,7 +2,7 @@ import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody a
2
2
  import { requestBuilder as rb } from "@smithy/core";
3
3
  import { isValidHostname as __isValidHostname, } from "@smithy/protocol-http";
4
4
  import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, LazyJsonString as __LazyJsonString, limitedParseDouble as __limitedParseDouble, map, serializeFloat as __serializeFloat, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
5
- import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
5
+ import { AccessDeniedException, ConflictException, InternalServerException, InvalidPolicyRevisionIdException, MalformedPolicyDocumentException, PolicyNotFoundException, PolicySizeLimitExceededException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
6
  import { RUMServiceException as __BaseException } from "../models/RUMServiceException";
7
7
  export const se_BatchCreateRumMetricDefinitionsCommand = async (input, context) => {
8
8
  const b = rb(input, context);
@@ -76,6 +76,18 @@ export const se_DeleteAppMonitorCommand = async (input, context) => {
76
76
  b.m("DELETE").h(headers).b(body);
77
77
  return b.build();
78
78
  };
79
+ export const se_DeleteResourcePolicyCommand = async (input, context) => {
80
+ const b = rb(input, context);
81
+ const headers = {};
82
+ b.bp("/appmonitor/{Name}/policy");
83
+ b.p("Name", () => input.Name, "{Name}", false);
84
+ const query = map({
85
+ [_pRI]: [, input[_PRI]],
86
+ });
87
+ let body;
88
+ b.m("DELETE").h(headers).q(query).b(body);
89
+ return b.build();
90
+ };
79
91
  export const se_DeleteRumMetricsDestinationCommand = async (input, context) => {
80
92
  const b = rb(input, context);
81
93
  const headers = {};
@@ -115,6 +127,15 @@ export const se_GetAppMonitorDataCommand = async (input, context) => {
115
127
  b.m("POST").h(headers).b(body);
116
128
  return b.build();
117
129
  };
130
+ export const se_GetResourcePolicyCommand = async (input, context) => {
131
+ const b = rb(input, context);
132
+ const headers = {};
133
+ b.bp("/appmonitor/{Name}/policy");
134
+ b.p("Name", () => input.Name, "{Name}", false);
135
+ let body;
136
+ b.m("GET").h(headers).b(body);
137
+ return b.build();
138
+ };
118
139
  export const se_ListAppMonitorsCommand = async (input, context) => {
119
140
  const b = rb(input, context);
120
141
  const headers = {};
@@ -149,6 +170,21 @@ export const se_ListTagsForResourceCommand = async (input, context) => {
149
170
  b.m("GET").h(headers).b(body);
150
171
  return b.build();
151
172
  };
173
+ export const se_PutResourcePolicyCommand = async (input, context) => {
174
+ const b = rb(input, context);
175
+ const headers = {
176
+ "content-type": "application/json",
177
+ };
178
+ b.bp("/appmonitor/{Name}/policy");
179
+ b.p("Name", () => input.Name, "{Name}", false);
180
+ let body;
181
+ body = JSON.stringify(take(input, {
182
+ PolicyDocument: [],
183
+ PolicyRevisionId: [],
184
+ }));
185
+ b.m("PUT").h(headers).b(body);
186
+ return b.build();
187
+ };
152
188
  export const se_PutRumEventsCommand = async (input, context) => {
153
189
  const b = rb(input, context);
154
190
  const headers = {
@@ -158,6 +194,7 @@ export const se_PutRumEventsCommand = async (input, context) => {
158
194
  b.p("Id", () => input.Id, "{Id}", false);
159
195
  let body;
160
196
  body = JSON.stringify(take(input, {
197
+ Alias: [],
161
198
  AppMonitorDetails: (_) => _json(_),
162
199
  BatchId: [],
163
200
  RumEvents: (_) => se_RumEventList(_, context),
@@ -319,6 +356,20 @@ export const de_DeleteAppMonitorCommand = async (output, context) => {
319
356
  await collectBody(output.body, context);
320
357
  return contents;
321
358
  };
359
+ export const de_DeleteResourcePolicyCommand = async (output, context) => {
360
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
361
+ return de_CommandError(output, context);
362
+ }
363
+ const contents = map({
364
+ $metadata: deserializeMetadata(output),
365
+ });
366
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
367
+ const doc = take(data, {
368
+ PolicyRevisionId: __expectString,
369
+ });
370
+ Object.assign(contents, doc);
371
+ return contents;
372
+ };
322
373
  export const de_DeleteRumMetricsDestinationCommand = async (output, context) => {
323
374
  if (output.statusCode !== 200 && output.statusCode >= 300) {
324
375
  return de_CommandError(output, context);
@@ -358,6 +409,21 @@ export const de_GetAppMonitorDataCommand = async (output, context) => {
358
409
  Object.assign(contents, doc);
359
410
  return contents;
360
411
  };
412
+ export const de_GetResourcePolicyCommand = async (output, context) => {
413
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
414
+ return de_CommandError(output, context);
415
+ }
416
+ const contents = map({
417
+ $metadata: deserializeMetadata(output),
418
+ });
419
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
420
+ const doc = take(data, {
421
+ PolicyDocument: __expectString,
422
+ PolicyRevisionId: __expectString,
423
+ });
424
+ Object.assign(contents, doc);
425
+ return contents;
426
+ };
361
427
  export const de_ListAppMonitorsCommand = async (output, context) => {
362
428
  if (output.statusCode !== 200 && output.statusCode >= 300) {
363
429
  return de_CommandError(output, context);
@@ -403,6 +469,21 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
403
469
  Object.assign(contents, doc);
404
470
  return contents;
405
471
  };
472
+ export const de_PutResourcePolicyCommand = async (output, context) => {
473
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
474
+ return de_CommandError(output, context);
475
+ }
476
+ const contents = map({
477
+ $metadata: deserializeMetadata(output),
478
+ });
479
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
480
+ const doc = take(data, {
481
+ PolicyDocument: __expectString,
482
+ PolicyRevisionId: __expectString,
483
+ });
484
+ Object.assign(contents, doc);
485
+ return contents;
486
+ };
406
487
  export const de_PutRumEventsCommand = async (output, context) => {
407
488
  if (output.statusCode !== 200 && output.statusCode >= 300) {
408
489
  return de_CommandError(output, context);
@@ -491,6 +572,18 @@ const de_CommandError = async (output, context) => {
491
572
  case "ValidationException":
492
573
  case "com.amazonaws.rum#ValidationException":
493
574
  throw await de_ValidationExceptionRes(parsedOutput, context);
575
+ case "InvalidPolicyRevisionIdException":
576
+ case "com.amazonaws.rum#InvalidPolicyRevisionIdException":
577
+ throw await de_InvalidPolicyRevisionIdExceptionRes(parsedOutput, context);
578
+ case "PolicyNotFoundException":
579
+ case "com.amazonaws.rum#PolicyNotFoundException":
580
+ throw await de_PolicyNotFoundExceptionRes(parsedOutput, context);
581
+ case "MalformedPolicyDocumentException":
582
+ case "com.amazonaws.rum#MalformedPolicyDocumentException":
583
+ throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
584
+ case "PolicySizeLimitExceededException":
585
+ case "com.amazonaws.rum#PolicySizeLimitExceededException":
586
+ throw await de_PolicySizeLimitExceededExceptionRes(parsedOutput, context);
494
587
  default:
495
588
  const parsedBody = parsedOutput.body;
496
589
  return throwDefaultError({
@@ -544,6 +637,58 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
544
637
  });
545
638
  return __decorateServiceException(exception, parsedOutput.body);
546
639
  };
640
+ const de_InvalidPolicyRevisionIdExceptionRes = async (parsedOutput, context) => {
641
+ const contents = map({});
642
+ const data = parsedOutput.body;
643
+ const doc = take(data, {
644
+ message: __expectString,
645
+ });
646
+ Object.assign(contents, doc);
647
+ const exception = new InvalidPolicyRevisionIdException({
648
+ $metadata: deserializeMetadata(parsedOutput),
649
+ ...contents,
650
+ });
651
+ return __decorateServiceException(exception, parsedOutput.body);
652
+ };
653
+ const de_MalformedPolicyDocumentExceptionRes = async (parsedOutput, context) => {
654
+ const contents = map({});
655
+ const data = parsedOutput.body;
656
+ const doc = take(data, {
657
+ message: __expectString,
658
+ });
659
+ Object.assign(contents, doc);
660
+ const exception = new MalformedPolicyDocumentException({
661
+ $metadata: deserializeMetadata(parsedOutput),
662
+ ...contents,
663
+ });
664
+ return __decorateServiceException(exception, parsedOutput.body);
665
+ };
666
+ const de_PolicyNotFoundExceptionRes = async (parsedOutput, context) => {
667
+ const contents = map({});
668
+ const data = parsedOutput.body;
669
+ const doc = take(data, {
670
+ message: __expectString,
671
+ });
672
+ Object.assign(contents, doc);
673
+ const exception = new PolicyNotFoundException({
674
+ $metadata: deserializeMetadata(parsedOutput),
675
+ ...contents,
676
+ });
677
+ return __decorateServiceException(exception, parsedOutput.body);
678
+ };
679
+ const de_PolicySizeLimitExceededExceptionRes = async (parsedOutput, context) => {
680
+ const contents = map({});
681
+ const data = parsedOutput.body;
682
+ const doc = take(data, {
683
+ message: __expectString,
684
+ });
685
+ Object.assign(contents, doc);
686
+ const exception = new PolicySizeLimitExceededException({
687
+ $metadata: deserializeMetadata(parsedOutput),
688
+ ...contents,
689
+ });
690
+ return __decorateServiceException(exception, parsedOutput.body);
691
+ };
547
692
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
548
693
  const contents = map({});
549
694
  const data = parsedOutput.body;
@@ -670,12 +815,14 @@ const _DA = "DestinationArn";
670
815
  const _MDI = "MetricDefinitionIds";
671
816
  const _MR = "MaxResults";
672
817
  const _NT = "NextToken";
818
+ const _PRI = "PolicyRevisionId";
673
819
  const _TK = "TagKeys";
674
820
  const _d = "destination";
675
821
  const _dA = "destinationArn";
676
822
  const _mDI = "metricDefinitionIds";
677
823
  const _mR = "maxResults";
678
824
  const _nT = "nextToken";
825
+ const _pRI = "policyRevisionId";
679
826
  const _rAS = "retryAfterSeconds";
680
827
  const _ra = "retry-after";
681
828
  const _tK = "tagKeys";
@@ -4,12 +4,15 @@ import { BatchDeleteRumMetricDefinitionsCommandInput, BatchDeleteRumMetricDefini
4
4
  import { BatchGetRumMetricDefinitionsCommandInput, BatchGetRumMetricDefinitionsCommandOutput } from "./commands/BatchGetRumMetricDefinitionsCommand";
5
5
  import { CreateAppMonitorCommandInput, CreateAppMonitorCommandOutput } from "./commands/CreateAppMonitorCommand";
6
6
  import { DeleteAppMonitorCommandInput, DeleteAppMonitorCommandOutput } from "./commands/DeleteAppMonitorCommand";
7
+ import { DeleteResourcePolicyCommandInput, DeleteResourcePolicyCommandOutput } from "./commands/DeleteResourcePolicyCommand";
7
8
  import { DeleteRumMetricsDestinationCommandInput, DeleteRumMetricsDestinationCommandOutput } from "./commands/DeleteRumMetricsDestinationCommand";
8
9
  import { GetAppMonitorCommandInput, GetAppMonitorCommandOutput } from "./commands/GetAppMonitorCommand";
9
10
  import { GetAppMonitorDataCommandInput, GetAppMonitorDataCommandOutput } from "./commands/GetAppMonitorDataCommand";
11
+ import { GetResourcePolicyCommandInput, GetResourcePolicyCommandOutput } from "./commands/GetResourcePolicyCommand";
10
12
  import { ListAppMonitorsCommandInput, ListAppMonitorsCommandOutput } from "./commands/ListAppMonitorsCommand";
11
13
  import { ListRumMetricsDestinationsCommandInput, ListRumMetricsDestinationsCommandOutput } from "./commands/ListRumMetricsDestinationsCommand";
12
14
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
15
+ import { PutResourcePolicyCommandInput, PutResourcePolicyCommandOutput } from "./commands/PutResourcePolicyCommand";
13
16
  import { PutRumEventsCommandInput, PutRumEventsCommandOutput } from "./commands/PutRumEventsCommand";
14
17
  import { PutRumMetricsDestinationCommandInput, PutRumMetricsDestinationCommandOutput } from "./commands/PutRumMetricsDestinationCommand";
15
18
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
@@ -48,6 +51,12 @@ export interface RUM {
48
51
  deleteAppMonitor(args: DeleteAppMonitorCommandInput, options?: __HttpHandlerOptions): Promise<DeleteAppMonitorCommandOutput>;
49
52
  deleteAppMonitor(args: DeleteAppMonitorCommandInput, cb: (err: any, data?: DeleteAppMonitorCommandOutput) => void): void;
50
53
  deleteAppMonitor(args: DeleteAppMonitorCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteAppMonitorCommandOutput) => void): void;
54
+ /**
55
+ * @see {@link DeleteResourcePolicyCommand}
56
+ */
57
+ deleteResourcePolicy(args: DeleteResourcePolicyCommandInput, options?: __HttpHandlerOptions): Promise<DeleteResourcePolicyCommandOutput>;
58
+ deleteResourcePolicy(args: DeleteResourcePolicyCommandInput, cb: (err: any, data?: DeleteResourcePolicyCommandOutput) => void): void;
59
+ deleteResourcePolicy(args: DeleteResourcePolicyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteResourcePolicyCommandOutput) => void): void;
51
60
  /**
52
61
  * @see {@link DeleteRumMetricsDestinationCommand}
53
62
  */
@@ -66,6 +75,12 @@ export interface RUM {
66
75
  getAppMonitorData(args: GetAppMonitorDataCommandInput, options?: __HttpHandlerOptions): Promise<GetAppMonitorDataCommandOutput>;
67
76
  getAppMonitorData(args: GetAppMonitorDataCommandInput, cb: (err: any, data?: GetAppMonitorDataCommandOutput) => void): void;
68
77
  getAppMonitorData(args: GetAppMonitorDataCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetAppMonitorDataCommandOutput) => void): void;
78
+ /**
79
+ * @see {@link GetResourcePolicyCommand}
80
+ */
81
+ getResourcePolicy(args: GetResourcePolicyCommandInput, options?: __HttpHandlerOptions): Promise<GetResourcePolicyCommandOutput>;
82
+ getResourcePolicy(args: GetResourcePolicyCommandInput, cb: (err: any, data?: GetResourcePolicyCommandOutput) => void): void;
83
+ getResourcePolicy(args: GetResourcePolicyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetResourcePolicyCommandOutput) => void): void;
69
84
  /**
70
85
  * @see {@link ListAppMonitorsCommand}
71
86
  */
@@ -85,6 +100,12 @@ export interface RUM {
85
100
  listTagsForResource(args: ListTagsForResourceCommandInput, options?: __HttpHandlerOptions): Promise<ListTagsForResourceCommandOutput>;
86
101
  listTagsForResource(args: ListTagsForResourceCommandInput, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
87
102
  listTagsForResource(args: ListTagsForResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
103
+ /**
104
+ * @see {@link PutResourcePolicyCommand}
105
+ */
106
+ putResourcePolicy(args: PutResourcePolicyCommandInput, options?: __HttpHandlerOptions): Promise<PutResourcePolicyCommandOutput>;
107
+ putResourcePolicy(args: PutResourcePolicyCommandInput, cb: (err: any, data?: PutResourcePolicyCommandOutput) => void): void;
108
+ putResourcePolicy(args: PutResourcePolicyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutResourcePolicyCommandOutput) => void): void;
88
109
  /**
89
110
  * @see {@link PutRumEventsCommand}
90
111
  */
@@ -12,12 +12,15 @@ import { BatchDeleteRumMetricDefinitionsCommandInput, BatchDeleteRumMetricDefini
12
12
  import { BatchGetRumMetricDefinitionsCommandInput, BatchGetRumMetricDefinitionsCommandOutput } from "./commands/BatchGetRumMetricDefinitionsCommand";
13
13
  import { CreateAppMonitorCommandInput, CreateAppMonitorCommandOutput } from "./commands/CreateAppMonitorCommand";
14
14
  import { DeleteAppMonitorCommandInput, DeleteAppMonitorCommandOutput } from "./commands/DeleteAppMonitorCommand";
15
+ import { DeleteResourcePolicyCommandInput, DeleteResourcePolicyCommandOutput } from "./commands/DeleteResourcePolicyCommand";
15
16
  import { DeleteRumMetricsDestinationCommandInput, DeleteRumMetricsDestinationCommandOutput } from "./commands/DeleteRumMetricsDestinationCommand";
16
17
  import { GetAppMonitorCommandInput, GetAppMonitorCommandOutput } from "./commands/GetAppMonitorCommand";
17
18
  import { GetAppMonitorDataCommandInput, GetAppMonitorDataCommandOutput } from "./commands/GetAppMonitorDataCommand";
19
+ import { GetResourcePolicyCommandInput, GetResourcePolicyCommandOutput } from "./commands/GetResourcePolicyCommand";
18
20
  import { ListAppMonitorsCommandInput, ListAppMonitorsCommandOutput } from "./commands/ListAppMonitorsCommand";
19
21
  import { ListRumMetricsDestinationsCommandInput, ListRumMetricsDestinationsCommandOutput } from "./commands/ListRumMetricsDestinationsCommand";
20
22
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
23
+ import { PutResourcePolicyCommandInput, PutResourcePolicyCommandOutput } from "./commands/PutResourcePolicyCommand";
21
24
  import { PutRumEventsCommandInput, PutRumEventsCommandOutput } from "./commands/PutRumEventsCommand";
22
25
  import { PutRumMetricsDestinationCommandInput, PutRumMetricsDestinationCommandOutput } from "./commands/PutRumMetricsDestinationCommand";
23
26
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
@@ -30,11 +33,11 @@ export { __Client };
30
33
  /**
31
34
  * @public
32
35
  */
33
- export type ServiceInputTypes = BatchCreateRumMetricDefinitionsCommandInput | BatchDeleteRumMetricDefinitionsCommandInput | BatchGetRumMetricDefinitionsCommandInput | CreateAppMonitorCommandInput | DeleteAppMonitorCommandInput | DeleteRumMetricsDestinationCommandInput | GetAppMonitorCommandInput | GetAppMonitorDataCommandInput | ListAppMonitorsCommandInput | ListRumMetricsDestinationsCommandInput | ListTagsForResourceCommandInput | PutRumEventsCommandInput | PutRumMetricsDestinationCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateAppMonitorCommandInput | UpdateRumMetricDefinitionCommandInput;
36
+ export type ServiceInputTypes = BatchCreateRumMetricDefinitionsCommandInput | BatchDeleteRumMetricDefinitionsCommandInput | BatchGetRumMetricDefinitionsCommandInput | CreateAppMonitorCommandInput | DeleteAppMonitorCommandInput | DeleteResourcePolicyCommandInput | DeleteRumMetricsDestinationCommandInput | GetAppMonitorCommandInput | GetAppMonitorDataCommandInput | GetResourcePolicyCommandInput | ListAppMonitorsCommandInput | ListRumMetricsDestinationsCommandInput | ListTagsForResourceCommandInput | PutResourcePolicyCommandInput | PutRumEventsCommandInput | PutRumMetricsDestinationCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateAppMonitorCommandInput | UpdateRumMetricDefinitionCommandInput;
34
37
  /**
35
38
  * @public
36
39
  */
37
- export type ServiceOutputTypes = BatchCreateRumMetricDefinitionsCommandOutput | BatchDeleteRumMetricDefinitionsCommandOutput | BatchGetRumMetricDefinitionsCommandOutput | CreateAppMonitorCommandOutput | DeleteAppMonitorCommandOutput | DeleteRumMetricsDestinationCommandOutput | GetAppMonitorCommandOutput | GetAppMonitorDataCommandOutput | ListAppMonitorsCommandOutput | ListRumMetricsDestinationsCommandOutput | ListTagsForResourceCommandOutput | PutRumEventsCommandOutput | PutRumMetricsDestinationCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateAppMonitorCommandOutput | UpdateRumMetricDefinitionCommandOutput;
40
+ export type ServiceOutputTypes = BatchCreateRumMetricDefinitionsCommandOutput | BatchDeleteRumMetricDefinitionsCommandOutput | BatchGetRumMetricDefinitionsCommandOutput | CreateAppMonitorCommandOutput | DeleteAppMonitorCommandOutput | DeleteResourcePolicyCommandOutput | DeleteRumMetricsDestinationCommandOutput | GetAppMonitorCommandOutput | GetAppMonitorDataCommandOutput | GetResourcePolicyCommandOutput | ListAppMonitorsCommandOutput | ListRumMetricsDestinationsCommandOutput | ListTagsForResourceCommandOutput | PutResourcePolicyCommandOutput | PutRumEventsCommandOutput | PutRumMetricsDestinationCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateAppMonitorCommandOutput | UpdateRumMetricDefinitionCommandOutput;
38
41
  /**
39
42
  * @public
40
43
  */
@@ -0,0 +1,96 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import { DeleteResourcePolicyRequest, DeleteResourcePolicyResponse } from "../models/models_0";
4
+ import { RUMClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RUMClient";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link DeleteResourcePolicyCommand}.
14
+ */
15
+ export interface DeleteResourcePolicyCommandInput extends DeleteResourcePolicyRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link DeleteResourcePolicyCommand}.
21
+ */
22
+ export interface DeleteResourcePolicyCommandOutput extends DeleteResourcePolicyResponse, __MetadataBearer {
23
+ }
24
+ declare const DeleteResourcePolicyCommand_base: {
25
+ new (input: DeleteResourcePolicyCommandInput): import("@smithy/smithy-client").CommandImpl<DeleteResourcePolicyCommandInput, DeleteResourcePolicyCommandOutput, RUMClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: DeleteResourcePolicyCommandInput): import("@smithy/smithy-client").CommandImpl<DeleteResourcePolicyCommandInput, DeleteResourcePolicyCommandOutput, RUMClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Removes the association of a resource-based policy from an app monitor.</p>
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { RUMClient, DeleteResourcePolicyCommand } from "@aws-sdk/client-rum"; // ES Modules import
35
+ * // const { RUMClient, DeleteResourcePolicyCommand } = require("@aws-sdk/client-rum"); // CommonJS import
36
+ * const client = new RUMClient(config);
37
+ * const input = { // DeleteResourcePolicyRequest
38
+ * Name: "STRING_VALUE", // required
39
+ * PolicyRevisionId: "STRING_VALUE",
40
+ * };
41
+ * const command = new DeleteResourcePolicyCommand(input);
42
+ * const response = await client.send(command);
43
+ * // { // DeleteResourcePolicyResponse
44
+ * // PolicyRevisionId: "STRING_VALUE",
45
+ * // };
46
+ *
47
+ * ```
48
+ *
49
+ * @param DeleteResourcePolicyCommandInput - {@link DeleteResourcePolicyCommandInput}
50
+ * @returns {@link DeleteResourcePolicyCommandOutput}
51
+ * @see {@link DeleteResourcePolicyCommandInput} for command's `input` shape.
52
+ * @see {@link DeleteResourcePolicyCommandOutput} for command's `response` shape.
53
+ * @see {@link RUMClientResolvedConfig | config} for RUMClient's `config` shape.
54
+ *
55
+ * @throws {@link AccessDeniedException} (client fault)
56
+ * <p>You don't have sufficient permissions to perform this action.</p>
57
+ *
58
+ * @throws {@link ConflictException} (client fault)
59
+ * <p>This operation attempted to create a resource that already exists.</p>
60
+ *
61
+ * @throws {@link InternalServerException} (server fault)
62
+ * <p>Internal service exception.</p>
63
+ *
64
+ * @throws {@link InvalidPolicyRevisionIdException} (client fault)
65
+ * <p>The policy revision ID that you provided doeesn't match the latest policy revision ID.</p>
66
+ *
67
+ * @throws {@link PolicyNotFoundException} (client fault)
68
+ * <p>The resource-based policy doesn't exist on this app monitor.</p>
69
+ *
70
+ * @throws {@link ResourceNotFoundException} (client fault)
71
+ * <p>Resource not found.</p>
72
+ *
73
+ * @throws {@link ThrottlingException} (client fault)
74
+ * <p>The request was throttled because of quota limits.</p>
75
+ *
76
+ * @throws {@link ValidationException} (client fault)
77
+ * <p>One of the arguments for the request is not valid.</p>
78
+ *
79
+ * @throws {@link RUMServiceException}
80
+ * <p>Base exception class for all service exceptions from RUM service.</p>
81
+ *
82
+ * @public
83
+ */
84
+ export declare class DeleteResourcePolicyCommand extends DeleteResourcePolicyCommand_base {
85
+ /** @internal type navigation helper, not in runtime. */
86
+ protected static __types: {
87
+ api: {
88
+ input: DeleteResourcePolicyRequest;
89
+ output: DeleteResourcePolicyResponse;
90
+ };
91
+ sdk: {
92
+ input: DeleteResourcePolicyCommandInput;
93
+ output: DeleteResourcePolicyCommandOutput;
94
+ };
95
+ };
96
+ }
@@ -0,0 +1,93 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import { GetResourcePolicyRequest, GetResourcePolicyResponse } from "../models/models_0";
4
+ import { RUMClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RUMClient";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link GetResourcePolicyCommand}.
14
+ */
15
+ export interface GetResourcePolicyCommandInput extends GetResourcePolicyRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link GetResourcePolicyCommand}.
21
+ */
22
+ export interface GetResourcePolicyCommandOutput extends GetResourcePolicyResponse, __MetadataBearer {
23
+ }
24
+ declare const GetResourcePolicyCommand_base: {
25
+ new (input: GetResourcePolicyCommandInput): import("@smithy/smithy-client").CommandImpl<GetResourcePolicyCommandInput, GetResourcePolicyCommandOutput, RUMClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: GetResourcePolicyCommandInput): import("@smithy/smithy-client").CommandImpl<GetResourcePolicyCommandInput, GetResourcePolicyCommandOutput, RUMClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Use this operation to retrieve information about a resource-based policy that is attached to an app monitor.</p>
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { RUMClient, GetResourcePolicyCommand } from "@aws-sdk/client-rum"; // ES Modules import
35
+ * // const { RUMClient, GetResourcePolicyCommand } = require("@aws-sdk/client-rum"); // CommonJS import
36
+ * const client = new RUMClient(config);
37
+ * const input = { // GetResourcePolicyRequest
38
+ * Name: "STRING_VALUE", // required
39
+ * };
40
+ * const command = new GetResourcePolicyCommand(input);
41
+ * const response = await client.send(command);
42
+ * // { // GetResourcePolicyResponse
43
+ * // PolicyDocument: "STRING_VALUE",
44
+ * // PolicyRevisionId: "STRING_VALUE",
45
+ * // };
46
+ *
47
+ * ```
48
+ *
49
+ * @param GetResourcePolicyCommandInput - {@link GetResourcePolicyCommandInput}
50
+ * @returns {@link GetResourcePolicyCommandOutput}
51
+ * @see {@link GetResourcePolicyCommandInput} for command's `input` shape.
52
+ * @see {@link GetResourcePolicyCommandOutput} for command's `response` shape.
53
+ * @see {@link RUMClientResolvedConfig | config} for RUMClient's `config` shape.
54
+ *
55
+ * @throws {@link AccessDeniedException} (client fault)
56
+ * <p>You don't have sufficient permissions to perform this action.</p>
57
+ *
58
+ * @throws {@link ConflictException} (client fault)
59
+ * <p>This operation attempted to create a resource that already exists.</p>
60
+ *
61
+ * @throws {@link InternalServerException} (server fault)
62
+ * <p>Internal service exception.</p>
63
+ *
64
+ * @throws {@link PolicyNotFoundException} (client fault)
65
+ * <p>The resource-based policy doesn't exist on this app monitor.</p>
66
+ *
67
+ * @throws {@link ResourceNotFoundException} (client fault)
68
+ * <p>Resource not found.</p>
69
+ *
70
+ * @throws {@link ThrottlingException} (client fault)
71
+ * <p>The request was throttled because of quota limits.</p>
72
+ *
73
+ * @throws {@link ValidationException} (client fault)
74
+ * <p>One of the arguments for the request is not valid.</p>
75
+ *
76
+ * @throws {@link RUMServiceException}
77
+ * <p>Base exception class for all service exceptions from RUM service.</p>
78
+ *
79
+ * @public
80
+ */
81
+ export declare class GetResourcePolicyCommand extends GetResourcePolicyCommand_base {
82
+ /** @internal type navigation helper, not in runtime. */
83
+ protected static __types: {
84
+ api: {
85
+ input: GetResourcePolicyRequest;
86
+ output: GetResourcePolicyResponse;
87
+ };
88
+ sdk: {
89
+ input: GetResourcePolicyCommandInput;
90
+ output: GetResourcePolicyCommandOutput;
91
+ };
92
+ };
93
+ }
@@ -0,0 +1,102 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import { PutResourcePolicyRequest, PutResourcePolicyResponse } from "../models/models_0";
4
+ import { RUMClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RUMClient";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link PutResourcePolicyCommand}.
14
+ */
15
+ export interface PutResourcePolicyCommandInput extends PutResourcePolicyRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link PutResourcePolicyCommand}.
21
+ */
22
+ export interface PutResourcePolicyCommandOutput extends PutResourcePolicyResponse, __MetadataBearer {
23
+ }
24
+ declare const PutResourcePolicyCommand_base: {
25
+ new (input: PutResourcePolicyCommandInput): import("@smithy/smithy-client").CommandImpl<PutResourcePolicyCommandInput, PutResourcePolicyCommandOutput, RUMClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: PutResourcePolicyCommandInput): import("@smithy/smithy-client").CommandImpl<PutResourcePolicyCommandInput, PutResourcePolicyCommandOutput, RUMClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Use this operation to assign a resource-based policy to a CloudWatch RUM app monitor to control access to it. Each app monitor can
31
+ * have one resource-based policy. The maximum size of the policy is 4 KB. To learn more about using resource policies with RUM, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-resource-policies.html">Using resource-based policies with CloudWatch RUM</a>.</p>
32
+ * @example
33
+ * Use a bare-bones client and the command you need to make an API call.
34
+ * ```javascript
35
+ * import { RUMClient, PutResourcePolicyCommand } from "@aws-sdk/client-rum"; // ES Modules import
36
+ * // const { RUMClient, PutResourcePolicyCommand } = require("@aws-sdk/client-rum"); // CommonJS import
37
+ * const client = new RUMClient(config);
38
+ * const input = { // PutResourcePolicyRequest
39
+ * Name: "STRING_VALUE", // required
40
+ * PolicyDocument: "STRING_VALUE", // required
41
+ * PolicyRevisionId: "STRING_VALUE",
42
+ * };
43
+ * const command = new PutResourcePolicyCommand(input);
44
+ * const response = await client.send(command);
45
+ * // { // PutResourcePolicyResponse
46
+ * // PolicyDocument: "STRING_VALUE",
47
+ * // PolicyRevisionId: "STRING_VALUE",
48
+ * // };
49
+ *
50
+ * ```
51
+ *
52
+ * @param PutResourcePolicyCommandInput - {@link PutResourcePolicyCommandInput}
53
+ * @returns {@link PutResourcePolicyCommandOutput}
54
+ * @see {@link PutResourcePolicyCommandInput} for command's `input` shape.
55
+ * @see {@link PutResourcePolicyCommandOutput} for command's `response` shape.
56
+ * @see {@link RUMClientResolvedConfig | config} for RUMClient's `config` shape.
57
+ *
58
+ * @throws {@link AccessDeniedException} (client fault)
59
+ * <p>You don't have sufficient permissions to perform this action.</p>
60
+ *
61
+ * @throws {@link ConflictException} (client fault)
62
+ * <p>This operation attempted to create a resource that already exists.</p>
63
+ *
64
+ * @throws {@link InternalServerException} (server fault)
65
+ * <p>Internal service exception.</p>
66
+ *
67
+ * @throws {@link InvalidPolicyRevisionIdException} (client fault)
68
+ * <p>The policy revision ID that you provided doeesn't match the latest policy revision ID.</p>
69
+ *
70
+ * @throws {@link MalformedPolicyDocumentException} (client fault)
71
+ * <p>The policy document that you specified is not formatted correctly.</p>
72
+ *
73
+ * @throws {@link PolicySizeLimitExceededException} (client fault)
74
+ * <p>The policy document is too large. The limit is 4 KB.</p>
75
+ *
76
+ * @throws {@link ResourceNotFoundException} (client fault)
77
+ * <p>Resource not found.</p>
78
+ *
79
+ * @throws {@link ThrottlingException} (client fault)
80
+ * <p>The request was throttled because of quota limits.</p>
81
+ *
82
+ * @throws {@link ValidationException} (client fault)
83
+ * <p>One of the arguments for the request is not valid.</p>
84
+ *
85
+ * @throws {@link RUMServiceException}
86
+ * <p>Base exception class for all service exceptions from RUM service.</p>
87
+ *
88
+ * @public
89
+ */
90
+ export declare class PutResourcePolicyCommand extends PutResourcePolicyCommand_base {
91
+ /** @internal type navigation helper, not in runtime. */
92
+ protected static __types: {
93
+ api: {
94
+ input: PutResourcePolicyRequest;
95
+ output: PutResourcePolicyResponse;
96
+ };
97
+ sdk: {
98
+ input: PutResourcePolicyCommandInput;
99
+ output: PutResourcePolicyCommandOutput;
100
+ };
101
+ };
102
+ }
@@ -58,6 +58,7 @@ declare const PutRumEventsCommand_base: {
58
58
  * details: "STRING_VALUE", // required
59
59
  * },
60
60
  * ],
61
+ * Alias: "STRING_VALUE",
61
62
  * };
62
63
  * const command = new PutRumEventsCommand(input);
63
64
  * const response = await client.send(command);
@@ -3,12 +3,15 @@ export * from "./BatchDeleteRumMetricDefinitionsCommand";
3
3
  export * from "./BatchGetRumMetricDefinitionsCommand";
4
4
  export * from "./CreateAppMonitorCommand";
5
5
  export * from "./DeleteAppMonitorCommand";
6
+ export * from "./DeleteResourcePolicyCommand";
6
7
  export * from "./DeleteRumMetricsDestinationCommand";
7
8
  export * from "./GetAppMonitorCommand";
8
9
  export * from "./GetAppMonitorDataCommand";
10
+ export * from "./GetResourcePolicyCommand";
9
11
  export * from "./ListAppMonitorsCommand";
10
12
  export * from "./ListRumMetricsDestinationsCommand";
11
13
  export * from "./ListTagsForResourceCommand";
14
+ export * from "./PutResourcePolicyCommand";
12
15
  export * from "./PutRumEventsCommand";
13
16
  export * from "./PutRumMetricsDestinationCommand";
14
17
  export * from "./TagResourceCommand";