Show / Hide Table of Contents

Class EndpointEventhub

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

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
public MyStack()
{
    var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
    {
        Location = "East US",
    });
    var exampleEventHubNamespace = new Azure.EventHub.EventHubNamespace("exampleEventHubNamespace", new Azure.EventHub.EventHubNamespaceArgs
    {
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
        Sku = "Basic",
    });
    var exampleEventHub = new Azure.EventHub.EventHub("exampleEventHub", new Azure.EventHub.EventHubArgs
    {
        NamespaceName = exampleEventHubNamespace.Name,
        ResourceGroupName = exampleResourceGroup.Name,
        PartitionCount = 2,
        MessageRetention = 1,
    });
    var exampleAuthorizationRule = new Azure.EventHub.AuthorizationRule("exampleAuthorizationRule", new Azure.EventHub.AuthorizationRuleArgs
    {
        NamespaceName = exampleEventHubNamespace.Name,
        EventhubName = exampleEventHub.Name,
        ResourceGroupName = exampleResourceGroup.Name,
        Listen = false,
        Send = true,
        Manage = false,
    });
    var exampleIoTHub = new Azure.Iot.IoTHub("exampleIoTHub", new Azure.Iot.IoTHubArgs
    {
        ResourceGroupName = exampleResourceGroup.Name,
        Location = exampleResourceGroup.Location,
        Sku = new Azure.Iot.Inputs.IoTHubSkuArgs
        {
            Name = "B1",
            Tier = "Basic",
            Capacity = "1",
        },
        Tags = 
        {
            { "purpose", "example" },
        },
    });
    var exampleEndpointEventhub = new Azure.Iot.EndpointEventhub("exampleEndpointEventhub", new Azure.Iot.EndpointEventhubArgs
    {
        ResourceGroupName = exampleResourceGroup.Name,
        IothubName = exampleIoTHub.Name,
        ConnectionString = exampleAuthorizationRule.PrimaryConnectionString,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
EndpointEventhub
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Azure.Iot
Assembly: Pulumi.Azure.dll
Syntax
public class EndpointEventhub : CustomResource

Constructors

View Source

EndpointEventhub(String, EndpointEventhubArgs, CustomResourceOptions)

Create a EndpointEventhub resource with the given unique name, arguments, and options.

Declaration
public EndpointEventhub(string name, EndpointEventhubArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

EndpointEventhubArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

ConnectionString

The connection string for the endpoint.

Declaration
public Output<string> ConnectionString { get; }
Property Value
Type Description
Output<System.String>
View Source

IothubName

Declaration
public Output<string> IothubName { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: events, operationsMonitoringEvents, fileNotifications and $default.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

ResourceGroupName

Declaration
public Output<string> ResourceGroupName { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, EndpointEventhubState, CustomResourceOptions)

Get an existing EndpointEventhub resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static EndpointEventhub Get(string name, Input<string> id, EndpointEventhubState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

EndpointEventhubState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
EndpointEventhub
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.