sumologic

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultEnvironment = "us2"

Variables

View Source
var SumoMutexKV = mutexkv.NewMutexKV()

Functions

func Provider

func Provider() terraform.ResourceProvider

Types

type Client

type Client struct {
	AccessID    string
	AccessKey   string
	Environment string
	BaseURL     *url.URL
	// contains filtered or unexported fields
}

func NewClient

func NewClient(accessID, accessKey, environment string) (*Client, error)

func (*Client) AssignCollectorToIngestBudget added in v0.4.0

func (s *Client) AssignCollectorToIngestBudget(ingestBudgetId string, collectorId int) error

func (*Client) CollectorAssignedToIngestBudget added in v0.4.0

func (s *Client) CollectorAssignedToIngestBudget(ingestBudgetId string, collectorId int) (bool, error)

func (*Client) CreateCloudsyslogSource

func (s *Client) CreateCloudsyslogSource(cloudSyslogSource CloudSyslogSource, collectorID int) (int, error)

func (*Client) CreateCollector

func (s *Client) CreateCollector(collector Collector) (int, error)

func (*Client) CreateHTTPSource

func (s *Client) CreateHTTPSource(httpSource HTTPSource, collectorID int) (int, error)

func (*Client) CreateIngestBudget added in v0.4.0

func (s *Client) CreateIngestBudget(budget IngestBudget) (string, error)

func (*Client) CreatePollingSource

func (s *Client) CreatePollingSource(source PollingSource, collectorID int) (int, error)

func (*Client) CreateRole added in v0.3.0

func (s *Client) CreateRole(role Role) (string, error)

func (*Client) CreateUser added in v0.4.0

func (s *Client) CreateUser(user User) (string, error)

func (*Client) Delete

func (s *Client) Delete(urlPath string) ([]byte, error)

func (*Client) DeleteCollector

func (s *Client) DeleteCollector(id int) error

func (*Client) DeleteIngestBudget added in v0.4.0

func (s *Client) DeleteIngestBudget(id string) error

func (*Client) DeleteRole added in v0.3.0

func (s *Client) DeleteRole(id string) error

func (*Client) DeleteUser added in v0.4.0

func (s *Client) DeleteUser(id string) error

func (*Client) DestroySource

func (s *Client) DestroySource(sourceID int, collectorID int) error

func (*Client) FindIngestBudget added in v0.4.0

func (s *Client) FindIngestBudget(name string) (*IngestBudget, error)

func (*Client) Get

func (s *Client) Get(urlPath string) ([]byte, string, error)

func (*Client) GetCloudSyslogSource

func (s *Client) GetCloudSyslogSource(collectorID, sourceID int) (*CloudSyslogSource, error)

func (*Client) GetCollector

func (s *Client) GetCollector(id int) (*Collector, error)

func (*Client) GetCollectorName

func (s *Client) GetCollectorName(name string) (*Collector, error)

func (*Client) GetHTTPSource

func (s *Client) GetHTTPSource(collectorID, sourceID int) (*HTTPSource, error)

func (*Client) GetIngestBudget added in v0.4.0

func (s *Client) GetIngestBudget(id string) (*IngestBudget, error)

func (*Client) GetPollingSource

func (s *Client) GetPollingSource(collectorID, sourceID int) (*PollingSource, error)

func (*Client) GetRole added in v0.3.0

func (s *Client) GetRole(id string) (*Role, error)

func (*Client) GetRoleName added in v0.3.0

func (s *Client) GetRoleName(name string) (*Role, error)

func (*Client) GetSourceName

func (s *Client) GetSourceName(collectorID int, sourceName string) (*Source, error)

func (*Client) GetUser added in v0.4.0

func (s *Client) GetUser(id string) (*User, error)

func (*Client) GetWithCookies

func (s *Client) GetWithCookies(urlPath string, cookies []*http.Cookie) ([]byte, string, error)

func (*Client) Post

func (s *Client) Post(urlPath string, payload interface{}) ([]byte, error)

func (*Client) PostWithCookies

func (s *Client) PostWithCookies(urlPath string, payload interface{}) ([]byte, []*http.Cookie, error)

func (*Client) Put

func (s *Client) Put(urlPath string, payload interface{}) ([]byte, error)

func (*Client) UnAssignCollectorToIngestBudget added in v0.4.0

func (s *Client) UnAssignCollectorToIngestBudget(ingestBudgetId string, collectorId int) error

func (*Client) UpdateCloudSyslogSource

func (s *Client) UpdateCloudSyslogSource(source CloudSyslogSource, collectorID int) error

func (*Client) UpdateCollector

func (s *Client) UpdateCollector(collector Collector) error

func (*Client) UpdateHTTPSource

func (s *Client) UpdateHTTPSource(source HTTPSource, collectorID int) error

func (*Client) UpdateIngestBudget added in v0.4.0

func (s *Client) UpdateIngestBudget(budget IngestBudget) error

func (*Client) UpdatePollingSource

func (s *Client) UpdatePollingSource(source PollingSource, collectorID int) error

func (*Client) UpdateRole added in v0.3.0

func (s *Client) UpdateRole(role Role) error

func (*Client) UpdateUser added in v0.4.0

func (s *Client) UpdateUser(user User) error

type CloudSyslogSource

type CloudSyslogSource struct {
	Source
	Token string `json:"token,omitempty"`
}

type Collector

type Collector struct {
	ID               int             `json:"id,omitempty"`
	CollectorType    string          `json:"collectorType,omitempty"`
	Name             string          `json:"name"`
	Description      string          `json:"description,omitempty"`
	Category         string          `json:"category,omitempty"`
	TimeZone         string          `json:"timeZone,omitempty"`
	Links            []CollectorLink `json:"links,omitempty"`
	CollectorVersion string          `json:"collectorVersion,omitempty"`
	LastSeenAlive    int             `json:"lastSeenAlive,omitempty"`
	Alive            bool            `json:"alive,omitempty"`
}
type CollectorLink struct {
	Rel  string `json:"rel,omitempty"`
	Href string `json:"href,omitempty"`
}

type CollectorList

type CollectorList struct {
	Collectors []Collector `json:"collectors"`
}

type CollectorRequest

type CollectorRequest struct {
	Collector Collector `json:"collector"`
}

type CollectorResponse

type CollectorResponse struct {
	Collector Collector `json:"collector"`
}

type DefaultDateFormat

type DefaultDateFormat struct {
	Format  string `json:"format"`
	Locator string `json:"locator"`
}

type Filter

type Filter struct {
	Name       string `json:"name"`
	FilterType string `json:"filterType"`
	Regexp     string `json:"regexp"`
	Mask       string `json:"mask"`
}

type HTTPSource

type HTTPSource struct {
	Source
	MessagePerRequest bool   `json:"messagePerRequest"`
	URL               string `json:"url,omitempty"`
}

type HttpClient added in v0.2.1

type HttpClient interface {
	Do(req *http.Request) (*http.Response, error)
}

type IngestBudget added in v0.4.0

type IngestBudget struct {
	ID          string `json:"id,omitempty"`
	Name        string `json:"name"`
	FieldValue  string `json:"fieldValue"`
	Capacity    int    `json:"capacityBytes"`
	Timezone    string `json:"timezone"`
	ResetTime   string `json:"resetTime"`
	Description string `json:"description,omitempty"`
	Action      string `json:"action"`
}

type PollingAuthentication

type PollingAuthentication struct {
	Type    string `json:"type"`
	AwsID   string `json:"awsId"`
	AwsKey  string `json:"awsKey"`
	RoleARN string `json:"roleARN"`
}

type PollingPath

type PollingPath struct {
	Type           string `json:"type"`
	BucketName     string `json:"bucketName"`
	PathExpression string `json:"pathExpression"`
}

type PollingResource

type PollingResource struct {
	ServiceType    string                `json:"serviceType"`
	Authentication PollingAuthentication `json:"authentication"`
	Path           PollingPath           `json:"path"`
}

type PollingSource

type PollingSource struct {
	Source
	ContentType   string               `json:"contentType"`
	ScanInterval  int                  `json:"scanInterval"`
	Paused        bool                 `json:"paused"`
	URL           string               `json:"url"`
	ThirdPartyRef PollingThirdPartyRef `json:"thirdPartyRef,omitempty"`
}

type PollingThirdPartyRef

type PollingThirdPartyRef struct {
	Resources []PollingResource `json:"resources"`
}

type Role added in v0.3.0

type Role struct {
	ID              string   `json:"id,omitempty"`
	Name            string   `json:"name"`
	Description     string   `json:"description"`
	FilterPredicate string   `json:"filterPredicate"`
	Users           []string ` json:"users"`
	Capabilities    []string ` json:"capabilities"`
}

type RoleList added in v0.3.0

type RoleList struct {
	Roles []Role `json:"data"`
}

type Source

type Source struct {
	ID                         int                 `json:"id,omitempty"`
	Type                       string              `json:"sourceType"`
	Name                       string              `json:"name"`
	Description                string              `json:"description,omitempty"`
	Category                   string              `json:"category,omitempty"`
	HostName                   string              `json:"hostName,omitempty"`
	TimeZone                   string              `json:"timeZone,omitempty"`
	AutomaticDateParsing       bool                `json:"automaticDateParsing"`
	MultilineProcessingEnabled bool                `json:"multilineProcessingEnabled"`
	UseAutolineMatching        bool                `json:"useAutolineMatching"`
	ManualPrefixRegexp         string              `json:"manualPrefixRegexp,omitempty"`
	ForceTimeZone              bool                `json:"forceTimeZone"`
	DefaultDateFormats         []DefaultDateFormat `json:"defaultDateFormats,omitempty"`
	Filters                    []Filter            `json:"filters,omitempty"`
	CutoffTimestamp            int                 `json:"cutoffTimestamp,omitempty"`
	CutoffRelativeTime         string              `json:"cutoffRelativeTime,omitempty"`
}

type SourceList

type SourceList struct {
	Sources []Source `json:"sources"`
}

type User added in v0.4.0

type User struct {
	ID        string   `json:"id,omitempty"`
	FirstName string   `json:"firstName"`
	LastName  string   `json:"lastName"`
	Email     string   `json:"email,omitempty"`
	Active    bool     `json:"isActive"`
	RoleIds   []string `json:"roleIds"`
}

type UserList added in v0.4.0

type UserList struct {
	Users []User `json:"data"`
}

Jump to

Keyboard shortcuts

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