export

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: Apache-2.0 Imports: 116 Imported by: 0

Documentation

Index

Constants

View Source
const DYNATRACE_PROVIDER_SOURCE = "DYNATRACE_PROVIDER_SOURCE"
View Source
const DYNATRACE_PROVIDER_VERSION = "DYNATRACE_PROVIDER_VERSION"

Variables

View Source
var AllResources = map[ResourceType]ResourceDescriptor{
	ResourceTypes.Alerting: NewResourceDescriptor(
		alerting.Service,
		Dependencies.LegacyID(ResourceTypes.ManagementZoneV2),
	),
	ResourceTypes.AnsibleTowerNotification: NewResourceDescriptor(
		ansible.Service,
		Dependencies.ID(ResourceTypes.Alerting),
	).Specify(notifications.Types.AnsibleTower),
	ResourceTypes.ApplicationAnomalies: NewResourceDescriptor(application_anomalies.Service),
	ResourceTypes.ApplicationDataPrivacy: NewResourceDescriptor(
		dataprivacy.Service,
		Dependencies.ID(ResourceTypes.WebApplication),
	),
	ResourceTypes.ApplicationDetection: NewResourceDescriptor(
		detection.Service,
		Dependencies.ID(ResourceTypes.WebApplication),
	),
	ResourceTypes.ApplicationErrorRules: NewResourceDescriptor(
		errors.Service,
		Dependencies.ID(ResourceTypes.WebApplication),
	),
	ResourceTypes.AutoTag: NewResourceDescriptor(
		autotags.Service,
		Coalesce(Dependencies.Service),
		Coalesce(Dependencies.Host),
		Coalesce(Dependencies.HostGroup),
		Coalesce(Dependencies.ProcessGroup),
		Coalesce(Dependencies.ProcessGroupInstance),
	),
	ResourceTypes.AWSCredentials: NewResourceDescriptor(
		aws.Service,
		Dependencies.ID(ResourceTypes.AWSCredentials),
	),
	ResourceTypes.AzureCredentials: NewResourceDescriptor(azure.Service),
	ResourceTypes.BrowserMonitor: NewResourceDescriptor(
		browser.Service,
		Dependencies.ID(ResourceTypes.SyntheticLocation),
		Dependencies.ID(ResourceTypes.WebApplication),
		Dependencies.ID(ResourceTypes.Credentials),
	).Except(func(id string, name string) bool {
		return strings.HasPrefix(name, "Monitor synchronizing credentials with")
	}),
	ResourceTypes.CalculatedServiceMetric: NewResourceDescriptor(
		calculated_service_metrics.Service,
		Dependencies.ManagementZone,
		Dependencies.RequestAttribute,
		Dependencies.ManagementZone,
		Dependencies.Service,
		Dependencies.Host,
		Dependencies.HostGroup,
		Dependencies.ProcessGroup,
		Dependencies.ProcessGroupInstance,
	),
	ResourceTypes.CloudFoundryCredentials: NewResourceDescriptor(cloudfoundry.Service),
	ResourceTypes.CustomAnomalies: NewResourceDescriptor(
		custom_anomalies.Service,
		Dependencies.LegacyID(ResourceTypes.ManagementZoneV2),
	).Except(func(id string, name string) bool {
		return strings.HasPrefix(id, "builtin:") || strings.HasPrefix(id, "ruxit.") || strings.HasPrefix(id, "dynatrace.") || strings.HasPrefix(id, "custom.remote.python.") || strings.HasPrefix(id, "custom.python.")
	}),
	ResourceTypes.CustomAppAnomalies: NewResourceDescriptor(
		custom_app_anomalies.Service,
		Coalesce(Dependencies.DeviceApplicationMethod),
		Coalesce(Dependencies.CustomApplication),
	),
	ResourceTypes.CustomAppCrashRate: NewResourceDescriptor(
		custom_app_crash_rate.Service,
		Coalesce(Dependencies.CustomApplication),
	),
	ResourceTypes.MobileAppAnomalies: NewResourceDescriptor(
		mobile_app_anomalies.Service,
		Coalesce(Dependencies.DeviceApplicationMethod),
		Coalesce(Dependencies.MobileApplication),
	),
	ResourceTypes.MobileAppCrashRate: NewResourceDescriptor(
		mobile_app_crash_rate.Service,
		Coalesce(Dependencies.MobileApplication),
	),
	ResourceTypes.WebAppAnomalies: NewResourceDescriptor(
		web_app_anomalies.Service,
		Coalesce(Dependencies.Application),
		Coalesce(Dependencies.ApplicationMethod),
	),
	ResourceTypes.CustomService: NewResourceDescriptor(customservices.Service),
	ResourceTypes.Credentials: NewResourceDescriptor(
		vault.Service,
		Dependencies.ID(ResourceTypes.Credentials),
	),
	ResourceTypes.JSONDashboard: NewResourceDescriptor(
		jsondashboards.Service,
		Dependencies.LegacyID(ResourceTypes.ManagementZoneV2),
		Dependencies.ManagementZone,
		Dependencies.Service,
		Dependencies.ID(ResourceTypes.SLO),
		Dependencies.ID(ResourceTypes.WebApplication),
		Dependencies.ID(ResourceTypes.MobileApplication),
		Dependencies.ID(ResourceTypes.SyntheticLocation),
		Dependencies.ID(ResourceTypes.HTTPMonitor),
		Dependencies.ID(ResourceTypes.CalculatedServiceMetric),
		Dependencies.ID(ResourceTypes.BrowserMonitor),
	),
	ResourceTypes.DashboardSharing: NewResourceDescriptor(
		sharing.Service,
		Dependencies.ID(ResourceTypes.JSONDashboard),
	),
	ResourceTypes.DatabaseAnomalies:  NewResourceDescriptor(database_anomalies.Service),
	ResourceTypes.DiskEventAnomalies: NewResourceDescriptor(disk_event_anomalies.Service),
	ResourceTypes.DiskAnomaliesV2: NewResourceDescriptor(
		disk_anomalies_v2.Service,
		Coalesce(Dependencies.Host),
	),
	ResourceTypes.DiskSpecificAnomaliesV2: NewResourceDescriptor(
		disk_specific_anomalies_v2.Service,
		Coalesce(Dependencies.Disk),
	),
	ResourceTypes.EmailNotification: NewResourceDescriptor(
		email.Service,
		Dependencies.ID(ResourceTypes.Alerting),
	).Specify(notifications.Types.Email),
	ResourceTypes.FrequentIssues: NewResourceDescriptor(frequentissues.Service),
	ResourceTypes.HostAnomalies:  NewResourceDescriptor(host_anomalies.Service),
	ResourceTypes.HostAnomaliesV2: NewResourceDescriptor(
		host_anomalies_v2.Service,
		Coalesce(Dependencies.Host),
		Coalesce(Dependencies.HostGroup),
	),
	ResourceTypes.HTTPMonitor: NewResourceDescriptor(
		http.Service,
		Dependencies.ID(ResourceTypes.SyntheticLocation),
		Dependencies.ID(ResourceTypes.WebApplication),
		Dependencies.ID(ResourceTypes.Credentials),
	),
	ResourceTypes.HostNaming:   NewResourceDescriptor(host_naming.Service),
	ResourceTypes.IBMMQFilters: NewResourceDescriptor(filters.Service),
	ResourceTypes.IMSBridge:    NewResourceDescriptor(imsbridges.Service),
	ResourceTypes.JiraNotification: NewResourceDescriptor(
		jira.Service,
		Dependencies.ID(ResourceTypes.Alerting),
	).Specify(notifications.Types.Jira),
	ResourceTypes.KeyRequests: NewResourceDescriptor(
		keyrequests.Service,
		Coalesce(Dependencies.Service),
		Coalesce(Dependencies.Host),
		Coalesce(Dependencies.HostGroup),
		Coalesce(Dependencies.ProcessGroup),
		Coalesce(Dependencies.ProcessGroupInstance),
	),
	ResourceTypes.KubernetesCredentials: NewResourceDescriptor(kubernetes.Service),
	ResourceTypes.Maintenance: NewResourceDescriptor(
		v2maintenance.Service,
		Dependencies.LegacyID(ResourceTypes.ManagementZoneV2),
	),
	ResourceTypes.ManagementZoneV2: NewResourceDescriptor(v2managementzones.Service),
	ResourceTypes.MetricEvents:     NewResourceDescriptor(metricevents.Service),
	ResourceTypes.MobileApplication: NewResourceDescriptor(
		mobile.Service,
		Dependencies.ID(ResourceTypes.RequestAttribute),
	),
	ResourceTypes.MutedRequests: NewResourceDescriptor(
		mutedrequests.Service,
		Coalesce(Dependencies.Service),
	),
	ResourceTypes.NetworkZone:  NewResourceDescriptor(networkzone.Service),
	ResourceTypes.NetworkZones: NewResourceDescriptor(networkzones.Service),
	ResourceTypes.OpsGenieNotification: NewResourceDescriptor(
		opsgenie.Service,
		Dependencies.ID(ResourceTypes.Alerting),
	).Specify(notifications.Types.OpsGenie),
	ResourceTypes.PagerDutyNotification: NewResourceDescriptor(
		pagerduty.Service,
		Dependencies.ID(ResourceTypes.Alerting),
	).Specify(notifications.Types.PagerDuty),
	ResourceTypes.ProcessGroupNaming: NewResourceDescriptor(processgroup_naming.Service),
	ResourceTypes.QueueManager:       NewResourceDescriptor(queuemanagers.Service),
	ResourceTypes.RequestAttribute: NewResourceDescriptor(
		requestattributes.Service,
		Dependencies.Host,
		Dependencies.HostGroup,
		Dependencies.ProcessGroup,
		Dependencies.ProcessGroupInstance,
		Dependencies.Service,
	),
	ResourceTypes.RequestNaming: NewResourceDescriptor(
		requestnaming.Service,
		Dependencies.RequestAttribute,
	),
	ResourceTypes.ResourceAttributes: NewResourceDescriptor(resattr.Service),
	ResourceTypes.ServiceAnomalies:   NewResourceDescriptor(service_anomalies.Service),
	ResourceTypes.ServiceAnomaliesV2: NewResourceDescriptor(
		service_anomalies_v2.Service,
		Coalesce(Dependencies.ServiceMethod),
		Coalesce(Dependencies.Service),
		Coalesce(Dependencies.HostGroup),
	),
	ResourceTypes.ServiceNaming: NewResourceDescriptor(service_naming.Service),
	ResourceTypes.ServiceNowNotification: NewResourceDescriptor(
		servicenow.Service,
		Dependencies.ID(ResourceTypes.Alerting),
	).Specify(notifications.Types.ServiceNow),
	ResourceTypes.SlackNotification: NewResourceDescriptor(
		slack.Service,
		Dependencies.ID(ResourceTypes.Alerting),
	).Specify(notifications.Types.Slack),
	ResourceTypes.SLO: NewResourceDescriptor(
		slo.Service,
		Dependencies.ManagementZone,
		Dependencies.LegacyID(ResourceTypes.ManagementZoneV2),
		Dependencies.ID(ResourceTypes.CalculatedServiceMetric),
	),
	ResourceTypes.SpanAttribute:          NewResourceDescriptor(attributes.Service),
	ResourceTypes.SpanCaptureRule:        NewResourceDescriptor(capture.Service),
	ResourceTypes.SpanContextPropagation: NewResourceDescriptor(ctxprop.Service),
	ResourceTypes.SpanEntryPoint:         NewResourceDescriptor(entrypoints.Service),
	ResourceTypes.SyntheticLocation:      NewResourceDescriptor(locations.Service),
	ResourceTypes.TrelloNotification: NewResourceDescriptor(
		trello.Service,
		Dependencies.ID(ResourceTypes.Alerting),
	).Specify(notifications.Types.Trello),
	ResourceTypes.VictorOpsNotification: NewResourceDescriptor(
		victorops.Service,
		Dependencies.ID(ResourceTypes.Alerting),
	).Specify(notifications.Types.VictorOps),
	ResourceTypes.WebApplication: NewResourceDescriptor(
		web.Service,
		Dependencies.ID(ResourceTypes.RequestAttribute),
	),
	ResourceTypes.WebHookNotification: NewResourceDescriptor(
		webhook.Service,
		Dependencies.ID(ResourceTypes.Alerting),
	).Specify(notifications.Types.WebHook),
	ResourceTypes.XMattersNotification: NewResourceDescriptor(
		xmatters.Service,
		Dependencies.ID(ResourceTypes.Alerting),
	).Specify(notifications.Types.XMatters),

	ResourceTypes.MaintenanceWindow: NewResourceDescriptor(
		maintenancev1.Service,
		Dependencies.LegacyID(ResourceTypes.ManagementZoneV2),
	),
	ResourceTypes.ManagementZone: NewResourceDescriptor(managementzonesv1.Service),
	ResourceTypes.Dashboard: NewResourceDescriptor(
		dashboards.Service,
		Dependencies.LegacyID(ResourceTypes.ManagementZoneV2),
		Dependencies.ManagementZone,
		Dependencies.ID(ResourceTypes.SLO),
		Dependencies.ID(ResourceTypes.WebApplication),
		Dependencies.ID(ResourceTypes.SyntheticLocation),
	),
	ResourceTypes.Notification: NewResourceDescriptor(
		notificationsv1.Service,
		Dependencies.LegacyID(ResourceTypes.Alerting),
	),
	ResourceTypes.QueueSharingGroups: NewResourceDescriptor(queuesharinggroups.Service),
	ResourceTypes.AlertingProfile: NewResourceDescriptor(
		alertingv1.Service,
		Dependencies.LegacyID(ResourceTypes.ManagementZoneV2),
	),
	ResourceTypes.RequestNamings: NewResourceDescriptor(
		order.Service,
		Dependencies.ID(ResourceTypes.RequestNaming),
	),
	ResourceTypes.IAMUser:  NewResourceDescriptor(users.Service),
	ResourceTypes.IAMGroup: NewResourceDescriptor(groups.Service),
	ResourceTypes.DDUPool:  NewResourceDescriptor(ddupool.Service),
	ResourceTypes.ProcessGroupAnomalies: NewResourceDescriptor(
		pg_anomalies.Service,
		Coalesce(Dependencies.ProcessGroup),
		Coalesce(Dependencies.ProcessGroupInstance),
	),
	ResourceTypes.ProcessGroupAlerting: NewResourceDescriptor(
		processgroupalerting.Service,
		Coalesce(Dependencies.ProcessGroup),
	),
	ResourceTypes.DatabaseAnomaliesV2: NewResourceDescriptor(
		database_anomalies_v2.Service,
		Coalesce(Dependencies.ServiceMethod),
		Coalesce(Dependencies.Service),
		Coalesce(Dependencies.HostGroup),
	),
	ResourceTypes.ProcessMonitoringRule: NewResourceDescriptor(
		customprocessmonitoring.Service,
		Coalesce(Dependencies.HostGroup),
	),
	ResourceTypes.ProcessMonitoring: NewResourceDescriptor(
		processmonitoring.Service,
		Coalesce(Dependencies.HostGroup),
	),
	ResourceTypes.ProcessAvailability: NewResourceDescriptor(
		processavailability.Service,
		Coalesce(Dependencies.HostGroup),
		Coalesce(Dependencies.Host),
	),
	ResourceTypes.AdvancedProcessGroupDetectionRule: NewResourceDescriptor(advanceddetectionrule.Service),
	ResourceTypes.ConnectivityAlerts: NewResourceDescriptor(
		connectivityalerts.Service,
		Coalesce(Dependencies.ProcessGroup),
	),
	ResourceTypes.DeclarativeGrouping: NewResourceDescriptor(
		declarativegrouping.Service,
		Coalesce(Dependencies.Host),
		Coalesce(Dependencies.HostGroup),
	),
	ResourceTypes.HostMonitoring: NewResourceDescriptor(
		hostmonitoring.Service,
		Coalesce(Dependencies.Host),
	),
	ResourceTypes.HostProcessGroupMonitoring: NewResourceDescriptor(
		hostprocessgroupmonitoring.Service,
		Coalesce(Dependencies.Host),
		Coalesce(Dependencies.ProcessGroup),
	),
	ResourceTypes.RUMIPLocations: NewResourceDescriptor(ipmappings.Service),
	ResourceTypes.CustomAppEnablement: NewResourceDescriptor(
		rumcustomenablement.Service,
		Dependencies.ID(ResourceTypes.MobileApplication),
	),
	ResourceTypes.MobileAppEnablement: NewResourceDescriptor(
		rummobileenablement.Service,
		Dependencies.ID(ResourceTypes.MobileApplication),
	),
	ResourceTypes.WebAppEnablement: NewResourceDescriptor(
		rumwebenablement.Service,
		Dependencies.ID(ResourceTypes.WebApplication),
	),
	ResourceTypes.RUMProcessGroup: NewResourceDescriptor(
		rumprocessgroup.Service,
		Coalesce(Dependencies.ProcessGroup),
	),
}
View Source
var BlackListedResources = []ResourceType{
	ResourceTypes.MaintenanceWindow,
	ResourceTypes.ManagementZone,
	ResourceTypes.Notification,
	ResourceTypes.AlertingProfile,
	ResourceTypes.Dashboard,
	ResourceTypes.IAMUser,
	ResourceTypes.IAMGroup,

	ResourceTypes.JSONDashboard,
	ResourceTypes.DashboardSharing,

	ResourceTypes.ProcessGroupAnomalies,

	ResourceTypes.CustomAppEnablement,
}
View Source
var CleanUp = &cleanUp{finalizers: []func(){
	cache.Cleanup,
}}
View Source
var DataSourceTypes = struct {
	Service          DataSourceType
	AWSIAMExternalID DataSourceType
}{
	"dynatrace_service",
	"dynatrace_aws_iam_external",
}
View Source
var Dependencies = struct {
	ManagementZone          Dependency
	LegacyID                func(resourceType ResourceType) Dependency
	ID                      func(resourceType ResourceType) Dependency
	ServiceMethod           Dependency
	Service                 Dependency
	HostGroup               Dependency
	Host                    Dependency
	Disk                    Dependency
	ProcessGroup            Dependency
	ProcessGroupInstance    Dependency
	RequestAttribute        Dependency
	CustomApplication       Dependency
	MobileApplication       Dependency
	DeviceApplicationMethod Dependency
	Application             Dependency
	ApplicationMethod       Dependency
}{
	ManagementZone:          &mgmzdep{ResourceTypes.ManagementZoneV2},
	LegacyID:                func(resourceType ResourceType) Dependency { return &legacyID{resourceType} },
	ID:                      func(resourceType ResourceType) Dependency { return &iddep{resourceType} },
	ServiceMethod:           &entityds{"SERVICE_METHOD", "SERVICE_METHOD-[A-Z0-9]{16}", false},
	Service:                 &entityds{"SERVICE", "SERVICE-[A-Z0-9]{16}", false},
	HostGroup:               &entityds{"HOST_GROUP", "HOST_GROUP-[A-Z0-9]{16}", false},
	Host:                    &entityds{"HOST", "HOST-[A-Z0-9]{16}", false},
	Disk:                    &entityds{"DISK", "DISK-[A-Z0-9]{16}", false},
	ProcessGroup:            &entityds{"PROCESS_GROUP", "PROCESS_GROUP-[A-Z0-9]{16}", false},
	ProcessGroupInstance:    &entityds{"PROCESS_GROUP_INSTANCE", "PROCESS_GROUP_INSTANCE-[A-Z0-9]{16}", false},
	RequestAttribute:        &reqAttName{ResourceTypes.RequestAttribute},
	CustomApplication:       &entityds{"CUSTOM_APPLICATION", "CUSTOM_APPLICATION-[A-Z0-9]{16}", false},
	MobileApplication:       &entityds{"MOBILE_APPLICATION", "MOBILE_APPLICATION-[A-Z0-9]{16}", false},
	DeviceApplicationMethod: &entityds{"DEVICE_APPLICATION_METHOD", "DEVICE_APPLICATION_METHOD-[A-Z0-9]{16}", false},
	Application:             &entityds{"APPLICATION", "APPLICATION-[A-Z0-9]{16}", false},
	ApplicationMethod:       &entityds{"APPLICATION_METHOD", "APPLICATION_METHOD-[A-Z0-9]{16}", false},
}
View Source
var ModuleStati = struct {
	Untouched  ModuleStatus
	Discovered ModuleStatus
	Downloaded ModuleStatus
	Erronous   ModuleStatus
	Imported   ModuleStatus
}{
	"Untouched",
	"Discovered",
	"Downloaded",
	"Erronous",
	"Imported",
}
View Source
var ResourceStati = struct {
	Downloaded    ResourceStatus
	Erronous      ResourceStatus
	Excluded      ResourceStatus
	Discovered    ResourceStatus
	PostProcessed ResourceStatus
}{
	"Downloaded",
	"Erronous",
	"Excluded",
	"Discovered",
	"PostProcessed",
}
View Source
var ResourceTypes = struct {
	AutoTag                           ResourceType
	CustomService                     ResourceType
	RequestAttribute                  ResourceType
	ApplicationAnomalies              ResourceType
	DatabaseAnomalies                 ResourceType
	DiskEventAnomalies                ResourceType
	HostAnomalies                     ResourceType
	ServiceAnomalies                  ResourceType
	CustomAnomalies                   ResourceType
	WebApplication                    ResourceType
	MobileApplication                 ResourceType
	MaintenanceWindow                 ResourceType
	ManagementZone                    ResourceType
	SLO                               ResourceType
	SpanAttribute                     ResourceType
	SpanCaptureRule                   ResourceType
	SpanContextPropagation            ResourceType
	SpanEntryPoint                    ResourceType
	ResourceAttributes                ResourceType
	JiraNotification                  ResourceType
	WebHookNotification               ResourceType
	AnsibleTowerNotification          ResourceType
	EmailNotification                 ResourceType
	OpsGenieNotification              ResourceType
	PagerDutyNotification             ResourceType
	ServiceNowNotification            ResourceType
	SlackNotification                 ResourceType
	TrelloNotification                ResourceType
	VictorOpsNotification             ResourceType
	XMattersNotification              ResourceType
	Alerting                          ResourceType
	FrequentIssues                    ResourceType
	MetricEvents                      ResourceType
	IBMMQFilters                      ResourceType
	IMSBridge                         ResourceType
	QueueManager                      ResourceType
	KeyRequests                       ResourceType
	Maintenance                       ResourceType
	ManagementZoneV2                  ResourceType
	NetworkZones                      ResourceType
	AWSCredentials                    ResourceType
	AzureCredentials                  ResourceType
	CloudFoundryCredentials           ResourceType
	KubernetesCredentials             ResourceType
	Credentials                       ResourceType
	Dashboard                         ResourceType
	JSONDashboard                     ResourceType
	CalculatedServiceMetric           ResourceType
	HostNaming                        ResourceType
	ProcessGroupNaming                ResourceType
	ServiceNaming                     ResourceType
	NetworkZone                       ResourceType
	RequestNaming                     ResourceType
	BrowserMonitor                    ResourceType
	HTTPMonitor                       ResourceType
	DashboardSharing                  ResourceType
	ApplicationDetection              ResourceType
	ApplicationErrorRules             ResourceType
	ApplicationDataPrivacy            ResourceType
	SyntheticLocation                 ResourceType
	Notification                      ResourceType
	QueueSharingGroups                ResourceType
	AlertingProfile                   ResourceType
	RequestNamings                    ResourceType
	IAMUser                           ResourceType
	IAMGroup                          ResourceType
	ProcessGroupAnomalies             ResourceType
	DDUPool                           ResourceType
	ProcessGroupAlerting              ResourceType
	ServiceAnomaliesV2                ResourceType
	DatabaseAnomaliesV2               ResourceType
	ProcessMonitoringRule             ResourceType
	DiskAnomaliesV2                   ResourceType
	DiskSpecificAnomaliesV2           ResourceType
	HostAnomaliesV2                   ResourceType
	CustomAppAnomalies                ResourceType
	CustomAppCrashRate                ResourceType
	ProcessMonitoring                 ResourceType
	ProcessAvailability               ResourceType
	AdvancedProcessGroupDetectionRule ResourceType
	MobileAppAnomalies                ResourceType
	MobileAppCrashRate                ResourceType
	WebAppAnomalies                   ResourceType
	MutedRequests                     ResourceType
	ConnectivityAlerts                ResourceType
	DeclarativeGrouping               ResourceType
	HostMonitoring                    ResourceType
	HostProcessGroupMonitoring        ResourceType
	RUMIPLocations                    ResourceType
	CustomAppEnablement               ResourceType
	MobileAppEnablement               ResourceType
	WebAppEnablement                  ResourceType
	RUMProcessGroup                   ResourceType
}{
	"dynatrace_autotag",
	"dynatrace_custom_service",
	"dynatrace_request_attribute",
	"dynatrace_application_anomalies",
	"dynatrace_database_anomalies",
	"dynatrace_disk_anomalies",
	"dynatrace_host_anomalies",
	"dynatrace_service_anomalies",
	"dynatrace_custom_anomalies",
	"dynatrace_web_application",
	"dynatrace_mobile_application",
	"dynatrace_maintenance_window",
	"dynatrace_management_zone",
	"dynatrace_slo",
	"dynatrace_span_attribute",
	"dynatrace_span_capture_rule",
	"dynatrace_span_context_propagation",
	"dynatrace_span_entry_point",
	"dynatrace_resource_attributes",
	"dynatrace_jira_notification",
	"dynatrace_webhook_notification",
	"dynatrace_ansible_tower_notification",
	"dynatrace_email_notification",
	"dynatrace_ops_genie_notification",
	"dynatrace_pager_duty_notification",
	"dynatrace_service_now_notification",
	"dynatrace_slack_notification",
	"dynatrace_trello_notification",
	"dynatrace_victor_ops_notification",
	"dynatrace_xmatters_notification",
	"dynatrace_alerting",
	"dynatrace_frequent_issues",
	"dynatrace_metric_events",
	"dynatrace_ibm_mq_filters",
	"dynatrace_ims_bridges",
	"dynatrace_queue_manager",
	"dynatrace_key_requests",
	"dynatrace_maintenance",
	"dynatrace_management_zone_v2",
	"dynatrace_network_zones",
	"dynatrace_aws_credentials",
	"dynatrace_azure_credentials",
	"dynatrace_cloudfoundry_credentials",
	"dynatrace_k8s_credentials",
	"dynatrace_credentials",
	"dynatrace_dashboard",
	"dynatrace_json_dashboard",
	"dynatrace_calculated_service_metric",
	"dynatrace_host_naming",
	"dynatrace_processgroup_naming",
	"dynatrace_service_naming",
	"dynatrace_network_zone",
	"dynatrace_request_naming",
	"dynatrace_browser_monitor",
	"dynatrace_http_monitor",
	"dynatrace_dashboard_sharing",
	"dynatrace_application_detection_rule",
	"dynatrace_application_error_rules",
	"dynatrace_application_data_privacy",
	"dynatrace_synthetic_location",
	"dynatrace_notification",
	"dynatrace_queue_sharing_groups",
	"dynatrace_alerting_profile",
	"dynatrace_request_namings",
	"dynatrace_iam_user",
	"dynatrace_iam_group",
	"dynatrace_pg_anomalies",
	"dynatrace_ddu_pool",
	"dynatrace_pg_alerting",
	"dynatrace_service_anomalies_v2",
	"dynatrace_database_anomalies_v2",
	"dynatrace_process_monitoring_rule",
	"dynatrace_disk_anomalies_v2",
	"dynatrace_disk_specific_anomalies_v2",
	"dynatrace_host_anomalies_v2",
	"dynatrace_custom_app_anomalies",
	"dynatrace_custom_app_crash_rate",
	"dynatrace_process_monitoring",
	"dynatrace_process_availability",
	"dynatrace_process_group_detection",
	"dynatrace_mobile_app_anomalies",
	"dynatrace_mobile_app_crash_rate",
	"dynatrace_web_app_anomalies",
	"dynatrace_muted_requests",
	"dynatrace_connectivity_alerts",
	"dynatrace_declarative_grouping",
	"dynatrace_host_monitoring",
	"dynatrace_host_process_group_monitoring",
	"dynatrace_rum_ip_locations",
	"dynatrace_custom_app_enablement",
	"dynatrace_mobile_app_enablement",
	"dynatrace_web_app_enablement",
	"dynatrace_process_group_rum",
}

Functions

func ConfigureRESTLog

func ConfigureRESTLog() (err error)

func DefaultReplace

func DefaultReplace(s string, cnt int) string

func ResourceName

func ResourceName(s string, cnt int) string

func Service

func Service(credentials *settings.Credentials, resourceType ResourceType) settings.CRUDService[settings.Settings]

func ValidateResource

func ValidateResource(keyVal string) (string, string)

Types

type DataSource

type DataSource struct {
	ID   string
	Type string
	Name string
}

type DataSourceType

type DataSourceType string

func (DataSourceType) Trim

func (me DataSourceType) Trim() string

type Dependency

type Dependency interface {
	Replace(environment *Environment, s string, replacingIn ResourceType) (string, []any)
	ResourceType() ResourceType
	DataSourceType() DataSourceType
}

func Coalesce

func Coalesce(d Dependency) Dependency

type Environment

type Environment struct {
	OutputFolder string
	Credentials  *settings.Credentials
	Modules      map[ResourceType]*Module
	Flags        Flags
	ResArgs      map[string][]string
	// contains filtered or unexported fields
}

func Initialize

func Initialize() (environment *Environment, err error)

func (*Environment) CreateFile

func (me *Environment) CreateFile(name string) (*os.File, error)

func (*Environment) DataSource

func (me *Environment) DataSource(id string) *DataSource

func (*Environment) ExecuteImport

func (me *Environment) ExecuteImport() error

func (*Environment) Export

func (me *Environment) Export() (err error)

func (*Environment) Finish

func (me *Environment) Finish() (err error)

func (*Environment) GetAttentionFolder

func (me *Environment) GetAttentionFolder() string

func (*Environment) GetFlawedFolder

func (me *Environment) GetFlawedFolder() string

func (*Environment) GetFolder

func (me *Environment) GetFolder() string

func (*Environment) GetNonPostProcessedResources

func (me *Environment) GetNonPostProcessedResources() []*Resource

func (*Environment) GetResourceTypesWithDownloads

func (me *Environment) GetResourceTypesWithDownloads() []ResourceType

func (*Environment) InitialDownload

func (me *Environment) InitialDownload() error

func (*Environment) Module

func (me *Environment) Module(resType ResourceType) *Module

func (*Environment) PostProcess

func (me *Environment) PostProcess() error

func (*Environment) RefersTo

func (me *Environment) RefersTo(resource *Resource) bool

func (*Environment) WriteDataSourceFiles

func (me *Environment) WriteDataSourceFiles() (err error)

func (*Environment) WriteMainFile

func (me *Environment) WriteMainFile() error

func (*Environment) WriteProviderFiles

func (me *Environment) WriteProviderFiles() (err error)

func (*Environment) WriteResourceFiles

func (me *Environment) WriteResourceFiles() (err error)

func (*Environment) WriteVariablesFiles

func (me *Environment) WriteVariablesFiles() (err error)

type Flags

type Flags struct {
	FollowReferences    bool
	PersistIDs          bool
	FlagMigrationOutput bool
	FlagVerbose         bool
	FlagHardLinks       bool
	FlagPreviewOnly     bool
	Flat                bool
	ImportState         bool
	Exclude             bool
}

type Module

type Module struct {
	Environment *Environment
	Type        ResourceType
	Resources   map[string]*Resource
	DataSources map[string]*DataSource

	Status     ModuleStatus
	Error      error
	Descriptor *ResourceDescriptor
	Service    settings.CRUDService[settings.Settings]
	// contains filtered or unexported fields
}

func (*Module) ContainsPostProcessedResources

func (me *Module) ContainsPostProcessedResources() bool

func (*Module) CreateFile

func (me *Module) CreateFile(name string) (*os.File, error)

func (*Module) DataSource

func (me *Module) DataSource(id string) *DataSource

func (*Module) Discover

func (me *Module) Discover() error

func (*Module) Download

func (me *Module) Download(multiThreaded bool, keys ...string) (err error)

func (*Module) ExecuteImport

func (me *Module) ExecuteImport() (err error)

func (*Module) GetAttentionFolder

func (me *Module) GetAttentionFolder(relative ...bool) string

func (*Module) GetFile

func (me *Module) GetFile(name string) string

func (*Module) GetFlawedFolder

func (me *Module) GetFlawedFolder(relative ...bool) string

func (*Module) GetFolder

func (me *Module) GetFolder(relative ...bool) string

func (*Module) GetNonPostProcessedResources

func (me *Module) GetNonPostProcessedResources() []*Resource

func (*Module) GetReferencedResourceTypes

func (me *Module) GetReferencedResourceTypes() []ResourceType

func (*Module) GetResourceReferences

func (me *Module) GetResourceReferences() []*Resource

func (*Module) GetResourcesReferencedFromOtherModules

func (me *Module) GetResourcesReferencedFromOtherModules() []*Resource

func (*Module) MkdirAll

func (me *Module) MkdirAll(flawed bool) error

func (*Module) OpenFile

func (me *Module) OpenFile(name string) (file *os.File, err error)

func (*Module) RefersTo

func (me *Module) RefersTo(resource *Resource) bool

func (*Module) Resource

func (me *Module) Resource(id string) *Resource

func (*Module) WriteDataSourcesFile

func (me *Module) WriteDataSourcesFile() (err error)

func (*Module) WriteProviderFile

func (me *Module) WriteProviderFile() (err error)

func (*Module) WriteResourcesFile

func (me *Module) WriteResourcesFile() (err error)

func (*Module) WriteVariablesFile

func (me *Module) WriteVariablesFile() (err error)

type ModuleStatus

type ModuleStatus string

func (ModuleStatus) IsOneOf

func (me ModuleStatus) IsOneOf(stati ...ModuleStatus) bool

type ReplaceFunc

type ReplaceFunc func(s string, cnt int) string

type Resource

type Resource struct {
	ID                   string
	LegacyID             string
	Name                 string
	UniqueName           string
	Type                 ResourceType
	Module               *Module
	Status               ResourceStatus
	Error                error
	ResourceReferences   []*Resource
	DataSourceReferences []*DataSource
	OutputFileAbs        string
	Flawed               bool
}

func (*Resource) CreateFile

func (me *Resource) CreateFile() (*os.File, error)

func (*Resource) CreateFlawedFile

func (me *Resource) CreateFlawedFile() (*os.File, error)

func (*Resource) Download

func (me *Resource) Download() error

func (*Resource) GetAttentionFile

func (me *Resource) GetAttentionFile() string

func (*Resource) GetFile

func (me *Resource) GetFile() string

func (*Resource) GetFileName

func (me *Resource) GetFileName() string

func (*Resource) GetResourceReferences

func (me *Resource) GetResourceReferences() []*Resource

func (*Resource) PostProcess

func (me *Resource) PostProcess() error

func (*Resource) ReadFile

func (me *Resource) ReadFile() ([]byte, error)

func (*Resource) RefersTo

func (me *Resource) RefersTo(other *Resource) bool

func (*Resource) SetName

func (me *Resource) SetName(name string) *Resource

type ResourceDescriptor

type ResourceDescriptor struct {
	Dependencies []Dependency
	Service      func(credentials *settings.Credentials) settings.CRUDService[settings.Settings]
	// contains filtered or unexported fields
}

func NewResourceDescriptor

func NewResourceDescriptor[T settings.Settings](fn func(credentials *settings.Credentials) settings.CRUDService[T], dependencies ...Dependency) ResourceDescriptor

func (ResourceDescriptor) Except

func (me ResourceDescriptor) Except(except func(id string, name string) bool) ResourceDescriptor

func (ResourceDescriptor) NewSettings

func (me ResourceDescriptor) NewSettings() settings.Settings

func (ResourceDescriptor) Specify

type ResourceStatus

type ResourceStatus string

func (ResourceStatus) IsOneOf

func (me ResourceStatus) IsOneOf(stati ...ResourceStatus) bool

type ResourceType

type ResourceType string

func (ResourceType) Trim

func (me ResourceType) Trim() string

type UniqueNamer

type UniqueNamer interface {
	Name(string) string
	Replace(ReplaceFunc) UniqueNamer
}

func NewUniqueNamer

func NewUniqueNamer() UniqueNamer

Jump to

Keyboard shortcuts

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