Skip to content

Commit 6c98871

Browse files
author
awstools
committed
feat(client-grafana): This release adds new ServiceAccount and ServiceAccountToken APIs.
1 parent ef2c2a5 commit 6c98871

20 files changed

+2621
-37
lines changed

clients/client-grafana/README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,22 @@ CreateWorkspaceApiKey
234234

235235
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/grafana/command/CreateWorkspaceApiKeyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-grafana/Interface/CreateWorkspaceApiKeyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-grafana/Interface/CreateWorkspaceApiKeyCommandOutput/)
236236

237+
</details>
238+
<details>
239+
<summary>
240+
CreateWorkspaceServiceAccount
241+
</summary>
242+
243+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/grafana/command/CreateWorkspaceServiceAccountCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-grafana/Interface/CreateWorkspaceServiceAccountCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-grafana/Interface/CreateWorkspaceServiceAccountCommandOutput/)
244+
245+
</details>
246+
<details>
247+
<summary>
248+
CreateWorkspaceServiceAccountToken
249+
</summary>
250+
251+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/grafana/command/CreateWorkspaceServiceAccountTokenCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-grafana/Interface/CreateWorkspaceServiceAccountTokenCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-grafana/Interface/CreateWorkspaceServiceAccountTokenCommandOutput/)
252+
237253
</details>
238254
<details>
239255
<summary>
@@ -250,6 +266,22 @@ DeleteWorkspaceApiKey
250266

251267
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/grafana/command/DeleteWorkspaceApiKeyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-grafana/Interface/DeleteWorkspaceApiKeyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-grafana/Interface/DeleteWorkspaceApiKeyCommandOutput/)
252268

269+
</details>
270+
<details>
271+
<summary>
272+
DeleteWorkspaceServiceAccount
273+
</summary>
274+
275+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/grafana/command/DeleteWorkspaceServiceAccountCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-grafana/Interface/DeleteWorkspaceServiceAccountCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-grafana/Interface/DeleteWorkspaceServiceAccountCommandOutput/)
276+
277+
</details>
278+
<details>
279+
<summary>
280+
DeleteWorkspaceServiceAccountToken
281+
</summary>
282+
283+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/grafana/command/DeleteWorkspaceServiceAccountTokenCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-grafana/Interface/DeleteWorkspaceServiceAccountTokenCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-grafana/Interface/DeleteWorkspaceServiceAccountTokenCommandOutput/)
284+
253285
</details>
254286
<details>
255287
<summary>
@@ -314,6 +346,22 @@ ListWorkspaces
314346

315347
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/grafana/command/ListWorkspacesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-grafana/Interface/ListWorkspacesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-grafana/Interface/ListWorkspacesCommandOutput/)
316348

349+
</details>
350+
<details>
351+
<summary>
352+
ListWorkspaceServiceAccounts
353+
</summary>
354+
355+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/grafana/command/ListWorkspaceServiceAccountsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-grafana/Interface/ListWorkspaceServiceAccountsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-grafana/Interface/ListWorkspaceServiceAccountsCommandOutput/)
356+
357+
</details>
358+
<details>
359+
<summary>
360+
ListWorkspaceServiceAccountTokens
361+
</summary>
362+
363+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/grafana/command/ListWorkspaceServiceAccountTokensCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-grafana/Interface/ListWorkspaceServiceAccountTokensCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-grafana/Interface/ListWorkspaceServiceAccountTokensCommandOutput/)
364+
317365
</details>
318366
<details>
319367
<summary>

clients/client-grafana/src/Grafana.ts

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ import {
1717
CreateWorkspaceCommandInput,
1818
CreateWorkspaceCommandOutput,
1919
} from "./commands/CreateWorkspaceCommand";
20+
import {
21+
CreateWorkspaceServiceAccountCommand,
22+
CreateWorkspaceServiceAccountCommandInput,
23+
CreateWorkspaceServiceAccountCommandOutput,
24+
} from "./commands/CreateWorkspaceServiceAccountCommand";
25+
import {
26+
CreateWorkspaceServiceAccountTokenCommand,
27+
CreateWorkspaceServiceAccountTokenCommandInput,
28+
CreateWorkspaceServiceAccountTokenCommandOutput,
29+
} from "./commands/CreateWorkspaceServiceAccountTokenCommand";
2030
import {
2131
DeleteWorkspaceApiKeyCommand,
2232
DeleteWorkspaceApiKeyCommandInput,
@@ -27,6 +37,16 @@ import {
2737
DeleteWorkspaceCommandInput,
2838
DeleteWorkspaceCommandOutput,
2939
} from "./commands/DeleteWorkspaceCommand";
40+
import {
41+
DeleteWorkspaceServiceAccountCommand,
42+
DeleteWorkspaceServiceAccountCommandInput,
43+
DeleteWorkspaceServiceAccountCommandOutput,
44+
} from "./commands/DeleteWorkspaceServiceAccountCommand";
45+
import {
46+
DeleteWorkspaceServiceAccountTokenCommand,
47+
DeleteWorkspaceServiceAccountTokenCommandInput,
48+
DeleteWorkspaceServiceAccountTokenCommandOutput,
49+
} from "./commands/DeleteWorkspaceServiceAccountTokenCommand";
3050
import {
3151
DescribeWorkspaceAuthenticationCommand,
3252
DescribeWorkspaceAuthenticationCommandInput,
@@ -67,6 +87,16 @@ import {
6787
ListWorkspacesCommandInput,
6888
ListWorkspacesCommandOutput,
6989
} from "./commands/ListWorkspacesCommand";
90+
import {
91+
ListWorkspaceServiceAccountsCommand,
92+
ListWorkspaceServiceAccountsCommandInput,
93+
ListWorkspaceServiceAccountsCommandOutput,
94+
} from "./commands/ListWorkspaceServiceAccountsCommand";
95+
import {
96+
ListWorkspaceServiceAccountTokensCommand,
97+
ListWorkspaceServiceAccountTokensCommandInput,
98+
ListWorkspaceServiceAccountTokensCommandOutput,
99+
} from "./commands/ListWorkspaceServiceAccountTokensCommand";
70100
import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
71101
import {
72102
UntagResourceCommand,
@@ -99,8 +129,12 @@ const commands = {
99129
AssociateLicenseCommand,
100130
CreateWorkspaceCommand,
101131
CreateWorkspaceApiKeyCommand,
132+
CreateWorkspaceServiceAccountCommand,
133+
CreateWorkspaceServiceAccountTokenCommand,
102134
DeleteWorkspaceCommand,
103135
DeleteWorkspaceApiKeyCommand,
136+
DeleteWorkspaceServiceAccountCommand,
137+
DeleteWorkspaceServiceAccountTokenCommand,
104138
DescribeWorkspaceCommand,
105139
DescribeWorkspaceAuthenticationCommand,
106140
DescribeWorkspaceConfigurationCommand,
@@ -109,6 +143,8 @@ const commands = {
109143
ListTagsForResourceCommand,
110144
ListVersionsCommand,
111145
ListWorkspacesCommand,
146+
ListWorkspaceServiceAccountsCommand,
147+
ListWorkspaceServiceAccountTokensCommand,
112148
TagResourceCommand,
113149
UntagResourceCommand,
114150
UpdatePermissionsCommand,
@@ -166,6 +202,40 @@ export interface Grafana {
166202
cb: (err: any, data?: CreateWorkspaceApiKeyCommandOutput) => void
167203
): void;
168204

205+
/**
206+
* @see {@link CreateWorkspaceServiceAccountCommand}
207+
*/
208+
createWorkspaceServiceAccount(
209+
args: CreateWorkspaceServiceAccountCommandInput,
210+
options?: __HttpHandlerOptions
211+
): Promise<CreateWorkspaceServiceAccountCommandOutput>;
212+
createWorkspaceServiceAccount(
213+
args: CreateWorkspaceServiceAccountCommandInput,
214+
cb: (err: any, data?: CreateWorkspaceServiceAccountCommandOutput) => void
215+
): void;
216+
createWorkspaceServiceAccount(
217+
args: CreateWorkspaceServiceAccountCommandInput,
218+
options: __HttpHandlerOptions,
219+
cb: (err: any, data?: CreateWorkspaceServiceAccountCommandOutput) => void
220+
): void;
221+
222+
/**
223+
* @see {@link CreateWorkspaceServiceAccountTokenCommand}
224+
*/
225+
createWorkspaceServiceAccountToken(
226+
args: CreateWorkspaceServiceAccountTokenCommandInput,
227+
options?: __HttpHandlerOptions
228+
): Promise<CreateWorkspaceServiceAccountTokenCommandOutput>;
229+
createWorkspaceServiceAccountToken(
230+
args: CreateWorkspaceServiceAccountTokenCommandInput,
231+
cb: (err: any, data?: CreateWorkspaceServiceAccountTokenCommandOutput) => void
232+
): void;
233+
createWorkspaceServiceAccountToken(
234+
args: CreateWorkspaceServiceAccountTokenCommandInput,
235+
options: __HttpHandlerOptions,
236+
cb: (err: any, data?: CreateWorkspaceServiceAccountTokenCommandOutput) => void
237+
): void;
238+
169239
/**
170240
* @see {@link DeleteWorkspaceCommand}
171241
*/
@@ -197,6 +267,40 @@ export interface Grafana {
197267
cb: (err: any, data?: DeleteWorkspaceApiKeyCommandOutput) => void
198268
): void;
199269

270+
/**
271+
* @see {@link DeleteWorkspaceServiceAccountCommand}
272+
*/
273+
deleteWorkspaceServiceAccount(
274+
args: DeleteWorkspaceServiceAccountCommandInput,
275+
options?: __HttpHandlerOptions
276+
): Promise<DeleteWorkspaceServiceAccountCommandOutput>;
277+
deleteWorkspaceServiceAccount(
278+
args: DeleteWorkspaceServiceAccountCommandInput,
279+
cb: (err: any, data?: DeleteWorkspaceServiceAccountCommandOutput) => void
280+
): void;
281+
deleteWorkspaceServiceAccount(
282+
args: DeleteWorkspaceServiceAccountCommandInput,
283+
options: __HttpHandlerOptions,
284+
cb: (err: any, data?: DeleteWorkspaceServiceAccountCommandOutput) => void
285+
): void;
286+
287+
/**
288+
* @see {@link DeleteWorkspaceServiceAccountTokenCommand}
289+
*/
290+
deleteWorkspaceServiceAccountToken(
291+
args: DeleteWorkspaceServiceAccountTokenCommandInput,
292+
options?: __HttpHandlerOptions
293+
): Promise<DeleteWorkspaceServiceAccountTokenCommandOutput>;
294+
deleteWorkspaceServiceAccountToken(
295+
args: DeleteWorkspaceServiceAccountTokenCommandInput,
296+
cb: (err: any, data?: DeleteWorkspaceServiceAccountTokenCommandOutput) => void
297+
): void;
298+
deleteWorkspaceServiceAccountToken(
299+
args: DeleteWorkspaceServiceAccountTokenCommandInput,
300+
options: __HttpHandlerOptions,
301+
cb: (err: any, data?: DeleteWorkspaceServiceAccountTokenCommandOutput) => void
302+
): void;
303+
200304
/**
201305
* @see {@link DescribeWorkspaceCommand}
202306
*/
@@ -323,6 +427,40 @@ export interface Grafana {
323427
cb: (err: any, data?: ListWorkspacesCommandOutput) => void
324428
): void;
325429

430+
/**
431+
* @see {@link ListWorkspaceServiceAccountsCommand}
432+
*/
433+
listWorkspaceServiceAccounts(
434+
args: ListWorkspaceServiceAccountsCommandInput,
435+
options?: __HttpHandlerOptions
436+
): Promise<ListWorkspaceServiceAccountsCommandOutput>;
437+
listWorkspaceServiceAccounts(
438+
args: ListWorkspaceServiceAccountsCommandInput,
439+
cb: (err: any, data?: ListWorkspaceServiceAccountsCommandOutput) => void
440+
): void;
441+
listWorkspaceServiceAccounts(
442+
args: ListWorkspaceServiceAccountsCommandInput,
443+
options: __HttpHandlerOptions,
444+
cb: (err: any, data?: ListWorkspaceServiceAccountsCommandOutput) => void
445+
): void;
446+
447+
/**
448+
* @see {@link ListWorkspaceServiceAccountTokensCommand}
449+
*/
450+
listWorkspaceServiceAccountTokens(
451+
args: ListWorkspaceServiceAccountTokensCommandInput,
452+
options?: __HttpHandlerOptions
453+
): Promise<ListWorkspaceServiceAccountTokensCommandOutput>;
454+
listWorkspaceServiceAccountTokens(
455+
args: ListWorkspaceServiceAccountTokensCommandInput,
456+
cb: (err: any, data?: ListWorkspaceServiceAccountTokensCommandOutput) => void
457+
): void;
458+
listWorkspaceServiceAccountTokens(
459+
args: ListWorkspaceServiceAccountTokensCommandInput,
460+
options: __HttpHandlerOptions,
461+
cb: (err: any, data?: ListWorkspaceServiceAccountTokensCommandOutput) => void
462+
): void;
463+
326464
/**
327465
* @see {@link TagResourceCommand}
328466
*/

clients/client-grafana/src/GrafanaClient.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,27 @@ import {
5959
CreateWorkspaceApiKeyCommandOutput,
6060
} from "./commands/CreateWorkspaceApiKeyCommand";
6161
import { CreateWorkspaceCommandInput, CreateWorkspaceCommandOutput } from "./commands/CreateWorkspaceCommand";
62+
import {
63+
CreateWorkspaceServiceAccountCommandInput,
64+
CreateWorkspaceServiceAccountCommandOutput,
65+
} from "./commands/CreateWorkspaceServiceAccountCommand";
66+
import {
67+
CreateWorkspaceServiceAccountTokenCommandInput,
68+
CreateWorkspaceServiceAccountTokenCommandOutput,
69+
} from "./commands/CreateWorkspaceServiceAccountTokenCommand";
6270
import {
6371
DeleteWorkspaceApiKeyCommandInput,
6472
DeleteWorkspaceApiKeyCommandOutput,
6573
} from "./commands/DeleteWorkspaceApiKeyCommand";
6674
import { DeleteWorkspaceCommandInput, DeleteWorkspaceCommandOutput } from "./commands/DeleteWorkspaceCommand";
75+
import {
76+
DeleteWorkspaceServiceAccountCommandInput,
77+
DeleteWorkspaceServiceAccountCommandOutput,
78+
} from "./commands/DeleteWorkspaceServiceAccountCommand";
79+
import {
80+
DeleteWorkspaceServiceAccountTokenCommandInput,
81+
DeleteWorkspaceServiceAccountTokenCommandOutput,
82+
} from "./commands/DeleteWorkspaceServiceAccountTokenCommand";
6783
import {
6884
DescribeWorkspaceAuthenticationCommandInput,
6985
DescribeWorkspaceAuthenticationCommandOutput,
@@ -84,6 +100,14 @@ import {
84100
} from "./commands/ListTagsForResourceCommand";
85101
import { ListVersionsCommandInput, ListVersionsCommandOutput } from "./commands/ListVersionsCommand";
86102
import { ListWorkspacesCommandInput, ListWorkspacesCommandOutput } from "./commands/ListWorkspacesCommand";
103+
import {
104+
ListWorkspaceServiceAccountsCommandInput,
105+
ListWorkspaceServiceAccountsCommandOutput,
106+
} from "./commands/ListWorkspaceServiceAccountsCommand";
107+
import {
108+
ListWorkspaceServiceAccountTokensCommandInput,
109+
ListWorkspaceServiceAccountTokensCommandOutput,
110+
} from "./commands/ListWorkspaceServiceAccountTokensCommand";
87111
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
88112
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
89113
import { UpdatePermissionsCommandInput, UpdatePermissionsCommandOutput } from "./commands/UpdatePermissionsCommand";
@@ -114,15 +138,21 @@ export type ServiceInputTypes =
114138
| AssociateLicenseCommandInput
115139
| CreateWorkspaceApiKeyCommandInput
116140
| CreateWorkspaceCommandInput
141+
| CreateWorkspaceServiceAccountCommandInput
142+
| CreateWorkspaceServiceAccountTokenCommandInput
117143
| DeleteWorkspaceApiKeyCommandInput
118144
| DeleteWorkspaceCommandInput
145+
| DeleteWorkspaceServiceAccountCommandInput
146+
| DeleteWorkspaceServiceAccountTokenCommandInput
119147
| DescribeWorkspaceAuthenticationCommandInput
120148
| DescribeWorkspaceCommandInput
121149
| DescribeWorkspaceConfigurationCommandInput
122150
| DisassociateLicenseCommandInput
123151
| ListPermissionsCommandInput
124152
| ListTagsForResourceCommandInput
125153
| ListVersionsCommandInput
154+
| ListWorkspaceServiceAccountTokensCommandInput
155+
| ListWorkspaceServiceAccountsCommandInput
126156
| ListWorkspacesCommandInput
127157
| TagResourceCommandInput
128158
| UntagResourceCommandInput
@@ -138,15 +168,21 @@ export type ServiceOutputTypes =
138168
| AssociateLicenseCommandOutput
139169
| CreateWorkspaceApiKeyCommandOutput
140170
| CreateWorkspaceCommandOutput
171+
| CreateWorkspaceServiceAccountCommandOutput
172+
| CreateWorkspaceServiceAccountTokenCommandOutput
141173
| DeleteWorkspaceApiKeyCommandOutput
142174
| DeleteWorkspaceCommandOutput
175+
| DeleteWorkspaceServiceAccountCommandOutput
176+
| DeleteWorkspaceServiceAccountTokenCommandOutput
143177
| DescribeWorkspaceAuthenticationCommandOutput
144178
| DescribeWorkspaceCommandOutput
145179
| DescribeWorkspaceConfigurationCommandOutput
146180
| DisassociateLicenseCommandOutput
147181
| ListPermissionsCommandOutput
148182
| ListTagsForResourceCommandOutput
149183
| ListVersionsCommandOutput
184+
| ListWorkspaceServiceAccountTokensCommandOutput
185+
| ListWorkspaceServiceAccountsCommandOutput
150186
| ListWorkspacesCommandOutput
151187
| TagResourceCommandOutput
152188
| UntagResourceCommandOutput

clients/client-grafana/src/commands/AssociateLicenseCommand.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ export interface AssociateLicenseCommandInput extends AssociateLicenseRequest {}
3131
export interface AssociateLicenseCommandOutput extends AssociateLicenseResponse, __MetadataBearer {}
3232

3333
/**
34-
* <p>Assigns a Grafana Enterprise license to a workspace. Upgrading to Grafana Enterprise
34+
* <p>Assigns a Grafana Enterprise license to a workspace. To upgrade, you must use
35+
* <code>ENTERPRISE</code> for the <code>licenseType</code>, and pass in a valid
36+
* Grafana Labs token for the <code>grafanaToken</code>. Upgrading to Grafana Enterprise
3537
* incurs additional fees. For more information, see <a href="https://docs.aws.amazon.com/grafana/latest/userguide/upgrade-to-Grafana-Enterprise.html">Upgrade a
3638
* workspace to Grafana Enterprise</a>.</p>
3739
* @example

clients/client-grafana/src/commands/CreateWorkspaceApiKeyCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ export interface CreateWorkspaceApiKeyCommandOutput extends CreateWorkspaceApiKe
3434
* <p>Creates a Grafana API key for the workspace. This key can be used to authenticate
3535
* 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>
3636
* for available APIs and example requests.</p>
37+
* <note>
38+
* <p>In workspaces compatible with Grafana version 9 or above, use workspace service
39+
* accounts instead of API keys. API keys will be removed in a future release.</p>
40+
* </note>
3741
* @example
3842
* Use a bare-bones client and the command you need to make an API call.
3943
* ```javascript

0 commit comments

Comments
 (0)