locations

package
Version: v1.8.4 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CloudPlatforms = struct {
	Alibaba        CloudPlatform
	AmaconEC2      CloudPlatform
	Azure          CloudPlatform
	DynatraceCloud CloudPlatform
	GoogleCloud    CloudPlatform
	Interoute      CloudPlatform
	Other          CloudPlatform
	Undefined      CloudPlatform
}{
	CloudPlatform("ALIBABA"),
	CloudPlatform("AMAZON_EC2"),
	CloudPlatform("AZURE"),
	CloudPlatform("DYNATRACE_CLOUD"),
	CloudPlatform("GOOGLE_CLOUD"),
	CloudPlatform("INTEROUTE"),
	CloudPlatform("OTHER"),
	CloudPlatform("UNDEFINED"),
}
View Source
var LocationTypes = struct {
	Public  LocationType
	Private LocationType
	Cluster LocationType
}{
	LocationType("PUBLIC"),
	LocationType("PRIVATE"),
	LocationType("CLUSTER"),
}
View Source
var Stages = struct {
	Beta       Stage
	ComingSoon Stage
	GA         Stage
}{
	Stage("BETA"),
	Stage("COMING_SOON"),
	Stage("GA"),
}
View Source
var Statuses = struct {
	Disabled Status
	Enabled  Status
	Hidden   Status
}{
	Status("DISABLED"),
	Status("ENABLED"),
	Status("HIDDEN"),
}

Functions

func DataSource

func DataSource() *schema.Resource

func DataSourceRead

func DataSourceRead(d *schema.ResourceData, m interface{}) error

func UniqueDataSource

func UniqueDataSource() *schema.Resource

func UniqueDataSourceRead

func UniqueDataSourceRead(d *schema.ResourceData, m interface{}) error

Types

type CloudPlatform

type CloudPlatform string

type Location

type Location struct {
	ID            string         `json:"id"`            // The unique id of the location
	Name          string         `json:"name"`          // The name of the location
	Type          LocationType   `json:"type"`          // Defines the actual set of fields depending on the value. See one of the following objects: \n\n* `PUBLIC` -> PublicSyntheticLocation \n* `PRIVATE` -> PrivateSyntheticLocation \n* `CLUSTER` -> PrivateSyntheticLocation
	Status        *Status        `json:"status"`        // The status of the location: \n\n* `ENABLED`: The location is displayed as active in the UI. You can assign monitors to the location. \n* `DISABLED`: The location is displayed as inactive in the UI. You can't assign monitors to the location. Monitors already assigned to the location will stay there and will be executed from the location. \n* `HIDDEN`: The location is not displayed in the UI. You can't assign monitors to the location. You can only set location as `HIDDEN` when no monitor is assigned to it
	CloudPlatform *CloudPlatform `json:"cloudPlatform"` // The cloud provider where the location is hosted. \n\n Only applicable to `PUBLIC` locations
	IPs           []string       `json:"ips"`           // The list of IP addresses assigned to the location. \n\n Only applicable to `PUBLIC` locations
	Stage         *Stage         `json:"stage"`         // The release stage of the location
}

func (*Location) MarshalHCL

func (me *Location) MarshalHCL() (map[string]interface{}, error)

func (*Location) Schema

func (me *Location) Schema() map[string]*hcl.Schema

type LocationCollectionElement

type LocationCollectionElement struct {
	ID            string         `json:"entityId"`      // The Dynatrace entity ID of the location
	Name          string         `json:"name"`          // The name of the location
	Type          LocationType   `json:"type"`          // The type of the location
	Status        *Status        `json:"status"`        // The status of the location: \n\n* `ENABLED`: The location is displayed as active in the UI. You can assign monitors to the location. \n* `DISABLED`: The location is displayed as inactive in the UI. You can't assign monitors to the location. Monitors already assigned to the location will stay there and will be executed from the location. \n* `HIDDEN`: The location is not displayed in the UI. You can't assign monitors to the location. You can only set location as `HIDDEN` when no monitor is assigned to it
	CloudPlatform *CloudPlatform `json:"cloudPlatform"` // The cloud provider where the location is hosted. \n\n Only applicable to `PUBLIC` locations
	IPs           []string       `json:"ips"`           // The list of IP addresses assigned to the location. \n\n Only applicable to `PUBLIC` locations
	Stage         *Stage         `json:"stage"`         // The release stage of the location

}

type LocationType

type LocationType string

type Locations

type Locations []*Location

func (*Locations) MarshalHCL

func (me *Locations) MarshalHCL() (map[string]interface{}, error)

func (Locations) Schema

func (me Locations) Schema() map[string]*hcl.Schema

type ServiceClient

type ServiceClient struct {
	// contains filtered or unexported fields
}

ServiceClient TODO: documentation

func NewService

func NewService(baseURL string, token string) *ServiceClient

NewService creates a new Service Client baseURL should look like this: "https://siz65484.live.dynatrace.com/api/config/v1" token is an API Token

func (*ServiceClient) List

func (cs *ServiceClient) List() (*SyntheticLocations, error)

ListAll TODO: documentation

type Stage

type Stage string

type Status

type Status string

type SyntheticLocations

type SyntheticLocations struct {
	Locations []LocationCollectionElement `json:"locations"` // A list of synthetic locations
}

SyntheticLocations is a list of synthetic locations

Jump to

Keyboard shortcuts

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