@azure/eventgrid
Version:
An isomorphic client library for the Azure Event Grid service.
1,000 lines • 221 kB
TypeScript
import * as coreClient from "@azure/core-client";
export type MediaJobOutputUnion = MediaJobOutput | MediaJobOutputAsset;
/** Properties of an event published to an Event Grid topic using the EventGrid Schema. */
export interface EventGridEvent {
/** An unique identifier for the event. */
id: string;
/** The resource path of the event source. */
topic?: string;
/** A resource path relative to the topic path. */
subject: string;
/** Event data specific to the event type. */
data: Record<string, unknown>;
/** The type of the event that occurred. */
eventType: string;
/** The time (in UTC) the event was generated. */
eventTime: Date;
/**
* The schema version of the event metadata.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly metadataVersion?: string;
/** The schema version of the data object. */
dataVersion: string;
}
/** Properties of an event published to an Event Grid topic using the CloudEvent 1.0 Schema */
export interface CloudEvent {
/** Describes unknown properties. The value of an unknown property can be of "any" type. */
[property: string]: any;
/** An identifier for the event. The combination of id and source must be unique for each distinct event. */
id: string;
/** Identifies the context in which an event happened. The combination of id and source must be unique for each distinct event. */
source: string;
/** Event data specific to the event type. */
data?: Record<string, unknown>;
/** Event data specific to the event type, encoded as a base64 string. */
dataBase64?: Uint8Array;
/** Type of event related to the originating occurrence. */
type: string;
/** The time (in UTC) the event was generated, in RFC3339 format. */
time?: Date;
/** The version of the CloudEvents specification which the event uses. */
specversion: string;
/** Identifies the schema that data adheres to. */
dataschema?: string;
/** Content type of data value. */
datacontenttype?: string;
/** This describes the subject of the event in the context of the event producer (identified by source). */
subject?: string;
}
/** Schema of the Data property of an EventGridEvent for a Microsoft.Storage.BlobCreated event. */
export interface StorageBlobCreatedEventData {
/** The name of the API/operation that triggered this event. */
api?: string;
/** A request id provided by the client of the storage API operation that triggered this event. */
clientRequestId?: string;
/** The request id generated by the Storage service for the storage API operation that triggered this event. */
requestId?: string;
/** The etag of the blob at the time this event was triggered. */
eTag?: string;
/** 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;
/** 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?: number;
/** The offset of the blob in bytes. */
contentOffset?: number;
/** The type of blob. */
blobType?: string;
/** The current tier of the blob. */
accessTier: StorageBlobAccessTier;
/** The path to the blob. */
url?: string;
/** 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;
/** The identity of the requester that triggered this event. */
identity?: string;
/** For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. */
storageDiagnostics?: Record<string, unknown>;
}
/** Schema of the Data property of an EventGridEvent for a Microsoft.Storage.BlobDeleted event. */
export interface StorageBlobDeletedEventData {
/** The name of the API/operation that triggered this event. */
api: string;
/** A request id provided by the client of the storage API operation that triggered this event. */
clientRequestId: string;
/** The request id generated by the Storage service for the storage API operation that triggered this event. */
requestId: string;
/** 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;
/** The type of blob. */
blobType: string;
/** The path to the blob. */
url: string;
/** 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;
/** The identity of the requester that triggered this event. */
identity: string;
/** For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. */
storageDiagnostics: Record<string, unknown>;
}
/** Schema of the Data property of an EventGridEvent for a Microsoft.Storage.DirectoryCreated event. */
export interface StorageDirectoryCreatedEventData {
/** The name of the API/operation that triggered this event. */
api: string;
/** A request id provided by the client of the storage API operation that triggered this event. */
clientRequestId: string;
/** The request id generated by the storage service for the storage API operation that triggered this event. */
requestId: string;
/** The etag of the directory at the time this event was triggered. */
eTag: string;
/** The path to the directory. */
url: string;
/** An opaque string value representing the logical sequence of events for any particular directory name. Users can use standard string comparison to understand the relative sequence of two events on the same directory name. */
sequencer: string;
/** The identity of the requester that triggered this event. */
identity: string;
/** For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. */
storageDiagnostics: Record<string, unknown>;
}
/** Schema of the Data property of an EventGridEvent for a Microsoft.Storage.DirectoryDeleted event. */
export interface StorageDirectoryDeletedEventData {
/** The name of the API/operation that triggered this event. */
api: string;
/** A request id provided by the client of the storage API operation that triggered this event. */
clientRequestId: string;
/** The request id generated by the storage service for the storage API operation that triggered this event. */
requestId: string;
/** The path to the deleted directory. */
url: string;
/** Is this event for a recursive delete operation. */
recursive: string;
/** An opaque string value representing the logical sequence of events for any particular directory name. Users can use standard string comparison to understand the relative sequence of two events on the same directory name. */
sequencer: string;
/** The identity of the requester that triggered this event. */
identity: string;
/** For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. */
storageDiagnostics: Record<string, unknown>;
}
/** Schema of the Data property of an EventGridEvent for a Microsoft.Storage.BlobRenamed event. */
export interface StorageBlobRenamedEventData {
/** The name of the API/operation that triggered this event. */
api: string;
/** A request id provided by the client of the storage API operation that triggered this event. */
clientRequestId: string;
/** The request id generated by the storage service for the storage API operation that triggered this event. */
requestId: string;
/** The path to the blob that was renamed. */
sourceUrl: string;
/** The new path to the blob after the rename operation. */
destinationUrl: string;
/** 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;
/** The identity of the requester that triggered this event. */
identity: string;
/** For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. */
storageDiagnostics: Record<string, unknown>;
}
/** Schema of the Data property of an EventGridEvent for a Microsoft.Storage.DirectoryRenamed event. */
export interface StorageDirectoryRenamedEventData {
/** The name of the API/operation that triggered this event. */
api: string;
/** A request id provided by the client of the storage API operation that triggered this event. */
clientRequestId: string;
/** The request id generated by the storage service for the storage API operation that triggered this event. */
requestId: string;
/** The path to the directory that was renamed. */
sourceUrl: string;
/** The new path to the directory after the rename operation. */
destinationUrl: string;
/** An opaque string value representing the logical sequence of events for any particular directory name. Users can use standard string comparison to understand the relative sequence of two events on the same directory name. */
sequencer: string;
/** The identity of the requester that triggered this event. */
identity: string;
/** For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. */
storageDiagnostics: Record<string, unknown>;
}
/** Schema of the Data property of an EventGridEvent for a Microsoft.Storage.LifecyclePolicyCompleted event. */
export interface StorageLifecyclePolicyCompletedEventData {
/** The time the policy task was scheduled. */
scheduleTime: string;
/** Policy run status of an account in a Blob Management cycle. */
policyRunSummary: StorageLifecyclePolicyRunSummary;
/** Execution statistics of a specific policy action in a Blob Management cycle. */
deleteSummary: StorageLifecyclePolicyActionSummaryDetail;
/** Execution statistics of a specific policy action in a Blob Management cycle. */
tierToCoolSummary: StorageLifecyclePolicyActionSummaryDetail;
/** Execution statistics of a specific policy action in a Blob Management cycle. */
tierToColdSummary: StorageLifecyclePolicyActionSummaryDetail;
/** Execution statistics of a specific policy action in a Blob Management cycle. */
tierToArchiveSummary: StorageLifecyclePolicyActionSummaryDetail;
}
/** Policy run status of an account in a Blob Management cycle. */
export interface StorageLifecyclePolicyRunSummary {
/** Policy status can be Completed/CompletedWithError/Incomplete. */
completionStatus: StorageLifecycleCompletionStatus;
}
/** Execution statistics of a specific policy action in a Blob Management cycle. */
export interface StorageLifecyclePolicyActionSummaryDetail {
/** Total number of objects to be acted on by this action. */
totalObjectsCount: number;
/** Number of success operations of this action. */
successCount: number;
/** Error messages of this action if any. */
errorList: string;
}
/** Schema of the Data property of an EventGridEvent for a Microsoft.Storage.BlobTierChanged event. */
export interface StorageBlobTierChangedEventData {
/** The name of the API/operation that triggered this event. */
api?: string;
/** A request id provided by the client of the storage API operation that triggered this event. */
clientRequestId?: string;
/** The request id generated by the Storage service for the storage API operation that triggered this event. */
requestId?: string;
/** 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;
/** 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?: number;
/** The type of blob. */
blobType?: string;
/** The current tier of the blob. */
accessTier: StorageBlobAccessTier;
/** The previous tier of the blob. */
previousTier: StorageBlobAccessTier;
/** The path to the blob. */
url?: string;
/** 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;
/** The identity of the requester that triggered this event. */
identity?: string;
/** For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. */
storageDiagnostics?: Record<string, unknown>;
}
/** Schema of the Data property of an EventGridEvent for a Microsoft.Storage.AsyncOperationInitiated event. */
export interface StorageAsyncOperationInitiatedEventData {
/** The name of the API/operation that triggered this event. */
api: string;
/** A request id provided by the client of the storage API operation that triggered this event. */
clientRequestId: string;
/** The request id generated by the Storage service for the storage API operation that triggered this event. */
requestId: string;
/** 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;
/** 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: number;
/** The type of blob. */
blobType: string;
/** The path to the blob. */
url: string;
/** 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;
/** The identity of the requester that triggered this event. */
identity: string;
/** For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. */
storageDiagnostics: Record<string, unknown>;
}
/** Schema of the Data property of an EventGridEvent for an Microsoft.Storage.BlobInventoryPolicyCompleted event. */
export interface StorageBlobInventoryPolicyCompletedEventData {
/** The time at which inventory policy was scheduled. */
scheduleDateTime: string;
/** The account name for which inventory policy is registered. */
accountName: string;
/** The rule name for inventory policy. */
ruleName: string;
/** The status of inventory run, it can be Succeeded/PartiallySucceeded/Failed. */
policyRunStatus: string;
/** The status message for inventory run. */
policyRunStatusMessage: string;
/** The policy run id for inventory run. */
policyRunId: string;
/** The blob URL for manifest file for inventory run. */
manifestBlobUrl: string;
}
/** Schema of the Data property of an EventGridEvent for an Microsoft.Storage.StorageTaskQueued event. */
export interface StorageTaskQueuedEventData {
/** The time at which a storage task was queued. */
queuedDateTime: string;
/** The execution id for a storage task. */
taskExecutionId: string;
}
/** Schema of the Data property of an EventGridEvent for an Microsoft.Storage.StorageTaskCompleted event. */
export interface StorageTaskCompletedEventData {
/** The status for a storage task. */
status: StorageTaskCompletedStatus;
/** The time at which a storage task was completed. */
completedDateTime: string;
/** The execution id for a storage task. */
taskExecutionId: string;
/** The task name for a storage task. */
taskName: string;
/** The summary report blob url for a storage task */
summaryReportBlobUrl: string;
}
/** Schema of the Data property of an EventGridEvent for an Microsoft.Storage.StorageTaskAssignmentQueued event. */
export interface StorageTaskAssignmentQueuedEventData {
/** The time at which a storage task was queued. */
queuedOn: string;
/** The execution id for a storage task. */
taskExecutionId: string;
}
/** Schema of the Data property of an EventGridEvent for an Microsoft.Storage.StorageTaskAssignmentCompleted event. */
export interface StorageTaskAssignmentCompletedEventData {
/** The status for a storage task. */
status: StorageTaskAssignmentCompletedStatus;
/** The time at which a storage task was completed. */
completedOn: string;
/** The execution id for a storage task. */
taskExecutionId: string;
/** The task name for a storage task. */
taskName: string;
/** The summary report blob url for a storage task */
summaryReportBlobUri: string;
}
/** Schema of the Data property of an EventGridEvent for a Microsoft.EventHub.CaptureFileCreated event. */
export interface EventHubCaptureFileCreatedEventData {
/** The path to the capture file. */
fileUrl: string;
/** The file type of the capture file. */
fileType: string;
/** The shard ID. */
partitionId: string;
/** The file size. */
sizeInBytes: number;
/** The number of events in the file. */
eventCount: number;
/** The smallest sequence number from the queue. */
firstSequenceNumber: number;
/** The last sequence number from the queue. */
lastSequenceNumber: number;
/** The first time from the queue. */
firstEnqueueTime: string;
/** The last time from the queue. */
lastEnqueueTime: string;
}
/** 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. */
export interface ResourceWriteSuccessEventData {
/** The tenant ID of the resource. */
tenantId: string;
/** The subscription ID of the resource. */
subscriptionId: string;
/** The resource group of the resource. */
resourceGroup: string;
/** The resource provider performing the operation. */
resourceProvider: string;
/** The URI of the resource in the operation. */
resourceUri: string;
/** The operation that was performed. */
operationName: string;
/** The status of the operation. */
status: string;
/** The requested authorization for the operation. */
authorization: ResourceAuthorization;
/** The properties of the claims. */
claims: {
[propertyName: string]: string;
};
/** An operation ID used for troubleshooting. */
correlationId: string;
/** The details of the operation. */
httpRequest: ResourceHttpRequest;
}
/** The details of the authorization for the resource. */
export interface ResourceAuthorization {
/** The scope of the authorization. */
scope: string;
/** The action being requested. */
action: string;
/** The evidence for the authorization. */
evidence: {
[propertyName: string]: string;
};
}
/** The details of the HTTP request. */
export interface ResourceHttpRequest {
/** The client request ID. */
clientRequestId: string;
/** The client IP address. */
clientIpAddress: string;
/** The request method. */
method: string;
/** The url used in the request. */
url: string;
}
/** 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. */
export interface ResourceWriteFailureEventData {
/** The tenant ID of the resource. */
tenantId: string;
/** The subscription ID of the resource. */
subscriptionId: string;
/** The resource group of the resource. */
resourceGroup: string;
/** The resource provider performing the operation. */
resourceProvider: string;
/** The URI of the resource in the operation. */
resourceUri: string;
/** The operation that was performed. */
operationName: string;
/** The status of the operation. */
status: string;
/** The requested authorization for the operation. */
authorization: ResourceAuthorization;
/** The properties of the claims. */
claims: {
[propertyName: string]: string;
};
/** An operation ID used for troubleshooting. */
correlationId: string;
/** The details of the operation. */
httpRequest: ResourceHttpRequest;
}
/** 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. */
export interface ResourceWriteCancelEventData {
/** The tenant ID of the resource. */
tenantId: string;
/** The subscription ID of the resource. */
subscriptionId: string;
/** The resource group of the resource. */
resourceGroup: string;
/** The resource provider performing the operation. */
resourceProvider: string;
/** The URI of the resource in the operation. */
resourceUri: string;
/** The operation that was performed. */
operationName: string;
/** The status of the operation. */
status: string;
/** The requested authorization for the operation. */
authorization: ResourceAuthorization;
/** The properties of the claims. */
claims: {
[propertyName: string]: string;
};
/** An operation ID used for troubleshooting. */
correlationId: string;
/** The details of the operation. */
httpRequest: ResourceHttpRequest;
}
/** Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceDeleteSuccess event. This is raised when a resource delete operation succeeds. */
export interface ResourceDeleteSuccessEventData {
/** The tenant ID of the resource. */
tenantId: string;
/** The subscription ID of the resource. */
subscriptionId: string;
/** The resource group of the resource. */
resourceGroup: string;
/** The resource provider performing the operation. */
resourceProvider: string;
/** The URI of the resource in the operation. */
resourceUri: string;
/** The operation that was performed. */
operationName: string;
/** The status of the operation. */
status: string;
/** The requested authorization for the operation. */
authorization: ResourceAuthorization;
/** The properties of the claims. */
claims: {
[propertyName: string]: string;
};
/** An operation ID used for troubleshooting. */
correlationId: string;
/** The details of the operation. */
httpRequest: ResourceHttpRequest;
}
/** Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceDeleteFailure event. This is raised when a resource delete operation fails. */
export interface ResourceDeleteFailureEventData {
/** The tenant ID of the resource. */
tenantId: string;
/** The subscription ID of the resource. */
subscriptionId: string;
/** The resource group of the resource. */
resourceGroup: string;
/** The resource provider performing the operation. */
resourceProvider: string;
/** The URI of the resource in the operation. */
resourceUri: string;
/** The operation that was performed. */
operationName: string;
/** The status of the operation. */
status: string;
/** The requested authorization for the operation. */
authorization: ResourceAuthorization;
/** The properties of the claims. */
claims: {
[propertyName: string]: string;
};
/** An operation ID used for troubleshooting. */
correlationId: string;
/** The details of the operation. */
httpRequest: ResourceHttpRequest;
}
/** Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceDeleteCancel event. This is raised when a resource delete operation is canceled. */
export interface ResourceDeleteCancelEventData {
/** The tenant ID of the resource. */
tenantId: string;
/** The subscription ID of the resource. */
subscriptionId: string;
/** The resource group of the resource. */
resourceGroup: string;
/** The resource provider performing the operation. */
resourceProvider: string;
/** The URI of the resource in the operation. */
resourceUri: string;
/** The operation that was performed. */
operationName: string;
/** The status of the operation. */
status: string;
/** The requested authorization for the operation. */
authorization: ResourceAuthorization;
/** The properties of the claims. */
claims: {
[propertyName: string]: string;
};
/** An operation ID used for troubleshooting. */
correlationId: string;
/** The details of the operation. */
httpRequest: ResourceHttpRequest;
}
/** Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceActionSuccess event. This is raised when a resource action operation succeeds. */
export interface ResourceActionSuccessEventData {
/** The tenant ID of the resource. */
tenantId: string;
/** The subscription ID of the resource. */
subscriptionId: string;
/** The resource group of the resource. */
resourceGroup: string;
/** The resource provider performing the operation. */
resourceProvider: string;
/** The URI of the resource in the operation. */
resourceUri: string;
/** The operation that was performed. */
operationName: string;
/** The status of the operation. */
status: string;
/** The requested authorization for the operation. */
authorization: ResourceAuthorization;
/** The properties of the claims. */
claims: {
[propertyName: string]: string;
};
/** An operation ID used for troubleshooting. */
correlationId: string;
/** The details of the operation. */
httpRequest: ResourceHttpRequest;
}
/** Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceActionFailure event. This is raised when a resource action operation fails. */
export interface ResourceActionFailureEventData {
/** The tenant ID of the resource. */
tenantId: string;
/** The subscription ID of the resource. */
subscriptionId: string;
/** The resource group of the resource. */
resourceGroup: string;
/** The resource provider performing the operation. */
resourceProvider: string;
/** The URI of the resource in the operation. */
resourceUri: string;
/** The operation that was performed. */
operationName: string;
/** The status of the operation. */
status: string;
/** The requested authorization for the operation. */
authorization: ResourceAuthorization;
/** The properties of the claims. */
claims: {
[propertyName: string]: string;
};
/** An operation ID used for troubleshooting. */
correlationId: string;
/** The details of the operation. */
httpRequest: ResourceHttpRequest;
}
/** Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceActionCancel event. This is raised when a resource action operation is canceled. */
export interface ResourceActionCancelEventData {
/** The tenant ID of the resource. */
tenantId: string;
/** The subscription ID of the resource. */
subscriptionId: string;
/** The resource group of the resource. */
resourceGroup: string;
/** The resource provider performing the operation. */
resourceProvider: string;
/** The URI of the resource in the operation. */
resourceUri: string;
/** The operation that was performed. */
operationName: string;
/** The status of the operation. */
status: string;
/** The requested authorization for the operation. */
authorization: ResourceAuthorization;
/** The properties of the claims. */
claims: {
[propertyName: string]: string;
};
/** An operation ID used for troubleshooting. */
correlationId: string;
/** The details of the operation. */
httpRequest: ResourceHttpRequest;
}
/** Schema of the Data property of an EventGridEvent for a Microsoft.EventGrid.SubscriptionValidationEvent event. */
export interface SubscriptionValidationEventData {
/**
* The validation code sent by Azure Event Grid to validate an event subscription. To complete the validation handshake, the subscriber must either respond with this validation code as part of the validation response, or perform a GET request on the validationUrl (available starting version 2018-05-01-preview).
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly validationCode: string;
/**
* The validation URL sent by Azure Event Grid (available starting version 2018-05-01-preview). To complete the validation handshake, the subscriber must either respond with the validationCode as part of the validation response, or perform a GET request on the validationUrl (available starting version 2018-05-01-preview).
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly validationUrl: string;
}
/** To complete an event subscription validation handshake, a subscriber can use either the validationCode or the validationUrl received in a SubscriptionValidationEvent. When the validationCode is used, the SubscriptionValidationResponse can be used to build the response. */
export interface SubscriptionValidationResponse {
/** The validation response sent by the subscriber to Azure Event Grid to complete the validation of an event subscription. */
validationResponse: string;
}
/** Schema of the Data property of an EventGridEvent for a Microsoft.EventGrid.SubscriptionDeletedEvent event. */
export interface SubscriptionDeletedEventData {
/**
* The Azure resource ID of the deleted event subscription.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly eventSubscriptionId: string;
}
/** Schema of the Data property of an EventGridEvent for MQTT Client state changes. */
export interface EventGridMqttClientEventData {
/** Unique identifier for the MQTT client that the client presents to the service for authentication. This case-sensitive string can be up to 128 characters long, and supports UTF-8 characters. */
clientAuthenticationName: string;
/** Name of the client resource in the Event Grid namespace. */
clientName: string;
/** Name of the Event Grid namespace where the MQTT client was created or updated. */
namespaceName: string;
}
/** Schema of the Data property of an EventGridEvent for a Microsoft.DataBox.CopyStarted event. */
export interface DataBoxCopyStartedEventData {
/** Serial Number of the device associated with the event. The list is comma separated if more than one serial number is associated. */
serialNumber: string;
/** Name of the current Stage */
stageName: DataBoxStageName;
/** The time at which the stage happened. */
stageTime: string;
}
/** Schema of the Data property of an EventGridEvent for a Microsoft.DataBox.CopyCompleted event. */
export interface DataBoxCopyCompletedEventData {
/** Serial Number of the device associated with the event. The list is comma separated if more than one serial number is associated. */
serialNumber: string;
/** Name of the current Stage */
stageName: DataBoxStageName;
/** The time at which the stage happened. */
stageTime: string;
}
/** Schema of the Data property of an EventGridEvent for a Microsoft.DataBox.OrderCompleted event. */
export interface DataBoxOrderCompletedEventData {
/** Serial Number of the device associated with the event. The list is comma separated if more than one serial number is associated. */
serialNumber: string;
/** Name of the current Stage */
stageName: DataBoxStageName;
/** The time at which the stage happened. */
stageTime: string;
}
/** Schema of the Data property of an EventGridEvent for a device life cycle event (DeviceCreated, DeviceDeleted). */
export interface DeviceLifeCycleEvent {
/** The unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. */
deviceId: string;
/** Name of the IoT Hub where the device was created or deleted. */
hubName: string;
/** Information about the device twin, which is the cloud representation of application device metadata. */
twin: DeviceTwinInfo;
}
/** Information about the device twin, which is the cloud representation of application device metadata. */
export interface DeviceTwinInfo {
/** Authentication type used for this device: either SAS, SelfSigned, or CertificateAuthority. */
authenticationType: string;
/** Count of cloud to device messages sent to this device. */
cloudToDeviceMessageCount: number;
/** Whether the device is connected or disconnected. */
connectionState: string;
/** The unique identifier of the device twin. */
deviceId: string;
/** A piece of information that describes the content of the device twin. Each etag is guaranteed to be unique per device twin. */
etag: string;
/** The ISO8601 timestamp of the last activity. */
lastActivityTime: string;
/** Properties JSON element. */
properties: DeviceTwinInfoProperties;
/** Whether the device twin is enabled or disabled. */
status: string;
/** The ISO8601 timestamp of the last device twin status update. */
statusUpdateTime: string;
/** An integer that is incremented by one each time the device twin is updated. */
version: number;
/** The thumbprint is a unique value for the x509 certificate, commonly used to find a particular certificate in a certificate store. The thumbprint is dynamically generated using the SHA1 algorithm, and does not physically exist in the certificate. */
x509Thumbprint: DeviceTwinInfoX509Thumbprint;
}
/** Properties JSON element. */
export interface DeviceTwinInfoProperties {
/** A portion of the properties that can be written only by the application back-end, and read by the device. */
desired?: DeviceTwin;
/** A portion of the properties that can be written only by the device, and read by the application back-end. */
reported?: DeviceTwin;
}
/** A portion of the properties that can be written only by the application back-end, and read by the device. */
export interface DeviceTwin {
/** Metadata information for the properties JSON document. */
metadata: DeviceTwinMetadata;
/** Version of device twin properties. */
version: number;
}
/** Metadata information for the properties JSON document. */
export interface DeviceTwinMetadata {
/** The ISO8601 timestamp of the last time the properties were updated. */
lastUpdated: string;
}
/** The thumbprint is a unique value for the x509 certificate, commonly used to find a particular certificate in a certificate store. The thumbprint is dynamically generated using the SHA1 algorithm, and does not physically exist in the certificate. */
export interface DeviceTwinInfoX509Thumbprint {
/** Primary thumbprint for the x509 certificate. */
primaryThumbprint?: string;
/** Secondary thumbprint for the x509 certificate. */
secondaryThumbprint?: string;
}
/** Schema of the Data property of an EventGridEvent for a device connection state event (DeviceConnected, DeviceDisconnected). */
export interface DeviceConnectionStateEvent {
/** The unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. */
deviceId: string;
/** The unique identifier of the module. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. */
moduleId: string;
/** Name of the IoT Hub where the device was created or deleted. */
hubName: string;
/** Information about the device connection state event. */
deviceConnectionStateEventInfo: DeviceConnectionStateEventInfo;
}
/** Information about the device connection state event. */
export interface DeviceConnectionStateEventInfo {
/** Sequence number is string representation of a hexadecimal number. string compare can be used to identify the larger number because both in ASCII and HEX numbers come after alphabets. If you are converting the string to hex, then the number is a 256 bit number. */
sequenceNumber: string;
}
/** Schema of the Data property of an EventGridEvent for a device telemetry event (DeviceTelemetry). */
export interface DeviceTelemetryEvent {
/** The content of the message from the device. */
body: Record<string, unknown>;
/** Application properties are user-defined strings that can be added to the message. These fields are optional. */
properties: {
[propertyName: string]: string;
};
/** System properties help identify contents and source of the messages. */
systemProperties: {
[propertyName: string]: string;
};
}
/** The content of the event request message. */
export interface ContainerRegistryEventData {
/** The event ID. */
id: string;
/** The time at which the event occurred. */
timestamp: string;
/** The action that encompasses the provided event. */
action: string;
/** The location of the event. */
location: string;
/** The target of the event. */
target: ContainerRegistryEventTarget;
/** The request that generated the event. */
request: ContainerRegistryEventRequest;
/** The agent that initiated the event. For most situations, this could be from the authorization context of the request. */
actor: ContainerRegistryEventActor;
/** The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it. */
source: ContainerRegistryEventSource;
/** The connected registry information if the event is generated by a connected registry. */
connectedRegistry: ContainerRegistryEventConnectedRegistry;
}
/** The target of the event. */
export interface ContainerRegistryEventTarget {
/** The MIME type of the referenced object. */
mediaType: string;
/** The number of bytes of the content. Same as Length field. */
size: number;
/** The digest of the content, as defined by the Registry V2 HTTP API Specification. */
digest: string;
/** The number of bytes of the content. Same as Size field. */
length: number;
/** The repository name. */
repository: string;
/** The direct URL to the content. */
url: string;
/** The tag name. */
tag: string;
}
/** The request that generated the event. */
export interface ContainerRegistryEventRequest {
/** The ID of the request that initiated the event. */
id: string;
/** The IP or hostname and possibly port of the client connection that initiated the event. This is the RemoteAddr from the standard http request. */
addr: string;
/** The externally accessible hostname of the registry instance, as specified by the http host header on incoming requests. */
host: string;
/** The request method that generated the event. */
method: string;
/** The user agent header of the request. */
useragent: string;
}
/** The agent that initiated the event. For most situations, this could be from the authorization context of the request. */
export interface ContainerRegistryEventActor {
/** The subject or username associated with the request context that generated the event. */
name: string;
}
/** The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it. */
export interface ContainerRegistryEventSource {
/** The IP or hostname and the port of the registry node that generated the event. Generally, this will be resolved by os.Hostname() along with the running port. */
addr: string;
/** The running instance of an application. Changes after each restart. */
instanceID: string;
}
/** The connected registry information if the event is generated by a connected registry. */
export interface ContainerRegistryEventConnectedRegistry {
/** The name of the connected registry that generated this event. */
name: string;
}
/** The content of the event request message. */
export interface ContainerRegistryArtifactEventData {
/** The event ID. */
id: string;
/** The time at which the event occurred. */
timestamp: string;
/** The action that encompasses the provided event. */
action: string;
/** The location of the event. */
location: string;
/** The target of the event. */
target: ContainerRegistryArtifactEventTarget;
/** The connected registry information if the event is generated by a connected registry. */
connectedRegistry: ContainerRegistryEventConnectedRegistry;
}
/** The target of the event. */
export interface ContainerRegistryArtifactEventTarget {
/** The MIME type of the artifact. */
mediaType: string;
/** The size in bytes of the artifact. */
size: number;
/** The digest of the artifact. */
digest: string;
/** The repository name of the artifact. */
repository: string;
/** The tag of the artifact. */
tag: string;
/** The name of the artifact. */
name: string;
/** The version of the artifact. */
version: string;
}
/** Schema of the Data property of an EventGridEvent for a Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners event. */
export interface ServiceBusActiveMessagesAvailableWithNoListenersEventData {
/** The namespace name of the Microsoft.ServiceBus resource. */
namespaceName: string;
/** The endpoint of the Microsoft.ServiceBus resource. */
requestUri: string;
/** The entity type of the Microsoft.ServiceBus resource. Could be one of 'queue' or 'subscriber'. */
entityType: string;
/** The name of the Microsoft.ServiceBus queue. If the entity type is of type 'subscriber', then this value will be null. */
queueName: string;
/** The name of the Microsoft.ServiceBus topic. If the entity type is of type 'queue', then this value will be null. */
topicName: string;
/** The name of the Microsoft.ServiceBus topic's subscription. If the entity type is of type 'queue', then this value will be null. */
subscriptionName: string;
}
/** Schema of the Data property of an EventGridEvent for a Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListeners event. */
export interface ServiceBusDeadletterMessagesAvailableWithNoListenersEventData {
/** The namespace name of the Microsoft.ServiceBus resource. */
namespaceName: string;
/** The endpoint of the Microsoft.ServiceBus resource. */
requestUri: string;
/** The entity type of the Microsoft.ServiceBus resource. Could be one of 'queue' or 'subscriber'. */
entityType: string;
/** The name of the Microsoft.ServiceBus queue. If the entity type is of type 'subscriber', then this value will be null. */
queueName: string;
/** The name of the Microsoft.ServiceBus topic. If the entity type is of type 'queue', then this value will be null. */
topicName: string;
/** The name of the Microsoft.ServiceBus topic's subscription. If the entity type is of type 'queue', then this value will be null. */
subscriptionName: string;
}
/** Schema of the Data property of an EventGridEvent for a Microsoft.ServiceBus.ActiveMessagesAvailablePeriodicNotifications event. */
export interface ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData {
/** The namespace name of the Microsoft.ServiceBus resource. */
namespaceName: string;
/** The endpoint of the Microsoft.ServiceBus resource. */
requestUri: string;
/** The entity type of the Microsoft.ServiceBus resource. Could be one of 'queue' or 'subscriber'. */
entityType: string;
/** The name of the Microsoft.ServiceBus queue. If the entity type is of type 'subscriber', then this value will be null. */
queueName: string;
/** The name of the Microsoft.ServiceBus topic. If the entity type is of type 'queue', then this value will be null. */
topicName: string;
/** The name of the Microsoft.ServiceBus topic's subscription. If the entity type is of type 'queue', then this value will be null. */
subscriptionName: string;
}
/** Schema of the Data property of an EventGridEvent for a Microsoft.ServiceBus.DeadletterMessagesAvailablePeriodicNotifications event. */
export interface ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData {
/** The namespace name of the Microsoft.ServiceBus resource. */
namespaceName: string;
/** The endpoint of the Microsoft.ServiceBus resource. */
requestUri: string;
/** The entity type of the Microsoft.ServiceBus resource. Could be one of 'queue' or 'subscriber'. */
entityType: string;
/** The name of the Microsoft.ServiceBus queue. If the entity type is of type 'subscriber', then this value will be null. */
queueName: string;
/** The name of the Microsoft.ServiceBus topic. If the entity type is of type 'queue', then this value will be null. */
topicName: string;
/** The name of the Microsoft.ServiceBus topic's subscription. If the entity type is of type 'queue', then this value will be null. */
subscriptionName: string;
}
/** Schema of the Data property of an EventGridEvent for a Microsoft.Media.JobStateChange event. */
export interface MediaJobStateChangeEventData {
/**
* The previous state of the Job.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly previousState: MediaJobState;
/**
* The new state of the Job.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly state: MediaJobState;
/** Gets the Job correlation data. */
correlationData: {
[propertyName: string]: string;
};
}
/** Details of JobOutput errors. */
export interface MediaJobError {
/**
* Error code describing the error.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly code: MediaJobErrorCode;
/**
* A human-readable language-dependent representation of the error.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly message: string;
/**
* Helps with categorization of errors.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly category: MediaJobErrorCategory;
/**
* Indicates that it may be possible to retry the Job. If retry is unsuccessful, please contact Azure support via Azure Portal.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly retry: MediaJobRetry;
/**
* An array of details about specific errors that led to this reported error.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly details: MediaJobErrorDetail[];
}
/** Details of JobOutput errors. */
export interface MediaJobErrorDetail {
/**
* Code describing the error detail.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly code: string;
/**
* A human-readable representation of the error.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly message: string;
}
/** The event data for a Job output. */
export interface MediaJobOutput {
/** Polymorphic discriminator, which specifies the different types this object can be */
odataType: "#Microsoft.Media.JobOutputAsset";
/** Gets the Job output error. */
error?: MediaJobError;
/** Gets the Job output label. */
label?: string;
/** Gets the Job output progress. */
progress: number;
/** Gets the Job output state. */
state: MediaJobState;
}
/** Job Output Progress Event Data. Schema of the Data property of an EventGridEvent for a Microsoft.Media.JobOutputProgress event. */
export interface MediaJobOutputProgressEventData {
/** Gets the Job output label. */
label: string;
/** Gets the Job output progress. */
progress: number;
/** Gets the Job correlation data. */
jobCorrelationData: {
[propertyName: string]: string;
};
}
/** Schema of the Data property of an EventGridEvent for a Microsoft.Media.JobOutputStateChange event. */
export interface MediaJobOutputStateChangeEventData {
/**
* The previous state of the Job.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly previousState: MediaJobState;
/** Gets the output. */
output: MediaJobOutputUnion;
/** Gets the Jo