@aws-sdk/client-amp 3.863.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.
@@ -9,12 +9,14 @@ import { CreateWorkspaceCommandInput, CreateWorkspaceCommandOutput } from "./com
9
9
  import { DeleteAlertManagerDefinitionCommandInput, DeleteAlertManagerDefinitionCommandOutput } from "./commands/DeleteAlertManagerDefinitionCommand";
10
10
  import { DeleteLoggingConfigurationCommandInput, DeleteLoggingConfigurationCommandOutput } from "./commands/DeleteLoggingConfigurationCommand";
11
11
  import { DeleteQueryLoggingConfigurationCommandInput, DeleteQueryLoggingConfigurationCommandOutput } from "./commands/DeleteQueryLoggingConfigurationCommand";
12
+ import { DeleteResourcePolicyCommandInput, DeleteResourcePolicyCommandOutput } from "./commands/DeleteResourcePolicyCommand";
12
13
  import { DeleteRuleGroupsNamespaceCommandInput, DeleteRuleGroupsNamespaceCommandOutput } from "./commands/DeleteRuleGroupsNamespaceCommand";
13
14
  import { DeleteScraperCommandInput, DeleteScraperCommandOutput } from "./commands/DeleteScraperCommand";
14
15
  import { DeleteWorkspaceCommandInput, DeleteWorkspaceCommandOutput } from "./commands/DeleteWorkspaceCommand";
15
16
  import { DescribeAlertManagerDefinitionCommandInput, DescribeAlertManagerDefinitionCommandOutput } from "./commands/DescribeAlertManagerDefinitionCommand";
16
17
  import { DescribeLoggingConfigurationCommandInput, DescribeLoggingConfigurationCommandOutput } from "./commands/DescribeLoggingConfigurationCommand";
17
18
  import { DescribeQueryLoggingConfigurationCommandInput, DescribeQueryLoggingConfigurationCommandOutput } from "./commands/DescribeQueryLoggingConfigurationCommand";
19
+ import { DescribeResourcePolicyCommandInput, DescribeResourcePolicyCommandOutput } from "./commands/DescribeResourcePolicyCommand";
18
20
  import { DescribeRuleGroupsNamespaceCommandInput, DescribeRuleGroupsNamespaceCommandOutput } from "./commands/DescribeRuleGroupsNamespaceCommand";
19
21
  import { DescribeScraperCommandInput, DescribeScraperCommandOutput } from "./commands/DescribeScraperCommand";
20
22
  import { DescribeWorkspaceCommandInput, DescribeWorkspaceCommandOutput } from "./commands/DescribeWorkspaceCommand";
@@ -25,6 +27,7 @@ import { ListScrapersCommandInput, ListScrapersCommandOutput } from "./commands/
25
27
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
26
28
  import { ListWorkspacesCommandInput, ListWorkspacesCommandOutput } from "./commands/ListWorkspacesCommand";
27
29
  import { PutAlertManagerDefinitionCommandInput, PutAlertManagerDefinitionCommandOutput } from "./commands/PutAlertManagerDefinitionCommand";
30
+ import { PutResourcePolicyCommandInput, PutResourcePolicyCommandOutput } from "./commands/PutResourcePolicyCommand";
28
31
  import { PutRuleGroupsNamespaceCommandInput, PutRuleGroupsNamespaceCommandOutput } from "./commands/PutRuleGroupsNamespaceCommand";
29
32
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
30
33
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
@@ -89,6 +92,12 @@ export interface Amp {
89
92
  deleteQueryLoggingConfiguration(args: DeleteQueryLoggingConfigurationCommandInput, options?: __HttpHandlerOptions): Promise<DeleteQueryLoggingConfigurationCommandOutput>;
90
93
  deleteQueryLoggingConfiguration(args: DeleteQueryLoggingConfigurationCommandInput, cb: (err: any, data?: DeleteQueryLoggingConfigurationCommandOutput) => void): void;
91
94
  deleteQueryLoggingConfiguration(args: DeleteQueryLoggingConfigurationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteQueryLoggingConfigurationCommandOutput) => void): void;
95
+ /**
96
+ * @see {@link DeleteResourcePolicyCommand}
97
+ */
98
+ deleteResourcePolicy(args: DeleteResourcePolicyCommandInput, options?: __HttpHandlerOptions): Promise<DeleteResourcePolicyCommandOutput>;
99
+ deleteResourcePolicy(args: DeleteResourcePolicyCommandInput, cb: (err: any, data?: DeleteResourcePolicyCommandOutput) => void): void;
100
+ deleteResourcePolicy(args: DeleteResourcePolicyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteResourcePolicyCommandOutput) => void): void;
92
101
  /**
93
102
  * @see {@link DeleteRuleGroupsNamespaceCommand}
94
103
  */
@@ -125,6 +134,12 @@ export interface Amp {
125
134
  describeQueryLoggingConfiguration(args: DescribeQueryLoggingConfigurationCommandInput, options?: __HttpHandlerOptions): Promise<DescribeQueryLoggingConfigurationCommandOutput>;
126
135
  describeQueryLoggingConfiguration(args: DescribeQueryLoggingConfigurationCommandInput, cb: (err: any, data?: DescribeQueryLoggingConfigurationCommandOutput) => void): void;
127
136
  describeQueryLoggingConfiguration(args: DescribeQueryLoggingConfigurationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeQueryLoggingConfigurationCommandOutput) => void): void;
137
+ /**
138
+ * @see {@link DescribeResourcePolicyCommand}
139
+ */
140
+ describeResourcePolicy(args: DescribeResourcePolicyCommandInput, options?: __HttpHandlerOptions): Promise<DescribeResourcePolicyCommandOutput>;
141
+ describeResourcePolicy(args: DescribeResourcePolicyCommandInput, cb: (err: any, data?: DescribeResourcePolicyCommandOutput) => void): void;
142
+ describeResourcePolicy(args: DescribeResourcePolicyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeResourcePolicyCommandOutput) => void): void;
128
143
  /**
129
144
  * @see {@link DescribeRuleGroupsNamespaceCommand}
130
145
  */
@@ -188,6 +203,12 @@ export interface Amp {
188
203
  putAlertManagerDefinition(args: PutAlertManagerDefinitionCommandInput, options?: __HttpHandlerOptions): Promise<PutAlertManagerDefinitionCommandOutput>;
189
204
  putAlertManagerDefinition(args: PutAlertManagerDefinitionCommandInput, cb: (err: any, data?: PutAlertManagerDefinitionCommandOutput) => void): void;
190
205
  putAlertManagerDefinition(args: PutAlertManagerDefinitionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutAlertManagerDefinitionCommandOutput) => void): void;
206
+ /**
207
+ * @see {@link PutResourcePolicyCommand}
208
+ */
209
+ putResourcePolicy(args: PutResourcePolicyCommandInput, options?: __HttpHandlerOptions): Promise<PutResourcePolicyCommandOutput>;
210
+ putResourcePolicy(args: PutResourcePolicyCommandInput, cb: (err: any, data?: PutResourcePolicyCommandOutput) => void): void;
211
+ putResourcePolicy(args: PutResourcePolicyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutResourcePolicyCommandOutput) => void): void;
191
212
  /**
192
213
  * @see {@link PutRuleGroupsNamespaceCommand}
193
214
  */
@@ -16,12 +16,14 @@ import { CreateWorkspaceCommandInput, CreateWorkspaceCommandOutput } from "./com
16
16
  import { DeleteAlertManagerDefinitionCommandInput, DeleteAlertManagerDefinitionCommandOutput } from "./commands/DeleteAlertManagerDefinitionCommand";
17
17
  import { DeleteLoggingConfigurationCommandInput, DeleteLoggingConfigurationCommandOutput } from "./commands/DeleteLoggingConfigurationCommand";
18
18
  import { DeleteQueryLoggingConfigurationCommandInput, DeleteQueryLoggingConfigurationCommandOutput } from "./commands/DeleteQueryLoggingConfigurationCommand";
19
+ import { DeleteResourcePolicyCommandInput, DeleteResourcePolicyCommandOutput } from "./commands/DeleteResourcePolicyCommand";
19
20
  import { DeleteRuleGroupsNamespaceCommandInput, DeleteRuleGroupsNamespaceCommandOutput } from "./commands/DeleteRuleGroupsNamespaceCommand";
20
21
  import { DeleteScraperCommandInput, DeleteScraperCommandOutput } from "./commands/DeleteScraperCommand";
21
22
  import { DeleteWorkspaceCommandInput, DeleteWorkspaceCommandOutput } from "./commands/DeleteWorkspaceCommand";
22
23
  import { DescribeAlertManagerDefinitionCommandInput, DescribeAlertManagerDefinitionCommandOutput } from "./commands/DescribeAlertManagerDefinitionCommand";
23
24
  import { DescribeLoggingConfigurationCommandInput, DescribeLoggingConfigurationCommandOutput } from "./commands/DescribeLoggingConfigurationCommand";
24
25
  import { DescribeQueryLoggingConfigurationCommandInput, DescribeQueryLoggingConfigurationCommandOutput } from "./commands/DescribeQueryLoggingConfigurationCommand";
26
+ import { DescribeResourcePolicyCommandInput, DescribeResourcePolicyCommandOutput } from "./commands/DescribeResourcePolicyCommand";
25
27
  import { DescribeRuleGroupsNamespaceCommandInput, DescribeRuleGroupsNamespaceCommandOutput } from "./commands/DescribeRuleGroupsNamespaceCommand";
26
28
  import { DescribeScraperCommandInput, DescribeScraperCommandOutput } from "./commands/DescribeScraperCommand";
27
29
  import { DescribeWorkspaceCommandInput, DescribeWorkspaceCommandOutput } from "./commands/DescribeWorkspaceCommand";
@@ -32,6 +34,7 @@ import { ListScrapersCommandInput, ListScrapersCommandOutput } from "./commands/
32
34
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
33
35
  import { ListWorkspacesCommandInput, ListWorkspacesCommandOutput } from "./commands/ListWorkspacesCommand";
34
36
  import { PutAlertManagerDefinitionCommandInput, PutAlertManagerDefinitionCommandOutput } from "./commands/PutAlertManagerDefinitionCommand";
37
+ import { PutResourcePolicyCommandInput, PutResourcePolicyCommandOutput } from "./commands/PutResourcePolicyCommand";
35
38
  import { PutRuleGroupsNamespaceCommandInput, PutRuleGroupsNamespaceCommandOutput } from "./commands/PutRuleGroupsNamespaceCommand";
36
39
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
37
40
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
@@ -46,11 +49,11 @@ export { __Client };
46
49
  /**
47
50
  * @public
48
51
  */
49
- export type ServiceInputTypes = CreateAlertManagerDefinitionCommandInput | CreateLoggingConfigurationCommandInput | CreateQueryLoggingConfigurationCommandInput | CreateRuleGroupsNamespaceCommandInput | CreateScraperCommandInput | CreateWorkspaceCommandInput | DeleteAlertManagerDefinitionCommandInput | DeleteLoggingConfigurationCommandInput | DeleteQueryLoggingConfigurationCommandInput | DeleteRuleGroupsNamespaceCommandInput | DeleteScraperCommandInput | DeleteWorkspaceCommandInput | DescribeAlertManagerDefinitionCommandInput | DescribeLoggingConfigurationCommandInput | DescribeQueryLoggingConfigurationCommandInput | DescribeRuleGroupsNamespaceCommandInput | DescribeScraperCommandInput | DescribeWorkspaceCommandInput | DescribeWorkspaceConfigurationCommandInput | GetDefaultScraperConfigurationCommandInput | ListRuleGroupsNamespacesCommandInput | ListScrapersCommandInput | ListTagsForResourceCommandInput | ListWorkspacesCommandInput | PutAlertManagerDefinitionCommandInput | PutRuleGroupsNamespaceCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateLoggingConfigurationCommandInput | UpdateQueryLoggingConfigurationCommandInput | UpdateScraperCommandInput | UpdateWorkspaceAliasCommandInput | UpdateWorkspaceConfigurationCommandInput;
52
+ export type ServiceInputTypes = CreateAlertManagerDefinitionCommandInput | CreateLoggingConfigurationCommandInput | CreateQueryLoggingConfigurationCommandInput | CreateRuleGroupsNamespaceCommandInput | CreateScraperCommandInput | CreateWorkspaceCommandInput | DeleteAlertManagerDefinitionCommandInput | DeleteLoggingConfigurationCommandInput | DeleteQueryLoggingConfigurationCommandInput | DeleteResourcePolicyCommandInput | DeleteRuleGroupsNamespaceCommandInput | DeleteScraperCommandInput | DeleteWorkspaceCommandInput | DescribeAlertManagerDefinitionCommandInput | DescribeLoggingConfigurationCommandInput | DescribeQueryLoggingConfigurationCommandInput | DescribeResourcePolicyCommandInput | DescribeRuleGroupsNamespaceCommandInput | DescribeScraperCommandInput | DescribeWorkspaceCommandInput | DescribeWorkspaceConfigurationCommandInput | GetDefaultScraperConfigurationCommandInput | ListRuleGroupsNamespacesCommandInput | ListScrapersCommandInput | ListTagsForResourceCommandInput | ListWorkspacesCommandInput | PutAlertManagerDefinitionCommandInput | PutResourcePolicyCommandInput | PutRuleGroupsNamespaceCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateLoggingConfigurationCommandInput | UpdateQueryLoggingConfigurationCommandInput | UpdateScraperCommandInput | UpdateWorkspaceAliasCommandInput | UpdateWorkspaceConfigurationCommandInput;
50
53
  /**
51
54
  * @public
52
55
  */
53
- export type ServiceOutputTypes = CreateAlertManagerDefinitionCommandOutput | CreateLoggingConfigurationCommandOutput | CreateQueryLoggingConfigurationCommandOutput | CreateRuleGroupsNamespaceCommandOutput | CreateScraperCommandOutput | CreateWorkspaceCommandOutput | DeleteAlertManagerDefinitionCommandOutput | DeleteLoggingConfigurationCommandOutput | DeleteQueryLoggingConfigurationCommandOutput | DeleteRuleGroupsNamespaceCommandOutput | DeleteScraperCommandOutput | DeleteWorkspaceCommandOutput | DescribeAlertManagerDefinitionCommandOutput | DescribeLoggingConfigurationCommandOutput | DescribeQueryLoggingConfigurationCommandOutput | DescribeRuleGroupsNamespaceCommandOutput | DescribeScraperCommandOutput | DescribeWorkspaceCommandOutput | DescribeWorkspaceConfigurationCommandOutput | GetDefaultScraperConfigurationCommandOutput | ListRuleGroupsNamespacesCommandOutput | ListScrapersCommandOutput | ListTagsForResourceCommandOutput | ListWorkspacesCommandOutput | PutAlertManagerDefinitionCommandOutput | PutRuleGroupsNamespaceCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateLoggingConfigurationCommandOutput | UpdateQueryLoggingConfigurationCommandOutput | UpdateScraperCommandOutput | UpdateWorkspaceAliasCommandOutput | UpdateWorkspaceConfigurationCommandOutput;
56
+ export type ServiceOutputTypes = CreateAlertManagerDefinitionCommandOutput | CreateLoggingConfigurationCommandOutput | CreateQueryLoggingConfigurationCommandOutput | CreateRuleGroupsNamespaceCommandOutput | CreateScraperCommandOutput | CreateWorkspaceCommandOutput | DeleteAlertManagerDefinitionCommandOutput | DeleteLoggingConfigurationCommandOutput | DeleteQueryLoggingConfigurationCommandOutput | DeleteResourcePolicyCommandOutput | DeleteRuleGroupsNamespaceCommandOutput | DeleteScraperCommandOutput | DeleteWorkspaceCommandOutput | DescribeAlertManagerDefinitionCommandOutput | DescribeLoggingConfigurationCommandOutput | DescribeQueryLoggingConfigurationCommandOutput | DescribeResourcePolicyCommandOutput | DescribeRuleGroupsNamespaceCommandOutput | DescribeScraperCommandOutput | DescribeWorkspaceCommandOutput | DescribeWorkspaceConfigurationCommandOutput | GetDefaultScraperConfigurationCommandOutput | ListRuleGroupsNamespacesCommandOutput | ListScrapersCommandOutput | ListTagsForResourceCommandOutput | ListWorkspacesCommandOutput | PutAlertManagerDefinitionCommandOutput | PutResourcePolicyCommandOutput | PutRuleGroupsNamespaceCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateLoggingConfigurationCommandOutput | UpdateQueryLoggingConfigurationCommandOutput | UpdateScraperCommandOutput | UpdateWorkspaceAliasCommandOutput | UpdateWorkspaceConfigurationCommandOutput;
54
57
  /**
55
58
  * @public
56
59
  */
@@ -0,0 +1,90 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import { AmpClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AmpClient";
4
+ import { DeleteResourcePolicyRequest } from "../models/models_0";
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 __MetadataBearer {
23
+ }
24
+ declare const DeleteResourcePolicyCommand_base: {
25
+ new (input: DeleteResourcePolicyCommandInput): import("@smithy/smithy-client").CommandImpl<DeleteResourcePolicyCommandInput, DeleteResourcePolicyCommandOutput, AmpClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (input: DeleteResourcePolicyCommandInput): import("@smithy/smithy-client").CommandImpl<DeleteResourcePolicyCommandInput, DeleteResourcePolicyCommandOutput, AmpClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Deletes the resource-based policy attached to an Amazon Managed Service for Prometheus workspace.</p>
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { AmpClient, DeleteResourcePolicyCommand } from "@aws-sdk/client-amp"; // ES Modules import
35
+ * // const { AmpClient, DeleteResourcePolicyCommand } = require("@aws-sdk/client-amp"); // CommonJS import
36
+ * const client = new AmpClient(config);
37
+ * const input = { // DeleteResourcePolicyRequest
38
+ * workspaceId: "STRING_VALUE", // required
39
+ * clientToken: "STRING_VALUE",
40
+ * revisionId: "STRING_VALUE",
41
+ * };
42
+ * const command = new DeleteResourcePolicyCommand(input);
43
+ * const response = await client.send(command);
44
+ * // {};
45
+ *
46
+ * ```
47
+ *
48
+ * @param DeleteResourcePolicyCommandInput - {@link DeleteResourcePolicyCommandInput}
49
+ * @returns {@link DeleteResourcePolicyCommandOutput}
50
+ * @see {@link DeleteResourcePolicyCommandInput} for command's `input` shape.
51
+ * @see {@link DeleteResourcePolicyCommandOutput} for command's `response` shape.
52
+ * @see {@link AmpClientResolvedConfig | config} for AmpClient's `config` shape.
53
+ *
54
+ * @throws {@link AccessDeniedException} (client fault)
55
+ * <p>You do not have sufficient access to perform this action.</p>
56
+ *
57
+ * @throws {@link ConflictException} (client fault)
58
+ * <p>The request would cause an inconsistent state.</p>
59
+ *
60
+ * @throws {@link InternalServerException} (server fault)
61
+ * <p>An unexpected error occurred during the processing of the request.</p>
62
+ *
63
+ * @throws {@link ResourceNotFoundException} (client fault)
64
+ * <p>The request references a resources that doesn't exist.</p>
65
+ *
66
+ * @throws {@link ThrottlingException} (client fault)
67
+ * <p>The request was denied due to request throttling.</p>
68
+ *
69
+ * @throws {@link ValidationException} (client fault)
70
+ * <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
71
+ *
72
+ * @throws {@link AmpServiceException}
73
+ * <p>Base exception class for all service exceptions from Amp service.</p>
74
+ *
75
+ *
76
+ * @public
77
+ */
78
+ export declare class DeleteResourcePolicyCommand extends DeleteResourcePolicyCommand_base {
79
+ /** @internal type navigation helper, not in runtime. */
80
+ protected static __types: {
81
+ api: {
82
+ input: DeleteResourcePolicyRequest;
83
+ output: {};
84
+ };
85
+ sdk: {
86
+ input: DeleteResourcePolicyCommandInput;
87
+ output: DeleteResourcePolicyCommandOutput;
88
+ };
89
+ };
90
+ }
@@ -0,0 +1,89 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import { AmpClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AmpClient";
4
+ import { DescribeResourcePolicyRequest, DescribeResourcePolicyResponse } from "../models/models_0";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link DescribeResourcePolicyCommand}.
14
+ */
15
+ export interface DescribeResourcePolicyCommandInput extends DescribeResourcePolicyRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link DescribeResourcePolicyCommand}.
21
+ */
22
+ export interface DescribeResourcePolicyCommandOutput extends DescribeResourcePolicyResponse, __MetadataBearer {
23
+ }
24
+ declare const DescribeResourcePolicyCommand_base: {
25
+ new (input: DescribeResourcePolicyCommandInput): import("@smithy/smithy-client").CommandImpl<DescribeResourcePolicyCommandInput, DescribeResourcePolicyCommandOutput, AmpClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (input: DescribeResourcePolicyCommandInput): import("@smithy/smithy-client").CommandImpl<DescribeResourcePolicyCommandInput, DescribeResourcePolicyCommandOutput, AmpClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Returns information about the resource-based policy attached to an Amazon Managed Service for Prometheus workspace.</p>
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { AmpClient, DescribeResourcePolicyCommand } from "@aws-sdk/client-amp"; // ES Modules import
35
+ * // const { AmpClient, DescribeResourcePolicyCommand } = require("@aws-sdk/client-amp"); // CommonJS import
36
+ * const client = new AmpClient(config);
37
+ * const input = { // DescribeResourcePolicyRequest
38
+ * workspaceId: "STRING_VALUE", // required
39
+ * };
40
+ * const command = new DescribeResourcePolicyCommand(input);
41
+ * const response = await client.send(command);
42
+ * // { // DescribeResourcePolicyResponse
43
+ * // policyDocument: "STRING_VALUE", // required
44
+ * // policyStatus: "STRING_VALUE", // required
45
+ * // revisionId: "STRING_VALUE", // required
46
+ * // };
47
+ *
48
+ * ```
49
+ *
50
+ * @param DescribeResourcePolicyCommandInput - {@link DescribeResourcePolicyCommandInput}
51
+ * @returns {@link DescribeResourcePolicyCommandOutput}
52
+ * @see {@link DescribeResourcePolicyCommandInput} for command's `input` shape.
53
+ * @see {@link DescribeResourcePolicyCommandOutput} for command's `response` shape.
54
+ * @see {@link AmpClientResolvedConfig | config} for AmpClient's `config` shape.
55
+ *
56
+ * @throws {@link AccessDeniedException} (client fault)
57
+ * <p>You do not have sufficient access to perform this action.</p>
58
+ *
59
+ * @throws {@link InternalServerException} (server fault)
60
+ * <p>An unexpected error occurred during the processing of the request.</p>
61
+ *
62
+ * @throws {@link ResourceNotFoundException} (client fault)
63
+ * <p>The request references a resources that doesn't exist.</p>
64
+ *
65
+ * @throws {@link ThrottlingException} (client fault)
66
+ * <p>The request was denied due to request throttling.</p>
67
+ *
68
+ * @throws {@link ValidationException} (client fault)
69
+ * <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
70
+ *
71
+ * @throws {@link AmpServiceException}
72
+ * <p>Base exception class for all service exceptions from Amp service.</p>
73
+ *
74
+ *
75
+ * @public
76
+ */
77
+ export declare class DescribeResourcePolicyCommand extends DescribeResourcePolicyCommand_base {
78
+ /** @internal type navigation helper, not in runtime. */
79
+ protected static __types: {
80
+ api: {
81
+ input: DescribeResourcePolicyRequest;
82
+ output: DescribeResourcePolicyResponse;
83
+ };
84
+ sdk: {
85
+ input: DescribeResourcePolicyCommandInput;
86
+ output: DescribeResourcePolicyCommandOutput;
87
+ };
88
+ };
89
+ }
@@ -0,0 +1,94 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import { AmpClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AmpClient";
4
+ import { PutResourcePolicyRequest, PutResourcePolicyResponse } from "../models/models_0";
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, AmpClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (input: PutResourcePolicyCommandInput): import("@smithy/smithy-client").CommandImpl<PutResourcePolicyCommandInput, PutResourcePolicyCommandOutput, AmpClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Creates or updates a resource-based policy for an Amazon Managed Service for Prometheus workspace. Use resource-based policies to grant permissions to other AWS accounts or services to access your workspace.</p> <p>Only Prometheus-compatible APIs can be used for workspace sharing. You can add non-Prometheus-compatible APIs to the policy, but they will be ignored. For more information, see <a href="https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-APIReference-Prometheus-Compatible-Apis.html">Prometheus-compatible APIs</a> in the <i>Amazon Managed Service for Prometheus User Guide</i>.</p> <p>If your workspace uses customer-managed KMS keys for encryption, you must grant the principals in your resource-based policy access to those KMS keys. You can do this by creating KMS grants. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_CreateGrant.html">CreateGrant</a> in the <i>AWS Key Management Service API Reference</i> and <a href="https://docs.aws.amazon.com/prometheus/latest/userguide/encryption-at-rest-Amazon-Service-Prometheus.html">Encryption at rest</a> in the <i>Amazon Managed Service for Prometheus User Guide</i>.</p> <p>For more information about working with IAM, see <a href="https://docs.aws.amazon.com/prometheus/latest/userguide/security_iam_service-with-iam.html">Using Amazon Managed Service for Prometheus with IAM</a> in the <i>Amazon Managed Service for Prometheus User Guide</i>.</p>
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { AmpClient, PutResourcePolicyCommand } from "@aws-sdk/client-amp"; // ES Modules import
35
+ * // const { AmpClient, PutResourcePolicyCommand } = require("@aws-sdk/client-amp"); // CommonJS import
36
+ * const client = new AmpClient(config);
37
+ * const input = { // PutResourcePolicyRequest
38
+ * workspaceId: "STRING_VALUE", // required
39
+ * policyDocument: "STRING_VALUE", // required
40
+ * clientToken: "STRING_VALUE",
41
+ * revisionId: "STRING_VALUE",
42
+ * };
43
+ * const command = new PutResourcePolicyCommand(input);
44
+ * const response = await client.send(command);
45
+ * // { // PutResourcePolicyResponse
46
+ * // policyStatus: "STRING_VALUE", // required
47
+ * // revisionId: "STRING_VALUE", // required
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 AmpClientResolvedConfig | config} for AmpClient's `config` shape.
57
+ *
58
+ * @throws {@link AccessDeniedException} (client fault)
59
+ * <p>You do not have sufficient access to perform this action.</p>
60
+ *
61
+ * @throws {@link ConflictException} (client fault)
62
+ * <p>The request would cause an inconsistent state.</p>
63
+ *
64
+ * @throws {@link InternalServerException} (server fault)
65
+ * <p>An unexpected error occurred during the processing of the request.</p>
66
+ *
67
+ * @throws {@link ResourceNotFoundException} (client fault)
68
+ * <p>The request references a resources that doesn't exist.</p>
69
+ *
70
+ * @throws {@link ThrottlingException} (client fault)
71
+ * <p>The request was denied due to request throttling.</p>
72
+ *
73
+ * @throws {@link ValidationException} (client fault)
74
+ * <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
75
+ *
76
+ * @throws {@link AmpServiceException}
77
+ * <p>Base exception class for all service exceptions from Amp service.</p>
78
+ *
79
+ *
80
+ * @public
81
+ */
82
+ export declare class PutResourcePolicyCommand extends PutResourcePolicyCommand_base {
83
+ /** @internal type navigation helper, not in runtime. */
84
+ protected static __types: {
85
+ api: {
86
+ input: PutResourcePolicyRequest;
87
+ output: PutResourcePolicyResponse;
88
+ };
89
+ sdk: {
90
+ input: PutResourcePolicyCommandInput;
91
+ output: PutResourcePolicyCommandOutput;
92
+ };
93
+ };
94
+ }
@@ -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";
@@ -2128,3 +2128,119 @@ export interface UpdateWorkspaceConfigurationResponse {
2128
2128
  */
2129
2129
  status: WorkspaceConfigurationStatus | undefined;
2130
2130
  }
2131
+ /**
2132
+ * @public
2133
+ */
2134
+ export interface DeleteResourcePolicyRequest {
2135
+ /**
2136
+ * <p>The ID of the workspace from which to delete the resource-based policy.</p>
2137
+ * @public
2138
+ */
2139
+ workspaceId: string | undefined;
2140
+ /**
2141
+ * <p>A unique, case-sensitive identifier that you provide to ensure the request is safe to retry (idempotent).</p>
2142
+ * @public
2143
+ */
2144
+ clientToken?: string | undefined;
2145
+ /**
2146
+ * <p>The revision ID of the policy to delete. Use this parameter to ensure that you are deleting the correct version of the policy.</p>
2147
+ * @public
2148
+ */
2149
+ revisionId?: string | undefined;
2150
+ }
2151
+ /**
2152
+ * @public
2153
+ */
2154
+ export interface DescribeResourcePolicyRequest {
2155
+ /**
2156
+ * <p>The ID of the workspace to describe the resource-based policy for.</p>
2157
+ * @public
2158
+ */
2159
+ workspaceId: string | undefined;
2160
+ }
2161
+ /**
2162
+ * @public
2163
+ * @enum
2164
+ */
2165
+ export declare const WorkspacePolicyStatusCode: {
2166
+ /**
2167
+ * Resource-based Policy has been created/updated. Update/Deletion is disallowed until Resource-based Policy is ACTIVE and Workspace is ACTIVE.
2168
+ */
2169
+ readonly ACTIVE: "ACTIVE";
2170
+ /**
2171
+ * Resource-based Policy is being created. Update/Deletion is disallowed until Resource-based Policy is ACTIVE and Workspace is ACTIVE.
2172
+ */
2173
+ readonly CREATING: "CREATING";
2174
+ /**
2175
+ * Resource-based Policy is being deleting. Update/Deletion is disallowed until Resource-based Policy is ACTIVE and Workspace is ACTIVE.
2176
+ */
2177
+ readonly DELETING: "DELETING";
2178
+ /**
2179
+ * Resource-based Policy is being updated. Update/Deletion is disallowed until Resource-based Policy is ACTIVE and Workspace is ACTIVE.
2180
+ */
2181
+ readonly UPDATING: "UPDATING";
2182
+ };
2183
+ /**
2184
+ * @public
2185
+ */
2186
+ export type WorkspacePolicyStatusCode = (typeof WorkspacePolicyStatusCode)[keyof typeof WorkspacePolicyStatusCode];
2187
+ /**
2188
+ * @public
2189
+ */
2190
+ export interface DescribeResourcePolicyResponse {
2191
+ /**
2192
+ * <p>The JSON policy document for the resource-based policy attached to the workspace.</p>
2193
+ * @public
2194
+ */
2195
+ policyDocument: string | undefined;
2196
+ /**
2197
+ * <p>The current status of the resource-based policy.</p>
2198
+ * @public
2199
+ */
2200
+ policyStatus: WorkspacePolicyStatusCode | undefined;
2201
+ /**
2202
+ * <p>The revision ID of the current resource-based policy.</p>
2203
+ * @public
2204
+ */
2205
+ revisionId: string | undefined;
2206
+ }
2207
+ /**
2208
+ * @public
2209
+ */
2210
+ export interface PutResourcePolicyRequest {
2211
+ /**
2212
+ * <p>The ID of the workspace to attach the resource-based policy to.</p>
2213
+ * @public
2214
+ */
2215
+ workspaceId: string | undefined;
2216
+ /**
2217
+ * <p>The JSON policy document to use as the resource-based policy. This policy defines the permissions that other AWS accounts or services have to access your workspace.</p>
2218
+ * @public
2219
+ */
2220
+ policyDocument: string | undefined;
2221
+ /**
2222
+ * <p>A unique, case-sensitive identifier that you provide to ensure the request is safe to retry (idempotent).</p>
2223
+ * @public
2224
+ */
2225
+ clientToken?: string | undefined;
2226
+ /**
2227
+ * <p>The revision ID of the policy to update. Use this parameter to ensure that you are updating the correct version of the policy. If you don't specify a revision ID, the policy is updated regardless of its current revision.</p> <p>For the first <b>PUT</b> request on a workspace that doesn't have an existing resource policy, you can specify <code>NO_POLICY</code> as the revision ID.</p>
2228
+ * @public
2229
+ */
2230
+ revisionId?: string | undefined;
2231
+ }
2232
+ /**
2233
+ * @public
2234
+ */
2235
+ export interface PutResourcePolicyResponse {
2236
+ /**
2237
+ * <p>The current status of the resource-based policy.</p>
2238
+ * @public
2239
+ */
2240
+ policyStatus: WorkspacePolicyStatusCode | undefined;
2241
+ /**
2242
+ * <p>The revision ID of the newly created or updated resource-based policy.</p>
2243
+ * @public
2244
+ */
2245
+ revisionId: string | undefined;
2246
+ }
@@ -9,12 +9,14 @@ import { CreateWorkspaceCommandInput, CreateWorkspaceCommandOutput } from "../co
9
9
  import { DeleteAlertManagerDefinitionCommandInput, DeleteAlertManagerDefinitionCommandOutput } from "../commands/DeleteAlertManagerDefinitionCommand";
10
10
  import { DeleteLoggingConfigurationCommandInput, DeleteLoggingConfigurationCommandOutput } from "../commands/DeleteLoggingConfigurationCommand";
11
11
  import { DeleteQueryLoggingConfigurationCommandInput, DeleteQueryLoggingConfigurationCommandOutput } from "../commands/DeleteQueryLoggingConfigurationCommand";
12
+ import { DeleteResourcePolicyCommandInput, DeleteResourcePolicyCommandOutput } from "../commands/DeleteResourcePolicyCommand";
12
13
  import { DeleteRuleGroupsNamespaceCommandInput, DeleteRuleGroupsNamespaceCommandOutput } from "../commands/DeleteRuleGroupsNamespaceCommand";
13
14
  import { DeleteScraperCommandInput, DeleteScraperCommandOutput } from "../commands/DeleteScraperCommand";
14
15
  import { DeleteWorkspaceCommandInput, DeleteWorkspaceCommandOutput } from "../commands/DeleteWorkspaceCommand";
15
16
  import { DescribeAlertManagerDefinitionCommandInput, DescribeAlertManagerDefinitionCommandOutput } from "../commands/DescribeAlertManagerDefinitionCommand";
16
17
  import { DescribeLoggingConfigurationCommandInput, DescribeLoggingConfigurationCommandOutput } from "../commands/DescribeLoggingConfigurationCommand";
17
18
  import { DescribeQueryLoggingConfigurationCommandInput, DescribeQueryLoggingConfigurationCommandOutput } from "../commands/DescribeQueryLoggingConfigurationCommand";
19
+ import { DescribeResourcePolicyCommandInput, DescribeResourcePolicyCommandOutput } from "../commands/DescribeResourcePolicyCommand";
18
20
  import { DescribeRuleGroupsNamespaceCommandInput, DescribeRuleGroupsNamespaceCommandOutput } from "../commands/DescribeRuleGroupsNamespaceCommand";
19
21
  import { DescribeScraperCommandInput, DescribeScraperCommandOutput } from "../commands/DescribeScraperCommand";
20
22
  import { DescribeWorkspaceCommandInput, DescribeWorkspaceCommandOutput } from "../commands/DescribeWorkspaceCommand";
@@ -25,6 +27,7 @@ import { ListScrapersCommandInput, ListScrapersCommandOutput } from "../commands
25
27
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "../commands/ListTagsForResourceCommand";
26
28
  import { ListWorkspacesCommandInput, ListWorkspacesCommandOutput } from "../commands/ListWorkspacesCommand";
27
29
  import { PutAlertManagerDefinitionCommandInput, PutAlertManagerDefinitionCommandOutput } from "../commands/PutAlertManagerDefinitionCommand";
30
+ import { PutResourcePolicyCommandInput, PutResourcePolicyCommandOutput } from "../commands/PutResourcePolicyCommand";
28
31
  import { PutRuleGroupsNamespaceCommandInput, PutRuleGroupsNamespaceCommandOutput } from "../commands/PutRuleGroupsNamespaceCommand";
29
32
  import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand";
30
33
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand";
@@ -69,6 +72,10 @@ export declare const se_DeleteLoggingConfigurationCommand: (input: DeleteLogging
69
72
  * serializeAws_restJson1DeleteQueryLoggingConfigurationCommand
70
73
  */
71
74
  export declare const se_DeleteQueryLoggingConfigurationCommand: (input: DeleteQueryLoggingConfigurationCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
75
+ /**
76
+ * serializeAws_restJson1DeleteResourcePolicyCommand
77
+ */
78
+ export declare const se_DeleteResourcePolicyCommand: (input: DeleteResourcePolicyCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
72
79
  /**
73
80
  * serializeAws_restJson1DeleteRuleGroupsNamespaceCommand
74
81
  */
@@ -93,6 +100,10 @@ export declare const se_DescribeLoggingConfigurationCommand: (input: DescribeLog
93
100
  * serializeAws_restJson1DescribeQueryLoggingConfigurationCommand
94
101
  */
95
102
  export declare const se_DescribeQueryLoggingConfigurationCommand: (input: DescribeQueryLoggingConfigurationCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
103
+ /**
104
+ * serializeAws_restJson1DescribeResourcePolicyCommand
105
+ */
106
+ export declare const se_DescribeResourcePolicyCommand: (input: DescribeResourcePolicyCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
96
107
  /**
97
108
  * serializeAws_restJson1DescribeRuleGroupsNamespaceCommand
98
109
  */
@@ -133,6 +144,10 @@ export declare const se_ListWorkspacesCommand: (input: ListWorkspacesCommandInpu
133
144
  * serializeAws_restJson1PutAlertManagerDefinitionCommand
134
145
  */
135
146
  export declare const se_PutAlertManagerDefinitionCommand: (input: PutAlertManagerDefinitionCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
147
+ /**
148
+ * serializeAws_restJson1PutResourcePolicyCommand
149
+ */
150
+ export declare const se_PutResourcePolicyCommand: (input: PutResourcePolicyCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
136
151
  /**
137
152
  * serializeAws_restJson1PutRuleGroupsNamespaceCommand
138
153
  */
@@ -201,6 +216,10 @@ export declare const de_DeleteLoggingConfigurationCommand: (output: __HttpRespon
201
216
  * deserializeAws_restJson1DeleteQueryLoggingConfigurationCommand
202
217
  */
203
218
  export declare const de_DeleteQueryLoggingConfigurationCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DeleteQueryLoggingConfigurationCommandOutput>;
219
+ /**
220
+ * deserializeAws_restJson1DeleteResourcePolicyCommand
221
+ */
222
+ export declare const de_DeleteResourcePolicyCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DeleteResourcePolicyCommandOutput>;
204
223
  /**
205
224
  * deserializeAws_restJson1DeleteRuleGroupsNamespaceCommand
206
225
  */
@@ -225,6 +244,10 @@ export declare const de_DescribeLoggingConfigurationCommand: (output: __HttpResp
225
244
  * deserializeAws_restJson1DescribeQueryLoggingConfigurationCommand
226
245
  */
227
246
  export declare const de_DescribeQueryLoggingConfigurationCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DescribeQueryLoggingConfigurationCommandOutput>;
247
+ /**
248
+ * deserializeAws_restJson1DescribeResourcePolicyCommand
249
+ */
250
+ export declare const de_DescribeResourcePolicyCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DescribeResourcePolicyCommandOutput>;
228
251
  /**
229
252
  * deserializeAws_restJson1DescribeRuleGroupsNamespaceCommand
230
253
  */
@@ -265,6 +288,10 @@ export declare const de_ListWorkspacesCommand: (output: __HttpResponse, context:
265
288
  * deserializeAws_restJson1PutAlertManagerDefinitionCommand
266
289
  */
267
290
  export declare const de_PutAlertManagerDefinitionCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<PutAlertManagerDefinitionCommandOutput>;
291
+ /**
292
+ * deserializeAws_restJson1PutResourcePolicyCommand
293
+ */
294
+ export declare const de_PutResourcePolicyCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<PutResourcePolicyCommandOutput>;
268
295
  /**
269
296
  * deserializeAws_restJson1PutRuleGroupsNamespaceCommand
270
297
  */