client

package
v1.5.28 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MPL-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const StateDefunct = "defunct"
View Source
const StateDeleted = "deleted"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(opts *Config) (*Client, error)

func (*Client) CreateIntegration added in v1.5.4

func (c *Client) CreateIntegration(ctx context.Context, organizationId string, projectId string, createIntegrationRequest CreateIntegrationRequest) (*CreateIntegrationResponse, diag.Diagnostics)

func (*Client) CreateJob added in v1.5.3

func (c *Client) CreateJob(ctx context.Context, organizationId string, projectId string, createJobRequest CreateJobRequest) (*CreateJobResponse, diag.Diagnostics)

func (*Client) DeleteIntegration added in v1.5.4

func (c *Client) DeleteIntegration(ctx context.Context, organizationId string, projectId string, integrationId string) diag.Diagnostics

func (*Client) DeleteJob added in v1.5.3

func (c *Client) DeleteJob(ctx context.Context, organizationId string, projectId string, jobId string) diag.Diagnostics

func (*Client) GetIntegration added in v1.5.4

func (c *Client) GetIntegration(ctx context.Context, organizationId string, projectId string, integrationId string) (*GetIntegrationResponse, diag.Diagnostics)

func (*Client) GetJob added in v1.5.3

func (c *Client) GetJob(ctx context.Context, organizationId string, projectId string, jobId string) (*GetJobResponse, diag.Diagnostics)

func (*Client) ListIntegrations added in v1.5.4

func (c *Client) ListIntegrations(ctx context.Context, organizationId string, projectId string) (*ListIntegrationsResponse, diag.Diagnostics)

func (*Client) ManagedClusterDelete

func (c *Client) ManagedClusterDelete(ctx context.Context, req *DeleteManagedClusterRequest) diag.Diagnostics

func (*Client) ManagedClusterExpandDisk added in v1.2.0

func (c *Client) ManagedClusterExpandDisk(ctx context.Context, req *ExpandManagedClusterDiskRequest) diag.Diagnostics

func (*Client) ManagedClusterUpdate added in v1.5.8

func (c *Client) ManagedClusterUpdate(ctx context.Context, req *ManagedClusterUpdateRequest) diag.Diagnostics

func (*Client) ManagedClusterUpgrade added in v1.5.27

func (c *Client) ManagedClusterUpgrade(ctx context.Context, req *ManagedClusterUpgradeRequest) diag.Diagnostics

func (*Client) ManagedClusterWaitForState

func (c *Client) ManagedClusterWaitForState(ctx context.Context, req *WaitForManagedClusterStateRequest) diag.Diagnostics

func (*Client) NetworkCreate

func (*Client) NetworkDelete

func (c *Client) NetworkDelete(ctx context.Context, req *DeleteNetworkRequest) diag.Diagnostics

func (*Client) NetworkGet

func (*Client) NetworkList added in v1.5.8

func (*Client) NetworkUpdate

func (c *Client) NetworkUpdate(ctx context.Context, req *UpdateNetworkRequest) diag.Diagnostics

func (*Client) NetworkWaitForState

func (c *Client) NetworkWaitForState(ctx context.Context, req *WaitForNetworkStateRequest) diag.Diagnostics

func (*Client) PeeringCreate

func (*Client) PeeringDelete

func (c *Client) PeeringDelete(ctx context.Context, req *DeletePeeringRequest) diag.Diagnostics

func (*Client) PeeringGet

func (*Client) PeeringUpdate

func (c *Client) PeeringUpdate(ctx context.Context, req *UpdatePeeringRequest) diag.Diagnostics

func (*Client) PeeringWaitForState

func (c *Client) PeeringWaitForState(ctx context.Context, req *WaitForPeeringStateRequest) (*Peering, diag.Diagnostics)

func (*Client) ProjectCreate

func (*Client) ProjectDelete

func (c *Client) ProjectDelete(ctx context.Context, req *DeleteProjectRequest) diag.Diagnostics

func (*Client) ProjectGet

func (*Client) ProjectList

func (*Client) ProjectUpdate

func (c *Client) ProjectUpdate(ctx context.Context, req *UpdateProjectRequest) diag.Diagnostics

func (*Client) TokenInspect

func (c *Client) TokenInspect(audience string) (*tokenData, error)

Inspect a token from the local token store

func (*Client) TokenRefresh

func (c *Client) TokenRefresh(force bool) error

Convenience function

func (*Client) UpdateIntegration added in v1.5.4

func (c *Client) UpdateIntegration(ctx context.Context, organizationId string, projectId string, integrationId string, updateIntegrationRequest UpdateIntegrationRequest) diag.Diagnostics

type Config

type Config struct {
	URL                 string
	IdentityProviderURL string
	ClientID            string
	TokenStore          string
	RefreshToken        string
}

type CreateIntegrationData added in v1.5.4

type CreateIntegrationData struct {
	CreateOpsGenieIntegrationData *CreateOpsGenieIntegrationData
	CreateSlackIntegrationData    *CreateSlackIntegrationData
}

type CreateIntegrationRequest added in v1.5.4

type CreateIntegrationRequest struct {
	Data        map[string]interface{} `json:"data"`
	Description string                 `json:"description"`
}

type CreateIntegrationResponse added in v1.5.4

type CreateIntegrationResponse struct {
	Id string `json:"id"`
}

type CreateJobRequest added in v1.5.3

type CreateJobRequest struct {
	Data        map[string]interface{} `json:"data"`
	Description string                 `json:"description"`
	Schedule    string                 `json:"schedule"`
	Type        string                 `json:"type"`
}

type CreateJobResponse added in v1.5.3

type CreateJobResponse struct {
	Id string `json:"id"`
}

type CreateManagedClusterRequest

type CreateManagedClusterRequest struct {
	OrganizationID  string
	ProjectID       string
	NetworkId       string `json:"networkId"`
	Name            string `json:"description"`
	Topology        string `json:"topology"`
	InstanceType    string `json:"instanceType"`
	DiskSizeGB      int32  `json:"diskSizeGb"`
	DiskType        string `json:"diskType"`
	DiskIops        int32  `json:"diskIops"`
	DiskThroughput  int32  `json:"diskThroughput"`
	ServerVersion   string `json:"serverVersion"`
	ProjectionLevel string `json:"projectionLevel"`
	CloudAuth       bool   `json:"cloudIntegratedAuthentication"`
	Protected       bool   `json:"protected"`
}

type CreateManagedClusterResponse

type CreateManagedClusterResponse struct {
	ClusterID string `json:"id"`
}

type CreateNetworkRequest

type CreateNetworkRequest struct {
	OrganizationID   string
	ProjectID        string
	ResourceProvider string `json:"provider"`
	CidrBlock        string `json:"cidrBlock"`
	Name             string `json:"description"`
	Region           string `json:"region"`
}

type CreateNetworkResponse

type CreateNetworkResponse struct {
	NetworkID string `json:"id"`
}

type CreateOpsGenieIntegrationData added in v1.5.4

type CreateOpsGenieIntegrationData struct {
	// API key used with the Ops Genie integration API
	ApiKey string `json:"apiKey"`
	// Required. Must be set to \"opsGenie\"
	Sink   string  `json:"sink"`
	Source *string `json:"source,omitempty"`
}

type CreatePeeringRequest

type CreatePeeringRequest struct {
	OrganizationID        string
	ProjectID             string
	NetworkId             string   `json:"networkId"`
	Name                  string   `json:"description"`
	PeerAccountIdentifier string   `json:"peerAccountId"`
	PeerNetworkIdentifier string   `json:"peerNetworkId"`
	PeerNetworkRegion     string   `json:"peerNetworkRegion"`
	Routes                []string `json:"routes"`
}

type CreatePeeringResponse

type CreatePeeringResponse struct {
	PeeringID string `json:"id"`
}

type CreateProjectRequest

type CreateProjectRequest struct {
	OrganizationID string
	Name           string `json:"name"`
}

type CreateProjectResponse

type CreateProjectResponse struct {
	ProjectID string `json:"id"`
}

type CreateSlackIntegrationData added in v1.5.4

type CreateSlackIntegrationData struct {
	// Slack Channel to send messages to
	ChannelId string `json:"channelId"`
	// API token for the Slack bot
	Token string `json:"token"`
	// Required. Must be set to \"slack\"
	Sink   string  `json:"sink"`
	Source *string `json:"source,omitempty"`
}

type DeleteManagedClusterRequest

type DeleteManagedClusterRequest struct {
	OrganizationID string
	ProjectID      string
	ClusterID      string
}

type DeleteNetworkRequest

type DeleteNetworkRequest struct {
	OrganizationID string
	ProjectID      string
	NetworkID      string
}

type DeletePeeringRequest

type DeletePeeringRequest struct {
	OrganizationID string
	ProjectID      string
	PeeringID      string
}

type DeleteProjectRequest

type DeleteProjectRequest struct {
	OrganizationID string
	ProjectID      string
}

type ExpandManagedClusterDiskRequest added in v1.2.0

type ExpandManagedClusterDiskRequest struct {
	OrganizationID string
	ProjectID      string
	ClusterID      string `json:"clusterId"`
	DiskIops       int32  `json:"diskIops,omitempty"`
	DiskSizeGB     int32  `json:"diskSizeGb"`
	DiskThroughput int32  `json:"diskThroughput,omitempty"`
	DiskType       string `json:"diskType"`
}

type GetIntegrationResponse added in v1.5.4

type GetIntegrationResponse struct {
	Integration Integration `json:"integration"`
}

type GetJobResponse added in v1.5.3

type GetJobResponse struct {
	Job Job `json:"job"`
}

type GetManagedClusterRequest

type GetManagedClusterRequest struct {
	OrganizationID string
	ProjectID      string
	ClusterID      string
}

type GetManagedClusterResponse

type GetManagedClusterResponse struct {
	ManagedCluster ManagedCluster `json:"cluster"`
}

type GetNetworkRequest

type GetNetworkRequest struct {
	OrganizationID string
	ProjectID      string
	NetworkID      string
}

type GetNetworkResponse

type GetNetworkResponse struct {
	Network Network `json:"network"`
}

type GetPeeringRequest

type GetPeeringRequest struct {
	OrganizationID string
	ProjectID      string
	PeeringID      string
}

type GetPeeringResponse

type GetPeeringResponse struct {
	Peering Peering `json:"peering"`
}

type GetProjectRequest

type GetProjectRequest struct {
	OrganizationID string
	ProjectID      string
}

type GetProjectResponse

type GetProjectResponse struct {
	Project Project `json:"project"`
}

type Integration added in v1.5.4

type Integration struct {
	Created        time.Time              `json:"created"`
	Data           map[string]interface{} `json:"data"`
	Description    string                 `json:"description"`
	Id             string                 `json:"id"`
	OrganizationId string                 `json:"organizationId"`
	ProjectId      string                 `json:"projectId"`
	Status         IntegrationStatus      `json:"status"`
	Updated        time.Time              `json:"updated"`
}

type IntegrationData added in v1.5.4

type IntegrationData struct {
	OpsGenieIntegrationData *OpsGenieIntegrationData
	SlackIntegrationData    *SlackIntegrationData
}

type IntegrationStatus added in v1.5.4

type IntegrationStatus string
const (
	ACTIVE  IntegrationStatus = "active"
	DELETED IntegrationStatus = "deleted"
)

List of IntegrationStatus

type Job added in v1.5.3

type Job struct {
	Data           map[string]interface{} `json:"data"`
	Description    string                 `json:"description"`
	Id             string                 `json:"id"`
	OrganizationId string                 `json:"organizationId"`
	ProjectId      string                 `json:"projectId"`
	Schedule       string                 `json:"schedule"`
	Status         string                 `json:"status"`
	Type           string                 `json:"type"`
}

type ListIntegrationsResponse added in v1.5.4

type ListIntegrationsResponse struct {
	Integrations []Integration `json:"integrations"`
}

type ListNetworksRequest added in v1.5.8

type ListNetworksRequest struct {
	OrganizationID string
	ProjectID      string
}

type ListNetworksResponse added in v1.5.8

type ListNetworksResponse struct {
	Networks []Network `json:"networks"`
}

type ListProjectsRequest

type ListProjectsRequest struct {
	OrganizationID string
}

type ListProjectsResponse

type ListProjectsResponse struct {
	Projects []Project `json:"projects"`
}

type ManagedCluster

type ManagedCluster struct {
	OrganizationID   string `json:"organizationId"`
	ProjectID        string `json:"projectId"`
	NetworkID        string `json:"networkId"`
	ClusterID        string `json:"id"`
	Name             string `json:"description"`
	Provider         string `json:"provider"`
	Region           string `json:"region"`
	Topology         string `json:"topology"`
	InstanceType     string `json:"instanceType"`
	DiskSizeGB       int32  `json:"diskSizeGb"`
	DiskType         string `json:"diskType"`
	DiskIops         int32  `json:"diskIops"`
	DiskThroughput   int32  `json:"diskThroughput"`
	ServerVersion    string `json:"serverVersion"`
	ServerVersionTag string `json:"serverVersionTag"`
	ProjectionLevel  string `json:"projectionLevel"`
	Status           string `json:"status"`
	Created          string `json:"created"`
	Protected        bool   `json:"protected"`
}

type ManagedClusterUpdateRequest added in v1.5.8

type ManagedClusterUpdateRequest struct {
	OrganizationID string
	ProjectID      string
	ClusterID      string
	Description    string `json:"description"`
	Protected      bool   `json:"protected"`
}

type ManagedClusterUpgradeRequest added in v1.5.27

type ManagedClusterUpgradeRequest struct {
	OrganizationID string
	ProjectID      string
	ClusterID      string
	TargetTag      string `json:"targetTag"`
}

type Network

type Network struct {
	NetworkID string `json:"id"`
	ProjectID string `json:"projectId"`
	Provider  string `json:"provider"`
	Region    string `json:"region"`
	CIDRBlock string `json:"cidrBlock"`
	Name      string `json:"description"`
	Status    string `json:"status"`
}

type OpsGenieIntegrationData added in v1.5.4

type OpsGenieIntegrationData struct {
	// API key used with the Ops Genie integration API
	ApiKeyDisplay string `json:"apiKeyDisplay"`
	// Required. Must be set to \"opsGenie\"
	Sink string `json:"sink"`
	// Source of data for integration
	Source string `json:"source"`
}

type Peering

type Peering struct {
	ProjectID               string            `json:"projectId"`
	PeeringID               string            `json:"id"`
	NetworkID               string            `json:"networkId"`
	Provider                string            `json:"provider"`
	Name                    string            `json:"description"`
	PeerAccountIdentifier   string            `json:"peerAccountId"`
	PeerNetworkIdentifier   string            `json:"peerNetworkId"`
	PeerNetworkRegion       string            `json:"peerNetworkRegion"`
	ProviderPeeringMetadata map[string]string `json:"providerPeeringMetadata"`
	Routes                  []string          `json:"routes"`
	Status                  string            `json:"status"`
	Created                 string            `json:"created,omitempty"`
}

type Project

type Project struct {
	ProjectID      string `json:"id"`
	OrganizationID string `json:"organizationId"`
	Name           string `json:"name"`
	Created        string `json:"created"`
}

type SlackIntegrationData added in v1.5.4

type SlackIntegrationData struct {
	// Slack Channel to send messages to
	ChannelId string `json:"channelId"`
	// API token for the Slack bot
	TokenDisplay string `json:"tokenDisplay"`
	// Required. Must be set to \"slack\"
	Sink string `json:"sink"`
	// Source of data for integration
	Source string `json:"source"`
}

type UpdateIntegrationRequest added in v1.5.4

type UpdateIntegrationRequest struct {
	Data        *map[string]interface{} `json:"data,omitempty"`
	Description *string                 `json:"description,omitempty"`
}

type UpdateNetworkRequest

type UpdateNetworkRequest struct {
	OrganizationID string
	ProjectID      string
	NetworkID      string
	Name           string `json:"description"`
}

type UpdateOpsGenieIntegrationData added in v1.5.4

type UpdateOpsGenieIntegrationData struct {
	// API key used with the Ops Genie integration API
	ApiKey *string `json:"apiKey,omitempty"`
}

type UpdatePeeringRequest

type UpdatePeeringRequest struct {
	OrganizationID string
	ProjectID      string
	PeeringID      string
	Name           string `json:"description"`
}

type UpdateProjectRequest

type UpdateProjectRequest struct {
	OrganizationID string
	ProjectID      string
	Name           string `json:"name"`
}

type UpdateSlackIntegrationData added in v1.5.4

type UpdateSlackIntegrationData struct {
	// Slack Channel to send messages to
	ChannelId *string `json:"channelId,omitempty"`
	// API token for the Slack bot
	Token *string `json:"token,omitempty"`
}

type WaitForManagedClusterStateRequest

type WaitForManagedClusterStateRequest struct {
	OrganizationID string
	ProjectID      string
	ClusterID      string
	State          string
}

type WaitForNetworkStateRequest

type WaitForNetworkStateRequest struct {
	OrganizationID string
	ProjectID      string
	NetworkID      string
	State          string
}

type WaitForPeeringStateRequest

type WaitForPeeringStateRequest struct {
	OrganizationID string
	ProjectID      string
	PeeringID      string
	State          string
}

Jump to

Keyboard shortcuts

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