icp

package
v1.15.6 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package icp provides binding the the ITRS Capacity Planner data model

Index

Constants

View Source
const (
	LoginEndpoint = "/api/login" // https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-login

	EntityPropertiesEndpoint = "/api/entityproperties" // https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-entityproperties

	ProjectsEndpoint           = "/api/projects" // https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-projects
	ProjectsSolutionIDEndpoint = "/api/projects/solutionid"
	ProjectsModelsEndpoint     = "/api/projects/models"     // https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-projects-models_projectId_baselineId
	ProjectsIgnoreListEndpoint = "/api/projects/ignorelist" // https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-projects-ignorelist_projectId_baselineId

	AssetServersEndpoint           = "/api/asset/servers"            // https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-asset-servers_projectId_baselineId
	AssetStorageEndpoint           = "/api/asset/storage"            // https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-asset-storage_projectId_baselineId
	AssetGroupingsEndpoint         = "/api/asset/groupings"          // https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-asset-groupings_projectId_baselineId
	AssetGroupingsGroupingEndpoint = "/api/asset/groupings/grouping" // https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-asset-groupings-grouping_projectId_groupingName_baselineId
	AssetGroupingsEntityEndpoint   = "/api/asset/groupings/entity"   // https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-asset-groupings-entity_projectId_entityId_baselineId
	AssetGroupingsDynamicEndpoint  = "/api/asset/groupings/dynamic"  // https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-asset-groupings-dynamic_projectId_summaryDate_groupingName_baselineId_entityId_summaryLevelID
	AssetEndpoint                  = "/api/asset"                    // https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-asset

	BaselineViewsProjectEndpoint = "/api/baselineviews/project" // https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-baselineviews-project-projectId
	BaselineViewsEndpoint        = "/api/baselineviews"         // https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-baselineviews-baselineViewId

	EntityMetaDataEndpoint       = "/api/entitymetadata" // https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-entitymetadata
	EntityMetaDataExportEndpoint = "/api/metadataexport" // https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-metadataexport-projectId_onlyInclude

	MetricsEndpoint                   = "/api/metrics"                    // https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-metrics_projectId_baselineId
	MetricsSummariesEndpoint          = "/api/metrics/summaries"          // https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-metrics-summaries
	MetricsSummariesDateRangeEndpoint = "/api/metrics/summariesdaterange" // https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-metrics-summariesdaterange

	EventsBaselineViewEndpoint = "/api/events/baselineview" // https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-events-baselineview

	// EventsEventFilterEndpoint endpoint
	//
	// https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-events-eventfilter
	//
	// https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-events-eventfilter_projectId
	//
	// https://icp-api.itrsgroup.com/v2.0/Help/Api/DELETE-api-events-eventfilter_projectId
	EventsEventFilterEndpoint = "/api/events/eventfilter"

	UploadEndpoint = "/api/Upload" // https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-Upload_version_taskname_machinename_selectedProjectId_testOnly_log

	CreateStackEndpoint                         = "" // https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-createstack
	CreateServiceAccountEndpoint                = "" // https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-createserviceaccount
	DeleteServiceAccountEndpoint                = "" // https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-deleteserviceaccount
	CreatePipelineServiceAndDataFoldersEndpoint = "" // https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-createpipelineserviceanddatafolders

	RecommendationsCloudInstancesEndpoint = "/api/recommendations/cloudinstances" // https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-recommendations-cloudinstances

	DataMartEntityPerformanceEndpoint = "/Api/DataMart/EntityPerformance" // https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-Api-DataMart-EntityPerformance
	DataMartEntityRelationEndpoint    = "/Api/DataMart/EntityRelation"    // https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-Api-DataMart-EntityRelation
	DataMartPropertiesEntityEndpoint  = "/Api/DataMart/PropertiesEntity"  // https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-Api-DataMart-PropertiesEntity
	DataMartMetricsEndpoint           = "/Api/DataMart/Metrics"           // https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-Api-DataMart-Metrics
	DataMartMetricTimeseriesEndpoint  = "/Api/DataMart/MetricTimeseries"  // https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-Api-DataMart-MetricTimeseries
	DataMartEntityPropertiesEndpoint  = "/Api/DataMart/EntityProperties"  // https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-Api-DataMart-EntityProperties
	DataMartMetricCapacitiesEndpoint  = "/Api/DataMart/MetricCapacities"  // https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-Api-DataMart-MetricCapacities
	DataMartGetEntitiesEndpoint       = "/Api/DataMart/GetEntities"       // https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-Api-DataMart-GetEntities
	DataMartStartProcessingEndpoint   = "/Api/DataMart/StartProcessing"   // https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-Api-DataMart-StartProcessing
)

Variables

View Source
var ErrServerError = errors.New("error from server (HTTP status > 299)")

ErrServerError makes it a little easier for the caller to check the underlying HTTP response

Functions

This section is empty.

Types

type AssetGroupingsDynamicRequest

type AssetGroupingsDynamicRequest struct {
	ProjectID      int    `url:"projectId"`
	SummaryDate    string `url:"summaryDate"`
	GroupingName   string `url:"groupingName"`
	BaselineID     int    `url:"baselineId,omitempty"`
	EntityID       string `url:"entityId"`
	SummaryLevelID int    `url:"summaryLevelID,omitempty"`
}

AssetGroupingsDynamicRequest type

https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-asset-groupings-dynamic_projectId_summaryDate_groupingName_baselineId_entityId_summaryLevelID

type AssetGroupingsEntityRequest

type AssetGroupingsEntityRequest struct {
	ProjectID  int `url:"projectId"`
	EntityID   int `url:"entityId"`
	BaselineID int `url:"baselineId,omitempty"`
}

AssetGroupingsEntityRequest type

https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-asset-groupings-entity_projectId_entityId_baselineId

type AssetGroupingsEntityResponse

type AssetGroupingsEntityResponse []string

AssetGroupingsEntityResponse type XXX Unknown response from docs

https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-asset-groupings-entity_projectId_entityId_baselineId

type AssetGroupingsGroupingRequest

type AssetGroupingsGroupingRequest struct {
	ProjectID    int    `url:"projectId"`
	GroupingName string `url:"groupingName"`
	BaselineID   int    `url:"baselineId,omitempty"`
}

AssetGroupingsGroupingRequest type

https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-asset-groupings-grouping_projectId_groupingName_baselineId

type AssetGroupingsGroupingResponse

type AssetGroupingsGroupingResponse []string

AssetGroupingsGroupingResponse type XXX Unknown response from docs

https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-asset-groupings-grouping_projectId_groupingName_baselineId

type AssetGroupingsRequest

type AssetGroupingsRequest struct {
	ProjectID  int `url:"projectId"`
	BaselineID int `url:"baselineId,omitempty"`
}

AssetGroupingsRequest type

https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-asset-groupings_projectId_baselineId

type AssetGroupingsResponse

type AssetGroupingsResponse []string

AssetGroupingsResponse type XXX Unknown response from docs

https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-asset-groupings_projectId_baselineId

type AssetRegisterItem

type AssetRegisterItem struct {
	ServerName                   string     `json:"ServerName,omitempty"`
	TimeStamp                    *Time      `json:"TimeStamp,omitempty"`
	InternalID                   string     `json:"InternalID,omitempty"`
	SourceServer                 string     `json:"SourceServer,omitempty"`
	ServerType                   string     `json:"ServerType,omitempty"`
	HostName                     string     `json:"HostName,omitempty"`
	DataCentreName               string     `json:"DataCentreName,omitempty"`
	Cluster                      string     `json:"Cluster,omitempty"`
	Environment                  string     `json:"Environment,omitempty"`
	Hypervisor                   string     `json:"Hypervisor,omitempty"`
	HypervisorVersion            string     `json:"HypervisorVersion,omitempty"`
	OperatingSystem              string     `json:"OperatingSystem,omitempty"`
	MemoryMB                     int        `json:"MemoryMB,omitempty"`
	ClockSpeedMHz                int        `json:"ClockSpeedMHz,omitempty"`
	NumberOfPhysicalCoresOrvCPUs int        `json:"NumberOfPhysicalCoresOrvCPUs,omitempty"`
	HyperthreadingEnabled        bool       `json:"HyperthreadingEnabled,omitempty"`
	DeployedDate                 *Time      `json:"DeployedDate,omitempty"`
	DecommissionedDate           *Time      `json:"DecommissionedDate,omitempty"`
	FailoverServerName           string     `json:"FailoverServerName,omitempty"`
	CPURatio                     int        `json:"CPURatio,omitempty"`
	SpecintRate2006              int        `json:"specint_rate2006,omitempty"`
	MaximumIOKBS                 int        `json:"MaximumIOKBS,omitempty"`
	LogicalCoresPerPhysicalCore  int        `json:"LogicalCoresPerPhysicalCore,omitempty"`
	HardwareModel                string     `json:"HardwareModel,omitempty"`
	HardwareVendor               string     `json:"HardwareVendor,omitempty"`
	Groupings                    []Grouping `json:"Groupings,omitempty"`
}

AssetRegisterItem type

https://icp-api.itrsgroup.com/v2.0/Help/ResourceModel?modelName=AssetRegisterItem

type AssetServersItem

type AssetServersItem struct {
	ServerID  int               `json:"ServerId"`
	Assets    Assets            `json:"Assets"`
	Groupings map[string]string `json:"Groupings"`
}

AssetServersItem type

Not documented

type AssetServersRequest

type AssetServersRequest struct {
	ProjectID  int `url:"projectId"`
	BaselineID int `url:"baselineId"`
}

AssetServersRequest type

https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-asset-servers_projectId_baselineId

type AssetServersResponse

type AssetServersResponse []AssetServersItem

AssetServersResponse type XXX Unknown response from docs

https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-asset-servers_projectId_baselineId

type AssetStorageRequest

type AssetStorageRequest struct {
	ProjectID  int `url:"projectId"`
	BaselineID int `url:"baselineId,omitempty"`
}

AssetStorageRequest type

https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-asset-storage_projectId_baselineId

type AssetStorageResponse

type AssetStorageResponse struct {
	DataStores []DataStore `json:"DataStore"`
	VMFiles    []VMFile    `json:"VMFiles"`
}

AssetStorageResponse type XXX Unknown response from docs

https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-asset-storage_projectId_baselineId

type Assets

type Assets struct {
	CPURatio             float64 `json:"CPURatio,omitempty"`
	EntityInternalID     string  `json:"EntityInternalId,omitempty"`
	HostID               int     `json:"HostID,omitempty"`
	ServerType           string  `json:"ServerType,omitempty"`
	BenchmarkScore       string  `json:"benchmarkScore,omitempty"`
	CoreMHzCapacity      string  `json:"coreMHzCapacity,omitempty"`
	Cores                string  `json:"cores,omitempty"`
	DecommisionDate      *Time   `json:"decommisionDate,omitempty"`
	DeployDate           *Time   `json:"deployDate,omitempty"`
	DeriveredCPUCapacity string  `json:"deriveredCPUCapacity,omitempty"`
	IOLimit              string  `json:"ioLimit,omitempty"`
	IOLimitActual        string  `json:"ioLimitActual,omitempty"`
	MemoryCapacity       string  `json:"memoryCapacity,omitempty"`
	ParentType           string  `json:"parentType,omitempty"`
	ServerName           string  `json:"serverName,omitempty"`
}

Assets Type

Not documented

type AvailableModel

type AvailableModel struct {
	SummaryLevelID int    `json:"SummaryLevelID"`
	StartDate      *Time  `json:"StartDate,omitempty"`
	EndDate        *Time  `json:"EndDate,omitempty"`
	Description    string `json:"Description"`
}

AvailableModel type

https://icp-api.itrsgroup.com/v2.0/Help/ResourceModel?modelName=AvailableModel

type BaselineView

type BaselineView struct {
	ProjectID         int    `json:"ProjectId"`
	ID                string `json:"ID"`
	Name              string `json:"Name"`
	StartDate         *Time  `json:"StartDate,omitempty"`
	EndDate           *Time  `json:"EndDate,omitempty"`
	LastProcessedDate *Time  `json:"LastProcessedDate"`
	BaselineID        int    `json:"BaselineId"`
}

BaselineView type

https://icp-api.itrsgroup.com/v2.0/Help/ResourceModel?modelName=BaselineView

type CloudInstanceRecommendation added in v1.7.1

type CloudInstanceRecommendation struct {
	AWSInstanceID   string `json:"AWSInstanceID,omitempty"`
	RegionCode      string `json:"RegionCode,omitempty"`
	ResourceType    string `json:"ResourceType,omitempty"`
	SubscriptionID  string `json:"SubscriptionID,omitempty"`
	ResourceGroup   string `json:"ResourceGroup,omitempty"`
	EntityID        string `json:"EntityID,omitempty"`
	EntityName      string `json:"EntityName,omitempty"`
	SourceCPUCores  int    `json:"SourceCPUCores,omitempty"`
	SourceMemoryGB  int    `json:"SourceMemoryGB,omitempty"`
	MatchType       string `json:"MatchType,omitempty"`
	InstanceType    string `json:"InstanceType,omitempty"`
	CPUCores        int    `json:"CPUCores,omitempty"`
	MemoryGB        int    `json:"MemoryGB,omitempty"`
	Location        string `json:"Location,omitempty"`
	LocationName    string `json:"LocationName,omitempty"`
	OperatingSystem string `json:"OperatingSystem,omitempty"`
	SKU             string `json:"SKU,omitempty"`
}

type DataMartEntityPerformanceRequest

type DataMartEntityPerformanceRequest struct {
	ProjectID         int                 `json:"ProjectId"`
	EntityPerformance []EntityPerformance `json:"EntityPerformance"`
}

DataMartEntityPerformanceRequest body type

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-Api-DataMart-EntityPerformance

type DataMartEntityPropertiesRequest

type DataMartEntityPropertiesRequest struct {
	ProjectID        int                `json:"ProjectId"`
	DataSourceName   string             `json:"DataSourceName"`
	SourceKey1       string             `json:"SourceKey1"`
	SourceKey2       string             `json:"SourceKey2"`
	SourceKey3       string             `json:"SourceKey3"`
	SourceKey4       string             `json:"SourceKey4"`
	SourceKey5       string             `json:"SourceKey5"`
	EntityProperties []EntityProperties `json:"EntityProperties"`
}

DataMartEntityPropertiesRequest type

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-Api-DataMart-EntityProperties

type DataMartEntityRelationRequest

type DataMartEntityRelationRequest struct {
	ProjectID      int              `json:"ProjectId"`
	EntityRelation []EntityRelation `json:"EntityRelation"`
}

DataMartEntityRelationRequest type

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-Api-DataMart-EntityRelation

type DataMartGetEntitiesItem added in v1.7.1

type DataMartGetEntitiesItem struct {
	SourceKey1 string `json:"SourceKey1"`
	SourceKey2 string `json:"SourceKey2"`
	SourceKey3 string `json:"SourceKey3"`
	SourceKey4 string `json:"SourceKey4"`
	SourceKey5 string `json:"SourceKey5"`
	EntityType string `json:"EntityType"`
}

type DataMartGetEntitiesRequest

type DataMartGetEntitiesRequest struct {
	ProjectID  int      `json:"ProjectId"`
	EntityType []string `json:"EntityType"`
}

DataMartGetEntitiesRequest type

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-Api-DataMart-GetEntities

type DataMartGetEntitiesResponse added in v1.7.1

type DataMartGetEntitiesResponse []DataMartGetEntitiesItem

type DataMartMetricCapacitiesRequest

type DataMartMetricCapacitiesRequest struct {
	ProjectID        int                `json:"ProjectId"`
	DataSourceName   string             `json:"DataSourceName"`
	SourceKey1       string             `json:"SourceKey1"`
	SourceKey2       string             `json:"SourceKey2"`
	SourceKey3       string             `json:"SourceKey3"`
	SourceKey4       string             `json:"SourceKey4"`
	SourceKey5       string             `json:"SourceKey5"`
	MetricName       string             `json:"MetricName"`
	MetricCapacities []MetricCapacities `json:"MetricCapacities"`
}

DataMartMetricCapacitiesRequest type

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-Api-DataMart-MetricCapacities

type DataMartMetricTimeSeriesRequest

type DataMartMetricTimeSeriesRequest struct {
	ProjectID        int                `json:"ProjectId"`
	DataSourceName   string             `json:"DataSourceName"`
	SourceKey1       string             `json:"SourceKey1"`
	SourceKey2       string             `json:"SourceKey2"`
	SourceKey3       string             `json:"SourceKey3"`
	SourceKey4       string             `json:"SourceKey4"`
	SourceKey5       string             `json:"SourceKey5"`
	MetricName       string             `json:"MetricName"`
	MetricTimeseries []MetricTimeSeries `json:"MetricTimeSeries"`
}

DataMartMetricTimeSeriesRequest type

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-Api-DataMart-MetricTimeseries

type DataMartMetricsRequest

type DataMartMetricsRequest struct {
	ProjectID      int       `json:"ProjectId"`
	DataSourceName string    `json:"DataSourceName"`
	SourceKey1     string    `json:"SourceKey1"`
	SourceKey2     string    `json:"SourceKey2"`
	SourceKey3     string    `json:"SourceKey3"`
	SourceKey4     string    `json:"SourceKey4"`
	SourceKey5     string    `json:"SourceKey5"`
	Metrics        []Metrics `json:"Metrics"`
}

DataMartMetricsRequest type

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-Api-DataMart-Metrics

type DataMartPropertiesEntityRequest

type DataMartPropertiesEntityRequest struct {
	ProjectID        int                `json:"ProjectId"`
	PropertiesEntity []PropertiesEntity `json:"PropertiesEntity"`
}

DataMartPropertiesEntityRequest body type

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-Api-DataMart-PropertiesEntity

type DataMartStartProcessingRequest

type DataMartStartProcessingRequest struct {
	ProjectID int `json:"ProjectId"`
}

DataMartStartProcessingRequest type

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-Api-DataMart-StartProcessing

type DataMartStartProcessingResponse added in v1.7.1

type DataMartStartProcessingResponse struct {
	ProcessingStarted  bool
	ProcessingDateTime *Time
}

type DataStore

type DataStore struct {
	CapacityMB       float64 `json:"capacityMB"`
	DataCenter       string  `json:"dataCenter"`
	DataStoreCluster string  `json:"datastoreCluster"`
	DataStoreID      int     `json:"datastoreID"`
	DataStoreName    string  `json:"datastoreName"`
	EntitySource     string  `json:"entitySource"`
	InternalID       string  `json:"internalId"`
	ProvisionedMB    float64 `json:"provisionedMB"`
	ReservedRatio    float64 `json:"reserveRatio"`
	Shared           bool    `json:"shared"`
	UsedMB           float64 `json:"usedMB"`
}

DataStore type

Not documented

type DynamicProperty

type DynamicProperty struct {
	EntityName    string `json:"EntityName"`
	EntityID      int    `json:"EntityID"`
	PropertyName  string `json:"PropertyName"`
	PropertyValue string `json:"PropertyValue"`
}

DynamicProperty type

https://icp-api.itrsgroup.com/v2.0/Help/ResourceModel?modelName=DynamicProperty

type EntitiesPropertiesItem

type EntitiesPropertiesItem struct {
	KeyField1  string     `json:"KeyField1"`
	KeyField2  string     `json:"KeyField2"`
	KeyField3  string     `json:"KeyField3"`
	KeyField4  string     `json:"KeyField4"`
	KeyField5  string     `json:"KeyField5"`
	EntityType string     `json:"EntityType"`
	EntityName string     `json:"EntityName"`
	Timestamp  string     `json:"Timestamp"`
	Properties []Grouping `json:"Properties"`
}

EntitiesPropertiesItem type

https://icp-api.itrsgroup.com/v2.0/Help/ResourceModel?modelName=EntityPropertiesItem

type EntityMetaDataItem

type EntityMetaDataItem struct {
	SourceServer string
	InternalID   string
	Groupings    []Grouping
	Action       string
}

EntityMetaDataItem type

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-entitymetadata

type EntityMeteDataExportRequest

type EntityMeteDataExportRequest struct {
	ProjectID   int    `url:"projectId,omitempty"`
	OnlyInclude string `url:"onlyInclude,omitempty"`
}

EntityMeteDataExportRequest type

https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-metadataexport-projectId_onlyInclude

type EntityPerformance

type EntityPerformance struct {
	DataSourceName string `json:"DataSourceName"`
	DataDateTime   *Time  `json:"DataDateTime"`
	SourceKey1     string `json:"SourceKey1"`
	SourceKey2     string `json:"SourceKey2"`
	SourceKey3     string `json:"SourceKey3"`
	SourceKey4     string `json:"SourceKey4"`
	SourceKey5     string `json:"SourceKey5"`
	MetricName     string `json:"MetricName"`
	MetricValue    string `json:"MetricValue"`
}

EntityPerformance type

https://icp-api.itrsgroup.com/v2.0/Help/ResourceModel?modelName=EntityPerformance

type EntityProperties

type EntityProperties struct {
	PropertyName  string `json:"PropertyName"`
	PropertyValue string `json:"PropertyValue"`
	EffectiveFrom *Time  `json:"EffectiveFrom"`
}

EntityProperties type

https://icp-api.itrsgroup.com/v2.0/Help/ResourceModel?modelName=EntityProperties

type EntityRelation

type EntityRelation struct {
	DataSourceName    string `json:"DataSourceName"`
	Entity1SourceKey1 string `json:"Entity1SourceKey1"`
	Entity1SourceKey2 string `json:"Entity1SourceKey2"`
	Entity1SourceKey3 string `json:"Entity1SourceKey3"`
	Entity1SourceKey4 string `json:"Entity1SourceKey4"`
	Entity1SourceKey5 string `json:"Entity1SourceKey5"`
	Entity2SourceKey1 string `json:"Entity2SourceKey1"`
	Entity2SourceKey2 string `json:"Entity2SourceKey2"`
	Entity2SourceKey3 string `json:"Entity2SourceKey3"`
	Entity2SourceKey4 string `json:"Entity2SourceKey4"`
	Entity2SourceKey5 string `json:"Entity2SourceKey5"`
	RelationName      string `json:"RelationName"`
	EffectiveFrom     *Time  `json:"EffectiveFrom"`
}

EntityRelation type

https://icp-api.itrsgroup.com/v2.0/Help/ResourceModel?modelName=EntityRelation

type EventFilterSetRequest added in v1.7.1

type EventFilterSetRequest struct {
	ProjectID   int    `json:"ProjectID"`
	Start       *Time  `json:"Start,omitempty"`
	End         *Time  `json:"End,omitempty"`
	FiltersJSON string `json:"FiltersJson"`
}

EventFilterSetRequest type

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-events-eventfilter

type EventsBaselineViewRequest added in v1.7.1

type EventsBaselineViewRequest struct {
	BaselineviewID         string `json:"BaselineviewId"`
	Filter                 string `json:"Filter"`
	ExcludePrecedingEvents bool   `json:"ExcludePrecedingEvents"`
	IncludeClusterEvents   bool   `json:"IncludeClusterEvents"`
}

EventsBaselineViewRequest type

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-events-baselineview

type EventsBaselineViewResponse added in v1.7.1

type EventsBaselineViewResponse []PredictedEvent

EventsBaselineViewResponse type

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-events-baselineview

type Grouping

type Grouping struct {
	Key   string `json:"Key"`
	Value string `json:"Value"`
}

Grouping type

https://icp-api.itrsgroup.com/v2.0/Help/ResourceModel?modelName=Grouping

type ICP

type ICP struct {
	*rest.Client
	// contains filtered or unexported fields
}

ICP holds the projectID, endpoint and http client for the configured ICP instance. If token is set it is sent with each request as a auth header.

func Login

func Login(username string, password *config.Plaintext, options ...rest.Options) (icp *ICP, err error)

Login sends a login request to the http endpoint and returns a token or an error

func New

func New(options ...rest.Options) (icp *ICP)

New returns a new ICP object. BaseURL defaults to "https://icp-api.itrsgroup.com/v2.0" and client, if nil, to a default http.Client

func (*ICP) Asset

func (i *ICP) Asset(ctx context.Context, request *AssetRequest) (resp *http.Response, err error)

Asset request

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-asset

func (*ICP) AssetGroupings

func (i *ICP) AssetGroupings(ctx context.Context, request *AssetGroupingsRequest) (response AssetGroupingsResponse, resp *http.Response, err error)

AssetGroupings request

func (*ICP) AssetGroupingsDynamic

func (i *ICP) AssetGroupingsDynamic(ctx context.Context, request *AssetGroupingsDynamicRequest) (response AssetGroupingsDynamicResponse, resp *http.Response, err error)

AssetGroupingsDynamic request

func (*ICP) AssetGroupingsEntity

func (i *ICP) AssetGroupingsEntity(ctx context.Context, request *AssetGroupingsEntityRequest) (response AssetGroupingsEntityResponse, resp *http.Response, err error)

AssetGroupingsEntity request

func (*ICP) AssetGroupingsGrouping

func (i *ICP) AssetGroupingsGrouping(ctx context.Context, request *AssetGroupingsGroupingRequest) (response AssetGroupingsGroupingResponse, resp *http.Response, err error)

AssetGroupingsGrouping request

func (*ICP) AssetServers

func (i *ICP) AssetServers(ctx context.Context, request *AssetServersRequest) (response AssetServersResponse, resp *http.Response, err error)

AssetServers request

func (*ICP) AssetStorage

func (i *ICP) AssetStorage(ctx context.Context, request *AssetStorageRequest) (response AssetStorageResponse, resp *http.Response, err error)

AssetStorage request

func (*ICP) BaselineID added in v1.7.1

func (i *ICP) BaselineID(ctx context.Context, project int, name string) (id string, baselineid int, err error)

BaselineID returns the internal 24 hex-digit and the integer baseline ID for project where name matches the baseline view name. The name comparison is case insensitive. An error is returned if any underlying API call fails or if nothing is found.

func (*ICP) BaselineViewsProject

func (i *ICP) BaselineViewsProject(ctx context.Context, request int) (response BaselineViewsProjectResponse, resp *http.Response, err error)

BaselineViewsProject request

func (*ICP) DataMartEntityPerformance

func (i *ICP) DataMartEntityPerformance(ctx context.Context, request *DataMartEntityPerformanceRequest) (resp *http.Response, err error)

DataMartEntityPerformance request

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-Api-DataMart-EntityPerformance

func (*ICP) DataMartEntityProperties

func (i *ICP) DataMartEntityProperties(ctx context.Context, request *DataMartEntityPropertiesRequest) (resp *http.Response, err error)

DataMartEntityProperties request

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-Api-DataMart-EntityProperties

func (*ICP) DataMartEntityRelation

func (i *ICP) DataMartEntityRelation(ctx context.Context, request *DataMartEntityRelationRequest) (resp *http.Response, err error)

DataMartEntityRelation request

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-Api-DataMart-EntityRelation

func (*ICP) DataMartMetricCapacities

func (i *ICP) DataMartMetricCapacities(ctx context.Context, request *DataMartMetricCapacitiesRequest) (resp *http.Response, err error)

DataMartMetricCapacities request

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-Api-DataMart-MetricCapacities

func (*ICP) DataMartMetricTimeseries

func (i *ICP) DataMartMetricTimeseries(ctx context.Context, request *DataMartMetricTimeSeriesRequest) (resp *http.Response, err error)

DataMartMetricTimeseries request

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-Api-DataMart-MetricTimeseries

func (*ICP) DataMartMetrics

func (i *ICP) DataMartMetrics(ctx context.Context, request *DataMartMetricsRequest) (resp *http.Response, err error)

DataMartMetrics request

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-Api-DataMart-Metrics

func (*ICP) DataMartPropertiesEntity

func (i *ICP) DataMartPropertiesEntity(ctx context.Context, request *DataMartPropertiesEntityRequest) (resp *http.Response, err error)

DataMartPropertiesEntity request

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-Api-DataMart-PropertiesEntity

func (*ICP) DataMartStartProcessing

func (i *ICP) DataMartStartProcessing(ctx context.Context, request *DataMartStartProcessingRequest) (response DataMartStartProcessingResponse, resp *http.Response, err error)

DataMartStartProcessing request

(Response format unknown)

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-Api-DataMart-StartProcessing

func (*ICP) EntityMetaData

func (i *ICP) EntityMetaData(ctx context.Context, request EntityMetaDataRequest) (resp *http.Response, err error)

EntityMetaData request

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-entitymetadata

func (*ICP) EntityProperties

func (i *ICP) EntityProperties(ctx context.Context, request *EntityPropertiesRequest) (resp *http.Response, err error)

EntityProperties type

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-entityproperties

func (*ICP) EventFilterDelete

func (i *ICP) EventFilterDelete(ctx context.Context, request EventFiltersRequest) (resp *http.Response, err error)

EventFilterDelete request

https://icp-api.itrsgroup.com/v2.0/Help/Api/DELETE-api-events-eventfilter_projectId

func (*ICP) EventFilterSet

func (i *ICP) EventFilterSet(ctx context.Context, request EventFilterSetRequest) (resp *http.Response, err error)

EventFilterSet request

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-events-eventfilter

func (*ICP) EventsBaselineView added in v1.7.1

func (i *ICP) EventsBaselineView(ctx context.Context, request EventsBaselineViewRequest) (response EventsBaselineViewResponse, resp *http.Response, err error)

EventsBaselineView request

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-events-baselineview

func (*ICP) MetricsSummaries

func (i *ICP) MetricsSummaries(ctx context.Context, request MetricsSummariesRequest) (response MetricsSummariesResponse, resp *http.Response, err error)

MetricsSummaries request

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-metrics-summaries

func (*ICP) MetricsSummariesDateRange

func (i *ICP) MetricsSummariesDateRange(ctx context.Context, request MetricsSummariesDateRangeRequest) (response MetricsSummariesResponse, resp *http.Response, err error)

MetricsSummariesDateRange request

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-metrics-summariesdaterange

func (*ICP) Projects

func (i *ICP) Projects(ctx context.Context) (response ProjectsResponse, resp *http.Response, err error)

Projects queries ICP for the authorised projects for the user. The response contains the unmarshalled data while resp and err return information from the underlying request. The resp.Body is already closed, if there wa no error.

func (*ICP) ProjectsIgnoreList added in v1.7.1

func (i *ICP) ProjectsIgnoreList(ctx context.Context, request *ProjectsIgnoreListRequest) (response ProjectsIgnoreListResponse, resp *http.Response, err error)

func (*ICP) ProjectsModels

func (i *ICP) ProjectsModels(ctx context.Context, request *ProjectsModelsRequest) (response ProjectsModelsResponse, resp *http.Response, err error)

ProjectsModels gets a list of models for a specified project for the authenticated user

https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-projects-models_projectId_baselineId

func (*ICP) ProjectsSolutionID added in v1.7.1

func (i *ICP) ProjectsSolutionID(ctx context.Context, request *ProjectsSolutionIDRequest) (response ProjectsSolutionIDResponse, resp *http.Response, err error)

func (*ICP) RecommendationsCloudInstances added in v1.7.1

func (i *ICP) RecommendationsCloudInstances(ctx context.Context, request *RecommendationsCloudInstancesRequest) (response RecommendationsCloudInstancesResponse, resp *http.Response, err error)

type LoginRequest

type LoginRequest struct {
	Username string `json:"Username"`
	Password string `json:"Password"`
}

LoginRequest type

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-login

type MetricCapacities

type MetricCapacities struct {
	CapacityValue string `json:"CapacityValue"`
	EffectiveFrom *Time  `json:"EffectiveFrom"`
}

MetricCapacities type

https://icp-api.itrsgroup.com/v2.0/Help/ResourceModel?modelName=MetricCapacities

type MetricTimeSeries

type MetricTimeSeries struct {
	MetricValue  string `json:"MetricValue"`
	DataDateTime *Time  `json:"DataDateTime"`
}

MetricTimeSeries type

https://icp-api.itrsgroup.com/v2.0/Help/ResourceModel?modelName=MetricTimeseries

type Metrics

type Metrics struct {
	MetricName   string `json:"MetricName"`
	MetricValue  string `json:"MetricValue"`
	DataDateTime *Time  `json:"DataDateTime"`
}

Metrics type

https://icp-api.itrsgroup.com/v2.0/Help/ResourceModel?modelName=Metrics

type MetricsRequest

type MetricsRequest struct {
	ProjectID  int `url:"projectId"`
	BaselineID int `url:"baselineId,omitempty"`
}

MetricsRequest type

https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-metrics_projectId_baselineId

type MetricsSummariesDateRangeRequest

type MetricsSummariesDateRangeRequest struct {
	MetricID         int    `json:"MetricID,omitempty"`
	SummaryEndDate   string `json:"SummaryEndDate,omitempty"`
	ProjectID        int    `json:"ProjectId,omitempty"`
	BaselineID       int    `json:"BaselineId,omitempty"`
	EntityIDList     string `json:"EntityIDList,omitempty"`
	SummaryLevelID   int    `json:"SummaryLevelID,omitempty"`
	SummaryStartDate string `json:"SummaryStartDate,omitempty"`
}

MetricsSummariesDateRangeRequest type

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-metrics-summariesdaterange

type MetricsSummariesRequest

type MetricsSummariesRequest struct {
	ProjectID        int    `json:"ProjectId,omitempty"`
	BaselineID       int    `json:"BaselineId,omitempty"`
	EntityIDList     string `json:"EntityIDList,omitempty"`
	SummaryLevelID   int    `json:"SummaryLevelID,omitempty"`
	SummaryStartDate string `json:"SummaryStartDate,omitempty"`
}

MetricsSummariesRequest type

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-metrics-summaries

type MetricsSummaryItem added in v1.7.1

type MetricsSummaryItem struct {
	EntityID            int     `json:"EntityID,omitempty"`
	Metric              string  `json:"Metric,omitempty"`
	SummaryDate         *Time   `json:"SummaryDate,omitempty"`
	RecordCount         float64 `json:"RecordCount,omitempty"`
	LatestValue         float64 `json:"LatestValue,omitempty"`
	LatestDataDateTime  *Time   `json:"LatestDataDateTime,omitempty"`
	MinModelMetricValue float64 `json:"MinModelMetricValue,omitempty"`
	MaxModelMetricValue float64 `json:"MaxModelMetricValue,omitempty"`
	C5thPercentile      float64 `json:"c5thPercentile,omitempty"`
	C25thPercentile     float64 `json:"c25thPercentile,omitempty"`
	C50thPercentile     float64 `json:"c50thPercentile,omitempty"`
	C75thPercentile     float64 `json:"c75thPercentile,omitempty"`
	C95thPercentile     float64 `json:"c95thPercentile,omitempty"`
	C99thPercentile     float64 `json:"c99thPercentile,omitempty"`
	STDDev              float64 `json:"STDDev,omitempty"`
	Mean                float64 `json:"Mean,omitempty"`
	Total               float64 `json:"Total,omitempty"`
}

type PredictedEvent

type PredictedEvent struct {
	ID             int     `json:"Id,omitempty"`
	Priority       string  `json:"Priority,omitempty"`
	Confidence     float64 `json:"Confidence,omitempty"`
	EventTime      *Time   `json:"EventTime,omitempty"`
	Metric         string  `json:"Metric,omitempty"`
	Description    string  `json:"Description,omitempty"`
	Entity         string  `json:"Entity,omitempty"`
	EntityType     string  `json:"EntityType,omitempty"`
	Element        string  `json:"Element,omitempty"`
	InternalID     string  `json:"InternalId,omitempty"`
	SourceServer   string  `json:"SourceServer,omitempty"`
	IsClusterEvent bool    `json:"IsClusterEvent,omitempty"`
	Critical       string  `json:"Critical,omitempty"`
	Major          string  `json:"Major,omitempty"`
	Warning        string  `json:"Warning,omitempty"`
}

PredictedEvent type

https://icp-api.itrsgroup.com/v2.0/Help/ResourceModel?modelName=PredictedEvent

type Project

type Project struct {
	ID   int    `json:"Id"`
	Name string `json:"Name"`
}

Project type

https://icp-api.itrsgroup.com/v2.0/Help/ResourceModel?modelName=Project

type ProjectsIgnoreListRequest

type ProjectsIgnoreListRequest struct {
	ProjectID  int `url:"projectId"`
	BaselineID int `url:"baselineId,omitempty"`
}

ProjectsIgnoreListRequest type

https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-projects-ignorelist_projectId_baselineId

type ProjectsModelsRequest

type ProjectsModelsRequest struct {
	ProjectID  int `url:"projectId"`
	BaselineID int `url:"baselineId,omitempty"`
}

ProjectsModelsRequest type

https://icp-api.itrsgroup.com/v2.0/Help/Api/GET-api-projects-models_projectId_baselineId

type ProjectsSolutionIDRequest added in v1.7.1

type ProjectsSolutionIDRequest struct {
	ProjectID int `url:"projectId"`
}

type ProjectsSolutionIDResponse added in v1.7.1

type ProjectsSolutionIDResponse int32

type PropertiesEntity

type PropertiesEntity struct {
	DataSourceName string `json:"DataSourceName"`
	SourceKey1     string `json:"SourceKey1"`
	SourceKey2     string `json:"SourceKey2"`
	SourceKey3     string `json:"SourceKey3"`
	SourceKey4     string `json:"SourceKey4"`
	SourceKey5     string `json:"SourceKey5"`
	PropertyName   string `json:"PropertyName"`
	PropertyValue  string `json:"PropertyValue"`
	EffectiveFrom  *Time  `json:"EffectiveFrom"`
}

PropertiesEntity type

https://icp-api.itrsgroup.com/v2.0/Help/ResourceModel?modelName=PropertiesEntity

type RecommendationsCloudInstancesRequest added in v1.7.1

type RecommendationsCloudInstancesRequest struct {
	ProjectID      int    `json:"ProjectId"`
	Provider       string `json:"Provider"`
	MatchType      string `json:"MatchType"`
	SummaryLevelID int    `json:"SummaryLevelID"`
	SummaryDate    string `json:"SummaryDate"`
}

type RecommendationsCloudInstancesResponse added in v1.7.1

type RecommendationsCloudInstancesResponse []CloudInstanceRecommendation

type Time added in v1.7.1

type Time struct {
	time.Time
}

func (*Time) MarshalJSON added in v1.7.1

func (t *Time) MarshalJSON() ([]byte, error)

func (*Time) UnmarshalJSON added in v1.7.1

func (t *Time) UnmarshalJSON(data []byte) (err error)

type UploadRequest

type UploadRequest struct {
	Version           string `url:"version"`
	TaskName          string `url:"taskname"`
	MachineName       string `url:"machinename"`
	SelectedProjectID int    `url:"selectedProjectId"`
	TestOnly          bool   `url:"testOnly"`
	Log               int    `url:"log"`
}

UploadRequest type

https://icp-api.itrsgroup.com/v2.0/Help/Api/POST-api-Upload_version_taskname_machinename_selectedProjectId_testOnly_log

type VMFile

type VMFile struct {
	CapacityMB      float64 `json:"capacityMB"`
	DataStoreID     int     `json:"datastoreID"`
	DemandMB        float64 `json:"demandMB"`
	EntityID        int     `json:"entityID"`
	FileSizeMB      float64 `json:"fileSizeMB"`
	Filename        string  `json:"filename"`
	HasTrueDemand   bool    `json:"hasTrueDemand"`
	StorageFileType int     `json:"storageFileType"`
	StorageFormat   int     `json:"storageFormat"`
	VMFileID        int     `json:"vmFileID"`
}

VMFile type

Not documented

type Version

type Version struct {
	Major         int `json:"Major,omitempty"`
	Minor         int `json:"Minor,omitempty"`
	Build         int `json:"Build,omitempty"`
	Revision      int `json:"Revision,omitempty"`
	MajorRevision int `json:"MajorRevision,omitempty"`
	MinorRevision int `json:"MinorRevision,omitempty"`
}

Version type

https://icp-api.itrsgroup.com/v2.0/Help/ResourceModel?modelName=PropertiesEntity

Jump to

Keyboard shortcuts

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