trigger

package
v0.20240119.1124806 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MPL-2.0 Imports: 13 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/datashare/2019-11-01/trigger Documentation

The trigger SDK allows for interaction with the Azure Resource Manager Service datashare (API Version 2019-11-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/datashare/2019-11-01/trigger"

Client Initialization

client := trigger.NewTriggerClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: TriggerClient.Create

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

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


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

Example Usage: TriggerClient.Delete

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

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

Example Usage: TriggerClient.Get

ctx := context.TODO()
id := trigger.NewTriggerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "shareSubscriptionValue", "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: TriggerClient.ListByShareSubscription

ctx := context.TODO()
id := trigger.NewShareSubscriptionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "shareSubscriptionValue")

// alternatively `client.ListByShareSubscription(ctx, id)` can be used to do batched pagination
items, err := client.ListByShareSubscriptionComplete(ctx, id)
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 PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForRecurrenceInterval

func PossibleValuesForRecurrenceInterval() []string

func PossibleValuesForStatus

func PossibleValuesForStatus() []string

func PossibleValuesForSynchronizationMode

func PossibleValuesForSynchronizationMode() []string

func PossibleValuesForTriggerKind

func PossibleValuesForTriggerKind() []string

func PossibleValuesForTriggerStatus

func PossibleValuesForTriggerStatus() []string

func ValidateShareSubscriptionID

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

ValidateShareSubscriptionID checks that 'input' can be parsed as a Share Subscription 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 CreateOperationResponse

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

type DataShareErrorInfo

type DataShareErrorInfo struct {
	Code    string                `json:"code"`
	Details *[]DataShareErrorInfo `json:"details,omitempty"`
	Message string                `json:"message"`
	Target  *string               `json:"target,omitempty"`
}

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListByShareSubscriptionCompleteResult

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

type ListByShareSubscriptionOperationResponse

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

type OperationResponse

type OperationResponse struct {
	EndTime   *string             `json:"endTime,omitempty"`
	Error     *DataShareErrorInfo `json:"error,omitempty"`
	StartTime *string             `json:"startTime,omitempty"`
	Status    Status              `json:"status"`
}

func (*OperationResponse) GetEndTimeAsTime

func (o *OperationResponse) GetEndTimeAsTime() (*time.Time, error)

func (*OperationResponse) GetStartTimeAsTime

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

func (*OperationResponse) SetEndTimeAsTime

func (o *OperationResponse) SetEndTimeAsTime(input time.Time)

func (*OperationResponse) SetStartTimeAsTime

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

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateCreating  ProvisioningState = "Creating"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateMoving    ProvisioningState = "Moving"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
)

func (*ProvisioningState) UnmarshalJSON added in v0.20230420.1093529

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

type RawTriggerImpl added in v0.20230807.1063129

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 RecurrenceInterval

type RecurrenceInterval string
const (
	RecurrenceIntervalDay  RecurrenceInterval = "Day"
	RecurrenceIntervalHour RecurrenceInterval = "Hour"
)

func (*RecurrenceInterval) UnmarshalJSON added in v0.20230420.1093529

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

type ScheduledTrigger

type ScheduledTrigger struct {
	Properties ScheduledTriggerProperties `json:"properties"`

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

func (ScheduledTrigger) MarshalJSON

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

type ScheduledTriggerProperties

type ScheduledTriggerProperties struct {
	CreatedAt           *string              `json:"createdAt,omitempty"`
	ProvisioningState   *ProvisioningState   `json:"provisioningState,omitempty"`
	RecurrenceInterval  RecurrenceInterval   `json:"recurrenceInterval"`
	SynchronizationMode *SynchronizationMode `json:"synchronizationMode,omitempty"`
	SynchronizationTime string               `json:"synchronizationTime"`
	TriggerStatus       *TriggerStatus       `json:"triggerStatus,omitempty"`
	UserName            *string              `json:"userName,omitempty"`
}

func (*ScheduledTriggerProperties) GetCreatedAtAsTime

func (o *ScheduledTriggerProperties) GetCreatedAtAsTime() (*time.Time, error)

func (*ScheduledTriggerProperties) GetSynchronizationTimeAsTime

func (o *ScheduledTriggerProperties) GetSynchronizationTimeAsTime() (*time.Time, error)

func (*ScheduledTriggerProperties) SetCreatedAtAsTime

func (o *ScheduledTriggerProperties) SetCreatedAtAsTime(input time.Time)

func (*ScheduledTriggerProperties) SetSynchronizationTimeAsTime

func (o *ScheduledTriggerProperties) SetSynchronizationTimeAsTime(input time.Time)

type ShareSubscriptionId

type ShareSubscriptionId struct {
	SubscriptionId        string
	ResourceGroupName     string
	AccountName           string
	ShareSubscriptionName string
}

ShareSubscriptionId is a struct representing the Resource ID for a Share Subscription

func NewShareSubscriptionID

func NewShareSubscriptionID(subscriptionId string, resourceGroupName string, accountName string, shareSubscriptionName string) ShareSubscriptionId

NewShareSubscriptionID returns a new ShareSubscriptionId struct

func ParseShareSubscriptionID

func ParseShareSubscriptionID(input string) (*ShareSubscriptionId, error)

ParseShareSubscriptionID parses 'input' into a ShareSubscriptionId

func ParseShareSubscriptionIDInsensitively

func ParseShareSubscriptionIDInsensitively(input string) (*ShareSubscriptionId, error)

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

func (*ShareSubscriptionId) FromParseResult added in v0.20231127.1171502

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

func (ShareSubscriptionId) ID

func (id ShareSubscriptionId) ID() string

ID returns the formatted Share Subscription ID

func (ShareSubscriptionId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Share Subscription ID

func (ShareSubscriptionId) String

func (id ShareSubscriptionId) String() string

String returns a human-readable description of this Share Subscription ID

type Status

type Status string
const (
	StatusAccepted         Status = "Accepted"
	StatusCanceled         Status = "Canceled"
	StatusFailed           Status = "Failed"
	StatusInProgress       Status = "InProgress"
	StatusSucceeded        Status = "Succeeded"
	StatusTransientFailure Status = "TransientFailure"
)

func (*Status) UnmarshalJSON added in v0.20230420.1093529

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

type SynchronizationMode

type SynchronizationMode string
const (
	SynchronizationModeFullSync    SynchronizationMode = "FullSync"
	SynchronizationModeIncremental SynchronizationMode = "Incremental"
)

func (*SynchronizationMode) UnmarshalJSON added in v0.20230420.1093529

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

type Trigger

type Trigger interface {
}

type TriggerClient

type TriggerClient struct {
	Client *resourcemanager.Client
}

func NewTriggerClientWithBaseURI

func NewTriggerClientWithBaseURI(sdkApi sdkEnv.Api) (*TriggerClient, error)

func (TriggerClient) Create

func (c TriggerClient) Create(ctx context.Context, id TriggerId, input Trigger) (result CreateOperationResponse, err error)

Create ...

func (TriggerClient) CreateThenPoll

func (c TriggerClient) CreateThenPoll(ctx context.Context, id TriggerId, input Trigger) error

CreateThenPoll performs Create then polls until it's completed

func (TriggerClient) Delete

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

Delete ...

func (TriggerClient) DeleteThenPoll

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

DeleteThenPoll performs Delete then polls until it's completed

func (TriggerClient) Get

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

Get ...

func (TriggerClient) ListByShareSubscription

func (c TriggerClient) ListByShareSubscription(ctx context.Context, id ShareSubscriptionId) (result ListByShareSubscriptionOperationResponse, err error)

ListByShareSubscription ...

func (TriggerClient) ListByShareSubscriptionComplete

func (c TriggerClient) ListByShareSubscriptionComplete(ctx context.Context, id ShareSubscriptionId) (ListByShareSubscriptionCompleteResult, error)

ListByShareSubscriptionComplete retrieves all the results into a single object

func (TriggerClient) ListByShareSubscriptionCompleteMatchingPredicate

func (c TriggerClient) ListByShareSubscriptionCompleteMatchingPredicate(ctx context.Context, id ShareSubscriptionId, predicate TriggerOperationPredicate) (result ListByShareSubscriptionCompleteResult, err error)

ListByShareSubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

type TriggerId

type TriggerId struct {
	SubscriptionId        string
	ResourceGroupName     string
	AccountName           string
	ShareSubscriptionName string
	TriggerName           string
}

TriggerId is a struct representing the Resource ID for a Trigger

func NewTriggerID

func NewTriggerID(subscriptionId string, resourceGroupName string, accountName string, shareSubscriptionName 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 added in v0.20231127.1171502

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 TriggerKind

type TriggerKind string
const (
	TriggerKindScheduleBased TriggerKind = "ScheduleBased"
)

func (*TriggerKind) UnmarshalJSON added in v0.20230420.1093529

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

type TriggerOperationPredicate

type TriggerOperationPredicate struct {
}

func (TriggerOperationPredicate) Matches

func (p TriggerOperationPredicate) Matches(input Trigger) bool

type TriggerStatus

type TriggerStatus string
const (
	TriggerStatusActive                              TriggerStatus = "Active"
	TriggerStatusInactive                            TriggerStatus = "Inactive"
	TriggerStatusSourceSynchronizationSettingDeleted TriggerStatus = "SourceSynchronizationSettingDeleted"
)

func (*TriggerStatus) UnmarshalJSON added in v0.20230420.1093529

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

Jump to

Keyboard shortcuts

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