Files
sailpoint-cli/cmd/transform/list.go
luke-hagar-sp c4c15361d6 VA Log Configuration Commands, etc...
* 🪵 Implemented an Improved Global logger solution
* 🥈 Removed duplicate APIClient inits
* 🐛 Corrected an issue with the payload for spconfig import
* 🚤 Significantly improved the Speed of Parsing log files with sail va parse
* 🎢 Improved error handling for all VA commands
* 💻 Added a VA List Command, along with Get and Set commands for VA Log Config
2023-05-16 09:01:34 -05:00

38 lines
885 B
Go

// Copyright (c) 2021, SailPoint Technologies, Inc. All rights reserved.
package transform
import (
"github.com/sailpoint-oss/sailpoint-cli/internal/config"
"github.com/sailpoint-oss/sailpoint-cli/internal/transform"
"github.com/spf13/cobra"
)
func newListCmd() *cobra.Command {
return &cobra.Command{
Use: "list",
Short: "List all Transforms in IdentityNow",
Long: "\nList all Transforms in IdentityNow\n\n",
Example: "sail transform list | sail transform ls",
Aliases: []string{"ls"},
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
apiClient, err := config.InitAPIClient()
if err != nil {
return err
}
transforms, err := transform.GetTransforms(*apiClient)
if err != nil {
return err
}
err = transform.ListTransforms(transforms)
if err != nil {
return err
}
return nil
},
}
}