@aws-sdk/client-grafana 3.87.0 → 3.91.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/CHANGELOG.md +11 -0
- package/dist-cjs/Grafana.js +30 -0
- package/dist-cjs/commands/CreateWorkspaceApiKeyCommand.js +36 -0
- package/dist-cjs/commands/DeleteWorkspaceApiKeyCommand.js +36 -0
- package/dist-cjs/commands/index.js +2 -0
- package/dist-cjs/models/models_0.js +135 -109
- package/dist-cjs/protocols/Aws_restJson1.js +190 -1
- package/dist-es/Grafana.js +30 -0
- package/dist-es/commands/CreateWorkspaceApiKeyCommand.js +39 -0
- package/dist-es/commands/DeleteWorkspaceApiKeyCommand.js +39 -0
- package/dist-es/commands/index.js +2 -0
- package/dist-es/models/models_0.js +116 -99
- package/dist-es/protocols/Aws_restJson1.js +244 -0
- package/dist-types/Grafana.d.ts +17 -0
- package/dist-types/GrafanaClient.d.ts +4 -2
- package/dist-types/commands/CreateWorkspaceApiKeyCommand.d.ts +38 -0
- package/dist-types/commands/DeleteWorkspaceApiKeyCommand.d.ts +35 -0
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +233 -150
- package/dist-types/protocols/Aws_restJson1.d.ts +6 -0
- package/dist-types/ts3.4/Grafana.d.ts +10 -0
- package/dist-types/ts3.4/GrafanaClient.d.ts +4 -2
- package/dist-types/ts3.4/commands/CreateWorkspaceApiKeyCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteWorkspaceApiKeyCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +2 -0
- package/dist-types/ts3.4/models/models_0.d.ts +138 -90
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +6 -0
- package/package.json +1 -1
|
@@ -88,6 +88,40 @@ export var serializeAws_restJson1CreateWorkspaceCommand = function (input, conte
|
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
90
|
}); };
|
|
91
|
+
export var serializeAws_restJson1CreateWorkspaceApiKeyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
92
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
93
|
+
return __generator(this, function (_c) {
|
|
94
|
+
switch (_c.label) {
|
|
95
|
+
case 0: return [4, context.endpoint()];
|
|
96
|
+
case 1:
|
|
97
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
98
|
+
headers = {
|
|
99
|
+
"content-type": "application/json",
|
|
100
|
+
};
|
|
101
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/workspaces/{workspaceId}/apikeys";
|
|
102
|
+
if (input.workspaceId !== undefined) {
|
|
103
|
+
labelValue = input.workspaceId;
|
|
104
|
+
if (labelValue.length <= 0) {
|
|
105
|
+
throw new Error("Empty value provided for input HTTP label: workspaceId.");
|
|
106
|
+
}
|
|
107
|
+
resolvedPath = resolvedPath.replace("{workspaceId}", __extendedEncodeURIComponent(labelValue));
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
throw new Error("No value provided for input HTTP label: workspaceId.");
|
|
111
|
+
}
|
|
112
|
+
body = JSON.stringify(__assign(__assign(__assign({}, (input.keyName !== undefined && input.keyName !== null && { keyName: input.keyName })), (input.keyRole !== undefined && input.keyRole !== null && { keyRole: input.keyRole })), (input.secondsToLive !== undefined && input.secondsToLive !== null && { secondsToLive: input.secondsToLive })));
|
|
113
|
+
return [2, new __HttpRequest({
|
|
114
|
+
protocol: protocol,
|
|
115
|
+
hostname: hostname,
|
|
116
|
+
port: port,
|
|
117
|
+
method: "POST",
|
|
118
|
+
headers: headers,
|
|
119
|
+
path: resolvedPath,
|
|
120
|
+
body: body,
|
|
121
|
+
})];
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
}); };
|
|
91
125
|
export var serializeAws_restJson1DeleteWorkspaceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
92
126
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
93
127
|
return __generator(this, function (_c) {
|
|
@@ -119,6 +153,48 @@ export var serializeAws_restJson1DeleteWorkspaceCommand = function (input, conte
|
|
|
119
153
|
}
|
|
120
154
|
});
|
|
121
155
|
}); };
|
|
156
|
+
export var serializeAws_restJson1DeleteWorkspaceApiKeyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
157
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, body;
|
|
158
|
+
return __generator(this, function (_c) {
|
|
159
|
+
switch (_c.label) {
|
|
160
|
+
case 0: return [4, context.endpoint()];
|
|
161
|
+
case 1:
|
|
162
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
163
|
+
headers = {};
|
|
164
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
165
|
+
"/workspaces/{workspaceId}/apikeys/{keyName}";
|
|
166
|
+
if (input.keyName !== undefined) {
|
|
167
|
+
labelValue = input.keyName;
|
|
168
|
+
if (labelValue.length <= 0) {
|
|
169
|
+
throw new Error("Empty value provided for input HTTP label: keyName.");
|
|
170
|
+
}
|
|
171
|
+
resolvedPath = resolvedPath.replace("{keyName}", __extendedEncodeURIComponent(labelValue));
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
throw new Error("No value provided for input HTTP label: keyName.");
|
|
175
|
+
}
|
|
176
|
+
if (input.workspaceId !== undefined) {
|
|
177
|
+
labelValue = input.workspaceId;
|
|
178
|
+
if (labelValue.length <= 0) {
|
|
179
|
+
throw new Error("Empty value provided for input HTTP label: workspaceId.");
|
|
180
|
+
}
|
|
181
|
+
resolvedPath = resolvedPath.replace("{workspaceId}", __extendedEncodeURIComponent(labelValue));
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
throw new Error("No value provided for input HTTP label: workspaceId.");
|
|
185
|
+
}
|
|
186
|
+
return [2, new __HttpRequest({
|
|
187
|
+
protocol: protocol,
|
|
188
|
+
hostname: hostname,
|
|
189
|
+
port: port,
|
|
190
|
+
method: "DELETE",
|
|
191
|
+
headers: headers,
|
|
192
|
+
path: resolvedPath,
|
|
193
|
+
body: body,
|
|
194
|
+
})];
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
}); };
|
|
122
198
|
export var serializeAws_restJson1DescribeWorkspaceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
123
199
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
124
200
|
return __generator(this, function (_c) {
|
|
@@ -650,6 +726,94 @@ var deserializeAws_restJson1CreateWorkspaceCommandError = function (output, cont
|
|
|
650
726
|
}
|
|
651
727
|
});
|
|
652
728
|
}); };
|
|
729
|
+
export var deserializeAws_restJson1CreateWorkspaceApiKeyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
730
|
+
var contents, data, _a, _b;
|
|
731
|
+
return __generator(this, function (_c) {
|
|
732
|
+
switch (_c.label) {
|
|
733
|
+
case 0:
|
|
734
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
735
|
+
return [2, deserializeAws_restJson1CreateWorkspaceApiKeyCommandError(output, context)];
|
|
736
|
+
}
|
|
737
|
+
contents = {
|
|
738
|
+
$metadata: deserializeMetadata(output),
|
|
739
|
+
key: undefined,
|
|
740
|
+
keyName: undefined,
|
|
741
|
+
workspaceId: undefined,
|
|
742
|
+
};
|
|
743
|
+
_a = __expectNonNull;
|
|
744
|
+
_b = __expectObject;
|
|
745
|
+
return [4, parseBody(output.body, context)];
|
|
746
|
+
case 1:
|
|
747
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
748
|
+
if (data.key !== undefined && data.key !== null) {
|
|
749
|
+
contents.key = __expectString(data.key);
|
|
750
|
+
}
|
|
751
|
+
if (data.keyName !== undefined && data.keyName !== null) {
|
|
752
|
+
contents.keyName = __expectString(data.keyName);
|
|
753
|
+
}
|
|
754
|
+
if (data.workspaceId !== undefined && data.workspaceId !== null) {
|
|
755
|
+
contents.workspaceId = __expectString(data.workspaceId);
|
|
756
|
+
}
|
|
757
|
+
return [2, Promise.resolve(contents)];
|
|
758
|
+
}
|
|
759
|
+
});
|
|
760
|
+
}); };
|
|
761
|
+
var deserializeAws_restJson1CreateWorkspaceApiKeyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
762
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
763
|
+
var _c;
|
|
764
|
+
return __generator(this, function (_d) {
|
|
765
|
+
switch (_d.label) {
|
|
766
|
+
case 0:
|
|
767
|
+
_a = [__assign({}, output)];
|
|
768
|
+
_c = {};
|
|
769
|
+
return [4, parseBody(output.body, context)];
|
|
770
|
+
case 1:
|
|
771
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
772
|
+
errorCode = "UnknownError";
|
|
773
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
774
|
+
_b = errorCode;
|
|
775
|
+
switch (_b) {
|
|
776
|
+
case "AccessDeniedException": return [3, 2];
|
|
777
|
+
case "com.amazonaws.grafana#AccessDeniedException": return [3, 2];
|
|
778
|
+
case "ConflictException": return [3, 4];
|
|
779
|
+
case "com.amazonaws.grafana#ConflictException": return [3, 4];
|
|
780
|
+
case "InternalServerException": return [3, 6];
|
|
781
|
+
case "com.amazonaws.grafana#InternalServerException": return [3, 6];
|
|
782
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
783
|
+
case "com.amazonaws.grafana#ResourceNotFoundException": return [3, 8];
|
|
784
|
+
case "ServiceQuotaExceededException": return [3, 10];
|
|
785
|
+
case "com.amazonaws.grafana#ServiceQuotaExceededException": return [3, 10];
|
|
786
|
+
case "ThrottlingException": return [3, 12];
|
|
787
|
+
case "com.amazonaws.grafana#ThrottlingException": return [3, 12];
|
|
788
|
+
case "ValidationException": return [3, 14];
|
|
789
|
+
case "com.amazonaws.grafana#ValidationException": return [3, 14];
|
|
790
|
+
}
|
|
791
|
+
return [3, 16];
|
|
792
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
793
|
+
case 3: throw _d.sent();
|
|
794
|
+
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
795
|
+
case 5: throw _d.sent();
|
|
796
|
+
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
797
|
+
case 7: throw _d.sent();
|
|
798
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
799
|
+
case 9: throw _d.sent();
|
|
800
|
+
case 10: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
801
|
+
case 11: throw _d.sent();
|
|
802
|
+
case 12: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
803
|
+
case 13: throw _d.sent();
|
|
804
|
+
case 14: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
805
|
+
case 15: throw _d.sent();
|
|
806
|
+
case 16:
|
|
807
|
+
parsedBody = parsedOutput.body;
|
|
808
|
+
response = new __BaseException({
|
|
809
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
810
|
+
$fault: "client",
|
|
811
|
+
$metadata: deserializeMetadata(output),
|
|
812
|
+
});
|
|
813
|
+
throw __decorateServiceException(response, parsedBody);
|
|
814
|
+
}
|
|
815
|
+
});
|
|
816
|
+
}); };
|
|
653
817
|
export var deserializeAws_restJson1DeleteWorkspaceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
654
818
|
var contents, data, _a, _b;
|
|
655
819
|
return __generator(this, function (_c) {
|
|
@@ -726,6 +890,86 @@ var deserializeAws_restJson1DeleteWorkspaceCommandError = function (output, cont
|
|
|
726
890
|
}
|
|
727
891
|
});
|
|
728
892
|
}); };
|
|
893
|
+
export var deserializeAws_restJson1DeleteWorkspaceApiKeyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
894
|
+
var contents, data, _a, _b;
|
|
895
|
+
return __generator(this, function (_c) {
|
|
896
|
+
switch (_c.label) {
|
|
897
|
+
case 0:
|
|
898
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
899
|
+
return [2, deserializeAws_restJson1DeleteWorkspaceApiKeyCommandError(output, context)];
|
|
900
|
+
}
|
|
901
|
+
contents = {
|
|
902
|
+
$metadata: deserializeMetadata(output),
|
|
903
|
+
keyName: undefined,
|
|
904
|
+
workspaceId: undefined,
|
|
905
|
+
};
|
|
906
|
+
_a = __expectNonNull;
|
|
907
|
+
_b = __expectObject;
|
|
908
|
+
return [4, parseBody(output.body, context)];
|
|
909
|
+
case 1:
|
|
910
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
911
|
+
if (data.keyName !== undefined && data.keyName !== null) {
|
|
912
|
+
contents.keyName = __expectString(data.keyName);
|
|
913
|
+
}
|
|
914
|
+
if (data.workspaceId !== undefined && data.workspaceId !== null) {
|
|
915
|
+
contents.workspaceId = __expectString(data.workspaceId);
|
|
916
|
+
}
|
|
917
|
+
return [2, Promise.resolve(contents)];
|
|
918
|
+
}
|
|
919
|
+
});
|
|
920
|
+
}); };
|
|
921
|
+
var deserializeAws_restJson1DeleteWorkspaceApiKeyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
922
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
923
|
+
var _c;
|
|
924
|
+
return __generator(this, function (_d) {
|
|
925
|
+
switch (_d.label) {
|
|
926
|
+
case 0:
|
|
927
|
+
_a = [__assign({}, output)];
|
|
928
|
+
_c = {};
|
|
929
|
+
return [4, parseBody(output.body, context)];
|
|
930
|
+
case 1:
|
|
931
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
932
|
+
errorCode = "UnknownError";
|
|
933
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
934
|
+
_b = errorCode;
|
|
935
|
+
switch (_b) {
|
|
936
|
+
case "AccessDeniedException": return [3, 2];
|
|
937
|
+
case "com.amazonaws.grafana#AccessDeniedException": return [3, 2];
|
|
938
|
+
case "ConflictException": return [3, 4];
|
|
939
|
+
case "com.amazonaws.grafana#ConflictException": return [3, 4];
|
|
940
|
+
case "InternalServerException": return [3, 6];
|
|
941
|
+
case "com.amazonaws.grafana#InternalServerException": return [3, 6];
|
|
942
|
+
case "ResourceNotFoundException": return [3, 8];
|
|
943
|
+
case "com.amazonaws.grafana#ResourceNotFoundException": return [3, 8];
|
|
944
|
+
case "ThrottlingException": return [3, 10];
|
|
945
|
+
case "com.amazonaws.grafana#ThrottlingException": return [3, 10];
|
|
946
|
+
case "ValidationException": return [3, 12];
|
|
947
|
+
case "com.amazonaws.grafana#ValidationException": return [3, 12];
|
|
948
|
+
}
|
|
949
|
+
return [3, 14];
|
|
950
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
951
|
+
case 3: throw _d.sent();
|
|
952
|
+
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
953
|
+
case 5: throw _d.sent();
|
|
954
|
+
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
955
|
+
case 7: throw _d.sent();
|
|
956
|
+
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
957
|
+
case 9: throw _d.sent();
|
|
958
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
959
|
+
case 11: throw _d.sent();
|
|
960
|
+
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
961
|
+
case 13: throw _d.sent();
|
|
962
|
+
case 14:
|
|
963
|
+
parsedBody = parsedOutput.body;
|
|
964
|
+
response = new __BaseException({
|
|
965
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
966
|
+
$fault: "client",
|
|
967
|
+
$metadata: deserializeMetadata(output),
|
|
968
|
+
});
|
|
969
|
+
throw __decorateServiceException(response, parsedBody);
|
|
970
|
+
}
|
|
971
|
+
});
|
|
972
|
+
}); };
|
|
729
973
|
export var deserializeAws_restJson1DescribeWorkspaceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
730
974
|
var contents, data, _a, _b;
|
|
731
975
|
return __generator(this, function (_c) {
|
package/dist-types/Grafana.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
|
|
2
2
|
import { AssociateLicenseCommandInput, AssociateLicenseCommandOutput } from "./commands/AssociateLicenseCommand";
|
|
3
|
+
import { CreateWorkspaceApiKeyCommandInput, CreateWorkspaceApiKeyCommandOutput } from "./commands/CreateWorkspaceApiKeyCommand";
|
|
3
4
|
import { CreateWorkspaceCommandInput, CreateWorkspaceCommandOutput } from "./commands/CreateWorkspaceCommand";
|
|
5
|
+
import { DeleteWorkspaceApiKeyCommandInput, DeleteWorkspaceApiKeyCommandOutput } from "./commands/DeleteWorkspaceApiKeyCommand";
|
|
4
6
|
import { DeleteWorkspaceCommandInput, DeleteWorkspaceCommandOutput } from "./commands/DeleteWorkspaceCommand";
|
|
5
7
|
import { DescribeWorkspaceAuthenticationCommandInput, DescribeWorkspaceAuthenticationCommandOutput } from "./commands/DescribeWorkspaceAuthenticationCommand";
|
|
6
8
|
import { DescribeWorkspaceCommandInput, DescribeWorkspaceCommandOutput } from "./commands/DescribeWorkspaceCommand";
|
|
@@ -42,12 +44,27 @@ export declare class Grafana extends GrafanaClient {
|
|
|
42
44
|
createWorkspace(args: CreateWorkspaceCommandInput, options?: __HttpHandlerOptions): Promise<CreateWorkspaceCommandOutput>;
|
|
43
45
|
createWorkspace(args: CreateWorkspaceCommandInput, cb: (err: any, data?: CreateWorkspaceCommandOutput) => void): void;
|
|
44
46
|
createWorkspace(args: CreateWorkspaceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateWorkspaceCommandOutput) => void): void;
|
|
47
|
+
/**
|
|
48
|
+
* <p>Creates an API key for the workspace. This key can be used to authenticate
|
|
49
|
+
* requests sent to the workspace's HTTP API. See
|
|
50
|
+
* <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>
|
|
51
|
+
* for available APIs and example requests.</p>
|
|
52
|
+
*/
|
|
53
|
+
createWorkspaceApiKey(args: CreateWorkspaceApiKeyCommandInput, options?: __HttpHandlerOptions): Promise<CreateWorkspaceApiKeyCommandOutput>;
|
|
54
|
+
createWorkspaceApiKey(args: CreateWorkspaceApiKeyCommandInput, cb: (err: any, data?: CreateWorkspaceApiKeyCommandOutput) => void): void;
|
|
55
|
+
createWorkspaceApiKey(args: CreateWorkspaceApiKeyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateWorkspaceApiKeyCommandOutput) => void): void;
|
|
45
56
|
/**
|
|
46
57
|
* <p>Deletes an Amazon Managed Grafana workspace.</p>
|
|
47
58
|
*/
|
|
48
59
|
deleteWorkspace(args: DeleteWorkspaceCommandInput, options?: __HttpHandlerOptions): Promise<DeleteWorkspaceCommandOutput>;
|
|
49
60
|
deleteWorkspace(args: DeleteWorkspaceCommandInput, cb: (err: any, data?: DeleteWorkspaceCommandOutput) => void): void;
|
|
50
61
|
deleteWorkspace(args: DeleteWorkspaceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteWorkspaceCommandOutput) => void): void;
|
|
62
|
+
/**
|
|
63
|
+
* <p>Deletes an API key for a workspace.</p>
|
|
64
|
+
*/
|
|
65
|
+
deleteWorkspaceApiKey(args: DeleteWorkspaceApiKeyCommandInput, options?: __HttpHandlerOptions): Promise<DeleteWorkspaceApiKeyCommandOutput>;
|
|
66
|
+
deleteWorkspaceApiKey(args: DeleteWorkspaceApiKeyCommandInput, cb: (err: any, data?: DeleteWorkspaceApiKeyCommandOutput) => void): void;
|
|
67
|
+
deleteWorkspaceApiKey(args: DeleteWorkspaceApiKeyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteWorkspaceApiKeyCommandOutput) => void): void;
|
|
51
68
|
/**
|
|
52
69
|
* <p>Displays information about one Amazon Managed Grafana workspace.</p>
|
|
53
70
|
*/
|
|
@@ -7,7 +7,9 @@ import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
|
|
|
7
7
|
import { Client as __Client, DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
|
|
8
8
|
import { BodyLengthCalculator as __BodyLengthCalculator, Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
|
|
9
9
|
import { AssociateLicenseCommandInput, AssociateLicenseCommandOutput } from "./commands/AssociateLicenseCommand";
|
|
10
|
+
import { CreateWorkspaceApiKeyCommandInput, CreateWorkspaceApiKeyCommandOutput } from "./commands/CreateWorkspaceApiKeyCommand";
|
|
10
11
|
import { CreateWorkspaceCommandInput, CreateWorkspaceCommandOutput } from "./commands/CreateWorkspaceCommand";
|
|
12
|
+
import { DeleteWorkspaceApiKeyCommandInput, DeleteWorkspaceApiKeyCommandOutput } from "./commands/DeleteWorkspaceApiKeyCommand";
|
|
11
13
|
import { DeleteWorkspaceCommandInput, DeleteWorkspaceCommandOutput } from "./commands/DeleteWorkspaceCommand";
|
|
12
14
|
import { DescribeWorkspaceAuthenticationCommandInput, DescribeWorkspaceAuthenticationCommandOutput } from "./commands/DescribeWorkspaceAuthenticationCommand";
|
|
13
15
|
import { DescribeWorkspaceCommandInput, DescribeWorkspaceCommandOutput } from "./commands/DescribeWorkspaceCommand";
|
|
@@ -20,8 +22,8 @@ import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./command
|
|
|
20
22
|
import { UpdatePermissionsCommandInput, UpdatePermissionsCommandOutput } from "./commands/UpdatePermissionsCommand";
|
|
21
23
|
import { UpdateWorkspaceAuthenticationCommandInput, UpdateWorkspaceAuthenticationCommandOutput } from "./commands/UpdateWorkspaceAuthenticationCommand";
|
|
22
24
|
import { UpdateWorkspaceCommandInput, UpdateWorkspaceCommandOutput } from "./commands/UpdateWorkspaceCommand";
|
|
23
|
-
export declare type ServiceInputTypes = AssociateLicenseCommandInput | CreateWorkspaceCommandInput | DeleteWorkspaceCommandInput | DescribeWorkspaceAuthenticationCommandInput | DescribeWorkspaceCommandInput | DisassociateLicenseCommandInput | ListPermissionsCommandInput | ListTagsForResourceCommandInput | ListWorkspacesCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdatePermissionsCommandInput | UpdateWorkspaceAuthenticationCommandInput | UpdateWorkspaceCommandInput;
|
|
24
|
-
export declare type ServiceOutputTypes = AssociateLicenseCommandOutput | CreateWorkspaceCommandOutput | DeleteWorkspaceCommandOutput | DescribeWorkspaceAuthenticationCommandOutput | DescribeWorkspaceCommandOutput | DisassociateLicenseCommandOutput | ListPermissionsCommandOutput | ListTagsForResourceCommandOutput | ListWorkspacesCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdatePermissionsCommandOutput | UpdateWorkspaceAuthenticationCommandOutput | UpdateWorkspaceCommandOutput;
|
|
25
|
+
export declare type ServiceInputTypes = AssociateLicenseCommandInput | CreateWorkspaceApiKeyCommandInput | CreateWorkspaceCommandInput | DeleteWorkspaceApiKeyCommandInput | DeleteWorkspaceCommandInput | DescribeWorkspaceAuthenticationCommandInput | DescribeWorkspaceCommandInput | DisassociateLicenseCommandInput | ListPermissionsCommandInput | ListTagsForResourceCommandInput | ListWorkspacesCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdatePermissionsCommandInput | UpdateWorkspaceAuthenticationCommandInput | UpdateWorkspaceCommandInput;
|
|
26
|
+
export declare type ServiceOutputTypes = AssociateLicenseCommandOutput | CreateWorkspaceApiKeyCommandOutput | CreateWorkspaceCommandOutput | DeleteWorkspaceApiKeyCommandOutput | DeleteWorkspaceCommandOutput | DescribeWorkspaceAuthenticationCommandOutput | DescribeWorkspaceCommandOutput | DisassociateLicenseCommandOutput | ListPermissionsCommandOutput | ListTagsForResourceCommandOutput | ListWorkspacesCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdatePermissionsCommandOutput | UpdateWorkspaceAuthenticationCommandOutput | UpdateWorkspaceCommandOutput;
|
|
25
27
|
export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
|
|
26
28
|
/**
|
|
27
29
|
* The HTTP handler to use. Fetch in browser and Https in Nodejs.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
2
|
+
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
|
|
3
|
+
import { GrafanaClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GrafanaClient";
|
|
4
|
+
import { CreateWorkspaceApiKeyRequest, CreateWorkspaceApiKeyResponse } from "../models/models_0";
|
|
5
|
+
export interface CreateWorkspaceApiKeyCommandInput extends CreateWorkspaceApiKeyRequest {
|
|
6
|
+
}
|
|
7
|
+
export interface CreateWorkspaceApiKeyCommandOutput extends CreateWorkspaceApiKeyResponse, __MetadataBearer {
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* <p>Creates an API key for the workspace. This key can be used to authenticate
|
|
11
|
+
* requests sent to the workspace's HTTP API. See
|
|
12
|
+
* <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>
|
|
13
|
+
* for available APIs and example requests.</p>
|
|
14
|
+
* @example
|
|
15
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
16
|
+
* ```javascript
|
|
17
|
+
* import { GrafanaClient, CreateWorkspaceApiKeyCommand } from "@aws-sdk/client-grafana"; // ES Modules import
|
|
18
|
+
* // const { GrafanaClient, CreateWorkspaceApiKeyCommand } = require("@aws-sdk/client-grafana"); // CommonJS import
|
|
19
|
+
* const client = new GrafanaClient(config);
|
|
20
|
+
* const command = new CreateWorkspaceApiKeyCommand(input);
|
|
21
|
+
* const response = await client.send(command);
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @see {@link CreateWorkspaceApiKeyCommandInput} for command's `input` shape.
|
|
25
|
+
* @see {@link CreateWorkspaceApiKeyCommandOutput} for command's `response` shape.
|
|
26
|
+
* @see {@link GrafanaClientResolvedConfig | config} for GrafanaClient's `config` shape.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
export declare class CreateWorkspaceApiKeyCommand extends $Command<CreateWorkspaceApiKeyCommandInput, CreateWorkspaceApiKeyCommandOutput, GrafanaClientResolvedConfig> {
|
|
30
|
+
readonly input: CreateWorkspaceApiKeyCommandInput;
|
|
31
|
+
constructor(input: CreateWorkspaceApiKeyCommandInput);
|
|
32
|
+
/**
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: GrafanaClientResolvedConfig, options?: __HttpHandlerOptions): Handler<CreateWorkspaceApiKeyCommandInput, CreateWorkspaceApiKeyCommandOutput>;
|
|
36
|
+
private serialize;
|
|
37
|
+
private deserialize;
|
|
38
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
2
|
+
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
|
|
3
|
+
import { GrafanaClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GrafanaClient";
|
|
4
|
+
import { DeleteWorkspaceApiKeyRequest, DeleteWorkspaceApiKeyResponse } from "../models/models_0";
|
|
5
|
+
export interface DeleteWorkspaceApiKeyCommandInput extends DeleteWorkspaceApiKeyRequest {
|
|
6
|
+
}
|
|
7
|
+
export interface DeleteWorkspaceApiKeyCommandOutput extends DeleteWorkspaceApiKeyResponse, __MetadataBearer {
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* <p>Deletes an API key for a workspace.</p>
|
|
11
|
+
* @example
|
|
12
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
13
|
+
* ```javascript
|
|
14
|
+
* import { GrafanaClient, DeleteWorkspaceApiKeyCommand } from "@aws-sdk/client-grafana"; // ES Modules import
|
|
15
|
+
* // const { GrafanaClient, DeleteWorkspaceApiKeyCommand } = require("@aws-sdk/client-grafana"); // CommonJS import
|
|
16
|
+
* const client = new GrafanaClient(config);
|
|
17
|
+
* const command = new DeleteWorkspaceApiKeyCommand(input);
|
|
18
|
+
* const response = await client.send(command);
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @see {@link DeleteWorkspaceApiKeyCommandInput} for command's `input` shape.
|
|
22
|
+
* @see {@link DeleteWorkspaceApiKeyCommandOutput} for command's `response` shape.
|
|
23
|
+
* @see {@link GrafanaClientResolvedConfig | config} for GrafanaClient's `config` shape.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
export declare class DeleteWorkspaceApiKeyCommand extends $Command<DeleteWorkspaceApiKeyCommandInput, DeleteWorkspaceApiKeyCommandOutput, GrafanaClientResolvedConfig> {
|
|
27
|
+
readonly input: DeleteWorkspaceApiKeyCommandInput;
|
|
28
|
+
constructor(input: DeleteWorkspaceApiKeyCommandInput);
|
|
29
|
+
/**
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: GrafanaClientResolvedConfig, options?: __HttpHandlerOptions): Handler<DeleteWorkspaceApiKeyCommandInput, DeleteWorkspaceApiKeyCommandOutput>;
|
|
33
|
+
private serialize;
|
|
34
|
+
private deserialize;
|
|
35
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * from "./AssociateLicenseCommand";
|
|
2
|
+
export * from "./CreateWorkspaceApiKeyCommand";
|
|
2
3
|
export * from "./CreateWorkspaceCommand";
|
|
4
|
+
export * from "./DeleteWorkspaceApiKeyCommand";
|
|
3
5
|
export * from "./DeleteWorkspaceCommand";
|
|
4
6
|
export * from "./DescribeWorkspaceAuthenticationCommand";
|
|
5
7
|
export * from "./DescribeWorkspaceCommand";
|