webhook

package
v0.20240606.1065251 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/automation/2015-10-31/webhook Documentation

The webhook SDK allows for interaction with the Azure Resource Manager Service automation (API Version 2015-10-31).

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/automation/2015-10-31/webhook"

Client Initialization

client := webhook.NewWebhookClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: WebhookClient.CreateOrUpdate

ctx := context.TODO()
id := webhook.NewWebHookID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue", "webHookValue")

payload := webhook.WebhookCreateOrUpdateParameters{
	// ...
}


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

Example Usage: WebhookClient.Delete

ctx := context.TODO()
id := webhook.NewWebHookID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue", "webHookValue")

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: WebhookClient.GenerateUri

ctx := context.TODO()
id := webhook.NewAutomationAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue")

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

Example Usage: WebhookClient.Get

ctx := context.TODO()
id := webhook.NewWebHookID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue", "webHookValue")

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: WebhookClient.ListByAutomationAccount

ctx := context.TODO()
id := webhook.NewAutomationAccountID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue")

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

Example Usage: WebhookClient.Update

ctx := context.TODO()
id := webhook.NewWebHookID("12345678-1234-9876-4563-123456789012", "example-resource-group", "automationAccountValue", "webHookValue")

payload := webhook.WebhookUpdateParameters{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateAutomationAccountID

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

ValidateAutomationAccountID checks that 'input' can be parsed as a Automation Account ID

func ValidateWebHookID

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

ValidateWebHookID checks that 'input' can be parsed as a Web Hook ID

Types

type AutomationAccountId

type AutomationAccountId struct {
	SubscriptionId        string
	ResourceGroupName     string
	AutomationAccountName string
}

AutomationAccountId is a struct representing the Resource ID for a Automation Account

func NewAutomationAccountID

func NewAutomationAccountID(subscriptionId string, resourceGroupName string, automationAccountName string) AutomationAccountId

NewAutomationAccountID returns a new AutomationAccountId struct

func ParseAutomationAccountID

func ParseAutomationAccountID(input string) (*AutomationAccountId, error)

ParseAutomationAccountID parses 'input' into a AutomationAccountId

func ParseAutomationAccountIDInsensitively

func ParseAutomationAccountIDInsensitively(input string) (*AutomationAccountId, error)

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

func (*AutomationAccountId) FromParseResult

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

func (AutomationAccountId) ID

func (id AutomationAccountId) ID() string

ID returns the formatted Automation Account ID

func (AutomationAccountId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Automation Account ID

func (AutomationAccountId) String

func (id AutomationAccountId) String() string

String returns a human-readable description of this Automation Account ID

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type GenerateUriOperationResponse

type GenerateUriOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *string
}

type GetOperationResponse

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

type ListByAutomationAccountCompleteResult

type ListByAutomationAccountCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Webhook
}

type ListByAutomationAccountOperationOptions

type ListByAutomationAccountOperationOptions struct {
	Filter *string
}

func DefaultListByAutomationAccountOperationOptions

func DefaultListByAutomationAccountOperationOptions() ListByAutomationAccountOperationOptions

func (ListByAutomationAccountOperationOptions) ToHeaders added in v0.20240209.1164150

func (ListByAutomationAccountOperationOptions) ToOData added in v0.20240209.1164150

func (ListByAutomationAccountOperationOptions) ToQuery added in v0.20240209.1164150

type ListByAutomationAccountOperationResponse

type ListByAutomationAccountOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Webhook
}

type RunbookAssociationProperty

type RunbookAssociationProperty struct {
	Name *string `json:"name,omitempty"`
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Webhook
}

type WebHookId

type WebHookId struct {
	SubscriptionId        string
	ResourceGroupName     string
	AutomationAccountName string
	WebHookName           string
}

WebHookId is a struct representing the Resource ID for a Web Hook

func NewWebHookID

func NewWebHookID(subscriptionId string, resourceGroupName string, automationAccountName string, webHookName string) WebHookId

NewWebHookID returns a new WebHookId struct

func ParseWebHookID

func ParseWebHookID(input string) (*WebHookId, error)

ParseWebHookID parses 'input' into a WebHookId

func ParseWebHookIDInsensitively

func ParseWebHookIDInsensitively(input string) (*WebHookId, error)

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

func (*WebHookId) FromParseResult

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

func (WebHookId) ID

func (id WebHookId) ID() string

ID returns the formatted Web Hook ID

func (WebHookId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Web Hook ID

func (WebHookId) String

func (id WebHookId) String() string

String returns a human-readable description of this Web Hook ID

type Webhook

type Webhook struct {
	Id         *string            `json:"id,omitempty"`
	Name       *string            `json:"name,omitempty"`
	Properties *WebhookProperties `json:"properties,omitempty"`
	Type       *string            `json:"type,omitempty"`
}

type WebhookClient

type WebhookClient struct {
	Client *resourcemanager.Client
}

func NewWebhookClientWithBaseURI

func NewWebhookClientWithBaseURI(sdkApi sdkEnv.Api) (*WebhookClient, error)

func (WebhookClient) CreateOrUpdate

CreateOrUpdate ...

func (WebhookClient) Delete

func (c WebhookClient) Delete(ctx context.Context, id WebHookId) (result DeleteOperationResponse, err error)

Delete ...

func (WebhookClient) GenerateUri

GenerateUri ...

func (WebhookClient) Get

func (c WebhookClient) Get(ctx context.Context, id WebHookId) (result GetOperationResponse, err error)

Get ...

func (WebhookClient) ListByAutomationAccount

ListByAutomationAccount ...

func (WebhookClient) ListByAutomationAccountComplete

ListByAutomationAccountComplete retrieves all the results into a single object

func (WebhookClient) ListByAutomationAccountCompleteMatchingPredicate

func (c WebhookClient) ListByAutomationAccountCompleteMatchingPredicate(ctx context.Context, id AutomationAccountId, options ListByAutomationAccountOperationOptions, predicate WebhookOperationPredicate) (result ListByAutomationAccountCompleteResult, err error)

ListByAutomationAccountCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (WebhookClient) Update

Update ...

type WebhookCreateOrUpdateParameters

type WebhookCreateOrUpdateParameters struct {
	Name       string                          `json:"name"`
	Properties WebhookCreateOrUpdateProperties `json:"properties"`
}

type WebhookCreateOrUpdateProperties

type WebhookCreateOrUpdateProperties struct {
	ExpiryTime *string                     `json:"expiryTime,omitempty"`
	IsEnabled  *bool                       `json:"isEnabled,omitempty"`
	Parameters *map[string]string          `json:"parameters,omitempty"`
	RunOn      *string                     `json:"runOn,omitempty"`
	Runbook    *RunbookAssociationProperty `json:"runbook,omitempty"`
	Uri        *string                     `json:"uri,omitempty"`
}

func (*WebhookCreateOrUpdateProperties) GetExpiryTimeAsTime

func (o *WebhookCreateOrUpdateProperties) GetExpiryTimeAsTime() (*time.Time, error)

func (*WebhookCreateOrUpdateProperties) SetExpiryTimeAsTime

func (o *WebhookCreateOrUpdateProperties) SetExpiryTimeAsTime(input time.Time)

type WebhookOperationPredicate

type WebhookOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (WebhookOperationPredicate) Matches

func (p WebhookOperationPredicate) Matches(input Webhook) bool

type WebhookProperties

type WebhookProperties struct {
	CreationTime     *string                     `json:"creationTime,omitempty"`
	Description      *string                     `json:"description,omitempty"`
	ExpiryTime       *string                     `json:"expiryTime,omitempty"`
	IsEnabled        *bool                       `json:"isEnabled,omitempty"`
	LastInvokedTime  *string                     `json:"lastInvokedTime,omitempty"`
	LastModifiedBy   *string                     `json:"lastModifiedBy,omitempty"`
	LastModifiedTime *string                     `json:"lastModifiedTime,omitempty"`
	Parameters       *map[string]string          `json:"parameters,omitempty"`
	RunOn            *string                     `json:"runOn,omitempty"`
	Runbook          *RunbookAssociationProperty `json:"runbook,omitempty"`
	Uri              *string                     `json:"uri,omitempty"`
}

func (*WebhookProperties) GetCreationTimeAsTime

func (o *WebhookProperties) GetCreationTimeAsTime() (*time.Time, error)

func (*WebhookProperties) GetExpiryTimeAsTime

func (o *WebhookProperties) GetExpiryTimeAsTime() (*time.Time, error)

func (*WebhookProperties) GetLastInvokedTimeAsTime

func (o *WebhookProperties) GetLastInvokedTimeAsTime() (*time.Time, error)

func (*WebhookProperties) GetLastModifiedTimeAsTime

func (o *WebhookProperties) GetLastModifiedTimeAsTime() (*time.Time, error)

func (*WebhookProperties) SetCreationTimeAsTime

func (o *WebhookProperties) SetCreationTimeAsTime(input time.Time)

func (*WebhookProperties) SetExpiryTimeAsTime

func (o *WebhookProperties) SetExpiryTimeAsTime(input time.Time)

func (*WebhookProperties) SetLastInvokedTimeAsTime

func (o *WebhookProperties) SetLastInvokedTimeAsTime(input time.Time)

func (*WebhookProperties) SetLastModifiedTimeAsTime

func (o *WebhookProperties) SetLastModifiedTimeAsTime(input time.Time)

type WebhookUpdateParameters

type WebhookUpdateParameters struct {
	Name       *string                  `json:"name,omitempty"`
	Properties *WebhookUpdateProperties `json:"properties,omitempty"`
}

type WebhookUpdateProperties

type WebhookUpdateProperties struct {
	Description *string            `json:"description,omitempty"`
	IsEnabled   *bool              `json:"isEnabled,omitempty"`
	Parameters  *map[string]string `json:"parameters,omitempty"`
	RunOn       *string            `json:"runOn,omitempty"`
}

Jump to

Keyboard shortcuts

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