Documentation ¶
Index ¶
Constants ¶
const ( AlertingProfile = "alerting-profile" NetworkZone = "network-zone" ManagementZone = "management-zone" Autotag = "auto-tag" Dashboard = "dashboard" DashboardV2 = "dashboard-v2" Notification = "notification" Extension = "extension" ExtensionElasticSearch = "extension-elasticsearch" CustomServiceJava = "custom-service-java" CustomServiceDotNet = "custom-service-dotnet" CustomServiceGo = "custom-service-go" CustomServiceNodeJs = "custom-service-nodejs" CustomServicePhp = "custom-service-php" AnomalyDetectionMetrics = "anomaly-detection-metrics" AnomalyDetectionDisks = "anomaly-detection-disks" SyntheticLocation = "synthetic-location" SyntheticMonitor = "synthetic-monitor" ApplicationWeb = "application-web" ApplicationMobile = "application-mobile" AppDetectionRule = "app-detection-rule" AwsCredentials = "aws-credentials" KubernetesCredentials = "kubernetes-credentials" // #nosec G101 AzureCredentials = "azure-credentials" // #nosec G101 RequestAttributes = "request-attributes" CalculatedMetricsService = "calculated-metrics-service" CalculatedMetricsLog = "calculated-metrics-log" CalculatedMetricsApplicationMobile = "calculated-metrics-application-mobile" CalculatedMetricsSynthetic = "calculated-metrics-synthetic" CalculatedMetricsApplicationWeb = "calculated-metrics-application-web" ConditionalNamingProcessgroup = "conditional-naming-processgroup" ConditionalNamingHost = "conditional-naming-host" ConditionalNamingService = "conditional-naming-service" MaintenanceWindow = "maintenance-window" RequestNamingService = "request-naming-service" Slo = "slo" CredentialVault = "credential-vault" // #nosec G101 FailureDetectionParametersets = "failure-detection-parametersets" FailureDetectionRules = "failure-detection-rules" ServiceDetectionFullWebRequest = "service-detection-full-web-request" ServiceDetectionFullWebService = "service-detection-full-web-service" ServiceDetectionOpaqueWebRequest = "service-detection-opaque-web-request" ServiceDetectionOpaqueWebService = "service-detection-opaque-web-service" Reports = "reports" FrequentIssueDetection = "frequent-issue-detection" DataPrivacy = "data-privacy" HostsAutoUpdate = "hosts-auto-update" AnomalyDetectionApplications = "anomaly-detection-applications" AnomalyDetectionAws = "anomaly-detection-aws" AnomalyDetectionDatabaseServices = "anomaly-detection-database-services" AnomalyDetectionHosts = "anomaly-detection-hosts" AnomalyDetectionServices = "anomaly-detection-services" AnomalyDetectionVmware = "anomaly-detection-vmware" ServiceResourceNaming = "service-resource-naming" AppDetectionRuleHost = "app-detection-rule-host" ContentResources = "content-resources" AllowedBeaconOrigins = "allowed-beacon-origins" GeoIpDetectionHeaders = "geo-ip-detection-headers" GeoIpAddressMappings = "geo-ip-address-mappings" KeyUserActionsMobile = "key-user-actions-mobile" KeyUserActionsWeb = "key-user-actions-web" UserActionAndSessionPropertiesMobile = "user-action-and-session-properties-mobile" )
const StandardApiPropertyNameOfGetAllResponse string = "values"
Variables ¶
This section is empty.
Functions ¶
func GetV2ID ¶
GetV2ID returns the ID of APIs in v2 - replacing deprecated APIs with their new version and dropping the -v2 marker from APIs introducing the breaking change of handling non-unique-names. This is used in v1 -> v2 conversion
func RemoveDisabled ¶ added in v2.10.1
RemoveDisabled filter every endpoint for which all of required featureflags.FeatureFlag aren't set
func RemoveNonDeletable ¶ added in v2.12.0
RemoveNonDeletable filters every api for which configs are not deletable
Types ¶
type API ¶
type API struct { ID string //URLPath defines default path URLPath string PropertyNameOfGetAllResponse string // SingleConfiguration are those APIs that configure an environment global setting. // Such settings require additional handling and can't be deleted. SingleConfiguration bool // NonUniqueName name APIs are those APIs that don't work with an environment wide unique ID. // For such APIs, the name attribute can't be used as a ID (Monaco default behavior), hence // such APIs require additional handling. NonUniqueName bool DeprecatedBy string // SkipDownload indicates whether an API should be downloaded or not. // // Some APIs are not re-uploadable by design, either as they require hidden credentials, // or if they require a special format, e.g. a zip file. // // Those configs include all configs handling credentials, as well as the extension-API. SkipDownload bool // TweakResponseFunc can be optionally registered to add custom code that changes the // payload of the downloaded api content (e.g. to exclude unwanted/unnecessary fields) TweakResponseFunc func(map[string]any) // Parent is used for SubPath APIs to store the related configuration. Parent *API // AppliedParentObjectID is the parent object ID for a SubPath API once it has been applied. AppliedParentObjectID string // CheckEqualFunc can be used to compare existing objects with current objects based on their payload CheckEqualFunc func(map[string]any, map[string]any) bool // RequireAllFF lists all feature flags that needs to be enabled in order to utilize this API RequireAllFF []featureflags.FeatureFlag // PropertyNameOfIdentifier defines the id field if it's not called 'ID' PropertyNameOfIdentifier string // NonDeletable indicates that configs of that type cannot be deleted NonDeletable bool // DeployWaitDuration defines the amount of time that shall elapse between deploying configs of this type. // Note, that this only applies to configs within the same independent graph component DeployWaitDuration time.Duration }
API structure present definition of config endpoints
func (API) ApplyParentObjectID ¶ added in v2.12.0
ApplyParentObjectID returns a new API instance with the specified parent object ID applied within the URLPath.
func (API) HasParent ¶ added in v2.11.0
HasParent returns true iff the API has a relation to another (parent) API. This is typically the case for "Sub-path" APIs, e.g. Key User Actions for Mobile applications. In this case "mobile-application" would be the parent API, which is also reflected in the URLs to be used to query and create key user actions.
func (API) IsStandardAPI ¶
type APIs ¶
APIs is a collection of API
func NewAPIs ¶
func NewAPIs() APIs
NewAPIs returns collection of predefined API to work with Dynatrace
func NewV1APIs ¶
func NewV1APIs() APIs
NewV1APIs returns collection of predefined API to work with Dynatrace Deprecated: Please use NewAPIs. This one is legacy and is used only to convert old to new types of APIs
func (APIs) GetApiNameLookup ¶
type Filter ¶
Filter return true iff specific api needs to be filtered/ removed from list
func RetainByName ¶
RetainByName creates a Filter that leaves the API in the map if API.ID is part of the provided list. If the provided list is empty, a no-op filter is returned.