npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@azbake/ingredient-event-hub-namespace

v0.1.116

Published

Ingredient for deploying an instance of Event Hub Namespace resource

Downloads

147

Readme

Changelogs

Overview

The Event Hub Namespace ingredient is a plugin for Bake. When included in a recipe, this plugin will create an Event Hub Namespace resource within Azure.

This ingredient is typically used in conjunction with the Event Hub ingredient. The latter ingredient depends on this ingredient.

Diagnostic settings are enabled by default and will send to a special diagnostics Event Hub Namespace. Note that the diagnostics event hub namespace should be created beforehand (or within the same recipe) if you enable diagnostic settings.

Usage

Recipe

#This recipe deploys two event hub namespaces.  
#The GlobalProduct event hub namespace sends it's diagnostic logs and metrics to the Diagnostics event hub namespace.
#Provide name 
name:  Global Product Event Hubs Namespace
shortName: globalProduct
version: 0.0.1
#Specify the names of the ingredients to use in the recipe.  This is the name of the ingredient in package.json.  
#Specify the local path to the module during development.
ingredients:
  - "@azbake/ingredient-event-hub-namespace"
#Deploys to regions in parallel.  Typically true unless the sequence of deploying to regions is important.
parallelRegions: true
#rgOverride: 
resourceGroup: true
variables:
recipe:
  #Name the deployment.  This shows up in the log window and is the name of the deployment within Azure.
  globalProduct-deploy: 
    properties:
      #Specify the Bake ingredient above
      type: "@azbake/ingredient-event-hub-namespace"
      source: ""
      parameters:
        eventHubNamespace: "[eventhubnamespace.get_resource_name('globalproduct')]"      
        skuName: Standard
        skuTier: Standard
        skuCapacity: "1"
        #Enabling diagnostics.  Default values are being used for other diagnostics parameters.
        diagnosticsEnabled: "yes"
      dependsOn:
        - diagnostics-deploy
  #Name the deployment.  This shows up in the log window and is the name of the deployment within Azure.
  diagnostics-deploy: 
    properties:
      #Specify the Bake ingredient above
      type: "@azbake/ingredient-event-hub-namespace"
      source: ""
      parameters:
        eventHubNamespace: "[eventhubnamespace.get_resource_name('diagnostics')]"      
        skuName: Standard
        skuTier: Standard
        skuCapacity: "1"
        #Disabling diagnostics
        diagnosticsEnabled: "no"

| property|required|default|description| |---------|--------|--------|-----------| |eventHubNamespaceName | yes | | The name of the Event Hub Namespace | |location | no | Parent resource group geographic location. | The location for this resource. | |skuName | no | Standard | The SKU name. Allowed values are Basic and Standard. | |skuTier | no | Standard | The SKU billing tier. Allowed values are Basic and Standard. | |skuCapacity | yes | The throughput capacity of the Event Hub. Allowed values are 1 to 20. | |isAutoInflateEnabled | yes | true | Indicates whether AutoInflate is enabled. | |maximumThroughputUnits | yes | 10 | The upper limit of throughput units when AutoInflate is enabled. | |diagnosticsEnabled | no | yes | Enables a diagnostic setting to sent metrics and logs to a special diagnostics event hub namespace. | See Event Hub Namespace SDK documentation for additional details

Utilities

Utility classes can be used inside of the bake.yaml file for parameter and source values.

eventhubnamespace class

|function | description | |--------|-----------| |get_resource_name| Returns a resource name for an Event Hub Namespace | |get_resource_group | Returns a resource group

Function Details

get_resource_name()

Returns the name of the Event Hub Namespace as <environment><region>ehn<name>. A parameter for resource short name is available. If unspecified, the resource name is based on the package short name.

...
parameters:
    eventHubNamespace: "[eventhubnamespace.get_resource_name('diagnostics')]"
...

Returns

string

get_resource_profile()

Returns the resource profile as <resource group>/<resource name>. Parameters for resource short name and resouce group short name are available. If unspecified, the resource name and/or resource group name are based on the package short name.

...
properties:
    source: "[eventhubnamespace.get_resource_profile()]"
=======
Returns the resource group name as ``<environment><region>ehn``
```yaml
...
parameters:
    resourceGroup: "[eventhubnamespace.get_resource_group()]"
...

Returns

string