parentenvironments

package
v2.86.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteByID

func DeleteByID(client newclient.Client, spaceID string, ID string) error

DeleteByID deletes the parent environment based on the ID provided as input.

Types

type AutomaticDeprovisioningRule

type AutomaticDeprovisioningRule struct {
	ExpiryDays  int `json:"ExpiryDays,omitempty"`
	ExpiryHours int `json:"ExpiryHours,omitempty"`
}

AutomaticDeprovisioningRule defines the rule for automatic deprovisioning.

type ParentEnvironment

type ParentEnvironment struct {
	Name                        string                       `json:"Name" validate:"required"`
	SpaceID                     string                       `json:"SpaceId" validate:"required"`
	Description                 string                       `json:"Description,omitempty"`
	Slug                        string                       `json:"Slug,omitempty"`
	UseGuidedFailure            bool                         `json:"UseGuidedFailure"`
	AutomaticDeprovisioningRule *AutomaticDeprovisioningRule `json:"AutomaticDeprovisioningRule,omitempty"`
	ID                          string                       `json:"Id,omitempty"`
	SortOrder                   int                          `json:"SortOrder"`
}

ParentEnvironment represents a parent environment in Octopus Deploy.

func Add

func Add(client newclient.Client, parentEnvironment *ParentEnvironment) (*ParentEnvironment, error)

Add creates a new parent environment.

func GetByID

func GetByID(client newclient.Client, spaceID string, ID string) (*ParentEnvironment, error)

GetByID returns the parent environment that matches the input ID. If one cannot be found, it returns nil and an error.

func NewParentEnvironment

func NewParentEnvironment(name string, spaceID string) *ParentEnvironment

NewParentEnvironment creates and initializes a parent environment.

func Update

func Update(client newclient.Client, parentEnvironment *ParentEnvironment) (*ParentEnvironment, error)

Update updates an existing parent environment.

func (*ParentEnvironment) Validate

func (p *ParentEnvironment) Validate() error

Validate checks the state of the parent environment and returns an error if invalid.

Jump to

Keyboard shortcuts

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