notificationchannels

package
v0.20240123.1162016 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/notificationchannels Documentation

The notificationchannels SDK allows for interaction with the Azure Resource Manager Service devtestlab (API Version 2018-09-15).

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/devtestlab/2018-09-15/notificationchannels"

Client Initialization

client := notificationchannels.NewNotificationChannelsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: NotificationChannelsClient.CreateOrUpdate

ctx := context.TODO()
id := notificationchannels.NewNotificationChannelID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "notificationChannelValue")

payload := notificationchannels.NotificationChannel{
	// ...
}


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: NotificationChannelsClient.Delete

ctx := context.TODO()
id := notificationchannels.NewNotificationChannelID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "notificationChannelValue")

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: NotificationChannelsClient.Get

ctx := context.TODO()
id := notificationchannels.NewNotificationChannelID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "notificationChannelValue")

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

Example Usage: NotificationChannelsClient.List

ctx := context.TODO()
id := notificationchannels.NewLabID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue")

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

Example Usage: NotificationChannelsClient.Notify

ctx := context.TODO()
id := notificationchannels.NewNotificationChannelID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "notificationChannelValue")

payload := notificationchannels.NotifyParameters{
	// ...
}


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

Example Usage: NotificationChannelsClient.Update

ctx := context.TODO()
id := notificationchannels.NewNotificationChannelID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "notificationChannelValue")

payload := notificationchannels.UpdateResource{
	// ...
}


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 PossibleValuesForNotificationChannelEventType

func PossibleValuesForNotificationChannelEventType() []string

func ValidateLabID

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

ValidateLabID checks that 'input' can be parsed as a Lab ID

func ValidateNotificationChannelID

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

ValidateNotificationChannelID checks that 'input' can be parsed as a Notification Channel ID

Types

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type Event

type Event struct {
	EventName *NotificationChannelEventType `json:"eventName,omitempty"`
}

type GetOperationOptions

type GetOperationOptions struct {
	Expand *string
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

func (GetOperationOptions) ToHeaders added in v0.20230815.1165905

func (o GetOperationOptions) ToHeaders() *client.Headers

func (GetOperationOptions) ToOData added in v0.20230815.1165905

func (o GetOperationOptions) ToOData() *odata.Query

func (GetOperationOptions) ToQuery added in v0.20230815.1165905

func (o GetOperationOptions) ToQuery() *client.QueryParams

type GetOperationResponse

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

type LabId

type LabId struct {
	SubscriptionId    string
	ResourceGroupName string
	LabName           string
}

LabId is a struct representing the Resource ID for a Lab

func NewLabID

func NewLabID(subscriptionId string, resourceGroupName string, labName string) LabId

NewLabID returns a new LabId struct

func ParseLabID

func ParseLabID(input string) (*LabId, error)

ParseLabID parses 'input' into a LabId

func ParseLabIDInsensitively

func ParseLabIDInsensitively(input string) (*LabId, error)

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

func (*LabId) FromParseResult added in v0.20231127.1171502

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

func (LabId) ID

func (id LabId) ID() string

ID returns the formatted Lab ID

func (LabId) Segments

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

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

func (LabId) String

func (id LabId) String() string

String returns a human-readable description of this Lab ID

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []NotificationChannel
}

type ListOperationOptions

type ListOperationOptions struct {
	Expand  *string
	Filter  *string
	Orderby *string
	Top     *int64
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders added in v0.20230815.1165905

func (o ListOperationOptions) ToHeaders() *client.Headers

func (ListOperationOptions) ToOData added in v0.20230815.1165905

func (o ListOperationOptions) ToOData() *odata.Query

func (ListOperationOptions) ToQuery added in v0.20230815.1165905

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]NotificationChannel
}

type NotificationChannel

type NotificationChannel struct {
	Id         *string                       `json:"id,omitempty"`
	Location   *string                       `json:"location,omitempty"`
	Name       *string                       `json:"name,omitempty"`
	Properties NotificationChannelProperties `json:"properties"`
	Tags       *map[string]string            `json:"tags,omitempty"`
	Type       *string                       `json:"type,omitempty"`
}

type NotificationChannelEventType

type NotificationChannelEventType string
const (
	NotificationChannelEventTypeAutoShutdown NotificationChannelEventType = "AutoShutdown"
	NotificationChannelEventTypeCost         NotificationChannelEventType = "Cost"
)

func (*NotificationChannelEventType) UnmarshalJSON added in v0.20230815.1165905

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

type NotificationChannelId

type NotificationChannelId struct {
	SubscriptionId          string
	ResourceGroupName       string
	LabName                 string
	NotificationChannelName string
}

NotificationChannelId is a struct representing the Resource ID for a Notification Channel

func NewNotificationChannelID

func NewNotificationChannelID(subscriptionId string, resourceGroupName string, labName string, notificationChannelName string) NotificationChannelId

NewNotificationChannelID returns a new NotificationChannelId struct

func ParseNotificationChannelID

func ParseNotificationChannelID(input string) (*NotificationChannelId, error)

ParseNotificationChannelID parses 'input' into a NotificationChannelId

func ParseNotificationChannelIDInsensitively

func ParseNotificationChannelIDInsensitively(input string) (*NotificationChannelId, error)

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

func (*NotificationChannelId) FromParseResult added in v0.20231127.1171502

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

func (NotificationChannelId) ID

func (id NotificationChannelId) ID() string

ID returns the formatted Notification Channel ID

func (NotificationChannelId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Notification Channel ID

func (NotificationChannelId) String

func (id NotificationChannelId) String() string

String returns a human-readable description of this Notification Channel ID

type NotificationChannelOperationPredicate

type NotificationChannelOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (NotificationChannelOperationPredicate) Matches

type NotificationChannelProperties

type NotificationChannelProperties struct {
	CreatedDate        *string  `json:"createdDate,omitempty"`
	Description        *string  `json:"description,omitempty"`
	EmailRecipient     *string  `json:"emailRecipient,omitempty"`
	Events             *[]Event `json:"events,omitempty"`
	NotificationLocale *string  `json:"notificationLocale,omitempty"`
	ProvisioningState  *string  `json:"provisioningState,omitempty"`
	UniqueIdentifier   *string  `json:"uniqueIdentifier,omitempty"`
	WebHookUrl         *string  `json:"webHookUrl,omitempty"`
}

func (*NotificationChannelProperties) GetCreatedDateAsTime

func (o *NotificationChannelProperties) GetCreatedDateAsTime() (*time.Time, error)

func (*NotificationChannelProperties) SetCreatedDateAsTime

func (o *NotificationChannelProperties) SetCreatedDateAsTime(input time.Time)

type NotificationChannelsClient

type NotificationChannelsClient struct {
	Client *resourcemanager.Client
}

func NewNotificationChannelsClientWithBaseURI

func NewNotificationChannelsClientWithBaseURI(sdkApi sdkEnv.Api) (*NotificationChannelsClient, error)

func (NotificationChannelsClient) CreateOrUpdate

CreateOrUpdate ...

func (NotificationChannelsClient) Delete

Delete ...

func (NotificationChannelsClient) Get

Get ...

func (NotificationChannelsClient) List

List ...

func (NotificationChannelsClient) ListComplete

ListComplete retrieves all the results into a single object

func (NotificationChannelsClient) ListCompleteMatchingPredicate

func (c NotificationChannelsClient) ListCompleteMatchingPredicate(ctx context.Context, id LabId, options ListOperationOptions, predicate NotificationChannelOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (NotificationChannelsClient) Notify

Notify ...

func (NotificationChannelsClient) Update

Update ...

type NotifyOperationResponse

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

type NotifyParameters

type NotifyParameters struct {
	EventName   *NotificationChannelEventType `json:"eventName,omitempty"`
	JsonPayload *string                       `json:"jsonPayload,omitempty"`
}

type UpdateOperationResponse

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

type UpdateResource

type UpdateResource struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

Jump to

Keyboard shortcuts

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