Skip to content

Commit 00943f4

Browse files
author
awstools
committed
feat(client-grafana): Adds support for the new GrafanaToken as part of the Amazon Managed Grafana Enterprise plugins upgrade to associate your AWS account with a Grafana Labs account.
1 parent 9cbbeba commit 00943f4

10 files changed

+116
-20
lines changed

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

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export interface AssociateLicenseCommandOutput extends AssociateLicenseResponse,
4444
* const input = { // AssociateLicenseRequest
4545
* workspaceId: "STRING_VALUE", // required
4646
* licenseType: "STRING_VALUE", // required
47+
* grafanaToken: "STRING_VALUE",
4748
* };
4849
* const command = new AssociateLicenseCommand(input);
4950
* const response = await client.send(command);
@@ -100,6 +101,7 @@ export interface AssociateLicenseCommandOutput extends AssociateLicenseResponse,
100101
* // "STRING_VALUE",
101102
* // ],
102103
* // },
104+
* // grafanaToken: "STRING_VALUE",
103105
* // },
104106
* // };
105107
*

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

+1
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ export interface CreateWorkspaceCommandOutput extends CreateWorkspaceResponse, _
142142
* // "STRING_VALUE",
143143
* // ],
144144
* // },
145+
* // grafanaToken: "STRING_VALUE",
145146
* // },
146147
* // };
147148
*

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

+1
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ export interface DeleteWorkspaceCommandOutput extends DeleteWorkspaceResponse, _
9797
* // "STRING_VALUE",
9898
* // ],
9999
* // },
100+
* // grafanaToken: "STRING_VALUE",
100101
* // },
101102
* // };
102103
*

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

+1
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ export interface DescribeWorkspaceCommandOutput extends DescribeWorkspaceRespons
9797
* // "STRING_VALUE",
9898
* // ],
9999
* // },
100+
* // grafanaToken: "STRING_VALUE",
100101
* // },
101102
* // };
102103
*

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

+1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ export interface DisassociateLicenseCommandOutput extends DisassociateLicenseRes
9898
* // "STRING_VALUE",
9999
* // ],
100100
* // },
101+
* // grafanaToken: "STRING_VALUE",
101102
* // },
102103
* // };
103104
*

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

+2
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ export interface ListWorkspacesCommandOutput extends ListWorkspacesResponse, __M
6969
* // tags: { // TagMap
7070
* // "<keys>": "STRING_VALUE",
7171
* // },
72+
* // licenseType: "STRING_VALUE",
73+
* // grafanaToken: "STRING_VALUE",
7274
* // },
7375
* // ],
7476
* // nextToken: "STRING_VALUE",

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

+1
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ export interface UpdateWorkspaceCommandOutput extends UpdateWorkspaceResponse, _
137137
* // "STRING_VALUE",
138138
* // ],
139139
* // },
140+
* // grafanaToken: "STRING_VALUE",
140141
* // },
141142
* // };
142143
*

clients/client-grafana/src/models/models_0.ts

+56-10
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,18 @@ export interface AssociateLicenseRequest {
473473
/**
474474
* @public
475475
* <p>The type of license to associate with the workspace.</p>
476+
* <note>
477+
* <p>Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.</p>
478+
* </note>
476479
*/
477480
licenseType: LicenseType | undefined;
481+
482+
/**
483+
* @public
484+
* <p>A token from Grafana Labs that ties your Amazon Web Services account with a Grafana
485+
* Labs account. For more information, see <a href="https://docs.aws.amazon.com/grafana/latest/userguide/upgrade-to-Grafana-Enterprise.html#AMG-workspace-register-enterprise">Register with Grafana Labs</a>.</p>
486+
*/
487+
grafanaToken?: string;
478488
}
479489

480490
/**
@@ -906,29 +916,40 @@ export interface WorkspaceDescription {
906916

907917
/**
908918
* @public
909-
* <p>Specifies whether this workspace has a full Grafana Enterprise license or a free trial
910-
* license.</p>
919+
* <p>Specifies whether this workspace has a full Grafana Enterprise license.</p>
920+
* <note>
921+
* <p>Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.</p>
922+
* </note>
911923
*/
912924
licenseType?: LicenseType;
913925

914926
/**
915927
* @public
916928
* <p>Specifies whether this workspace has already fully used its free trial for Grafana
917929
* Enterprise.</p>
930+
* <note>
931+
* <p>Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.</p>
932+
* </note>
918933
*/
919934
freeTrialConsumed?: boolean;
920935

921936
/**
922937
* @public
923-
* <p>If this workspace has a full Grafana Enterprise license, this specifies when the
924-
* license ends and will need to be renewed.</p>
938+
* <p>If this workspace has a full Grafana Enterprise license purchased through
939+
* Amazon Web Services Marketplace, this specifies when the
940+
* license ends and will need to be renewed. Purchasing the Enterprise plugins option
941+
* through Amazon Managed Grafana does not have an expiration. It is valid until the
942+
* license is removed.</p>
925943
*/
926944
licenseExpiration?: Date;
927945

928946
/**
929947
* @public
930948
* <p>If this workspace is currently in the free trial period for Grafana Enterprise, this
931949
* value specifies when that free trial ends.</p>
950+
* <note>
951+
* <p>Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.</p>
952+
* </note>
932953
*/
933954
freeTrialExpiration?: Date;
934955

@@ -956,6 +977,13 @@ export interface WorkspaceDescription {
956977
* <p>The configuration settings for network access to your workspace.</p>
957978
*/
958979
networkAccessControl?: NetworkAccessConfiguration;
980+
981+
/**
982+
* @public
983+
* <p>The token that ties this workspace to a Grafana Labs account. For more information,
984+
* see <a href="https://docs.aws.amazon.com/grafana/latest/userguide/upgrade-to-Grafana-Enterprise.html#AMG-workspace-register-enterprise">Register with Grafana Labs</a>.</p>
985+
*/
986+
grafanaToken?: string;
959987
}
960988

961989
/**
@@ -1184,7 +1212,7 @@ export interface UpdateWorkspaceAuthenticationRequest {
11841212

11851213
/**
11861214
* @public
1187-
* <p>Specifies whether this workspace uses SAML 2.0, IAM Identity Center (successor to Single Sign-On), or both to
1215+
* <p>Specifies whether this workspace uses SAML 2.0, IAM Identity Center, or both to
11881216
* authenticate users for using the Grafana console within a workspace. For more
11891217
* information, see <a href="https://docs.aws.amazon.com/grafana/latest/userguide/authentication-in-AMG.html">User authentication in
11901218
* Amazon Managed Grafana</a>.</p>
@@ -1262,11 +1290,12 @@ export interface UpdateWorkspaceConfigurationRequest {
12621290

12631291
/**
12641292
* @public
1265-
* <p>Specifies the version of Grafana to support in the new workspace.</p>
1293+
* <p>Specifies the version of Grafana to support in the workspace. If not specified,
1294+
* keeps the current version of the workspace.</p>
12661295
* <p>Can only be used to upgrade (for example, from 8.4 to 9.4), not
12671296
* downgrade (for example, from 9.4 to 8.4).</p>
12681297
* <p>To know what versions are available to upgrade to for a specific workspace, see
1269-
* the <code>ListVersions</code> operation.</p>
1298+
* the <a href="https://docs.aws.amazon.com/grafana/latest/APIReference/API_ListVersions.html">ListVersions</a> operation.</p>
12701299
*/
12711300
grafanaVersion?: string;
12721301
}
@@ -1763,7 +1792,7 @@ export interface CreateWorkspaceRequest {
17631792

17641793
/**
17651794
* @public
1766-
* <p>Specifies whether this workspace uses SAML 2.0, IAM Identity Center (successor to Single Sign-On), or both to
1795+
* <p>Specifies whether this workspace uses SAML 2.0, IAM Identity Center, or both to
17671796
* authenticate users for using the Grafana console within a workspace. For more
17681797
* information, see <a href="https://docs.aws.amazon.com/grafana/latest/userguide/authentication-in-AMG.html">User authentication in
17691798
* Amazon Managed Grafana</a>.</p>
@@ -1809,8 +1838,9 @@ export interface CreateWorkspaceRequest {
18091838

18101839
/**
18111840
* @public
1812-
* <p>Specifies the version of Grafana to support in the new workspace.</p>
1813-
* <p>To get a list of supported version, use the <code>ListVersions</code>
1841+
* <p>Specifies the version of Grafana to support in the new workspace. If not specified,
1842+
* defaults to the latest version (for example, 9.4).</p>
1843+
* <p>To get a list of supported versions, use the <code>ListVersions</code>
18141844
* operation.</p>
18151845
*/
18161846
grafanaVersion?: string;
@@ -1962,6 +1992,22 @@ export interface WorkspaceSummary {
19621992
* <p>The list of tags associated with the workspace.</p>
19631993
*/
19641994
tags?: Record<string, string>;
1995+
1996+
/**
1997+
* @public
1998+
* <p>Specifies whether this workspace has a full Grafana Enterprise license.</p>
1999+
* <note>
2000+
* <p>Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.</p>
2001+
* </note>
2002+
*/
2003+
licenseType?: LicenseType;
2004+
2005+
/**
2006+
* @public
2007+
* <p>The token that ties this workspace to a Grafana Labs account. For more information,
2008+
* see <a href="https://docs.aws.amazon.com/grafana/latest/userguide/upgrade-to-Grafana-Enterprise.html#AMG-workspace-register-enterprise">Register with Grafana Labs</a>.</p>
2009+
*/
2010+
grafanaToken?: string;
19652011
}
19662012

19672013
/**

clients/client-grafana/src/protocols/Aws_restJson1.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ export const se_AssociateLicenseCommand = async (
102102
context: __SerdeContext
103103
): Promise<__HttpRequest> => {
104104
const b = rb(input, context);
105-
const headers: any = {};
105+
const headers: any = map({}, isSerializableHeaderValue, {
106+
[_gt]: input[_gT]!,
107+
});
106108
b.bp("/workspaces/{workspaceId}/licenses/{licenseType}");
107109
b.p("workspaceId", () => input.workspaceId!, "{workspaceId}", false);
108110
b.p("licenseType", () => input.licenseType!, "{licenseType}", false);
@@ -1202,6 +1204,7 @@ const de_WorkspaceDescription = (output: any, context: __SerdeContext): Workspac
12021204
endpoint: __expectString,
12031205
freeTrialConsumed: __expectBoolean,
12041206
freeTrialExpiration: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1207+
grafanaToken: __expectString,
12051208
grafanaVersion: __expectString,
12061209
id: __expectString,
12071210
licenseExpiration: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
@@ -1242,8 +1245,10 @@ const de_WorkspaceSummary = (output: any, context: __SerdeContext): WorkspaceSum
12421245
created: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
12431246
description: __expectString,
12441247
endpoint: __expectString,
1248+
grafanaToken: __expectString,
12451249
grafanaVersion: __expectString,
12461250
id: __expectString,
1251+
licenseType: __expectString,
12471252
modified: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
12481253
name: __expectString,
12491254
notificationDestinations: _json,
@@ -1272,6 +1277,8 @@ const isSerializableHeaderValue = (value: any): boolean =>
12721277
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
12731278

12741279
const _gI = "groupId";
1280+
const _gT = "grafanaToken";
1281+
const _gt = "grafana-token";
12751282
const _mR = "maxResults";
12761283
const _nT = "nextToken";
12771284
const _rAS = "retryAfterSeconds";

codegen/sdk-codegen/aws-models/grafana.json

+43-9
Original file line numberDiff line numberDiff line change
@@ -1003,10 +1003,17 @@
10031003
"licenseType": {
10041004
"target": "com.amazonaws.grafana#LicenseType",
10051005
"traits": {
1006-
"smithy.api#documentation": "<p>The type of license to associate with the workspace.</p>",
1006+
"smithy.api#documentation": "<p>The type of license to associate with the workspace.</p>\n <note>\n <p>Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.</p>\n </note>",
10071007
"smithy.api#httpLabel": {},
10081008
"smithy.api#required": {}
10091009
}
1010+
},
1011+
"grafanaToken": {
1012+
"target": "com.amazonaws.grafana#GrafanaToken",
1013+
"traits": {
1014+
"smithy.api#documentation": "<p>A token from Grafana Labs that ties your Amazon Web Services account with a Grafana \n Labs account. For more information, see <a href=\"https://docs.aws.amazon.com/grafana/latest/userguide/upgrade-to-Grafana-Enterprise.html#AMG-workspace-register-enterprise\">Register with Grafana Labs</a>.</p>",
1015+
"smithy.api#httpHeader": "Grafana-Token"
1016+
}
10101017
}
10111018
}
10121019
},
@@ -1402,7 +1409,7 @@
14021409
"authenticationProviders": {
14031410
"target": "com.amazonaws.grafana#AuthenticationProviders",
14041411
"traits": {
1405-
"smithy.api#documentation": "<p>Specifies whether this workspace uses SAML 2.0, IAM Identity Center (successor to Single Sign-On), or both to\n authenticate users for using the Grafana console within a workspace. For more\n information, see <a href=\"https://docs.aws.amazon.com/grafana/latest/userguide/authentication-in-AMG.html\">User authentication in\n Amazon Managed Grafana</a>.</p>",
1412+
"smithy.api#documentation": "<p>Specifies whether this workspace uses SAML 2.0, IAM Identity Center, or both to\n authenticate users for using the Grafana console within a workspace. For more\n information, see <a href=\"https://docs.aws.amazon.com/grafana/latest/userguide/authentication-in-AMG.html\">User authentication in\n Amazon Managed Grafana</a>.</p>",
14061413
"smithy.api#required": {}
14071414
}
14081415
},
@@ -1433,7 +1440,7 @@
14331440
"grafanaVersion": {
14341441
"target": "com.amazonaws.grafana#GrafanaVersion",
14351442
"traits": {
1436-
"smithy.api#documentation": "<p>Specifies the version of Grafana to support in the new workspace.</p>\n <p>To get a list of supported version, use the <code>ListVersions</code>\n operation.</p>"
1443+
"smithy.api#documentation": "<p>Specifies the version of Grafana to support in the new workspace. If not specified, \n defaults to the latest version (for example, 9.4).</p>\n <p>To get a list of supported versions, use the <code>ListVersions</code>\n operation.</p>"
14371444
}
14381445
}
14391446
}
@@ -1916,6 +1923,15 @@
19161923
}
19171924
}
19181925
},
1926+
"com.amazonaws.grafana#GrafanaToken": {
1927+
"type": "string",
1928+
"traits": {
1929+
"smithy.api#length": {
1930+
"min": 1,
1931+
"max": 36
1932+
}
1933+
}
1934+
},
19191935
"com.amazonaws.grafana#GrafanaVersion": {
19201936
"type": "string",
19211937
"traits": {
@@ -3260,7 +3276,7 @@
32603276
"authenticationProviders": {
32613277
"target": "com.amazonaws.grafana#AuthenticationProviders",
32623278
"traits": {
3263-
"smithy.api#documentation": "<p>Specifies whether this workspace uses SAML 2.0, IAM Identity Center (successor to Single Sign-On), or both to\n authenticate users for using the Grafana console within a workspace. For more\n information, see <a href=\"https://docs.aws.amazon.com/grafana/latest/userguide/authentication-in-AMG.html\">User authentication in\n Amazon Managed Grafana</a>.</p>",
3279+
"smithy.api#documentation": "<p>Specifies whether this workspace uses SAML 2.0, IAM Identity Center, or both to\n authenticate users for using the Grafana console within a workspace. For more\n information, see <a href=\"https://docs.aws.amazon.com/grafana/latest/userguide/authentication-in-AMG.html\">User authentication in\n Amazon Managed Grafana</a>.</p>",
32643280
"smithy.api#required": {}
32653281
}
32663282
},
@@ -3342,7 +3358,7 @@
33423358
"grafanaVersion": {
33433359
"target": "com.amazonaws.grafana#GrafanaVersion",
33443360
"traits": {
3345-
"smithy.api#documentation": "<p>Specifies the version of Grafana to support in the new workspace.</p>\n <p>Can only be used to upgrade (for example, from 8.4 to 9.4), not\n downgrade (for example, from 9.4 to 8.4).</p>\n <p>To know what versions are available to upgrade to for a specific workspace, see \n the <code>ListVersions</code> operation.</p>"
3361+
"smithy.api#documentation": "<p>Specifies the version of Grafana to support in the workspace. If not specified, \n keeps the current version of the workspace.</p>\n <p>Can only be used to upgrade (for example, from 8.4 to 9.4), not\n downgrade (for example, from 9.4 to 8.4).</p>\n <p>To know what versions are available to upgrade to for a specific workspace, see \n the <a href=\"https://docs.aws.amazon.com/grafana/latest/APIReference/API_ListVersions.html\">ListVersions</a> operation.</p>"
33463362
}
33473363
}
33483364
}
@@ -3761,25 +3777,25 @@
37613777
"licenseType": {
37623778
"target": "com.amazonaws.grafana#LicenseType",
37633779
"traits": {
3764-
"smithy.api#documentation": "<p>Specifies whether this workspace has a full Grafana Enterprise license or a free trial\n license.</p>"
3780+
"smithy.api#documentation": "<p>Specifies whether this workspace has a full Grafana Enterprise license.</p>\n <note>\n <p>Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.</p>\n </note>"
37653781
}
37663782
},
37673783
"freeTrialConsumed": {
37683784
"target": "smithy.api#Boolean",
37693785
"traits": {
3770-
"smithy.api#documentation": "<p>Specifies whether this workspace has already fully used its free trial for Grafana\n Enterprise.</p>"
3786+
"smithy.api#documentation": "<p>Specifies whether this workspace has already fully used its free trial for Grafana\n Enterprise.</p>\n <note>\n <p>Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.</p>\n </note>"
37713787
}
37723788
},
37733789
"licenseExpiration": {
37743790
"target": "smithy.api#Timestamp",
37753791
"traits": {
3776-
"smithy.api#documentation": "<p>If this workspace has a full Grafana Enterprise license, this specifies when the\n license ends and will need to be renewed.</p>"
3792+
"smithy.api#documentation": "<p>If this workspace has a full Grafana Enterprise license purchased through \n Amazon Web Services Marketplace, this specifies when the\n license ends and will need to be renewed. Purchasing the Enterprise plugins option \n through Amazon Managed Grafana does not have an expiration. It is valid until the \n license is removed.</p>"
37773793
}
37783794
},
37793795
"freeTrialExpiration": {
37803796
"target": "smithy.api#Timestamp",
37813797
"traits": {
3782-
"smithy.api#documentation": "<p>If this workspace is currently in the free trial period for Grafana Enterprise, this\n value specifies when that free trial ends.</p>"
3798+
"smithy.api#documentation": "<p>If this workspace is currently in the free trial period for Grafana Enterprise, this\n value specifies when that free trial ends.</p>\n <note>\n <p>Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.</p>\n </note>"
37833799
}
37843800
},
37853801
"authentication": {
@@ -3806,6 +3822,12 @@
38063822
"traits": {
38073823
"smithy.api#documentation": "<p>The configuration settings for network access to your workspace.</p>"
38083824
}
3825+
},
3826+
"grafanaToken": {
3827+
"target": "com.amazonaws.grafana#GrafanaToken",
3828+
"traits": {
3829+
"smithy.api#documentation": "<p>The token that ties this workspace to a Grafana Labs account. For more information, \n see <a href=\"https://docs.aws.amazon.com/grafana/latest/userguide/upgrade-to-Grafana-Enterprise.html#AMG-workspace-register-enterprise\">Register with Grafana Labs</a>.</p>"
3830+
}
38093831
}
38103832
},
38113833
"traits": {
@@ -3978,6 +4000,18 @@
39784000
"traits": {
39794001
"smithy.api#documentation": "<p>The list of tags associated with the workspace.</p>"
39804002
}
4003+
},
4004+
"licenseType": {
4005+
"target": "com.amazonaws.grafana#LicenseType",
4006+
"traits": {
4007+
"smithy.api#documentation": "<p>Specifies whether this workspace has a full Grafana Enterprise license.</p>\n <note>\n <p>Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.</p>\n </note>"
4008+
}
4009+
},
4010+
"grafanaToken": {
4011+
"target": "com.amazonaws.grafana#GrafanaToken",
4012+
"traits": {
4013+
"smithy.api#documentation": "<p>The token that ties this workspace to a Grafana Labs account. For more information, \n see <a href=\"https://docs.aws.amazon.com/grafana/latest/userguide/upgrade-to-Grafana-Enterprise.html#AMG-workspace-register-enterprise\">Register with Grafana Labs</a>.</p>"
4014+
}
39814015
}
39824016
},
39834017
"traits": {

0 commit comments

Comments
 (0)