@aws-sdk/client-grafana 3.576.0 → 3.577.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 +48 -0
- package/dist-cjs/index.js +341 -0
- package/dist-es/Grafana.js +12 -0
- package/dist-es/commands/CreateWorkspaceServiceAccountCommand.js +24 -0
- package/dist-es/commands/CreateWorkspaceServiceAccountTokenCommand.js +25 -0
- package/dist-es/commands/DeleteWorkspaceServiceAccountCommand.js +24 -0
- package/dist-es/commands/DeleteWorkspaceServiceAccountTokenCommand.js +24 -0
- package/dist-es/commands/ListWorkspaceServiceAccountTokensCommand.js +24 -0
- package/dist-es/commands/ListWorkspaceServiceAccountsCommand.js +24 -0
- package/dist-es/commands/index.js +6 -0
- package/dist-es/models/models_0.js +10 -0
- package/dist-es/pagination/ListWorkspaceServiceAccountTokensPaginator.js +4 -0
- package/dist-es/pagination/ListWorkspaceServiceAccountsPaginator.js +4 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/protocols/Aws_restJson1.js +193 -0
- package/dist-types/Grafana.d.ts +42 -0
- package/dist-types/GrafanaClient.d.ts +8 -2
- package/dist-types/commands/AssociateLicenseCommand.d.ts +3 -1
- package/dist-types/commands/CreateWorkspaceApiKeyCommand.d.ts +4 -0
- package/dist-types/commands/CreateWorkspaceServiceAccountCommand.d.ts +97 -0
- package/dist-types/commands/CreateWorkspaceServiceAccountTokenCommand.d.ts +101 -0
- package/dist-types/commands/DeleteWorkspaceApiKeyCommand.d.ts +4 -0
- package/dist-types/commands/DeleteWorkspaceServiceAccountCommand.d.ts +84 -0
- package/dist-types/commands/DeleteWorkspaceServiceAccountTokenCommand.d.ts +86 -0
- package/dist-types/commands/DescribeWorkspaceAuthenticationCommand.d.ts +3 -0
- package/dist-types/commands/ListWorkspaceServiceAccountTokensCommand.d.ts +97 -0
- package/dist-types/commands/ListWorkspaceServiceAccountsCommand.d.ts +90 -0
- package/dist-types/commands/index.d.ts +6 -0
- package/dist-types/models/models_0.d.ts +357 -5
- package/dist-types/pagination/ListWorkspaceServiceAccountTokensPaginator.d.ts +7 -0
- package/dist-types/pagination/ListWorkspaceServiceAccountsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +54 -0
- package/dist-types/ts3.4/Grafana.d.ts +120 -0
- package/dist-types/ts3.4/GrafanaClient.d.ts +36 -0
- package/dist-types/ts3.4/commands/CreateWorkspaceServiceAccountCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/CreateWorkspaceServiceAccountTokenCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/DeleteWorkspaceServiceAccountCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/DeleteWorkspaceServiceAccountTokenCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/ListWorkspaceServiceAccountTokensCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/ListWorkspaceServiceAccountsCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/index.d.ts +6 -0
- package/dist-types/ts3.4/models/models_0.d.ts +86 -0
- package/dist-types/ts3.4/pagination/ListWorkspaceServiceAccountTokensPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListWorkspaceServiceAccountsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +72 -0
- package/package.json +13 -13
|
@@ -0,0 +1,24 @@
|
|
|
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_DeleteWorkspaceServiceAccountCommand, se_DeleteWorkspaceServiceAccountCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class DeleteWorkspaceServiceAccountCommand extends $Command
|
|
8
|
+
.classBuilder()
|
|
9
|
+
.ep({
|
|
10
|
+
...commonParams,
|
|
11
|
+
})
|
|
12
|
+
.m(function (Command, cs, config, o) {
|
|
13
|
+
return [
|
|
14
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
15
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
16
|
+
];
|
|
17
|
+
})
|
|
18
|
+
.s("AWSGrafanaControlPlane", "DeleteWorkspaceServiceAccount", {})
|
|
19
|
+
.n("GrafanaClient", "DeleteWorkspaceServiceAccountCommand")
|
|
20
|
+
.f(void 0, void 0)
|
|
21
|
+
.ser(se_DeleteWorkspaceServiceAccountCommand)
|
|
22
|
+
.de(de_DeleteWorkspaceServiceAccountCommand)
|
|
23
|
+
.build() {
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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_DeleteWorkspaceServiceAccountTokenCommand, se_DeleteWorkspaceServiceAccountTokenCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class DeleteWorkspaceServiceAccountTokenCommand extends $Command
|
|
8
|
+
.classBuilder()
|
|
9
|
+
.ep({
|
|
10
|
+
...commonParams,
|
|
11
|
+
})
|
|
12
|
+
.m(function (Command, cs, config, o) {
|
|
13
|
+
return [
|
|
14
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
15
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
16
|
+
];
|
|
17
|
+
})
|
|
18
|
+
.s("AWSGrafanaControlPlane", "DeleteWorkspaceServiceAccountToken", {})
|
|
19
|
+
.n("GrafanaClient", "DeleteWorkspaceServiceAccountTokenCommand")
|
|
20
|
+
.f(void 0, void 0)
|
|
21
|
+
.ser(se_DeleteWorkspaceServiceAccountTokenCommand)
|
|
22
|
+
.de(de_DeleteWorkspaceServiceAccountTokenCommand)
|
|
23
|
+
.build() {
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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_ListWorkspaceServiceAccountTokensCommand, se_ListWorkspaceServiceAccountTokensCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class ListWorkspaceServiceAccountTokensCommand extends $Command
|
|
8
|
+
.classBuilder()
|
|
9
|
+
.ep({
|
|
10
|
+
...commonParams,
|
|
11
|
+
})
|
|
12
|
+
.m(function (Command, cs, config, o) {
|
|
13
|
+
return [
|
|
14
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
15
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
16
|
+
];
|
|
17
|
+
})
|
|
18
|
+
.s("AWSGrafanaControlPlane", "ListWorkspaceServiceAccountTokens", {})
|
|
19
|
+
.n("GrafanaClient", "ListWorkspaceServiceAccountTokensCommand")
|
|
20
|
+
.f(void 0, void 0)
|
|
21
|
+
.ser(se_ListWorkspaceServiceAccountTokensCommand)
|
|
22
|
+
.de(de_ListWorkspaceServiceAccountTokensCommand)
|
|
23
|
+
.build() {
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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_ListWorkspaceServiceAccountsCommand, se_ListWorkspaceServiceAccountsCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class ListWorkspaceServiceAccountsCommand extends $Command
|
|
8
|
+
.classBuilder()
|
|
9
|
+
.ep({
|
|
10
|
+
...commonParams,
|
|
11
|
+
})
|
|
12
|
+
.m(function (Command, cs, config, o) {
|
|
13
|
+
return [
|
|
14
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
15
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
16
|
+
];
|
|
17
|
+
})
|
|
18
|
+
.s("AWSGrafanaControlPlane", "ListWorkspaceServiceAccounts", {})
|
|
19
|
+
.n("GrafanaClient", "ListWorkspaceServiceAccountsCommand")
|
|
20
|
+
.f(void 0, void 0)
|
|
21
|
+
.ser(se_ListWorkspaceServiceAccountsCommand)
|
|
22
|
+
.de(de_ListWorkspaceServiceAccountsCommand)
|
|
23
|
+
.build() {
|
|
24
|
+
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
export * from "./AssociateLicenseCommand";
|
|
2
2
|
export * from "./CreateWorkspaceApiKeyCommand";
|
|
3
3
|
export * from "./CreateWorkspaceCommand";
|
|
4
|
+
export * from "./CreateWorkspaceServiceAccountCommand";
|
|
5
|
+
export * from "./CreateWorkspaceServiceAccountTokenCommand";
|
|
4
6
|
export * from "./DeleteWorkspaceApiKeyCommand";
|
|
5
7
|
export * from "./DeleteWorkspaceCommand";
|
|
8
|
+
export * from "./DeleteWorkspaceServiceAccountCommand";
|
|
9
|
+
export * from "./DeleteWorkspaceServiceAccountTokenCommand";
|
|
6
10
|
export * from "./DescribeWorkspaceAuthenticationCommand";
|
|
7
11
|
export * from "./DescribeWorkspaceCommand";
|
|
8
12
|
export * from "./DescribeWorkspaceConfigurationCommand";
|
|
@@ -10,6 +14,8 @@ export * from "./DisassociateLicenseCommand";
|
|
|
10
14
|
export * from "./ListPermissionsCommand";
|
|
11
15
|
export * from "./ListTagsForResourceCommand";
|
|
12
16
|
export * from "./ListVersionsCommand";
|
|
17
|
+
export * from "./ListWorkspaceServiceAccountTokensCommand";
|
|
18
|
+
export * from "./ListWorkspaceServiceAccountsCommand";
|
|
13
19
|
export * from "./ListWorkspacesCommand";
|
|
14
20
|
export * from "./TagResourceCommand";
|
|
15
21
|
export * from "./UntagResourceCommand";
|
|
@@ -228,6 +228,16 @@ export const DisassociateLicenseResponseFilterSensitiveLog = (obj) => ({
|
|
|
228
228
|
...obj,
|
|
229
229
|
...(obj.workspace && { workspace: WorkspaceDescriptionFilterSensitiveLog(obj.workspace) }),
|
|
230
230
|
});
|
|
231
|
+
export const ServiceAccountTokenSummaryWithKeyFilterSensitiveLog = (obj) => ({
|
|
232
|
+
...obj,
|
|
233
|
+
...(obj.key && { key: SENSITIVE_STRING }),
|
|
234
|
+
});
|
|
235
|
+
export const CreateWorkspaceServiceAccountTokenResponseFilterSensitiveLog = (obj) => ({
|
|
236
|
+
...obj,
|
|
237
|
+
...(obj.serviceAccountToken && {
|
|
238
|
+
serviceAccountToken: ServiceAccountTokenSummaryWithKeyFilterSensitiveLog(obj.serviceAccountToken),
|
|
239
|
+
}),
|
|
240
|
+
});
|
|
231
241
|
export const CreateWorkspaceRequestFilterSensitiveLog = (obj) => ({
|
|
232
242
|
...obj,
|
|
233
243
|
...(obj.organizationRoleName && { organizationRoleName: SENSITIVE_STRING }),
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { ListWorkspaceServiceAccountTokensCommand, } from "../commands/ListWorkspaceServiceAccountTokensCommand";
|
|
3
|
+
import { GrafanaClient } from "../GrafanaClient";
|
|
4
|
+
export const paginateListWorkspaceServiceAccountTokens = createPaginator(GrafanaClient, ListWorkspaceServiceAccountTokensCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { ListWorkspaceServiceAccountsCommand, } from "../commands/ListWorkspaceServiceAccountsCommand";
|
|
3
|
+
import { GrafanaClient } from "../GrafanaClient";
|
|
4
|
+
export const paginateListWorkspaceServiceAccounts = createPaginator(GrafanaClient, ListWorkspaceServiceAccountsCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export * from "./Interfaces";
|
|
2
2
|
export * from "./ListPermissionsPaginator";
|
|
3
3
|
export * from "./ListVersionsPaginator";
|
|
4
|
+
export * from "./ListWorkspaceServiceAccountTokensPaginator";
|
|
5
|
+
export * from "./ListWorkspaceServiceAccountsPaginator";
|
|
4
6
|
export * from "./ListWorkspacesPaginator";
|
|
@@ -61,6 +61,37 @@ export const se_CreateWorkspaceApiKeyCommand = async (input, context) => {
|
|
|
61
61
|
b.m("POST").h(headers).b(body);
|
|
62
62
|
return b.build();
|
|
63
63
|
};
|
|
64
|
+
export const se_CreateWorkspaceServiceAccountCommand = async (input, context) => {
|
|
65
|
+
const b = rb(input, context);
|
|
66
|
+
const headers = {
|
|
67
|
+
"content-type": "application/json",
|
|
68
|
+
};
|
|
69
|
+
b.bp("/workspaces/{workspaceId}/serviceaccounts");
|
|
70
|
+
b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
71
|
+
let body;
|
|
72
|
+
body = JSON.stringify(take(input, {
|
|
73
|
+
grafanaRole: [],
|
|
74
|
+
name: [],
|
|
75
|
+
}));
|
|
76
|
+
b.m("POST").h(headers).b(body);
|
|
77
|
+
return b.build();
|
|
78
|
+
};
|
|
79
|
+
export const se_CreateWorkspaceServiceAccountTokenCommand = async (input, context) => {
|
|
80
|
+
const b = rb(input, context);
|
|
81
|
+
const headers = {
|
|
82
|
+
"content-type": "application/json",
|
|
83
|
+
};
|
|
84
|
+
b.bp("/workspaces/{workspaceId}/serviceaccounts/{serviceAccountId}/tokens");
|
|
85
|
+
b.p("serviceAccountId", () => input.serviceAccountId, "{serviceAccountId}", false);
|
|
86
|
+
b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
87
|
+
let body;
|
|
88
|
+
body = JSON.stringify(take(input, {
|
|
89
|
+
name: [],
|
|
90
|
+
secondsToLive: [],
|
|
91
|
+
}));
|
|
92
|
+
b.m("POST").h(headers).b(body);
|
|
93
|
+
return b.build();
|
|
94
|
+
};
|
|
64
95
|
export const se_DeleteWorkspaceCommand = async (input, context) => {
|
|
65
96
|
const b = rb(input, context);
|
|
66
97
|
const headers = {};
|
|
@@ -80,6 +111,27 @@ export const se_DeleteWorkspaceApiKeyCommand = async (input, context) => {
|
|
|
80
111
|
b.m("DELETE").h(headers).b(body);
|
|
81
112
|
return b.build();
|
|
82
113
|
};
|
|
114
|
+
export const se_DeleteWorkspaceServiceAccountCommand = async (input, context) => {
|
|
115
|
+
const b = rb(input, context);
|
|
116
|
+
const headers = {};
|
|
117
|
+
b.bp("/workspaces/{workspaceId}/serviceaccounts/{serviceAccountId}");
|
|
118
|
+
b.p("serviceAccountId", () => input.serviceAccountId, "{serviceAccountId}", false);
|
|
119
|
+
b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
120
|
+
let body;
|
|
121
|
+
b.m("DELETE").h(headers).b(body);
|
|
122
|
+
return b.build();
|
|
123
|
+
};
|
|
124
|
+
export const se_DeleteWorkspaceServiceAccountTokenCommand = async (input, context) => {
|
|
125
|
+
const b = rb(input, context);
|
|
126
|
+
const headers = {};
|
|
127
|
+
b.bp("/workspaces/{workspaceId}/serviceaccounts/{serviceAccountId}/tokens/{tokenId}");
|
|
128
|
+
b.p("tokenId", () => input.tokenId, "{tokenId}", false);
|
|
129
|
+
b.p("serviceAccountId", () => input.serviceAccountId, "{serviceAccountId}", false);
|
|
130
|
+
b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
131
|
+
let body;
|
|
132
|
+
b.m("DELETE").h(headers).b(body);
|
|
133
|
+
return b.build();
|
|
134
|
+
};
|
|
83
135
|
export const se_DescribeWorkspaceCommand = async (input, context) => {
|
|
84
136
|
const b = rb(input, context);
|
|
85
137
|
const headers = {};
|
|
@@ -167,6 +219,33 @@ export const se_ListWorkspacesCommand = async (input, context) => {
|
|
|
167
219
|
b.m("GET").h(headers).q(query).b(body);
|
|
168
220
|
return b.build();
|
|
169
221
|
};
|
|
222
|
+
export const se_ListWorkspaceServiceAccountsCommand = async (input, context) => {
|
|
223
|
+
const b = rb(input, context);
|
|
224
|
+
const headers = {};
|
|
225
|
+
b.bp("/workspaces/{workspaceId}/serviceaccounts");
|
|
226
|
+
b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
227
|
+
const query = map({
|
|
228
|
+
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
229
|
+
[_nT]: [, input[_nT]],
|
|
230
|
+
});
|
|
231
|
+
let body;
|
|
232
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
233
|
+
return b.build();
|
|
234
|
+
};
|
|
235
|
+
export const se_ListWorkspaceServiceAccountTokensCommand = async (input, context) => {
|
|
236
|
+
const b = rb(input, context);
|
|
237
|
+
const headers = {};
|
|
238
|
+
b.bp("/workspaces/{workspaceId}/serviceaccounts/{serviceAccountId}/tokens");
|
|
239
|
+
b.p("serviceAccountId", () => input.serviceAccountId, "{serviceAccountId}", false);
|
|
240
|
+
b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
241
|
+
const query = map({
|
|
242
|
+
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
243
|
+
[_nT]: [, input[_nT]],
|
|
244
|
+
});
|
|
245
|
+
let body;
|
|
246
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
247
|
+
return b.build();
|
|
248
|
+
};
|
|
170
249
|
export const se_TagResourceCommand = async (input, context) => {
|
|
171
250
|
const b = rb(input, context);
|
|
172
251
|
const headers = {
|
|
@@ -311,6 +390,39 @@ export const de_CreateWorkspaceApiKeyCommand = async (output, context) => {
|
|
|
311
390
|
Object.assign(contents, doc);
|
|
312
391
|
return contents;
|
|
313
392
|
};
|
|
393
|
+
export const de_CreateWorkspaceServiceAccountCommand = async (output, context) => {
|
|
394
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
395
|
+
return de_CommandError(output, context);
|
|
396
|
+
}
|
|
397
|
+
const contents = map({
|
|
398
|
+
$metadata: deserializeMetadata(output),
|
|
399
|
+
});
|
|
400
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
401
|
+
const doc = take(data, {
|
|
402
|
+
grafanaRole: __expectString,
|
|
403
|
+
id: __expectString,
|
|
404
|
+
name: __expectString,
|
|
405
|
+
workspaceId: __expectString,
|
|
406
|
+
});
|
|
407
|
+
Object.assign(contents, doc);
|
|
408
|
+
return contents;
|
|
409
|
+
};
|
|
410
|
+
export const de_CreateWorkspaceServiceAccountTokenCommand = async (output, context) => {
|
|
411
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
412
|
+
return de_CommandError(output, context);
|
|
413
|
+
}
|
|
414
|
+
const contents = map({
|
|
415
|
+
$metadata: deserializeMetadata(output),
|
|
416
|
+
});
|
|
417
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
418
|
+
const doc = take(data, {
|
|
419
|
+
serviceAccountId: __expectString,
|
|
420
|
+
serviceAccountToken: _json,
|
|
421
|
+
workspaceId: __expectString,
|
|
422
|
+
});
|
|
423
|
+
Object.assign(contents, doc);
|
|
424
|
+
return contents;
|
|
425
|
+
};
|
|
314
426
|
export const de_DeleteWorkspaceCommand = async (output, context) => {
|
|
315
427
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
316
428
|
return de_CommandError(output, context);
|
|
@@ -340,6 +452,37 @@ export const de_DeleteWorkspaceApiKeyCommand = async (output, context) => {
|
|
|
340
452
|
Object.assign(contents, doc);
|
|
341
453
|
return contents;
|
|
342
454
|
};
|
|
455
|
+
export const de_DeleteWorkspaceServiceAccountCommand = async (output, context) => {
|
|
456
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
457
|
+
return de_CommandError(output, context);
|
|
458
|
+
}
|
|
459
|
+
const contents = map({
|
|
460
|
+
$metadata: deserializeMetadata(output),
|
|
461
|
+
});
|
|
462
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
463
|
+
const doc = take(data, {
|
|
464
|
+
serviceAccountId: __expectString,
|
|
465
|
+
workspaceId: __expectString,
|
|
466
|
+
});
|
|
467
|
+
Object.assign(contents, doc);
|
|
468
|
+
return contents;
|
|
469
|
+
};
|
|
470
|
+
export const de_DeleteWorkspaceServiceAccountTokenCommand = async (output, context) => {
|
|
471
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
472
|
+
return de_CommandError(output, context);
|
|
473
|
+
}
|
|
474
|
+
const contents = map({
|
|
475
|
+
$metadata: deserializeMetadata(output),
|
|
476
|
+
});
|
|
477
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
478
|
+
const doc = take(data, {
|
|
479
|
+
serviceAccountId: __expectString,
|
|
480
|
+
tokenId: __expectString,
|
|
481
|
+
workspaceId: __expectString,
|
|
482
|
+
});
|
|
483
|
+
Object.assign(contents, doc);
|
|
484
|
+
return contents;
|
|
485
|
+
};
|
|
343
486
|
export const de_DescribeWorkspaceCommand = async (output, context) => {
|
|
344
487
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
345
488
|
return de_CommandError(output, context);
|
|
@@ -456,6 +599,39 @@ export const de_ListWorkspacesCommand = async (output, context) => {
|
|
|
456
599
|
Object.assign(contents, doc);
|
|
457
600
|
return contents;
|
|
458
601
|
};
|
|
602
|
+
export const de_ListWorkspaceServiceAccountsCommand = async (output, context) => {
|
|
603
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
604
|
+
return de_CommandError(output, context);
|
|
605
|
+
}
|
|
606
|
+
const contents = map({
|
|
607
|
+
$metadata: deserializeMetadata(output),
|
|
608
|
+
});
|
|
609
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
610
|
+
const doc = take(data, {
|
|
611
|
+
nextToken: __expectString,
|
|
612
|
+
serviceAccounts: _json,
|
|
613
|
+
workspaceId: __expectString,
|
|
614
|
+
});
|
|
615
|
+
Object.assign(contents, doc);
|
|
616
|
+
return contents;
|
|
617
|
+
};
|
|
618
|
+
export const de_ListWorkspaceServiceAccountTokensCommand = async (output, context) => {
|
|
619
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
620
|
+
return de_CommandError(output, context);
|
|
621
|
+
}
|
|
622
|
+
const contents = map({
|
|
623
|
+
$metadata: deserializeMetadata(output),
|
|
624
|
+
});
|
|
625
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
626
|
+
const doc = take(data, {
|
|
627
|
+
nextToken: __expectString,
|
|
628
|
+
serviceAccountId: __expectString,
|
|
629
|
+
serviceAccountTokens: (_) => de_ServiceAccountTokenList(_, context),
|
|
630
|
+
workspaceId: __expectString,
|
|
631
|
+
});
|
|
632
|
+
Object.assign(contents, doc);
|
|
633
|
+
return contents;
|
|
634
|
+
};
|
|
459
635
|
export const de_TagResourceCommand = async (output, context) => {
|
|
460
636
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
461
637
|
return de_CommandError(output, context);
|
|
@@ -673,6 +849,23 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
673
849
|
});
|
|
674
850
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
675
851
|
};
|
|
852
|
+
const de_ServiceAccountTokenList = (output, context) => {
|
|
853
|
+
const retVal = (output || [])
|
|
854
|
+
.filter((e) => e != null)
|
|
855
|
+
.map((entry) => {
|
|
856
|
+
return de_ServiceAccountTokenSummary(entry, context);
|
|
857
|
+
});
|
|
858
|
+
return retVal;
|
|
859
|
+
};
|
|
860
|
+
const de_ServiceAccountTokenSummary = (output, context) => {
|
|
861
|
+
return take(output, {
|
|
862
|
+
createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
863
|
+
expiresAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
864
|
+
id: __expectString,
|
|
865
|
+
lastUsedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
866
|
+
name: __expectString,
|
|
867
|
+
});
|
|
868
|
+
};
|
|
676
869
|
const de_WorkspaceDescription = (output, context) => {
|
|
677
870
|
return take(output, {
|
|
678
871
|
accountAccessType: __expectString,
|
package/dist-types/Grafana.d.ts
CHANGED
|
@@ -2,8 +2,12 @@ import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
|
2
2
|
import { AssociateLicenseCommandInput, AssociateLicenseCommandOutput } from "./commands/AssociateLicenseCommand";
|
|
3
3
|
import { CreateWorkspaceApiKeyCommandInput, CreateWorkspaceApiKeyCommandOutput } from "./commands/CreateWorkspaceApiKeyCommand";
|
|
4
4
|
import { CreateWorkspaceCommandInput, CreateWorkspaceCommandOutput } from "./commands/CreateWorkspaceCommand";
|
|
5
|
+
import { CreateWorkspaceServiceAccountCommandInput, CreateWorkspaceServiceAccountCommandOutput } from "./commands/CreateWorkspaceServiceAccountCommand";
|
|
6
|
+
import { CreateWorkspaceServiceAccountTokenCommandInput, CreateWorkspaceServiceAccountTokenCommandOutput } from "./commands/CreateWorkspaceServiceAccountTokenCommand";
|
|
5
7
|
import { DeleteWorkspaceApiKeyCommandInput, DeleteWorkspaceApiKeyCommandOutput } from "./commands/DeleteWorkspaceApiKeyCommand";
|
|
6
8
|
import { DeleteWorkspaceCommandInput, DeleteWorkspaceCommandOutput } from "./commands/DeleteWorkspaceCommand";
|
|
9
|
+
import { DeleteWorkspaceServiceAccountCommandInput, DeleteWorkspaceServiceAccountCommandOutput } from "./commands/DeleteWorkspaceServiceAccountCommand";
|
|
10
|
+
import { DeleteWorkspaceServiceAccountTokenCommandInput, DeleteWorkspaceServiceAccountTokenCommandOutput } from "./commands/DeleteWorkspaceServiceAccountTokenCommand";
|
|
7
11
|
import { DescribeWorkspaceAuthenticationCommandInput, DescribeWorkspaceAuthenticationCommandOutput } from "./commands/DescribeWorkspaceAuthenticationCommand";
|
|
8
12
|
import { DescribeWorkspaceCommandInput, DescribeWorkspaceCommandOutput } from "./commands/DescribeWorkspaceCommand";
|
|
9
13
|
import { DescribeWorkspaceConfigurationCommandInput, DescribeWorkspaceConfigurationCommandOutput } from "./commands/DescribeWorkspaceConfigurationCommand";
|
|
@@ -12,6 +16,8 @@ import { ListPermissionsCommandInput, ListPermissionsCommandOutput } from "./com
|
|
|
12
16
|
import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
|
|
13
17
|
import { ListVersionsCommandInput, ListVersionsCommandOutput } from "./commands/ListVersionsCommand";
|
|
14
18
|
import { ListWorkspacesCommandInput, ListWorkspacesCommandOutput } from "./commands/ListWorkspacesCommand";
|
|
19
|
+
import { ListWorkspaceServiceAccountsCommandInput, ListWorkspaceServiceAccountsCommandOutput } from "./commands/ListWorkspaceServiceAccountsCommand";
|
|
20
|
+
import { ListWorkspaceServiceAccountTokensCommandInput, ListWorkspaceServiceAccountTokensCommandOutput } from "./commands/ListWorkspaceServiceAccountTokensCommand";
|
|
15
21
|
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
|
|
16
22
|
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
|
|
17
23
|
import { UpdatePermissionsCommandInput, UpdatePermissionsCommandOutput } from "./commands/UpdatePermissionsCommand";
|
|
@@ -38,6 +44,18 @@ export interface Grafana {
|
|
|
38
44
|
createWorkspaceApiKey(args: CreateWorkspaceApiKeyCommandInput, options?: __HttpHandlerOptions): Promise<CreateWorkspaceApiKeyCommandOutput>;
|
|
39
45
|
createWorkspaceApiKey(args: CreateWorkspaceApiKeyCommandInput, cb: (err: any, data?: CreateWorkspaceApiKeyCommandOutput) => void): void;
|
|
40
46
|
createWorkspaceApiKey(args: CreateWorkspaceApiKeyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateWorkspaceApiKeyCommandOutput) => void): void;
|
|
47
|
+
/**
|
|
48
|
+
* @see {@link CreateWorkspaceServiceAccountCommand}
|
|
49
|
+
*/
|
|
50
|
+
createWorkspaceServiceAccount(args: CreateWorkspaceServiceAccountCommandInput, options?: __HttpHandlerOptions): Promise<CreateWorkspaceServiceAccountCommandOutput>;
|
|
51
|
+
createWorkspaceServiceAccount(args: CreateWorkspaceServiceAccountCommandInput, cb: (err: any, data?: CreateWorkspaceServiceAccountCommandOutput) => void): void;
|
|
52
|
+
createWorkspaceServiceAccount(args: CreateWorkspaceServiceAccountCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateWorkspaceServiceAccountCommandOutput) => void): void;
|
|
53
|
+
/**
|
|
54
|
+
* @see {@link CreateWorkspaceServiceAccountTokenCommand}
|
|
55
|
+
*/
|
|
56
|
+
createWorkspaceServiceAccountToken(args: CreateWorkspaceServiceAccountTokenCommandInput, options?: __HttpHandlerOptions): Promise<CreateWorkspaceServiceAccountTokenCommandOutput>;
|
|
57
|
+
createWorkspaceServiceAccountToken(args: CreateWorkspaceServiceAccountTokenCommandInput, cb: (err: any, data?: CreateWorkspaceServiceAccountTokenCommandOutput) => void): void;
|
|
58
|
+
createWorkspaceServiceAccountToken(args: CreateWorkspaceServiceAccountTokenCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateWorkspaceServiceAccountTokenCommandOutput) => void): void;
|
|
41
59
|
/**
|
|
42
60
|
* @see {@link DeleteWorkspaceCommand}
|
|
43
61
|
*/
|
|
@@ -50,6 +68,18 @@ export interface Grafana {
|
|
|
50
68
|
deleteWorkspaceApiKey(args: DeleteWorkspaceApiKeyCommandInput, options?: __HttpHandlerOptions): Promise<DeleteWorkspaceApiKeyCommandOutput>;
|
|
51
69
|
deleteWorkspaceApiKey(args: DeleteWorkspaceApiKeyCommandInput, cb: (err: any, data?: DeleteWorkspaceApiKeyCommandOutput) => void): void;
|
|
52
70
|
deleteWorkspaceApiKey(args: DeleteWorkspaceApiKeyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteWorkspaceApiKeyCommandOutput) => void): void;
|
|
71
|
+
/**
|
|
72
|
+
* @see {@link DeleteWorkspaceServiceAccountCommand}
|
|
73
|
+
*/
|
|
74
|
+
deleteWorkspaceServiceAccount(args: DeleteWorkspaceServiceAccountCommandInput, options?: __HttpHandlerOptions): Promise<DeleteWorkspaceServiceAccountCommandOutput>;
|
|
75
|
+
deleteWorkspaceServiceAccount(args: DeleteWorkspaceServiceAccountCommandInput, cb: (err: any, data?: DeleteWorkspaceServiceAccountCommandOutput) => void): void;
|
|
76
|
+
deleteWorkspaceServiceAccount(args: DeleteWorkspaceServiceAccountCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteWorkspaceServiceAccountCommandOutput) => void): void;
|
|
77
|
+
/**
|
|
78
|
+
* @see {@link DeleteWorkspaceServiceAccountTokenCommand}
|
|
79
|
+
*/
|
|
80
|
+
deleteWorkspaceServiceAccountToken(args: DeleteWorkspaceServiceAccountTokenCommandInput, options?: __HttpHandlerOptions): Promise<DeleteWorkspaceServiceAccountTokenCommandOutput>;
|
|
81
|
+
deleteWorkspaceServiceAccountToken(args: DeleteWorkspaceServiceAccountTokenCommandInput, cb: (err: any, data?: DeleteWorkspaceServiceAccountTokenCommandOutput) => void): void;
|
|
82
|
+
deleteWorkspaceServiceAccountToken(args: DeleteWorkspaceServiceAccountTokenCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteWorkspaceServiceAccountTokenCommandOutput) => void): void;
|
|
53
83
|
/**
|
|
54
84
|
* @see {@link DescribeWorkspaceCommand}
|
|
55
85
|
*/
|
|
@@ -100,6 +130,18 @@ export interface Grafana {
|
|
|
100
130
|
listWorkspaces(args: ListWorkspacesCommandInput, options?: __HttpHandlerOptions): Promise<ListWorkspacesCommandOutput>;
|
|
101
131
|
listWorkspaces(args: ListWorkspacesCommandInput, cb: (err: any, data?: ListWorkspacesCommandOutput) => void): void;
|
|
102
132
|
listWorkspaces(args: ListWorkspacesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListWorkspacesCommandOutput) => void): void;
|
|
133
|
+
/**
|
|
134
|
+
* @see {@link ListWorkspaceServiceAccountsCommand}
|
|
135
|
+
*/
|
|
136
|
+
listWorkspaceServiceAccounts(args: ListWorkspaceServiceAccountsCommandInput, options?: __HttpHandlerOptions): Promise<ListWorkspaceServiceAccountsCommandOutput>;
|
|
137
|
+
listWorkspaceServiceAccounts(args: ListWorkspaceServiceAccountsCommandInput, cb: (err: any, data?: ListWorkspaceServiceAccountsCommandOutput) => void): void;
|
|
138
|
+
listWorkspaceServiceAccounts(args: ListWorkspaceServiceAccountsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListWorkspaceServiceAccountsCommandOutput) => void): void;
|
|
139
|
+
/**
|
|
140
|
+
* @see {@link ListWorkspaceServiceAccountTokensCommand}
|
|
141
|
+
*/
|
|
142
|
+
listWorkspaceServiceAccountTokens(args: ListWorkspaceServiceAccountTokensCommandInput, options?: __HttpHandlerOptions): Promise<ListWorkspaceServiceAccountTokensCommandOutput>;
|
|
143
|
+
listWorkspaceServiceAccountTokens(args: ListWorkspaceServiceAccountTokensCommandInput, cb: (err: any, data?: ListWorkspaceServiceAccountTokensCommandOutput) => void): void;
|
|
144
|
+
listWorkspaceServiceAccountTokens(args: ListWorkspaceServiceAccountTokensCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListWorkspaceServiceAccountTokensCommandOutput) => void): void;
|
|
103
145
|
/**
|
|
104
146
|
* @see {@link TagResourceCommand}
|
|
105
147
|
*/
|
|
@@ -10,8 +10,12 @@ import { HttpAuthSchemeInputConfig, HttpAuthSchemeResolvedConfig } from "./auth/
|
|
|
10
10
|
import { AssociateLicenseCommandInput, AssociateLicenseCommandOutput } from "./commands/AssociateLicenseCommand";
|
|
11
11
|
import { CreateWorkspaceApiKeyCommandInput, CreateWorkspaceApiKeyCommandOutput } from "./commands/CreateWorkspaceApiKeyCommand";
|
|
12
12
|
import { CreateWorkspaceCommandInput, CreateWorkspaceCommandOutput } from "./commands/CreateWorkspaceCommand";
|
|
13
|
+
import { CreateWorkspaceServiceAccountCommandInput, CreateWorkspaceServiceAccountCommandOutput } from "./commands/CreateWorkspaceServiceAccountCommand";
|
|
14
|
+
import { CreateWorkspaceServiceAccountTokenCommandInput, CreateWorkspaceServiceAccountTokenCommandOutput } from "./commands/CreateWorkspaceServiceAccountTokenCommand";
|
|
13
15
|
import { DeleteWorkspaceApiKeyCommandInput, DeleteWorkspaceApiKeyCommandOutput } from "./commands/DeleteWorkspaceApiKeyCommand";
|
|
14
16
|
import { DeleteWorkspaceCommandInput, DeleteWorkspaceCommandOutput } from "./commands/DeleteWorkspaceCommand";
|
|
17
|
+
import { DeleteWorkspaceServiceAccountCommandInput, DeleteWorkspaceServiceAccountCommandOutput } from "./commands/DeleteWorkspaceServiceAccountCommand";
|
|
18
|
+
import { DeleteWorkspaceServiceAccountTokenCommandInput, DeleteWorkspaceServiceAccountTokenCommandOutput } from "./commands/DeleteWorkspaceServiceAccountTokenCommand";
|
|
15
19
|
import { DescribeWorkspaceAuthenticationCommandInput, DescribeWorkspaceAuthenticationCommandOutput } from "./commands/DescribeWorkspaceAuthenticationCommand";
|
|
16
20
|
import { DescribeWorkspaceCommandInput, DescribeWorkspaceCommandOutput } from "./commands/DescribeWorkspaceCommand";
|
|
17
21
|
import { DescribeWorkspaceConfigurationCommandInput, DescribeWorkspaceConfigurationCommandOutput } from "./commands/DescribeWorkspaceConfigurationCommand";
|
|
@@ -20,6 +24,8 @@ import { ListPermissionsCommandInput, ListPermissionsCommandOutput } from "./com
|
|
|
20
24
|
import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
|
|
21
25
|
import { ListVersionsCommandInput, ListVersionsCommandOutput } from "./commands/ListVersionsCommand";
|
|
22
26
|
import { ListWorkspacesCommandInput, ListWorkspacesCommandOutput } from "./commands/ListWorkspacesCommand";
|
|
27
|
+
import { ListWorkspaceServiceAccountsCommandInput, ListWorkspaceServiceAccountsCommandOutput } from "./commands/ListWorkspaceServiceAccountsCommand";
|
|
28
|
+
import { ListWorkspaceServiceAccountTokensCommandInput, ListWorkspaceServiceAccountTokensCommandOutput } from "./commands/ListWorkspaceServiceAccountTokensCommand";
|
|
23
29
|
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
|
|
24
30
|
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
|
|
25
31
|
import { UpdatePermissionsCommandInput, UpdatePermissionsCommandOutput } from "./commands/UpdatePermissionsCommand";
|
|
@@ -32,11 +38,11 @@ export { __Client };
|
|
|
32
38
|
/**
|
|
33
39
|
* @public
|
|
34
40
|
*/
|
|
35
|
-
export type ServiceInputTypes = AssociateLicenseCommandInput | CreateWorkspaceApiKeyCommandInput | CreateWorkspaceCommandInput | DeleteWorkspaceApiKeyCommandInput | DeleteWorkspaceCommandInput | DescribeWorkspaceAuthenticationCommandInput | DescribeWorkspaceCommandInput | DescribeWorkspaceConfigurationCommandInput | DisassociateLicenseCommandInput | ListPermissionsCommandInput | ListTagsForResourceCommandInput | ListVersionsCommandInput | ListWorkspacesCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdatePermissionsCommandInput | UpdateWorkspaceAuthenticationCommandInput | UpdateWorkspaceCommandInput | UpdateWorkspaceConfigurationCommandInput;
|
|
41
|
+
export type ServiceInputTypes = AssociateLicenseCommandInput | CreateWorkspaceApiKeyCommandInput | CreateWorkspaceCommandInput | CreateWorkspaceServiceAccountCommandInput | CreateWorkspaceServiceAccountTokenCommandInput | DeleteWorkspaceApiKeyCommandInput | DeleteWorkspaceCommandInput | DeleteWorkspaceServiceAccountCommandInput | DeleteWorkspaceServiceAccountTokenCommandInput | DescribeWorkspaceAuthenticationCommandInput | DescribeWorkspaceCommandInput | DescribeWorkspaceConfigurationCommandInput | DisassociateLicenseCommandInput | ListPermissionsCommandInput | ListTagsForResourceCommandInput | ListVersionsCommandInput | ListWorkspaceServiceAccountTokensCommandInput | ListWorkspaceServiceAccountsCommandInput | ListWorkspacesCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdatePermissionsCommandInput | UpdateWorkspaceAuthenticationCommandInput | UpdateWorkspaceCommandInput | UpdateWorkspaceConfigurationCommandInput;
|
|
36
42
|
/**
|
|
37
43
|
* @public
|
|
38
44
|
*/
|
|
39
|
-
export type ServiceOutputTypes = AssociateLicenseCommandOutput | CreateWorkspaceApiKeyCommandOutput | CreateWorkspaceCommandOutput | DeleteWorkspaceApiKeyCommandOutput | DeleteWorkspaceCommandOutput | DescribeWorkspaceAuthenticationCommandOutput | DescribeWorkspaceCommandOutput | DescribeWorkspaceConfigurationCommandOutput | DisassociateLicenseCommandOutput | ListPermissionsCommandOutput | ListTagsForResourceCommandOutput | ListVersionsCommandOutput | ListWorkspacesCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdatePermissionsCommandOutput | UpdateWorkspaceAuthenticationCommandOutput | UpdateWorkspaceCommandOutput | UpdateWorkspaceConfigurationCommandOutput;
|
|
45
|
+
export type ServiceOutputTypes = AssociateLicenseCommandOutput | CreateWorkspaceApiKeyCommandOutput | CreateWorkspaceCommandOutput | CreateWorkspaceServiceAccountCommandOutput | CreateWorkspaceServiceAccountTokenCommandOutput | DeleteWorkspaceApiKeyCommandOutput | DeleteWorkspaceCommandOutput | DeleteWorkspaceServiceAccountCommandOutput | DeleteWorkspaceServiceAccountTokenCommandOutput | DescribeWorkspaceAuthenticationCommandOutput | DescribeWorkspaceCommandOutput | DescribeWorkspaceConfigurationCommandOutput | DisassociateLicenseCommandOutput | ListPermissionsCommandOutput | ListTagsForResourceCommandOutput | ListVersionsCommandOutput | ListWorkspaceServiceAccountTokensCommandOutput | ListWorkspaceServiceAccountsCommandOutput | ListWorkspacesCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdatePermissionsCommandOutput | UpdateWorkspaceAuthenticationCommandOutput | UpdateWorkspaceCommandOutput | UpdateWorkspaceConfigurationCommandOutput;
|
|
40
46
|
/**
|
|
41
47
|
* @public
|
|
42
48
|
*/
|
|
@@ -26,7 +26,9 @@ declare const AssociateLicenseCommand_base: {
|
|
|
26
26
|
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
27
27
|
};
|
|
28
28
|
/**
|
|
29
|
-
* <p>Assigns a Grafana Enterprise license to a workspace.
|
|
29
|
+
* <p>Assigns a Grafana Enterprise license to a workspace. To upgrade, you must use
|
|
30
|
+
* <code>ENTERPRISE</code> for the <code>licenseType</code>, and pass in a valid
|
|
31
|
+
* Grafana Labs token for the <code>grafanaToken</code>. Upgrading to Grafana Enterprise
|
|
30
32
|
* incurs additional fees. For more information, see <a href="https://docs.aws.amazon.com/grafana/latest/userguide/upgrade-to-Grafana-Enterprise.html">Upgrade a
|
|
31
33
|
* workspace to Grafana Enterprise</a>.</p>
|
|
32
34
|
* @example
|
|
@@ -29,6 +29,10 @@ declare const CreateWorkspaceApiKeyCommand_base: {
|
|
|
29
29
|
* <p>Creates a Grafana API key for the workspace. This key can be used to authenticate
|
|
30
30
|
* requests sent to the workspace's HTTP API. See <a href="https://docs.aws.amazon.com/grafana/latest/userguide/Using-Grafana-APIs.html">https://docs.aws.amazon.com/grafana/latest/userguide/Using-Grafana-APIs.html</a>
|
|
31
31
|
* for available APIs and example requests.</p>
|
|
32
|
+
* <note>
|
|
33
|
+
* <p>In workspaces compatible with Grafana version 9 or above, use workspace service
|
|
34
|
+
* accounts instead of API keys. API keys will be removed in a future release.</p>
|
|
35
|
+
* </note>
|
|
32
36
|
* @example
|
|
33
37
|
* Use a bare-bones client and the command you need to make an API call.
|
|
34
38
|
* ```javascript
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
2
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import { GrafanaClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GrafanaClient";
|
|
4
|
+
import { CreateWorkspaceServiceAccountRequest, CreateWorkspaceServiceAccountResponse } from "../models/models_0";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export { __MetadataBearer, $Command };
|
|
9
|
+
/**
|
|
10
|
+
* @public
|
|
11
|
+
*
|
|
12
|
+
* The input for {@link CreateWorkspaceServiceAccountCommand}.
|
|
13
|
+
*/
|
|
14
|
+
export interface CreateWorkspaceServiceAccountCommandInput extends CreateWorkspaceServiceAccountRequest {
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @public
|
|
18
|
+
*
|
|
19
|
+
* The output of {@link CreateWorkspaceServiceAccountCommand}.
|
|
20
|
+
*/
|
|
21
|
+
export interface CreateWorkspaceServiceAccountCommandOutput extends CreateWorkspaceServiceAccountResponse, __MetadataBearer {
|
|
22
|
+
}
|
|
23
|
+
declare const CreateWorkspaceServiceAccountCommand_base: {
|
|
24
|
+
new (input: CreateWorkspaceServiceAccountCommandInput): import("@smithy/smithy-client").CommandImpl<CreateWorkspaceServiceAccountCommandInput, CreateWorkspaceServiceAccountCommandOutput, GrafanaClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
25
|
+
new (__0_0: CreateWorkspaceServiceAccountCommandInput): import("@smithy/smithy-client").CommandImpl<CreateWorkspaceServiceAccountCommandInput, CreateWorkspaceServiceAccountCommandOutput, GrafanaClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* <p>Creates a service account for the workspace. A service account can be used to call
|
|
30
|
+
* Grafana HTTP APIs, and run automated workloads. After creating the service account with
|
|
31
|
+
* the correct <code>GrafanaRole</code> for your use case, use
|
|
32
|
+
* <code>CreateWorkspaceServiceAccountToken</code> to create a token that can be used to
|
|
33
|
+
* authenticate and authorize Grafana HTTP API calls.</p>
|
|
34
|
+
* <p>You can only create service accounts for workspaces that are compatible with Grafana
|
|
35
|
+
* version 9 and above.</p>
|
|
36
|
+
* <note>
|
|
37
|
+
* <p>For more information about service accounts, see <a href="https://docs.aws.amazon.com/grafana/latest/userguide/service-accounts.html">Service accounts</a> in
|
|
38
|
+
* the <i>Amazon Managed Grafana User Guide</i>.</p>
|
|
39
|
+
* <p>For more information about the Grafana HTTP APIs, see <a href="https://docs.aws.amazon.com/grafana/latest/userguide/Using-Grafana-APIs.html">Using Grafana HTTP
|
|
40
|
+
* APIs</a> in the <i>Amazon Managed Grafana User Guide</i>.</p>
|
|
41
|
+
* </note>
|
|
42
|
+
* @example
|
|
43
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
44
|
+
* ```javascript
|
|
45
|
+
* import { GrafanaClient, CreateWorkspaceServiceAccountCommand } from "@aws-sdk/client-grafana"; // ES Modules import
|
|
46
|
+
* // const { GrafanaClient, CreateWorkspaceServiceAccountCommand } = require("@aws-sdk/client-grafana"); // CommonJS import
|
|
47
|
+
* const client = new GrafanaClient(config);
|
|
48
|
+
* const input = { // CreateWorkspaceServiceAccountRequest
|
|
49
|
+
* name: "STRING_VALUE", // required
|
|
50
|
+
* grafanaRole: "STRING_VALUE", // required
|
|
51
|
+
* workspaceId: "STRING_VALUE", // required
|
|
52
|
+
* };
|
|
53
|
+
* const command = new CreateWorkspaceServiceAccountCommand(input);
|
|
54
|
+
* const response = await client.send(command);
|
|
55
|
+
* // { // CreateWorkspaceServiceAccountResponse
|
|
56
|
+
* // id: "STRING_VALUE", // required
|
|
57
|
+
* // name: "STRING_VALUE", // required
|
|
58
|
+
* // grafanaRole: "STRING_VALUE", // required
|
|
59
|
+
* // workspaceId: "STRING_VALUE", // required
|
|
60
|
+
* // };
|
|
61
|
+
*
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* @param CreateWorkspaceServiceAccountCommandInput - {@link CreateWorkspaceServiceAccountCommandInput}
|
|
65
|
+
* @returns {@link CreateWorkspaceServiceAccountCommandOutput}
|
|
66
|
+
* @see {@link CreateWorkspaceServiceAccountCommandInput} for command's `input` shape.
|
|
67
|
+
* @see {@link CreateWorkspaceServiceAccountCommandOutput} for command's `response` shape.
|
|
68
|
+
* @see {@link GrafanaClientResolvedConfig | config} for GrafanaClient's `config` shape.
|
|
69
|
+
*
|
|
70
|
+
* @throws {@link AccessDeniedException} (client fault)
|
|
71
|
+
* <p>You do not have sufficient permissions to perform this action. </p>
|
|
72
|
+
*
|
|
73
|
+
* @throws {@link ConflictException} (client fault)
|
|
74
|
+
* <p>A resource was in an inconsistent state during an update or a deletion.</p>
|
|
75
|
+
*
|
|
76
|
+
* @throws {@link InternalServerException} (server fault)
|
|
77
|
+
* <p>Unexpected error while processing the request. Retry the request.</p>
|
|
78
|
+
*
|
|
79
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
80
|
+
* <p>The request references a resource that does not exist.</p>
|
|
81
|
+
*
|
|
82
|
+
* @throws {@link ServiceQuotaExceededException} (client fault)
|
|
83
|
+
* <p>The request would cause a service quota to be exceeded.</p>
|
|
84
|
+
*
|
|
85
|
+
* @throws {@link ThrottlingException} (client fault)
|
|
86
|
+
* <p>The request was denied because of request throttling. Retry the request.</p>
|
|
87
|
+
*
|
|
88
|
+
* @throws {@link ValidationException} (client fault)
|
|
89
|
+
* <p>The value of a parameter in the request caused an error.</p>
|
|
90
|
+
*
|
|
91
|
+
* @throws {@link GrafanaServiceException}
|
|
92
|
+
* <p>Base exception class for all service exceptions from Grafana service.</p>
|
|
93
|
+
*
|
|
94
|
+
* @public
|
|
95
|
+
*/
|
|
96
|
+
export declare class CreateWorkspaceServiceAccountCommand extends CreateWorkspaceServiceAccountCommand_base {
|
|
97
|
+
}
|