Documentation ¶
Overview ¶
Package metricsrouterv3 : Operations and models for the MetricsRouterV3 service
Index ¶
- Constants
- func GetServiceURLForRegion(region string) (string, error)
- func UnmarshalInclusionFilter(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalInclusionFilterPrototype(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalRoute(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalRouteCollection(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalRule(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalRulePrototype(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalSetting(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalTarget(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalTargetCollection(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalTargetIdentity(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalTargetReference(m map[string]json.RawMessage, result interface{}) (err error)
- type CreateRouteOptions
- type CreateTargetOptions
- func (_options *CreateTargetOptions) SetDestinationCRN(destinationCRN string) *CreateTargetOptions
- func (options *CreateTargetOptions) SetHeaders(param map[string]string) *CreateTargetOptions
- func (_options *CreateTargetOptions) SetName(name string) *CreateTargetOptions
- func (_options *CreateTargetOptions) SetRegion(region string) *CreateTargetOptions
- type DeleteRouteOptions
- type DeleteTargetOptions
- type GetRouteOptions
- type GetSettingsOptions
- type GetTargetOptions
- type InclusionFilter
- type InclusionFilterPrototype
- type ListRoutesOptions
- type ListTargetsOptions
- type MetricsRouterV3
- func (metricsRouter *MetricsRouterV3) Clone() *MetricsRouterV3
- func (metricsRouter *MetricsRouterV3) CreateRoute(createRouteOptions *CreateRouteOptions) (result *Route, response *core.DetailedResponse, err error)
- func (metricsRouter *MetricsRouterV3) CreateRouteWithContext(ctx context.Context, createRouteOptions *CreateRouteOptions) (result *Route, response *core.DetailedResponse, err error)
- func (metricsRouter *MetricsRouterV3) CreateTarget(createTargetOptions *CreateTargetOptions) (result *Target, response *core.DetailedResponse, err error)
- func (metricsRouter *MetricsRouterV3) CreateTargetWithContext(ctx context.Context, createTargetOptions *CreateTargetOptions) (result *Target, response *core.DetailedResponse, err error)
- func (metricsRouter *MetricsRouterV3) DeleteRoute(deleteRouteOptions *DeleteRouteOptions) (response *core.DetailedResponse, err error)
- func (metricsRouter *MetricsRouterV3) DeleteRouteWithContext(ctx context.Context, deleteRouteOptions *DeleteRouteOptions) (response *core.DetailedResponse, err error)
- func (metricsRouter *MetricsRouterV3) DeleteTarget(deleteTargetOptions *DeleteTargetOptions) (response *core.DetailedResponse, err error)
- func (metricsRouter *MetricsRouterV3) DeleteTargetWithContext(ctx context.Context, deleteTargetOptions *DeleteTargetOptions) (response *core.DetailedResponse, err error)
- func (metricsRouter *MetricsRouterV3) DisableRetries()
- func (metricsRouter *MetricsRouterV3) EnableRetries(maxRetries int, maxRetryInterval time.Duration)
- func (metricsRouter *MetricsRouterV3) GetEnableGzipCompression() bool
- func (metricsRouter *MetricsRouterV3) GetRoute(getRouteOptions *GetRouteOptions) (result *Route, response *core.DetailedResponse, err error)
- func (metricsRouter *MetricsRouterV3) GetRouteWithContext(ctx context.Context, getRouteOptions *GetRouteOptions) (result *Route, response *core.DetailedResponse, err error)
- func (metricsRouter *MetricsRouterV3) GetServiceURL() string
- func (metricsRouter *MetricsRouterV3) GetSettings(getSettingsOptions *GetSettingsOptions) (result *Setting, response *core.DetailedResponse, err error)
- func (metricsRouter *MetricsRouterV3) GetSettingsWithContext(ctx context.Context, getSettingsOptions *GetSettingsOptions) (result *Setting, response *core.DetailedResponse, err error)
- func (metricsRouter *MetricsRouterV3) GetTarget(getTargetOptions *GetTargetOptions) (result *Target, response *core.DetailedResponse, err error)
- func (metricsRouter *MetricsRouterV3) GetTargetWithContext(ctx context.Context, getTargetOptions *GetTargetOptions) (result *Target, response *core.DetailedResponse, err error)
- func (metricsRouter *MetricsRouterV3) ListRoutes(listRoutesOptions *ListRoutesOptions) (result *RouteCollection, response *core.DetailedResponse, err error)
- func (metricsRouter *MetricsRouterV3) ListRoutesWithContext(ctx context.Context, listRoutesOptions *ListRoutesOptions) (result *RouteCollection, response *core.DetailedResponse, err error)
- func (metricsRouter *MetricsRouterV3) ListTargets(listTargetsOptions *ListTargetsOptions) (result *TargetCollection, response *core.DetailedResponse, err error)
- func (metricsRouter *MetricsRouterV3) ListTargetsWithContext(ctx context.Context, listTargetsOptions *ListTargetsOptions) (result *TargetCollection, response *core.DetailedResponse, err error)
- func (*MetricsRouterV3) NewCreateRouteOptions(name string, rules []RulePrototype) *CreateRouteOptions
- func (*MetricsRouterV3) NewCreateTargetOptions(name string, destinationCRN string) *CreateTargetOptions
- func (*MetricsRouterV3) NewDeleteRouteOptions(id string) *DeleteRouteOptions
- func (*MetricsRouterV3) NewDeleteTargetOptions(id string) *DeleteTargetOptions
- func (*MetricsRouterV3) NewGetRouteOptions(id string) *GetRouteOptions
- func (*MetricsRouterV3) NewGetSettingsOptions() *GetSettingsOptions
- func (*MetricsRouterV3) NewGetTargetOptions(id string) *GetTargetOptions
- func (*MetricsRouterV3) NewInclusionFilterPrototype(operand string, operator string, values []string) (_model *InclusionFilterPrototype, err error)
- func (*MetricsRouterV3) NewListRoutesOptions() *ListRoutesOptions
- func (*MetricsRouterV3) NewListTargetsOptions() *ListTargetsOptions
- func (*MetricsRouterV3) NewRulePrototype(targets []TargetIdentity, inclusionFilters []InclusionFilterPrototype) (_model *RulePrototype, err error)
- func (*MetricsRouterV3) NewTargetIdentity(id string) (_model *TargetIdentity, err error)
- func (*MetricsRouterV3) NewUpdateRouteOptions(id string) *UpdateRouteOptions
- func (*MetricsRouterV3) NewUpdateSettingsOptions() *UpdateSettingsOptions
- func (*MetricsRouterV3) NewUpdateTargetOptions(id string) *UpdateTargetOptions
- func (metricsRouter *MetricsRouterV3) SetDefaultHeaders(headers http.Header)
- func (metricsRouter *MetricsRouterV3) SetEnableGzipCompression(enableGzip bool)
- func (metricsRouter *MetricsRouterV3) SetServiceURL(url string) error
- func (metricsRouter *MetricsRouterV3) UpdateRoute(updateRouteOptions *UpdateRouteOptions) (result *Route, response *core.DetailedResponse, err error)
- func (metricsRouter *MetricsRouterV3) UpdateRouteWithContext(ctx context.Context, updateRouteOptions *UpdateRouteOptions) (result *Route, response *core.DetailedResponse, err error)
- func (metricsRouter *MetricsRouterV3) UpdateSettings(updateSettingsOptions *UpdateSettingsOptions) (result *Setting, response *core.DetailedResponse, err error)
- func (metricsRouter *MetricsRouterV3) UpdateSettingsWithContext(ctx context.Context, updateSettingsOptions *UpdateSettingsOptions) (result *Setting, response *core.DetailedResponse, err error)
- func (metricsRouter *MetricsRouterV3) UpdateTarget(updateTargetOptions *UpdateTargetOptions) (result *Target, response *core.DetailedResponse, err error)
- func (metricsRouter *MetricsRouterV3) UpdateTargetWithContext(ctx context.Context, updateTargetOptions *UpdateTargetOptions) (result *Target, response *core.DetailedResponse, err error)
- type MetricsRouterV3Options
- type Route
- type RouteCollection
- type Rule
- type RulePrototype
- type Setting
- type Target
- type TargetCollection
- type TargetIdentity
- type TargetReference
- type UpdateRouteOptions
- func (options *UpdateRouteOptions) SetHeaders(param map[string]string) *UpdateRouteOptions
- func (_options *UpdateRouteOptions) SetID(id string) *UpdateRouteOptions
- func (_options *UpdateRouteOptions) SetName(name string) *UpdateRouteOptions
- func (_options *UpdateRouteOptions) SetRules(rules []RulePrototype) *UpdateRouteOptions
- type UpdateSettingsOptions
- func (_options *UpdateSettingsOptions) SetBackupMetadataRegion(backupMetadataRegion string) *UpdateSettingsOptions
- func (_options *UpdateSettingsOptions) SetDefaultTargets(defaultTargets []TargetIdentity) *UpdateSettingsOptions
- func (options *UpdateSettingsOptions) SetHeaders(param map[string]string) *UpdateSettingsOptions
- func (_options *UpdateSettingsOptions) SetPermittedTargetRegions(permittedTargetRegions []string) *UpdateSettingsOptions
- func (_options *UpdateSettingsOptions) SetPrimaryMetadataRegion(primaryMetadataRegion string) *UpdateSettingsOptions
- func (_options *UpdateSettingsOptions) SetPrivateAPIEndpointOnly(privateAPIEndpointOnly bool) *UpdateSettingsOptions
- type UpdateTargetOptions
- func (_options *UpdateTargetOptions) SetDestinationCRN(destinationCRN string) *UpdateTargetOptions
- func (options *UpdateTargetOptions) SetHeaders(param map[string]string) *UpdateTargetOptions
- func (_options *UpdateTargetOptions) SetID(id string) *UpdateTargetOptions
- func (_options *UpdateTargetOptions) SetName(name string) *UpdateTargetOptions
Constants ¶
const ( InclusionFilterOperandLocationConst = "location" InclusionFilterOperandResourceConst = "resource" InclusionFilterOperandResourceTypeConst = "resource_type" InclusionFilterOperandServiceInstanceConst = "service_instance" InclusionFilterOperandServiceNameConst = "service_name" )
Constants associated with the InclusionFilter.Operand property. Part of CRN that can be compared with values.
const ( InclusionFilterOperatorInConst = "in" InclusionFilterOperatorIsConst = "is" )
Constants associated with the InclusionFilter.Operator property. The operation to be performed between operand and the provided values. 'is' to be used with one value and 'in' can support upto 20 values in the array.
const ( InclusionFilterPrototypeOperandLocationConst = "location" InclusionFilterPrototypeOperandResourceConst = "resource" InclusionFilterPrototypeOperandResourceTypeConst = "resource_type" InclusionFilterPrototypeOperandServiceInstanceConst = "service_instance" InclusionFilterPrototypeOperandServiceNameConst = "service_name" )
Constants associated with the InclusionFilterPrototype.Operand property. Part of CRN that can be compared with values.
const ( InclusionFilterPrototypeOperatorInConst = "in" InclusionFilterPrototypeOperatorIsConst = "is" )
Constants associated with the InclusionFilterPrototype.Operator property. The operation to be performed between operand and the provided values. 'is' to be used with one value and 'in' can support upto 20 values in the array.
const ( RuleActionDropConst = "drop" RuleActionSendConst = "send" )
Constants associated with the Rule.Action property. The action if the inclusion_filters matches, default is `send` action.
const ( RulePrototypeActionDropConst = "drop" RulePrototypeActionSendConst = "send" )
Constants associated with the RulePrototype.Action property. The action if the inclusion_filters matches, default is `send` action.
const DefaultServiceName = "metrics_router"
DefaultServiceName is the default key used to find external configuration information.
const DefaultServiceURL = "https://au-syd.metrics-router.cloud.ibm.com/api/v3"
DefaultServiceURL is the default URL to make service requests to.
const (
TargetReferenceTargetTypeSysdigMonitorConst = "sysdig_monitor"
)
Constants associated with the TargetReference.TargetType property. The type of the target.
const (
TargetTargetTypeSysdigMonitorConst = "sysdig_monitor"
)
Constants associated with the Target.TargetType property. The type of the target.
Variables ¶
This section is empty.
Functions ¶
func GetServiceURLForRegion ¶
GetServiceURLForRegion returns the service URL to be used for the specified region
func UnmarshalInclusionFilter ¶
func UnmarshalInclusionFilter(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalInclusionFilter unmarshals an instance of InclusionFilter from the specified map of raw messages.
func UnmarshalInclusionFilterPrototype ¶
func UnmarshalInclusionFilterPrototype(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalInclusionFilterPrototype unmarshals an instance of InclusionFilterPrototype from the specified map of raw messages.
func UnmarshalRoute ¶
func UnmarshalRoute(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalRoute unmarshals an instance of Route from the specified map of raw messages.
func UnmarshalRouteCollection ¶
func UnmarshalRouteCollection(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalRouteCollection unmarshals an instance of RouteCollection from the specified map of raw messages.
func UnmarshalRule ¶
func UnmarshalRule(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalRule unmarshals an instance of Rule from the specified map of raw messages.
func UnmarshalRulePrototype ¶
func UnmarshalRulePrototype(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalRulePrototype unmarshals an instance of RulePrototype from the specified map of raw messages.
func UnmarshalSetting ¶
func UnmarshalSetting(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalSetting unmarshals an instance of Setting from the specified map of raw messages.
func UnmarshalTarget ¶
func UnmarshalTarget(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalTarget unmarshals an instance of Target from the specified map of raw messages.
func UnmarshalTargetCollection ¶
func UnmarshalTargetCollection(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalTargetCollection unmarshals an instance of TargetCollection from the specified map of raw messages.
func UnmarshalTargetIdentity ¶
func UnmarshalTargetIdentity(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalTargetIdentity unmarshals an instance of TargetIdentity from the specified map of raw messages.
func UnmarshalTargetReference ¶
func UnmarshalTargetReference(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalTargetReference unmarshals an instance of TargetReference from the specified map of raw messages.
Types ¶
type CreateRouteOptions ¶
type CreateRouteOptions struct { // The name of the route. The name must be 1000 characters or less and cannot include any special characters other than // `(space) - . _ :`. Do not include any personal identifying information (PII) in any resource names. Name *string `json:"name" validate:"required"` // Routing rules that will be evaluated in their order of the array. Rules []RulePrototype `json:"rules" validate:"required"` // Allows users to set headers on API requests Headers map[string]string }
CreateRouteOptions : The CreateRoute options.
func (*CreateRouteOptions) SetHeaders ¶
func (options *CreateRouteOptions) SetHeaders(param map[string]string) *CreateRouteOptions
SetHeaders : Allow user to set Headers
func (*CreateRouteOptions) SetName ¶
func (_options *CreateRouteOptions) SetName(name string) *CreateRouteOptions
SetName : Allow user to set Name
func (*CreateRouteOptions) SetRules ¶
func (_options *CreateRouteOptions) SetRules(rules []RulePrototype) *CreateRouteOptions
SetRules : Allow user to set Rules
type CreateTargetOptions ¶
type CreateTargetOptions struct { // The name of the target. The name must be 1000 characters or less, and cannot include any special characters other // than `(space) - . _ :`. Do not include any personal identifying information (PII) in any resource names. Name *string `json:"name" validate:"required"` // The CRN of a destination service instance or resource. DestinationCRN *string `json:"destination_crn" validate:"required"` // Include this optional field if you want to create a target in a different region other than the one you are // connected. Region *string `json:"region,omitempty"` // Allows users to set headers on API requests Headers map[string]string }
CreateTargetOptions : The CreateTarget options.
func (*CreateTargetOptions) SetDestinationCRN ¶
func (_options *CreateTargetOptions) SetDestinationCRN(destinationCRN string) *CreateTargetOptions
SetDestinationCRN : Allow user to set DestinationCRN
func (*CreateTargetOptions) SetHeaders ¶
func (options *CreateTargetOptions) SetHeaders(param map[string]string) *CreateTargetOptions
SetHeaders : Allow user to set Headers
func (*CreateTargetOptions) SetName ¶
func (_options *CreateTargetOptions) SetName(name string) *CreateTargetOptions
SetName : Allow user to set Name
func (*CreateTargetOptions) SetRegion ¶
func (_options *CreateTargetOptions) SetRegion(region string) *CreateTargetOptions
SetRegion : Allow user to set Region
type DeleteRouteOptions ¶
type DeleteRouteOptions struct { // The v4 UUID that uniquely identifies the route. ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string }
DeleteRouteOptions : The DeleteRoute options.
func (*DeleteRouteOptions) SetHeaders ¶
func (options *DeleteRouteOptions) SetHeaders(param map[string]string) *DeleteRouteOptions
SetHeaders : Allow user to set Headers
func (*DeleteRouteOptions) SetID ¶
func (_options *DeleteRouteOptions) SetID(id string) *DeleteRouteOptions
SetID : Allow user to set ID
type DeleteTargetOptions ¶
type DeleteTargetOptions struct { // The v4 UUID that uniquely identifies the target. ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string }
DeleteTargetOptions : The DeleteTarget options.
func (*DeleteTargetOptions) SetHeaders ¶
func (options *DeleteTargetOptions) SetHeaders(param map[string]string) *DeleteTargetOptions
SetHeaders : Allow user to set Headers
func (*DeleteTargetOptions) SetID ¶
func (_options *DeleteTargetOptions) SetID(id string) *DeleteTargetOptions
SetID : Allow user to set ID
type GetRouteOptions ¶
type GetRouteOptions struct { // The v4 UUID that uniquely identifies the route. ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string }
GetRouteOptions : The GetRoute options.
func (*GetRouteOptions) SetHeaders ¶
func (options *GetRouteOptions) SetHeaders(param map[string]string) *GetRouteOptions
SetHeaders : Allow user to set Headers
func (*GetRouteOptions) SetID ¶
func (_options *GetRouteOptions) SetID(id string) *GetRouteOptions
SetID : Allow user to set ID
type GetSettingsOptions ¶
type GetSettingsOptions struct { // Allows users to set headers on API requests Headers map[string]string }
GetSettingsOptions : The GetSettings options.
func (*GetSettingsOptions) SetHeaders ¶
func (options *GetSettingsOptions) SetHeaders(param map[string]string) *GetSettingsOptions
SetHeaders : Allow user to set Headers
type GetTargetOptions ¶
type GetTargetOptions struct { // The v4 UUID that uniquely identifies the target. ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string }
GetTargetOptions : The GetTarget options.
func (*GetTargetOptions) SetHeaders ¶
func (options *GetTargetOptions) SetHeaders(param map[string]string) *GetTargetOptions
SetHeaders : Allow user to set Headers
func (*GetTargetOptions) SetID ¶
func (_options *GetTargetOptions) SetID(id string) *GetTargetOptions
SetID : Allow user to set ID
type InclusionFilter ¶
type InclusionFilter struct { // Part of CRN that can be compared with values. Operand *string `json:"operand" validate:"required"` // The operation to be performed between operand and the provided values. 'is' to be used with one value and 'in' can // support upto 20 values in the array. Operator *string `json:"operator" validate:"required"` // The provided string values of the operand to be compared with. Values []string `json:"values" validate:"required"` }
InclusionFilter : A list of conditions to be satisfied for routing metrics to pre-defined target.
type InclusionFilterPrototype ¶
type InclusionFilterPrototype struct { // Part of CRN that can be compared with values. Operand *string `json:"operand" validate:"required"` // The operation to be performed between operand and the provided values. 'is' to be used with one value and 'in' can // support upto 20 values in the array. Operator *string `json:"operator" validate:"required"` // The provided string values of the operand to be compared with. Values []string `json:"values" validate:"required"` }
InclusionFilterPrototype : A list of conditions to be satisfied for routing metrics to pre-defined targets.
type ListRoutesOptions ¶
type ListRoutesOptions struct { // Allows users to set headers on API requests Headers map[string]string }
ListRoutesOptions : The ListRoutes options.
func (*ListRoutesOptions) SetHeaders ¶
func (options *ListRoutesOptions) SetHeaders(param map[string]string) *ListRoutesOptions
SetHeaders : Allow user to set Headers
type ListTargetsOptions ¶
type ListTargetsOptions struct { // Allows users to set headers on API requests Headers map[string]string }
ListTargetsOptions : The ListTargets options.
func (*ListTargetsOptions) SetHeaders ¶
func (options *ListTargetsOptions) SetHeaders(param map[string]string) *ListTargetsOptions
SetHeaders : Allow user to set Headers
type MetricsRouterV3 ¶
type MetricsRouterV3 struct {
Service *core.BaseService
}
MetricsRouterV3 : IBM Cloud Metrics Routing allows you to configure how to route platform metrics in your account.
API Version: 3.0.0
func NewMetricsRouterV3 ¶
func NewMetricsRouterV3(options *MetricsRouterV3Options) (service *MetricsRouterV3, err error)
NewMetricsRouterV3 : constructs an instance of MetricsRouterV3 with passed in options.
func NewMetricsRouterV3UsingExternalConfig ¶
func NewMetricsRouterV3UsingExternalConfig(options *MetricsRouterV3Options) (metricsRouter *MetricsRouterV3, err error)
NewMetricsRouterV3UsingExternalConfig : constructs an instance of MetricsRouterV3 with passed in options and external configuration.
func (*MetricsRouterV3) Clone ¶
func (metricsRouter *MetricsRouterV3) Clone() *MetricsRouterV3
Clone makes a copy of "metricsRouter" suitable for processing requests.
func (*MetricsRouterV3) CreateRoute ¶
func (metricsRouter *MetricsRouterV3) CreateRoute(createRouteOptions *CreateRouteOptions) (result *Route, response *core.DetailedResponse, err error)
CreateRoute : Create a route Create a route with rules that specify how to manage platform metrics routing.
func (*MetricsRouterV3) CreateRouteWithContext ¶
func (metricsRouter *MetricsRouterV3) CreateRouteWithContext(ctx context.Context, createRouteOptions *CreateRouteOptions) (result *Route, response *core.DetailedResponse, err error)
CreateRouteWithContext is an alternate form of the CreateRoute method which supports a Context parameter
func (*MetricsRouterV3) CreateTarget ¶
func (metricsRouter *MetricsRouterV3) CreateTarget(createTargetOptions *CreateTargetOptions) (result *Target, response *core.DetailedResponse, err error)
CreateTarget : Create a target Creates a target that includes information about the destination required to write platform metrics to that target. You can send your platform metrics from all regions to a single target, different targets or multiple targets. One target per region is not required. You can define up to 16 targets per account.
func (*MetricsRouterV3) CreateTargetWithContext ¶
func (metricsRouter *MetricsRouterV3) CreateTargetWithContext(ctx context.Context, createTargetOptions *CreateTargetOptions) (result *Target, response *core.DetailedResponse, err error)
CreateTargetWithContext is an alternate form of the CreateTarget method which supports a Context parameter
func (*MetricsRouterV3) DeleteRoute ¶
func (metricsRouter *MetricsRouterV3) DeleteRoute(deleteRouteOptions *DeleteRouteOptions) (response *core.DetailedResponse, err error)
DeleteRoute : Delete a route Deletes a route.
func (*MetricsRouterV3) DeleteRouteWithContext ¶
func (metricsRouter *MetricsRouterV3) DeleteRouteWithContext(ctx context.Context, deleteRouteOptions *DeleteRouteOptions) (response *core.DetailedResponse, err error)
DeleteRouteWithContext is an alternate form of the DeleteRoute method which supports a Context parameter
func (*MetricsRouterV3) DeleteTarget ¶
func (metricsRouter *MetricsRouterV3) DeleteTarget(deleteTargetOptions *DeleteTargetOptions) (response *core.DetailedResponse, err error)
DeleteTarget : Delete a target Delete a target.
func (*MetricsRouterV3) DeleteTargetWithContext ¶
func (metricsRouter *MetricsRouterV3) DeleteTargetWithContext(ctx context.Context, deleteTargetOptions *DeleteTargetOptions) (response *core.DetailedResponse, err error)
DeleteTargetWithContext is an alternate form of the DeleteTarget method which supports a Context parameter
func (*MetricsRouterV3) DisableRetries ¶
func (metricsRouter *MetricsRouterV3) DisableRetries()
DisableRetries disables automatic retries for requests invoked for this service instance.
func (*MetricsRouterV3) EnableRetries ¶
func (metricsRouter *MetricsRouterV3) EnableRetries(maxRetries int, maxRetryInterval time.Duration)
EnableRetries enables automatic retries for requests invoked for this service instance. If either parameter is specified as 0, then a default value is used instead.
func (*MetricsRouterV3) GetEnableGzipCompression ¶
func (metricsRouter *MetricsRouterV3) GetEnableGzipCompression() bool
GetEnableGzipCompression returns the service's EnableGzipCompression field
func (*MetricsRouterV3) GetRoute ¶
func (metricsRouter *MetricsRouterV3) GetRoute(getRouteOptions *GetRouteOptions) (result *Route, response *core.DetailedResponse, err error)
GetRoute : Get details of a route Get the configuration details of a route.
func (*MetricsRouterV3) GetRouteWithContext ¶
func (metricsRouter *MetricsRouterV3) GetRouteWithContext(ctx context.Context, getRouteOptions *GetRouteOptions) (result *Route, response *core.DetailedResponse, err error)
GetRouteWithContext is an alternate form of the GetRoute method which supports a Context parameter
func (*MetricsRouterV3) GetServiceURL ¶
func (metricsRouter *MetricsRouterV3) GetServiceURL() string
GetServiceURL returns the service URL
func (*MetricsRouterV3) GetSettings ¶
func (metricsRouter *MetricsRouterV3) GetSettings(getSettingsOptions *GetSettingsOptions) (result *Setting, response *core.DetailedResponse, err error)
GetSettings : Get settings Get information about the current account level settings for Metrics Routing service.
func (*MetricsRouterV3) GetSettingsWithContext ¶
func (metricsRouter *MetricsRouterV3) GetSettingsWithContext(ctx context.Context, getSettingsOptions *GetSettingsOptions) (result *Setting, response *core.DetailedResponse, err error)
GetSettingsWithContext is an alternate form of the GetSettings method which supports a Context parameter
func (*MetricsRouterV3) GetTarget ¶
func (metricsRouter *MetricsRouterV3) GetTarget(getTargetOptions *GetTargetOptions) (result *Target, response *core.DetailedResponse, err error)
GetTarget : Get details of a target Retrieve the configuration details of a target.
func (*MetricsRouterV3) GetTargetWithContext ¶
func (metricsRouter *MetricsRouterV3) GetTargetWithContext(ctx context.Context, getTargetOptions *GetTargetOptions) (result *Target, response *core.DetailedResponse, err error)
GetTargetWithContext is an alternate form of the GetTarget method which supports a Context parameter
func (*MetricsRouterV3) ListRoutes ¶
func (metricsRouter *MetricsRouterV3) ListRoutes(listRoutesOptions *ListRoutesOptions) (result *RouteCollection, response *core.DetailedResponse, err error)
ListRoutes : List routes List the routes that are configured for an account.
func (*MetricsRouterV3) ListRoutesWithContext ¶
func (metricsRouter *MetricsRouterV3) ListRoutesWithContext(ctx context.Context, listRoutesOptions *ListRoutesOptions) (result *RouteCollection, response *core.DetailedResponse, err error)
ListRoutesWithContext is an alternate form of the ListRoutes method which supports a Context parameter
func (*MetricsRouterV3) ListTargets ¶
func (metricsRouter *MetricsRouterV3) ListTargets(listTargetsOptions *ListTargetsOptions) (result *TargetCollection, response *core.DetailedResponse, err error)
ListTargets : List targets List all targets that are defined for your account.
func (*MetricsRouterV3) ListTargetsWithContext ¶
func (metricsRouter *MetricsRouterV3) ListTargetsWithContext(ctx context.Context, listTargetsOptions *ListTargetsOptions) (result *TargetCollection, response *core.DetailedResponse, err error)
ListTargetsWithContext is an alternate form of the ListTargets method which supports a Context parameter
func (*MetricsRouterV3) NewCreateRouteOptions ¶
func (*MetricsRouterV3) NewCreateRouteOptions(name string, rules []RulePrototype) *CreateRouteOptions
NewCreateRouteOptions : Instantiate CreateRouteOptions
func (*MetricsRouterV3) NewCreateTargetOptions ¶
func (*MetricsRouterV3) NewCreateTargetOptions(name string, destinationCRN string) *CreateTargetOptions
NewCreateTargetOptions : Instantiate CreateTargetOptions
func (*MetricsRouterV3) NewDeleteRouteOptions ¶
func (*MetricsRouterV3) NewDeleteRouteOptions(id string) *DeleteRouteOptions
NewDeleteRouteOptions : Instantiate DeleteRouteOptions
func (*MetricsRouterV3) NewDeleteTargetOptions ¶
func (*MetricsRouterV3) NewDeleteTargetOptions(id string) *DeleteTargetOptions
NewDeleteTargetOptions : Instantiate DeleteTargetOptions
func (*MetricsRouterV3) NewGetRouteOptions ¶
func (*MetricsRouterV3) NewGetRouteOptions(id string) *GetRouteOptions
NewGetRouteOptions : Instantiate GetRouteOptions
func (*MetricsRouterV3) NewGetSettingsOptions ¶
func (*MetricsRouterV3) NewGetSettingsOptions() *GetSettingsOptions
NewGetSettingsOptions : Instantiate GetSettingsOptions
func (*MetricsRouterV3) NewGetTargetOptions ¶
func (*MetricsRouterV3) NewGetTargetOptions(id string) *GetTargetOptions
NewGetTargetOptions : Instantiate GetTargetOptions
func (*MetricsRouterV3) NewInclusionFilterPrototype ¶
func (*MetricsRouterV3) NewInclusionFilterPrototype(operand string, operator string, values []string) (_model *InclusionFilterPrototype, err error)
NewInclusionFilterPrototype : Instantiate InclusionFilterPrototype (Generic Model Constructor)
func (*MetricsRouterV3) NewListRoutesOptions ¶
func (*MetricsRouterV3) NewListRoutesOptions() *ListRoutesOptions
NewListRoutesOptions : Instantiate ListRoutesOptions
func (*MetricsRouterV3) NewListTargetsOptions ¶
func (*MetricsRouterV3) NewListTargetsOptions() *ListTargetsOptions
NewListTargetsOptions : Instantiate ListTargetsOptions
func (*MetricsRouterV3) NewRulePrototype ¶
func (*MetricsRouterV3) NewRulePrototype(targets []TargetIdentity, inclusionFilters []InclusionFilterPrototype) (_model *RulePrototype, err error)
NewRulePrototype : Instantiate RulePrototype (Generic Model Constructor)
func (*MetricsRouterV3) NewTargetIdentity ¶
func (*MetricsRouterV3) NewTargetIdentity(id string) (_model *TargetIdentity, err error)
NewTargetIdentity : Instantiate TargetIdentity (Generic Model Constructor)
func (*MetricsRouterV3) NewUpdateRouteOptions ¶
func (*MetricsRouterV3) NewUpdateRouteOptions(id string) *UpdateRouteOptions
NewUpdateRouteOptions : Instantiate UpdateRouteOptions
func (*MetricsRouterV3) NewUpdateSettingsOptions ¶
func (*MetricsRouterV3) NewUpdateSettingsOptions() *UpdateSettingsOptions
NewUpdateSettingsOptions : Instantiate UpdateSettingsOptions
func (*MetricsRouterV3) NewUpdateTargetOptions ¶
func (*MetricsRouterV3) NewUpdateTargetOptions(id string) *UpdateTargetOptions
NewUpdateTargetOptions : Instantiate UpdateTargetOptions
func (*MetricsRouterV3) SetDefaultHeaders ¶
func (metricsRouter *MetricsRouterV3) SetDefaultHeaders(headers http.Header)
SetDefaultHeaders sets HTTP headers to be sent in every request
func (*MetricsRouterV3) SetEnableGzipCompression ¶
func (metricsRouter *MetricsRouterV3) SetEnableGzipCompression(enableGzip bool)
SetEnableGzipCompression sets the service's EnableGzipCompression field
func (*MetricsRouterV3) SetServiceURL ¶
func (metricsRouter *MetricsRouterV3) SetServiceURL(url string) error
SetServiceURL sets the service URL
func (*MetricsRouterV3) UpdateRoute ¶
func (metricsRouter *MetricsRouterV3) UpdateRoute(updateRouteOptions *UpdateRouteOptions) (result *Route, response *core.DetailedResponse, err error)
UpdateRoute : Update a route Update the configuration details of a route.
func (*MetricsRouterV3) UpdateRouteWithContext ¶
func (metricsRouter *MetricsRouterV3) UpdateRouteWithContext(ctx context.Context, updateRouteOptions *UpdateRouteOptions) (result *Route, response *core.DetailedResponse, err error)
UpdateRouteWithContext is an alternate form of the UpdateRoute method which supports a Context parameter
func (*MetricsRouterV3) UpdateSettings ¶
func (metricsRouter *MetricsRouterV3) UpdateSettings(updateSettingsOptions *UpdateSettingsOptions) (result *Setting, response *core.DetailedResponse, err error)
UpdateSettings : Modify settings Modify the current account level settings such as default targets, permitted target regions, metadata region primary and secondary.
func (*MetricsRouterV3) UpdateSettingsWithContext ¶
func (metricsRouter *MetricsRouterV3) UpdateSettingsWithContext(ctx context.Context, updateSettingsOptions *UpdateSettingsOptions) (result *Setting, response *core.DetailedResponse, err error)
UpdateSettingsWithContext is an alternate form of the UpdateSettings method which supports a Context parameter
func (*MetricsRouterV3) UpdateTarget ¶
func (metricsRouter *MetricsRouterV3) UpdateTarget(updateTargetOptions *UpdateTargetOptions) (result *Target, response *core.DetailedResponse, err error)
UpdateTarget : Update a target Update the configuration details of a target.
func (*MetricsRouterV3) UpdateTargetWithContext ¶
func (metricsRouter *MetricsRouterV3) UpdateTargetWithContext(ctx context.Context, updateTargetOptions *UpdateTargetOptions) (result *Target, response *core.DetailedResponse, err error)
UpdateTargetWithContext is an alternate form of the UpdateTarget method which supports a Context parameter
type MetricsRouterV3Options ¶
type MetricsRouterV3Options struct { ServiceName string URL string Authenticator core.Authenticator }
MetricsRouterV3Options : Service options
type Route ¶
type Route struct { // The UUID of the route resource. ID *string `json:"id" validate:"required"` // The name of the route. Name *string `json:"name" validate:"required"` // The crn of the route resource. CRN *string `json:"crn" validate:"required"` // The routing rules that will be evaluated in their order of the array. Once a rule is matched, the remaining rules in // the route definition will be skipped. Rules []Rule `json:"rules" validate:"required"` // The timestamp of the route creation time. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // The timestamp of the route last updated time. UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"` }
Route : The route resource. The scope of the route is account wide. That means all the routes are evaluated in all regions, except the ones limited by region.
type RouteCollection ¶
type RouteCollection struct { // A list of route resources. Routes []Route `json:"routes" validate:"required"` }
RouteCollection : A list of route resources.
type Rule ¶
type Rule struct { // The action if the inclusion_filters matches, default is `send` action. Action *string `json:"action,omitempty"` // The target ID List. All the metrics will be sent to all targets listed in the rule. You can include targets from // other regions. Targets []TargetReference `json:"targets" validate:"required"` // A list of conditions to be satisfied for routing metrics to pre-defined target. InclusionFilters []InclusionFilter `json:"inclusion_filters" validate:"required"` }
Rule : A configuration to route metrics to pre-defined target.
type RulePrototype ¶
type RulePrototype struct { // The action if the inclusion_filters matches, default is `send` action. Action *string `json:"action,omitempty"` // A collection of targets with ID in the request. Targets []TargetIdentity `json:"targets" validate:"required"` // A list of conditions to be satisfied for routing metrics to pre-defined target. InclusionFilters []InclusionFilterPrototype `json:"inclusion_filters" validate:"required"` }
RulePrototype : A configuration to route metrics to pre-defined target.
type Setting ¶
type Setting struct { // A list of default target references. DefaultTargets []TargetReference `json:"default_targets" validate:"required"` // If present then only these regions may be used to define a target. PermittedTargetRegions []string `json:"permitted_target_regions" validate:"required"` // To store all your meta data in a single region. PrimaryMetadataRegion *string `json:"primary_metadata_region" validate:"required"` // To backup all your meta data in a different region. BackupMetadataRegion *string `json:"backup_metadata_region,omitempty"` // If you set this true then you cannot access api through public network. PrivateAPIEndpointOnly *bool `json:"private_api_endpoint_only" validate:"required"` }
Setting : Metrics routing settings response.
type Target ¶
type Target struct { // The UUID of the target resource. ID *string `json:"id" validate:"required"` // The name of the target resource. Name *string `json:"name" validate:"required"` // The crn of the target resource. CRN *string `json:"crn" validate:"required"` // The CRN of the destination service instance or resource. DestinationCRN *string `json:"destination_crn" validate:"required"` // The type of the target. TargetType *string `json:"target_type" validate:"required"` // Include this optional field if you used it to create a target in a different region other than the one you are // connected. Region *string `json:"region,omitempty"` // The timestamp of the target creation time. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // The timestamp of the target last updated time. UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"` }
Target : Property values for a target in responses.
type TargetCollection ¶
type TargetCollection struct { // A list of target resources. Targets []Target `json:"targets" validate:"required"` }
TargetCollection : A list of target resources.
type TargetIdentity ¶
type TargetIdentity struct { // The target uuid for a pre-defined metrics router target. ID *string `json:"id" validate:"required"` }
TargetIdentity : A configuration to route metrics to pre-defined target.
type TargetReference ¶
type TargetReference struct { // The target uuid for a pre-defined metrics router target. ID *string `json:"id" validate:"required"` // The CRN of a pre-defined metrics-router target. CRN *string `json:"crn" validate:"required"` // The name of a pre-defined metrics-router target. Name *string `json:"name" validate:"required"` // The type of the target. TargetType *string `json:"target_type" validate:"required"` }
TargetReference : A configuration to route metrics to pre-defined target.
type UpdateRouteOptions ¶
type UpdateRouteOptions struct { // The v4 UUID that uniquely identifies the route. ID *string `json:"id" validate:"required,ne="` // The name of the route. The name must be 1000 characters or less and cannot include any special characters other than // `(space) - . _ :`. Do not include any personal identifying information (PII) in any resource names. Name *string `json:"name,omitempty"` // Routing rules that will be evaluated in their order of the array. Rules []RulePrototype `json:"rules,omitempty"` // Allows users to set headers on API requests Headers map[string]string }
UpdateRouteOptions : The UpdateRoute options.
func (*UpdateRouteOptions) SetHeaders ¶
func (options *UpdateRouteOptions) SetHeaders(param map[string]string) *UpdateRouteOptions
SetHeaders : Allow user to set Headers
func (*UpdateRouteOptions) SetID ¶
func (_options *UpdateRouteOptions) SetID(id string) *UpdateRouteOptions
SetID : Allow user to set ID
func (*UpdateRouteOptions) SetName ¶
func (_options *UpdateRouteOptions) SetName(name string) *UpdateRouteOptions
SetName : Allow user to set Name
func (*UpdateRouteOptions) SetRules ¶
func (_options *UpdateRouteOptions) SetRules(rules []RulePrototype) *UpdateRouteOptions
SetRules : Allow user to set Rules
type UpdateSettingsOptions ¶
type UpdateSettingsOptions struct { // A list of default target references. DefaultTargets []TargetIdentity `json:"default_targets,omitempty"` // If present then only these regions may be used to define a target. PermittedTargetRegions []string `json:"permitted_target_regions,omitempty"` // To store all your meta data in a single region. PrimaryMetadataRegion *string `json:"primary_metadata_region,omitempty"` // To backup all your meta data in a different region. BackupMetadataRegion *string `json:"backup_metadata_region,omitempty"` // If you set this true then you cannot access api through public network. PrivateAPIEndpointOnly *bool `json:"private_api_endpoint_only,omitempty"` // Allows users to set headers on API requests Headers map[string]string }
UpdateSettingsOptions : The UpdateSettings options.
func (*UpdateSettingsOptions) SetBackupMetadataRegion ¶
func (_options *UpdateSettingsOptions) SetBackupMetadataRegion(backupMetadataRegion string) *UpdateSettingsOptions
SetBackupMetadataRegion : Allow user to set BackupMetadataRegion
func (*UpdateSettingsOptions) SetDefaultTargets ¶
func (_options *UpdateSettingsOptions) SetDefaultTargets(defaultTargets []TargetIdentity) *UpdateSettingsOptions
SetDefaultTargets : Allow user to set DefaultTargets
func (*UpdateSettingsOptions) SetHeaders ¶
func (options *UpdateSettingsOptions) SetHeaders(param map[string]string) *UpdateSettingsOptions
SetHeaders : Allow user to set Headers
func (*UpdateSettingsOptions) SetPermittedTargetRegions ¶
func (_options *UpdateSettingsOptions) SetPermittedTargetRegions(permittedTargetRegions []string) *UpdateSettingsOptions
SetPermittedTargetRegions : Allow user to set PermittedTargetRegions
func (*UpdateSettingsOptions) SetPrimaryMetadataRegion ¶
func (_options *UpdateSettingsOptions) SetPrimaryMetadataRegion(primaryMetadataRegion string) *UpdateSettingsOptions
SetPrimaryMetadataRegion : Allow user to set PrimaryMetadataRegion
func (*UpdateSettingsOptions) SetPrivateAPIEndpointOnly ¶
func (_options *UpdateSettingsOptions) SetPrivateAPIEndpointOnly(privateAPIEndpointOnly bool) *UpdateSettingsOptions
SetPrivateAPIEndpointOnly : Allow user to set PrivateAPIEndpointOnly
type UpdateTargetOptions ¶
type UpdateTargetOptions struct { // The v4 UUID that uniquely identifies the target. ID *string `json:"id" validate:"required,ne="` // The name of the target. The name must be 1000 characters or less, and cannot include any special characters other // than `(space) - . _ :`. Do not include any personal identifying information (PII) in any resource names. Name *string `json:"name,omitempty"` // The CRN of the destination service instance or resource. DestinationCRN *string `json:"destination_crn,omitempty"` // Allows users to set headers on API requests Headers map[string]string }
UpdateTargetOptions : The UpdateTarget options.
func (*UpdateTargetOptions) SetDestinationCRN ¶
func (_options *UpdateTargetOptions) SetDestinationCRN(destinationCRN string) *UpdateTargetOptions
SetDestinationCRN : Allow user to set DestinationCRN
func (*UpdateTargetOptions) SetHeaders ¶
func (options *UpdateTargetOptions) SetHeaders(param map[string]string) *UpdateTargetOptions
SetHeaders : Allow user to set Headers
func (*UpdateTargetOptions) SetID ¶
func (_options *UpdateTargetOptions) SetID(id string) *UpdateTargetOptions
SetID : Allow user to set ID
func (*UpdateTargetOptions) SetName ¶
func (_options *UpdateTargetOptions) SetName(name string) *UpdateTargetOptions
SetName : Allow user to set Name