channels

package
v0.20230804.1110546 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MPL-2.0 Imports: 14 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/eventgrid/2022-06-15/channels Documentation

The channels SDK allows for interaction with the Azure Resource Manager Service eventgrid (API Version 2022-06-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/eventgrid/2022-06-15/channels"

Client Initialization

client := channels.NewChannelsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ChannelsClient.CreateOrUpdate

ctx := context.TODO()
id := channels.NewChannelID("12345678-1234-9876-4563-123456789012", "example-resource-group", "partnerNamespaceValue", "channelValue")

payload := channels.Channel{
	// ...
}


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

ctx := context.TODO()
id := channels.NewChannelID("12345678-1234-9876-4563-123456789012", "example-resource-group", "partnerNamespaceValue", "channelValue")

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

Example Usage: ChannelsClient.Get

ctx := context.TODO()
id := channels.NewChannelID("12345678-1234-9876-4563-123456789012", "example-resource-group", "partnerNamespaceValue", "channelValue")

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: ChannelsClient.GetFullUrl

ctx := context.TODO()
id := channels.NewChannelID("12345678-1234-9876-4563-123456789012", "example-resource-group", "partnerNamespaceValue", "channelValue")

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

Example Usage: ChannelsClient.ListByPartnerNamespace

ctx := context.TODO()
id := channels.NewPartnerNamespaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "partnerNamespaceValue")

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

Example Usage: ChannelsClient.Update

ctx := context.TODO()
id := channels.NewChannelID("12345678-1234-9876-4563-123456789012", "example-resource-group", "partnerNamespaceValue", "channelValue")

payload := channels.ChannelUpdateParameters{
	// ...
}


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 PossibleValuesForChannelProvisioningState

func PossibleValuesForChannelProvisioningState() []string

func PossibleValuesForChannelType

func PossibleValuesForChannelType() []string

func PossibleValuesForEventDefinitionKind

func PossibleValuesForEventDefinitionKind() []string

func PossibleValuesForReadinessState

func PossibleValuesForReadinessState() []string

func ValidateChannelID

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

ValidateChannelID checks that 'input' can be parsed as a Channel ID

func ValidatePartnerNamespaceID

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

ValidatePartnerNamespaceID checks that 'input' can be parsed as a Partner Namespace ID

Types

type Channel

type Channel struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *ChannelProperties     `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type ChannelId

type ChannelId struct {
	SubscriptionId       string
	ResourceGroupName    string
	PartnerNamespaceName string
	ChannelName          string
}

ChannelId is a struct representing the Resource ID for a Channel

func NewChannelID

func NewChannelID(subscriptionId string, resourceGroupName string, partnerNamespaceName string, channelName string) ChannelId

NewChannelID returns a new ChannelId struct

func ParseChannelID

func ParseChannelID(input string) (*ChannelId, error)

ParseChannelID parses 'input' into a ChannelId

func ParseChannelIDInsensitively

func ParseChannelIDInsensitively(input string) (*ChannelId, error)

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

func (ChannelId) ID

func (id ChannelId) ID() string

ID returns the formatted Channel ID

func (ChannelId) Segments

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

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

func (ChannelId) String

func (id ChannelId) String() string

String returns a human-readable description of this Channel ID

type ChannelOperationPredicate

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

func (ChannelOperationPredicate) Matches

func (p ChannelOperationPredicate) Matches(input Channel) bool

type ChannelProperties

type ChannelProperties struct {
	ChannelType                     *ChannelType              `json:"channelType,omitempty"`
	ExpirationTimeIfNotActivatedUtc *string                   `json:"expirationTimeIfNotActivatedUtc,omitempty"`
	MessageForActivation            *string                   `json:"messageForActivation,omitempty"`
	PartnerTopicInfo                *PartnerTopicInfo         `json:"partnerTopicInfo,omitempty"`
	ProvisioningState               *ChannelProvisioningState `json:"provisioningState,omitempty"`
	ReadinessState                  *ReadinessState           `json:"readinessState,omitempty"`
}

func (*ChannelProperties) GetExpirationTimeIfNotActivatedUtcAsTime

func (o *ChannelProperties) GetExpirationTimeIfNotActivatedUtcAsTime() (*time.Time, error)

func (*ChannelProperties) SetExpirationTimeIfNotActivatedUtcAsTime

func (o *ChannelProperties) SetExpirationTimeIfNotActivatedUtcAsTime(input time.Time)

type ChannelProvisioningState

type ChannelProvisioningState string
const (
	ChannelProvisioningStateCanceled                              ChannelProvisioningState = "Canceled"
	ChannelProvisioningStateCreating                              ChannelProvisioningState = "Creating"
	ChannelProvisioningStateDeleting                              ChannelProvisioningState = "Deleting"
	ChannelProvisioningStateFailed                                ChannelProvisioningState = "Failed"
	ChannelProvisioningStateIdleDueToMirroredPartnerTopicDeletion ChannelProvisioningState = "IdleDueToMirroredPartnerTopicDeletion"
	ChannelProvisioningStateSucceeded                             ChannelProvisioningState = "Succeeded"
	ChannelProvisioningStateUpdating                              ChannelProvisioningState = "Updating"
)

func (*ChannelProvisioningState) UnmarshalJSON

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

type ChannelType

type ChannelType string
const (
	ChannelTypePartnerTopic ChannelType = "PartnerTopic"
)

func (*ChannelType) UnmarshalJSON

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

type ChannelUpdateParameters

type ChannelUpdateParameters struct {
	Properties *ChannelUpdateParametersProperties `json:"properties,omitempty"`
}

type ChannelUpdateParametersProperties

type ChannelUpdateParametersProperties struct {
	ExpirationTimeIfNotActivatedUtc *string                 `json:"expirationTimeIfNotActivatedUtc,omitempty"`
	PartnerTopicInfo                *PartnerUpdateTopicInfo `json:"partnerTopicInfo,omitempty"`
}

func (*ChannelUpdateParametersProperties) GetExpirationTimeIfNotActivatedUtcAsTime

func (o *ChannelUpdateParametersProperties) GetExpirationTimeIfNotActivatedUtcAsTime() (*time.Time, error)

func (*ChannelUpdateParametersProperties) SetExpirationTimeIfNotActivatedUtcAsTime

func (o *ChannelUpdateParametersProperties) SetExpirationTimeIfNotActivatedUtcAsTime(input time.Time)

type ChannelsClient

type ChannelsClient struct {
	Client *resourcemanager.Client
}

func NewChannelsClientWithBaseURI

func NewChannelsClientWithBaseURI(sdkApi sdkEnv.Api) (*ChannelsClient, error)

func (ChannelsClient) CreateOrUpdate

func (c ChannelsClient) CreateOrUpdate(ctx context.Context, id ChannelId, input Channel) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (ChannelsClient) Delete

func (c ChannelsClient) Delete(ctx context.Context, id ChannelId) (result DeleteOperationResponse, err error)

Delete ...

func (ChannelsClient) DeleteThenPoll

func (c ChannelsClient) DeleteThenPoll(ctx context.Context, id ChannelId) error

DeleteThenPoll performs Delete then polls until it's completed

func (ChannelsClient) Get

func (c ChannelsClient) Get(ctx context.Context, id ChannelId) (result GetOperationResponse, err error)

Get ...

func (ChannelsClient) GetFullUrl

func (c ChannelsClient) GetFullUrl(ctx context.Context, id ChannelId) (result GetFullUrlOperationResponse, err error)

GetFullUrl ...

func (ChannelsClient) ListByPartnerNamespace

ListByPartnerNamespace ...

func (ChannelsClient) ListByPartnerNamespaceComplete

ListByPartnerNamespaceComplete retrieves all the results into a single object

func (ChannelsClient) ListByPartnerNamespaceCompleteMatchingPredicate

func (c ChannelsClient) ListByPartnerNamespaceCompleteMatchingPredicate(ctx context.Context, id PartnerNamespaceId, options ListByPartnerNamespaceOperationOptions, predicate ChannelOperationPredicate) (result ListByPartnerNamespaceCompleteResult, err error)

ListByPartnerNamespaceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ChannelsClient) Update

Update ...

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type EventDefinitionKind

type EventDefinitionKind string
const (
	EventDefinitionKindInline EventDefinitionKind = "Inline"
)

func (*EventDefinitionKind) UnmarshalJSON

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

type EventSubscriptionFullUrl

type EventSubscriptionFullUrl struct {
	EndpointUrl *string `json:"endpointUrl,omitempty"`
}

type EventTypeInfo

type EventTypeInfo struct {
	InlineEventTypes *map[string]InlineEventProperties `json:"inlineEventTypes,omitempty"`
	Kind             *EventDefinitionKind              `json:"kind,omitempty"`
}

type GetFullUrlOperationResponse

type GetFullUrlOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *EventSubscriptionFullUrl
}

type GetOperationResponse

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

type InlineEventProperties

type InlineEventProperties struct {
	DataSchemaUrl    *string `json:"dataSchemaUrl,omitempty"`
	Description      *string `json:"description,omitempty"`
	DisplayName      *string `json:"displayName,omitempty"`
	DocumentationUrl *string `json:"documentationUrl,omitempty"`
}

type ListByPartnerNamespaceCompleteResult

type ListByPartnerNamespaceCompleteResult struct {
	Items []Channel
}

type ListByPartnerNamespaceOperationOptions

type ListByPartnerNamespaceOperationOptions struct {
	Filter *string
	Top    *int64
}

func DefaultListByPartnerNamespaceOperationOptions

func DefaultListByPartnerNamespaceOperationOptions() ListByPartnerNamespaceOperationOptions

func (ListByPartnerNamespaceOperationOptions) ToHeaders

func (ListByPartnerNamespaceOperationOptions) ToOData

func (ListByPartnerNamespaceOperationOptions) ToQuery

type ListByPartnerNamespaceOperationResponse

type ListByPartnerNamespaceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Channel
}

type PartnerNamespaceId

type PartnerNamespaceId struct {
	SubscriptionId       string
	ResourceGroupName    string
	PartnerNamespaceName string
}

PartnerNamespaceId is a struct representing the Resource ID for a Partner Namespace

func NewPartnerNamespaceID

func NewPartnerNamespaceID(subscriptionId string, resourceGroupName string, partnerNamespaceName string) PartnerNamespaceId

NewPartnerNamespaceID returns a new PartnerNamespaceId struct

func ParsePartnerNamespaceID

func ParsePartnerNamespaceID(input string) (*PartnerNamespaceId, error)

ParsePartnerNamespaceID parses 'input' into a PartnerNamespaceId

func ParsePartnerNamespaceIDInsensitively

func ParsePartnerNamespaceIDInsensitively(input string) (*PartnerNamespaceId, error)

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

func (PartnerNamespaceId) ID

func (id PartnerNamespaceId) ID() string

ID returns the formatted Partner Namespace ID

func (PartnerNamespaceId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Partner Namespace ID

func (PartnerNamespaceId) String

func (id PartnerNamespaceId) String() string

String returns a human-readable description of this Partner Namespace ID

type PartnerTopicInfo

type PartnerTopicInfo struct {
	AzureSubscriptionId *string        `json:"azureSubscriptionId,omitempty"`
	EventTypeInfo       *EventTypeInfo `json:"eventTypeInfo,omitempty"`
	Name                *string        `json:"name,omitempty"`
	ResourceGroupName   *string        `json:"resourceGroupName,omitempty"`
	Source              *string        `json:"source,omitempty"`
}

type PartnerUpdateTopicInfo

type PartnerUpdateTopicInfo struct {
	EventTypeInfo *EventTypeInfo `json:"eventTypeInfo,omitempty"`
}

type ReadinessState

type ReadinessState string
const (
	ReadinessStateActivated      ReadinessState = "Activated"
	ReadinessStateNeverActivated ReadinessState = "NeverActivated"
)

func (*ReadinessState) UnmarshalJSON

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

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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