eventgrid

package
v12.4.0-beta+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package eventgrid implements the Azure ARM Eventgrid service API version 2018-01-01.

EventGrid Client

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

Types

type BaseClient

type BaseClient struct {
	autorest.Client
}

BaseClient is the base client for Eventgrid.

func New

func New() BaseClient

New creates an instance of the BaseClient client.

func NewWithoutDefaults

func NewWithoutDefaults() BaseClient

NewWithoutDefaults creates an instance of the BaseClient client.

func (BaseClient) PublishEvents

func (client BaseClient) PublishEvents(ctx context.Context, topicHostname string, events []Event) (result autorest.Response, err error)

PublishEvents publishes a batch of events to an Azure Event Grid topic.

topicHostname is the host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.net events is an array of events to be published to Event Grid.

func (BaseClient) PublishEventsPreparer

func (client BaseClient) PublishEventsPreparer(ctx context.Context, topicHostname string, events []Event) (*http.Request, error)

PublishEventsPreparer prepares the PublishEvents request.

func (BaseClient) PublishEventsResponder

func (client BaseClient) PublishEventsResponder(resp *http.Response) (result autorest.Response, err error)

PublishEventsResponder handles the response to the PublishEvents request. The method always closes the http.Response Body.

func (BaseClient) PublishEventsSender

func (client BaseClient) PublishEventsSender(req *http.Request) (*http.Response, error)

PublishEventsSender sends the PublishEvents request. The method will close the http.Response Body if it receives an error.

type Event

type Event struct {
	// ID - An unique identifier for the event.
	ID *string `json:"id,omitempty"`
	// Topic - The resource path of the event source.
	Topic *string `json:"topic,omitempty"`
	// Subject - A resource path relative to the topic path.
	Subject *string `json:"subject,omitempty"`
	// Data - Event data specific to the event type.
	Data *map[string]interface{} `json:"data,omitempty"`
	// EventType - The type of the event that occurred.
	EventType *string `json:"eventType,omitempty"`
	// EventTime - The time (in UTC) the event was generated.
	EventTime *date.Time `json:"eventTime,omitempty"`
	// MetadataVersion - The schema version of the event metadata.
	MetadataVersion *string `json:"metadataVersion,omitempty"`
	// DataVersion - The schema version of the data object.
	DataVersion *string `json:"dataVersion,omitempty"`
}

Event properties of an event published to an Event Grid topic.

type EventHubCaptureFileCreatedEventData

type EventHubCaptureFileCreatedEventData struct {
	// Fileurl - The path to the capture file.
	Fileurl *string `json:"fileurl,omitempty"`
	// FileType - The file type of the capture file.
	FileType *string `json:"fileType,omitempty"`
	// PartitionID - The shard ID.
	PartitionID *string `json:"partitionId,omitempty"`
	// SizeInBytes - The file size.
	SizeInBytes *int32 `json:"sizeInBytes,omitempty"`
	// EventCount - The number of events in the file.
	EventCount *int32 `json:"eventCount,omitempty"`
	// FirstSequenceNumber - The smallest sequence number from the queue.
	FirstSequenceNumber *int32 `json:"firstSequenceNumber,omitempty"`
	// LastSequenceNumber - The last sequence number from the queue.
	LastSequenceNumber *int32 `json:"lastSequenceNumber,omitempty"`
	// FirstEnqueueTime - The first time from the queue.
	FirstEnqueueTime *date.Time `json:"firstEnqueueTime,omitempty"`
	// LastEnqueueTime - The last time from the queue.
	LastEnqueueTime *date.Time `json:"lastEnqueueTime,omitempty"`
}

EventHubCaptureFileCreatedEventData schema of the Data property of an EventGridEvent for an Microsoft.EventHub.CaptureFileCreated event.

type ResourceDeleteCancelData

type ResourceDeleteCancelData struct {
	// TenantID - The tenant ID of the resource.
	TenantID *string `json:"tenantId,omitempty"`
	// SubscriptionID - The subscription ID of the resource.
	SubscriptionID *string `json:"subscriptionId,omitempty"`
	// ResourceGroup - The resource group of the resource.
	ResourceGroup *string `json:"resourceGroup,omitempty"`
	// ResourceProvider - The resource provider performing the operation.
	ResourceProvider *string `json:"resourceProvider,omitempty"`
	// ResourceURI - The URI of the resource in the operation.
	ResourceURI *string `json:"resourceUri,omitempty"`
	// OperationName - The operation that was performed.
	OperationName *string `json:"operationName,omitempty"`
	// Status - The status of the operation.
	Status *string `json:"status,omitempty"`
	// Authorization - The requested authorization for the operation.
	Authorization *string `json:"authorization,omitempty"`
	// Claims - The properties of the claims.
	Claims *string `json:"claims,omitempty"`
	// CorrelationID - An operation ID used for troubleshooting.
	CorrelationID *string `json:"correlationId,omitempty"`
	// HTTPRequest - The details of the operation.
	HTTPRequest *string `json:"httpRequest,omitempty"`
}

ResourceDeleteCancelData schema of the Data property of an EventGridEvent for an Microsoft.Resources.ResourceDeleteCancel event. This is raised when a resource delete operation is canceled.

type ResourceDeleteFailureData

type ResourceDeleteFailureData struct {
	// TenantID - The tenant ID of the resource.
	TenantID *string `json:"tenantId,omitempty"`
	// SubscriptionID - The subscription ID of the resource.
	SubscriptionID *string `json:"subscriptionId,omitempty"`
	// ResourceGroup - The resource group of the resource.
	ResourceGroup *string `json:"resourceGroup,omitempty"`
	// ResourceProvider - The resource provider performing the operation.
	ResourceProvider *string `json:"resourceProvider,omitempty"`
	// ResourceURI - The URI of the resource in the operation.
	ResourceURI *string `json:"resourceUri,omitempty"`
	// OperationName - The operation that was performed.
	OperationName *string `json:"operationName,omitempty"`
	// Status - The status of the operation.
	Status *string `json:"status,omitempty"`
	// Authorization - The requested authorization for the operation.
	Authorization *string `json:"authorization,omitempty"`
	// Claims - The properties of the claims.
	Claims *string `json:"claims,omitempty"`
	// CorrelationID - An operation ID used for troubleshooting.
	CorrelationID *string `json:"correlationId,omitempty"`
	// HTTPRequest - The details of the operation.
	HTTPRequest *string `json:"httpRequest,omitempty"`
}

ResourceDeleteFailureData schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceDeleteFailure event. This is raised when a resource delete operation fails.

type ResourceDeleteSuccessData

type ResourceDeleteSuccessData struct {
	// TenantID - The tenant ID of the resource.
	TenantID *string `json:"tenantId,omitempty"`
	// SubscriptionID - The subscription ID of the resource.
	SubscriptionID *string `json:"subscriptionId,omitempty"`
	// ResourceGroup - The resource group of the resource.
	ResourceGroup *string `json:"resourceGroup,omitempty"`
	// ResourceProvider - The resource provider performing the operation.
	ResourceProvider *string `json:"resourceProvider,omitempty"`
	// ResourceURI - The URI of the resource in the operation.
	ResourceURI *string `json:"resourceUri,omitempty"`
	// OperationName - The operation that was performed.
	OperationName *string `json:"operationName,omitempty"`
	// Status - The status of the operation.
	Status *string `json:"status,omitempty"`
	// Authorization - The requested authorization for the operation.
	Authorization *string `json:"authorization,omitempty"`
	// Claims - The properties of the claims.
	Claims *string `json:"claims,omitempty"`
	// CorrelationID - An operation ID used for troubleshooting.
	CorrelationID *string `json:"correlationId,omitempty"`
	// HTTPRequest - The details of the operation.
	HTTPRequest *string `json:"httpRequest,omitempty"`
}

ResourceDeleteSuccessData schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceDeleteSuccess event. This is raised when a resource delete operation succeeds.

type ResourceWriteCancelData

type ResourceWriteCancelData struct {
	// TenantID - The tenant ID of the resource.
	TenantID *string `json:"tenantId,omitempty"`
	// SubscriptionID - The subscription ID of the resource.
	SubscriptionID *string `json:"subscriptionId,omitempty"`
	// ResourceGroup - The resource group of the resource.
	ResourceGroup *string `json:"resourceGroup,omitempty"`
	// ResourceProvider - The resource provider performing the operation.
	ResourceProvider *string `json:"resourceProvider,omitempty"`
	// ResourceURI - The URI of the resource in the operation.
	ResourceURI *string `json:"resourceUri,omitempty"`
	// OperationName - The operation that was performed.
	OperationName *string `json:"operationName,omitempty"`
	// Status - The status of the operation.
	Status *string `json:"status,omitempty"`
	// Authorization - The requested authorization for the operation.
	Authorization *string `json:"authorization,omitempty"`
	// Claims - The properties of the claims.
	Claims *string `json:"claims,omitempty"`
	// CorrelationID - An operation ID used for troubleshooting.
	CorrelationID *string `json:"correlationId,omitempty"`
	// HTTPRequest - The details of the operation.
	HTTPRequest *string `json:"httpRequest,omitempty"`
}

ResourceWriteCancelData schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceWriteCancel event. This is raised when a resource create or update operation is canceled.

type ResourceWriteFailureData

type ResourceWriteFailureData struct {
	// TenantID - The tenant ID of the resource.
	TenantID *string `json:"tenantId,omitempty"`
	// SubscriptionID - The subscription ID of the resource.
	SubscriptionID *string `json:"subscriptionId,omitempty"`
	// ResourceGroup - The resource group of the resource.
	ResourceGroup *string `json:"resourceGroup,omitempty"`
	// ResourceProvider - The resource provider performing the operation.
	ResourceProvider *string `json:"resourceProvider,omitempty"`
	// ResourceURI - The URI of the resource in the operation.
	ResourceURI *string `json:"resourceUri,omitempty"`
	// OperationName - The operation that was performed.
	OperationName *string `json:"operationName,omitempty"`
	// Status - The status of the operation.
	Status *string `json:"status,omitempty"`
	// Authorization - The requested authorization for the operation.
	Authorization *string `json:"authorization,omitempty"`
	// Claims - The properties of the claims.
	Claims *string `json:"claims,omitempty"`
	// CorrelationID - An operation ID used for troubleshooting.
	CorrelationID *string `json:"correlationId,omitempty"`
	// HTTPRequest - The details of the operation.
	HTTPRequest *string `json:"httpRequest,omitempty"`
}

ResourceWriteFailureData schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceWriteFailure event. This is raised when a resource create or update operation fails.

type ResourceWriteSuccessData

type ResourceWriteSuccessData struct {
	// TenantID - The tenant ID of the resource.
	TenantID *string `json:"tenantId,omitempty"`
	// SubscriptionID - The subscription ID of the resource.
	SubscriptionID *string `json:"subscriptionId,omitempty"`
	// ResourceGroup - The resource group of the resource.
	ResourceGroup *string `json:"resourceGroup,omitempty"`
	// ResourceProvider - The resource provider performing the operation.
	ResourceProvider *string `json:"resourceProvider,omitempty"`
	// ResourceURI - The URI of the resource in the operation.
	ResourceURI *string `json:"resourceUri,omitempty"`
	// OperationName - The operation that was performed.
	OperationName *string `json:"operationName,omitempty"`
	// Status - The status of the operation.
	Status *string `json:"status,omitempty"`
	// Authorization - The requested authorization for the operation.
	Authorization *string `json:"authorization,omitempty"`
	// Claims - The properties of the claims.
	Claims *string `json:"claims,omitempty"`
	// CorrelationID - An operation ID used for troubleshooting.
	CorrelationID *string `json:"correlationId,omitempty"`
	// HTTPRequest - The details of the operation.
	HTTPRequest *string `json:"httpRequest,omitempty"`
}

ResourceWriteSuccessData schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceWriteSuccess event. This is raised when a resource create or update operation succeeds.

type StorageBlobCreatedEventData

type StorageBlobCreatedEventData struct {
	// API - The name of the API/operation that triggered this event.
	API *string `json:"api,omitempty"`
	// ClientRequestID - A request id provided by the client of the storage API operation that triggered this event.
	ClientRequestID *string `json:"clientRequestId,omitempty"`
	// RequestID - The request id generated by the Storage service for the storage API operation that triggered this event.
	RequestID *string `json:"requestId,omitempty"`
	// ETag - The etag of the object at the time this event was triggered.
	ETag *string `json:"eTag,omitempty"`
	// ContentType - The content type of the blob. This is the same as what would be returned in the Content-Type header from the blob.
	ContentType *string `json:"contentType,omitempty"`
	// ContentLength - The size of the blob in bytes. This is the same as what would be returned in the Content-Length header from the blob.
	ContentLength *int32 `json:"contentLength,omitempty"`
	// BlobType - The type of blob.
	BlobType *string `json:"blobType,omitempty"`
	// URL - The path to the blob.
	URL *string `json:"url,omitempty"`
	// Sequencer - An opaque string value representing the logical sequence of events for any particular blob name. Users can use standard string comparison to understand the relative sequence of two events on the same blob name.
	Sequencer *string `json:"sequencer,omitempty"`
	// StorageDiagnostics - For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers.
	StorageDiagnostics *map[string]interface{} `json:"storageDiagnostics,omitempty"`
}

StorageBlobCreatedEventData schema of the Data property of an EventGridEvent for an Microsoft.Storage.BlobCreated event.

type StorageBlobDeletedEventData

type StorageBlobDeletedEventData struct {
	// API - The name of the API/operation that triggered this event.
	API *string `json:"api,omitempty"`
	// ClientRequestID - A request id provided by the client of the storage API operation that triggered this event.
	ClientRequestID *string `json:"clientRequestId,omitempty"`
	// RequestID - The request id generated by the Storage service for the storage API operation that triggered this event.
	RequestID *string `json:"requestId,omitempty"`
	// ContentType - The content type of the blob. This is the same as what would be returned in the Content-Type header from the blob.
	ContentType *string `json:"contentType,omitempty"`
	// BlobType - The type of blob.
	BlobType *string `json:"blobType,omitempty"`
	// URL - The path to the blob.
	URL *string `json:"url,omitempty"`
	// Sequencer - An opaque string value representing the logical sequence of events for any particular blob name. Users can use standard string comparison to understand the relative sequence of two events on the same blob name.
	Sequencer *string `json:"sequencer,omitempty"`
	// StorageDiagnostics - For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers.
	StorageDiagnostics *map[string]interface{} `json:"storageDiagnostics,omitempty"`
}

StorageBlobDeletedEventData schema of the Data property of an EventGridEvent for an Microsoft.Storage.BlobDeleted event.

Jump to

Keyboard shortcuts

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