0.1.115 • Published 1 year ago

@azbake/ingredient-event-hub-namespace v0.1.115

Weekly downloads
39
License
MIT
Repository
-
Last release
1 year ago

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"
propertyrequireddefaultdescription
eventHubNamespaceNameyesThe name of the Event Hub Namespace
locationnoParent resource group geographic location.The location for this resource.
skuNamenoStandardThe SKU name. Allowed values are Basic and Standard.
skuTiernoStandardThe SKU billing tier. Allowed values are Basic and Standard.
skuCapacityyesThe throughput capacity of the Event Hub. Allowed values are 1 to 20.
isAutoInflateEnabledyestrueIndicates whether AutoInflate is enabled.
maximumThroughputUnitsyes10The upper limit of throughput units when AutoInflate is enabled.
diagnosticsEnablednoyesEnables 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

functiondescription
get_resource_nameReturns a resource name for an Event Hub Namespace
get_resource_groupReturns 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

0.1.115

1 year ago

0.1.114

2 years ago

0.1.113

2 years ago

0.1.110

2 years ago

0.1.112

2 years ago

0.1.111

2 years ago

0.1.109

2 years ago

0.1.108

4 years ago

0.1.107

4 years ago

0.1.106

4 years ago

0.1.105

4 years ago

0.1.104

4 years ago

0.1.103

4 years ago

0.1.102

4 years ago

0.1.101

4 years ago

0.1.99

4 years ago

0.1.98

4 years ago

0.1.97

4 years ago

0.1.96

4 years ago

0.1.95

4 years ago

0.1.92

4 years ago

0.1.87

4 years ago

0.1.75

5 years ago

0.1.68

5 years ago

0.1.67

5 years ago

0.1.64

5 years ago

0.1.62

5 years ago

0.1.59

5 years ago

0.1.55

5 years ago

0.1.53

5 years ago

0.1.52

5 years ago

0.1.47

5 years ago

0.1.46

5 years ago

0.1.45

5 years ago

0.1.44

5 years ago