triggers

package
v0.20230707.1120450 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: MPL-2.0 Imports: 11 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/datafactory/2018-06-01/triggers Documentation

The triggers SDK allows for interaction with the Azure Resource Manager Service datafactory (API Version 2018-06-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/datafactory/2018-06-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", "factoryValue", "triggerValue")

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


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

Example Usage: TriggersClient.Delete

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

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

Example Usage: TriggersClient.GetEventSubscriptionStatus

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

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

Example Usage: TriggersClient.ListByFactory

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

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

Example Usage: TriggersClient.QueryByFactory

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

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


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

Example Usage: TriggersClient.Start

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

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

Example Usage: TriggersClient.Stop

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

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

Example Usage: TriggersClient.SubscribeToEvents

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

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

Example Usage: TriggersClient.UnsubscribeFromEvents

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForEventSubscriptionStatus

func PossibleValuesForEventSubscriptionStatus() []string

func PossibleValuesForTriggerRuntimeState

func PossibleValuesForTriggerRuntimeState() []string

func ValidateFactoryID

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

ValidateFactoryID checks that 'input' can be parsed as a Factory 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 CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

func (CreateOrUpdateOperationOptions) ToHeaders added in v0.20230516.1215417

func (CreateOrUpdateOperationOptions) ToOData added in v0.20230516.1215417

func (CreateOrUpdateOperationOptions) ToQuery added in v0.20230516.1215417

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *TriggerResource
}

type DeleteOperationResponse

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

type EventSubscriptionStatus

type EventSubscriptionStatus string
const (
	EventSubscriptionStatusDeprovisioning EventSubscriptionStatus = "Deprovisioning"
	EventSubscriptionStatusDisabled       EventSubscriptionStatus = "Disabled"
	EventSubscriptionStatusEnabled        EventSubscriptionStatus = "Enabled"
	EventSubscriptionStatusProvisioning   EventSubscriptionStatus = "Provisioning"
	EventSubscriptionStatusUnknown        EventSubscriptionStatus = "Unknown"
)

func (*EventSubscriptionStatus) UnmarshalJSON added in v0.20230516.1215417

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

type FactoryId

type FactoryId struct {
	SubscriptionId    string
	ResourceGroupName string
	FactoryName       string
}

FactoryId is a struct representing the Resource ID for a Factory

func NewFactoryID

func NewFactoryID(subscriptionId string, resourceGroupName string, factoryName string) FactoryId

NewFactoryID returns a new FactoryId struct

func ParseFactoryID

func ParseFactoryID(input string) (*FactoryId, error)

ParseFactoryID parses 'input' into a FactoryId

func ParseFactoryIDInsensitively

func ParseFactoryIDInsensitively(input string) (*FactoryId, error)

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

func (FactoryId) ID

func (id FactoryId) ID() string

ID returns the formatted Factory ID

func (FactoryId) Segments

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

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

func (FactoryId) String

func (id FactoryId) String() string

String returns a human-readable description of this Factory ID

type GetEventSubscriptionStatusOperationResponse

type GetEventSubscriptionStatusOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *TriggerSubscriptionOperationStatus
}

type ListByFactoryCompleteResult

type ListByFactoryCompleteResult struct {
	Items []TriggerResource
}

type ListByFactoryOperationResponse

type ListByFactoryOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]TriggerResource
}

type QueryByFactoryOperationResponse

type QueryByFactoryOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *TriggerQueryResponse
}

type StartOperationResponse

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

type StopOperationResponse

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

type SubscribeToEventsOperationResponse

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

type Trigger

type Trigger struct {
	Annotations  *[]interface{}       `json:"annotations,omitempty"`
	Description  *string              `json:"description,omitempty"`
	RuntimeState *TriggerRuntimeState `json:"runtimeState,omitempty"`
	Type         string               `json:"type"`
}

type TriggerFilterParameters

type TriggerFilterParameters struct {
	ContinuationToken *string `json:"continuationToken,omitempty"`
	ParentTriggerName *string `json:"parentTriggerName,omitempty"`
}

type TriggerId

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

TriggerId is a struct representing the Resource ID for a Trigger

func NewTriggerID

func NewTriggerID(subscriptionId string, resourceGroupName string, factoryName 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) 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 TriggerQueryResponse

type TriggerQueryResponse struct {
	ContinuationToken *string           `json:"continuationToken,omitempty"`
	Value             []TriggerResource `json:"value"`
}

type TriggerResource

type TriggerResource struct {
	Etag       *string `json:"etag,omitempty"`
	Id         *string `json:"id,omitempty"`
	Name       *string `json:"name,omitempty"`
	Properties Trigger `json:"properties"`
	Type       *string `json:"type,omitempty"`
}

type TriggerResourceOperationPredicate

type TriggerResourceOperationPredicate struct {
	Etag *string
	Id   *string
	Name *string
	Type *string
}

func (TriggerResourceOperationPredicate) Matches

type TriggerRuntimeState

type TriggerRuntimeState string
const (
	TriggerRuntimeStateDisabled TriggerRuntimeState = "Disabled"
	TriggerRuntimeStateStarted  TriggerRuntimeState = "Started"
	TriggerRuntimeStateStopped  TriggerRuntimeState = "Stopped"
)

func (*TriggerRuntimeState) UnmarshalJSON added in v0.20230516.1215417

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

type TriggerSubscriptionOperationStatus

type TriggerSubscriptionOperationStatus struct {
	Status      *EventSubscriptionStatus `json:"status,omitempty"`
	TriggerName *string                  `json:"triggerName,omitempty"`
}

type TriggersClient

type TriggersClient struct {
	Client *resourcemanager.Client
}

func NewTriggersClientWithBaseURI

func NewTriggersClientWithBaseURI(api environments.Api) (*TriggersClient, error)

func (TriggersClient) CreateOrUpdate

CreateOrUpdate ...

func (TriggersClient) Delete

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

Delete ...

func (TriggersClient) GetEventSubscriptionStatus

func (c TriggersClient) GetEventSubscriptionStatus(ctx context.Context, id TriggerId) (result GetEventSubscriptionStatusOperationResponse, err error)

GetEventSubscriptionStatus ...

func (TriggersClient) ListByFactory

func (c TriggersClient) ListByFactory(ctx context.Context, id FactoryId) (result ListByFactoryOperationResponse, err error)

ListByFactory ...

func (TriggersClient) ListByFactoryComplete

func (c TriggersClient) ListByFactoryComplete(ctx context.Context, id FactoryId) (ListByFactoryCompleteResult, error)

ListByFactoryComplete retrieves all the results into a single object

func (TriggersClient) ListByFactoryCompleteMatchingPredicate

func (c TriggersClient) ListByFactoryCompleteMatchingPredicate(ctx context.Context, id FactoryId, predicate TriggerResourceOperationPredicate) (result ListByFactoryCompleteResult, err error)

ListByFactoryCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (TriggersClient) QueryByFactory

QueryByFactory ...

func (TriggersClient) Start

func (c TriggersClient) Start(ctx context.Context, id TriggerId) (result StartOperationResponse, err error)

Start ...

func (TriggersClient) StartThenPoll

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

StartThenPoll performs Start then polls until it's completed

func (TriggersClient) Stop

func (c TriggersClient) Stop(ctx context.Context, id TriggerId) (result StopOperationResponse, err error)

Stop ...

func (TriggersClient) StopThenPoll

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

StopThenPoll performs Stop then polls until it's completed

func (TriggersClient) SubscribeToEvents

func (c TriggersClient) SubscribeToEvents(ctx context.Context, id TriggerId) (result SubscribeToEventsOperationResponse, err error)

SubscribeToEvents ...

func (TriggersClient) SubscribeToEventsThenPoll

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

SubscribeToEventsThenPoll performs SubscribeToEvents then polls until it's completed

func (TriggersClient) UnsubscribeFromEvents

func (c TriggersClient) UnsubscribeFromEvents(ctx context.Context, id TriggerId) (result UnsubscribeFromEventsOperationResponse, err error)

UnsubscribeFromEvents ...

func (TriggersClient) UnsubscribeFromEventsThenPoll

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

UnsubscribeFromEventsThenPoll performs UnsubscribeFromEvents then polls until it's completed

type UnsubscribeFromEventsOperationResponse

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

Jump to

Keyboard shortcuts

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