Skip to content

Commit 4053aae

Browse files
author
Paola Nicosia
committed
Update documentation for itd command
1 parent 99ef8a3 commit 4053aae

File tree

5 files changed

+110
-14
lines changed

5 files changed

+110
-14
lines changed

docs/10_overview.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ The `miactl` CLI functionalities can be summarized within its main subcommands:
1313
- `project`: view and manage the Projects of a specific Company
1414
- `serviceaccount`: create new service accounts for your Company
1515
- `runtime`: view and manage resources that are deployed on the runtime associated with the Project
16-
- `marketplace`: view and manage the Marketplace resources that are available for your Company
16+
- `marketplace`: view and manage the Marketplace resources that are available for your Company (deprecated from Mia-Platform Console v14.0.0).
17+
- `catalog`: view and manage the Marketplace resources that are available for your Company. It replaces the `marketplace` command. Available from Mia-Platform Console v14.0.0.
18+
- `itd`: view and manage Item Type Definitions. Available from Mia-Platform Console v14.1.0.
1719

1820
## Guides
1921

docs/30_commands.md

Lines changed: 101 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -532,11 +532,11 @@ miactl project describe [flags]
532532

533533
Flags available for this command:
534534

535-
- `--project-id`: required. The ID of the Application Project to describe
536-
- `--revision`: for projects using Enhanced Workflow. The revision of the Application Project to describe
537-
- `--version`: for projects using Enhanced Workflow. The version of the Application Project to describe
538-
- `--branch`: for projects using the standard workflow. The branch of the Application Project to describe
539-
- `--tag`: for projects using the standard workflow. The tag of the Application Project to describe
535+
- `--project-id`: required. The ID of the Application Project to describe
536+
- `--revision`: for projects using Enhanced Workflow. The revision of the Application Project to describe
537+
- `--version`: for projects using Enhanced Workflow. The version of the Application Project to describe
538+
- `--branch`: for projects using the standard workflow. The branch of the Application Project to describe
539+
- `--tag`: for projects using the standard workflow. The tag of the Application Project to describe
540540
- `--output` or `-o`: output format. Allowed values: json, yaml (default is "json")
541541

542542
### apply
@@ -1215,7 +1215,7 @@ List Catalog items
12151215
12161216
#### Synopsis
12171217
1218-
List the Catalog items that the current user can access.
1218+
List the Catalog items that the current user can access. Results are paginated and by default only the first page is shown.
12191219
12201220
#### Usage
12211221
@@ -1225,7 +1225,8 @@ miactl catalog list --company-id company-id [FLAGS]...
12251225
12261226
#### Flags
12271227
1228-
- `--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.
1228+
- `--public` - if this flag is set, the command fetches not only the items from the requested company, but also the public item type definitions from other companies.
1229+
- `--page` - specify the page to fetch, default is 1
12291230
12301231
### get
12311232
@@ -1320,3 +1321,96 @@ The flag `--item-id` or `-i` accepts the `itemId` of the Item.
13201321
```bash
13211322
miactl catalog list-versions -i some-item
13221323
```
1324+
1325+
## item type definition
1326+
1327+
:::info
1328+
This command and its subcommands use APIs that are only available from Mia-Platform Console v14.1.0.
1329+
:::
1330+
1331+
View and manage Item Type Definitions
1332+
1333+
All the subcommands inherit the following flags:
1334+
1335+
```sh
1336+
--auth-name string the name of the miactl auth to use
1337+
--certificate-authority string path to a cert file for the certificate authority for the selected endpoint
1338+
--company-id string the ID of the Company
1339+
-c, --config string path to the config file default to $HOME/miactl/config
1340+
--context string the name of the miactl context to use
1341+
--endpoint string the address and port of the Mia-Platform Console server
1342+
--insecure-skip-tls-verify if true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
1343+
-v --verbose increase the verbosity of the cli output
1344+
```
1345+
1346+
### list
1347+
1348+
List Item Type Definitions
1349+
1350+
#### Synopsis
1351+
1352+
List the Item Type Definitions that the current user can access. Results are paginated and by default only the first page is shown.
1353+
1354+
#### Usage
1355+
1356+
```sh
1357+
miactl itd list --company-id company-id [FLAGS]...
1358+
```
1359+
1360+
#### Flags
1361+
1362+
- `--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.
1363+
- `--page` - specify the page to fetch, default is 1
1364+
1365+
### get
1366+
1367+
Get a Catalog item
1368+
1369+
#### Synopsis
1370+
1371+
Get an Item Type Definition
1372+
1373+
You need to specify the name and its tenant namespace, via the respective flags. The company-id flag can be omitted if it is already set in the context.
1374+
1375+
```bash
1376+
miactl itd get --tenantId tenantId --name name
1377+
```
1378+
1379+
### delete
1380+
1381+
Delete an Item Type Definition
1382+
1383+
#### Synopsis
1384+
1385+
Delete an Item Type Definition
1386+
1387+
You need to specify the companyId and the item type definition name via the respective flags (recommended). The company-id flag can be omitted if it is already set in the context.
1388+
1389+
```bash
1390+
miactl itd delete --name name --version version ...
1391+
```
1392+
1393+
### put
1394+
1395+
Create or update an Item Type Definition
1396+
1397+
#### Synopsis
1398+
1399+
Create or update an Item Type Definition.
1400+
1401+
You need to specify the flag --file or -f that accepts a file, and companyId. Supported formats are JSON (.json files) and YAML (.yaml or .yml files).
1402+
1403+
```bash
1404+
miactl itd put -f file-path
1405+
```
1406+
1407+
#### Examples
1408+
1409+
```bash
1410+
1411+
# Create the item type definition in file myFantasticPluginDefinition.json located in the current directory
1412+
miactl itd put --file myFantasticPluginDefinition.json
1413+
1414+
# Create the item type definition in file myFantasticPluginDefinition.json, with relative path
1415+
miactl itd put --file ./path/to/myFantasticPluginDefinition.json
1416+
```

internal/cmd/catalog/list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const (
3434
3535
you can also specify the following flags:
3636
- --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.
37-
- -- page - specify the page to fetch, default is 1
37+
- --page - specify the page to fetch, default is 1
3838
`
3939
listCmdUse = "list --company-id company-id"
4040
)

internal/cmd/item-type-definition/delete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const (
4040
4141
You need to specify the companyId and the item type definition name via the respective flags (recommended). The company-id flag can be omitted if it is already set in the context.
4242
`
43-
deleteCmdUse = "delete { --name name --version version }"
43+
deleteCmdUse = "delete --name name --version version"
4444
)
4545

4646
func DeleteCmd(options *clioptions.CLIOptions) *cobra.Command {

internal/cmd/item-type-definition/put.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ const (
5151
Supported formats are JSON (.json files) and YAML (.yaml or .yml files). The company-id flag can be omitted if it is already set in the context.`
5252

5353
putExample = `
54-
# Create the item type definition in file myFantasticGoTemplate.json located in the current directory
55-
miactl catalog put --file myFantasticGoTemplate.json
54+
# Create the item type definition in file myFantasticPluginDefinition.json located in the current directory
55+
miactl catalog put --file myFantasticPluginDefinition.json
5656
57-
# Create the item type definition in file myFantasticGoTemplate.json, with relative path
58-
miactl catalog put --file ./path/to/myFantasticGoTemplate.json`
57+
# Create the item type definition in file myFantasticPluginDefinition.json, with relative path
58+
miactl catalog put --file ./path/to/myFantasticPluginDefinition.json`
5959

6060
putCmdUse = "put { --file file-path }"
6161
)

0 commit comments

Comments
 (0)