EventHub Class

public final class EventHub
extends DigitalTwinsEndpointResourceProperties

Properties related to EventHub.

Constructor Summary

Constructor Description
EventHub()

Creates an instance of EventHub class.

Method Summary

Modifier and Type Method and Description
String connectionStringPrimaryKey()

Get the connectionStringPrimaryKey property: PrimaryConnectionString of the endpoint for key-based authentication.

String connectionStringSecondaryKey()

Get the connectionStringSecondaryKey property: SecondaryConnectionString of the endpoint for key-based authentication.

OffsetDateTime createdTime()

Get the createdTime property: Time when the Endpoint was added to DigitalTwinsInstance.

EndpointType endpointType()

Get the endpointType property: The type of Digital Twins endpoint.

String endpointUri()

Get the endpointUri property: The URL of the EventHub namespace for identity-based authentication.

String entityPath()

Get the entityPath property: The EventHub name in the EventHub namespace for identity-based authentication.

static EventHub fromJson(JsonReader jsonReader)

Reads an instance of EventHub from the JsonReader.

EndpointProvisioningState provisioningState()

Get the provisioningState property: The provisioning state.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

EventHub withAuthenticationType(AuthenticationType authenticationType)

Set the authenticationType property: Specifies the authentication type being used for connecting to the endpoint.

EventHub withConnectionStringPrimaryKey(String connectionStringPrimaryKey)

Set the connectionStringPrimaryKey property: PrimaryConnectionString of the endpoint for key-based authentication.

EventHub withConnectionStringSecondaryKey(String connectionStringSecondaryKey)

Set the connectionStringSecondaryKey property: SecondaryConnectionString of the endpoint for key-based authentication.

EventHub withDeadLetterSecret(String deadLetterSecret)

Set the deadLetterSecret property: Dead letter storage secret for key-based authentication.

EventHub withDeadLetterUri(String deadLetterUri)

Set the deadLetterUri property: Dead letter storage URL for identity-based authentication.

EventHub withEndpointUri(String endpointUri)

Set the endpointUri property: The URL of the EventHub namespace for identity-based authentication.

EventHub withEntityPath(String entityPath)

Set the entityPath property: The EventHub name in the EventHub namespace for identity-based authentication.

EventHub withIdentity(ManagedIdentityReference identity)

Set the identity property: Managed identity properties for the endpoint.

Methods inherited from DigitalTwinsEndpointResourceProperties

Methods inherited from java.lang.Object

Constructor Details

EventHub

public EventHub()

Creates an instance of EventHub class.

Method Details

connectionStringPrimaryKey

public String connectionStringPrimaryKey()

Get the connectionStringPrimaryKey property: PrimaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read.

Returns:

the connectionStringPrimaryKey value.

connectionStringSecondaryKey

public String connectionStringSecondaryKey()

Get the connectionStringSecondaryKey property: SecondaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read.

Returns:

the connectionStringSecondaryKey value.

createdTime

public OffsetDateTime createdTime()

Get the createdTime property: Time when the Endpoint was added to DigitalTwinsInstance.

Overrides:

EventHub.createdTime()

Returns:

the createdTime value.

endpointType

public EndpointType endpointType()

Get the endpointType property: The type of Digital Twins endpoint.

Overrides:

EventHub.endpointType()

Returns:

the endpointType value.

endpointUri

public String endpointUri()

Get the endpointUri property: The URL of the EventHub namespace for identity-based authentication. It must include the protocol 'sb://'.

Returns:

the endpointUri value.

entityPath

public String entityPath()

Get the entityPath property: The EventHub name in the EventHub namespace for identity-based authentication.

Returns:

the entityPath value.

fromJson

public static EventHub fromJson(JsonReader jsonReader)

Reads an instance of EventHub from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of EventHub if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the EventHub.

provisioningState

public EndpointProvisioningState provisioningState()

Get the provisioningState property: The provisioning state.

Overrides:

EventHub.provisioningState()

Returns:

the provisioningState value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

EventHub.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

Overrides:

EventHub.validate()

withAuthenticationType

public EventHub withAuthenticationType(AuthenticationType authenticationType)

Set the authenticationType property: Specifies the authentication type being used for connecting to the endpoint. Defaults to 'KeyBased'. If 'KeyBased' is selected, a connection string must be specified (at least the primary connection string). If 'IdentityBased' is select, the endpointUri and entityPath properties must be specified.

Overrides:

EventHub.withAuthenticationType(AuthenticationType authenticationType)

Parameters:

authenticationType

withConnectionStringPrimaryKey

public EventHub withConnectionStringPrimaryKey(String connectionStringPrimaryKey)

Set the connectionStringPrimaryKey property: PrimaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read.

Parameters:

connectionStringPrimaryKey - the connectionStringPrimaryKey value to set.

Returns:

the EventHub object itself.

withConnectionStringSecondaryKey

public EventHub withConnectionStringSecondaryKey(String connectionStringSecondaryKey)

Set the connectionStringSecondaryKey property: SecondaryConnectionString of the endpoint for key-based authentication. Will be obfuscated during read.

Parameters:

connectionStringSecondaryKey - the connectionStringSecondaryKey value to set.

Returns:

the EventHub object itself.

withDeadLetterSecret

public EventHub withDeadLetterSecret(String deadLetterSecret)

Set the deadLetterSecret property: Dead letter storage secret for key-based authentication. Will be obfuscated during read.

Overrides:

EventHub.withDeadLetterSecret(String deadLetterSecret)

Parameters:

deadLetterSecret

withDeadLetterUri

public EventHub withDeadLetterUri(String deadLetterUri)

Set the deadLetterUri property: Dead letter storage URL for identity-based authentication.

Overrides:

EventHub.withDeadLetterUri(String deadLetterUri)

Parameters:

deadLetterUri

withEndpointUri

public EventHub withEndpointUri(String endpointUri)

Set the endpointUri property: The URL of the EventHub namespace for identity-based authentication. It must include the protocol 'sb://'.

Parameters:

endpointUri - the endpointUri value to set.

Returns:

the EventHub object itself.

withEntityPath

public EventHub withEntityPath(String entityPath)

Set the entityPath property: The EventHub name in the EventHub namespace for identity-based authentication.

Parameters:

entityPath - the entityPath value to set.

Returns:

the EventHub object itself.

withIdentity

public EventHub withIdentity(ManagedIdentityReference identity)

Set the identity property: Managed identity properties for the endpoint.

Overrides:

EventHub.withIdentity(ManagedIdentityReference identity)

Parameters:

identity

Applies to