environments

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateEnvironmentRequest

type CreateEnvironmentRequest struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	// OfflineCleanupTimeoutHours is the amount of time (in hours) to wait until
	// offline targets are automatically removed by BastionZero.
	OfflineCleanupTimeoutHours uint `json:"offlineCleanupTimeoutHours"`
}

CreateEnvironmentRequest is used to create a new environment

type CreateEnvironmentResponse

type CreateEnvironmentResponse struct {
	ID string `json:"id"`
}

CreateEnvironmentResponse is the response returned if an environment is successfully created

type Environment

type Environment struct {
	ID                         string          `json:"id"`
	OrganizationID             string          `json:"organizationId"`
	IsDefault                  bool            `json:"isDefault"`
	Name                       string          `json:"name"`
	Description                string          `json:"description"`
	TimeCreated                types.Timestamp `json:"timeCreated"`
	OfflineCleanupTimeoutHours uint            `json:"offlineCleanupTimeoutHours"`
	Targets                    []TargetSummary `json:"targets"`
}

Environment is a collection of targets

type EnvironmentsService

type EnvironmentsService client.Service

EnvironmentsService handles communication with the environments endpoints of the BastionZero API.

BastionZero API docs: https://cloud.bastionzero.com/api/#tag--Environments

func (*EnvironmentsService) CreateEnvironment

CreateEnvironment creates a new environment.

BastionZero API docs: https://cloud.bastionzero.com/api/#post-/api/v2/environments

func (*EnvironmentsService) DeleteEnvironment

func (s *EnvironmentsService) DeleteEnvironment(ctx context.Context, environmentID string) (*http.Response, error)

DeleteEnvironment deletes the specified environment.

BastionZero API docs: https://cloud.bastionzero.com/api/#delete-/api/v2/environments/-id-

func (*EnvironmentsService) GetEnvironment

func (s *EnvironmentsService) GetEnvironment(ctx context.Context, environmentID string) (*Environment, *http.Response, error)

GetEnvironment fetches the specified environment.

BastionZero API docs: https://cloud.bastionzero.com/api/#get-/api/v2/environments/-id-

func (*EnvironmentsService) ListEnvironments

func (s *EnvironmentsService) ListEnvironments(ctx context.Context) ([]Environment, *http.Response, error)

ListEnvironments lists all environments.

BastionZero API docs: https://cloud.bastionzero.com/api/#get-/api/v2/environments

func (*EnvironmentsService) ModifyEnvironment

func (s *EnvironmentsService) ModifyEnvironment(ctx context.Context, environmentID string, request *ModifyEnvironmentRequest) (*http.Response, error)

ModifyEnvironment updates an environment.

BastionZero API docs: https://cloud.bastionzero.com/api/#patch-/api/v2/environments/-id-

type ModifyEnvironmentRequest

type ModifyEnvironmentRequest struct {
	Name        *string `json:"name,omitempty"`
	Description *string `json:"description,omitempty"`
	// OfflineCleanupTimeoutHours is the amount of time (in hours) to wait until
	// offline targets are automatically removed by BastionZero.
	OfflineCleanupTimeoutHours *uint `json:"offlineCleanupTimeoutHours,omitempty"`
}

ModifyEnvironmentRequest is used to modify an environment

type TargetSummary

type TargetSummary struct {
	ID   string                `json:"id"`
	Type targettype.TargetType `json:"targetType"`
}

TargetSummary describes a target associated with an environment

Jump to

Keyboard shortcuts

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