azure

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

README

Azure Integration for SuperPlane

This integration connects SuperPlane with Microsoft Azure to automate VM-centric workflows. It currently provides:

  • azure.onVirtualMachineCreated trigger (Event Grid driven)
  • azure.onVirtualMachineDeleted trigger (Event Grid driven)
  • azure.createVirtualMachine action (VM provisioning with dynamic networking UX)

Website: https://azure.microsoft.com/

Architecture

The integration uses a thin ARM REST client (armClient) instead of per-resource SDK packages. Only azcore and azidentity are used from the Azure SDK — for OIDC authentication and token management. All resource operations (VMs, NICs, Public IPs, Resource Groups, SKUs, Event Grid subscriptions) go through direct ARM REST API calls with automatic LRO polling and pagination.

Authentication

The integration uses Azure Workload Identity Federation with no client secret storage.

  • SuperPlane signs OIDC JWTs using its own keys (ctx.OIDC.Sign())
  • The signed JWT is used as a client assertion via azidentity.NewClientAssertionCredential
  • Azure AD exchanges the assertion for an Azure access token

The OIDC issuer is the SuperPlane base URL. The subject is app-installation:<integration-id> and the audience is the integration ID.

Components

Trigger: azure.onVirtualMachineCreated

Starts workflows when Azure emits Microsoft.Resources.ResourceWriteSuccess for VM resources via Event Grid.

Trigger: azure.onVirtualMachineDeleted

Starts workflows when Azure emits Microsoft.Resources.ResourceDeleteSuccess for VM resources via Event Grid.

Key behavior:

  • Automatically creates Event Grid subscriptions at the Azure subscription scope
  • Handles Event Grid subscription validation handshake (via validationUrl GET)
  • Filters to VM resources (Microsoft.Compute/virtualMachines)
  • Emits event payload when provisioning state is Succeeded
  • Cleans up Event Grid subscriptions when the trigger is removed

Action: azure.createVirtualMachine

Creates a new Azure VM using ARM REST API long-running operations.

UX and Networking Model (Important)

Users do not need to manually create a NIC.

  • User selects: Resource Group -> Virtual Network -> Subnet (cascading dropdowns)
  • Backend automatically performs networking plumbing:
    • resolves subnet
    • creates/attaches NIC in background
    • optionally creates/attaches Public IP

An existing networkInterfaceId is still accepted as an optional advanced override.

Supported VM Configuration
  • Basics: Resource Group, Region, VM Name, Image, Size
  • Networking: VNet + Subnet cascading selection
  • Disks: OS Disk Type (Standard_LRS, StandardSSD_LRS, Premium_LRS)
  • Public IP: optional Standard SKU Public IP
  • Advanced: Custom Data / cloud-init (base64 encoded before Azure API call)
Action Output

The action returns:

  • id (VM resource ID)
  • privateIp
  • publicIp (empty when no Public IP is attached)
  • plus operational metadata (name, provisioningState, location, size, adminUsername)

Prerequisites

Before using the integration:

  1. Create an Azure App Registration
  2. Configure Federated Credential(s) for SuperPlane issuer + subject + audience
  3. Grant RBAC permissions
Required Azure Resources
  • Azure Subscription
  • Resource Group(s) where VMs will be created
  • Existing VNet/Subnet (for implicit NIC path)
  • Azure App Registration (Microsoft Entra ID)
  • Federated Credential on that app registration

At minimum, assign permissions at Resource Group (or Subscription) scope.

  • Contributor (simplest recommended role for full VM provisioning path)

Or use least-privilege split roles:

  • Virtual Machine Contributor
  • Network Contributor
  • EventGrid EventSubscription Contributor

Troubleshooting

AADSTS90061 / AADSTS50166 External OIDC endpoint failed
  • Your public issuer URL is stale/unreachable
  • Refresh tunnel URL
  • Update app BASE_URL/WEBHOOKS_BASE_URL
  • Update Azure federated credential issuer to match exactly
  • Restart the app to re-sync the integration

Development Validation

Run Azure integration tests:

go test ./pkg/integrations/azure/...

Documentation

Index

Constants

View Source
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

View Source
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

View Source
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

View Source
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

View Source
const (
	ResourceTypeResourceGroupDropdown     = "azure.resourceGroup"
	ResourceTypeResourceGroupLocation     = "azure.resourceGroupLocation"
	ResourceTypeVMSizeDropdown            = "azure.vmSize"
	ResourceTypeVirtualNetworkDropdown    = "azure.virtualNetwork"
	ResourceTypeSubnetDropdown            = "azure.subnet"
	ResourceTypeStorageAccountDropdown    = "azure.storageAccount"
	ResourceTypeContainerRegistryDropdown = "azure.containerRegistry"
)

Variables

View Source
var ImageDebian12 = ImageReference{
	Publisher: "Debian",
	Offer:     "debian-12",
	SKU:       "12-gen2",
	Version:   "latest",
}
View Source
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.

View Source
var ImageUbuntu2004LTS = ImageReference{
	Publisher: "Canonical",
	Offer:     "0001-com-ubuntu-server-focal",
	SKU:       "20_04-lts-gen2",
	Version:   "latest",
}
View Source
var ImageUbuntu2204LTS = ImageReference{
	Publisher: "Canonical",
	Offer:     "0001-com-ubuntu-server-jammy",
	SKU:       "22_04-lts-gen2",
	Version:   "latest",
}
View Source
var ImageUbuntu2404LTS = ImageReference{
	Publisher: "Canonical",
	Offer:     "ubuntu-24_04-lts",
	SKU:       "server",
	Version:   "latest",
}
View Source
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.

func StartVM

func StartVM(ctx context.Context, provider *AzureProvider, req VMActionRequest, logger *logrus.Entry) (map[string]any, error)

StartVM starts a stopped/deallocated VM and waits for completion.

func StopVM

func StopVM(ctx context.Context, provider *AzureProvider, req VMActionRequest, logger *logrus.Entry) (map[string]any, error)

StopVM powers off a VM (without deallocating) 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

type ACRSource struct {
	Addr       string `json:"addr"`
	InstanceID string `json:"instanceID"`
}

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

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 (*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

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 Configuration struct {
	TenantID       string `json:"tenantId" mapstructure:"tenantId"`
	ClientID       string `json:"clientId" mapstructure:"clientId"`
	SubscriptionID string `json:"subscriptionId" mapstructure:"subscriptionId"`
}

type CreateVMComponent

type CreateVMComponent struct {
}

func (*CreateVMComponent) Actions

func (c *CreateVMComponent) Actions() []core.Action

func (*CreateVMComponent) Cancel

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 (*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 (*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 (*DeallocateVMComponent) HandleAction

func (c *DeallocateVMComponent) HandleAction(ctx core.ActionContext) error

func (*DeallocateVMComponent) HandleWebhook

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

type DeallocateVMConfiguration

type DeallocateVMConfiguration struct {
	ResourceGroup string `json:"resourceGroup" mapstructure:"resourceGroup"`
	Name          string `json:"name" mapstructure:"name"`
}

type DeleteVMComponent

type DeleteVMComponent struct {
}

func (*DeleteVMComponent) Actions

func (c *DeleteVMComponent) Actions() []core.Action

func (*DeleteVMComponent) Cancel

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 (*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 DeleteVMConfiguration struct {
	ResourceGroup             string `json:"resourceGroup" mapstructure:"resourceGroup"`
	Name                      string `json:"name" mapstructure:"name"`
	DeleteAssociatedResources bool   `json:"deleteAssociatedResources" mapstructure:"deleteAssociatedResources"`
}

type DeleteVMRequest

type DeleteVMRequest struct {
	ResourceGroup             string
	VMName                    string
	DeleteAssociatedResources bool
}

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

type ImageReference struct {
	Publisher string
	Offer     string
	SKU       string
	Version   string
}

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 (*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 (*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 (*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 OnImageDeletedConfiguration

type OnImageDeletedConfiguration struct {
	ResourceGroup    string `json:"resourceGroup" mapstructure:"resourceGroup"`
	Registry         string `json:"registry" mapstructure:"registry"`
	RepositoryFilter string `json:"repositoryFilter" mapstructure:"repositoryFilter"`
}

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 (*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

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 OnVMDeallocatedConfiguration

type OnVMDeallocatedConfiguration struct {
	ResourceGroup string `json:"resourceGroup" mapstructure:"resourceGroup"`
	NameFilter    string `json:"nameFilter" mapstructure:"nameFilter"`
}

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

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 OnVMDeletedConfiguration

type OnVMDeletedConfiguration struct {
	ResourceGroup string `json:"resourceGroup" mapstructure:"resourceGroup"`
	NameFilter    string `json:"nameFilter" mapstructure:"nameFilter"`
}

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

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 OnVMRestartedConfiguration

type OnVMRestartedConfiguration struct {
	ResourceGroup string `json:"resourceGroup" mapstructure:"resourceGroup"`
	NameFilter    string `json:"nameFilter" mapstructure:"nameFilter"`
}

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

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 OnVMStartedConfiguration

type OnVMStartedConfiguration struct {
	ResourceGroup string `json:"resourceGroup" mapstructure:"resourceGroup"`
	NameFilter    string `json:"nameFilter" mapstructure:"nameFilter"`
}

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

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 OnVMStoppedConfiguration

type OnVMStoppedConfiguration struct {
	ResourceGroup string `json:"resourceGroup" mapstructure:"resourceGroup"`
	NameFilter    string `json:"nameFilter" mapstructure:"nameFilter"`
}

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 (*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 (*RestartVMComponent) HandleAction

func (c *RestartVMComponent) HandleAction(ctx core.ActionContext) error

func (*RestartVMComponent) HandleWebhook

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 RestartVMConfiguration struct {
	ResourceGroup string `json:"resourceGroup" mapstructure:"resourceGroup"`
	Name          string `json:"name" mapstructure:"name"`
}

type StartVMComponent

type StartVMComponent struct {
}

func (*StartVMComponent) Actions

func (c *StartVMComponent) Actions() []core.Action

func (*StartVMComponent) Cancel

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 (*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 StartVMConfiguration struct {
	ResourceGroup string `json:"resourceGroup" mapstructure:"resourceGroup"`
	Name          string `json:"name" mapstructure:"name"`
}

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 (*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 StopVMConfiguration struct {
	ResourceGroup string `json:"resourceGroup" mapstructure:"resourceGroup"`
	Name          string `json:"name" mapstructure:"name"`
}

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

type VMActionRequest struct {
	ResourceGroup string
	VMName        string
}

VMActionRequest contains parameters for Azure VM actions (start, stop, deallocate, restart).

Jump to

Keyboard shortcuts

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