goldenstate

package
v1.72.1 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 242 Imported by: 0

Documentation

Index

Constants

View Source
const Debug = true
View Source
const DisabledMessage = "" /* 156-byte string literal not displayed */

Variables

View Source
var DeprecatedConfigServiceMap = map[export.ResourceType]ServiceFunc{
	export.ResourceTypes.SpanAttribute:      Wrap(attribute.Service),
	export.ResourceTypes.ResourceAttributes: Wrap(resourceattribute.Service),
}

Resources that are deprecated

View Source
var Enabled = os.Getenv("DYNATRACE_GOLDEN_STATE_ENABLED") == "true"

Freshly provisioned environments are pre-populated with settings that CAN get deleted

View Source
var SingleConfigServiceMap = map[export.ResourceType]ServiceFunc{
	export.ResourceTypes.RUMOverloadPrevention:   Wrap(overloadprevention.Service),
	export.ResourceTypes.TransactionStartFilters: Wrap(txstartfilters.Service),
	export.ResourceTypes.IBMMQFilters:            Wrap(mqfilters.Service),
	export.ResourceTypes.FrequentIssues:          Wrap(frequentissues.Service),
	export.ResourceTypes.NetworkZones:            Wrap(networkzones.Service),
	export.ResourceTypes.DDUPool:                 Wrap(ddupool.Service),
	export.ResourceTypes.UserExperienceScore:     Wrap(userexperiencescore.Service),

	export.ResourceTypes.BrowserMonitorPerformanceThresholds: Wrap(browserperformancethresholds.Service),

	export.ResourceTypes.HttpMonitorPerformanceThresholds: Wrap(httpperformancethresholds.Service),

	export.ResourceTypes.HttpMonitorCookies: Wrap(httpcookies.Service),

	export.ResourceTypes.SessionReplayResourceCapture: Wrap(sessionreplayresourcecapture.Service),
	export.ResourceTypes.SyntheticAvailability:        Wrap(availability.Service),

	export.ResourceTypes.BrowserMonitorOutageHandling: Wrap(browseroutagehandling.Service),

	export.ResourceTypes.HttpMonitorOutageHandling:      Wrap(httpoutagehandling.Service),
	export.ResourceTypes.CloudAppWorkloadDetection:      Wrap(workloaddetection.Service),
	export.ResourceTypes.MainframeTransactionMonitoring: Wrap(txmonitoring.Service),
	export.ResourceTypes.SLONormalization:               Wrap(normalization.Service),
	export.ResourceTypes.ActiveGateToken:                Wrap(activegatetoken.Service),
	export.ResourceTypes.AuditLog:                       Wrap(auditlog.Service),
}

Settings where only a single instance exists

View Source
var TodoServiceMap = map[export.ResourceType]ServiceFunc{
	export.ResourceTypes.Dashboard: Wrap(dashboards.Service),

	export.ResourceTypes.ContainerBuiltinRule:          Wrap(builtinmonitoringrule.Service),
	export.ResourceTypes.ContainerRule:                 Wrap(monitoringrule.Service),
	export.ResourceTypes.ContainerTechnology:           Wrap(containertechnology.Service),
	export.ResourceTypes.RemoteEnvironments:            Wrap(environment.Service),
	export.ResourceTypes.DashboardsGeneral:             Wrap(dashboardsgeneral.Service),
	export.ResourceTypes.DashboardsPresets:             Wrap(dashboardspresets.Service),
	export.ResourceTypes.LogProcessing:                 Wrap(logdpprules.Service),
	export.ResourceTypes.LogEvents:                     Wrap(logevents.Service),
	export.ResourceTypes.LogTimestamp:                  Wrap(timestampconfiguration.Service),
	export.ResourceTypes.LogCustomAttribute:            Wrap(logcustomattributes.Service),
	export.ResourceTypes.LogSensitiveDataMasking:       Wrap(sensitivedatamasking.Service),
	export.ResourceTypes.LogStorage:                    Wrap(logstoragesettings.Service),
	export.ResourceTypes.LogBuckets:                    Wrap(logbucketsrules.Service),
	export.ResourceTypes.LogSecurityContext:            Wrap(logsecuritycontextrules.Service),
	export.ResourceTypes.EULASettings:                  Wrap(eulasettings.Service),
	export.ResourceTypes.APIDetectionRules:             Wrap(apidetection.Service),
	export.ResourceTypes.ServiceExternalWebRequest:     Wrap(externalwebrequest.Service),
	export.ResourceTypes.ServiceExternalWebService:     Wrap(externalwebservice.Service),
	export.ResourceTypes.ServiceFullWebRequest:         Wrap(fullwebrequest.Service),
	export.ResourceTypes.ServiceFullWebService:         Wrap(fullwebservice.Service),
	export.ResourceTypes.DashboardsAllowlist:           Wrap(dashboardsallowlist.Service),
	export.ResourceTypes.FailureDetectionParameters:    Wrap(envparameters.Service),
	export.ResourceTypes.FailureDetectionRules:         Wrap(envrules.Service),
	export.ResourceTypes.LogOneAgent:                   Wrap(logagentconfiguration.Service),
	export.ResourceTypes.IssueTracking:                 Wrap(issuetracking.Service),
	export.ResourceTypes.GeolocationSettings:           Wrap(geosettings.Service),
	export.ResourceTypes.UserSessionCustomMetrics:      Wrap(custommetrics.Service),
	export.ResourceTypes.CustomUnits:                   Wrap(customunit.Service),
	export.ResourceTypes.DiskAnalytics:                 Wrap(diskanalytics.Service),
	export.ResourceTypes.NetworkTraffic:                Wrap(networktraffic.Service),
	export.ResourceTypes.TokenSettings:                 Wrap(tokensettings.Service),
	export.ResourceTypes.ExtensionExecutionRemote:      Wrap(eecremote.Service),
	export.ResourceTypes.K8sPVCAnomalies:               Wrap(pvc.Service),
	export.ResourceTypes.UserActionCustomMetrics:       Wrap(useractioncustommetrics.Service),
	export.ResourceTypes.WebAppJavascriptVersion:       Wrap(customrumjavascriptversion.Service),
	export.ResourceTypes.WebAppJavascriptUpdates:       Wrap(rumjavascriptupdates.Service),
	export.ResourceTypes.OpenTelemetryMetrics:          Wrap(opentelemetrymetrics.Service),
	export.ResourceTypes.ActiveGateUpdates:             Wrap(activegateupdates.Service),
	export.ResourceTypes.OneAgentDefaultVersion:        Wrap(defaultversion.Service),
	export.ResourceTypes.OneAgentUpdates:               Wrap(oneagentupdates.Service),
	export.ResourceTypes.OwnershipTeams:                Wrap(teams.Service),
	export.ResourceTypes.OwnershipConfig:               Wrap(ownership_config.Service),
	export.ResourceTypes.LogCustomSource:               Wrap(customlogsourcesettings.Service),
	export.ResourceTypes.Kubernetes:                    Wrap(kubernetesv2.Service),
	export.ResourceTypes.CloudFoundry:                  Wrap(cloudfoundryv2.Service),
	export.ResourceTypes.DiskAnomalyDetectionRules:     Wrap(diskrules.Service),
	export.ResourceTypes.AWSAnomalies:                  Wrap(aws_anomalies.Service),
	export.ResourceTypes.VMwareAnomalies:               Wrap(vmware_anomalies.Service),
	export.ResourceTypes.BusinessEventsOneAgent:        Wrap(incoming.Service),
	export.ResourceTypes.BusinessEventsBuckets:         Wrap(bizevents_buckets.Service),
	export.ResourceTypes.BusinessEventsMetrics:         Wrap(bizevents_metrics.Service),
	export.ResourceTypes.BusinessEventsProcessing:      Wrap(bizevents_processing.Service),
	export.ResourceTypes.BusinessEventsSecurityContext: Wrap(bizevents_security.Service),
	export.ResourceTypes.WebAppKeyPerformanceCustom:    Wrap(customactions.Service),
	export.ResourceTypes.WebAppKeyPerformanceLoad:      Wrap(loadactions.Service),
	export.ResourceTypes.WebAppKeyPerformanceXHR:       Wrap(xhractions.Service),
	export.ResourceTypes.BuiltinProcessMonitoring:      Wrap(builtinprocessmonitoringrule.Service),
	export.ResourceTypes.LimitOutboundConnections:      Wrap(allowedoutboundconnections.Service),
	export.ResourceTypes.SpanEvents:                    Wrap(eventattribute.Service),
	export.ResourceTypes.VMware:                        Wrap(vmware.Service),
	export.ResourceTypes.K8sMonitoring:                 Wrap(kubernetesmonitoring.Service),

	export.ResourceTypes.HostMonitoringMode:     Wrap(hostmonitoringmode.Service),
	export.ResourceTypes.HostMonitoringAdvanced: Wrap(hostmonitoringadvanced.Service),
	export.ResourceTypes.IPAddressMasking:       Wrap(ipaddressmasking.Service),
	export.ResourceTypes.UnifiedServicesMetrics: Wrap(endpointmetrics.Service),
	export.ResourceTypes.UnifiedServicesOpenTel: Wrap(unifiedservicesopentel.Service),

	export.ResourceTypes.KeyUserAction:                Wrap(keyuseractions.Service),
	export.ResourceTypes.UrlBasedSampling:             Wrap(urlbasedsampling.Service),
	export.ResourceTypes.AttributeAllowList:           Wrap(attributeallowlist.Service),
	export.ResourceTypes.AttributeBlockList:           Wrap(attributeblocklist.Service),
	export.ResourceTypes.AttributeMasking:             Wrap(attributemasking.Service),
	export.ResourceTypes.AttributesPreferences:        Wrap(attributespreferences.Service),
	export.ResourceTypes.OneAgentSideMasking:          Wrap(masking.Service),
	export.ResourceTypes.HubSubscriptions:             Wrap(subscriptions.Service),
	export.ResourceTypes.MobileNotifications:          Wrap(mobilenotifications.Service),
	export.ResourceTypes.CrashdumpAnalytics:           Wrap(crashdumpanalytics.Service),
	export.ResourceTypes.AppMonitoring:                Wrap(appmonitoring.Service),
	export.ResourceTypes.GrailSecurityContext:         Wrap(securitycontext.Service),
	export.ResourceTypes.KubernetesApp:                Wrap(kubernetesapp.Service),
	export.ResourceTypes.WebAppBeaconEndpoint:         Wrap(webappbeaconendpoint.Service),
	export.ResourceTypes.WebAppCustomConfigProperties: Wrap(webappcustomconfigproperties.Service),
	export.ResourceTypes.WebAppInjectionCookie:        Wrap(webappinjectioncookie.Service),
	export.ResourceTypes.DatabaseAppFeatureFlags:      Wrap(dbfeatureflags.Service),
	export.ResourceTypes.InfraOpsAppFeatureFlags:      Wrap(infraopsfeatureflags.Service),
	export.ResourceTypes.EBPFServiceDiscovery:         Wrap(ebpf.Service),
	export.ResourceTypes.DavisAnomalyDetectors:        Wrap(anomalydetectors.Service),
	export.ResourceTypes.LogDebugSettings:             Wrap(logdebugsettings.Service),
	export.ResourceTypes.InfraOpsAppSettings:          Wrap(infraopssettings.Service),
	export.ResourceTypes.DiskEdgeAnomalyDetectors:     Wrap(diskedgeanomalydetectors.Service),
	export.ResourceTypes.Reports:                      Wrap(reports.Service),
	export.ResourceTypes.NetworkMonitor:               Wrap(v2monitors.Service),
	export.ResourceTypes.NetworkMonitorOutageHandling: Wrap(networkoutagehandling.Service),
	export.ResourceTypes.NetworkZone:                  Wrap(networkzone.Service),
}

Functions

func CommonRead

func CommonRead(ctx context.Context, d *schema.ResourceData, creds *settings.Credentials, key export.ResourceType, indent string) error

func Create

func Delete

func GetOk

func GetOk(d *schema.ResourceData, key string) (any, bool)

func Resource

func Resource() *schema.Resource

func Set

func Set(d *schema.ResourceData, key string, ids []string)

func Update

func Wrap

func Wrap[T settings.Settings](fn func(credentials *settings.Credentials) settings.CRUDService[T]) func(credentials *settings.Credentials) BasicService

Types

type BasicService

type BasicService interface {
	List(ctx context.Context) (api.Stubs, error)
	Delete(ctx context.Context, id string) error
}

type GenericService

type GenericService[T settings.Settings] struct {
	Service settings.CRUDService[T]
}

func (*GenericService[T]) Delete

func (me *GenericService[T]) Delete(ctx context.Context, id string) error

func (*GenericService[T]) List

func (me *GenericService[T]) List(ctx context.Context) (api.Stubs, error)

type ListIDsService

type ListIDsService interface {
	ListIDs(ctx context.Context) (api.Stubs, error)
}

type ServiceFunc

type ServiceFunc func(*settings.Credentials) BasicService

Jump to

Keyboard shortcuts

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