Documentation
¶
Index ¶
- Constants
- Variables
- func CreateVM(ctx context.Context, provider *AzureProvider, req CreateVMRequest, ...) (map[string]any, error)
- func DeallocateVM(ctx context.Context, provider *AzureProvider, req VMActionRequest, ...) (map[string]any, error)
- func DeleteVM(ctx context.Context, provider *AzureProvider, req DeleteVMRequest, ...) (map[string]any, error)
- func RestartVM(ctx context.Context, provider *AzureProvider, req VMActionRequest, ...) (map[string]any, error)
- func StartVM(ctx context.Context, provider *AzureProvider, req VMActionRequest, ...) (map[string]any, error)
- func StopVM(ctx context.Context, provider *AzureProvider, req VMActionRequest, ...) (map[string]any, error)
- type ACRActorInfo
- type ACREventData
- type ACRRequest
- type ACRSource
- type ACRTarget
- type AuthorizationInfo
- type AzureIntegration
- func (a *AzureIntegration) Actions() []core.Action
- func (a *AzureIntegration) Cleanup(ctx core.IntegrationCleanupContext) error
- func (a *AzureIntegration) Components() []core.Component
- func (a *AzureIntegration) Configuration() []configuration.Field
- func (a *AzureIntegration) Description() string
- func (a *AzureIntegration) HandleAction(ctx core.IntegrationActionContext) error
- func (a *AzureIntegration) HandleRequest(ctx core.HTTPRequestContext)
- func (a *AzureIntegration) Icon() string
- func (a *AzureIntegration) Instructions() string
- func (a *AzureIntegration) Label() string
- func (a *AzureIntegration) ListContainerRegistries(ctx core.ListResourcesContext, resourceGroup string) ([]core.IntegrationResource, error)
- func (a *AzureIntegration) ListResourceGroupLocations(ctx core.ListResourcesContext, resourceGroup string) ([]core.IntegrationResource, error)
- func (a *AzureIntegration) ListResourceGroups(ctx core.ListResourcesContext) ([]core.IntegrationResource, error)
- func (a *AzureIntegration) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)
- func (a *AzureIntegration) ListStorageAccounts(ctx core.ListResourcesContext, resourceGroup string) ([]core.IntegrationResource, error)
- func (a *AzureIntegration) ListSubnets(ctx core.ListResourcesContext, resourceGroup, vnetName string) ([]core.IntegrationResource, error)
- func (a *AzureIntegration) ListVMSizes(ctx core.ListResourcesContext, resourceGroup string) ([]core.IntegrationResource, error)
- func (a *AzureIntegration) ListVirtualNetworks(ctx core.ListResourcesContext, resourceGroup string) ([]core.IntegrationResource, error)
- func (a *AzureIntegration) Name() string
- func (a *AzureIntegration) Sync(ctx core.SyncContext) error
- func (a *AzureIntegration) Triggers() []core.Trigger
- type AzureProvider
- type AzureWebhookConfiguration
- type AzureWebhookHandler
- func (h *AzureWebhookHandler) Cleanup(ctx core.WebhookHandlerContext) error
- func (h *AzureWebhookHandler) CompareConfig(a, b any) (bool, error)
- func (h *AzureWebhookHandler) Merge(current, requested any) (merged any, changed bool, err error)
- func (h *AzureWebhookHandler) Setup(ctx core.WebhookHandlerContext) (any, error)
- type BlobEventData
- type Configuration
- type CreateVMComponent
- func (c *CreateVMComponent) Actions() []core.Action
- func (c *CreateVMComponent) Cancel(ctx core.ExecutionContext) error
- func (c *CreateVMComponent) Cleanup(ctx core.SetupContext) error
- func (c *CreateVMComponent) Color() string
- func (c *CreateVMComponent) Configuration() []configuration.Field
- func (c *CreateVMComponent) Description() string
- func (c *CreateVMComponent) Documentation() string
- func (c *CreateVMComponent) ExampleOutput() map[string]any
- func (c *CreateVMComponent) Execute(ctx core.ExecutionContext) error
- func (c *CreateVMComponent) HandleAction(ctx core.ActionContext) error
- func (c *CreateVMComponent) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *CreateVMComponent) Icon() string
- func (c *CreateVMComponent) Label() string
- func (c *CreateVMComponent) Name() string
- func (c *CreateVMComponent) OutputChannels(configuration any) []core.OutputChannel
- func (c *CreateVMComponent) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (c *CreateVMComponent) Setup(ctx core.SetupContext) error
- type CreateVMConfiguration
- type CreateVMRequest
- type DeallocateVMComponent
- func (c *DeallocateVMComponent) Actions() []core.Action
- func (c *DeallocateVMComponent) Cancel(ctx core.ExecutionContext) error
- func (c *DeallocateVMComponent) Cleanup(ctx core.SetupContext) error
- func (c *DeallocateVMComponent) Color() string
- func (c *DeallocateVMComponent) Configuration() []configuration.Field
- func (c *DeallocateVMComponent) Description() string
- func (c *DeallocateVMComponent) Documentation() string
- func (c *DeallocateVMComponent) ExampleOutput() map[string]any
- func (c *DeallocateVMComponent) Execute(ctx core.ExecutionContext) error
- func (c *DeallocateVMComponent) HandleAction(ctx core.ActionContext) error
- func (c *DeallocateVMComponent) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *DeallocateVMComponent) Icon() string
- func (c *DeallocateVMComponent) Label() string
- func (c *DeallocateVMComponent) Name() string
- func (c *DeallocateVMComponent) OutputChannels(configuration any) []core.OutputChannel
- func (c *DeallocateVMComponent) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (c *DeallocateVMComponent) Setup(ctx core.SetupContext) error
- type DeallocateVMConfiguration
- type DeleteVMComponent
- func (c *DeleteVMComponent) Actions() []core.Action
- func (c *DeleteVMComponent) Cancel(ctx core.ExecutionContext) error
- func (c *DeleteVMComponent) Cleanup(ctx core.SetupContext) error
- func (c *DeleteVMComponent) Color() string
- func (c *DeleteVMComponent) Configuration() []configuration.Field
- func (c *DeleteVMComponent) Description() string
- func (c *DeleteVMComponent) Documentation() string
- func (c *DeleteVMComponent) ExampleOutput() map[string]any
- func (c *DeleteVMComponent) Execute(ctx core.ExecutionContext) error
- func (c *DeleteVMComponent) HandleAction(ctx core.ActionContext) error
- func (c *DeleteVMComponent) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *DeleteVMComponent) Icon() string
- func (c *DeleteVMComponent) Label() string
- func (c *DeleteVMComponent) Name() string
- func (c *DeleteVMComponent) OutputChannels(configuration any) []core.OutputChannel
- func (c *DeleteVMComponent) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (c *DeleteVMComponent) Setup(ctx core.SetupContext) error
- type DeleteVMConfiguration
- type DeleteVMRequest
- type EventGridEvent
- type HTTPRequestInfo
- type ImageReference
- type OnBlobCreated
- func (t *OnBlobCreated) Actions() []core.Action
- func (t *OnBlobCreated) Cleanup(ctx core.TriggerContext) error
- func (t *OnBlobCreated) Color() string
- func (t *OnBlobCreated) Configuration() []configuration.Field
- func (t *OnBlobCreated) Description() string
- func (t *OnBlobCreated) Documentation() string
- func (t *OnBlobCreated) ExampleData() map[string]any
- func (t *OnBlobCreated) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)
- func (t *OnBlobCreated) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (t *OnBlobCreated) Icon() string
- func (t *OnBlobCreated) Label() string
- func (t *OnBlobCreated) Name() string
- func (t *OnBlobCreated) Setup(ctx core.TriggerContext) error
- type OnBlobCreatedConfiguration
- type OnBlobDeleted
- func (t *OnBlobDeleted) Actions() []core.Action
- func (t *OnBlobDeleted) Cleanup(ctx core.TriggerContext) error
- func (t *OnBlobDeleted) Color() string
- func (t *OnBlobDeleted) Configuration() []configuration.Field
- func (t *OnBlobDeleted) Description() string
- func (t *OnBlobDeleted) Documentation() string
- func (t *OnBlobDeleted) ExampleData() map[string]any
- func (t *OnBlobDeleted) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)
- func (t *OnBlobDeleted) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (t *OnBlobDeleted) Icon() string
- func (t *OnBlobDeleted) Label() string
- func (t *OnBlobDeleted) Name() string
- func (t *OnBlobDeleted) Setup(ctx core.TriggerContext) error
- type OnBlobDeletedConfiguration
- type OnImageDeleted
- func (t *OnImageDeleted) Actions() []core.Action
- func (t *OnImageDeleted) Cleanup(ctx core.TriggerContext) error
- func (t *OnImageDeleted) Color() string
- func (t *OnImageDeleted) Configuration() []configuration.Field
- func (t *OnImageDeleted) Description() string
- func (t *OnImageDeleted) Documentation() string
- func (t *OnImageDeleted) ExampleData() map[string]any
- func (t *OnImageDeleted) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)
- func (t *OnImageDeleted) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (t *OnImageDeleted) Icon() string
- func (t *OnImageDeleted) Label() string
- func (t *OnImageDeleted) Name() string
- func (t *OnImageDeleted) Setup(ctx core.TriggerContext) error
- type OnImageDeletedConfiguration
- type OnImagePushed
- func (t *OnImagePushed) Actions() []core.Action
- func (t *OnImagePushed) Cleanup(ctx core.TriggerContext) error
- func (t *OnImagePushed) Color() string
- func (t *OnImagePushed) Configuration() []configuration.Field
- func (t *OnImagePushed) Description() string
- func (t *OnImagePushed) Documentation() string
- func (t *OnImagePushed) ExampleData() map[string]any
- func (t *OnImagePushed) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)
- func (t *OnImagePushed) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (t *OnImagePushed) Icon() string
- func (t *OnImagePushed) Label() string
- func (t *OnImagePushed) Name() string
- func (t *OnImagePushed) Setup(ctx core.TriggerContext) error
- type OnImagePushedConfiguration
- type OnVMDeallocated
- func (t *OnVMDeallocated) Actions() []core.Action
- func (t *OnVMDeallocated) Cleanup(ctx core.TriggerContext) error
- func (t *OnVMDeallocated) Color() string
- func (t *OnVMDeallocated) Configuration() []configuration.Field
- func (t *OnVMDeallocated) Description() string
- func (t *OnVMDeallocated) Documentation() string
- func (t *OnVMDeallocated) ExampleData() map[string]any
- func (t *OnVMDeallocated) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)
- func (t *OnVMDeallocated) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (t *OnVMDeallocated) Icon() string
- func (t *OnVMDeallocated) Label() string
- func (t *OnVMDeallocated) Name() string
- func (t *OnVMDeallocated) Setup(ctx core.TriggerContext) error
- type OnVMDeallocatedConfiguration
- type OnVMDeleted
- func (t *OnVMDeleted) Actions() []core.Action
- func (t *OnVMDeleted) Cleanup(ctx core.TriggerContext) error
- func (t *OnVMDeleted) Color() string
- func (t *OnVMDeleted) Configuration() []configuration.Field
- func (t *OnVMDeleted) Description() string
- func (t *OnVMDeleted) Documentation() string
- func (t *OnVMDeleted) ExampleData() map[string]any
- func (t *OnVMDeleted) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)
- func (t *OnVMDeleted) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (t *OnVMDeleted) Icon() string
- func (t *OnVMDeleted) Label() string
- func (t *OnVMDeleted) Name() string
- func (t *OnVMDeleted) Setup(ctx core.TriggerContext) error
- type OnVMDeletedConfiguration
- type OnVMRestarted
- func (t *OnVMRestarted) Actions() []core.Action
- func (t *OnVMRestarted) Cleanup(ctx core.TriggerContext) error
- func (t *OnVMRestarted) Color() string
- func (t *OnVMRestarted) Configuration() []configuration.Field
- func (t *OnVMRestarted) Description() string
- func (t *OnVMRestarted) Documentation() string
- func (t *OnVMRestarted) ExampleData() map[string]any
- func (t *OnVMRestarted) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)
- func (t *OnVMRestarted) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (t *OnVMRestarted) Icon() string
- func (t *OnVMRestarted) Label() string
- func (t *OnVMRestarted) Name() string
- func (t *OnVMRestarted) Setup(ctx core.TriggerContext) error
- type OnVMRestartedConfiguration
- type OnVMStarted
- func (t *OnVMStarted) Actions() []core.Action
- func (t *OnVMStarted) Cleanup(ctx core.TriggerContext) error
- func (t *OnVMStarted) Color() string
- func (t *OnVMStarted) Configuration() []configuration.Field
- func (t *OnVMStarted) Description() string
- func (t *OnVMStarted) Documentation() string
- func (t *OnVMStarted) ExampleData() map[string]any
- func (t *OnVMStarted) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)
- func (t *OnVMStarted) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (t *OnVMStarted) Icon() string
- func (t *OnVMStarted) Label() string
- func (t *OnVMStarted) Name() string
- func (t *OnVMStarted) Setup(ctx core.TriggerContext) error
- type OnVMStartedConfiguration
- type OnVMStopped
- func (t *OnVMStopped) Actions() []core.Action
- func (t *OnVMStopped) Cleanup(ctx core.TriggerContext) error
- func (t *OnVMStopped) Color() string
- func (t *OnVMStopped) Configuration() []configuration.Field
- func (t *OnVMStopped) Description() string
- func (t *OnVMStopped) Documentation() string
- func (t *OnVMStopped) ExampleData() map[string]any
- func (t *OnVMStopped) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)
- func (t *OnVMStopped) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (t *OnVMStopped) Icon() string
- func (t *OnVMStopped) Label() string
- func (t *OnVMStopped) Name() string
- func (t *OnVMStopped) Setup(ctx core.TriggerContext) error
- type OnVMStoppedConfiguration
- type ResourceDeleteSuccessData
- type ResourceWriteSuccessData
- type RestartVMComponent
- func (c *RestartVMComponent) Actions() []core.Action
- func (c *RestartVMComponent) Cancel(ctx core.ExecutionContext) error
- func (c *RestartVMComponent) Cleanup(ctx core.SetupContext) error
- func (c *RestartVMComponent) Color() string
- func (c *RestartVMComponent) Configuration() []configuration.Field
- func (c *RestartVMComponent) Description() string
- func (c *RestartVMComponent) Documentation() string
- func (c *RestartVMComponent) ExampleOutput() map[string]any
- func (c *RestartVMComponent) Execute(ctx core.ExecutionContext) error
- func (c *RestartVMComponent) HandleAction(ctx core.ActionContext) error
- func (c *RestartVMComponent) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *RestartVMComponent) Icon() string
- func (c *RestartVMComponent) Label() string
- func (c *RestartVMComponent) Name() string
- func (c *RestartVMComponent) OutputChannels(configuration any) []core.OutputChannel
- func (c *RestartVMComponent) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (c *RestartVMComponent) Setup(ctx core.SetupContext) error
- type RestartVMConfiguration
- type StartVMComponent
- func (c *StartVMComponent) Actions() []core.Action
- func (c *StartVMComponent) Cancel(ctx core.ExecutionContext) error
- func (c *StartVMComponent) Cleanup(ctx core.SetupContext) error
- func (c *StartVMComponent) Color() string
- func (c *StartVMComponent) Configuration() []configuration.Field
- func (c *StartVMComponent) Description() string
- func (c *StartVMComponent) Documentation() string
- func (c *StartVMComponent) ExampleOutput() map[string]any
- func (c *StartVMComponent) Execute(ctx core.ExecutionContext) error
- func (c *StartVMComponent) HandleAction(ctx core.ActionContext) error
- func (c *StartVMComponent) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *StartVMComponent) Icon() string
- func (c *StartVMComponent) Label() string
- func (c *StartVMComponent) Name() string
- func (c *StartVMComponent) OutputChannels(configuration any) []core.OutputChannel
- func (c *StartVMComponent) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (c *StartVMComponent) Setup(ctx core.SetupContext) error
- type StartVMConfiguration
- type StopVMComponent
- func (c *StopVMComponent) Actions() []core.Action
- func (c *StopVMComponent) Cancel(ctx core.ExecutionContext) error
- func (c *StopVMComponent) Cleanup(ctx core.SetupContext) error
- func (c *StopVMComponent) Color() string
- func (c *StopVMComponent) Configuration() []configuration.Field
- func (c *StopVMComponent) Description() string
- func (c *StopVMComponent) Documentation() string
- func (c *StopVMComponent) ExampleOutput() map[string]any
- func (c *StopVMComponent) Execute(ctx core.ExecutionContext) error
- func (c *StopVMComponent) HandleAction(ctx core.ActionContext) error
- func (c *StopVMComponent) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *StopVMComponent) Icon() string
- func (c *StopVMComponent) Label() string
- func (c *StopVMComponent) Name() string
- func (c *StopVMComponent) OutputChannels(configuration any) []core.OutputChannel
- func (c *StopVMComponent) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (c *StopVMComponent) Setup(ctx core.SetupContext) error
- type StopVMConfiguration
- type SubscriptionValidationEventData
- type SubscriptionValidationResponse
- type VMActionRequest
Constants ¶
const ( // EventTypeSubscriptionValidation is sent when Event Grid first subscribes to a webhook EventTypeSubscriptionValidation = "Microsoft.EventGrid.SubscriptionValidationEvent" // EventTypeResourceWriteSuccess is sent when a resource write operation succeeds EventTypeResourceWriteSuccess = "Microsoft.Resources.ResourceWriteSuccess" // EventTypeResourceWriteFailure is sent when a resource write operation fails EventTypeResourceWriteFailure = "Microsoft.Resources.ResourceWriteFailure" // EventTypeResourceWriteCancel is sent when a resource write operation is canceled EventTypeResourceWriteCancel = "Microsoft.Resources.ResourceWriteCancel" // EventTypeResourceDeleteSuccess is sent when a resource delete operation succeeds EventTypeResourceDeleteSuccess = "Microsoft.Resources.ResourceDeleteSuccess" // EventTypeResourceDeleteFailure is sent when a resource delete operation fails EventTypeResourceDeleteFailure = "Microsoft.Resources.ResourceDeleteFailure" // EventTypeResourceDeleteCancel is sent when a resource delete operation is canceled EventTypeResourceDeleteCancel = "Microsoft.Resources.ResourceDeleteCancel" // EventTypeResourceActionSuccess is sent when a resource action succeeds EventTypeResourceActionSuccess = "Microsoft.Resources.ResourceActionSuccess" // EventTypeResourceActionFailure is sent when a resource action fails EventTypeResourceActionFailure = "Microsoft.Resources.ResourceActionFailure" // EventTypeResourceActionCancel is sent when a resource action is canceled EventTypeResourceActionCancel = "Microsoft.Resources.ResourceActionCancel" // EventTypeBlobCreated is sent when a blob is created or replaced in Azure Blob Storage EventTypeBlobCreated = "Microsoft.Storage.BlobCreated" // EventTypeBlobDeleted is sent when a blob is deleted from Azure Blob Storage EventTypeBlobDeleted = "Microsoft.Storage.BlobDeleted" )
Event type constants for Azure Event Grid
const ( // ResourceTypeVirtualMachine is the resource type for Azure Virtual Machines ResourceTypeVirtualMachine = "Microsoft.Compute/virtualMachines" // ResourceTypeStorageAccount is the resource type for Azure Storage Accounts ResourceTypeStorageAccount = "Microsoft.Storage/storageAccounts" // ResourceTypeNetworkInterface is the resource type for Azure Network Interfaces ResourceTypeNetworkInterface = "Microsoft.Network/networkInterfaces" // ResourceTypeVirtualNetwork is the resource type for Azure Virtual Networks ResourceTypeVirtualNetwork = "Microsoft.Network/virtualNetworks" // ResourceTypePublicIPAddress is the resource type for Azure Public IP Addresses ResourceTypePublicIPAddress = "Microsoft.Network/publicIPAddresses" // ResourceTypeContainerRegistry is the resource type for Azure Container Registries ResourceTypeContainerRegistry = "Microsoft.ContainerRegistry/registries" )
Resource type constants
const ( // EventTypeContainerImagePushed is sent when a container image is pushed to an ACR registry EventTypeContainerImagePushed = "Microsoft.ContainerRegistry.ImagePushed" // EventTypeContainerImageDeleted is sent when a container image is deleted from an ACR registry EventTypeContainerImageDeleted = "Microsoft.ContainerRegistry.ImageDeleted" )
ACR event type constants
const ( // ProvisioningStateSucceeded indicates the resource operation completed successfully ProvisioningStateSucceeded = "Succeeded" // ProvisioningStateFailed indicates the resource operation failed ProvisioningStateFailed = "Failed" // ProvisioningStateCanceled indicates the resource operation was canceled ProvisioningStateCanceled = "Canceled" // ProvisioningStateCreating indicates the resource is being created ProvisioningStateCreating = "Creating" // ProvisioningStateUpdating indicates the resource is being updated ProvisioningStateUpdating = "Updating" // ProvisioningStateDeleting indicates the resource is being deleted ProvisioningStateDeleting = "Deleting" )
Provisioning state constants
const ( ResourceTypeResourceGroupDropdown = "azure.resourceGroup" ResourceTypeResourceGroupLocation = "azure.resourceGroupLocation" ResourceTypeVMSizeDropdown = "azure.vmSize" ResourceTypeVirtualNetworkDropdown = "azure.virtualNetwork" ResourceTypeSubnetDropdown = "azure.subnet" ResourceTypeStorageAccountDropdown = "azure.storageAccount" ResourceTypeContainerRegistryDropdown = "azure.containerRegistry" )
Variables ¶
var ImageDebian12 = ImageReference{
Publisher: "Debian",
Offer: "debian-12",
SKU: "12-gen2",
Version: "latest",
}
var ImagePresets = map[string]ImageReference{ "ubuntu-24.04": ImageUbuntu2404LTS, "ubuntu-22.04": ImageUbuntu2204LTS, "ubuntu-20.04": ImageUbuntu2004LTS, "debian-12": ImageDebian12, "windows-2022": ImageWindowsServer2022, }
ImagePresets maps preset keys to their image references.
var ImageUbuntu2004LTS = ImageReference{
Publisher: "Canonical",
Offer: "0001-com-ubuntu-server-focal",
SKU: "20_04-lts-gen2",
Version: "latest",
}
var ImageUbuntu2204LTS = ImageReference{
Publisher: "Canonical",
Offer: "0001-com-ubuntu-server-jammy",
SKU: "22_04-lts-gen2",
Version: "latest",
}
var ImageUbuntu2404LTS = ImageReference{
Publisher: "Canonical",
Offer: "ubuntu-24_04-lts",
SKU: "server",
Version: "latest",
}
var ImageWindowsServer2022 = ImageReference{
Publisher: "MicrosoftWindowsServer",
Offer: "WindowsServer",
SKU: "2022-datacenter-g2",
Version: "latest",
}
Functions ¶
func CreateVM ¶
func CreateVM(ctx context.Context, provider *AzureProvider, req CreateVMRequest, logger *logrus.Entry) (map[string]any, error)
CreateVM creates a VM and waits for provisioning completion.
func DeallocateVM ¶
func DeallocateVM(ctx context.Context, provider *AzureProvider, req VMActionRequest, logger *logrus.Entry) (map[string]any, error)
DeallocateVM deallocates a VM (stop + release compute resources) and waits for completion.
func DeleteVM ¶
func DeleteVM(ctx context.Context, provider *AzureProvider, req DeleteVMRequest, logger *logrus.Entry) (map[string]any, error)
DeleteVM deletes a VM and waits for the operation to complete. If DeleteAssociatedResources is true, it first marks the VM's OS disk, data disks, NICs, and public IPs for cascade deletion using Azure's deleteOption mechanism.
func RestartVM ¶
func RestartVM(ctx context.Context, provider *AzureProvider, req VMActionRequest, logger *logrus.Entry) (map[string]any, error)
RestartVM restarts a VM in place and waits for completion.
Types ¶
type ACRActorInfo ¶
type ACRActorInfo struct {
Name string `json:"name"`
}
ACRActorInfo contains information about the actor that triggered the ACR event
type ACREventData ¶
type ACREventData struct {
ID string `json:"id"`
Timestamp string `json:"timestamp"`
Action string `json:"action"`
Target *ACRTarget `json:"target"`
Request *ACRRequest `json:"request"`
Actor *ACRActorInfo `json:"actor"`
Source *ACRSource `json:"source"`
}
ACREventData contains the data payload for ACR Image Push and Delete events
type ACRRequest ¶
type ACRRequest struct {
ID string `json:"id"`
Addr string `json:"addr"`
Host string `json:"host"`
Method string `json:"method"`
UserAgent string `json:"useragent"`
}
ACRRequest contains information about the HTTP request that triggered the ACR event
type ACRSource ¶
ACRSource contains information about the registry instance that generated the event
type ACRTarget ¶
type ACRTarget struct {
MediaType string `json:"mediaType"`
Size int64 `json:"size"`
Digest string `json:"digest"`
Length int64 `json:"length"`
Repository string `json:"repository"`
Tag string `json:"tag"`
URL string `json:"url"`
}
ACRTarget contains information about the image that was pushed or deleted
type AuthorizationInfo ¶
type AuthorizationInfo struct {
// Scope is the scope of the authorization
Scope string `json:"scope"`
// Action is the action that was authorized
Action string `json:"action"`
// Evidence contains additional evidence for the authorization
Evidence map[string]any `json:"evidence,omitempty"`
}
AuthorizationInfo contains authorization information for a resource operation
type AzureIntegration ¶
type AzureIntegration struct{}
func (*AzureIntegration) Actions ¶
func (a *AzureIntegration) Actions() []core.Action
Actions returns integration-level actions.
func (*AzureIntegration) Cleanup ¶
func (a *AzureIntegration) Cleanup(ctx core.IntegrationCleanupContext) error
Cleanup handles integration teardown.
func (*AzureIntegration) Components ¶
func (a *AzureIntegration) Components() []core.Component
func (*AzureIntegration) Configuration ¶
func (a *AzureIntegration) Configuration() []configuration.Field
func (*AzureIntegration) Description ¶
func (a *AzureIntegration) Description() string
func (*AzureIntegration) HandleAction ¶
func (a *AzureIntegration) HandleAction(ctx core.IntegrationActionContext) error
HandleAction executes an integration-level action.
func (*AzureIntegration) HandleRequest ¶
func (a *AzureIntegration) HandleRequest(ctx core.HTTPRequestContext)
HandleRequest routes incoming HTTP requests.
func (*AzureIntegration) Icon ¶
func (a *AzureIntegration) Icon() string
func (*AzureIntegration) Instructions ¶
func (a *AzureIntegration) Instructions() string
func (*AzureIntegration) Label ¶
func (a *AzureIntegration) Label() string
func (*AzureIntegration) ListContainerRegistries ¶
func (a *AzureIntegration) ListContainerRegistries(ctx core.ListResourcesContext, resourceGroup string) ([]core.IntegrationResource, error)
func (*AzureIntegration) ListResourceGroupLocations ¶
func (a *AzureIntegration) ListResourceGroupLocations(ctx core.ListResourcesContext, resourceGroup string) ([]core.IntegrationResource, error)
func (*AzureIntegration) ListResourceGroups ¶
func (a *AzureIntegration) ListResourceGroups(ctx core.ListResourcesContext) ([]core.IntegrationResource, error)
func (*AzureIntegration) ListResources ¶
func (a *AzureIntegration) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)
ListResources lists Azure resources by resource type.
func (*AzureIntegration) ListStorageAccounts ¶
func (a *AzureIntegration) ListStorageAccounts(ctx core.ListResourcesContext, resourceGroup string) ([]core.IntegrationResource, error)
func (*AzureIntegration) ListSubnets ¶
func (a *AzureIntegration) ListSubnets(ctx core.ListResourcesContext, resourceGroup, vnetName string) ([]core.IntegrationResource, error)
func (*AzureIntegration) ListVMSizes ¶
func (a *AzureIntegration) ListVMSizes(ctx core.ListResourcesContext, resourceGroup string) ([]core.IntegrationResource, error)
func (*AzureIntegration) ListVirtualNetworks ¶
func (a *AzureIntegration) ListVirtualNetworks(ctx core.ListResourcesContext, resourceGroup string) ([]core.IntegrationResource, error)
func (*AzureIntegration) Name ¶
func (a *AzureIntegration) Name() string
func (*AzureIntegration) Sync ¶
func (a *AzureIntegration) Sync(ctx core.SyncContext) error
Sync validates configuration, initializes Azure clients, and verifies credentials. On the first sync the federated identity credential is typically not yet configured in Azure AD, so the verification call will fail and a BrowserAction with setup instructions is shown. Once the user configures the credential and re-syncs, verification succeeds and the integration transitions to Ready.
func (*AzureIntegration) Triggers ¶
func (a *AzureIntegration) Triggers() []core.Trigger
type AzureProvider ¶
type AzureProvider struct {
// contains filtered or unexported fields
}
func NewAzureProvider ¶
func NewAzureProvider(ctx context.Context, tenantID, clientID, subscriptionID string, getAssertion func(context.Context) (string, error), logger *logrus.Entry) (*AzureProvider, error)
NewAzureProvider creates an authenticated Azure provider using a caller-supplied OIDC assertion callback. The getAssertion function is called by the Azure SDK each time a new access token is needed.
func (*AzureProvider) GetCredential ¶
func (p *AzureProvider) GetCredential() azcore.TokenCredential
GetCredential returns the Azure token credential.
func (*AzureProvider) GetSubscriptionID ¶
func (p *AzureProvider) GetSubscriptionID() string
GetSubscriptionID returns the Azure subscription ID.
type AzureWebhookConfiguration ¶
type AzureWebhookConfiguration struct {
EventTypes []string `json:"eventTypes" mapstructure:"eventTypes"`
ResourceType string `json:"resourceType" mapstructure:"resourceType"`
ResourceGroup string `json:"resourceGroup,omitempty" mapstructure:"resourceGroup"`
// Scope is an optional ARM resource ID to use as the Event Grid subscription scope.
// When set, it overrides the default subscription-level scope.
Scope string `json:"scope,omitempty" mapstructure:"scope"`
}
AzureWebhookConfiguration defines how a webhook should be configured for Azure triggers.
type AzureWebhookHandler ¶
type AzureWebhookHandler struct{}
AzureWebhookHandler manages webhook lifecycle for Azure integration triggers.
func (*AzureWebhookHandler) Cleanup ¶
func (h *AzureWebhookHandler) Cleanup(ctx core.WebhookHandlerContext) error
func (*AzureWebhookHandler) CompareConfig ¶
func (h *AzureWebhookHandler) CompareConfig(a, b any) (bool, error)
func (*AzureWebhookHandler) Merge ¶
func (h *AzureWebhookHandler) Merge(current, requested any) (merged any, changed bool, err error)
func (*AzureWebhookHandler) Setup ¶
func (h *AzureWebhookHandler) Setup(ctx core.WebhookHandlerContext) (any, error)
type BlobEventData ¶
type BlobEventData struct {
API string `json:"api"`
ClientRequestID string `json:"clientRequestId"`
RequestID string `json:"requestId"`
ETag string `json:"eTag"`
ContentType string `json:"contentType"`
ContentLength int64 `json:"contentLength"`
BlobType string `json:"blobType"`
URL string `json:"url"`
Sequencer string `json:"sequencer"`
}
BlobEventData contains the data payload for Azure Blob Storage created/deleted events.
type Configuration ¶
type CreateVMComponent ¶
type CreateVMComponent struct {
}
func (*CreateVMComponent) Actions ¶
func (c *CreateVMComponent) Actions() []core.Action
func (*CreateVMComponent) Cancel ¶
func (c *CreateVMComponent) Cancel(ctx core.ExecutionContext) error
func (*CreateVMComponent) Cleanup ¶
func (c *CreateVMComponent) Cleanup(ctx core.SetupContext) error
func (*CreateVMComponent) Color ¶
func (c *CreateVMComponent) Color() string
func (*CreateVMComponent) Configuration ¶
func (c *CreateVMComponent) Configuration() []configuration.Field
func (*CreateVMComponent) Description ¶
func (c *CreateVMComponent) Description() string
func (*CreateVMComponent) Documentation ¶
func (c *CreateVMComponent) Documentation() string
func (*CreateVMComponent) ExampleOutput ¶
func (c *CreateVMComponent) ExampleOutput() map[string]any
func (*CreateVMComponent) Execute ¶
func (c *CreateVMComponent) Execute(ctx core.ExecutionContext) error
func (*CreateVMComponent) HandleAction ¶
func (c *CreateVMComponent) HandleAction(ctx core.ActionContext) error
func (*CreateVMComponent) HandleWebhook ¶
func (c *CreateVMComponent) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*CreateVMComponent) Icon ¶
func (c *CreateVMComponent) Icon() string
func (*CreateVMComponent) Label ¶
func (c *CreateVMComponent) Label() string
func (*CreateVMComponent) Name ¶
func (c *CreateVMComponent) Name() string
func (*CreateVMComponent) OutputChannels ¶
func (c *CreateVMComponent) OutputChannels(configuration any) []core.OutputChannel
func (*CreateVMComponent) ProcessQueueItem ¶
func (c *CreateVMComponent) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*CreateVMComponent) Setup ¶
func (c *CreateVMComponent) Setup(ctx core.SetupContext) error
type CreateVMConfiguration ¶
type CreateVMConfiguration struct {
ResourceGroup string `json:"resourceGroup" mapstructure:"resourceGroup"`
Name string `json:"name" mapstructure:"name"`
VirtualNetworkName string `json:"virtualNetworkName" mapstructure:"virtualNetworkName"`
SubnetName string `json:"subnetName" mapstructure:"subnetName"`
Size string `json:"size" mapstructure:"size"`
PublicIPName string `json:"publicIpName" mapstructure:"publicIpName"`
AdminUsername string `json:"adminUsername" mapstructure:"adminUsername"`
AdminPassword string `json:"adminPassword" mapstructure:"adminPassword"`
NetworkInterfaceID string `json:"networkInterfaceId" mapstructure:"networkInterfaceId"`
OSDiskType string `json:"osDiskType" mapstructure:"osDiskType"`
CustomData string `json:"customData" mapstructure:"customData"`
Image string `json:"image" mapstructure:"image"`
}
type CreateVMRequest ¶
type CreateVMRequest struct {
ResourceGroup string
VMName string
Location string
Size string
AdminUsername string
AdminPassword string
NetworkInterfaceID string
VirtualNetworkName string
SubnetName string
PublicIPName string
ImagePublisher string
ImageOffer string
ImageSku string
ImageVersion string
OSDiskType string
CustomData string
}
CreateVMRequest contains parameters for Azure VM creation.
type DeallocateVMComponent ¶
type DeallocateVMComponent struct {
}
func (*DeallocateVMComponent) Actions ¶
func (c *DeallocateVMComponent) Actions() []core.Action
func (*DeallocateVMComponent) Cancel ¶
func (c *DeallocateVMComponent) Cancel(ctx core.ExecutionContext) error
func (*DeallocateVMComponent) Cleanup ¶
func (c *DeallocateVMComponent) Cleanup(ctx core.SetupContext) error
func (*DeallocateVMComponent) Color ¶
func (c *DeallocateVMComponent) Color() string
func (*DeallocateVMComponent) Configuration ¶
func (c *DeallocateVMComponent) Configuration() []configuration.Field
func (*DeallocateVMComponent) Description ¶
func (c *DeallocateVMComponent) Description() string
func (*DeallocateVMComponent) Documentation ¶
func (c *DeallocateVMComponent) Documentation() string
func (*DeallocateVMComponent) ExampleOutput ¶
func (c *DeallocateVMComponent) ExampleOutput() map[string]any
func (*DeallocateVMComponent) Execute ¶
func (c *DeallocateVMComponent) Execute(ctx core.ExecutionContext) error
func (*DeallocateVMComponent) HandleAction ¶
func (c *DeallocateVMComponent) HandleAction(ctx core.ActionContext) error
func (*DeallocateVMComponent) HandleWebhook ¶
func (c *DeallocateVMComponent) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*DeallocateVMComponent) Icon ¶
func (c *DeallocateVMComponent) Icon() string
func (*DeallocateVMComponent) Label ¶
func (c *DeallocateVMComponent) Label() string
func (*DeallocateVMComponent) Name ¶
func (c *DeallocateVMComponent) Name() string
func (*DeallocateVMComponent) OutputChannels ¶
func (c *DeallocateVMComponent) OutputChannels(configuration any) []core.OutputChannel
func (*DeallocateVMComponent) ProcessQueueItem ¶
func (c *DeallocateVMComponent) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*DeallocateVMComponent) Setup ¶
func (c *DeallocateVMComponent) Setup(ctx core.SetupContext) error
type DeleteVMComponent ¶
type DeleteVMComponent struct {
}
func (*DeleteVMComponent) Actions ¶
func (c *DeleteVMComponent) Actions() []core.Action
func (*DeleteVMComponent) Cancel ¶
func (c *DeleteVMComponent) Cancel(ctx core.ExecutionContext) error
func (*DeleteVMComponent) Cleanup ¶
func (c *DeleteVMComponent) Cleanup(ctx core.SetupContext) error
func (*DeleteVMComponent) Color ¶
func (c *DeleteVMComponent) Color() string
func (*DeleteVMComponent) Configuration ¶
func (c *DeleteVMComponent) Configuration() []configuration.Field
func (*DeleteVMComponent) Description ¶
func (c *DeleteVMComponent) Description() string
func (*DeleteVMComponent) Documentation ¶
func (c *DeleteVMComponent) Documentation() string
func (*DeleteVMComponent) ExampleOutput ¶
func (c *DeleteVMComponent) ExampleOutput() map[string]any
func (*DeleteVMComponent) Execute ¶
func (c *DeleteVMComponent) Execute(ctx core.ExecutionContext) error
func (*DeleteVMComponent) HandleAction ¶
func (c *DeleteVMComponent) HandleAction(ctx core.ActionContext) error
func (*DeleteVMComponent) HandleWebhook ¶
func (c *DeleteVMComponent) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*DeleteVMComponent) Icon ¶
func (c *DeleteVMComponent) Icon() string
func (*DeleteVMComponent) Label ¶
func (c *DeleteVMComponent) Label() string
func (*DeleteVMComponent) Name ¶
func (c *DeleteVMComponent) Name() string
func (*DeleteVMComponent) OutputChannels ¶
func (c *DeleteVMComponent) OutputChannels(configuration any) []core.OutputChannel
func (*DeleteVMComponent) ProcessQueueItem ¶
func (c *DeleteVMComponent) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*DeleteVMComponent) Setup ¶
func (c *DeleteVMComponent) Setup(ctx core.SetupContext) error
type DeleteVMConfiguration ¶
type DeleteVMRequest ¶
DeleteVMRequest contains parameters for Azure VM deletion.
type EventGridEvent ¶
type EventGridEvent struct {
// ID is the unique identifier for the event
ID string `json:"id"`
// Topic is the full resource path to the event source
Topic string `json:"topic"`
// Subject is the publisher-defined path to the event subject
Subject string `json:"subject"`
// EventType is the one of the registered event types for this event source
EventType string `json:"eventType"`
// EventTime is the time the event is generated based on the provider's UTC time
EventTime time.Time `json:"eventTime"`
// Data contains the event data specific to the event type
Data map[string]any `json:"data"`
// DataVersion is the schema version of the data object
DataVersion string `json:"dataVersion"`
// MetadataVersion is the schema version of the event metadata
MetadataVersion string `json:"metadataVersion"`
}
EventGridEvent represents the top-level structure of an Azure Event Grid event See: https://learn.microsoft.com/en-us/azure/event-grid/event-schema
type HTTPRequestInfo ¶
type HTTPRequestInfo struct {
// ClientRequestID is the client request ID
ClientRequestID string `json:"clientRequestId"`
// ClientIPAddress is the IP address of the client
ClientIPAddress string `json:"clientIpAddress"`
// Method is the HTTP method (GET, POST, PUT, DELETE, etc.)
Method string `json:"method"`
// URL is the request URL
URL string `json:"url"`
}
HTTPRequestInfo contains information about the HTTP request that triggered an event
type ImageReference ¶
ImageReference defines an image publisher/offer/sku/version tuple.
func ResolveImagePreset ¶
func ResolveImagePreset(preset string) ImageReference
ResolveImagePreset returns the ImageReference for a preset key, or the Ubuntu 24.04 default if the key is empty or unknown.
type OnBlobCreated ¶
type OnBlobCreated struct {
// contains filtered or unexported fields
}
func (*OnBlobCreated) Actions ¶
func (t *OnBlobCreated) Actions() []core.Action
func (*OnBlobCreated) Cleanup ¶
func (t *OnBlobCreated) Cleanup(ctx core.TriggerContext) error
func (*OnBlobCreated) Color ¶
func (t *OnBlobCreated) Color() string
func (*OnBlobCreated) Configuration ¶
func (t *OnBlobCreated) Configuration() []configuration.Field
func (*OnBlobCreated) Description ¶
func (t *OnBlobCreated) Description() string
func (*OnBlobCreated) Documentation ¶
func (t *OnBlobCreated) Documentation() string
func (*OnBlobCreated) ExampleData ¶
func (t *OnBlobCreated) ExampleData() map[string]any
func (*OnBlobCreated) HandleAction ¶
func (t *OnBlobCreated) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)
func (*OnBlobCreated) HandleWebhook ¶
func (t *OnBlobCreated) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*OnBlobCreated) Icon ¶
func (t *OnBlobCreated) Icon() string
func (*OnBlobCreated) Label ¶
func (t *OnBlobCreated) Label() string
func (*OnBlobCreated) Name ¶
func (t *OnBlobCreated) Name() string
func (*OnBlobCreated) Setup ¶
func (t *OnBlobCreated) Setup(ctx core.TriggerContext) error
type OnBlobCreatedConfiguration ¶
type OnBlobCreatedConfiguration struct {
ResourceGroup string `json:"resourceGroup" mapstructure:"resourceGroup"`
StorageAccount string `json:"storageAccount" mapstructure:"storageAccount"`
ContainerFilter string `json:"containerFilter" mapstructure:"containerFilter"`
BlobFilter string `json:"blobFilter" mapstructure:"blobFilter"`
}
type OnBlobDeleted ¶
type OnBlobDeleted struct {
// contains filtered or unexported fields
}
func (*OnBlobDeleted) Actions ¶
func (t *OnBlobDeleted) Actions() []core.Action
func (*OnBlobDeleted) Cleanup ¶
func (t *OnBlobDeleted) Cleanup(ctx core.TriggerContext) error
func (*OnBlobDeleted) Color ¶
func (t *OnBlobDeleted) Color() string
func (*OnBlobDeleted) Configuration ¶
func (t *OnBlobDeleted) Configuration() []configuration.Field
func (*OnBlobDeleted) Description ¶
func (t *OnBlobDeleted) Description() string
func (*OnBlobDeleted) Documentation ¶
func (t *OnBlobDeleted) Documentation() string
func (*OnBlobDeleted) ExampleData ¶
func (t *OnBlobDeleted) ExampleData() map[string]any
func (*OnBlobDeleted) HandleAction ¶
func (t *OnBlobDeleted) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)
func (*OnBlobDeleted) HandleWebhook ¶
func (t *OnBlobDeleted) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*OnBlobDeleted) Icon ¶
func (t *OnBlobDeleted) Icon() string
func (*OnBlobDeleted) Label ¶
func (t *OnBlobDeleted) Label() string
func (*OnBlobDeleted) Name ¶
func (t *OnBlobDeleted) Name() string
func (*OnBlobDeleted) Setup ¶
func (t *OnBlobDeleted) Setup(ctx core.TriggerContext) error
type OnBlobDeletedConfiguration ¶
type OnBlobDeletedConfiguration struct {
ResourceGroup string `json:"resourceGroup" mapstructure:"resourceGroup"`
StorageAccount string `json:"storageAccount" mapstructure:"storageAccount"`
ContainerFilter string `json:"containerFilter" mapstructure:"containerFilter"`
BlobFilter string `json:"blobFilter" mapstructure:"blobFilter"`
}
type OnImageDeleted ¶
type OnImageDeleted struct {
}
func (*OnImageDeleted) Actions ¶
func (t *OnImageDeleted) Actions() []core.Action
func (*OnImageDeleted) Cleanup ¶
func (t *OnImageDeleted) Cleanup(ctx core.TriggerContext) error
func (*OnImageDeleted) Color ¶
func (t *OnImageDeleted) Color() string
func (*OnImageDeleted) Configuration ¶
func (t *OnImageDeleted) Configuration() []configuration.Field
func (*OnImageDeleted) Description ¶
func (t *OnImageDeleted) Description() string
func (*OnImageDeleted) Documentation ¶
func (t *OnImageDeleted) Documentation() string
func (*OnImageDeleted) ExampleData ¶
func (t *OnImageDeleted) ExampleData() map[string]any
func (*OnImageDeleted) HandleAction ¶
func (t *OnImageDeleted) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)
func (*OnImageDeleted) HandleWebhook ¶
func (t *OnImageDeleted) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*OnImageDeleted) Icon ¶
func (t *OnImageDeleted) Icon() string
func (*OnImageDeleted) Label ¶
func (t *OnImageDeleted) Label() string
func (*OnImageDeleted) Name ¶
func (t *OnImageDeleted) Name() string
func (*OnImageDeleted) Setup ¶
func (t *OnImageDeleted) Setup(ctx core.TriggerContext) error
type OnImagePushed ¶
type OnImagePushed struct {
}
func (*OnImagePushed) Actions ¶
func (t *OnImagePushed) Actions() []core.Action
func (*OnImagePushed) Cleanup ¶
func (t *OnImagePushed) Cleanup(ctx core.TriggerContext) error
func (*OnImagePushed) Color ¶
func (t *OnImagePushed) Color() string
func (*OnImagePushed) Configuration ¶
func (t *OnImagePushed) Configuration() []configuration.Field
func (*OnImagePushed) Description ¶
func (t *OnImagePushed) Description() string
func (*OnImagePushed) Documentation ¶
func (t *OnImagePushed) Documentation() string
func (*OnImagePushed) ExampleData ¶
func (t *OnImagePushed) ExampleData() map[string]any
func (*OnImagePushed) HandleAction ¶
func (t *OnImagePushed) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)
func (*OnImagePushed) HandleWebhook ¶
func (t *OnImagePushed) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*OnImagePushed) Icon ¶
func (t *OnImagePushed) Icon() string
func (*OnImagePushed) Label ¶
func (t *OnImagePushed) Label() string
func (*OnImagePushed) Name ¶
func (t *OnImagePushed) Name() string
func (*OnImagePushed) Setup ¶
func (t *OnImagePushed) Setup(ctx core.TriggerContext) error
type OnImagePushedConfiguration ¶
type OnImagePushedConfiguration struct {
ResourceGroup string `json:"resourceGroup" mapstructure:"resourceGroup"`
Registry string `json:"registry" mapstructure:"registry"`
RepositoryFilter string `json:"repositoryFilter" mapstructure:"repositoryFilter"`
TagFilter string `json:"tagFilter" mapstructure:"tagFilter"`
}
type OnVMDeallocated ¶
type OnVMDeallocated struct {
// contains filtered or unexported fields
}
func (*OnVMDeallocated) Actions ¶
func (t *OnVMDeallocated) Actions() []core.Action
func (*OnVMDeallocated) Cleanup ¶
func (t *OnVMDeallocated) Cleanup(ctx core.TriggerContext) error
Cleanup is called when the trigger is removed.
func (*OnVMDeallocated) Color ¶
func (t *OnVMDeallocated) Color() string
func (*OnVMDeallocated) Configuration ¶
func (t *OnVMDeallocated) Configuration() []configuration.Field
func (*OnVMDeallocated) Description ¶
func (t *OnVMDeallocated) Description() string
func (*OnVMDeallocated) Documentation ¶
func (t *OnVMDeallocated) Documentation() string
func (*OnVMDeallocated) ExampleData ¶
func (t *OnVMDeallocated) ExampleData() map[string]any
func (*OnVMDeallocated) HandleAction ¶
func (t *OnVMDeallocated) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)
func (*OnVMDeallocated) HandleWebhook ¶
func (t *OnVMDeallocated) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
HandleWebhook processes Event Grid webhook requests.
func (*OnVMDeallocated) Icon ¶
func (t *OnVMDeallocated) Icon() string
func (*OnVMDeallocated) Label ¶
func (t *OnVMDeallocated) Label() string
func (*OnVMDeallocated) Name ¶
func (t *OnVMDeallocated) Name() string
func (*OnVMDeallocated) Setup ¶
func (t *OnVMDeallocated) Setup(ctx core.TriggerContext) error
Setup configures trigger webhooks.
type OnVMDeleted ¶
type OnVMDeleted struct {
}
func (*OnVMDeleted) Actions ¶
func (t *OnVMDeleted) Actions() []core.Action
func (*OnVMDeleted) Cleanup ¶
func (t *OnVMDeleted) Cleanup(ctx core.TriggerContext) error
Cleanup is called when the trigger is removed.
func (*OnVMDeleted) Color ¶
func (t *OnVMDeleted) Color() string
func (*OnVMDeleted) Configuration ¶
func (t *OnVMDeleted) Configuration() []configuration.Field
func (*OnVMDeleted) Description ¶
func (t *OnVMDeleted) Description() string
func (*OnVMDeleted) Documentation ¶
func (t *OnVMDeleted) Documentation() string
func (*OnVMDeleted) ExampleData ¶
func (t *OnVMDeleted) ExampleData() map[string]any
func (*OnVMDeleted) HandleAction ¶
func (t *OnVMDeleted) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)
func (*OnVMDeleted) HandleWebhook ¶
func (t *OnVMDeleted) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
HandleWebhook processes Event Grid webhook requests.
func (*OnVMDeleted) Icon ¶
func (t *OnVMDeleted) Icon() string
func (*OnVMDeleted) Label ¶
func (t *OnVMDeleted) Label() string
func (*OnVMDeleted) Name ¶
func (t *OnVMDeleted) Name() string
func (*OnVMDeleted) Setup ¶
func (t *OnVMDeleted) Setup(ctx core.TriggerContext) error
Setup configures trigger webhooks.
type OnVMRestarted ¶
type OnVMRestarted struct {
// contains filtered or unexported fields
}
func (*OnVMRestarted) Actions ¶
func (t *OnVMRestarted) Actions() []core.Action
func (*OnVMRestarted) Cleanup ¶
func (t *OnVMRestarted) Cleanup(ctx core.TriggerContext) error
Cleanup is called when the trigger is removed.
func (*OnVMRestarted) Color ¶
func (t *OnVMRestarted) Color() string
func (*OnVMRestarted) Configuration ¶
func (t *OnVMRestarted) Configuration() []configuration.Field
func (*OnVMRestarted) Description ¶
func (t *OnVMRestarted) Description() string
func (*OnVMRestarted) Documentation ¶
func (t *OnVMRestarted) Documentation() string
func (*OnVMRestarted) ExampleData ¶
func (t *OnVMRestarted) ExampleData() map[string]any
func (*OnVMRestarted) HandleAction ¶
func (t *OnVMRestarted) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)
func (*OnVMRestarted) HandleWebhook ¶
func (t *OnVMRestarted) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
HandleWebhook processes Event Grid webhook requests.
func (*OnVMRestarted) Icon ¶
func (t *OnVMRestarted) Icon() string
func (*OnVMRestarted) Label ¶
func (t *OnVMRestarted) Label() string
func (*OnVMRestarted) Name ¶
func (t *OnVMRestarted) Name() string
func (*OnVMRestarted) Setup ¶
func (t *OnVMRestarted) Setup(ctx core.TriggerContext) error
Setup configures trigger webhooks.
type OnVMStarted ¶
type OnVMStarted struct {
// contains filtered or unexported fields
}
func (*OnVMStarted) Actions ¶
func (t *OnVMStarted) Actions() []core.Action
func (*OnVMStarted) Cleanup ¶
func (t *OnVMStarted) Cleanup(ctx core.TriggerContext) error
Cleanup is called when the trigger is removed.
func (*OnVMStarted) Color ¶
func (t *OnVMStarted) Color() string
func (*OnVMStarted) Configuration ¶
func (t *OnVMStarted) Configuration() []configuration.Field
func (*OnVMStarted) Description ¶
func (t *OnVMStarted) Description() string
func (*OnVMStarted) Documentation ¶
func (t *OnVMStarted) Documentation() string
func (*OnVMStarted) ExampleData ¶
func (t *OnVMStarted) ExampleData() map[string]any
func (*OnVMStarted) HandleAction ¶
func (t *OnVMStarted) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)
func (*OnVMStarted) HandleWebhook ¶
func (t *OnVMStarted) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
HandleWebhook processes Event Grid webhook requests.
func (*OnVMStarted) Icon ¶
func (t *OnVMStarted) Icon() string
func (*OnVMStarted) Label ¶
func (t *OnVMStarted) Label() string
func (*OnVMStarted) Name ¶
func (t *OnVMStarted) Name() string
func (*OnVMStarted) Setup ¶
func (t *OnVMStarted) Setup(ctx core.TriggerContext) error
Setup configures trigger webhooks.
type OnVMStopped ¶
type OnVMStopped struct {
// contains filtered or unexported fields
}
func (*OnVMStopped) Actions ¶
func (t *OnVMStopped) Actions() []core.Action
func (*OnVMStopped) Cleanup ¶
func (t *OnVMStopped) Cleanup(ctx core.TriggerContext) error
Cleanup is called when the trigger is removed.
func (*OnVMStopped) Color ¶
func (t *OnVMStopped) Color() string
func (*OnVMStopped) Configuration ¶
func (t *OnVMStopped) Configuration() []configuration.Field
func (*OnVMStopped) Description ¶
func (t *OnVMStopped) Description() string
func (*OnVMStopped) Documentation ¶
func (t *OnVMStopped) Documentation() string
func (*OnVMStopped) ExampleData ¶
func (t *OnVMStopped) ExampleData() map[string]any
func (*OnVMStopped) HandleAction ¶
func (t *OnVMStopped) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)
func (*OnVMStopped) HandleWebhook ¶
func (t *OnVMStopped) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
HandleWebhook processes Event Grid webhook requests.
func (*OnVMStopped) Icon ¶
func (t *OnVMStopped) Icon() string
func (*OnVMStopped) Label ¶
func (t *OnVMStopped) Label() string
func (*OnVMStopped) Name ¶
func (t *OnVMStopped) Name() string
func (*OnVMStopped) Setup ¶
func (t *OnVMStopped) Setup(ctx core.TriggerContext) error
Setup configures trigger webhooks.
type ResourceDeleteSuccessData ¶
type ResourceDeleteSuccessData struct {
// ProvisioningState indicates the current state of the resource operation
// Common values: "Succeeded", "Failed", "Canceled", "Creating", "Updating", "Deleting"
ProvisioningState string `json:"provisioningState"`
// ResourceProvider is the Azure resource provider (e.g., "Microsoft.Compute")
ResourceProvider string `json:"resourceProvider"`
// ResourceURI is the full resource ID
ResourceURI string `json:"resourceUri"`
// OperationName is the name of the operation that was performed
OperationName string `json:"operationName"`
// Status indicates the HTTP status of the operation
Status string `json:"status"`
// SubscriptionID is the Azure subscription ID
SubscriptionID string `json:"subscriptionId"`
// TenantID is the Azure tenant ID
TenantID string `json:"tenantId"`
// Authorization contains information about the authorization for the operation
Authorization *AuthorizationInfo `json:"authorization,omitempty"`
// Claims contains the JWT claims from the request
Claims map[string]any `json:"claims,omitempty"`
// CorrelationID is the correlation ID for the operation
CorrelationID string `json:"correlationId"`
// HTTPRequest contains information about the HTTP request that triggered the operation
HTTPRequest *HTTPRequestInfo `json:"httpRequest,omitempty"`
}
ResourceDeleteSuccessData contains the data for a successful resource delete operation This is used for events like VM deletion
type ResourceWriteSuccessData ¶
type ResourceWriteSuccessData struct {
ProvisioningState string `json:"provisioningState"`
ResourceProvider string `json:"resourceProvider"`
ResourceURI string `json:"resourceUri"`
OperationName string `json:"operationName"`
Status string `json:"status"`
SubscriptionID string `json:"subscriptionId"`
TenantID string `json:"tenantId"`
Authorization *AuthorizationInfo `json:"authorization,omitempty"`
Claims map[string]any `json:"claims,omitempty"`
CorrelationID string `json:"correlationId"`
HTTPRequest *HTTPRequestInfo `json:"httpRequest,omitempty"`
}
ResourceWriteSuccessData contains the data for a successful resource write operation This is used for events like VM creation, update, or deletion
type RestartVMComponent ¶
type RestartVMComponent struct {
}
func (*RestartVMComponent) Actions ¶
func (c *RestartVMComponent) Actions() []core.Action
func (*RestartVMComponent) Cancel ¶
func (c *RestartVMComponent) Cancel(ctx core.ExecutionContext) error
func (*RestartVMComponent) Cleanup ¶
func (c *RestartVMComponent) Cleanup(ctx core.SetupContext) error
func (*RestartVMComponent) Color ¶
func (c *RestartVMComponent) Color() string
func (*RestartVMComponent) Configuration ¶
func (c *RestartVMComponent) Configuration() []configuration.Field
func (*RestartVMComponent) Description ¶
func (c *RestartVMComponent) Description() string
func (*RestartVMComponent) Documentation ¶
func (c *RestartVMComponent) Documentation() string
func (*RestartVMComponent) ExampleOutput ¶
func (c *RestartVMComponent) ExampleOutput() map[string]any
func (*RestartVMComponent) Execute ¶
func (c *RestartVMComponent) Execute(ctx core.ExecutionContext) error
func (*RestartVMComponent) HandleAction ¶
func (c *RestartVMComponent) HandleAction(ctx core.ActionContext) error
func (*RestartVMComponent) HandleWebhook ¶
func (c *RestartVMComponent) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*RestartVMComponent) Icon ¶
func (c *RestartVMComponent) Icon() string
func (*RestartVMComponent) Label ¶
func (c *RestartVMComponent) Label() string
func (*RestartVMComponent) Name ¶
func (c *RestartVMComponent) Name() string
func (*RestartVMComponent) OutputChannels ¶
func (c *RestartVMComponent) OutputChannels(configuration any) []core.OutputChannel
func (*RestartVMComponent) ProcessQueueItem ¶
func (c *RestartVMComponent) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*RestartVMComponent) Setup ¶
func (c *RestartVMComponent) Setup(ctx core.SetupContext) error
type RestartVMConfiguration ¶
type StartVMComponent ¶
type StartVMComponent struct {
}
func (*StartVMComponent) Actions ¶
func (c *StartVMComponent) Actions() []core.Action
func (*StartVMComponent) Cancel ¶
func (c *StartVMComponent) Cancel(ctx core.ExecutionContext) error
func (*StartVMComponent) Cleanup ¶
func (c *StartVMComponent) Cleanup(ctx core.SetupContext) error
func (*StartVMComponent) Color ¶
func (c *StartVMComponent) Color() string
func (*StartVMComponent) Configuration ¶
func (c *StartVMComponent) Configuration() []configuration.Field
func (*StartVMComponent) Description ¶
func (c *StartVMComponent) Description() string
func (*StartVMComponent) Documentation ¶
func (c *StartVMComponent) Documentation() string
func (*StartVMComponent) ExampleOutput ¶
func (c *StartVMComponent) ExampleOutput() map[string]any
func (*StartVMComponent) Execute ¶
func (c *StartVMComponent) Execute(ctx core.ExecutionContext) error
func (*StartVMComponent) HandleAction ¶
func (c *StartVMComponent) HandleAction(ctx core.ActionContext) error
func (*StartVMComponent) HandleWebhook ¶
func (c *StartVMComponent) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*StartVMComponent) Icon ¶
func (c *StartVMComponent) Icon() string
func (*StartVMComponent) Label ¶
func (c *StartVMComponent) Label() string
func (*StartVMComponent) Name ¶
func (c *StartVMComponent) Name() string
func (*StartVMComponent) OutputChannels ¶
func (c *StartVMComponent) OutputChannels(configuration any) []core.OutputChannel
func (*StartVMComponent) ProcessQueueItem ¶
func (c *StartVMComponent) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*StartVMComponent) Setup ¶
func (c *StartVMComponent) Setup(ctx core.SetupContext) error
type StartVMConfiguration ¶
type StopVMComponent ¶
type StopVMComponent struct {
}
func (*StopVMComponent) Actions ¶
func (c *StopVMComponent) Actions() []core.Action
func (*StopVMComponent) Cancel ¶
func (c *StopVMComponent) Cancel(ctx core.ExecutionContext) error
func (*StopVMComponent) Cleanup ¶
func (c *StopVMComponent) Cleanup(ctx core.SetupContext) error
func (*StopVMComponent) Color ¶
func (c *StopVMComponent) Color() string
func (*StopVMComponent) Configuration ¶
func (c *StopVMComponent) Configuration() []configuration.Field
func (*StopVMComponent) Description ¶
func (c *StopVMComponent) Description() string
func (*StopVMComponent) Documentation ¶
func (c *StopVMComponent) Documentation() string
func (*StopVMComponent) ExampleOutput ¶
func (c *StopVMComponent) ExampleOutput() map[string]any
func (*StopVMComponent) Execute ¶
func (c *StopVMComponent) Execute(ctx core.ExecutionContext) error
func (*StopVMComponent) HandleAction ¶
func (c *StopVMComponent) HandleAction(ctx core.ActionContext) error
func (*StopVMComponent) HandleWebhook ¶
func (c *StopVMComponent) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
func (*StopVMComponent) Icon ¶
func (c *StopVMComponent) Icon() string
func (*StopVMComponent) Label ¶
func (c *StopVMComponent) Label() string
func (*StopVMComponent) Name ¶
func (c *StopVMComponent) Name() string
func (*StopVMComponent) OutputChannels ¶
func (c *StopVMComponent) OutputChannels(configuration any) []core.OutputChannel
func (*StopVMComponent) ProcessQueueItem ¶
func (c *StopVMComponent) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*StopVMComponent) Setup ¶
func (c *StopVMComponent) Setup(ctx core.SetupContext) error
type StopVMConfiguration ¶
type SubscriptionValidationEventData ¶
type SubscriptionValidationEventData struct {
// ValidationCode is the code that must be returned to complete the handshake
ValidationCode string `json:"validationCode"`
// ValidationURL is an optional URL that can be used instead of returning the code
ValidationURL string `json:"validationUrl,omitempty"`
}
SubscriptionValidationEventData contains the validation code for Event Grid subscription validation This is sent when Azure Event Grid first subscribes to a webhook endpoint
type SubscriptionValidationResponse ¶
type SubscriptionValidationResponse struct {
// ValidationResponse contains the validation code from the subscription validation event
ValidationResponse string `json:"validationResponse"`
}
SubscriptionValidationResponse is the response sent back to Azure Event Grid to complete the subscription validation handshake
type VMActionRequest ¶
VMActionRequest contains parameters for Azure VM actions (start, stop, deallocate, restart).
Source Files
¶
- actions.go
- arm_client.go
- component_create_vm.go
- component_deallocate_vm.go
- component_delete_vm.go
- component_restart_vm.go
- component_start_vm.go
- component_stop_vm.go
- events.go
- integration.go
- on_blob_created.go
- on_blob_deleted.go
- on_image_deleted.go
- on_image_pushed.go
- on_vm_deallocated.go
- on_vm_deleted.go
- on_vm_restarted.go
- on_vm_started.go
- on_vm_stopped.go
- provider.go
- resources.go
- webhook_handler.go