@dishantlangayan/solace-cloud-cli 0.0.2 → 0.0.4
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 +158 -35
- package/dist/commands/missionctrl/broker/create.d.ts +4 -3
- package/dist/commands/missionctrl/broker/create.js +12 -18
- package/dist/commands/missionctrl/broker/delete.d.ts +5 -3
- package/dist/commands/missionctrl/broker/delete.js +16 -4
- package/dist/commands/missionctrl/broker/display.d.ts +4 -3
- package/dist/commands/missionctrl/broker/display.js +12 -16
- package/dist/commands/missionctrl/broker/list.d.ts +4 -3
- package/dist/commands/missionctrl/broker/list.js +7 -4
- package/dist/commands/missionctrl/broker/opstatus.d.ts +15 -0
- package/dist/commands/missionctrl/broker/opstatus.js +159 -0
- package/dist/commands/missionctrl/broker/update.d.ts +15 -0
- package/dist/commands/missionctrl/broker/update.js +77 -0
- package/dist/commands/platform/env/create.d.ts +5 -4
- package/dist/commands/platform/env/create.js +11 -18
- package/dist/commands/platform/env/delete.d.ts +5 -3
- package/dist/commands/platform/env/delete.js +19 -7
- package/dist/commands/platform/env/display.d.ts +4 -3
- package/dist/commands/platform/env/display.js +12 -17
- package/dist/commands/platform/env/list.d.ts +4 -3
- package/dist/commands/platform/env/list.js +21 -17
- package/dist/commands/platform/env/update.d.ts +5 -4
- package/dist/commands/platform/env/update.js +14 -22
- package/dist/types/broker.d.ts +148 -14
- package/dist/util/internal.d.ts +15 -0
- package/dist/util/internal.js +34 -0
- package/dist/util/sc-connection.d.ts +1 -0
- package/dist/util/sc-connection.js +5 -0
- package/oclif.manifest.json +385 -15
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ $ npm install -g @dishantlangayan/solace-cloud-cli
|
|
|
22
22
|
$ sc COMMAND
|
|
23
23
|
running command...
|
|
24
24
|
$ sc (--version)
|
|
25
|
-
@dishantlangayan/solace-cloud-cli/0.0.
|
|
25
|
+
@dishantlangayan/solace-cloud-cli/0.0.4 darwin-arm64 node-v24.1.0
|
|
26
26
|
$ sc --help [COMMAND]
|
|
27
27
|
USAGE
|
|
28
28
|
$ sc COMMAND
|
|
@@ -50,6 +50,8 @@ The following Environment variables are optional:
|
|
|
50
50
|
* [`sc missionctrl broker delete`](#sc-missionctrl-broker-delete)
|
|
51
51
|
* [`sc missionctrl broker display`](#sc-missionctrl-broker-display)
|
|
52
52
|
* [`sc missionctrl broker list`](#sc-missionctrl-broker-list)
|
|
53
|
+
* [`sc missionctrl broker opstatus`](#sc-missionctrl-broker-opstatus)
|
|
54
|
+
* [`sc missionctrl broker update`](#sc-missionctrl-broker-update)
|
|
53
55
|
* [`sc platform env create`](#sc-platform-env-create)
|
|
54
56
|
* [`sc platform env delete`](#sc-platform-env-delete)
|
|
55
57
|
* [`sc platform env display`](#sc-platform-env-display)
|
|
@@ -92,8 +94,8 @@ Create an event broker service. You must provide a unique name and select a serv
|
|
|
92
94
|
|
|
93
95
|
```
|
|
94
96
|
USAGE
|
|
95
|
-
$ sc missionctrl broker create -d <value> -n <value> -c <value> [
|
|
96
|
-
|
|
97
|
+
$ sc missionctrl broker create -d <value> -n <value> -c <value> [--json] [--log-level debug|warn|error|info|trace] [-e
|
|
98
|
+
<value>] [-l] [-s <value>] [-m <value>] [-r] [-v <value>]
|
|
97
99
|
|
|
98
100
|
FLAGS
|
|
99
101
|
-c, --service-class-id=<value>
|
|
@@ -126,6 +128,11 @@ FLAGS
|
|
|
126
128
|
-v, --version=<value>
|
|
127
129
|
The event broker version. A default version is provided when this is not specified.
|
|
128
130
|
|
|
131
|
+
GLOBAL FLAGS
|
|
132
|
+
--json Format output as json.
|
|
133
|
+
--log-level=<option> [default: info] Specify level for logging.
|
|
134
|
+
<options: debug|warn|error|info|trace>
|
|
135
|
+
|
|
129
136
|
DESCRIPTION
|
|
130
137
|
Create an event broker service. You must provide a unique name and select a service class and datacenter. You can
|
|
131
138
|
optionally define other properties for the event broker service.
|
|
@@ -138,7 +145,7 @@ EXAMPLES
|
|
|
138
145
|
$ sc missionctrl broker create --name=MyBrokerName --datacenter-id=eks-ca-central-1a --service-class-id=DEVELOPER
|
|
139
146
|
```
|
|
140
147
|
|
|
141
|
-
_See code: [src/commands/missionctrl/broker/create.ts](https://github.com/dishantlangayan/solace-cloud-cli/blob/v0.0.
|
|
148
|
+
_See code: [src/commands/missionctrl/broker/create.ts](https://github.com/dishantlangayan/solace-cloud-cli/blob/v0.0.4/src/commands/missionctrl/broker/create.ts)_
|
|
142
149
|
|
|
143
150
|
## `sc missionctrl broker delete`
|
|
144
151
|
|
|
@@ -146,12 +153,17 @@ Delete a service using its unique identifier.
|
|
|
146
153
|
|
|
147
154
|
```
|
|
148
155
|
USAGE
|
|
149
|
-
$ sc missionctrl broker delete [-b <value>] [-n <value>]
|
|
156
|
+
$ sc missionctrl broker delete [--json] [--log-level debug|warn|error|info|trace] [-b <value>] [-n <value>]
|
|
150
157
|
|
|
151
158
|
FLAGS
|
|
152
159
|
-b, --broker-id=<value> Id of the event broker service.
|
|
153
160
|
-n, --name=<value> Name of the event broker service.
|
|
154
161
|
|
|
162
|
+
GLOBAL FLAGS
|
|
163
|
+
--json Format output as json.
|
|
164
|
+
--log-level=<option> [default: info] Specify level for logging.
|
|
165
|
+
<options: debug|warn|error|info|trace>
|
|
166
|
+
|
|
155
167
|
DESCRIPTION
|
|
156
168
|
Delete a service using its unique identifier.
|
|
157
169
|
|
|
@@ -165,7 +177,7 @@ EXAMPLES
|
|
|
165
177
|
$ sc missionctrl broker delete --name=MyBrokerName
|
|
166
178
|
```
|
|
167
179
|
|
|
168
|
-
_See code: [src/commands/missionctrl/broker/delete.ts](https://github.com/dishantlangayan/solace-cloud-cli/blob/v0.0.
|
|
180
|
+
_See code: [src/commands/missionctrl/broker/delete.ts](https://github.com/dishantlangayan/solace-cloud-cli/blob/v0.0.4/src/commands/missionctrl/broker/delete.ts)_
|
|
169
181
|
|
|
170
182
|
## `sc missionctrl broker display`
|
|
171
183
|
|
|
@@ -173,12 +185,17 @@ Get the details of an event broker service using its identifier or name.
|
|
|
173
185
|
|
|
174
186
|
```
|
|
175
187
|
USAGE
|
|
176
|
-
$ sc missionctrl broker display [-b <value>] [-n <value>]
|
|
188
|
+
$ sc missionctrl broker display [--json] [--log-level debug|warn|error|info|trace] [-b <value>] [-n <value>]
|
|
177
189
|
|
|
178
190
|
FLAGS
|
|
179
191
|
-b, --broker-id=<value> Id of the event broker service.
|
|
180
192
|
-n, --name=<value> Name of the event broker service.
|
|
181
193
|
|
|
194
|
+
GLOBAL FLAGS
|
|
195
|
+
--json Format output as json.
|
|
196
|
+
--log-level=<option> [default: info] Specify level for logging.
|
|
197
|
+
<options: debug|warn|error|info|trace>
|
|
198
|
+
|
|
182
199
|
DESCRIPTION
|
|
183
200
|
Get the details of an event broker service using its identifier or name.
|
|
184
201
|
|
|
@@ -191,7 +208,7 @@ EXAMPLES
|
|
|
191
208
|
$ sc missionctrl broker display
|
|
192
209
|
```
|
|
193
210
|
|
|
194
|
-
_See code: [src/commands/missionctrl/broker/display.ts](https://github.com/dishantlangayan/solace-cloud-cli/blob/v0.0.
|
|
211
|
+
_See code: [src/commands/missionctrl/broker/display.ts](https://github.com/dishantlangayan/solace-cloud-cli/blob/v0.0.4/src/commands/missionctrl/broker/display.ts)_
|
|
195
212
|
|
|
196
213
|
## `sc missionctrl broker list`
|
|
197
214
|
|
|
@@ -199,7 +216,8 @@ Get a listing of event broker services.
|
|
|
199
216
|
|
|
200
217
|
```
|
|
201
218
|
USAGE
|
|
202
|
-
$ sc missionctrl broker list [
|
|
219
|
+
$ sc missionctrl broker list [--json] [--log-level debug|warn|error|info|trace] [-n <value>] [--pageNumber <value>]
|
|
220
|
+
[--pageSize <value>] [--sort <value>]
|
|
203
221
|
|
|
204
222
|
FLAGS
|
|
205
223
|
-n, --name=<value>
|
|
@@ -219,6 +237,11 @@ FLAGS
|
|
|
219
237
|
* attributes-names
|
|
220
238
|
* attributes-names:sort-order
|
|
221
239
|
|
|
240
|
+
GLOBAL FLAGS
|
|
241
|
+
--json Format output as json.
|
|
242
|
+
--log-level=<option> [default: info] Specify level for logging.
|
|
243
|
+
<options: debug|warn|error|info|trace>
|
|
244
|
+
|
|
222
245
|
DESCRIPTION
|
|
223
246
|
Get a listing of event broker services.
|
|
224
247
|
|
|
@@ -231,7 +254,80 @@ EXAMPLES
|
|
|
231
254
|
$ sc missionctrl broker list --name=MyBrokerName --pageNumber=1 --pageSize=10 --sort=name:asc
|
|
232
255
|
```
|
|
233
256
|
|
|
234
|
-
_See code: [src/commands/missionctrl/broker/list.ts](https://github.com/dishantlangayan/solace-cloud-cli/blob/v0.0.
|
|
257
|
+
_See code: [src/commands/missionctrl/broker/list.ts](https://github.com/dishantlangayan/solace-cloud-cli/blob/v0.0.4/src/commands/missionctrl/broker/list.ts)_
|
|
258
|
+
|
|
259
|
+
## `sc missionctrl broker opstatus`
|
|
260
|
+
|
|
261
|
+
Get the status of all operations being performed on an event broker service.
|
|
262
|
+
|
|
263
|
+
```
|
|
264
|
+
USAGE
|
|
265
|
+
$ sc missionctrl broker opstatus [--json] [--log-level debug|warn|error|info|trace] [-b <value>] [-n <value>] [-p] [-w
|
|
266
|
+
<value>]
|
|
267
|
+
|
|
268
|
+
FLAGS
|
|
269
|
+
-b, --broker-id=<value> Id of the event broker service.
|
|
270
|
+
-n, --name=<value> Name of the event broker service.
|
|
271
|
+
-p, --show-progress Displays a status bar of the in-progress operations. The command will wait for completion of
|
|
272
|
+
each step of the operation.
|
|
273
|
+
-w, --wait-ms=<value> The milliseconds to wait between API calls for checking progress of the operation. Default is
|
|
274
|
+
5000 ms.
|
|
275
|
+
|
|
276
|
+
GLOBAL FLAGS
|
|
277
|
+
--json Format output as json.
|
|
278
|
+
--log-level=<option> [default: info] Specify level for logging.
|
|
279
|
+
<options: debug|warn|error|info|trace>
|
|
280
|
+
|
|
281
|
+
DESCRIPTION
|
|
282
|
+
Get the status of all operations being performed on an event broker service.
|
|
283
|
+
To get the operation status, you must provide the identifier or name of the event broker service.
|
|
284
|
+
|
|
285
|
+
Token Permissions: [ mission_control:access or services:get or services:get:self or services:view or
|
|
286
|
+
services:view:self ]
|
|
287
|
+
|
|
288
|
+
EXAMPLES
|
|
289
|
+
$ sc missionctrl broker opstatus -b <broker-id>
|
|
290
|
+
|
|
291
|
+
$ sc missionctrl broker opstatus -n <broker-name>
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
_See code: [src/commands/missionctrl/broker/opstatus.ts](https://github.com/dishantlangayan/solace-cloud-cli/blob/v0.0.4/src/commands/missionctrl/broker/opstatus.ts)_
|
|
295
|
+
|
|
296
|
+
## `sc missionctrl broker update`
|
|
297
|
+
|
|
298
|
+
Update the configuration of an existing event broker service.
|
|
299
|
+
|
|
300
|
+
```
|
|
301
|
+
USAGE
|
|
302
|
+
$ sc missionctrl broker update [--json] [--log-level debug|warn|error|info|trace] [-b <value>] [-l <value>] [-n <value>]
|
|
303
|
+
[--new-name <value>]
|
|
304
|
+
|
|
305
|
+
FLAGS
|
|
306
|
+
-b, --broker-id=<value> Id of the event broker service.
|
|
307
|
+
-l, --locked=<value> Indicates whether the event broker service has deletion protection enabled. The valid values
|
|
308
|
+
are 'true' (enabled) or 'false' (disabled).
|
|
309
|
+
-n, --name=<value> Name of the event broker service.
|
|
310
|
+
--new-name=<value> New name of the event broker service. The new service name must be unique within an
|
|
311
|
+
organization.
|
|
312
|
+
|
|
313
|
+
GLOBAL FLAGS
|
|
314
|
+
--json Format output as json.
|
|
315
|
+
--log-level=<option> [default: info] Specify level for logging.
|
|
316
|
+
<options: debug|warn|error|info|trace>
|
|
317
|
+
|
|
318
|
+
DESCRIPTION
|
|
319
|
+
Update the configuration of an existing event broker service.
|
|
320
|
+
You can provide any combination of supported flags. If a flag is not provided, then it will not be updated.
|
|
321
|
+
|
|
322
|
+
Your token must have one of the permissions listed in the Token Permissions.
|
|
323
|
+
|
|
324
|
+
Token Permissions: [ mission_control:access or services:put ]
|
|
325
|
+
|
|
326
|
+
EXAMPLES
|
|
327
|
+
$ sc missionctrl broker update
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
_See code: [src/commands/missionctrl/broker/update.ts](https://github.com/dishantlangayan/solace-cloud-cli/blob/v0.0.4/src/commands/missionctrl/broker/update.ts)_
|
|
235
331
|
|
|
236
332
|
## `sc platform env create`
|
|
237
333
|
|
|
@@ -239,16 +335,22 @@ Create a new environment.
|
|
|
239
335
|
|
|
240
336
|
```
|
|
241
337
|
USAGE
|
|
242
|
-
$ sc platform env create -n <value> [-d <value>] [--isDefault]
|
|
338
|
+
$ sc platform env create -n <value> [--json] [--log-level debug|warn|error|info|trace] [-d <value>] [--isDefault]
|
|
339
|
+
[--isProduction]
|
|
243
340
|
|
|
244
341
|
FLAGS
|
|
245
|
-
-d, --
|
|
246
|
-
-n, --name=<value>
|
|
247
|
-
--isDefault
|
|
248
|
-
--isProduction
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
342
|
+
-d, --description=<value> Description of the environment to create.
|
|
343
|
+
-n, --name=<value> (required) Name of the environment to create.
|
|
344
|
+
--isDefault Indicates this is the organization’s default environment.
|
|
345
|
+
--isProduction Indicates this is an organization’s production environment.
|
|
346
|
+
This is an immutable field. If an environment needs to be migrated,
|
|
347
|
+
architecture can be migrated to a new environment with the desired
|
|
348
|
+
environment type instead.
|
|
349
|
+
|
|
350
|
+
GLOBAL FLAGS
|
|
351
|
+
--json Format output as json.
|
|
352
|
+
--log-level=<option> [default: info] Specify level for logging.
|
|
353
|
+
<options: debug|warn|error|info|trace>
|
|
252
354
|
|
|
253
355
|
DESCRIPTION
|
|
254
356
|
Create a new environment.
|
|
@@ -259,7 +361,7 @@ EXAMPLES
|
|
|
259
361
|
$ sc platform env create --name=MyEnvironment --desc="My environment description" --isDefault --isProduction
|
|
260
362
|
```
|
|
261
363
|
|
|
262
|
-
_See code: [src/commands/platform/env/create.ts](https://github.com/dishantlangayan/solace-cloud-cli/blob/v0.0.
|
|
364
|
+
_See code: [src/commands/platform/env/create.ts](https://github.com/dishantlangayan/solace-cloud-cli/blob/v0.0.4/src/commands/platform/env/create.ts)_
|
|
263
365
|
|
|
264
366
|
## `sc platform env delete`
|
|
265
367
|
|
|
@@ -267,12 +369,17 @@ Delete an environment using either its name or unique identifier. The default en
|
|
|
267
369
|
|
|
268
370
|
```
|
|
269
371
|
USAGE
|
|
270
|
-
$ sc platform env delete [-e <value>] [-n <value>]
|
|
372
|
+
$ sc platform env delete [--json] [--log-level debug|warn|error|info|trace] [-e <value>] [-n <value>]
|
|
271
373
|
|
|
272
374
|
FLAGS
|
|
273
375
|
-e, --env-id=<value> Id of the environment.
|
|
274
376
|
-n, --name=<value> Name of the environment.
|
|
275
377
|
|
|
378
|
+
GLOBAL FLAGS
|
|
379
|
+
--json Format output as json.
|
|
380
|
+
--log-level=<option> [default: info] Specify level for logging.
|
|
381
|
+
<options: debug|warn|error|info|trace>
|
|
382
|
+
|
|
276
383
|
DESCRIPTION
|
|
277
384
|
Delete an environment using either its name or unique identifier. The default environment cannot be deleted.
|
|
278
385
|
|
|
@@ -284,7 +391,7 @@ EXAMPLES
|
|
|
284
391
|
$ sc platform env delete --env-id=MyEnvId
|
|
285
392
|
```
|
|
286
393
|
|
|
287
|
-
_See code: [src/commands/platform/env/delete.ts](https://github.com/dishantlangayan/solace-cloud-cli/blob/v0.0.
|
|
394
|
+
_See code: [src/commands/platform/env/delete.ts](https://github.com/dishantlangayan/solace-cloud-cli/blob/v0.0.4/src/commands/platform/env/delete.ts)_
|
|
288
395
|
|
|
289
396
|
## `sc platform env display`
|
|
290
397
|
|
|
@@ -292,12 +399,17 @@ Display information about an Environment.
|
|
|
292
399
|
|
|
293
400
|
```
|
|
294
401
|
USAGE
|
|
295
|
-
$ sc platform env display [-e <value>] [-n <value>]
|
|
402
|
+
$ sc platform env display [--json] [--log-level debug|warn|error|info|trace] [-e <value>] [-n <value>]
|
|
296
403
|
|
|
297
404
|
FLAGS
|
|
298
405
|
-e, --env-id=<value> Id of the environment.
|
|
299
406
|
-n, --name=<value> Name of the environment.
|
|
300
407
|
|
|
408
|
+
GLOBAL FLAGS
|
|
409
|
+
--json Format output as json.
|
|
410
|
+
--log-level=<option> [default: info] Specify level for logging.
|
|
411
|
+
<options: debug|warn|error|info|trace>
|
|
412
|
+
|
|
301
413
|
DESCRIPTION
|
|
302
414
|
Display information about an Environment.
|
|
303
415
|
|
|
@@ -305,14 +417,13 @@ DESCRIPTION
|
|
|
305
417
|
|
|
306
418
|
Required token permissions: [ environments:view ]
|
|
307
419
|
|
|
308
|
-
|
|
309
420
|
EXAMPLES
|
|
310
421
|
$ sc platform env display --name=MyEnvName
|
|
311
422
|
|
|
312
423
|
$ sc platform env display --env-id=MyEnvId
|
|
313
424
|
```
|
|
314
425
|
|
|
315
|
-
_See code: [src/commands/platform/env/display.ts](https://github.com/dishantlangayan/solace-cloud-cli/blob/v0.0.
|
|
426
|
+
_See code: [src/commands/platform/env/display.ts](https://github.com/dishantlangayan/solace-cloud-cli/blob/v0.0.4/src/commands/platform/env/display.ts)_
|
|
316
427
|
|
|
317
428
|
## `sc platform env list`
|
|
318
429
|
|
|
@@ -320,14 +431,20 @@ Get a list of all Environments.
|
|
|
320
431
|
|
|
321
432
|
```
|
|
322
433
|
USAGE
|
|
323
|
-
$ sc platform env list [-
|
|
434
|
+
$ sc platform env list [--json] [--log-level debug|warn|error|info|trace] [-n <value>] [-p <value>] [-s <value>]
|
|
435
|
+
[--sort <value>]
|
|
324
436
|
|
|
325
437
|
FLAGS
|
|
326
438
|
-n, --name=<value> Name of the environment to match on.
|
|
327
|
-
|
|
328
|
-
|
|
439
|
+
-p, --pageNumber=<value> The page number to get. Defaults to 10
|
|
440
|
+
-s, --pageSize=<value> The number of environments to get per page. Defaults to 1
|
|
329
441
|
--sort=<value> The query (fieldName:<ASC/DESC>) used to sort the environment list in the response.
|
|
330
442
|
|
|
443
|
+
GLOBAL FLAGS
|
|
444
|
+
--json Format output as json.
|
|
445
|
+
--log-level=<option> [default: info] Specify level for logging.
|
|
446
|
+
<options: debug|warn|error|info|trace>
|
|
447
|
+
|
|
331
448
|
DESCRIPTION
|
|
332
449
|
Get a list of all Environments.
|
|
333
450
|
|
|
@@ -339,7 +456,7 @@ EXAMPLES
|
|
|
339
456
|
$ sc platform env list --name=Default --pageNumber=1 --pageSize=10 --sort=name:ASC
|
|
340
457
|
```
|
|
341
458
|
|
|
342
|
-
_See code: [src/commands/platform/env/list.ts](https://github.com/dishantlangayan/solace-cloud-cli/blob/v0.0.
|
|
459
|
+
_See code: [src/commands/platform/env/list.ts](https://github.com/dishantlangayan/solace-cloud-cli/blob/v0.0.4/src/commands/platform/env/list.ts)_
|
|
343
460
|
|
|
344
461
|
## `sc platform env update`
|
|
345
462
|
|
|
@@ -347,14 +464,20 @@ Modify an environment's attributes
|
|
|
347
464
|
|
|
348
465
|
```
|
|
349
466
|
USAGE
|
|
350
|
-
$ sc platform env update [-d <value>] [-e <value>] [--isDefault] [-n
|
|
467
|
+
$ sc platform env update [--json] [--log-level debug|warn|error|info|trace] [-d <value>] [-e <value>] [--isDefault] [-n
|
|
468
|
+
<value>] [--new-name <value>]
|
|
351
469
|
|
|
352
470
|
FLAGS
|
|
353
|
-
-d, --
|
|
354
|
-
-e, --env-id=<value>
|
|
355
|
-
-n, --name=<value>
|
|
356
|
-
--isDefault
|
|
357
|
-
--new-name=<value>
|
|
471
|
+
-d, --description=<value> Description of the environment to update.
|
|
472
|
+
-e, --env-id=<value> Id of the environment.
|
|
473
|
+
-n, --name=<value> Current name of the environment.
|
|
474
|
+
--isDefault Indicates this is the organization's default environment. The default value is false.
|
|
475
|
+
--new-name=<value> New name of the environment.
|
|
476
|
+
|
|
477
|
+
GLOBAL FLAGS
|
|
478
|
+
--json Format output as json.
|
|
479
|
+
--log-level=<option> [default: info] Specify level for logging.
|
|
480
|
+
<options: debug|warn|error|info|trace>
|
|
358
481
|
|
|
359
482
|
DESCRIPTION
|
|
360
483
|
Modify an environment's attributes
|
|
@@ -370,7 +493,7 @@ EXAMPLES
|
|
|
370
493
|
$ sc platform env update --env-id=MyEnvId --new-name=MyNewEnvName --desc="My description to update" --isDefault
|
|
371
494
|
```
|
|
372
495
|
|
|
373
|
-
_See code: [src/commands/platform/env/update.ts](https://github.com/dishantlangayan/solace-cloud-cli/blob/v0.0.
|
|
496
|
+
_See code: [src/commands/platform/env/update.ts](https://github.com/dishantlangayan/solace-cloud-cli/blob/v0.0.4/src/commands/platform/env/update.ts)_
|
|
374
497
|
|
|
375
498
|
## `sc plugins`
|
|
376
499
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { ScCommand } from '../../../sc-command.js';
|
|
2
|
+
import { EventBrokerOperationDetail } from '../../../types/broker.js';
|
|
3
|
+
export default class MissionctrlBrokerCreate extends ScCommand<typeof MissionctrlBrokerCreate> {
|
|
3
4
|
static args: {};
|
|
4
5
|
static description: string;
|
|
5
6
|
static examples: string[];
|
|
@@ -14,6 +15,6 @@ export default class MissionctrlBrokerCreate extends Command {
|
|
|
14
15
|
'service-class-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
16
|
version: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
17
|
};
|
|
17
|
-
run(): Promise<
|
|
18
|
+
run(): Promise<EventBrokerOperationDetail>;
|
|
18
19
|
private print;
|
|
19
20
|
}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { camelCaseToTitleCase } from '../../../util/internal.js';
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { ScCommand } from '../../../sc-command.js';
|
|
3
|
+
import { camelCaseToTitleCase, renderKeyValueTable } from '../../../util/internal.js';
|
|
4
4
|
import { ScConnection } from '../../../util/sc-connection.js';
|
|
5
|
-
export default class MissionctrlBrokerCreate extends
|
|
5
|
+
export default class MissionctrlBrokerCreate extends ScCommand {
|
|
6
6
|
static args = {};
|
|
7
7
|
static description = `Create an event broker service. You must provide a unique name and select a service class and datacenter. You can optionally define other properties for the event broker service.
|
|
8
8
|
|
|
9
9
|
Your token must have one of the permissions listed in the Token Permissions.
|
|
10
10
|
|
|
11
11
|
Token Permissions: [ \`services:post\` ]`;
|
|
12
|
-
static examples = [
|
|
12
|
+
static examples = [
|
|
13
|
+
'<%= config.bin %> <%= command.id %> --name=MyBrokerName --datacenter-id=eks-ca-central-1a --service-class-id=DEVELOPER',
|
|
14
|
+
];
|
|
13
15
|
static flags = {
|
|
14
16
|
'datacenter-id': Flags.string({
|
|
15
17
|
char: 'd',
|
|
@@ -39,7 +41,7 @@ Token Permissions: [ \`services:post\` ]`;
|
|
|
39
41
|
name: Flags.string({
|
|
40
42
|
char: 'n',
|
|
41
43
|
description: 'Name of the event broker service to create.',
|
|
42
|
-
required: true
|
|
44
|
+
required: true,
|
|
43
45
|
}),
|
|
44
46
|
'redundancy-group-ssl-enabled': Flags.boolean({
|
|
45
47
|
char: 'r',
|
|
@@ -85,7 +87,7 @@ Token Permissions: [ \`services:post\` ]`;
|
|
|
85
87
|
// API body
|
|
86
88
|
const body = {
|
|
87
89
|
...(datacenterId && { datacenterId }),
|
|
88
|
-
...(envId
|
|
90
|
+
...(envId && { environmentId: envId }),
|
|
89
91
|
...(eventBrokerVersion && { eventBrokerVersion }),
|
|
90
92
|
locked,
|
|
91
93
|
...(maxSpoolUsage && { maxSpoolUsage }),
|
|
@@ -99,22 +101,14 @@ Token Permissions: [ \`services:post\` ]`;
|
|
|
99
101
|
// Display results
|
|
100
102
|
this.log('Event broker service created successfully.');
|
|
101
103
|
this.print(resp.data);
|
|
104
|
+
return resp.data;
|
|
102
105
|
}
|
|
103
106
|
print(broker) {
|
|
104
|
-
this.log();
|
|
105
107
|
const tableRows = [
|
|
106
108
|
['Key', 'Value'],
|
|
107
109
|
...Object.entries(broker).map(([key, value]) => [camelCaseToTitleCase(key), value]),
|
|
108
110
|
];
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
columns: {
|
|
112
|
-
1: { width: 50, wrapWord: true },
|
|
113
|
-
},
|
|
114
|
-
drawHorizontalLine(lineIndex, rowCount) {
|
|
115
|
-
return lineIndex === 0 || lineIndex === 1 || lineIndex === rowCount;
|
|
116
|
-
},
|
|
117
|
-
};
|
|
118
|
-
this.log(table(tableRows, config));
|
|
111
|
+
this.log();
|
|
112
|
+
this.log(renderKeyValueTable(tableRows));
|
|
119
113
|
}
|
|
120
114
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { ScCommand } from '../../../sc-command.js';
|
|
2
|
+
import { EventBrokerOperationDetail } from '../../../types/broker.js';
|
|
3
|
+
export default class MissionctrlBrokerDelete extends ScCommand<typeof MissionctrlBrokerDelete> {
|
|
3
4
|
static args: {};
|
|
4
5
|
static description: string;
|
|
5
6
|
static examples: string[];
|
|
@@ -7,5 +8,6 @@ export default class MissionctrlBrokerDelete extends Command {
|
|
|
7
8
|
'broker-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
9
|
name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
10
|
};
|
|
10
|
-
run(): Promise<
|
|
11
|
+
run(): Promise<EventBrokerOperationDetail>;
|
|
12
|
+
private print;
|
|
11
13
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { ScCommand } from '../../../sc-command.js';
|
|
3
|
+
import { camelCaseToTitleCase, renderKeyValueTable } from '../../../util/internal.js';
|
|
2
4
|
import { ScConnection } from '../../../util/sc-connection.js';
|
|
3
|
-
export default class MissionctrlBrokerDelete extends
|
|
5
|
+
export default class MissionctrlBrokerDelete extends ScCommand {
|
|
4
6
|
static args = {};
|
|
5
7
|
static description = `Delete a service using its unique identifier.
|
|
6
8
|
|
|
@@ -46,7 +48,17 @@ Token Permissions: [ \`services:delete\` **or** \`services:delete:self\` **or**
|
|
|
46
48
|
}
|
|
47
49
|
// API call to delete environment by id
|
|
48
50
|
apiUrl += `/${brokerIdToDelete}`;
|
|
49
|
-
await conn.delete(apiUrl);
|
|
50
|
-
|
|
51
|
+
const resp = await conn.delete(apiUrl);
|
|
52
|
+
// Display results
|
|
53
|
+
this.print(resp.data);
|
|
54
|
+
return resp.data;
|
|
55
|
+
}
|
|
56
|
+
print(broker) {
|
|
57
|
+
const tableRows = [
|
|
58
|
+
['Key', 'Value'],
|
|
59
|
+
...Object.entries(broker).map(([key, value]) => [camelCaseToTitleCase(key), value]),
|
|
60
|
+
];
|
|
61
|
+
this.log();
|
|
62
|
+
this.log(renderKeyValueTable(tableRows));
|
|
51
63
|
}
|
|
52
64
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { ScCommand } from '../../../sc-command.js';
|
|
2
|
+
import { EventBrokerServiceDetail } from '../../../types/broker.js';
|
|
3
|
+
export default class MissionctrlBrokerDisplay extends ScCommand<typeof MissionctrlBrokerDisplay> {
|
|
3
4
|
static args: {};
|
|
4
5
|
static description: string;
|
|
5
6
|
static examples: string[];
|
|
@@ -7,6 +8,6 @@ export default class MissionctrlBrokerDisplay extends Command {
|
|
|
7
8
|
'broker-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
9
|
name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
10
|
};
|
|
10
|
-
run(): Promise<
|
|
11
|
+
run(): Promise<EventBrokerServiceDetail[]>;
|
|
11
12
|
private print;
|
|
12
13
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { camelCaseToTitleCase } from '../../../util/internal.js';
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { ScCommand } from '../../../sc-command.js';
|
|
3
|
+
import { camelCaseToTitleCase, renderKeyValueTable } from '../../../util/internal.js';
|
|
4
4
|
import { ScConnection } from '../../../util/sc-connection.js';
|
|
5
|
-
export default class MissionctrlBrokerDisplay extends
|
|
5
|
+
export default class MissionctrlBrokerDisplay extends ScCommand {
|
|
6
6
|
static args = {};
|
|
7
7
|
static description = `Get the details of an event broker service using its identifier or name.
|
|
8
8
|
|
|
@@ -31,11 +31,13 @@ export default class MissionctrlBrokerDisplay extends Command {
|
|
|
31
31
|
let apiUrl = `/missionControl/eventBrokerServices`;
|
|
32
32
|
// If broker name provided, get all brokers matching provided name
|
|
33
33
|
// If broker id provided, get broker with that id
|
|
34
|
+
let rawResp;
|
|
34
35
|
if (brokerId) {
|
|
35
36
|
// API call to get broker by id
|
|
36
37
|
apiUrl += `/${brokerId}`;
|
|
37
38
|
const resp = await conn.get(apiUrl);
|
|
38
|
-
this.print(resp);
|
|
39
|
+
this.print(resp.data);
|
|
40
|
+
rawResp = [resp.data];
|
|
39
41
|
}
|
|
40
42
|
else if (name) {
|
|
41
43
|
// API call to get broker by name
|
|
@@ -44,26 +46,20 @@ export default class MissionctrlBrokerDisplay extends Command {
|
|
|
44
46
|
for (const broker of resp.data) {
|
|
45
47
|
this.print(broker);
|
|
46
48
|
}
|
|
49
|
+
rawResp = resp.data;
|
|
47
50
|
}
|
|
48
51
|
else {
|
|
49
52
|
this.error('Either --broker-id or --name must be provided.');
|
|
50
53
|
}
|
|
54
|
+
// Return raw json if --json flag is set
|
|
55
|
+
return rawResp;
|
|
51
56
|
}
|
|
52
57
|
print(broker) {
|
|
53
|
-
this.log();
|
|
54
58
|
const tableRows = [
|
|
55
59
|
['Key', 'Value'],
|
|
56
60
|
...Object.entries(broker).map(([key, value]) => [camelCaseToTitleCase(key), value]),
|
|
57
61
|
];
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
columns: {
|
|
61
|
-
1: { width: 50, wrapWord: true },
|
|
62
|
-
},
|
|
63
|
-
drawHorizontalLine(lineIndex, rowCount) {
|
|
64
|
-
return lineIndex === 0 || lineIndex === 1 || lineIndex === rowCount;
|
|
65
|
-
},
|
|
66
|
-
};
|
|
67
|
-
this.log(table(tableRows, config));
|
|
62
|
+
this.log();
|
|
63
|
+
this.log(renderKeyValueTable(tableRows));
|
|
68
64
|
}
|
|
69
65
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { ScCommand } from '../../../sc-command.js';
|
|
2
|
+
import { EventBrokerServiceDetail } from '../../../types/broker.js';
|
|
3
|
+
export default class MissionctrlBrokerList extends ScCommand<typeof MissionctrlBrokerList> {
|
|
3
4
|
static args: {};
|
|
4
5
|
static description: string;
|
|
5
6
|
static examples: string[];
|
|
@@ -9,5 +10,5 @@ export default class MissionctrlBrokerList extends Command {
|
|
|
9
10
|
pageSize: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
11
|
sort: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
12
|
};
|
|
12
|
-
run(): Promise<
|
|
13
|
+
run(): Promise<EventBrokerServiceDetail[]>;
|
|
13
14
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { ScCommand } from '../../../sc-command.js';
|
|
3
|
+
import { renderTable } from '../../../util/internal.js';
|
|
3
4
|
import { ScConnection } from '../../../util/sc-connection.js';
|
|
4
|
-
export default class MissionctrlBrokerList extends
|
|
5
|
+
export default class MissionctrlBrokerList extends ScCommand {
|
|
5
6
|
static args = {};
|
|
6
7
|
static description = `Get a listing of event broker services.
|
|
7
8
|
|
|
@@ -61,6 +62,8 @@ Token Permissions: [ \`mission_control:access\` **or** \`services:get\` **or** \
|
|
|
61
62
|
];
|
|
62
63
|
// Display results as a table
|
|
63
64
|
this.log();
|
|
64
|
-
this.log(
|
|
65
|
+
this.log(renderTable(brokerArray));
|
|
66
|
+
// Return raw json if --json flag is set
|
|
67
|
+
return resp.data;
|
|
65
68
|
}
|
|
66
69
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ScCommand } from '../../../sc-command.js';
|
|
2
|
+
import { EventBrokerOperationDetail } from '../../../types/broker.js';
|
|
3
|
+
export default class MissionctrlBrokerOpstatus extends ScCommand<typeof MissionctrlBrokerOpstatus> {
|
|
4
|
+
static args: {};
|
|
5
|
+
static description: string;
|
|
6
|
+
static examples: string[];
|
|
7
|
+
static flags: {
|
|
8
|
+
'broker-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
'show-progress': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
'wait-ms': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
};
|
|
13
|
+
run(): Promise<EventBrokerOperationDetail[]>;
|
|
14
|
+
private pollAllOperationStatus;
|
|
15
|
+
}
|