triggers

package
v0.20240419.1132837 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MPL-2.0 Imports: 15 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-12-01/triggers Documentation

The triggers SDK allows for interaction with the Azure Resource Manager Service databoxedge (API Version 2023-12-01).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2023-12-01/triggers"

Client Initialization

client := triggers.NewTriggersClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: TriggersClient.CreateOrUpdate

ctx := context.TODO()
id := triggers.NewTriggerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataBoxEdgeDeviceValue", "triggerValue")

payload := triggers.Trigger{
	// ...
}


if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: TriggersClient.Delete

ctx := context.TODO()
id := triggers.NewTriggerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataBoxEdgeDeviceValue", "triggerValue")

if err := client.DeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: TriggersClient.Get

ctx := context.TODO()
id := triggers.NewTriggerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataBoxEdgeDeviceValue", "triggerValue")

read, err := client.Get(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: TriggersClient.ListByDataBoxEdgeDevice

ctx := context.TODO()
id := triggers.NewDataBoxEdgeDeviceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataBoxEdgeDeviceValue")

// alternatively `client.ListByDataBoxEdgeDevice(ctx, id, triggers.DefaultListByDataBoxEdgeDeviceOperationOptions())` can be used to do batched pagination
items, err := client.ListByDataBoxEdgeDeviceComplete(ctx, id, triggers.DefaultListByDataBoxEdgeDeviceOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForTriggerEventType

func PossibleValuesForTriggerEventType() []string

func ValidateDataBoxEdgeDeviceID

func ValidateDataBoxEdgeDeviceID(input interface{}, key string) (warnings []string, errors []error)

ValidateDataBoxEdgeDeviceID checks that 'input' can be parsed as a Data Box Edge Device ID

func ValidateTriggerID

func ValidateTriggerID(input interface{}, key string) (warnings []string, errors []error)

ValidateTriggerID checks that 'input' can be parsed as a Trigger ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Trigger
}

type DataBoxEdgeDeviceId

type DataBoxEdgeDeviceId struct {
	SubscriptionId        string
	ResourceGroupName     string
	DataBoxEdgeDeviceName string
}

DataBoxEdgeDeviceId is a struct representing the Resource ID for a Data Box Edge Device

func NewDataBoxEdgeDeviceID

func NewDataBoxEdgeDeviceID(subscriptionId string, resourceGroupName string, dataBoxEdgeDeviceName string) DataBoxEdgeDeviceId

NewDataBoxEdgeDeviceID returns a new DataBoxEdgeDeviceId struct

func ParseDataBoxEdgeDeviceID

func ParseDataBoxEdgeDeviceID(input string) (*DataBoxEdgeDeviceId, error)

ParseDataBoxEdgeDeviceID parses 'input' into a DataBoxEdgeDeviceId

func ParseDataBoxEdgeDeviceIDInsensitively

func ParseDataBoxEdgeDeviceIDInsensitively(input string) (*DataBoxEdgeDeviceId, error)

ParseDataBoxEdgeDeviceIDInsensitively parses 'input' case-insensitively into a DataBoxEdgeDeviceId note: this method should only be used for API response data and not user input

func (*DataBoxEdgeDeviceId) FromParseResult

func (id *DataBoxEdgeDeviceId) FromParseResult(input resourceids.ParseResult) error

func (DataBoxEdgeDeviceId) ID

func (id DataBoxEdgeDeviceId) ID() string

ID returns the formatted Data Box Edge Device ID

func (DataBoxEdgeDeviceId) Segments

func (id DataBoxEdgeDeviceId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Data Box Edge Device ID

func (DataBoxEdgeDeviceId) String

func (id DataBoxEdgeDeviceId) String() string

String returns a human-readable description of this Data Box Edge Device ID

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type FileEventTrigger

type FileEventTrigger struct {
	Properties FileTriggerProperties `json:"properties"`

	// Fields inherited from Trigger
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

func (FileEventTrigger) MarshalJSON

func (s FileEventTrigger) MarshalJSON() ([]byte, error)

type FileSourceInfo

type FileSourceInfo struct {
	ShareId string `json:"shareId"`
}

type FileTriggerProperties

type FileTriggerProperties struct {
	CustomContextTag *string        `json:"customContextTag,omitempty"`
	SinkInfo         RoleSinkInfo   `json:"sinkInfo"`
	SourceInfo       FileSourceInfo `json:"sourceInfo"`
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Trigger
}

type ListByDataBoxEdgeDeviceCompleteResult

type ListByDataBoxEdgeDeviceCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Trigger
}

type ListByDataBoxEdgeDeviceOperationOptions

type ListByDataBoxEdgeDeviceOperationOptions struct {
	Filter *string
}

func DefaultListByDataBoxEdgeDeviceOperationOptions

func DefaultListByDataBoxEdgeDeviceOperationOptions() ListByDataBoxEdgeDeviceOperationOptions

func (ListByDataBoxEdgeDeviceOperationOptions) ToHeaders

func (ListByDataBoxEdgeDeviceOperationOptions) ToOData

func (ListByDataBoxEdgeDeviceOperationOptions) ToQuery

type ListByDataBoxEdgeDeviceOperationResponse

type ListByDataBoxEdgeDeviceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Trigger
}

type PeriodicTimerEventTrigger

type PeriodicTimerEventTrigger struct {
	Properties PeriodicTimerProperties `json:"properties"`

	// Fields inherited from Trigger
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

func (PeriodicTimerEventTrigger) MarshalJSON

func (s PeriodicTimerEventTrigger) MarshalJSON() ([]byte, error)

type PeriodicTimerProperties

type PeriodicTimerProperties struct {
	CustomContextTag *string                 `json:"customContextTag,omitempty"`
	SinkInfo         RoleSinkInfo            `json:"sinkInfo"`
	SourceInfo       PeriodicTimerSourceInfo `json:"sourceInfo"`
}

type PeriodicTimerSourceInfo

type PeriodicTimerSourceInfo struct {
	Schedule  string  `json:"schedule"`
	StartTime string  `json:"startTime"`
	Topic     *string `json:"topic,omitempty"`
}

func (*PeriodicTimerSourceInfo) GetStartTimeAsTime

func (o *PeriodicTimerSourceInfo) GetStartTimeAsTime() (*time.Time, error)

func (*PeriodicTimerSourceInfo) SetStartTimeAsTime

func (o *PeriodicTimerSourceInfo) SetStartTimeAsTime(input time.Time)

type RawTriggerImpl

type RawTriggerImpl struct {
	Type   string
	Values map[string]interface{}
}

RawTriggerImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g. this cannot be used as a Request Payload).

type RoleSinkInfo

type RoleSinkInfo struct {
	RoleId string `json:"roleId"`
}

type Trigger

type Trigger interface {
}

type TriggerEventType

type TriggerEventType string
const (
	TriggerEventTypeFileEvent          TriggerEventType = "FileEvent"
	TriggerEventTypePeriodicTimerEvent TriggerEventType = "PeriodicTimerEvent"
)

func (*TriggerEventType) UnmarshalJSON

func (s *TriggerEventType) UnmarshalJSON(bytes []byte) error

type TriggerId

type TriggerId struct {
	SubscriptionId        string
	ResourceGroupName     string
	DataBoxEdgeDeviceName string
	TriggerName           string
}

TriggerId is a struct representing the Resource ID for a Trigger

func NewTriggerID

func NewTriggerID(subscriptionId string, resourceGroupName string, dataBoxEdgeDeviceName string, triggerName string) TriggerId

NewTriggerID returns a new TriggerId struct

func ParseTriggerID

func ParseTriggerID(input string) (*TriggerId, error)

ParseTriggerID parses 'input' into a TriggerId

func ParseTriggerIDInsensitively

func ParseTriggerIDInsensitively(input string) (*TriggerId, error)

ParseTriggerIDInsensitively parses 'input' case-insensitively into a TriggerId note: this method should only be used for API response data and not user input

func (*TriggerId) FromParseResult

func (id *TriggerId) FromParseResult(input resourceids.ParseResult) error

func (TriggerId) ID

func (id TriggerId) ID() string

ID returns the formatted Trigger ID

func (TriggerId) Segments

func (id TriggerId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Trigger ID

func (TriggerId) String

func (id TriggerId) String() string

String returns a human-readable description of this Trigger ID

type TriggerOperationPredicate

type TriggerOperationPredicate struct {
}

func (TriggerOperationPredicate) Matches

func (p TriggerOperationPredicate) Matches(input Trigger) bool

type TriggersClient

type TriggersClient struct {
	Client *resourcemanager.Client
}

func NewTriggersClientWithBaseURI

func NewTriggersClientWithBaseURI(sdkApi sdkEnv.Api) (*TriggersClient, error)

func (TriggersClient) CreateOrUpdate

func (c TriggersClient) CreateOrUpdate(ctx context.Context, id TriggerId, input Trigger) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (TriggersClient) CreateOrUpdateThenPoll

func (c TriggersClient) CreateOrUpdateThenPoll(ctx context.Context, id TriggerId, input Trigger) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (TriggersClient) Delete

func (c TriggersClient) Delete(ctx context.Context, id TriggerId) (result DeleteOperationResponse, err error)

Delete ...

func (TriggersClient) DeleteThenPoll

func (c TriggersClient) DeleteThenPoll(ctx context.Context, id TriggerId) error

DeleteThenPoll performs Delete then polls until it's completed

func (TriggersClient) Get

func (c TriggersClient) Get(ctx context.Context, id TriggerId) (result GetOperationResponse, err error)

Get ...

func (TriggersClient) ListByDataBoxEdgeDevice

ListByDataBoxEdgeDevice ...

func (TriggersClient) ListByDataBoxEdgeDeviceComplete

ListByDataBoxEdgeDeviceComplete retrieves all the results into a single object

func (TriggersClient) ListByDataBoxEdgeDeviceCompleteMatchingPredicate

func (c TriggersClient) ListByDataBoxEdgeDeviceCompleteMatchingPredicate(ctx context.Context, id DataBoxEdgeDeviceId, options ListByDataBoxEdgeDeviceOperationOptions, predicate TriggerOperationPredicate) (result ListByDataBoxEdgeDeviceCompleteResult, err error)

ListByDataBoxEdgeDeviceCompleteMatchingPredicate retrieves all the results and then applies the predicate

Jump to

Keyboard shortcuts

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