public

package
v0.0.0-...-9b598c7 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

Types

type APIClient

type APIClient struct {
	DefaultApi *DefaultApiService

	EnterpriseDataplaneClustersApi *EnterpriseDataplaneClustersApiService

	ErrorsApi *ErrorsApiService

	SecurityApi *SecurityApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the Kafka Management API API v1.16.0 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

ChangeBasePath changes base path to allow switching to mocks

func (*APIClient) GetConfig

func (c *APIClient) GetConfig() *Configuration

Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the OpenAPI operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

APIResponse stores the API response returned by the server.

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

NewAPIResponse returns a new APIResonse object.

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

NewAPIResponseWithError returns a new APIResponse object with the provided error message.

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type CloudProvider

type CloudProvider struct {
	// Indicates the type of this object. Will be 'CloudProvider' link.
	Kind string `json:"kind,omitempty"`
	// Unique identifier of the object.
	Id string `json:"id,omitempty"`
	// Name of the cloud provider for display purposes.
	DisplayName string `json:"display_name,omitempty"`
	// Human friendly identifier of the cloud provider, for example `aws`.
	Name string `json:"name,omitempty"`
	// Whether the cloud provider is enabled for deploying an OSD cluster.
	Enabled bool `json:"enabled"`
}

CloudProvider Cloud provider.

type CloudProviderList

type CloudProviderList struct {
	Kind  string          `json:"kind"`
	Page  int32           `json:"page"`
	Size  int32           `json:"size"`
	Total int32           `json:"total"`
	Items []CloudProvider `json:"items"`
}

CloudProviderList struct for CloudProviderList

type CloudRegion

type CloudRegion struct {
	// Indicates the type of this object. Will be 'CloudRegion'.
	Kind string `json:"kind,omitempty"`
	// Unique identifier of the object.
	Id string `json:"id,omitempty"`
	// Name of the region for display purposes, for example `N. Virginia`.
	DisplayName string `json:"display_name,omitempty"`
	// Whether the region is enabled for deploying an OSD cluster.
	Enabled bool `json:"enabled"`
	// Indicates whether there is capacity left per instance type
	Capacity []RegionCapacityListItem `json:"capacity"`
}

CloudRegion Description of a region of a cloud provider.

type CloudRegionList

type CloudRegionList struct {
	Kind  string        `json:"kind"`
	Page  int32         `json:"page"`
	Size  int32         `json:"size"`
	Total int32         `json:"total"`
	Items []CloudRegion `json:"items"`
}

CloudRegionList struct for CloudRegionList

type Configuration

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	Debug         bool              `json:"debug,omitempty"`
	Servers       []ServerConfiguration
	HTTPClient    *http.Client
}

Configuration stores the configuration of the API client

func NewConfiguration

func NewConfiguration() *Configuration

NewConfiguration returns a new Configuration object

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

AddDefaultHeader adds a new HTTP header to the default header in the request

func (*Configuration) ServerUrl

func (c *Configuration) ServerUrl(index int, variables map[string]string) (string, error)

ServerUrl returns URL based on server settings

type DefaultApiService

type DefaultApiService service

DefaultApiService DefaultApi service

func (*DefaultApiService) CreateKafka

func (a *DefaultApiService) CreateKafka(ctx _context.Context, async bool, kafkaRequestPayload KafkaRequestPayload) (KafkaRequest, *_nethttp.Response, error)

CreateKafka Method for CreateKafka Creates a Kafka request

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param async Perform the action in an asynchronous manner
  • @param kafkaRequestPayload Kafka data

@return KafkaRequest

func (*DefaultApiService) DeleteKafkaById

func (a *DefaultApiService) DeleteKafkaById(ctx _context.Context, id string, async bool) (Error, *_nethttp.Response, error)

DeleteKafkaById Method for DeleteKafkaById Deletes a Kafka request by ID

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The ID of record
  • @param async Perform the action in an asynchronous manner

@return Error

func (*DefaultApiService) FederateMetrics

func (a *DefaultApiService) FederateMetrics(ctx _context.Context, id string) (string, *_nethttp.Response, error)

FederateMetrics Method for FederateMetrics Returns all metrics in scrapeable format for a given kafka id

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The ID of record

@return string

func (*DefaultApiService) GetCloudProviderRegions

func (a *DefaultApiService) GetCloudProviderRegions(ctx _context.Context, id string, localVarOptionals *GetCloudProviderRegionsOpts) (CloudRegionList, *_nethttp.Response, error)

GetCloudProviderRegions Method for GetCloudProviderRegions Returns the list of supported regions of the supported cloud provider

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The ID of record
  • @param optional nil or *GetCloudProviderRegionsOpts - Optional Parameters:
  • @param "Page" (optional.String) - Page index
  • @param "Size" (optional.String) - Number of items in each page

@return CloudRegionList

func (*DefaultApiService) GetCloudProviders

func (a *DefaultApiService) GetCloudProviders(ctx _context.Context, localVarOptionals *GetCloudProvidersOpts) (CloudProviderList, *_nethttp.Response, error)

GetCloudProviders Method for GetCloudProviders Returns the list of supported cloud providers

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *GetCloudProvidersOpts - Optional Parameters:
  • @param "Page" (optional.String) - Page index
  • @param "Size" (optional.String) - Number of items in each page

@return CloudProviderList

func (*DefaultApiService) GetInstanceTypesByCloudProviderAndRegion

func (a *DefaultApiService) GetInstanceTypesByCloudProviderAndRegion(ctx _context.Context, cloudProvider string, cloudRegion string) (SupportedKafkaInstanceTypesList, *_nethttp.Response, error)

GetInstanceTypesByCloudProviderAndRegion Method for GetInstanceTypesByCloudProviderAndRegion Returns the list of supported Kafka instance types and sizes filtered by cloud provider and region

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param cloudProvider ID of the supported cloud provider
  • @param cloudRegion Name of the supported cloud provider region

@return SupportedKafkaInstanceTypesList

func (*DefaultApiService) GetKafkaById

GetKafkaById Method for GetKafkaById Returns a Kafka request by ID

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The ID of record

@return KafkaRequest

func (*DefaultApiService) GetKafkas

func (a *DefaultApiService) GetKafkas(ctx _context.Context, localVarOptionals *GetKafkasOpts) (KafkaRequestList, *_nethttp.Response, error)

GetKafkas Method for GetKafkas Returns a list of Kafka requests

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *GetKafkasOpts - Optional Parameters:
  • @param "Page" (optional.String) - Page index
  • @param "Size" (optional.String) - Number of items in each page
  • @param "OrderBy" (optional.String) - Specifies the order by criteria. The syntax of this parameter is similar to the syntax of the `order by` clause of an SQL statement. Each query can be ordered by any of the following `kafkaRequests` fields: * bootstrap_server_host * admin_api_server_url * cloud_provider * cluster_id * created_at * href * id * instance_type * multi_az * name * organisation_id * owner * reauthentication_enabled * region * status * updated_at * version For example, to return all Kafka instances ordered by their name, use the following syntax: ```sql name asc ``` To return all Kafka instances ordered by their name _and_ created date, use the following syntax: ```sql name asc, created_at asc ``` If the parameter isn't provided, or if the value is empty, then the results are ordered by name.
  • @param "Search" (optional.String) - Search criteria. The syntax of this parameter is similar to the syntax of the `where` clause of an SQL statement. Allowed fields in the search are `cloud_provider`, `name`, `owner`, `region`, `status`, `instance_type`, and `cluster_id`. Allowed comparators are `<>`, `=`, `IN`, `NOT IN`, `LIKE`, or `ILIKE`. Allowed joins are `AND` and `OR`. However, you can use a maximum of 10 joins in a search query. Examples: To return a Kafka instance with the name `my-kafka` and the region `aws`, use the following syntax: ``` name = my-kafka and cloud_provider = aws ``` To return a Kafka instance with a name that starts with `my`, use the following syntax: ``` name like my%25 ``` To return a Kafka instance with a name containing `test` matching any character case combinations, use the following syntax: ``` name ilike %25test%25 ``` If the parameter isn't provided, or if the value is empty, then all the Kafka instances that the user has permission to see are returned. Note. If the query is invalid, an error is returned.

@return KafkaRequestList

func (*DefaultApiService) GetMetricsByInstantQuery

func (a *DefaultApiService) GetMetricsByInstantQuery(ctx _context.Context, id string, localVarOptionals *GetMetricsByInstantQueryOpts) (MetricsInstantQueryList, *_nethttp.Response, error)

GetMetricsByInstantQuery Method for GetMetricsByInstantQuery Returns metrics with instant query by Kafka ID

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The ID of record
  • @param optional nil or *GetMetricsByInstantQueryOpts - Optional Parameters:
  • @param "Filters" (optional.Interface of []string) - List of metrics to fetch. Fetch all metrics when empty. List entries are Kafka internal metric names.

@return MetricsInstantQueryList

func (*DefaultApiService) GetMetricsByRangeQuery

func (a *DefaultApiService) GetMetricsByRangeQuery(ctx _context.Context, id string, duration int64, interval int64, localVarOptionals *GetMetricsByRangeQueryOpts) (MetricsRangeQueryList, *_nethttp.Response, error)

GetMetricsByRangeQuery Method for GetMetricsByRangeQuery Returns metrics with timeseries range query by Kafka ID

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The ID of record
  • @param duration The length of time in minutes for which to return the metrics
  • @param interval The interval in seconds between data points
  • @param optional nil or *GetMetricsByRangeQueryOpts - Optional Parameters:
  • @param "Filters" (optional.Interface of []string) - List of metrics to fetch. Fetch all metrics when empty. List entries are Kafka internal metric names.

@return MetricsRangeQueryList

func (*DefaultApiService) GetVersionMetadata

func (a *DefaultApiService) GetVersionMetadata(ctx _context.Context) (VersionMetadata, *_nethttp.Response, error)

GetVersionMetadata Method for GetVersionMetadata Returns the kafka Service Fleet Manager API version metadata

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return VersionMetadata

func (*DefaultApiService) PromoteKafka

func (a *DefaultApiService) PromoteKafka(ctx _context.Context, id string, async bool, kafkaPromoteRequest KafkaPromoteRequest) (*_nethttp.Response, error)

PromoteKafka Method for PromoteKafka Promote a Kafka instance. Promotion is performed asynchronously. The &#x60;async&#x60; query parameter has to be set to &#x60;true&#x60;. Only kafka instances with an &#x60;eval&#x60; billing_model are supported

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The ID of record
  • @param async Perform the action in an asynchronous manner. False by default.
  • @param kafkaPromoteRequest Kafka promotion request

func (*DefaultApiService) UpdateKafkaById

func (a *DefaultApiService) UpdateKafkaById(ctx _context.Context, id string, kafkaUpdateRequest KafkaUpdateRequest) (KafkaRequest, *_nethttp.Response, error)

UpdateKafkaById Method for UpdateKafkaById Update a Kafka instance by id

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The ID of record
  • @param kafkaUpdateRequest Update owner of kafka

@return KafkaRequest

type EnterpriseCluster

type EnterpriseCluster struct {
	Id   string `json:"id"`
	Kind string `json:"kind"`
	Href string `json:"href"`
	// Indicates whether Kafkas created on this data plane cluster have to be accessed via private network
	AccessKafkasViaPrivateNetwork bool `json:"access_kafkas_via_private_network"`
	// The OCM's cluster id of the registered Enterprise cluster.
	ClusterId string `json:"cluster_id,omitempty"`
	// The status of Enterprise cluster registration
	Status string `json:"status,omitempty"`
	// The cloud provider for this cluster. This valus will be used as the Kafka's cloud provider value when a Kafka is created on this cluster
	CloudProvider string `json:"cloud_provider,omitempty"`
	// The region of this cluster. This valus will be used as the Kafka's region value when a Kafka is created on this cluster
	Region string `json:"region,omitempty"`
	// A flag indicating whether this cluster is available on multiple availability zones or not
	MultiAz                bool                                      `json:"multi_az"`
	SupportedInstanceTypes SupportedKafkaInstanceTypesList           `json:"supported_instance_types,omitempty"`
	CapacityInformation    EnterpriseClusterAllOfCapacityInformation `json:"capacity_information,omitempty"`
}

EnterpriseCluster struct for EnterpriseCluster

type EnterpriseClusterAddonParameters

type EnterpriseClusterAddonParameters struct {
	Id   string `json:"id"`
	Kind string `json:"kind"`
	Href string `json:"href"`
	// Enterprise Cluster fleetshard parameters array
	FleetshardParameters []FleetshardParameter `json:"fleetshard_parameters,omitempty"`
}

EnterpriseClusterAddonParameters Enterprise Cluster get addon parameters response

type EnterpriseClusterAllOfCapacityInformation

type EnterpriseClusterAllOfCapacityInformation struct {
	// The kafka machine pool node count provided during cluster registration
	KafkaMachinePoolNodeCount int32 `json:"kafka_machine_pool_node_count"`
	// The maximum number of Kafka streaming units that can be created on this cluster
	MaximumKafkaStreamingUnits int32 `json:"maximum_kafka_streaming_units"`
	// The remaining number of Kafka streaming units that can be still be created on this cluster
	RemainingKafkaStreamingUnits int32 `json:"remaining_kafka_streaming_units"`
	// The number of Kafka streaming units that have been consumed on this cluster
	ConsumedKafkaStreamingUnits int32 `json:"consumed_kafka_streaming_units"`
}

EnterpriseClusterAllOfCapacityInformation Returns the capacity related information

type EnterpriseClusterFleetshardParameters

type EnterpriseClusterFleetshardParameters struct {
	// Enterprise Cluster fleetshard parameters array
	FleetshardParameters []FleetshardParameter `json:"fleetshard_parameters,omitempty"`
}

EnterpriseClusterFleetshardParameters Enterprise Cluster fleetshard parameters object

type EnterpriseClusterList

type EnterpriseClusterList struct {
	Kind  string              `json:"kind"`
	Page  int32               `json:"page"`
	Size  int32               `json:"size"`
	Total int32               `json:"total"`
	Items []EnterpriseCluster `json:"items"`
}

EnterpriseClusterList struct for EnterpriseClusterList

type EnterpriseClusterRegistrationResponse

type EnterpriseClusterRegistrationResponse struct {
	Id   string `json:"id"`
	Kind string `json:"kind"`
	Href string `json:"href"`
	// Indicates whether Kafkas created on this data plane cluster have to be accessed via private network
	AccessKafkasViaPrivateNetwork bool `json:"access_kafkas_via_private_network"`
	// The OCM's cluster id of the registered Enterprise cluster.
	ClusterId string `json:"cluster_id,omitempty"`
	// The status of Enterprise cluster registration
	Status string `json:"status,omitempty"`
	// The cloud provider for this cluster. This valus will be used as the Kafka's cloud provider value when a Kafka is created on this cluster
	CloudProvider string `json:"cloud_provider,omitempty"`
	// The region of this cluster. This valus will be used as the Kafka's region value when a Kafka is created on this cluster
	Region string `json:"region,omitempty"`
	// A flag indicating whether this cluster is available on multiple availability zones or not
	MultiAz                bool                                      `json:"multi_az"`
	SupportedInstanceTypes SupportedKafkaInstanceTypesList           `json:"supported_instance_types,omitempty"`
	CapacityInformation    EnterpriseClusterAllOfCapacityInformation `json:"capacity_information,omitempty"`
	// Enterprise Cluster fleetshard parameters array
	FleetshardParameters []FleetshardParameter `json:"fleetshard_parameters,omitempty"`
}

EnterpriseClusterRegistrationResponse Enterprise Cluster registration response. It returns additional privileged information compared to The information returned by EnterpriseCluster

type EnterpriseDataplaneClustersApiService

type EnterpriseDataplaneClustersApiService service

EnterpriseDataplaneClustersApiService EnterpriseDataplaneClustersApi service

func (*EnterpriseDataplaneClustersApiService) DeleteEnterpriseClusterById

func (a *EnterpriseDataplaneClustersApiService) DeleteEnterpriseClusterById(ctx _context.Context, async bool, id string) (Error, *_nethttp.Response, error)

DeleteEnterpriseClusterById Method for DeleteEnterpriseClusterById

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param async Perform the action in an asynchronous manner
  • @param id ID of the enterprise data plane cluster

@return Error

func (*EnterpriseDataplaneClustersApiService) GetEnterpriseClusterAddonParameters

GetEnterpriseClusterAddonParameters Method for GetEnterpriseClusterAddonParameters Returns the addon parameters belonging to the enterprise dataplane cluster {id}

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id ID of the enterprise data plane cluster

@return EnterpriseClusterAddonParameters

func (*EnterpriseDataplaneClustersApiService) GetEnterpriseClusterById

GetEnterpriseClusterById Method for GetEnterpriseClusterById Returns enterprise data plane cluster by ID

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id ID of the enterprise data plane cluster

@return EnterpriseCluster

func (*EnterpriseDataplaneClustersApiService) GetEnterpriseOsdClusters

GetEnterpriseOsdClusters Method for GetEnterpriseOsdClusters List all Enterprise data plane clusters

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return EnterpriseClusterList

func (*EnterpriseDataplaneClustersApiService) RegisterEnterpriseOsdCluster

RegisterEnterpriseOsdCluster Method for RegisterEnterpriseOsdCluster Register enterprise data plane cluster

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param enterpriseOsdClusterPayload Enterprise data plane cluster details

@return EnterpriseClusterRegistrationResponse

type EnterpriseOsdClusterPayload

type EnterpriseOsdClusterPayload struct {
	// Sets whether Kafkas created on this data plane cluster have to be accessed via private network
	AccessKafkasViaPrivateNetwork bool `json:"access_kafkas_via_private_network"`
	// The data plane cluster ID. This is the ID of the cluster obtained from OpenShift Cluster Manager (OCM) API
	ClusterId string `json:"cluster_id"`
	// dns name of the cluster. Can be obtained from the response JSON of the /api/clusters_mgmt/v1/clusters/<cluster_id>/ingresses (dns_name)
	ClusterIngressDnsName string `json:"cluster_ingress_dns_name"`
	// The node count given to the created kafka machine pool.  The machine pool must be created via /api/clusters_mgmt/v1/clusters/<cluster_id>/machine_pools prior to passing this value. The created machine pool must have a `bf2.org/kafkaInstanceProfileType=standard` label and a `bf2.org/kafkaInstanceProfileType=standard:NoExecute` taint. The name of the machine pool must be `kafka-standard`  The node count value has to be a multiple of 3 with a minimum of 3 nodes.
	KafkaMachinePoolNodeCount int32 `json:"kafka_machine_pool_node_count"`
}

EnterpriseOsdClusterPayload Schema for the request body sent to /clusters POST

type Error

type Error struct {
	// Human-readable description of the error. Intended for human consumption
	Reason string `json:"reason"`
	// Relatively unique operation ID of the request associated to the error
	OperationId string `json:"operation_id,omitempty"`
	// The unique and immutable identifier of the resource
	Id string `json:"id"`
	// The kind of the resource
	Kind string `json:"kind"`
	// The absolute path of the resource
	Href string `json:"href"`
	// Code of the error
	Code string `json:"code"`
}

Error struct for Error

type ErrorList

type ErrorList struct {
	Kind  string  `json:"kind"`
	Page  int32   `json:"page"`
	Size  int32   `json:"size"`
	Total int32   `json:"total"`
	Items []Error `json:"items"`
}

ErrorList struct for ErrorList

type ErrorsApiService

type ErrorsApiService service

ErrorsApiService ErrorsApi service

func (*ErrorsApiService) GetErrorById

func (a *ErrorsApiService) GetErrorById(ctx _context.Context, id string) (Error, *_nethttp.Response, error)

GetErrorById Method for GetErrorById Returns the error by Id

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The ID of record

@return Error

func (*ErrorsApiService) GetErrors

GetErrors Method for GetErrors Returns the list of possible API errors

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return ErrorList

type FleetshardParameter

type FleetshardParameter struct {
	Id    string `json:"id,omitempty"`
	Value string `json:"value,omitempty"`
}

FleetshardParameter Fleetshard parameter consumed by enterprise cluster

type GenericOpenAPIError

type GenericOpenAPIError struct {
	// contains filtered or unexported fields
}

GenericOpenAPIError Provides access to the body, error and model on returned errors.

func (GenericOpenAPIError) Body

func (e GenericOpenAPIError) Body() []byte

Body returns the raw bytes of the response

func (GenericOpenAPIError) Error

func (e GenericOpenAPIError) Error() string

Error returns non-empty string if there was an error.

func (GenericOpenAPIError) Model

func (e GenericOpenAPIError) Model() interface{}

Model returns the unpacked model of the error

type GetCloudProviderRegionsOpts

type GetCloudProviderRegionsOpts struct {
	Page optional.String
	Size optional.String
}

GetCloudProviderRegionsOpts Optional parameters for the method 'GetCloudProviderRegions'

type GetCloudProvidersOpts

type GetCloudProvidersOpts struct {
	Page optional.String
	Size optional.String
}

GetCloudProvidersOpts Optional parameters for the method 'GetCloudProviders'

type GetKafkasOpts

type GetKafkasOpts struct {
	Page    optional.String
	Size    optional.String
	OrderBy optional.String
	Search  optional.String
}

GetKafkasOpts Optional parameters for the method 'GetKafkas'

type GetMetricsByInstantQueryOpts

type GetMetricsByInstantQueryOpts struct {
	Filters optional.Interface
}

GetMetricsByInstantQueryOpts Optional parameters for the method 'GetMetricsByInstantQuery'

type GetMetricsByRangeQueryOpts

type GetMetricsByRangeQueryOpts struct {
	Filters optional.Interface
}

GetMetricsByRangeQueryOpts Optional parameters for the method 'GetMetricsByRangeQuery'

type GetServiceAccountsOpts

type GetServiceAccountsOpts struct {
	ClientId optional.String
}

GetServiceAccountsOpts Optional parameters for the method 'GetServiceAccounts'

type InstantQuery

type InstantQuery struct {
	Metric    map[string]string `json:"metric,omitempty"`
	Timestamp int64             `json:"timestamp,omitempty"`
	Value     float64           `json:"value"`
}

InstantQuery struct for InstantQuery

type KafkaPromoteRequest

type KafkaPromoteRequest struct {
	// The desired Kafka billing model to promote the kafka instance to. Promotion is performed asynchronously. Accepted values: ['marketplace', 'standard']
	DesiredKafkaBillingModel string `json:"desired_kafka_billing_model"`
	// The desired billing marketplace to promote the kafka instance to. Accepted values: ['aws', 'rhm']. Only considered when desired_kafka_billing_model is 'marketplace'
	DesiredMarketplace string `json:"desired_marketplace,omitempty"`
	// The desired Kafka billing cloud account ID to promote the kafka instance to. Only considered when desired_kafka_billing_model is 'marketplace'
	DesiredBillingCloudAccountId string `json:"desired_billing_cloud_account_id,omitempty"`
}

KafkaPromoteRequest struct for KafkaPromoteRequest

type KafkaRequest

type KafkaRequest struct {
	Id   string `json:"id"`
	Kind string `json:"kind"`
	Href string `json:"href"`
	// Values: [accepted, preparing, provisioning, ready, failed, deprovision, deleting, suspending, suspended, resuming]
	Status string `json:"status,omitempty"`
	// Name of Cloud used to deploy. For example AWS
	CloudProvider string `json:"cloud_provider,omitempty"`
	MultiAz       bool   `json:"multi_az"`
	// Values will be regions of specific cloud provider. For example: us-east-1 for AWS
	Region              string `json:"region,omitempty"`
	Owner               string `json:"owner,omitempty"`
	Name                string `json:"name,omitempty"`
	BootstrapServerHost string `json:"bootstrap_server_host,omitempty"`
	// The kafka admin server url to perform kafka admin operations e.g acl management etc. The value will be available when the Kafka has been fully provisioned i.e it reaches a 'ready' state
	AdminApiServerUrl string     `json:"admin_api_server_url,omitempty"`
	CreatedAt         time.Time  `json:"created_at,omitempty"`
	ExpiresAt         *time.Time `json:"expires_at,omitempty"`
	UpdatedAt         time.Time  `json:"updated_at,omitempty"`
	FailedReason      string     `json:"failed_reason,omitempty"`
	Version           string     `json:"version,omitempty"`
	InstanceType      string     `json:"instance_type,omitempty"`
	// This field is now deprecated, please use the /api/kafkas_mgmt/v1/instance_types/{cloud_provider}/{cloud_region} endpoint to retrieve the field instead.
	// Deprecated
	DeprecatedInstanceTypeName string                           `json:"instance_type_name,omitempty"`
	ReauthenticationEnabled    bool                             `json:"reauthentication_enabled"`
	MaxDataRetentionSize       SupportedKafkaSizeBytesValueItem `json:"max_data_retention_size,omitempty"`
	BrowserUrl                 string                           `json:"browser_url,omitempty"`
	SizeId                     string                           `json:"size_id,omitempty"`
	// This field is now deprecated, please use the /api/kafkas_mgmt/v1/instance_types/{cloud_provider}/{cloud_region} endpoint to retrieve the field instead.
	// Deprecated
	DeprecatedIngressThroughputPerSec string `json:"ingress_throughput_per_sec,omitempty"`
	// This field is now deprecated, please use the /api/kafkas_mgmt/v1/instance_types/{cloud_provider}/{cloud_region} endpoint to retrieve the field instead.
	// Deprecated
	DeprecatedEgressThroughputPerSec string `json:"egress_throughput_per_sec,omitempty"`
	// This field is now deprecated, please use the /api/kafkas_mgmt/v1/instance_types/{cloud_provider}/{cloud_region} endpoint to retrieve the field instead.
	// Deprecated
	DeprecatedTotalMaxConnections int32 `json:"total_max_connections,omitempty"`
	// This field is now deprecated, please use the /api/kafkas_mgmt/v1/instance_types/{cloud_provider}/{cloud_region} endpoint to retrieve the field instead.
	// Deprecated
	DeprecatedMaxPartitions int32 `json:"max_partitions,omitempty"`
	// This field is now deprecated, please use the /api/kafkas_mgmt/v1/instance_types/{cloud_provider}/{cloud_region} endpoint to retrieve the field instead.
	// Deprecated
	DeprecatedMaxDataRetentionPeriod string `json:"max_data_retention_period,omitempty"`
	// This field is now deprecated, please use the /api/kafkas_mgmt/v1/instance_types/{cloud_provider}/{cloud_region} endpoint to retrieve the field instead.
	// Deprecated
	DeprecatedMaxConnectionAttemptsPerSec int32  `json:"max_connection_attempts_per_sec,omitempty"`
	BillingCloudAccountId                 string `json:"billing_cloud_account_id,omitempty"`
	Marketplace                           string `json:"marketplace,omitempty"`
	BillingModel                          string `json:"billing_model,omitempty"`
	// Status of the Kafka request promotion. Possible values: ['promoting', 'failed']. If unset it means no promotion is in progress.
	PromotionStatus string `json:"promotion_status,omitempty"`
	// The ID of the data plane where Kafka is deployed on. This information is only returned for kafka whose billing model is enterprise
	ClusterId *string `json:"cluster_id,omitempty"`
	// Details of the Kafka request promotion. It can be set when a Kafka request promotion is in progress or has failed
	PromotionDetails string `json:"promotion_details,omitempty"`
}

KafkaRequest struct for KafkaRequest

type KafkaRequestList

type KafkaRequestList struct {
	Kind  string         `json:"kind"`
	Page  int32          `json:"page"`
	Size  int32          `json:"size"`
	Total int32          `json:"total"`
	Items []KafkaRequest `json:"items"`
}

KafkaRequestList struct for KafkaRequestList

type KafkaRequestPayload

type KafkaRequestPayload struct {
	// The cloud provider where the Kafka cluster will be created in
	CloudProvider string `json:"cloud_provider,omitempty"`
	// The name of the Kafka cluster. It must consist of lower-case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character, and can not be longer than 32 characters.
	Name string `json:"name"`
	// The region where the Kafka cluster will be created in
	Region string `json:"region,omitempty"`
	// Whether connection reauthentication is enabled or not. If set to true, connection reauthentication on the Kafka instance will be required every 5 minutes. The default value is true
	ReauthenticationEnabled *bool `json:"reauthentication_enabled,omitempty"`
	// kafka plan in a format of <instance_type>.<size_id>
	Plan string `json:"plan,omitempty"`
	// cloud account id used to purchase the instance
	BillingCloudAccountId *string `json:"billing_cloud_account_id,omitempty"`
	// marketplace where the instance is purchased on
	Marketplace *string `json:"marketplace,omitempty"`
	// billing model to use
	BillingModel *string `json:"billing_model,omitempty"`
	// enterprise OSD cluster ID to be used for kafka creation
	ClusterId *string `json:"cluster_id,omitempty"`
}

KafkaRequestPayload Schema for the request body sent to /kafkas POST

type KafkaUpdateRequest

type KafkaUpdateRequest struct {
	Owner *string `json:"owner,omitempty"`
	// Whether connection reauthentication is enabled or not. If set to true, connection reauthentication on the Kafka instance will be required every 5 minutes.
	ReauthenticationEnabled *bool `json:"reauthentication_enabled,omitempty"`
}

KafkaUpdateRequest struct for KafkaUpdateRequest

type List

type List struct {
	Kind  string `json:"kind"`
	Page  int32  `json:"page"`
	Size  int32  `json:"size"`
	Total int32  `json:"total"`
}

List struct for List

type MetricsInstantQueryList

type MetricsInstantQueryList struct {
	Kind  string         `json:"kind,omitempty"`
	Id    string         `json:"id,omitempty"`
	Items []InstantQuery `json:"items,omitempty"`
}

MetricsInstantQueryList struct for MetricsInstantQueryList

type MetricsRangeQueryList

type MetricsRangeQueryList struct {
	Kind  string       `json:"kind,omitempty"`
	Id    string       `json:"id,omitempty"`
	Items []RangeQuery `json:"items,omitempty"`
}

MetricsRangeQueryList struct for MetricsRangeQueryList

type ObjectReference

type ObjectReference struct {
	Id   string `json:"id"`
	Kind string `json:"kind"`
	Href string `json:"href"`
}

ObjectReference struct for ObjectReference

type RangeQuery

type RangeQuery struct {
	Metric map[string]string `json:"metric,omitempty"`
	Values []Values          `json:"values,omitempty"`
}

RangeQuery struct for RangeQuery

type RegionCapacityListItem

type RegionCapacityListItem struct {
	// kafka instance type
	InstanceType string `json:"instance_type"`
	// list of available Kafka instance sizes that can be created in this region when taking account current capacity and regional limits
	AvailableSizes []string `json:"available_sizes"`
}

RegionCapacityListItem schema for a kafka instance type capacity in region

type SecurityApiService

type SecurityApiService service

SecurityApiService SecurityApi service

func (*SecurityApiService) CreateServiceAccount

func (a *SecurityApiService) CreateServiceAccount(ctx _context.Context, serviceAccountRequest ServiceAccountRequest) (ServiceAccount, *_nethttp.Response, error)

CreateServiceAccount Method for CreateServiceAccount Creates a service account

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param serviceAccountRequest Service account request

@return ServiceAccount

func (*SecurityApiService) DeleteServiceAccountById

func (a *SecurityApiService) DeleteServiceAccountById(ctx _context.Context, id string) (Error, *_nethttp.Response, error)

DeleteServiceAccountById Method for DeleteServiceAccountById Deletes a service account by ID

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The ID of record

@return Error

func (*SecurityApiService) GetServiceAccountById

func (a *SecurityApiService) GetServiceAccountById(ctx _context.Context, id string) (ServiceAccount, *_nethttp.Response, error)

GetServiceAccountById Method for GetServiceAccountById Returned service account by ID

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The ID of record

@return ServiceAccount

func (*SecurityApiService) GetServiceAccounts

func (a *SecurityApiService) GetServiceAccounts(ctx _context.Context, localVarOptionals *GetServiceAccountsOpts) (ServiceAccountList, *_nethttp.Response, error)

GetServiceAccounts Method for GetServiceAccounts Returns a list of service accounts

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *GetServiceAccountsOpts - Optional Parameters:
  • @param "ClientId" (optional.String) - client_id of the service account to be retrieved

@return ServiceAccountList

func (*SecurityApiService) GetSsoProviders

func (a *SecurityApiService) GetSsoProviders(ctx _context.Context) (SsoProvider, *_nethttp.Response, error)

GetSsoProviders Method for GetSsoProviders Return sso provider info

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return SsoProvider

func (*SecurityApiService) ResetServiceAccountCreds

func (a *SecurityApiService) ResetServiceAccountCreds(ctx _context.Context, id string) (ServiceAccount, *_nethttp.Response, error)

ResetServiceAccountCreds Method for ResetServiceAccountCreds Resets the credentials for a service account by ID

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id The ID of record

@return ServiceAccount

type ServerConfiguration

type ServerConfiguration struct {
	Url         string
	Description string
	Variables   map[string]ServerVariable
}

ServerConfiguration stores the information about a server

type ServerVariable

type ServerVariable struct {
	Description  string
	DefaultValue string
	EnumValues   []string
}

ServerVariable stores the information about a server variable

type ServiceAccount

type ServiceAccount struct {
	// server generated unique id of the service account
	Id           string `json:"id"`
	Kind         string `json:"kind"`
	Href         string `json:"href"`
	Name         string `json:"name,omitempty"`
	Description  string `json:"description,omitempty"`
	ClientId     string `json:"client_id,omitempty"`
	ClientSecret string `json:"client_secret,omitempty"`
	// Deprecated
	DeprecatedOwner string    `json:"owner,omitempty"`
	CreatedBy       string    `json:"created_by,omitempty"`
	CreatedAt       time.Time `json:"created_at,omitempty"`
}

ServiceAccount Service Account created in MAS-SSO for the Kafka Cluster for authentication

type ServiceAccountList

type ServiceAccountList struct {
	Kind  string                   `json:"kind"`
	Items []ServiceAccountListItem `json:"items"`
}

ServiceAccountList struct for ServiceAccountList

type ServiceAccountListItem

type ServiceAccountListItem struct {
	// server generated unique id of the service account
	Id   string `json:"id"`
	Kind string `json:"kind"`
	Href string `json:"href"`
	// client id of the service account
	ClientId string `json:"client_id,omitempty"`
	// name of the service account
	Name string `json:"name,omitempty"`
	// owner of the service account
	// Deprecated
	DeprecatedOwner string `json:"owner,omitempty"`
	// service account created by the user
	CreatedBy string `json:"created_by,omitempty"`
	// service account creation timestamp
	CreatedAt time.Time `json:"created_at,omitempty"`
	// description of the service account
	Description string `json:"description,omitempty"`
}

ServiceAccountListItem struct for ServiceAccountListItem

type ServiceAccountRequest

type ServiceAccountRequest struct {
	// The name of the service account
	Name string `json:"name"`
	// A description for the service account
	Description string `json:"description,omitempty"`
}

ServiceAccountRequest Schema for the request to create a service account

type SsoProvider

type SsoProvider struct {
	Id   string `json:"id"`
	Kind string `json:"kind"`
	Href string `json:"href"`
	// name of the sso provider
	Name string `json:"name,omitempty"`
	// base url
	BaseUrl     string `json:"base_url,omitempty"`
	TokenUrl    string `json:"token_url,omitempty"`
	Jwks        string `json:"jwks,omitempty"`
	ValidIssuer string `json:"valid_issuer,omitempty"`
}

SsoProvider SSO Provider

type SupportedKafkaBillingModel

type SupportedKafkaBillingModel struct {
	// Identifier for the Kafka billing model
	Id string `json:"id"`
	// AMS resource to be used. Accepted values: ['rhosak']
	AmsResource string `json:"ams_resource"`
	// AMS product to be used. Accepted values: ['RHOSAK', 'RHOSAKTrial', 'RHOSAKEval', 'RHOSAKCC']
	AmsProduct string `json:"ams_product"`
	// List of AMS available billing models: Accepted values: ['marketplace', 'marketplace-rhm', 'marketplace-aws']
	AmsBillingModels []string `json:"ams_billing_models"`
}

SupportedKafkaBillingModel Supported Kafka Billing Model

type SupportedKafkaInstanceType

type SupportedKafkaInstanceType struct {
	// Unique identifier of the Kafka instance type.
	Id string `json:"id,omitempty"`
	// Human readable name of the supported Kafka instance type
	DisplayName string `json:"display_name,omitempty"`
	// A list of available kafka billing models for the instance type. Each kafka billing model item has a unique 'id'
	SupportedBillingModels []SupportedKafkaBillingModel `json:"supported_billing_models"`
	// A list of Kafka instance sizes available for this instance type
	Sizes []SupportedKafkaSize `json:"sizes"`
}

SupportedKafkaInstanceType Supported Kafka instance type

type SupportedKafkaInstanceTypesList

type SupportedKafkaInstanceTypesList struct {
	InstanceTypes []SupportedKafkaInstanceType `json:"instance_types,omitempty"`
}

SupportedKafkaInstanceTypesList struct for SupportedKafkaInstanceTypesList

type SupportedKafkaSize

type SupportedKafkaSize struct {
	// Unique identifier of this Kafka instance size.
	Id string `json:"id,omitempty"`
	// Display name of this Kafka instance size.
	DisplayName             string                           `json:"display_name,omitempty"`
	IngressThroughputPerSec SupportedKafkaSizeBytesValueItem `json:"ingress_throughput_per_sec,omitempty"`
	EgressThroughputPerSec  SupportedKafkaSizeBytesValueItem `json:"egress_throughput_per_sec,omitempty"`
	// Maximum amount of total connections available to this Kafka instance size.
	TotalMaxConnections  int32                            `json:"total_max_connections,omitempty"`
	MaxDataRetentionSize SupportedKafkaSizeBytesValueItem `json:"max_data_retention_size,omitempty"`
	// Maximum amount of total partitions available to this Kafka instance size.
	MaxPartitions int32 `json:"max_partitions,omitempty"`
	// Maximum data retention period available to this Kafka instance size.
	MaxDataRetentionPeriod string `json:"max_data_retention_period,omitempty"`
	// Maximium connection attempts per second available to this Kafka instance size.
	MaxConnectionAttemptsPerSec int32                            `json:"max_connection_attempts_per_sec,omitempty"`
	MaxMessageSize              SupportedKafkaSizeBytesValueItem `json:"max_message_size,omitempty"`
	// Minimum number of in-sync replicas.
	MinInSyncReplicas int32 `json:"min_in_sync_replicas,omitempty"`
	// Replication factor available to this Kafka instance size.
	ReplicationFactor int32 `json:"replication_factor,omitempty"`
	// List of Availability Zone modes that this Kafka instance size supports. The possible values are \"single\", \"multi\".
	SupportedAzModes []string `json:"supported_az_modes,omitempty"`
	// The limit lifespan of the kafka instance in seconds. If not specified then the instance never expires.
	LifespanSeconds *int32 `json:"lifespan_seconds,omitempty"`
	// Quota consumed by this Kafka instance size.
	QuotaConsumed int32 `json:"quota_consumed,omitempty"`
	// Quota type used by this Kafka instance size. This is now deprecated, please refer to supported_billing_models at instance-type level instead.
	// Deprecated
	DeprecatedQuotaType string `json:"quota_type,omitempty"`
	// Data plane cluster capacity consumed by this Kafka instance size.
	CapacityConsumed int32 `json:"capacity_consumed,omitempty"`
	// Maturity level of the size. Can be \"stable\" or \"preview\".
	MaturityStatus string `json:"maturity_status,omitempty"`
}

SupportedKafkaSize Supported Kafka Size

type SupportedKafkaSizeBytesValueItem

type SupportedKafkaSizeBytesValueItem struct {
	Bytes int64 `json:"bytes,omitempty"`
}

SupportedKafkaSizeBytesValueItem struct for SupportedKafkaSizeBytesValueItem

type Values

type Values struct {
	Timestamp int64   `json:"timestamp,omitempty"`
	Value     float64 `json:"value"`
}

Values struct for Values

type VersionMetadata

type VersionMetadata struct {
	Id            string            `json:"id"`
	Kind          string            `json:"kind"`
	Href          string            `json:"href"`
	ServerVersion string            `json:"server_version,omitempty"`
	Collections   []ObjectReference `json:"collections,omitempty"`
}

VersionMetadata struct for VersionMetadata

Jump to

Keyboard shortcuts

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