Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CreateCmd = &cobra.Command{ Use: "create", Short: "Create new post-install script", Long: `This endpoint allows you to add a new post-install script to your account, which can then be used run after the installation of a virtual machine instance. The script contents will be saved to the file /post_install with executable attribute set and will be executed once virtual machine is installed. The output of the script will be redirected to /post_install.log. Maximum script size is 48KB.`, Run: func(cmd *cobra.Command, args []string) { r, err := api.Request().VPSCreatePostInstallScriptV1WithResponse(context.TODO(), postInstallScriptCreateRequest(cmd, args)) if err != nil { log.Fatal(err) } output.Format(cmd, r.Body, r.StatusCode()) }, }
View Source
var DeleteCmd = &cobra.Command{ Use: "delete <post-install script ID>", Short: "Delete post-install script", Long: `This endpoint deletes a post-install script from your account.`, Args: cobra.MatchAll(cobra.ExactArgs(1)), Run: func(cmd *cobra.Command, args []string) { r, err := api.Request().VPSDeleteAPostInstallScriptV1WithResponse(context.TODO(), utils.StringToInt(args[0])) if err != nil { log.Fatal(err) } output.Format(cmd, r.Body, r.StatusCode()) }, }
View Source
var GetCmd = &cobra.Command{ Use: "get <post-install script ID>", Short: "Get post-install script", Long: `This endpoint retrieves post-install script by its ID.`, Args: cobra.MatchAll(cobra.ExactArgs(1)), Run: func(cmd *cobra.Command, args []string) { r, err := api.Request().VPSGetPostInstallScriptV1WithResponse(context.TODO(), utils.StringToInt(args[0])) if err != nil { log.Fatal(err) } output.Format(cmd, r.Body, r.StatusCode()) }, }
View Source
var GroupCmd = &cobra.Command{
Use: "post-install-scripts",
Short: "Post-install script management",
Long: `This category allows you to create, update, delete, and retrieve scripts that can be used for automated
tasks after the operating system installation.
Use case includes setting up software, configuring settings, or running custom commands.`,
}
View Source
var ListCmd = &cobra.Command{ Use: "list", Short: "Get post-install script list", Long: `This endpoint retrieves a list of post-install scripts associated with your account.`, Run: func(cmd *cobra.Command, args []string) { r, err := api.Request().VPSGetPostInstallScriptListV1WithResponse(context.TODO(), listRequestParameters(cmd)) if err != nil { log.Fatal(err) } output.Format(cmd, r.Body, r.StatusCode()) }, }
View Source
var UpdateCmd = &cobra.Command{ Use: "update <post-install script ID>", Short: "Update post-install script", Long: `This endpoint updates a specific post-install script.`, Args: cobra.MatchAll(cobra.ExactArgs(1)), Run: func(cmd *cobra.Command, args []string) { r, err := api.Request().VPSUpdatePostInstallScriptV1WithResponse(context.TODO(), utils.StringToInt(args[0]), postInstallScriptUpdateRequest(cmd, args)) if err != nil { log.Fatal(err) } output.Format(cmd, r.Body, r.StatusCode()) }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.