delete

package
v2.19.0-rc.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DeleteCmd = &cobra.Command{
	Use:   "delete",
	Short: "Delete Aperture Policies from Aperture Cloud",
	Long: `
Use this command to delete the Aperture Policies from Aperture Cloud.`,
	SilenceErrors: true,
	PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
		if policyName == "" {
			return errors.New("policy name is required")
		}

		var err error
		err = controller.PreRunE(cmd, args)
		if err != nil {
			return fmt.Errorf("failed to run controller pre-run: %w", err)
		}

		client, err = controller.CloudPolicyClient()
		if err != nil {
			return fmt.Errorf("failed to get controller client: %w", err)
		}
		return nil
	},
	PersistentPostRun: controller.PostRun,
}

DeleteCmd is the command to delete a policy from the cluster.

View Source
var DeletePolicyCmd = &cobra.Command{
	Use:           "policy",
	Short:         "Delete Aperture Policy from the Aperture Cloud Controller",
	Long:          `Use this command to delete the Aperture Policy from the Aperture Cloud Controller.`,
	SilenceErrors: true,
	Example:       `aperturectl cloud delete policy --policy=rate-limiting --controller ORGANIZATION_NAME.app.fluxninja.com:443 --api-key PERSONAL_API_KEY`,
	RunE: func(_ *cobra.Command, _ []string) error {
		return deletePolicy()
	},
}

DeletePolicyCmd is the command to delete a policy from the Aperture Cloud Controller.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL