Documentation
¶
Index ¶
- Constants
- type AvailabilityDomain
- type BlockVolume
- type Client
- func (c *Client) AttachVolume(instanceID, volumeID string) (*VolumeAttachment, error)
- func (c *Client) CreateEventsRule(compartmentID, displayName, condition, topicID string) (*EventsRule, error)
- func (c *Client) CreateONSSubscription(compartmentID, topicID, endpoint string) (*ONSSubscription, error)
- func (c *Client) CreateONSTopic(compartmentID, name string) (*ONSTopic, error)
- func (c *Client) DeleteEventsRule(ruleID string) error
- func (c *Client) DeleteONSSubscription(subscriptionID string) error
- func (c *Client) DeleteONSTopic(topicID string) error
- func (c *Client) GetInstance(instanceID string) (*Instance, error)
- func (c *Client) GetVNIC(vnicID string) (*VNIC, error)
- func (c *Client) LaunchInstance(req LaunchInstanceRequest) (*Instance, error)
- func (c *Client) ListAvailabilityDomains(compartmentID string) ([]AvailabilityDomain, error)
- func (c *Client) ListBlockVolumes(compartmentID string) ([]BlockVolume, error)
- func (c *Client) ListCompartments() ([]Compartment, error)
- func (c *Client) ListImages(compartmentID, operatingSystem string) ([]Image, error)
- func (c *Client) ListShapes(compartmentID string) ([]Shape, error)
- func (c *Client) ListSubnets(compartmentID string) ([]Subnet, error)
- func (c *Client) ListVNICAttachments(compartmentID, instanceID string) ([]VNICAttachment, error)
- func (c *Client) ValidateCredentials() error
- type Compartment
- type ConfidentialInstanceOptions
- type Configuration
- type CreateComputeInstance
- func (c *CreateComputeInstance) Cancel(ctx core.ExecutionContext) error
- func (c *CreateComputeInstance) Cleanup(ctx core.SetupContext) error
- func (c *CreateComputeInstance) Color() string
- func (c *CreateComputeInstance) Configuration() []configuration.Field
- func (c *CreateComputeInstance) Description() string
- func (c *CreateComputeInstance) Documentation() string
- func (c *CreateComputeInstance) ExampleOutput() map[string]any
- func (c *CreateComputeInstance) Execute(ctx core.ExecutionContext) error
- func (c *CreateComputeInstance) HandleHook(ctx core.ActionHookContext) error
- func (c *CreateComputeInstance) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *CreateComputeInstance) Hooks() []core.Hook
- func (c *CreateComputeInstance) Icon() string
- func (c *CreateComputeInstance) Label() string
- func (c *CreateComputeInstance) Name() string
- func (c *CreateComputeInstance) OutputChannels(configuration any) []core.OutputChannel
- func (c *CreateComputeInstance) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (c *CreateComputeInstance) Setup(ctx core.SetupContext) error
- type CreateComputeInstanceSpec
- type CreateInstanceExecutionMetadata
- type CreateVnicDetails
- type EventsRule
- type Image
- type Instance
- type InstanceShapeConfig
- type InstanceSourceDetails
- type IntegrationMetadata
- type LaunchInstanceRequest
- type OCI
- func (o *OCI) Actions() []core.Action
- func (o *OCI) Cleanup(ctx core.IntegrationCleanupContext) error
- func (o *OCI) Configuration() []configuration.Field
- func (o *OCI) Description() string
- func (o *OCI) HandleHook(ctx core.IntegrationHookContext) error
- func (o *OCI) HandleRequest(ctx core.HTTPRequestContext)
- func (o *OCI) Hooks() []core.Hook
- func (o *OCI) Icon() string
- func (o *OCI) Instructions() string
- func (o *OCI) Label() string
- func (o *OCI) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)
- func (o *OCI) Name() string
- func (o *OCI) Sync(ctx core.SyncContext) error
- func (o *OCI) Triggers() []core.Trigger
- type ONSSubscription
- type ONSTopic
- type OnComputeInstanceCreated
- func (t *OnComputeInstanceCreated) Cleanup(ctx core.TriggerContext) error
- func (t *OnComputeInstanceCreated) Color() string
- func (t *OnComputeInstanceCreated) Configuration() []configuration.Field
- func (t *OnComputeInstanceCreated) Description() string
- func (t *OnComputeInstanceCreated) Documentation() string
- func (t *OnComputeInstanceCreated) ExampleData() map[string]any
- func (t *OnComputeInstanceCreated) HandleHook(ctx core.TriggerHookContext) (map[string]any, error)
- func (t *OnComputeInstanceCreated) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (t *OnComputeInstanceCreated) Hooks() []core.Hook
- func (t *OnComputeInstanceCreated) Icon() string
- func (t *OnComputeInstanceCreated) Label() string
- func (t *OnComputeInstanceCreated) Name() string
- func (t *OnComputeInstanceCreated) Setup(ctx core.TriggerContext) error
- type OnComputeInstanceCreatedConfiguration
- type OnComputeInstanceCreatedMetadata
- type Shape
- type ShieldedInstanceConfig
- type Subnet
- type VNIC
- type VNICAttachment
- type VolumeAttachment
- type WebhookConfiguration
- type WebhookHandler
- type WebhookMetadata
Constants ¶
const ( ResourceTypeCompartment = "compartment" ResourceTypeAvailabilityDomain = "availabilityDomain" ResourceTypeShape = "shape" ResourceTypeImage = "image" ResourceTypeSubnet = "subnet" ResourceTypeBlockVolume = "blockVolume" )
const (
ComputeInstancePayloadType = "oci.computeInstanceCreated"
)
const (
OnComputeInstanceCreatedPayloadType = "oci.onComputeInstanceCreated"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AvailabilityDomain ¶
type BlockVolume ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an OCI REST API client that signs requests using OCI API Key authentication.
func NewClient ¶
func NewClient(httpCtx core.HTTPContext, integration core.IntegrationContext) (*Client, error)
func (*Client) AttachVolume ¶
func (c *Client) AttachVolume(instanceID, volumeID string) (*VolumeAttachment, error)
AttachVolume attaches an existing block volume to a running instance using paravirtualised attachment.
func (*Client) CreateEventsRule ¶
func (c *Client) CreateEventsRule(compartmentID, displayName, condition, topicID string) (*EventsRule, error)
CreateEventsRule creates an OCI Events rule that routes matching events to an ONS topic.
func (*Client) CreateONSSubscription ¶
func (c *Client) CreateONSSubscription(compartmentID, topicID, endpoint string) (*ONSSubscription, error)
CreateONSSubscription creates an HTTPS subscription on an OCI Notifications topic.
func (*Client) CreateONSTopic ¶
CreateONSTopic creates a new OCI Notifications topic.
func (*Client) DeleteEventsRule ¶
DeleteEventsRule deletes an OCI Events rule by its OCID.
func (*Client) DeleteONSSubscription ¶
DeleteONSSubscription deletes an OCI Notifications subscription by its OCID.
func (*Client) DeleteONSTopic ¶
DeleteONSTopic deletes an OCI Notifications topic by its OCID. Deleting the topic also removes all its subscriptions.
func (*Client) GetInstance ¶
GetInstance retrieves a Compute instance by OCID.
func (*Client) LaunchInstance ¶
func (c *Client) LaunchInstance(req LaunchInstanceRequest) (*Instance, error)
LaunchInstance starts a new OCI Compute instance.
func (*Client) ListAvailabilityDomains ¶
func (c *Client) ListAvailabilityDomains(compartmentID string) ([]AvailabilityDomain, error)
func (*Client) ListBlockVolumes ¶
func (c *Client) ListBlockVolumes(compartmentID string) ([]BlockVolume, error)
func (*Client) ListCompartments ¶
func (c *Client) ListCompartments() ([]Compartment, error)
func (*Client) ListImages ¶
func (*Client) ListVNICAttachments ¶
func (c *Client) ListVNICAttachments(compartmentID, instanceID string) ([]VNICAttachment, error)
ListVNICAttachments lists VNIC attachments for an instance, used to find IP addresses.
func (*Client) ValidateCredentials ¶
ValidateCredentials validates the OCI credentials by fetching the current user.
type Compartment ¶
type ConfidentialInstanceOptions ¶
type ConfidentialInstanceOptions struct {
IsEnabled bool `json:"isEnabled"`
}
type Configuration ¶
type Configuration struct {
TenancyOCID string `json:"tenancyOcid" mapstructure:"tenancyOcid"`
UserOCID string `json:"userOcid" mapstructure:"userOcid"`
Fingerprint string `json:"fingerprint" mapstructure:"fingerprint"`
PrivateKey string `json:"privateKey" mapstructure:"privateKey"`
Region string `json:"region" mapstructure:"region"`
}
type CreateComputeInstance ¶
type CreateComputeInstance struct{}
func (*CreateComputeInstance) Cancel ¶
func (c *CreateComputeInstance) Cancel(ctx core.ExecutionContext) error
func (*CreateComputeInstance) Cleanup ¶
func (c *CreateComputeInstance) Cleanup(ctx core.SetupContext) error
func (*CreateComputeInstance) Color ¶
func (c *CreateComputeInstance) Color() string
func (*CreateComputeInstance) Configuration ¶
func (c *CreateComputeInstance) Configuration() []configuration.Field
func (*CreateComputeInstance) Description ¶
func (c *CreateComputeInstance) Description() string
func (*CreateComputeInstance) Documentation ¶
func (c *CreateComputeInstance) Documentation() string
func (*CreateComputeInstance) ExampleOutput ¶
func (c *CreateComputeInstance) ExampleOutput() map[string]any
func (*CreateComputeInstance) Execute ¶
func (c *CreateComputeInstance) Execute(ctx core.ExecutionContext) error
func (*CreateComputeInstance) HandleHook ¶
func (c *CreateComputeInstance) HandleHook(ctx core.ActionHookContext) error
func (*CreateComputeInstance) HandleWebhook ¶
func (c *CreateComputeInstance) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*CreateComputeInstance) Hooks ¶
func (c *CreateComputeInstance) Hooks() []core.Hook
func (*CreateComputeInstance) Icon ¶
func (c *CreateComputeInstance) Icon() string
func (*CreateComputeInstance) Label ¶
func (c *CreateComputeInstance) Label() string
func (*CreateComputeInstance) Name ¶
func (c *CreateComputeInstance) Name() string
func (*CreateComputeInstance) OutputChannels ¶
func (c *CreateComputeInstance) OutputChannels(configuration any) []core.OutputChannel
func (*CreateComputeInstance) ProcessQueueItem ¶
func (c *CreateComputeInstance) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*CreateComputeInstance) Setup ¶
func (c *CreateComputeInstance) Setup(ctx core.SetupContext) error
type CreateComputeInstanceSpec ¶
type CreateComputeInstanceSpec struct {
CompartmentID string `json:"compartmentId" mapstructure:"compartmentId"`
AvailabilityDomain string `json:"availabilityDomain" mapstructure:"availabilityDomain"`
DisplayName string `json:"displayName" mapstructure:"displayName"`
ImageOs string `json:"imageOs" mapstructure:"imageOs"`
Shape string `json:"shape" mapstructure:"shape"`
ImageID string `json:"imageId" mapstructure:"imageId"`
SubnetID string `json:"subnetId" mapstructure:"subnetId"`
SSHPublicKey string `json:"sshPublicKey" mapstructure:"sshPublicKey"`
OCPUs *float64 `json:"ocpus" mapstructure:"ocpus"`
MemoryInGBs *float64 `json:"memoryInGBs" mapstructure:"memoryInGBs"`
EnableShieldedInstance bool `json:"enableShieldedInstance" mapstructure:"enableShieldedInstance"`
EnableConfidentialComputing bool `json:"enableConfidentialComputing" mapstructure:"enableConfidentialComputing"`
BootVolumeSizeGB *float64 `json:"bootVolumeSizeGB" mapstructure:"bootVolumeSizeGB"`
BootVolumeVpusPerGB *float64 `json:"bootVolumeVpusPerGB" mapstructure:"bootVolumeVpusPerGB"`
AttachBlockVolume bool `json:"attachBlockVolume" mapstructure:"attachBlockVolume"`
BlockVolumeID string `json:"blockVolumeId" mapstructure:"blockVolumeId"`
}
type CreateInstanceExecutionMetadata ¶
type CreateInstanceExecutionMetadata struct {
InstanceID string `json:"instanceId" mapstructure:"instanceId"`
CompartmentID string `json:"compartmentId" mapstructure:"compartmentId"`
BlockVolumeID string `json:"blockVolumeId" mapstructure:"blockVolumeId"`
BlockVolumeAttachmentID string `json:"blockVolumeAttachmentId" mapstructure:"blockVolumeAttachmentId"`
PollErrors int `json:"pollErrors" mapstructure:"pollErrors"`
PollAttempts int `json:"pollAttempts" mapstructure:"pollAttempts"`
StartedAt string `json:"startedAt" mapstructure:"startedAt"`
}
type CreateVnicDetails ¶
type CreateVnicDetails struct {
SubnetID string `json:"subnetId"`
}
type EventsRule ¶
type Instance ¶
type Instance struct {
ID string `json:"id"`
DisplayName string `json:"displayName"`
LifecycleState string `json:"lifecycleState"`
Shape string `json:"shape"`
AvailabilityDomain string `json:"availabilityDomain"`
CompartmentID string `json:"compartmentId"`
Region string `json:"region"`
TimeCreated string `json:"timeCreated"`
}
type InstanceShapeConfig ¶
type InstanceSourceDetails ¶
type IntegrationMetadata ¶
type IntegrationMetadata struct {
TopicID string `json:"topicId" mapstructure:"topicId"`
}
IntegrationMetadata holds resources created during integration setup.
type LaunchInstanceRequest ¶
type LaunchInstanceRequest struct {
CompartmentID string `json:"compartmentId"`
AvailabilityDomain string `json:"availabilityDomain"`
DisplayName string `json:"displayName,omitempty"`
Shape string `json:"shape"`
SourceDetails InstanceSourceDetails `json:"sourceDetails"`
CreateVnicDetails *CreateVnicDetails `json:"createVnicDetails,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
ShapeConfig *InstanceShapeConfig `json:"shapeConfig,omitempty"`
ShieldedInstanceConfig *ShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"`
ConfidentialInstanceOptions *ConfidentialInstanceOptions `json:"confidentialInstanceOptions,omitempty"`
}
type OCI ¶
type OCI struct{}
func (*OCI) Configuration ¶
func (o *OCI) Configuration() []configuration.Field
func (*OCI) Description ¶
func (*OCI) HandleHook ¶
func (o *OCI) HandleHook(ctx core.IntegrationHookContext) error
func (*OCI) HandleRequest ¶
func (o *OCI) HandleRequest(ctx core.HTTPRequestContext)
func (*OCI) Instructions ¶
func (*OCI) ListResources ¶
func (o *OCI) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)
type ONSSubscription ¶
type OnComputeInstanceCreated ¶
type OnComputeInstanceCreated struct{}
func (*OnComputeInstanceCreated) Cleanup ¶
func (t *OnComputeInstanceCreated) Cleanup(ctx core.TriggerContext) error
func (*OnComputeInstanceCreated) Color ¶
func (t *OnComputeInstanceCreated) Color() string
func (*OnComputeInstanceCreated) Configuration ¶
func (t *OnComputeInstanceCreated) Configuration() []configuration.Field
func (*OnComputeInstanceCreated) Description ¶
func (t *OnComputeInstanceCreated) Description() string
func (*OnComputeInstanceCreated) Documentation ¶
func (t *OnComputeInstanceCreated) Documentation() string
func (*OnComputeInstanceCreated) ExampleData ¶
func (t *OnComputeInstanceCreated) ExampleData() map[string]any
func (*OnComputeInstanceCreated) HandleHook ¶
func (t *OnComputeInstanceCreated) HandleHook(ctx core.TriggerHookContext) (map[string]any, error)
func (*OnComputeInstanceCreated) HandleWebhook ¶
func (t *OnComputeInstanceCreated) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
HandleWebhook processes inbound requests forwarded by OCI Notifications.
func (*OnComputeInstanceCreated) Hooks ¶
func (t *OnComputeInstanceCreated) Hooks() []core.Hook
func (*OnComputeInstanceCreated) Icon ¶
func (t *OnComputeInstanceCreated) Icon() string
func (*OnComputeInstanceCreated) Label ¶
func (t *OnComputeInstanceCreated) Label() string
func (*OnComputeInstanceCreated) Name ¶
func (t *OnComputeInstanceCreated) Name() string
func (*OnComputeInstanceCreated) Setup ¶
func (t *OnComputeInstanceCreated) Setup(ctx core.TriggerContext) error
type OnComputeInstanceCreatedConfiguration ¶
type OnComputeInstanceCreatedConfiguration struct {
CompartmentID string `json:"compartmentId" mapstructure:"compartmentId"`
}
type ShieldedInstanceConfig ¶
type VNICAttachment ¶
type VolumeAttachment ¶
type WebhookConfiguration ¶
type WebhookConfiguration struct {
// CompartmentID is used when creating the ONS subscription (required by OCI).
CompartmentID string `json:"compartmentId" mapstructure:"compartmentId"`
// TopicID is the OCID of the ONS topic to subscribe to.
TopicID string `json:"topicId" mapstructure:"topicId"`
}
WebhookConfiguration is stored on each OCI webhook record so the handler knows which ONS topic to subscribe / unsubscribe.
type WebhookHandler ¶
type WebhookHandler struct{}
func (*WebhookHandler) Cleanup ¶
func (h *WebhookHandler) Cleanup(ctx core.WebhookHandlerContext) error
Cleanup deletes the ONS subscription created during Setup.
func (*WebhookHandler) CompareConfig ¶
func (h *WebhookHandler) CompareConfig(a, b any) (bool, error)
CompareConfig returns true when both configs point to the same ONS topic.
func (*WebhookHandler) Merge ¶
func (h *WebhookHandler) Merge(current, requested any) (any, bool, error)
Merge returns the requested config unchanged (no merging needed for OCI webhooks).
func (*WebhookHandler) Setup ¶
func (h *WebhookHandler) Setup(ctx core.WebhookHandlerContext) (any, error)
Setup creates an HTTPS subscription on the configured OCI Notifications topic, pointing to the SuperPlane-generated webhook URL.
type WebhookMetadata ¶
type WebhookMetadata struct {
SubscriptionID string `json:"subscriptionId" mapstructure:"subscriptionId"`
}
WebhookMetadata is persisted after a successful subscription and used during cleanup.