Documentation ¶
Index ¶
- Variables
- func Create(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics
- func DataSource() *schema.Resource
- func DataSourceRead(d *schema.ResourceData, m interface{}) error
- func Delete(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics
- func NewResourceService(m interface{}) *api.ServiceClient
- func Read(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics
- func Resource() *schema.Resource
- func UniqueDataSource() *schema.Resource
- func UniqueDataSourceRead(d *schema.ResourceData, m interface{}) error
- func Update(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics
- type CloudPlatform
- type Location
- type LocationCollectionElement
- type LocationType
- type Locations
- type ServiceClient
- type Stage
- type Status
- type SyntheticLocations
Constants ¶
This section is empty.
Variables ¶
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"), }
var LocationTypes = struct { Public LocationType Private LocationType Cluster LocationType }{ LocationType("PUBLIC"), LocationType("PRIVATE"), LocationType("CLUSTER"), }
Functions ¶
func Create ¶ added in v1.15.0
func Create(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics
Create expects the configuration within the given ResourceData and sends it to the Dynatrace Server in order to create that resource
func DataSource ¶
func DataSourceRead ¶
func DataSourceRead(d *schema.ResourceData, m interface{}) error
func Delete ¶ added in v1.15.0
func Delete(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics
Delete the configuration
func NewResourceService ¶ added in v1.15.0
func NewResourceService(m interface{}) *api.ServiceClient
func Read ¶ added in v1.15.0
func Read(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics
Read queries the Dynatrace Server for the configuration
func Resource ¶ added in v1.15.0
Resource produces terraform resource definition for Management Zones
func UniqueDataSource ¶
func UniqueDataSourceRead ¶
func UniqueDataSourceRead(d *schema.ResourceData, m interface{}) error
func Update ¶ added in v1.15.0
func Update(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics
Update expects the configuration within the given ResourceData and send them to the Dynatrace Server in order to update that resource
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 ¶
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 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
func (*ServiceClient) ListInterface ¶ added in v1.15.0
func (cs *ServiceClient) ListInterface() (interface{}, error)
type SyntheticLocations ¶
type SyntheticLocations struct {
Locations []LocationCollectionElement `json:"locations"` // A list of synthetic locations
}
SyntheticLocations is a list of synthetic locations