Skip to content

Commit bccea68

Browse files
author
Paola Nicosia
committed
feat: doc
1 parent 4281e19 commit bccea68

File tree

1 file changed

+137
-0
lines changed

1 file changed

+137
-0
lines changed

docs/30_commands.md

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,6 +1002,10 @@ Available flags for the command:
10021002

10031003
## marketplace
10041004

1005+
:::warning
1006+
This command and its subcommands are deprecated from v14.0.0 Mia-Platform Console. Please use [catalog](#catalog) command instead.
1007+
:::
1008+
10051009
View and manage Marketplace items
10061010

10071011
All the subcommands inherit the following flags:
@@ -1140,3 +1144,136 @@ The flag `--item-id` or `-i` accepts the `itemId` of the Item.
11401144
```bash
11411145
miactl marketplace list-versions -i some-item
11421146
```
1147+
1148+
## catalog
1149+
1150+
:::info
1151+
This command and its subcommands are available from v14.0.0 Mia-Plaftorm Console. If you are using a previous version, use [marketplace](#marketplace) instead.
1152+
:::
1153+
1154+
View and manage Catalog items
1155+
1156+
All the subcommands inherit the following flags:
1157+
1158+
```sh
1159+
--auth-name string the name of the miactl auth to use
1160+
--certificate-authority string path to a cert file for the certificate authority for the selected endpoint
1161+
--company-id string the ID of the Company
1162+
-c, --config string path to the config file default to $HOME/miactl/config
1163+
--context string the name of the miactl context to use
1164+
--endpoint string the address and port of the Mia-Platform Console server
1165+
--insecure-skip-tls-verify if true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
1166+
-v --verbose increase the verbosity of the cli output
1167+
```
1168+
1169+
### list
1170+
1171+
List Catalog items
1172+
1173+
#### Synopsis
1174+
1175+
List the Catalog items that the current user can access.
1176+
1177+
#### Usage
1178+
1179+
```sh
1180+
miactl catalog list --company-id company-id [FLAGS]...
1181+
```
1182+
1183+
#### Flags
1184+
1185+
- `--public` - if this flag is set, the command fetches not only the items from the requested company, but also the public Catalog items from other companies.
1186+
1187+
### get
1188+
1189+
Get a Catalog item
1190+
1191+
#### Synopsis
1192+
1193+
Get a single Catalog item
1194+
1195+
You need to specify the companyId, itemId and version, via the respective flags (recommended). The company-id flag can be omitted if it is already set in the context.
1196+
1197+
```bash
1198+
miactl catalog get { --item-id item-id --version version } ...
1199+
```
1200+
1201+
### delete
1202+
1203+
Delete a Catalog item
1204+
1205+
#### Synopsis
1206+
1207+
Delete a single Catalog item
1208+
1209+
You need to specify the companyId, itemId and version, via the respective flags (recommended). The company-id flag can be omitted if it is already set in the context.
1210+
1211+
```bash
1212+
miactl catalog delete { --item-id item-id --version version } ...
1213+
```
1214+
1215+
### apply
1216+
1217+
Create or update Catalog items
1218+
1219+
#### Synopsis
1220+
1221+
Create or update one or more Catalog items.
1222+
1223+
The flag -f accepts either files or directories. In case of directories, it explores them recursively.
1224+
1225+
Supported formats are JSON (.json files) and YAML (.yaml or .yml files).
1226+
1227+
The file can contain an image object with the following format:
1228+
1229+
```json
1230+
"image": {
1231+
"localPath": "./someImage.png"
1232+
}
1233+
```
1234+
1235+
The localPath can be absolute or relative to the file location.
1236+
The image will be uploaded along with the Marketplace item.
1237+
Before being applied, the "image" key will be replaced with the "imageUrl" referring to the uploaded image.
1238+
You can retrieve the updated item with the "get" command.
1239+
1240+
You can also specify the "supportedByImage" in a similar way.
1241+
1242+
Be aware that the presence of both "image" and "imageUrl" and/or of both "supportedByImage" and "supportedByImageUrl" is ambiguous and raises an error.
1243+
1244+
```bash
1245+
miactl catalog apply { -f file-path }... } [flags]
1246+
```
1247+
1248+
#### Examples
1249+
1250+
```bash
1251+
1252+
# Apply the configuration of the file myFantasticGoTemplate.json located in the current directory to the Catalog
1253+
miactl catalog apply -f myFantasticGoTemplate.json
1254+
1255+
# Apply the configurations in myFantasticGoTemplate.json and myFantasticNodeTemplate.yml to the Catalog, with relative paths
1256+
miactl catalog apply -f ./path/to/myFantasticGoTemplate.json -f ./path/to/myFantasticNodeTemplate.yml
1257+
1258+
# Apply all the valid configuration files in the directory myFantasticGoTemplates to the Catalog
1259+
miactl catalog apply -f myFantasticGoTemplates
1260+
```
1261+
1262+
#### Options
1263+
1264+
```bash
1265+
-f, --file stringArray paths to JSON/YAML files or folder of files containing a Marketplace item definition
1266+
-h, --help help for apply
1267+
```
1268+
1269+
### list-versions
1270+
1271+
List all the available versions of a specific Catalog item.
1272+
1273+
#### Synopsis
1274+
1275+
The flag `--item-id` or `-i` accepts the `itemId` of the Item.
1276+
1277+
```bash
1278+
miactl catalog list-versions -i some-item
1279+
```

0 commit comments

Comments
 (0)