EndpointEventhub

class EndpointEventhub : KotlinCustomResource

Manages an IotHub EventHub Endpoint

NOTE: Endpoints can be defined either directly on the azure.iot.IoTHub resource, or using the azurerm_iothub_endpoint_* resources - but the two ways of defining the endpoints cannot be used together. If both are used against the same IoTHub, spurious changes will occur. Also, defining a azurerm_iothub_endpoint_* resource and another endpoint of a different type directly on the azure.iot.IoTHub resource is not supported.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.eventhub.EventHubNamespace;
import com.pulumi.azure.eventhub.EventHubNamespaceArgs;
import com.pulumi.azure.eventhub.EventHub;
import com.pulumi.azure.eventhub.EventHubArgs;
import com.pulumi.azure.eventhub.AuthorizationRule;
import com.pulumi.azure.eventhub.AuthorizationRuleArgs;
import com.pulumi.azure.iot.IoTHub;
import com.pulumi.azure.iot.IoTHubArgs;
import com.pulumi.azure.iot.inputs.IoTHubSkuArgs;
import com.pulumi.azure.iot.EndpointEventhub;
import com.pulumi.azure.iot.EndpointEventhubArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleEventHubNamespace = new EventHubNamespace("exampleEventHubNamespace", EventHubNamespaceArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.sku("Basic")
.build());
var exampleEventHub = new EventHub("exampleEventHub", EventHubArgs.builder()
.namespaceName(exampleEventHubNamespace.name())
.resourceGroupName(exampleResourceGroup.name())
.partitionCount(2)
.messageRetention(1)
.build());
var exampleAuthorizationRule = new AuthorizationRule("exampleAuthorizationRule", AuthorizationRuleArgs.builder()
.namespaceName(exampleEventHubNamespace.name())
.eventhubName(exampleEventHub.name())
.resourceGroupName(exampleResourceGroup.name())
.listen(false)
.send(true)
.manage(false)
.build());
var exampleIoTHub = new IoTHub("exampleIoTHub", IoTHubArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.sku(IoTHubSkuArgs.builder()
.name("B1")
.capacity("1")
.build())
.tags(Map.of("purpose", "example"))
.build());
var exampleEndpointEventhub = new EndpointEventhub("exampleEndpointEventhub", EndpointEventhubArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.iothubId(exampleIoTHub.id())
.connectionString(exampleAuthorizationRule.primaryConnectionString())
.build());
}
}

Import

IoTHub EventHub Endpoint can be imported using the resource id, e.g.

$ pulumi import azure:iot/endpointEventhub:EndpointEventhub eventhub1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Devices/iotHubs/hub1/endpoints/eventhub_endpoint1

Properties

Link copied to clipboard

Type used to authenticate against the Event Hub endpoint. Possible values are keyBased and identityBased. Defaults to keyBased.

Link copied to clipboard
val connectionString: Output<String>?

The connection string for the endpoint. This attribute can only be specified and is mandatory when authentication_type is keyBased.

Link copied to clipboard
val endpointUri: Output<String>?

URI of the Event Hubs Namespace endpoint. This attribute can only be specified and is mandatory when authentication_type is identityBased.

Link copied to clipboard
val entityPath: Output<String>?

Name of the Event Hub. This attribute can only be specified and is mandatory when authentication_type is identityBased.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val identityId: Output<String>?

ID of the User Managed Identity used to authenticate against the Event Hub endpoint.

Link copied to clipboard
val iothubId: Output<String>

The IoTHub ID for the endpoint. Changing this forces a new resource to be created.

Link copied to clipboard
val name: Output<String>

The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: events, operationsMonitoringEvents, fileNotifications and $default. Changing this forces a new resource to be created.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The name of the resource group under which the Event Hub has been created. Changing this forces a new resource to be created.

Link copied to clipboard
val urn: Output<String>