armeventhub

package module
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2023 License: MIT Imports: 15 Imported by: 31

README

Azure Event Hubs Module for Go

PkgGoDev

The armeventhub module provides operations for working with Azure Event Hubs.

Source code

Getting started

Prerequisites

  • an Azure subscription
  • Go 1.18 or above (You could download and install the latest version of Go from here. It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this doc.)

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Event Hubs module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Event Hubs. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Client Factory

Azure Event Hubs module consists of one or more clients. We provide a client factory which could be used to create any client in this module.

clientFactory, err := armeventhub.NewClientFactory(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
clientFactory, err := armeventhub.NewClientFactory(<subscription ID>, cred, &options)

Clients

A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.

client := clientFactory.NewNamespacesClient()

Fakes

The fake package contains types used for constructing in-memory fake servers used in unit tests. This allows writing tests to cover various success/error conditions without the need for connecting to a live service.

Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes.

More sample code

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Event Hubs label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessKeys

type AccessKeys struct {
	// READ-ONLY; Primary connection string of the alias if GEO DR is enabled
	AliasPrimaryConnectionString *string

	// READ-ONLY; Secondary connection string of the alias if GEO DR is enabled
	AliasSecondaryConnectionString *string

	// READ-ONLY; A string that describes the AuthorizationRule.
	KeyName *string

	// READ-ONLY; Primary connection string of the created namespace AuthorizationRule.
	PrimaryConnectionString *string

	// READ-ONLY; A base64-encoded 256-bit primary key for signing and validating the SAS token.
	PrimaryKey *string

	// READ-ONLY; Secondary connection string of the created namespace AuthorizationRule.
	SecondaryConnectionString *string

	// READ-ONLY; A base64-encoded 256-bit primary key for signing and validating the SAS token.
	SecondaryKey *string
}

AccessKeys - Namespace/EventHub Connection String

func (AccessKeys) MarshalJSON added in v1.1.0

func (a AccessKeys) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AccessKeys.

func (*AccessKeys) UnmarshalJSON added in v1.1.0

func (a *AccessKeys) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AccessKeys.

type AccessRights

type AccessRights string
const (
	AccessRightsListen AccessRights = "Listen"
	AccessRightsManage AccessRights = "Manage"
	AccessRightsSend   AccessRights = "Send"
)

func PossibleAccessRightsValues

func PossibleAccessRightsValues() []AccessRights

PossibleAccessRightsValues returns the possible values for the AccessRights const type.

type ArmDisasterRecovery

type ArmDisasterRecovery struct {
	// Properties required to the Create Or Update Alias(Disaster Recovery configurations)
	Properties *ArmDisasterRecoveryProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The geo-location where the resource lives
	Location *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string
}

ArmDisasterRecovery - Single item in List or Get Alias(Disaster Recovery configuration) operation

func (ArmDisasterRecovery) MarshalJSON

func (a ArmDisasterRecovery) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ArmDisasterRecovery.

func (*ArmDisasterRecovery) UnmarshalJSON added in v1.1.0

func (a *ArmDisasterRecovery) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ArmDisasterRecovery.

type ArmDisasterRecoveryListResult

type ArmDisasterRecoveryListResult struct {
	// List of Alias(Disaster Recovery configurations)
	Value []*ArmDisasterRecovery

	// READ-ONLY; Link to the next set of results. Not empty if Value contains incomplete list of Alias(Disaster Recovery configuration)
	NextLink *string
}

ArmDisasterRecoveryListResult - The result of the List Alias(Disaster Recovery configuration) operation.

func (ArmDisasterRecoveryListResult) MarshalJSON

func (a ArmDisasterRecoveryListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ArmDisasterRecoveryListResult.

func (*ArmDisasterRecoveryListResult) UnmarshalJSON added in v1.1.0

func (a *ArmDisasterRecoveryListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ArmDisasterRecoveryListResult.

type ArmDisasterRecoveryProperties

type ArmDisasterRecoveryProperties struct {
	// Alternate name specified when alias and namespace names are same.
	AlternateName *string

	// ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing
	PartnerNamespace *string

	// READ-ONLY; Number of entities pending to be replicated.
	PendingReplicationOperationsCount *int64

	// READ-ONLY; Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded'
	// or 'Failed'
	ProvisioningState *ProvisioningStateDR

	// READ-ONLY; role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary'
	Role *RoleDisasterRecovery
}

ArmDisasterRecoveryProperties - Properties required to the Create Or Update Alias(Disaster Recovery configurations)

func (ArmDisasterRecoveryProperties) MarshalJSON added in v1.1.0

func (a ArmDisasterRecoveryProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ArmDisasterRecoveryProperties.

func (*ArmDisasterRecoveryProperties) UnmarshalJSON added in v1.1.0

func (a *ArmDisasterRecoveryProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ArmDisasterRecoveryProperties.

type AuthorizationRule

type AuthorizationRule struct {
	// Properties supplied to create or update AuthorizationRule
	Properties *AuthorizationRuleProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The geo-location where the resource lives
	Location *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string
}

AuthorizationRule - Single item in a List or Get AuthorizationRule operation

func (AuthorizationRule) MarshalJSON

func (a AuthorizationRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AuthorizationRule.

func (*AuthorizationRule) UnmarshalJSON added in v1.1.0

func (a *AuthorizationRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationRule.

type AuthorizationRuleListResult

type AuthorizationRuleListResult struct {
	// Link to the next set of results. Not empty if Value contains an incomplete list of Authorization Rules
	NextLink *string

	// Result of the List Authorization Rules operation.
	Value []*AuthorizationRule
}

AuthorizationRuleListResult - The response from the List namespace operation.

func (AuthorizationRuleListResult) MarshalJSON

func (a AuthorizationRuleListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AuthorizationRuleListResult.

func (*AuthorizationRuleListResult) UnmarshalJSON added in v1.1.0

func (a *AuthorizationRuleListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationRuleListResult.

type AuthorizationRuleProperties

type AuthorizationRuleProperties struct {
	// REQUIRED; The rights associated with the rule.
	Rights []*AccessRights
}

AuthorizationRuleProperties - Properties supplied to create or update AuthorizationRule

func (AuthorizationRuleProperties) MarshalJSON

func (a AuthorizationRuleProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AuthorizationRuleProperties.

func (*AuthorizationRuleProperties) UnmarshalJSON added in v1.1.0

func (a *AuthorizationRuleProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AuthorizationRuleProperties.

type AvailableCluster

type AvailableCluster struct {
	// Location fo the Available Cluster
	Location *string
}

AvailableCluster - Pre-provisioned and readily available Event Hubs Cluster count per region.

func (AvailableCluster) MarshalJSON added in v1.1.0

func (a AvailableCluster) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AvailableCluster.

func (*AvailableCluster) UnmarshalJSON added in v1.1.0

func (a *AvailableCluster) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AvailableCluster.

type AvailableClustersList

type AvailableClustersList struct {
	// The count of readily available and pre-provisioned Event Hubs Clusters per region.
	Value []*AvailableCluster
}

AvailableClustersList - The response of the List Available Clusters operation.

func (AvailableClustersList) MarshalJSON

func (a AvailableClustersList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AvailableClustersList.

func (*AvailableClustersList) UnmarshalJSON added in v1.1.0

func (a *AvailableClustersList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AvailableClustersList.

type CaptureDescription

type CaptureDescription struct {
	// Properties of Destination where capture will be stored. (Storage Account, Blob Names)
	Destination *Destination

	// A value that indicates whether capture description is enabled.
	Enabled *bool

	// Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in
	// New API Version
	Encoding *EncodingCaptureDescription

	// The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between
	// 60 to 900 seconds
	IntervalInSeconds *int32

	// The size window defines the amount of data built up in your Event Hub before an capture operation, value should be between
	// 10485760 to 524288000 bytes
	SizeLimitInBytes *int32

	// A value that indicates whether to Skip Empty Archives
	SkipEmptyArchives *bool
}

CaptureDescription - Properties to configure capture description for eventhub

func (CaptureDescription) MarshalJSON added in v1.1.0

func (c CaptureDescription) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CaptureDescription.

func (*CaptureDescription) UnmarshalJSON added in v1.1.0

func (c *CaptureDescription) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CaptureDescription.

type CheckNameAvailabilityParameter

type CheckNameAvailabilityParameter struct {
	// REQUIRED; Name to check the namespace name availability
	Name *string
}

CheckNameAvailabilityParameter - Parameter supplied to check Namespace name availability operation

func (CheckNameAvailabilityParameter) MarshalJSON added in v1.1.0

func (c CheckNameAvailabilityParameter) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityParameter.

func (*CheckNameAvailabilityParameter) UnmarshalJSON added in v1.1.0

func (c *CheckNameAvailabilityParameter) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityParameter.

type CheckNameAvailabilityResult

type CheckNameAvailabilityResult struct {
	// Value indicating Namespace is availability, true if the Namespace is available; otherwise, false.
	NameAvailable *bool

	// The reason for unavailability of a Namespace.
	Reason *UnavailableReason

	// READ-ONLY; The detailed info regarding the reason associated with the Namespace.
	Message *string
}

CheckNameAvailabilityResult - The Result of the CheckNameAvailability operation

func (CheckNameAvailabilityResult) MarshalJSON added in v1.1.0

func (c CheckNameAvailabilityResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityResult.

func (*CheckNameAvailabilityResult) UnmarshalJSON added in v1.1.0

func (c *CheckNameAvailabilityResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityResult.

type ClientFactory added in v1.1.0

type ClientFactory struct {
	// contains filtered or unexported fields
}

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory added in v1.1.0

func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

  • subscriptionID - Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewClustersClient added in v1.1.0

func (c *ClientFactory) NewClustersClient() *ClustersClient

NewClustersClient creates a new instance of ClustersClient.

func (*ClientFactory) NewConfigurationClient added in v1.1.0

func (c *ClientFactory) NewConfigurationClient() *ConfigurationClient

NewConfigurationClient creates a new instance of ConfigurationClient.

func (*ClientFactory) NewConsumerGroupsClient added in v1.1.0

func (c *ClientFactory) NewConsumerGroupsClient() *ConsumerGroupsClient

NewConsumerGroupsClient creates a new instance of ConsumerGroupsClient.

func (*ClientFactory) NewDisasterRecoveryConfigsClient added in v1.1.0

func (c *ClientFactory) NewDisasterRecoveryConfigsClient() *DisasterRecoveryConfigsClient

NewDisasterRecoveryConfigsClient creates a new instance of DisasterRecoveryConfigsClient.

func (*ClientFactory) NewEventHubsClient added in v1.1.0

func (c *ClientFactory) NewEventHubsClient() *EventHubsClient

NewEventHubsClient creates a new instance of EventHubsClient.

func (*ClientFactory) NewNamespacesClient added in v1.1.0

func (c *ClientFactory) NewNamespacesClient() *NamespacesClient

NewNamespacesClient creates a new instance of NamespacesClient.

func (*ClientFactory) NewOperationsClient added in v1.1.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewPrivateEndpointConnectionsClient added in v1.1.0

func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient

NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient.

func (*ClientFactory) NewPrivateLinkResourcesClient added in v1.1.0

func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient

NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient.

func (*ClientFactory) NewSchemaRegistryClient added in v1.1.0

func (c *ClientFactory) NewSchemaRegistryClient() *SchemaRegistryClient

NewSchemaRegistryClient creates a new instance of SchemaRegistryClient.

type Cluster

type Cluster struct {
	// Resource location.
	Location *string

	// Event Hubs Cluster properties supplied in responses in List or Get operations.
	Properties *ClusterProperties

	// Properties of the cluster SKU.
	SKU *ClusterSKU

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Cluster - Single Event Hubs Cluster resource in List or Get operations.

func (Cluster) MarshalJSON

func (c Cluster) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Cluster.

func (*Cluster) UnmarshalJSON added in v1.1.0

func (c *Cluster) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Cluster.

type ClusterListResult

type ClusterListResult struct {
	// Link to the next set of results. Empty unless the value parameter contains an incomplete list of Event Hubs Clusters.
	NextLink *string

	// The Event Hubs Clusters present in the List Event Hubs operation results.
	Value []*Cluster
}

ClusterListResult - The response of the List Event Hubs Clusters operation.

func (ClusterListResult) MarshalJSON

func (c ClusterListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ClusterListResult.

func (*ClusterListResult) UnmarshalJSON added in v1.1.0

func (c *ClusterListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ClusterListResult.

type ClusterProperties

type ClusterProperties struct {
	// READ-ONLY; The UTC time when the Event Hubs Cluster was created.
	CreatedAt *string

	// READ-ONLY; The metric ID of the cluster resource. Provided by the service and not modifiable by the user.
	MetricID *string

	// READ-ONLY; Status of the Cluster resource
	Status *string

	// READ-ONLY; The UTC time when the Event Hubs Cluster was last updated.
	UpdatedAt *string
}

ClusterProperties - Event Hubs Cluster properties supplied in responses in List or Get operations.

func (ClusterProperties) MarshalJSON added in v1.1.0

func (c ClusterProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ClusterProperties.

func (*ClusterProperties) UnmarshalJSON added in v1.1.0

func (c *ClusterProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ClusterProperties.

type ClusterQuotaConfigurationProperties

type ClusterQuotaConfigurationProperties struct {
	// All possible Cluster settings - a collection of key/value paired settings which apply to quotas and configurations imposed
	// on the cluster.
	Settings map[string]*string
}

ClusterQuotaConfigurationProperties - Contains all settings for the cluster.

func (ClusterQuotaConfigurationProperties) MarshalJSON

func (c ClusterQuotaConfigurationProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ClusterQuotaConfigurationProperties.

func (*ClusterQuotaConfigurationProperties) UnmarshalJSON added in v1.1.0

func (c *ClusterQuotaConfigurationProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ClusterQuotaConfigurationProperties.

type ClusterSKU

type ClusterSKU struct {
	// REQUIRED; Name of this SKU.
	Name *ClusterSKUName

	// The quantity of Event Hubs Cluster Capacity Units contained in this cluster.
	Capacity *int32
}

ClusterSKU - SKU parameters particular to a cluster instance.

func (ClusterSKU) MarshalJSON added in v1.1.0

func (c ClusterSKU) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ClusterSKU.

func (*ClusterSKU) UnmarshalJSON added in v1.1.0

func (c *ClusterSKU) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ClusterSKU.

type ClusterSKUName

type ClusterSKUName string

ClusterSKUName - Name of this SKU.

const (
	ClusterSKUNameDedicated ClusterSKUName = "Dedicated"
)

func PossibleClusterSKUNameValues

func PossibleClusterSKUNameValues() []ClusterSKUName

PossibleClusterSKUNameValues returns the possible values for the ClusterSKUName const type.

type ClustersClient

type ClustersClient struct {
	// contains filtered or unexported fields
}

ClustersClient contains the methods for the Clusters group. Don't use this type directly, use NewClustersClient() instead.

func NewClustersClient

func NewClustersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClustersClient, error)

NewClustersClient creates a new instance of ClustersClient with the specified values.

  • subscriptionID - Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClustersClient) BeginCreateOrUpdate

func (client *ClustersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterName string, parameters Cluster, options *ClustersClientBeginCreateOrUpdateOptions) (*runtime.Poller[ClustersClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates an instance of an Event Hubs Cluster. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • clusterName - The name of the Event Hubs Cluster.
  • parameters - Parameters for creating a eventhub cluster resource.
  • options - ClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the ClustersClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/Clusters/ClusterPut.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "testCluster", armeventhub.Cluster{
		Location: to.Ptr("South Central US"),
		Tags: map[string]*string{
			"tag1": to.Ptr("value1"),
			"tag2": to.Ptr("value2"),
		},
		SKU: &armeventhub.ClusterSKU{
			Name:     to.Ptr(armeventhub.ClusterSKUNameDedicated),
			Capacity: to.Ptr[int32](1),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Cluster = armeventhub.Cluster{
	// 	Name: to.Ptr("testCluster"),
	// 	Type: to.Ptr("Microsoft.EventHub/Clusters"),
	// 	ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/myResourceGroup/providers/Microsoft.EventHub/clusters/testCluster"),
	// 	Location: to.Ptr("South Central US"),
	// 	Tags: map[string]*string{
	// 		"tag1": to.Ptr("value1"),
	// 		"tag2": to.Ptr("value2"),
	// 	},
	// 	Properties: &armeventhub.ClusterProperties{
	// 		CreatedAt: to.Ptr("2017-05-24T23:23:27.877Z"),
	// 		MetricID: to.Ptr("SN6-008"),
	// 		UpdatedAt: to.Ptr("2017-05-24T23:23:27.877Z"),
	// 	},
	// 	SKU: &armeventhub.ClusterSKU{
	// 		Name: to.Ptr(armeventhub.ClusterSKUNameDedicated),
	// 		Capacity: to.Ptr[int32](1),
	// 	},
	// }
}
Output:

func (*ClustersClient) BeginDelete

func (client *ClustersClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDeleteOptions) (*runtime.Poller[ClustersClientDeleteResponse], error)

BeginDelete - Deletes an existing Event Hubs Cluster. This operation is idempotent. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • clusterName - The name of the Event Hubs Cluster.
  • options - ClustersClientBeginDeleteOptions contains the optional parameters for the ClustersClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/Clusters/ClusterDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginDelete(ctx, "myResourceGroup", "testCluster", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*ClustersClient) BeginUpdate

func (client *ClustersClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, parameters Cluster, options *ClustersClientBeginUpdateOptions) (*runtime.Poller[ClustersClientUpdateResponse], error)

BeginUpdate - Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • clusterName - The name of the Event Hubs Cluster.
  • parameters - The properties of the Event Hubs Cluster which should be updated.
  • options - ClustersClientBeginUpdateOptions contains the optional parameters for the ClustersClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/Clusters/ClusterPatch.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginUpdate(ctx, "myResourceGroup", "testCluster", armeventhub.Cluster{
		Location: to.Ptr("South Central US"),
		Tags: map[string]*string{
			"tag3": to.Ptr("value3"),
			"tag4": to.Ptr("value4"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Cluster = armeventhub.Cluster{
	// 	Name: to.Ptr("testCluster"),
	// 	Type: to.Ptr("Microsoft.EventHub/Clusters"),
	// 	ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/myResourceGroup/providers/Microsoft.EventHub/clusters/testCluster"),
	// 	Location: to.Ptr("South Central US"),
	// 	Tags: map[string]*string{
	// 		"tag3": to.Ptr("value3"),
	// 		"tag4": to.Ptr("value4"),
	// 	},
	// 	Properties: &armeventhub.ClusterProperties{
	// 		CreatedAt: to.Ptr("2017-06-01T21:37:04.46Z"),
	// 		MetricID: to.Ptr("SN6-008"),
	// 		UpdatedAt: to.Ptr("2017-06-01T21:37:53.413Z"),
	// 	},
	// 	SKU: &armeventhub.ClusterSKU{
	// 		Name: to.Ptr(armeventhub.ClusterSKUNameDedicated),
	// 		Capacity: to.Ptr[int32](4),
	// 	},
	// }
}
Output:

func (*ClustersClient) Get

func (client *ClustersClient) Get(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientGetOptions) (ClustersClientGetResponse, error)

Get - Gets the resource description of the specified Event Hubs Cluster. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • clusterName - The name of the Event Hubs Cluster.
  • options - ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/Clusters/ClusterGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClustersClient().Get(ctx, "myResourceGroup", "testCluster", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Cluster = armeventhub.Cluster{
	// 	Name: to.Ptr("testCluster"),
	// 	Type: to.Ptr("Microsoft.EventHub/Clusters"),
	// 	ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/myResourceGroup/providers/Microsoft.EventHub/clusters/testCluster"),
	// 	Location: to.Ptr("South Central US"),
	// 	Tags: map[string]*string{
	// 		"tag1": to.Ptr("value1"),
	// 		"tag2": to.Ptr("value2"),
	// 	},
	// 	Properties: &armeventhub.ClusterProperties{
	// 		CreatedAt: to.Ptr("2017-05-24T23:23:27.877Z"),
	// 		MetricID: to.Ptr("SN6-008"),
	// 		UpdatedAt: to.Ptr("2017-05-24T23:23:27.877Z"),
	// 	},
	// 	SKU: &armeventhub.ClusterSKU{
	// 		Name: to.Ptr(armeventhub.ClusterSKUNameDedicated),
	// 		Capacity: to.Ptr[int32](4),
	// 	},
	// }
}
Output:

func (*ClustersClient) ListAvailableClusterRegion

ListAvailableClusterRegion - List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • options - ClustersClientListAvailableClusterRegionOptions contains the optional parameters for the ClustersClient.ListAvailableClusterRegion method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/Clusters/ListAvailableClustersGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClustersClient().ListAvailableClusterRegion(ctx, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AvailableClustersList = armeventhub.AvailableClustersList{
	// 	Value: []*armeventhub.AvailableCluster{
	// 		{
	// 			Location: to.Ptr("westus"),
	// 		},
	// 		{
	// 			Location: to.Ptr("eastus"),
	// 	}},
	// }
}
Output:

func (*ClustersClient) ListNamespaces

func (client *ClustersClient) ListNamespaces(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientListNamespacesOptions) (ClustersClientListNamespacesResponse, error)

ListNamespaces - List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • clusterName - The name of the Event Hubs Cluster.
  • options - ClustersClientListNamespacesOptions contains the optional parameters for the ClustersClient.ListNamespaces method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/Clusters/ListNamespacesInClusterGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClustersClient().ListNamespaces(ctx, "myResourceGroup", "testCluster", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.EHNamespaceIDListResult = armeventhub.EHNamespaceIDListResult{
	// 	Value: []*armeventhub.EHNamespaceIDContainer{
	// 		{
	// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-EventHub-SouthCentralUS/providers/Microsoft.EventHub/namespaces/rrama-int7-ns1"),
	// 		},
	// 		{
	// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-EventHub-SouthCentralUS/providers/Microsoft.EventHub/namespaces/rrama-ehns2-int7"),
	// 		},
	// 		{
	// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.EventHub/namespaces/db3-rrama-foo1"),
	// 	}},
	// }
}
Output:

func (*ClustersClient) NewListByResourceGroupPager added in v0.5.0

func (client *ClustersClient) NewListByResourceGroupPager(resourceGroupName string, options *ClustersClientListByResourceGroupOptions) *runtime.Pager[ClustersClientListByResourceGroupResponse]

NewListByResourceGroupPager - Lists the available Event Hubs Clusters within an ARM resource group

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • options - ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/Clusters/ClustersListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewClustersClient().NewListByResourceGroupPager("myResourceGroup", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ClusterListResult = armeventhub.ClusterListResult{
		// 	Value: []*armeventhub.Cluster{
		// 		{
		// 			Name: to.Ptr("testCluster"),
		// 			Type: to.Ptr("Microsoft.EventHub/Clusters"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-EventHub-SouthCentralUS/providers/Microsoft.EventHub/clusters/testCluster"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armeventhub.ClusterProperties{
		// 				CreatedAt: to.Ptr("2016-09-13T23:17:25.24Z"),
		// 				MetricID: to.Ptr("SN6-008"),
		// 				UpdatedAt: to.Ptr("2016-09-13T23:17:28.223Z"),
		// 			},
		// 			SKU: &armeventhub.ClusterSKU{
		// 				Name: to.Ptr(armeventhub.ClusterSKUNameDedicated),
		// 				Capacity: to.Ptr[int32](4),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*ClustersClient) NewListBySubscriptionPager added in v0.5.0

NewListBySubscriptionPager - Lists the available Event Hubs Clusters within an ARM resource group

Generated from API version 2021-11-01

  • options - ClustersClientListBySubscriptionOptions contains the optional parameters for the ClustersClient.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/Clusters/ClustersListBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewClustersClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ClusterListResult = armeventhub.ClusterListResult{
		// 	Value: []*armeventhub.Cluster{
		// 		{
		// 			Name: to.Ptr("testCluster"),
		// 			Type: to.Ptr("Microsoft.EventHub/Clusters"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/Default-EventHub-SouthCentralUS/providers/Microsoft.EventHub/clusters/testCluster"),
		// 			Location: to.Ptr("South Central US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Properties: &armeventhub.ClusterProperties{
		// 				CreatedAt: to.Ptr("2016-09-13T23:17:25.24Z"),
		// 				MetricID: to.Ptr("SN6-008"),
		// 				UpdatedAt: to.Ptr("2016-09-13T23:17:28.223Z"),
		// 			},
		// 			SKU: &armeventhub.ClusterSKU{
		// 				Name: to.Ptr(armeventhub.ClusterSKUNameDedicated),
		// 				Capacity: to.Ptr[int32](4),
		// 			},
		// 	}},
		// }
	}
}
Output:

type ClustersClientBeginCreateOrUpdateOptions added in v0.3.0

type ClustersClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the ClustersClient.BeginCreateOrUpdate method.

type ClustersClientBeginDeleteOptions added in v0.3.0

type ClustersClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ClustersClientBeginDeleteOptions contains the optional parameters for the ClustersClient.BeginDelete method.

type ClustersClientBeginUpdateOptions added in v0.3.0

type ClustersClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ClustersClientBeginUpdateOptions contains the optional parameters for the ClustersClient.BeginUpdate method.

type ClustersClientCreateOrUpdateResponse added in v0.3.0

type ClustersClientCreateOrUpdateResponse struct {
	// Single Event Hubs Cluster resource in List or Get operations.
	Cluster
}

ClustersClientCreateOrUpdateResponse contains the response from method ClustersClient.BeginCreateOrUpdate.

type ClustersClientDeleteResponse added in v0.3.0

type ClustersClientDeleteResponse struct {
}

ClustersClientDeleteResponse contains the response from method ClustersClient.BeginDelete.

type ClustersClientGetOptions added in v0.3.0

type ClustersClientGetOptions struct {
}

ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method.

type ClustersClientGetResponse added in v0.3.0

type ClustersClientGetResponse struct {
	// Single Event Hubs Cluster resource in List or Get operations.
	Cluster
}

ClustersClientGetResponse contains the response from method ClustersClient.Get.

type ClustersClientListAvailableClusterRegionOptions added in v0.3.0

type ClustersClientListAvailableClusterRegionOptions struct {
}

ClustersClientListAvailableClusterRegionOptions contains the optional parameters for the ClustersClient.ListAvailableClusterRegion method.

type ClustersClientListAvailableClusterRegionResponse added in v0.3.0

type ClustersClientListAvailableClusterRegionResponse struct {
	// The response of the List Available Clusters operation.
	AvailableClustersList
}

ClustersClientListAvailableClusterRegionResponse contains the response from method ClustersClient.ListAvailableClusterRegion.

type ClustersClientListByResourceGroupOptions added in v0.3.0

type ClustersClientListByResourceGroupOptions struct {
}

ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.NewListByResourceGroupPager method.

type ClustersClientListByResourceGroupResponse added in v0.3.0

type ClustersClientListByResourceGroupResponse struct {
	// The response of the List Event Hubs Clusters operation.
	ClusterListResult
}

ClustersClientListByResourceGroupResponse contains the response from method ClustersClient.NewListByResourceGroupPager.

type ClustersClientListBySubscriptionOptions added in v0.3.0

type ClustersClientListBySubscriptionOptions struct {
}

ClustersClientListBySubscriptionOptions contains the optional parameters for the ClustersClient.NewListBySubscriptionPager method.

type ClustersClientListBySubscriptionResponse added in v0.3.0

type ClustersClientListBySubscriptionResponse struct {
	// The response of the List Event Hubs Clusters operation.
	ClusterListResult
}

ClustersClientListBySubscriptionResponse contains the response from method ClustersClient.NewListBySubscriptionPager.

type ClustersClientListNamespacesOptions added in v0.3.0

type ClustersClientListNamespacesOptions struct {
}

ClustersClientListNamespacesOptions contains the optional parameters for the ClustersClient.ListNamespaces method.

type ClustersClientListNamespacesResponse added in v0.3.0

type ClustersClientListNamespacesResponse struct {
	// The response of the List Namespace IDs operation
	EHNamespaceIDListResult
}

ClustersClientListNamespacesResponse contains the response from method ClustersClient.ListNamespaces.

type ClustersClientUpdateResponse added in v0.3.0

type ClustersClientUpdateResponse struct {
	// Single Event Hubs Cluster resource in List or Get operations.
	Cluster
}

ClustersClientUpdateResponse contains the response from method ClustersClient.BeginUpdate.

type ConfigurationClient

type ConfigurationClient struct {
	// contains filtered or unexported fields
}

ConfigurationClient contains the methods for the Configuration group. Don't use this type directly, use NewConfigurationClient() instead.

func NewConfigurationClient

func NewConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigurationClient, error)

NewConfigurationClient creates a new instance of ConfigurationClient with the specified values.

  • subscriptionID - Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ConfigurationClient) Get

func (client *ConfigurationClient) Get(ctx context.Context, resourceGroupName string, clusterName string, options *ConfigurationClientGetOptions) (ConfigurationClientGetResponse, error)

Get - Get all Event Hubs Cluster settings - a collection of key/value pairs which represent the quotas and settings imposed on the cluster. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • clusterName - The name of the Event Hubs Cluster.
  • options - ConfigurationClientGetOptions contains the optional parameters for the ConfigurationClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/Clusters/ClusterQuotaConfigurationGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewConfigurationClient().Get(ctx, "myResourceGroup", "testCluster", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ClusterQuotaConfigurationProperties = armeventhub.ClusterQuotaConfigurationProperties{
	// 	Settings: map[string]*string{
	// 		"eventhub-per-namespace-quota": to.Ptr("20"),
	// 		"namespaces-per-cluster-quota": to.Ptr("200"),
	// 	},
	// }
}
Output:

func (*ConfigurationClient) Patch

Patch - Replace all specified Event Hubs Cluster settings with those contained in the request body. Leaves the settings not specified in the request body unmodified. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • clusterName - The name of the Event Hubs Cluster.
  • parameters - Parameters for creating an Event Hubs Cluster resource.
  • options - ConfigurationClientPatchOptions contains the optional parameters for the ConfigurationClient.Patch method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/Clusters/ClusterQuotaConfigurationPatch.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewConfigurationClient().Patch(ctx, "ArunMonocle", "testCluster", armeventhub.ClusterQuotaConfigurationProperties{
		Settings: map[string]*string{
			"eventhub-per-namespace-quota": to.Ptr("20"),
			"namespaces-per-cluster-quota": to.Ptr("200"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ClusterQuotaConfigurationProperties = armeventhub.ClusterQuotaConfigurationProperties{
	// 	Settings: map[string]*string{
	// 		"eventhub-per-namespace-quota": to.Ptr("20"),
	// 		"namespaces-per-cluster-quota": to.Ptr("200"),
	// 	},
	// }
}
Output:

type ConfigurationClientGetOptions added in v0.3.0

type ConfigurationClientGetOptions struct {
}

ConfigurationClientGetOptions contains the optional parameters for the ConfigurationClient.Get method.

type ConfigurationClientGetResponse added in v0.3.0

type ConfigurationClientGetResponse struct {
	// Contains all settings for the cluster.
	ClusterQuotaConfigurationProperties
}

ConfigurationClientGetResponse contains the response from method ConfigurationClient.Get.

type ConfigurationClientPatchOptions added in v0.3.0

type ConfigurationClientPatchOptions struct {
}

ConfigurationClientPatchOptions contains the optional parameters for the ConfigurationClient.Patch method.

type ConfigurationClientPatchResponse added in v0.3.0

type ConfigurationClientPatchResponse struct {
	// Contains all settings for the cluster.
	ClusterQuotaConfigurationProperties
}

ConfigurationClientPatchResponse contains the response from method ConfigurationClient.Patch.

type ConnectionState

type ConnectionState struct {
	// Description of the connection state.
	Description *string

	// Status of the connection.
	Status *PrivateLinkConnectionStatus
}

ConnectionState information.

func (ConnectionState) MarshalJSON added in v1.1.0

func (c ConnectionState) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ConnectionState.

func (*ConnectionState) UnmarshalJSON added in v1.1.0

func (c *ConnectionState) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionState.

type ConsumerGroup

type ConsumerGroup struct {
	// Single item in List or Get Consumer group operation
	Properties *ConsumerGroupProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The geo-location where the resource lives
	Location *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string
}

ConsumerGroup - Single item in List or Get Consumer group operation

func (ConsumerGroup) MarshalJSON

func (c ConsumerGroup) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ConsumerGroup.

func (*ConsumerGroup) UnmarshalJSON added in v1.1.0

func (c *ConsumerGroup) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ConsumerGroup.

type ConsumerGroupListResult

type ConsumerGroupListResult struct {
	// Link to the next set of results. Not empty if Value contains incomplete list of Consumer Group
	NextLink *string

	// Result of the List Consumer Group operation.
	Value []*ConsumerGroup
}

ConsumerGroupListResult - The result to the List Consumer Group operation.

func (ConsumerGroupListResult) MarshalJSON

func (c ConsumerGroupListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ConsumerGroupListResult.

func (*ConsumerGroupListResult) UnmarshalJSON added in v1.1.0

func (c *ConsumerGroupListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ConsumerGroupListResult.

type ConsumerGroupProperties

type ConsumerGroupProperties struct {
	// User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store
	// descriptive data, such as list of teams and their contact information also
	// user-defined configuration settings can be stored.
	UserMetadata *string

	// READ-ONLY; Exact time the message was created.
	CreatedAt *time.Time

	// READ-ONLY; The exact time the message was updated.
	UpdatedAt *time.Time
}

ConsumerGroupProperties - Single item in List or Get Consumer group operation

func (ConsumerGroupProperties) MarshalJSON

func (c ConsumerGroupProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ConsumerGroupProperties.

func (*ConsumerGroupProperties) UnmarshalJSON

func (c *ConsumerGroupProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ConsumerGroupProperties.

type ConsumerGroupsClient

type ConsumerGroupsClient struct {
	// contains filtered or unexported fields
}

ConsumerGroupsClient contains the methods for the ConsumerGroups group. Don't use this type directly, use NewConsumerGroupsClient() instead.

func NewConsumerGroupsClient

func NewConsumerGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConsumerGroupsClient, error)

NewConsumerGroupsClient creates a new instance of ConsumerGroupsClient with the specified values.

  • subscriptionID - Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ConsumerGroupsClient) CreateOrUpdate

func (client *ConsumerGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, consumerGroupName string, parameters ConsumerGroup, options *ConsumerGroupsClientCreateOrUpdateOptions) (ConsumerGroupsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • eventHubName - The Event Hub name
  • consumerGroupName - The consumer group name
  • parameters - Parameters supplied to create or update a consumer group resource.
  • options - ConsumerGroupsClientCreateOrUpdateOptions contains the optional parameters for the ConsumerGroupsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/ConsumerGroup/EHConsumerGroupCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewConsumerGroupsClient().CreateOrUpdate(ctx, "ArunMonocle", "sdk-Namespace-2661", "sdk-EventHub-6681", "sdk-ConsumerGroup-5563", armeventhub.ConsumerGroup{
		Properties: &armeventhub.ConsumerGroupProperties{
			UserMetadata: to.Ptr("New consumergroup"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ConsumerGroup = armeventhub.ConsumerGroup{
	// 	Name: to.Ptr("sdk-ConsumerGroup-5563"),
	// 	Type: to.Ptr("Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups"),
	// 	ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.EventHub/namespaces/sdk-Namespace-2661/eventhubs/sdk-EventHub-6681/consumergroups/sdk-ConsumerGroup-5563"),
	// 	Properties: &armeventhub.ConsumerGroupProperties{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T03:43:09.453Z"); return t}()),
	// 		UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T03:43:09.453Z"); return t}()),
	// 	},
	// }
}
Output:

func (*ConsumerGroupsClient) Delete

func (client *ConsumerGroupsClient) Delete(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, consumerGroupName string, options *ConsumerGroupsClientDeleteOptions) (ConsumerGroupsClientDeleteResponse, error)

Delete - Deletes a consumer group from the specified Event Hub and resource group. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • eventHubName - The Event Hub name
  • consumerGroupName - The consumer group name
  • options - ConsumerGroupsClientDeleteOptions contains the optional parameters for the ConsumerGroupsClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/ConsumerGroup/EHConsumerGroupDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewConsumerGroupsClient().Delete(ctx, "ArunMonocle", "sdk-Namespace-2661", "sdk-EventHub-6681", "sdk-ConsumerGroup-5563", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ConsumerGroupsClient) Get

func (client *ConsumerGroupsClient) Get(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, consumerGroupName string, options *ConsumerGroupsClientGetOptions) (ConsumerGroupsClientGetResponse, error)

Get - Gets a description for the specified consumer group. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • eventHubName - The Event Hub name
  • consumerGroupName - The consumer group name
  • options - ConsumerGroupsClientGetOptions contains the optional parameters for the ConsumerGroupsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/ConsumerGroup/EHConsumerGroupGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewConsumerGroupsClient().Get(ctx, "ArunMonocle", "sdk-Namespace-2661", "sdk-EventHub-6681", "sdk-ConsumerGroup-5563", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ConsumerGroup = armeventhub.ConsumerGroup{
	// 	Name: to.Ptr("sdk-ConsumerGroup-5563"),
	// 	Type: to.Ptr("Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups"),
	// 	ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.EventHub/namespaces/sdk-Namespace-2661/eventhubs/sdk-EventHub-6681/consumergroups/sdk-ConsumerGroup-5563"),
	// 	Properties: &armeventhub.ConsumerGroupProperties{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T03:43:08.715Z"); return t}()),
	// 		UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T03:43:08.715Z"); return t}()),
	// 	},
	// }
}
Output:

func (*ConsumerGroupsClient) NewListByEventHubPager added in v0.5.0

func (client *ConsumerGroupsClient) NewListByEventHubPager(resourceGroupName string, namespaceName string, eventHubName string, options *ConsumerGroupsClientListByEventHubOptions) *runtime.Pager[ConsumerGroupsClientListByEventHubResponse]

NewListByEventHubPager - Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • eventHubName - The Event Hub name
  • options - ConsumerGroupsClientListByEventHubOptions contains the optional parameters for the ConsumerGroupsClient.NewListByEventHubPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/ConsumerGroup/EHConsumerGroupListByEventHub.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewConsumerGroupsClient().NewListByEventHubPager("ArunMonocle", "sdk-Namespace-2661", "sdk-EventHub-6681", &armeventhub.ConsumerGroupsClientListByEventHubOptions{Skip: nil,
		Top: nil,
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ConsumerGroupListResult = armeventhub.ConsumerGroupListResult{
		// 	Value: []*armeventhub.ConsumerGroup{
		// 		{
		// 			Name: to.Ptr("$Default"),
		// 			Type: to.Ptr("Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.EventHub/namespaces/sdk-Namespace-2661/eventhubs/sdk-EventHub-6681/consumergroups/$Default"),
		// 			Properties: &armeventhub.ConsumerGroupProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T03:42:52.287Z"); return t}()),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T03:42:52.287Z"); return t}()),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("sdk-consumergroup-5563"),
		// 			Type: to.Ptr("Microsoft.EventHub/Namespaces/EventHubs/ConsumerGroups"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.EventHub/namespaces/sdk-Namespace-2661/eventhubs/sdk-EventHub-6681/consumergroups/sdk-consumergroup-5563"),
		// 			Properties: &armeventhub.ConsumerGroupProperties{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T03:43:09.314Z"); return t}()),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T03:43:09.314Z"); return t}()),
		// 			},
		// 	}},
		// }
	}
}
Output:

type ConsumerGroupsClientCreateOrUpdateOptions added in v0.3.0

type ConsumerGroupsClientCreateOrUpdateOptions struct {
}

ConsumerGroupsClientCreateOrUpdateOptions contains the optional parameters for the ConsumerGroupsClient.CreateOrUpdate method.

type ConsumerGroupsClientCreateOrUpdateResponse added in v0.3.0

type ConsumerGroupsClientCreateOrUpdateResponse struct {
	// Single item in List or Get Consumer group operation
	ConsumerGroup
}

ConsumerGroupsClientCreateOrUpdateResponse contains the response from method ConsumerGroupsClient.CreateOrUpdate.

type ConsumerGroupsClientDeleteOptions added in v0.3.0

type ConsumerGroupsClientDeleteOptions struct {
}

ConsumerGroupsClientDeleteOptions contains the optional parameters for the ConsumerGroupsClient.Delete method.

type ConsumerGroupsClientDeleteResponse added in v0.3.0

type ConsumerGroupsClientDeleteResponse struct {
}

ConsumerGroupsClientDeleteResponse contains the response from method ConsumerGroupsClient.Delete.

type ConsumerGroupsClientGetOptions added in v0.3.0

type ConsumerGroupsClientGetOptions struct {
}

ConsumerGroupsClientGetOptions contains the optional parameters for the ConsumerGroupsClient.Get method.

type ConsumerGroupsClientGetResponse added in v0.3.0

type ConsumerGroupsClientGetResponse struct {
	// Single item in List or Get Consumer group operation
	ConsumerGroup
}

ConsumerGroupsClientGetResponse contains the response from method ConsumerGroupsClient.Get.

type ConsumerGroupsClientListByEventHubOptions added in v0.3.0

type ConsumerGroupsClientListByEventHubOptions struct {
	// Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element,
	// the value of the nextLink element will include a skip parameter that specifies
	// a starting point to use for subsequent calls.
	Skip *int32

	// May be used to limit the number of results to the most recent N usageDetails.
	Top *int32
}

ConsumerGroupsClientListByEventHubOptions contains the optional parameters for the ConsumerGroupsClient.NewListByEventHubPager method.

type ConsumerGroupsClientListByEventHubResponse added in v0.3.0

type ConsumerGroupsClientListByEventHubResponse struct {
	// The result to the List Consumer Group operation.
	ConsumerGroupListResult
}

ConsumerGroupsClientListByEventHubResponse contains the response from method ConsumerGroupsClient.NewListByEventHubPager.

type CreatedByType

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type DefaultAction

type DefaultAction string

DefaultAction - Default Action for Network Rule Set

const (
	DefaultActionAllow DefaultAction = "Allow"
	DefaultActionDeny  DefaultAction = "Deny"
)

func PossibleDefaultActionValues

func PossibleDefaultActionValues() []DefaultAction

PossibleDefaultActionValues returns the possible values for the DefaultAction const type.

type Destination

type Destination struct {
	// Name for capture destination
	Name *string

	// Properties describing the storage account, blob container and archive name format for capture destination
	Properties *DestinationProperties
}

Destination - Capture storage details for capture description

func (Destination) MarshalJSON added in v1.1.0

func (d Destination) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Destination.

func (*Destination) UnmarshalJSON added in v1.1.0

func (d *Destination) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Destination.

type DestinationProperties

type DestinationProperties struct {
	// Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}.
	// Here all the parameters (Namespace,EventHub .. etc) are mandatory
	// irrespective of order
	ArchiveNameFormat *string

	// Blob container Name
	BlobContainer *string

	// The Azure Data Lake Store name for the captured events
	DataLakeAccountName *string

	// The destination folder path for the captured events
	DataLakeFolderPath *string

	// Subscription Id of Azure Data Lake Store
	DataLakeSubscriptionID *string

	// Resource id of the storage account to be used to create the blobs
	StorageAccountResourceID *string
}

DestinationProperties - Properties describing the storage account, blob container and archive name format for capture destination

func (DestinationProperties) MarshalJSON added in v1.1.0

func (d DestinationProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DestinationProperties.

func (*DestinationProperties) UnmarshalJSON added in v1.1.0

func (d *DestinationProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DestinationProperties.

type DisasterRecoveryConfigsClient

type DisasterRecoveryConfigsClient struct {
	// contains filtered or unexported fields
}

DisasterRecoveryConfigsClient contains the methods for the DisasterRecoveryConfigs group. Don't use this type directly, use NewDisasterRecoveryConfigsClient() instead.

func NewDisasterRecoveryConfigsClient

func NewDisasterRecoveryConfigsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DisasterRecoveryConfigsClient, error)

NewDisasterRecoveryConfigsClient creates a new instance of DisasterRecoveryConfigsClient with the specified values.

  • subscriptionID - Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*DisasterRecoveryConfigsClient) BreakPairing

BreakPairing - This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • alias - The Disaster Recovery configuration name
  • options - DisasterRecoveryConfigsClientBreakPairingOptions contains the optional parameters for the DisasterRecoveryConfigsClient.BreakPairing method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/disasterRecoveryConfigs/EHAliasBreakPairing.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewDisasterRecoveryConfigsClient().BreakPairing(ctx, "exampleResourceGroup", "sdk-Namespace-8859", "sdk-DisasterRecovery-3814", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*DisasterRecoveryConfigsClient) CheckNameAvailability

CheckNameAvailability - Check the give Namespace name availability. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • parameters - Parameters to check availability of the given Alias name
  • options - DisasterRecoveryConfigsClientCheckNameAvailabilityOptions contains the optional parameters for the DisasterRecoveryConfigsClient.CheckNameAvailability method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/disasterRecoveryConfigs/EHAliasCheckNameAvailability.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDisasterRecoveryConfigsClient().CheckNameAvailability(ctx, "exampleResourceGroup", "sdk-Namespace-9080", armeventhub.CheckNameAvailabilityParameter{
		Name: to.Ptr("sdk-DisasterRecovery-9474"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CheckNameAvailabilityResult = armeventhub.CheckNameAvailabilityResult{
	// 	Message: to.Ptr(""),
	// 	NameAvailable: to.Ptr(true),
	// 	Reason: to.Ptr(armeventhub.UnavailableReasonNone),
	// }
}
Output:

func (*DisasterRecoveryConfigsClient) CreateOrUpdate

CreateOrUpdate - Creates or updates a new Alias(Disaster Recovery configuration) If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • alias - The Disaster Recovery configuration name
  • parameters - Parameters required to create an Alias(Disaster Recovery configuration)
  • options - DisasterRecoveryConfigsClientCreateOrUpdateOptions contains the optional parameters for the DisasterRecoveryConfigsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/disasterRecoveryConfigs/EHAliasCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDisasterRecoveryConfigsClient().CreateOrUpdate(ctx, "exampleResourceGroup", "sdk-Namespace-8859", "sdk-DisasterRecovery-3814", armeventhub.ArmDisasterRecovery{
		Properties: &armeventhub.ArmDisasterRecoveryProperties{
			PartnerNamespace: to.Ptr("sdk-Namespace-37"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ArmDisasterRecovery = armeventhub.ArmDisasterRecovery{
	// 	Name: to.Ptr("sdk-DisasterRecovery-3814"),
	// 	Type: to.Ptr("Microsoft.EventHub/Namespaces/DisasterRecoveryConfig"),
	// 	ID: to.Ptr("/subscriptions/exampleResourceGroup/resourceGroups/exampleResourceGroup/providers/Microsoft.EventHub/namespaces/sdk-Namespace-8859/disasterRecoveryConfig/sdk-DisasterRecovery-3814"),
	// 	Properties: &armeventhub.ArmDisasterRecoveryProperties{
	// 		PartnerNamespace: to.Ptr("sdk-Namespace-37"),
	// 		ProvisioningState: to.Ptr(armeventhub.ProvisioningStateDRSucceeded),
	// 		Role: to.Ptr(armeventhub.RoleDisasterRecoveryPrimary),
	// 	},
	// }
}
Output:

func (*DisasterRecoveryConfigsClient) Delete

Delete - Deletes an Alias(Disaster Recovery configuration) If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • alias - The Disaster Recovery configuration name
  • options - DisasterRecoveryConfigsClientDeleteOptions contains the optional parameters for the DisasterRecoveryConfigsClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/disasterRecoveryConfigs/EHAliasDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewDisasterRecoveryConfigsClient().Delete(ctx, "exampleResourceGroup", "sdk-Namespace-5849", "sdk-DisasterRecovery-3814", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*DisasterRecoveryConfigsClient) FailOver

FailOver - Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • alias - The Disaster Recovery configuration name
  • options - DisasterRecoveryConfigsClientFailOverOptions contains the optional parameters for the DisasterRecoveryConfigsClient.FailOver method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/disasterRecoveryConfigs/EHAliasFailOver.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewDisasterRecoveryConfigsClient().FailOver(ctx, "exampleResourceGroup", "sdk-Namespace-8859", "sdk-DisasterRecovery-3814", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*DisasterRecoveryConfigsClient) Get

Get - Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • alias - The Disaster Recovery configuration name
  • options - DisasterRecoveryConfigsClientGetOptions contains the optional parameters for the DisasterRecoveryConfigsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/disasterRecoveryConfigs/EHAliasGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDisasterRecoveryConfigsClient().Get(ctx, "exampleResourceGroup", "sdk-Namespace-8859", "sdk-DisasterRecovery-3814", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ArmDisasterRecovery = armeventhub.ArmDisasterRecovery{
	// 	Name: to.Ptr("sdk-DisasterRecovery-3814"),
	// 	Type: to.Ptr("Microsoft.EventHub/Namespaces/DisasterRecoveryConfig"),
	// 	ID: to.Ptr("/subscriptions/exampleSubscriptionId/resourceGroups/exampleResourceGroup/providers/Microsoft.EventHub/namespaces/sdk-Namespace-37/disasterRecoveryConfig/sdk-DisasterRecovery-3814"),
	// 	Properties: &armeventhub.ArmDisasterRecoveryProperties{
	// 		PartnerNamespace: to.Ptr("sdk-Namespace-8859"),
	// 		PendingReplicationOperationsCount: to.Ptr[int64](0),
	// 		ProvisioningState: to.Ptr(armeventhub.ProvisioningStateDRSucceeded),
	// 		Role: to.Ptr(armeventhub.RoleDisasterRecoverySecondary),
	// 	},
	// }
}
Output:

func (*DisasterRecoveryConfigsClient) GetAuthorizationRule

func (client *DisasterRecoveryConfigsClient) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, alias string, authorizationRuleName string, options *DisasterRecoveryConfigsClientGetAuthorizationRuleOptions) (DisasterRecoveryConfigsClientGetAuthorizationRuleResponse, error)

GetAuthorizationRule - Gets an AuthorizationRule for a Namespace by rule name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • alias - The Disaster Recovery configuration name
  • authorizationRuleName - The authorization rule name.
  • options - DisasterRecoveryConfigsClientGetAuthorizationRuleOptions contains the optional parameters for the DisasterRecoveryConfigsClient.GetAuthorizationRule method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/disasterRecoveryConfigs/EHAliasAuthorizationRuleGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDisasterRecoveryConfigsClient().GetAuthorizationRule(ctx, "exampleResourceGroup", "sdk-Namespace-9080", "sdk-DisasterRecovery-4879", "sdk-Authrules-4879", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AuthorizationRule = armeventhub.AuthorizationRule{
	// 	Name: to.Ptr("sdk-Authrules-4879"),
	// 	Type: to.Ptr("Microsoft.EventHub/Namespaces/AuthorizationRules"),
	// 	ID: to.Ptr("/subscriptions/exampleSubscriptionId/resourceGroups/exampleResourceGroup/providers/Microsoft.EventHub/namespaces/sdk-Namespace-9080/disasterRecoveryConfigs/sdk-DisasterRecovery-4047/AuthorizationRules/sdk-Authrules-4879"),
	// 	Properties: &armeventhub.AuthorizationRuleProperties{
	// 		Rights: []*armeventhub.AccessRights{
	// 			to.Ptr(armeventhub.AccessRightsListen),
	// 			to.Ptr(armeventhub.AccessRightsSend)},
	// 		},
	// 	}
}
Output:

func (*DisasterRecoveryConfigsClient) ListKeys

func (client *DisasterRecoveryConfigsClient) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, alias string, authorizationRuleName string, options *DisasterRecoveryConfigsClientListKeysOptions) (DisasterRecoveryConfigsClientListKeysResponse, error)

ListKeys - Gets the primary and secondary connection strings for the Namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • alias - The Disaster Recovery configuration name
  • authorizationRuleName - The authorization rule name.
  • options - DisasterRecoveryConfigsClientListKeysOptions contains the optional parameters for the DisasterRecoveryConfigsClient.ListKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/disasterRecoveryConfigs/EHAliasAuthorizationRuleListKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDisasterRecoveryConfigsClient().ListKeys(ctx, "exampleResourceGroup", "sdk-Namespace-2702", "sdk-DisasterRecovery-4047", "sdk-Authrules-1746", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AccessKeys = armeventhub.AccessKeys{
	// 	AliasPrimaryConnectionString: to.Ptr("Endpoint=sb://sdk-disasterrecovery-4047.servicebus.windows-int.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=############################################"),
	// 	AliasSecondaryConnectionString: to.Ptr("Endpoint=sb://sdk-disasterrecovery-4047.servicebus.windows-int.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=############################################"),
	// 	KeyName: to.Ptr("sdk-Authrules-1746"),
	// 	PrimaryKey: to.Ptr("############################################"),
	// 	SecondaryKey: to.Ptr("############################################"),
	// }
}
Output:

func (*DisasterRecoveryConfigsClient) NewListAuthorizationRulesPager added in v0.5.0

NewListAuthorizationRulesPager - Gets a list of authorization rules for a Namespace.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • alias - The Disaster Recovery configuration name
  • options - DisasterRecoveryConfigsClientListAuthorizationRulesOptions contains the optional parameters for the DisasterRecoveryConfigsClient.NewListAuthorizationRulesPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/disasterRecoveryConfigs/EHAliasAuthorizationRuleListAll.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDisasterRecoveryConfigsClient().NewListAuthorizationRulesPager("exampleResourceGroup", "sdk-Namespace-9080", "sdk-DisasterRecovery-4047", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AuthorizationRuleListResult = armeventhub.AuthorizationRuleListResult{
		// 	Value: []*armeventhub.AuthorizationRule{
		// 		{
		// 			Name: to.Ptr("RootManageSharedAccessKey"),
		// 			Type: to.Ptr("Microsoft.EventHub/Namespaces/AuthorizationRules"),
		// 			ID: to.Ptr("/subscriptions/exampleSubscriptionId/resourceGroups/exampleResourceGroup/providers/Microsoft.EventHub/namespaces/sdk-Namespace-9080/disasterRecoveryConfigs/sdk-DisasterRecovery-4047/AuthorizationRules/RootManageSharedAccessKey"),
		// 			Properties: &armeventhub.AuthorizationRuleProperties{
		// 				Rights: []*armeventhub.AccessRights{
		// 					to.Ptr(armeventhub.AccessRightsListen),
		// 					to.Ptr(armeventhub.AccessRightsManage),
		// 					to.Ptr(armeventhub.AccessRightsSend)},
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("sdk-Authrules-1067"),
		// 				Type: to.Ptr("Microsoft.EventHub/Namespaces/AuthorizationRules"),
		// 				ID: to.Ptr("/subscriptions/exampleSubscriptionId/resourceGroups/exampleResourceGroup/providers/Microsoft.EventHub/namespaces/sdk-Namespace-9080/disasterRecoveryConfigs/sdk-DisasterRecovery-4047/AuthorizationRules/sdk-Authrules-1067"),
		// 				Properties: &armeventhub.AuthorizationRuleProperties{
		// 					Rights: []*armeventhub.AccessRights{
		// 						to.Ptr(armeventhub.AccessRightsListen),
		// 						to.Ptr(armeventhub.AccessRightsSend)},
		// 					},
		// 				},
		// 				{
		// 					Name: to.Ptr("sdk-Authrules-1684"),
		// 					Type: to.Ptr("Microsoft.EventHub/Namespaces/AuthorizationRules"),
		// 					ID: to.Ptr("/subscriptions/exampleSubscriptionId/resourceGroups/exampleResourceGroup/providers/Microsoft.EventHub/namespaces/sdk-Namespace-9080/disasterRecoveryConfigs/sdk-DisasterRecovery-4047/AuthorizationRules/sdk-Authrules-1684"),
		// 					Properties: &armeventhub.AuthorizationRuleProperties{
		// 						Rights: []*armeventhub.AccessRights{
		// 							to.Ptr(armeventhub.AccessRightsListen),
		// 							to.Ptr(armeventhub.AccessRightsSend)},
		// 						},
		// 					},
		// 					{
		// 						Name: to.Ptr("sdk-Authrules-4879"),
		// 						Type: to.Ptr("Microsoft.EventHub/Namespaces/AuthorizationRules"),
		// 						ID: to.Ptr("/subscriptions/exampleSubscriptionId/resourceGroups/exampleResourceGroup/providers/Microsoft.EventHub/namespaces/sdk-Namespace-9080/disasterRecoveryConfigs/sdk-DisasterRecovery-4047/AuthorizationRules/sdk-Authrules-4879"),
		// 						Properties: &armeventhub.AuthorizationRuleProperties{
		// 							Rights: []*armeventhub.AccessRights{
		// 								to.Ptr(armeventhub.AccessRightsListen),
		// 								to.Ptr(armeventhub.AccessRightsSend)},
		// 							},
		// 					}},
		// 				}
	}
}
Output:

func (*DisasterRecoveryConfigsClient) NewListPager added in v0.5.0

NewListPager - Gets all Alias(Disaster Recovery configurations)

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • options - DisasterRecoveryConfigsClientListOptions contains the optional parameters for the DisasterRecoveryConfigsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/disasterRecoveryConfigs/EHAliasList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDisasterRecoveryConfigsClient().NewListPager("exampleResourceGroup", "sdk-Namespace-8859", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ArmDisasterRecoveryListResult = armeventhub.ArmDisasterRecoveryListResult{
		// 	Value: []*armeventhub.ArmDisasterRecovery{
		// 		{
		// 			Name: to.Ptr("sdk-DisasterRecovery-3814"),
		// 			Type: to.Ptr("Microsoft.EventHub/Namespaces/DisasterRecoveryConfig"),
		// 			ID: to.Ptr("/subscriptions/exampleSubscriptionId/resourceGroups/exampleResourceGroup/providers/Microsoft.EventHub/namespaces/sdk-Namespace-8859/disasterRecoveryConfig/sdk-DisasterRecovery-3814"),
		// 			Properties: &armeventhub.ArmDisasterRecoveryProperties{
		// 				PartnerNamespace: to.Ptr("sdk-Namespace-37"),
		// 				ProvisioningState: to.Ptr(armeventhub.ProvisioningStateDRSucceeded),
		// 				Role: to.Ptr(armeventhub.RoleDisasterRecoveryPrimary),
		// 			},
		// 	}},
		// }
	}
}
Output:

type DisasterRecoveryConfigsClientBreakPairingOptions added in v0.3.0

type DisasterRecoveryConfigsClientBreakPairingOptions struct {
}

DisasterRecoveryConfigsClientBreakPairingOptions contains the optional parameters for the DisasterRecoveryConfigsClient.BreakPairing method.

type DisasterRecoveryConfigsClientBreakPairingResponse added in v0.3.0

type DisasterRecoveryConfigsClientBreakPairingResponse struct {
}

DisasterRecoveryConfigsClientBreakPairingResponse contains the response from method DisasterRecoveryConfigsClient.BreakPairing.

type DisasterRecoveryConfigsClientCheckNameAvailabilityOptions added in v0.3.0

type DisasterRecoveryConfigsClientCheckNameAvailabilityOptions struct {
}

DisasterRecoveryConfigsClientCheckNameAvailabilityOptions contains the optional parameters for the DisasterRecoveryConfigsClient.CheckNameAvailability method.

type DisasterRecoveryConfigsClientCheckNameAvailabilityResponse added in v0.3.0

type DisasterRecoveryConfigsClientCheckNameAvailabilityResponse struct {
	// The Result of the CheckNameAvailability operation
	CheckNameAvailabilityResult
}

DisasterRecoveryConfigsClientCheckNameAvailabilityResponse contains the response from method DisasterRecoveryConfigsClient.CheckNameAvailability.

type DisasterRecoveryConfigsClientCreateOrUpdateOptions added in v0.3.0

type DisasterRecoveryConfigsClientCreateOrUpdateOptions struct {
}

DisasterRecoveryConfigsClientCreateOrUpdateOptions contains the optional parameters for the DisasterRecoveryConfigsClient.CreateOrUpdate method.

type DisasterRecoveryConfigsClientCreateOrUpdateResponse added in v0.3.0

type DisasterRecoveryConfigsClientCreateOrUpdateResponse struct {
	// Single item in List or Get Alias(Disaster Recovery configuration) operation
	ArmDisasterRecovery
}

DisasterRecoveryConfigsClientCreateOrUpdateResponse contains the response from method DisasterRecoveryConfigsClient.CreateOrUpdate.

type DisasterRecoveryConfigsClientDeleteOptions added in v0.3.0

type DisasterRecoveryConfigsClientDeleteOptions struct {
}

DisasterRecoveryConfigsClientDeleteOptions contains the optional parameters for the DisasterRecoveryConfigsClient.Delete method.

type DisasterRecoveryConfigsClientDeleteResponse added in v0.3.0

type DisasterRecoveryConfigsClientDeleteResponse struct {
}

DisasterRecoveryConfigsClientDeleteResponse contains the response from method DisasterRecoveryConfigsClient.Delete.

type DisasterRecoveryConfigsClientFailOverOptions added in v0.3.0

type DisasterRecoveryConfigsClientFailOverOptions struct {
}

DisasterRecoveryConfigsClientFailOverOptions contains the optional parameters for the DisasterRecoveryConfigsClient.FailOver method.

type DisasterRecoveryConfigsClientFailOverResponse added in v0.3.0

type DisasterRecoveryConfigsClientFailOverResponse struct {
}

DisasterRecoveryConfigsClientFailOverResponse contains the response from method DisasterRecoveryConfigsClient.FailOver.

type DisasterRecoveryConfigsClientGetAuthorizationRuleOptions added in v0.3.0

type DisasterRecoveryConfigsClientGetAuthorizationRuleOptions struct {
}

DisasterRecoveryConfigsClientGetAuthorizationRuleOptions contains the optional parameters for the DisasterRecoveryConfigsClient.GetAuthorizationRule method.

type DisasterRecoveryConfigsClientGetAuthorizationRuleResponse added in v0.3.0

type DisasterRecoveryConfigsClientGetAuthorizationRuleResponse struct {
	// Single item in a List or Get AuthorizationRule operation
	AuthorizationRule
}

DisasterRecoveryConfigsClientGetAuthorizationRuleResponse contains the response from method DisasterRecoveryConfigsClient.GetAuthorizationRule.

type DisasterRecoveryConfigsClientGetOptions added in v0.3.0

type DisasterRecoveryConfigsClientGetOptions struct {
}

DisasterRecoveryConfigsClientGetOptions contains the optional parameters for the DisasterRecoveryConfigsClient.Get method.

type DisasterRecoveryConfigsClientGetResponse added in v0.3.0

type DisasterRecoveryConfigsClientGetResponse struct {
	// Single item in List or Get Alias(Disaster Recovery configuration) operation
	ArmDisasterRecovery
}

DisasterRecoveryConfigsClientGetResponse contains the response from method DisasterRecoveryConfigsClient.Get.

type DisasterRecoveryConfigsClientListAuthorizationRulesOptions added in v0.3.0

type DisasterRecoveryConfigsClientListAuthorizationRulesOptions struct {
}

DisasterRecoveryConfigsClientListAuthorizationRulesOptions contains the optional parameters for the DisasterRecoveryConfigsClient.NewListAuthorizationRulesPager method.

type DisasterRecoveryConfigsClientListAuthorizationRulesResponse added in v0.3.0

type DisasterRecoveryConfigsClientListAuthorizationRulesResponse struct {
	// The response from the List namespace operation.
	AuthorizationRuleListResult
}

DisasterRecoveryConfigsClientListAuthorizationRulesResponse contains the response from method DisasterRecoveryConfigsClient.NewListAuthorizationRulesPager.

type DisasterRecoveryConfigsClientListKeysOptions added in v0.3.0

type DisasterRecoveryConfigsClientListKeysOptions struct {
}

DisasterRecoveryConfigsClientListKeysOptions contains the optional parameters for the DisasterRecoveryConfigsClient.ListKeys method.

type DisasterRecoveryConfigsClientListKeysResponse added in v0.3.0

type DisasterRecoveryConfigsClientListKeysResponse struct {
	// Namespace/EventHub Connection String
	AccessKeys
}

DisasterRecoveryConfigsClientListKeysResponse contains the response from method DisasterRecoveryConfigsClient.ListKeys.

type DisasterRecoveryConfigsClientListOptions added in v0.3.0

type DisasterRecoveryConfigsClientListOptions struct {
}

DisasterRecoveryConfigsClientListOptions contains the optional parameters for the DisasterRecoveryConfigsClient.NewListPager method.

type DisasterRecoveryConfigsClientListResponse added in v0.3.0

type DisasterRecoveryConfigsClientListResponse struct {
	// The result of the List Alias(Disaster Recovery configuration) operation.
	ArmDisasterRecoveryListResult
}

DisasterRecoveryConfigsClientListResponse contains the response from method DisasterRecoveryConfigsClient.NewListPager.

type EHNamespace

type EHNamespace struct {
	// Properties of BYOK Identity description
	Identity *Identity

	// Resource location.
	Location *string

	// Namespace properties supplied for create namespace operation.
	Properties *EHNamespaceProperties

	// Properties of sku resource
	SKU *SKU

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

EHNamespace - Single Namespace item in List or Get Operation

func (EHNamespace) MarshalJSON

func (e EHNamespace) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EHNamespace.

func (*EHNamespace) UnmarshalJSON added in v1.1.0

func (e *EHNamespace) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EHNamespace.

type EHNamespaceIDContainer

type EHNamespaceIDContainer struct {
	// id parameter
	ID *string
}

EHNamespaceIDContainer - The full ARM ID of an Event Hubs Namespace

func (EHNamespaceIDContainer) MarshalJSON added in v1.1.0

func (e EHNamespaceIDContainer) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EHNamespaceIDContainer.

func (*EHNamespaceIDContainer) UnmarshalJSON added in v1.1.0

func (e *EHNamespaceIDContainer) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EHNamespaceIDContainer.

type EHNamespaceIDListResult

type EHNamespaceIDListResult struct {
	// Result of the List Namespace IDs operation
	Value []*EHNamespaceIDContainer
}

EHNamespaceIDListResult - The response of the List Namespace IDs operation

func (EHNamespaceIDListResult) MarshalJSON

func (e EHNamespaceIDListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EHNamespaceIDListResult.

func (*EHNamespaceIDListResult) UnmarshalJSON added in v1.1.0

func (e *EHNamespaceIDListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EHNamespaceIDListResult.

type EHNamespaceListResult

type EHNamespaceListResult struct {
	// Link to the next set of results. Not empty if Value contains incomplete list of namespaces.
	NextLink *string

	// Result of the List Namespace operation
	Value []*EHNamespace
}

EHNamespaceListResult - The response of the List Namespace operation

func (EHNamespaceListResult) MarshalJSON

func (e EHNamespaceListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EHNamespaceListResult.

func (*EHNamespaceListResult) UnmarshalJSON added in v1.1.0

func (e *EHNamespaceListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EHNamespaceListResult.

type EHNamespaceProperties

type EHNamespaceProperties struct {
	// Alternate name specified when alias and namespace names are same.
	AlternateName *string

	// Cluster ARM ID of the Namespace.
	ClusterArmID *string

	// This property disables SAS authentication for the Event Hubs namespace.
	DisableLocalAuth *bool

	// Properties of BYOK Encryption description
	Encryption *Encryption

	// Value that indicates whether AutoInflate is enabled for eventhub namespace.
	IsAutoInflateEnabled *bool

	// Value that indicates whether Kafka is enabled for eventhub namespace.
	KafkaEnabled *bool

	// Upper limit of throughput units when AutoInflate is enabled, value should be within 0 to 20 throughput units. ( '0' if
	// AutoInflateEnabled = true)
	MaximumThroughputUnits *int32

	// List of private endpoint connections.
	PrivateEndpointConnections []*PrivateEndpointConnection

	// Enabling this property creates a Standard Event Hubs Namespace in regions supported availability zones.
	ZoneRedundant *bool

	// READ-ONLY; The time the Namespace was created.
	CreatedAt *time.Time

	// READ-ONLY; Identifier for Azure Insights metrics.
	MetricID *string

	// READ-ONLY; Provisioning state of the Namespace.
	ProvisioningState *string

	// READ-ONLY; Endpoint you can use to perform Service Bus operations.
	ServiceBusEndpoint *string

	// READ-ONLY; Status of the Namespace.
	Status *string

	// READ-ONLY; The time the Namespace was updated.
	UpdatedAt *time.Time
}

EHNamespaceProperties - Namespace properties supplied for create namespace operation.

func (EHNamespaceProperties) MarshalJSON

func (e EHNamespaceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EHNamespaceProperties.

func (*EHNamespaceProperties) UnmarshalJSON

func (e *EHNamespaceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EHNamespaceProperties.

type EncodingCaptureDescription

type EncodingCaptureDescription string

EncodingCaptureDescription - Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version

const (
	EncodingCaptureDescriptionAvro        EncodingCaptureDescription = "Avro"
	EncodingCaptureDescriptionAvroDeflate EncodingCaptureDescription = "AvroDeflate"
)

func PossibleEncodingCaptureDescriptionValues

func PossibleEncodingCaptureDescriptionValues() []EncodingCaptureDescription

PossibleEncodingCaptureDescriptionValues returns the possible values for the EncodingCaptureDescription const type.

type Encryption

type Encryption struct {
	// Enumerates the possible value of keySource for Encryption
	KeySource *string

	// Properties of KeyVault
	KeyVaultProperties []*KeyVaultProperties

	// Enable Infrastructure Encryption (Double Encryption)
	RequireInfrastructureEncryption *bool
}

Encryption - Properties to configure Encryption

func (Encryption) MarshalJSON

func (e Encryption) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Encryption.

func (*Encryption) UnmarshalJSON added in v1.1.0

func (e *Encryption) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Encryption.

type EndPointProvisioningState

type EndPointProvisioningState string

EndPointProvisioningState - Provisioning state of the Private Endpoint Connection.

const (
	EndPointProvisioningStateCanceled  EndPointProvisioningState = "Canceled"
	EndPointProvisioningStateCreating  EndPointProvisioningState = "Creating"
	EndPointProvisioningStateDeleting  EndPointProvisioningState = "Deleting"
	EndPointProvisioningStateFailed    EndPointProvisioningState = "Failed"
	EndPointProvisioningStateSucceeded EndPointProvisioningState = "Succeeded"
	EndPointProvisioningStateUpdating  EndPointProvisioningState = "Updating"
)

func PossibleEndPointProvisioningStateValues

func PossibleEndPointProvisioningStateValues() []EndPointProvisioningState

PossibleEndPointProvisioningStateValues returns the possible values for the EndPointProvisioningState const type.

type EntityStatus

type EntityStatus string

EntityStatus - Enumerates the possible values for the status of the Event Hub.

const (
	EntityStatusActive          EntityStatus = "Active"
	EntityStatusCreating        EntityStatus = "Creating"
	EntityStatusDeleting        EntityStatus = "Deleting"
	EntityStatusDisabled        EntityStatus = "Disabled"
	EntityStatusReceiveDisabled EntityStatus = "ReceiveDisabled"
	EntityStatusRenaming        EntityStatus = "Renaming"
	EntityStatusRestoring       EntityStatus = "Restoring"
	EntityStatusSendDisabled    EntityStatus = "SendDisabled"
	EntityStatusUnknown         EntityStatus = "Unknown"
)

func PossibleEntityStatusValues

func PossibleEntityStatusValues() []EntityStatus

PossibleEntityStatusValues returns the possible values for the EntityStatus const type.

type ErrorAdditionalInfo added in v0.2.0

type ErrorAdditionalInfo struct {
	// READ-ONLY; The additional info.
	Info any

	// READ-ONLY; The additional info type.
	Type *string
}

ErrorAdditionalInfo - The resource management error additional info.

func (ErrorAdditionalInfo) MarshalJSON added in v1.1.0

func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.

func (*ErrorAdditionalInfo) UnmarshalJSON added in v1.1.0

func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.

type ErrorDetail added in v0.2.0

type ErrorDetail struct {
	// READ-ONLY; The error additional info.
	AdditionalInfo []*ErrorAdditionalInfo

	// READ-ONLY; The error code.
	Code *string

	// READ-ONLY; The error details.
	Details []*ErrorDetail

	// READ-ONLY; The error message.
	Message *string

	// READ-ONLY; The error target.
	Target *string
}

ErrorDetail - The error detail.

func (ErrorDetail) MarshalJSON added in v0.2.0

func (e ErrorDetail) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorDetail.

func (*ErrorDetail) UnmarshalJSON added in v1.1.0

func (e *ErrorDetail) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.

type ErrorResponse

type ErrorResponse struct {
	// The error object.
	Error *ErrorDetail
}

ErrorResponse - Error response indicates Event Hub service is not able to process the incoming request. The reason is provided in the error message.

func (ErrorResponse) MarshalJSON added in v1.1.0

func (e ErrorResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorResponse.

func (*ErrorResponse) UnmarshalJSON added in v1.1.0

func (e *ErrorResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.

type EventHubsClient

type EventHubsClient struct {
	// contains filtered or unexported fields
}

EventHubsClient contains the methods for the EventHubs group. Don't use this type directly, use NewEventHubsClient() instead.

func NewEventHubsClient

func NewEventHubsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EventHubsClient, error)

NewEventHubsClient creates a new instance of EventHubsClient with the specified values.

  • subscriptionID - Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*EventHubsClient) CreateOrUpdate

func (client *EventHubsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, parameters Eventhub, options *EventHubsClientCreateOrUpdateOptions) (EventHubsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates a new Event Hub as a nested resource within a Namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • eventHubName - The Event Hub name
  • parameters - Parameters supplied to create an Event Hub resource.
  • options - EventHubsClientCreateOrUpdateOptions contains the optional parameters for the EventHubsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/EventHubs/EHEventHubCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewEventHubsClient().CreateOrUpdate(ctx, "Default-NotificationHubs-AustraliaEast", "sdk-Namespace-5357", "sdk-EventHub-6547", armeventhub.Eventhub{
		Properties: &armeventhub.Properties{
			CaptureDescription: &armeventhub.CaptureDescription{
				Destination: &armeventhub.Destination{
					Name: to.Ptr("EventHubArchive.AzureBlockBlob"),
					Properties: &armeventhub.DestinationProperties{
						ArchiveNameFormat:        to.Ptr("{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}"),
						BlobContainer:            to.Ptr("container"),
						StorageAccountResourceID: to.Ptr("/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-SouthCentralUS/providers/Microsoft.ClassicStorage/storageAccounts/arjunteststorage"),
					},
				},
				Enabled:           to.Ptr(true),
				Encoding:          to.Ptr(armeventhub.EncodingCaptureDescriptionAvro),
				IntervalInSeconds: to.Ptr[int32](120),
				SizeLimitInBytes:  to.Ptr[int32](10485763),
			},
			MessageRetentionInDays: to.Ptr[int64](4),
			PartitionCount:         to.Ptr[int64](4),
			Status:                 to.Ptr(armeventhub.EntityStatusActive),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Eventhub = armeventhub.Eventhub{
	// 	Name: to.Ptr("sdk-EventHub-10"),
	// 	Type: to.Ptr("Microsoft.EventHub/Namespaces/EventHubs"),
	// 	ID: to.Ptr("/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.EventHub/namespaces/sdk-Namespace-716/eventhubs/sdk-EventHub-10"),
	// 	Properties: &armeventhub.Properties{
	// 		CaptureDescription: &armeventhub.CaptureDescription{
	// 			Destination: &armeventhub.Destination{
	// 				Name: to.Ptr("EventHubArchive.AzureBlockBlob"),
	// 				Properties: &armeventhub.DestinationProperties{
	// 					ArchiveNameFormat: to.Ptr("{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}"),
	// 					BlobContainer: to.Ptr("container"),
	// 					StorageAccountResourceID: to.Ptr("/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-SouthCentralUS/providers/Microsoft.ClassicStorage/storageAccounts/arjunteststorage"),
	// 				},
	// 			},
	// 			Enabled: to.Ptr(true),
	// 			Encoding: to.Ptr(armeventhub.EncodingCaptureDescriptionAvro),
	// 			IntervalInSeconds: to.Ptr[int32](120),
	// 			SizeLimitInBytes: to.Ptr[int32](10485763),
	// 		},
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-28T02:45:55.877Z"); return t}()),
	// 		MessageRetentionInDays: to.Ptr[int64](4),
	// 		PartitionCount: to.Ptr[int64](4),
	// 		PartitionIDs: []*string{
	// 			to.Ptr("0"),
	// 			to.Ptr("1"),
	// 			to.Ptr("2"),
	// 			to.Ptr("3")},
	// 			Status: to.Ptr(armeventhub.EntityStatusActive),
	// 			UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-28T02:46:05.877Z"); return t}()),
	// 		},
	// 	}
}
Output:

func (*EventHubsClient) CreateOrUpdateAuthorizationRule

func (client *EventHubsClient) CreateOrUpdateAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string, parameters AuthorizationRule, options *EventHubsClientCreateOrUpdateAuthorizationRuleOptions) (EventHubsClientCreateOrUpdateAuthorizationRuleResponse, error)

CreateOrUpdateAuthorizationRule - Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • eventHubName - The Event Hub name
  • authorizationRuleName - The authorization rule name.
  • parameters - The shared access AuthorizationRule.
  • options - EventHubsClientCreateOrUpdateAuthorizationRuleOptions contains the optional parameters for the EventHubsClient.CreateOrUpdateAuthorizationRule method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/EventHubs/EHEventHubAuthorizationRuleCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewEventHubsClient().CreateOrUpdateAuthorizationRule(ctx, "ArunMonocle", "sdk-Namespace-960", "sdk-EventHub-532", "sdk-Authrules-2513", armeventhub.AuthorizationRule{
		Properties: &armeventhub.AuthorizationRuleProperties{
			Rights: []*armeventhub.AccessRights{
				to.Ptr(armeventhub.AccessRightsListen),
				to.Ptr(armeventhub.AccessRightsSend)},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AuthorizationRule = armeventhub.AuthorizationRule{
	// 	Name: to.Ptr("sdk-Authrules-2513"),
	// 	Type: to.Ptr("Microsoft.EventHub/Namespaces/EventHubs/AuthorizationRules"),
	// 	ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.EventHub/namespaces/sdk-Namespace-960/eventhubs/sdk-EventHub-532/authorizationRules/sdk-Authrules-2513"),
	// 	Properties: &armeventhub.AuthorizationRuleProperties{
	// 		Rights: []*armeventhub.AccessRights{
	// 			to.Ptr(armeventhub.AccessRightsListen),
	// 			to.Ptr(armeventhub.AccessRightsSend)},
	// 		},
	// 	}
}
Output:

func (*EventHubsClient) Delete

func (client *EventHubsClient) Delete(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, options *EventHubsClientDeleteOptions) (EventHubsClientDeleteResponse, error)

Delete - Deletes an Event Hub from the specified Namespace and resource group. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • eventHubName - The Event Hub name
  • options - EventHubsClientDeleteOptions contains the optional parameters for the EventHubsClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/EventHubs/EHEventHubDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewEventHubsClient().Delete(ctx, "ArunMonocle", "sdk-Namespace-5357", "sdk-EventHub-6547", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*EventHubsClient) DeleteAuthorizationRule

func (client *EventHubsClient) DeleteAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string, options *EventHubsClientDeleteAuthorizationRuleOptions) (EventHubsClientDeleteAuthorizationRuleResponse, error)

DeleteAuthorizationRule - Deletes an Event Hub AuthorizationRule. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • eventHubName - The Event Hub name
  • authorizationRuleName - The authorization rule name.
  • options - EventHubsClientDeleteAuthorizationRuleOptions contains the optional parameters for the EventHubsClient.DeleteAuthorizationRule method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/EventHubs/EHEventHubAuthorizationRuleDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewEventHubsClient().DeleteAuthorizationRule(ctx, "ArunMonocle", "sdk-Namespace-960", "sdk-EventHub-532", "sdk-Authrules-2513", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*EventHubsClient) Get

func (client *EventHubsClient) Get(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, options *EventHubsClientGetOptions) (EventHubsClientGetResponse, error)

Get - Gets an Event Hubs description for the specified Event Hub. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • eventHubName - The Event Hub name
  • options - EventHubsClientGetOptions contains the optional parameters for the EventHubsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/EventHubs/EHEventHubGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewEventHubsClient().Get(ctx, "Default-NotificationHubs-AustraliaEast", "sdk-Namespace-716", "sdk-EventHub-10", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Eventhub = armeventhub.Eventhub{
	// 	Name: to.Ptr("sdk-EventHub-10"),
	// 	Type: to.Ptr("Microsoft.EventHub/Namespaces/EventHubs"),
	// 	ID: to.Ptr("/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.EventHub/namespaces/sdk-Namespace-716/eventhubs/sdk-EventHub-10"),
	// 	Properties: &armeventhub.Properties{
	// 		CaptureDescription: &armeventhub.CaptureDescription{
	// 			Destination: &armeventhub.Destination{
	// 				Name: to.Ptr("EventHubArchive.AzureBlockBlob"),
	// 				Properties: &armeventhub.DestinationProperties{
	// 					ArchiveNameFormat: to.Ptr("{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}"),
	// 					BlobContainer: to.Ptr("container"),
	// 					StorageAccountResourceID: to.Ptr("/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-SouthCentralUS/providers/Microsoft.ClassicStorage/storageAccounts/arjunteststorage"),
	// 				},
	// 			},
	// 			Enabled: to.Ptr(true),
	// 			Encoding: to.Ptr(armeventhub.EncodingCaptureDescriptionAvro),
	// 			IntervalInSeconds: to.Ptr[int32](120),
	// 			SizeLimitInBytes: to.Ptr[int32](10485763),
	// 		},
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-28T02:45:55.877Z"); return t}()),
	// 		MessageRetentionInDays: to.Ptr[int64](4),
	// 		PartitionCount: to.Ptr[int64](4),
	// 		PartitionIDs: []*string{
	// 			to.Ptr("0"),
	// 			to.Ptr("1"),
	// 			to.Ptr("2"),
	// 			to.Ptr("3")},
	// 			Status: to.Ptr(armeventhub.EntityStatusActive),
	// 			UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-28T02:46:05.877Z"); return t}()),
	// 		},
	// 	}
}
Output:

func (*EventHubsClient) GetAuthorizationRule

func (client *EventHubsClient) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string, options *EventHubsClientGetAuthorizationRuleOptions) (EventHubsClientGetAuthorizationRuleResponse, error)

GetAuthorizationRule - Gets an AuthorizationRule for an Event Hub by rule name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • eventHubName - The Event Hub name
  • authorizationRuleName - The authorization rule name.
  • options - EventHubsClientGetAuthorizationRuleOptions contains the optional parameters for the EventHubsClient.GetAuthorizationRule method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/EventHubs/EHEventHubAuthorizationRuleGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewEventHubsClient().GetAuthorizationRule(ctx, "ArunMonocle", "sdk-Namespace-960", "sdk-EventHub-532", "sdk-Authrules-2513", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AuthorizationRule = armeventhub.AuthorizationRule{
	// 	Name: to.Ptr("sdk-Authrules-2513"),
	// 	Type: to.Ptr("Microsoft.EventHub/Namespaces/EventHubs/AuthorizationRules"),
	// 	ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.EventHub/namespaces/sdk-Namespace-960/eventhubs/sdk-EventHub-532/authorizationRules/sdk-Authrules-2513"),
	// 	Properties: &armeventhub.AuthorizationRuleProperties{
	// 		Rights: []*armeventhub.AccessRights{
	// 			to.Ptr(armeventhub.AccessRightsListen),
	// 			to.Ptr(armeventhub.AccessRightsSend)},
	// 		},
	// 	}
}
Output:

func (*EventHubsClient) ListKeys

func (client *EventHubsClient) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string, options *EventHubsClientListKeysOptions) (EventHubsClientListKeysResponse, error)

ListKeys - Gets the ACS and SAS connection strings for the Event Hub. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • eventHubName - The Event Hub name
  • authorizationRuleName - The authorization rule name.
  • options - EventHubsClientListKeysOptions contains the optional parameters for the EventHubsClient.ListKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/EventHubs/EHEventHubAuthorizationRuleListKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewEventHubsClient().ListKeys(ctx, "ArunMonocle", "sdk-namespace-960", "sdk-EventHub-532", "sdk-Authrules-2513", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AccessKeys = armeventhub.AccessKeys{
	// 	KeyName: to.Ptr("sdk-Authrules-2513"),
	// 	PrimaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-960.servicebus.windows-int.net/;SharedAccessKeyName=sdk-Authrules-2513;SharedAccessKey=############################################;EntityPath=sdk-EventHub-532"),
	// 	PrimaryKey: to.Ptr("############################################"),
	// 	SecondaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-960.servicebus.windows-int.net/;SharedAccessKeyName=sdk-Authrules-2513;SharedAccessKey=############################################;EntityPath=sdk-EventHub-532"),
	// 	SecondaryKey: to.Ptr("############################################"),
	// }
}
Output:

func (*EventHubsClient) NewListAuthorizationRulesPager added in v0.5.0

func (client *EventHubsClient) NewListAuthorizationRulesPager(resourceGroupName string, namespaceName string, eventHubName string, options *EventHubsClientListAuthorizationRulesOptions) *runtime.Pager[EventHubsClientListAuthorizationRulesResponse]

NewListAuthorizationRulesPager - Gets the authorization rules for an Event Hub.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • eventHubName - The Event Hub name
  • options - EventHubsClientListAuthorizationRulesOptions contains the optional parameters for the EventHubsClient.NewListAuthorizationRulesPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/EventHubs/EHEventHubAuthorizationRuleListAll.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewEventHubsClient().NewListAuthorizationRulesPager("ArunMonocle", "sdk-Namespace-960", "sdk-EventHub-532", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AuthorizationRuleListResult = armeventhub.AuthorizationRuleListResult{
		// 	Value: []*armeventhub.AuthorizationRule{
		// 		{
		// 			Name: to.Ptr("sdk-Authrules-2513"),
		// 			Type: to.Ptr("Microsoft.EventHub/Namespaces/EventHubs/AuthorizationRules"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.EventHub/namespaces/sdk-Namespace-960/eventhubs/sdk-EventHub-532/authorizationRules/sdk-Authrules-2513"),
		// 			Properties: &armeventhub.AuthorizationRuleProperties{
		// 				Rights: []*armeventhub.AccessRights{
		// 					to.Ptr(armeventhub.AccessRightsListen),
		// 					to.Ptr(armeventhub.AccessRightsSend)},
		// 				},
		// 		}},
		// 	}
	}
}
Output:

func (*EventHubsClient) NewListByNamespacePager added in v0.5.0

func (client *EventHubsClient) NewListByNamespacePager(resourceGroupName string, namespaceName string, options *EventHubsClientListByNamespaceOptions) *runtime.Pager[EventHubsClientListByNamespaceResponse]

NewListByNamespacePager - Gets all the Event Hubs in a Namespace.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • options - EventHubsClientListByNamespaceOptions contains the optional parameters for the EventHubsClient.NewListByNamespacePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/EventHubs/EHEventHubListByNameSpace.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewEventHubsClient().NewListByNamespacePager("Default-NotificationHubs-AustraliaEast", "sdk-Namespace-5357", &armeventhub.EventHubsClientListByNamespaceOptions{Skip: nil,
		Top: nil,
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ListResult = armeventhub.ListResult{
		// 	Value: []*armeventhub.Eventhub{
		// 		{
		// 			Name: to.Ptr("sdk-eventhub-10"),
		// 			Type: to.Ptr("Microsoft.EventHub/Namespaces/EventHubs"),
		// 			ID: to.Ptr("/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.EventHub/namespaces/sdk-Namespace-716/eventhubs/sdk-eventhub-10"),
		// 			Properties: &armeventhub.Properties{
		// 				CaptureDescription: &armeventhub.CaptureDescription{
		// 					Destination: &armeventhub.Destination{
		// 						Name: to.Ptr("EventHubArchive.AzureBlockBlob"),
		// 						Properties: &armeventhub.DestinationProperties{
		// 							ArchiveNameFormat: to.Ptr("{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}"),
		// 							BlobContainer: to.Ptr("container"),
		// 							StorageAccountResourceID: to.Ptr("/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-SouthCentralUS/providers/Microsoft.ClassicStorage/storageAccounts/arjunteststorage"),
		// 						},
		// 					},
		// 					Enabled: to.Ptr(true),
		// 					Encoding: to.Ptr(armeventhub.EncodingCaptureDescriptionAvro),
		// 					IntervalInSeconds: to.Ptr[int32](120),
		// 					SizeLimitInBytes: to.Ptr[int32](10485763),
		// 				},
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-28T02:45:55.877Z"); return t}()),
		// 				MessageRetentionInDays: to.Ptr[int64](4),
		// 				PartitionCount: to.Ptr[int64](4),
		// 				PartitionIDs: []*string{
		// 					to.Ptr("0"),
		// 					to.Ptr("1"),
		// 					to.Ptr("2"),
		// 					to.Ptr("3")},
		// 					Status: to.Ptr(armeventhub.EntityStatusActive),
		// 					UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-28T02:46:05.877Z"); return t}()),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

func (*EventHubsClient) RegenerateKeys

func (client *EventHubsClient) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters, options *EventHubsClientRegenerateKeysOptions) (EventHubsClientRegenerateKeysResponse, error)

RegenerateKeys - Regenerates the ACS and SAS connection strings for the Event Hub. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • eventHubName - The Event Hub name
  • authorizationRuleName - The authorization rule name.
  • parameters - Parameters supplied to regenerate the AuthorizationRule Keys (PrimaryKey/SecondaryKey).
  • options - EventHubsClientRegenerateKeysOptions contains the optional parameters for the EventHubsClient.RegenerateKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/EventHubs/EHEventHubAuthorizationRuleRegenerateKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewEventHubsClient().RegenerateKeys(ctx, "ArunMonocle", "sdk-namespace-960", "sdk-EventHub-532", "sdk-Authrules-1534", armeventhub.RegenerateAccessKeyParameters{
		KeyType: to.Ptr(armeventhub.KeyTypePrimaryKey),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AccessKeys = armeventhub.AccessKeys{
	// 	KeyName: to.Ptr("sdk-Authrules-1534"),
	// 	PrimaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-9027.servicebus.windows-int.net/;SharedAccessKeyName=sdk-Authrules-1534;SharedAccessKey=#############################################;EntityPath=sdk-EventHub-1647"),
	// 	PrimaryKey: to.Ptr("#############################################"),
	// 	SecondaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-9027.servicebus.windows-int.net/;SharedAccessKeyName=sdk-Authrules-1534;SharedAccessKey=#############################################;EntityPath=sdk-EventHub-1647"),
	// 	SecondaryKey: to.Ptr("#############################################"),
	// }
}
Output:

type EventHubsClientCreateOrUpdateAuthorizationRuleOptions added in v0.3.0

type EventHubsClientCreateOrUpdateAuthorizationRuleOptions struct {
}

EventHubsClientCreateOrUpdateAuthorizationRuleOptions contains the optional parameters for the EventHubsClient.CreateOrUpdateAuthorizationRule method.

type EventHubsClientCreateOrUpdateAuthorizationRuleResponse added in v0.3.0

type EventHubsClientCreateOrUpdateAuthorizationRuleResponse struct {
	// Single item in a List or Get AuthorizationRule operation
	AuthorizationRule
}

EventHubsClientCreateOrUpdateAuthorizationRuleResponse contains the response from method EventHubsClient.CreateOrUpdateAuthorizationRule.

type EventHubsClientCreateOrUpdateOptions added in v0.3.0

type EventHubsClientCreateOrUpdateOptions struct {
}

EventHubsClientCreateOrUpdateOptions contains the optional parameters for the EventHubsClient.CreateOrUpdate method.

type EventHubsClientCreateOrUpdateResponse added in v0.3.0

type EventHubsClientCreateOrUpdateResponse struct {
	// Single item in List or Get Event Hub operation
	Eventhub
}

EventHubsClientCreateOrUpdateResponse contains the response from method EventHubsClient.CreateOrUpdate.

type EventHubsClientDeleteAuthorizationRuleOptions added in v0.3.0

type EventHubsClientDeleteAuthorizationRuleOptions struct {
}

EventHubsClientDeleteAuthorizationRuleOptions contains the optional parameters for the EventHubsClient.DeleteAuthorizationRule method.

type EventHubsClientDeleteAuthorizationRuleResponse added in v0.3.0

type EventHubsClientDeleteAuthorizationRuleResponse struct {
}

EventHubsClientDeleteAuthorizationRuleResponse contains the response from method EventHubsClient.DeleteAuthorizationRule.

type EventHubsClientDeleteOptions added in v0.3.0

type EventHubsClientDeleteOptions struct {
}

EventHubsClientDeleteOptions contains the optional parameters for the EventHubsClient.Delete method.

type EventHubsClientDeleteResponse added in v0.3.0

type EventHubsClientDeleteResponse struct {
}

EventHubsClientDeleteResponse contains the response from method EventHubsClient.Delete.

type EventHubsClientGetAuthorizationRuleOptions added in v0.3.0

type EventHubsClientGetAuthorizationRuleOptions struct {
}

EventHubsClientGetAuthorizationRuleOptions contains the optional parameters for the EventHubsClient.GetAuthorizationRule method.

type EventHubsClientGetAuthorizationRuleResponse added in v0.3.0

type EventHubsClientGetAuthorizationRuleResponse struct {
	// Single item in a List or Get AuthorizationRule operation
	AuthorizationRule
}

EventHubsClientGetAuthorizationRuleResponse contains the response from method EventHubsClient.GetAuthorizationRule.

type EventHubsClientGetOptions added in v0.3.0

type EventHubsClientGetOptions struct {
}

EventHubsClientGetOptions contains the optional parameters for the EventHubsClient.Get method.

type EventHubsClientGetResponse added in v0.3.0

type EventHubsClientGetResponse struct {
	// Single item in List or Get Event Hub operation
	Eventhub
}

EventHubsClientGetResponse contains the response from method EventHubsClient.Get.

type EventHubsClientListAuthorizationRulesOptions added in v0.3.0

type EventHubsClientListAuthorizationRulesOptions struct {
}

EventHubsClientListAuthorizationRulesOptions contains the optional parameters for the EventHubsClient.NewListAuthorizationRulesPager method.

type EventHubsClientListAuthorizationRulesResponse added in v0.3.0

type EventHubsClientListAuthorizationRulesResponse struct {
	// The response from the List namespace operation.
	AuthorizationRuleListResult
}

EventHubsClientListAuthorizationRulesResponse contains the response from method EventHubsClient.NewListAuthorizationRulesPager.

type EventHubsClientListByNamespaceOptions added in v0.3.0

type EventHubsClientListByNamespaceOptions struct {
	// Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element,
	// the value of the nextLink element will include a skip parameter that specifies
	// a starting point to use for subsequent calls.
	Skip *int32

	// May be used to limit the number of results to the most recent N usageDetails.
	Top *int32
}

EventHubsClientListByNamespaceOptions contains the optional parameters for the EventHubsClient.NewListByNamespacePager method.

type EventHubsClientListByNamespaceResponse added in v0.3.0

type EventHubsClientListByNamespaceResponse struct {
	// The result of the List EventHubs operation.
	ListResult
}

EventHubsClientListByNamespaceResponse contains the response from method EventHubsClient.NewListByNamespacePager.

type EventHubsClientListKeysOptions added in v0.3.0

type EventHubsClientListKeysOptions struct {
}

EventHubsClientListKeysOptions contains the optional parameters for the EventHubsClient.ListKeys method.

type EventHubsClientListKeysResponse added in v0.3.0

type EventHubsClientListKeysResponse struct {
	// Namespace/EventHub Connection String
	AccessKeys
}

EventHubsClientListKeysResponse contains the response from method EventHubsClient.ListKeys.

type EventHubsClientRegenerateKeysOptions added in v0.3.0

type EventHubsClientRegenerateKeysOptions struct {
}

EventHubsClientRegenerateKeysOptions contains the optional parameters for the EventHubsClient.RegenerateKeys method.

type EventHubsClientRegenerateKeysResponse added in v0.3.0

type EventHubsClientRegenerateKeysResponse struct {
	// Namespace/EventHub Connection String
	AccessKeys
}

EventHubsClientRegenerateKeysResponse contains the response from method EventHubsClient.RegenerateKeys.

type Eventhub

type Eventhub struct {
	// Properties supplied to the Create Or Update Event Hub operation.
	Properties *Properties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The geo-location where the resource lives
	Location *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string
}

Eventhub - Single item in List or Get Event Hub operation

func (Eventhub) MarshalJSON

func (e Eventhub) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Eventhub.

func (*Eventhub) UnmarshalJSON added in v1.1.0

func (e *Eventhub) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Eventhub.

type Identity

type Identity struct {
	// Type of managed service identity.
	Type *ManagedServiceIdentityType

	// Properties for User Assigned Identities
	UserAssignedIdentities map[string]*UserAssignedIdentity

	// READ-ONLY; ObjectId from the KeyVault
	PrincipalID *string

	// READ-ONLY; TenantId from the KeyVault
	TenantID *string
}

Identity - Properties to configure Identity for Bring your Own Keys

func (Identity) MarshalJSON

func (i Identity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Identity.

func (*Identity) UnmarshalJSON added in v1.1.0

func (i *Identity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Identity.

type KeyType

type KeyType string

KeyType - The access key to regenerate.

const (
	KeyTypePrimaryKey   KeyType = "PrimaryKey"
	KeyTypeSecondaryKey KeyType = "SecondaryKey"
)

func PossibleKeyTypeValues

func PossibleKeyTypeValues() []KeyType

PossibleKeyTypeValues returns the possible values for the KeyType const type.

type KeyVaultProperties

type KeyVaultProperties struct {
	Identity *UserAssignedIdentityProperties

	// Name of the Key from KeyVault
	KeyName *string

	// Uri of KeyVault
	KeyVaultURI *string

	// Key Version
	KeyVersion *string
}

KeyVaultProperties - Properties to configure keyVault Properties

func (KeyVaultProperties) MarshalJSON added in v1.1.0

func (k KeyVaultProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type KeyVaultProperties.

func (*KeyVaultProperties) UnmarshalJSON added in v1.1.0

func (k *KeyVaultProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultProperties.

type ListResult added in v0.3.0

type ListResult struct {
	// Link to the next set of results. Not empty if Value contains incomplete list of EventHubs.
	NextLink *string

	// Result of the List EventHubs operation.
	Value []*Eventhub
}

ListResult - The result of the List EventHubs operation.

func (ListResult) MarshalJSON added in v0.3.0

func (l ListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ListResult.

func (*ListResult) UnmarshalJSON added in v1.1.0

func (l *ListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ListResult.

type ManagedServiceIdentityType

type ManagedServiceIdentityType string

ManagedServiceIdentityType - Type of managed service identity.

const (
	ManagedServiceIdentityTypeNone                       ManagedServiceIdentityType = "None"
	ManagedServiceIdentityTypeSystemAssigned             ManagedServiceIdentityType = "SystemAssigned"
	ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned, UserAssigned"
	ManagedServiceIdentityTypeUserAssigned               ManagedServiceIdentityType = "UserAssigned"
)

func PossibleManagedServiceIdentityTypeValues

func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType

PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type.

type NWRuleSetIPRules

type NWRuleSetIPRules struct {
	// The IP Filter Action
	Action *NetworkRuleIPAction

	// IP Mask
	IPMask *string
}

NWRuleSetIPRules - The response from the List namespace operation.

func (NWRuleSetIPRules) MarshalJSON added in v1.1.0

func (n NWRuleSetIPRules) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NWRuleSetIPRules.

func (*NWRuleSetIPRules) UnmarshalJSON added in v1.1.0

func (n *NWRuleSetIPRules) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NWRuleSetIPRules.

type NWRuleSetVirtualNetworkRules

type NWRuleSetVirtualNetworkRules struct {
	// Value that indicates whether to ignore missing Vnet Service Endpoint
	IgnoreMissingVnetServiceEndpoint *bool

	// Subnet properties
	Subnet *Subnet
}

NWRuleSetVirtualNetworkRules - The response from the List namespace operation.

func (NWRuleSetVirtualNetworkRules) MarshalJSON added in v1.1.0

func (n NWRuleSetVirtualNetworkRules) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NWRuleSetVirtualNetworkRules.

func (*NWRuleSetVirtualNetworkRules) UnmarshalJSON added in v1.1.0

func (n *NWRuleSetVirtualNetworkRules) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NWRuleSetVirtualNetworkRules.

type NamespacesClient

type NamespacesClient struct {
	// contains filtered or unexported fields
}

NamespacesClient contains the methods for the Namespaces group. Don't use this type directly, use NewNamespacesClient() instead.

func NewNamespacesClient

func NewNamespacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NamespacesClient, error)

NewNamespacesClient creates a new instance of NamespacesClient with the specified values.

  • subscriptionID - Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*NamespacesClient) BeginCreateOrUpdate

func (client *NamespacesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, parameters EHNamespace, options *NamespacesClientBeginCreateOrUpdateOptions) (*runtime.Poller[NamespacesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • parameters - Parameters for creating a namespace resource.
  • options - NamespacesClientBeginCreateOrUpdateOptions contains the optional parameters for the NamespacesClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/EHNameSpaceCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewNamespacesClient().BeginCreateOrUpdate(ctx, "ResurceGroupSample", "NamespaceSample", armeventhub.EHNamespace{
		Location: to.Ptr("East US"),
		Identity: &armeventhub.Identity{
			Type: to.Ptr(armeventhub.ManagedServiceIdentityTypeSystemAssignedUserAssigned),
			UserAssignedIdentities: map[string]*armeventhub.UserAssignedIdentity{
				"/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud1": {},
				"/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud2": {},
			},
		},
		Properties: &armeventhub.EHNamespaceProperties{
			ClusterArmID: to.Ptr("/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.EventHub/clusters/enc-test"),
			Encryption: &armeventhub.Encryption{
				KeySource: to.Ptr("Microsoft.KeyVault"),
				KeyVaultProperties: []*armeventhub.KeyVaultProperties{
					{
						Identity: &armeventhub.UserAssignedIdentityProperties{
							UserAssignedIdentity: to.Ptr("/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud1"),
						},
						KeyName:     to.Ptr("Samplekey"),
						KeyVaultURI: to.Ptr("https://aprao-keyvault-user.vault-int.azure-int.net/"),
					}},
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.EHNamespace = armeventhub.EHNamespace{
	// 	Name: to.Ptr("NamespaceSample"),
	// 	Type: to.Ptr("Microsoft.EventHub/Namespaces"),
	// 	ID: to.Ptr("/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.EventHub/namespaces/NamespaceSample"),
	// 	Location: to.Ptr("East US"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Identity: &armeventhub.Identity{
	// 		Type: to.Ptr(armeventhub.ManagedServiceIdentityTypeSystemAssignedUserAssigned),
	// 		PrincipalID: to.Ptr("PrincipalIdGUID"),
	// 		TenantID: to.Ptr("TenantIdGUID"),
	// 		UserAssignedIdentities: map[string]*armeventhub.UserAssignedIdentity{
	// 			"/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud1": &armeventhub.UserAssignedIdentity{
	// 				ClientID: to.Ptr("ClientIdGUID"),
	// 				PrincipalID: to.Ptr("PrincipalIdGUID"),
	// 			},
	// 			"/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud2": &armeventhub.UserAssignedIdentity{
	// 				ClientID: to.Ptr("6a35400f-6ccb-4817-8f1a-ce19ea4523bc"),
	// 				PrincipalID: to.Ptr("ce2d5953-5c15-40ca-9d51-cc3f4a63b0f5"),
	// 			},
	// 		},
	// 	},
	// 	Properties: &armeventhub.EHNamespaceProperties{
	// 		ClusterArmID: to.Ptr("/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.EventHub/clusters/enc-test"),
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-02-16T22:36:06.107Z"); return t}()),
	// 		DisableLocalAuth: to.Ptr(false),
	// 		Encryption: &armeventhub.Encryption{
	// 			KeySource: to.Ptr("Microsoft.KeyVault"),
	// 			KeyVaultProperties: []*armeventhub.KeyVaultProperties{
	// 				{
	// 					Identity: &armeventhub.UserAssignedIdentityProperties{
	// 						UserAssignedIdentity: to.Ptr("/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud1"),
	// 					},
	// 					KeyName: to.Ptr("Samplekey"),
	// 					KeyVaultURI: to.Ptr("https://sample-keyvault-user.vault-int.azure-int.net"),
	// 					KeyVersion: to.Ptr(""),
	// 			}},
	// 			RequireInfrastructureEncryption: to.Ptr(false),
	// 		},
	// 		IsAutoInflateEnabled: to.Ptr(false),
	// 		KafkaEnabled: to.Ptr(false),
	// 		MaximumThroughputUnits: to.Ptr[int32](0),
	// 		MetricID: to.Ptr("MetricGUID:NamespaceSample"),
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		ServiceBusEndpoint: to.Ptr("https://NamespaceSample.servicebus.windows-int.net:443/"),
	// 		UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-02-16T22:37:42.290Z"); return t}()),
	// 		ZoneRedundant: to.Ptr(false),
	// 	},
	// 	SKU: &armeventhub.SKU{
	// 		Name: to.Ptr(armeventhub.SKUNameStandard),
	// 		Capacity: to.Ptr[int32](1),
	// 		Tier: to.Ptr(armeventhub.SKUTierStandard),
	// 	},
	// }
}
Output:

func (*NamespacesClient) BeginDelete

func (client *NamespacesClient) BeginDelete(ctx context.Context, resourceGroupName string, namespaceName string, options *NamespacesClientBeginDeleteOptions) (*runtime.Poller[NamespacesClientDeleteResponse], error)

BeginDelete - Deletes an existing namespace. This operation also removes all associated resources under the namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • options - NamespacesClientBeginDeleteOptions contains the optional parameters for the NamespacesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/EHNameSpaceDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewNamespacesClient().BeginDelete(ctx, "ResurceGroupSample", "NamespaceSample", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*NamespacesClient) CheckNameAvailability

CheckNameAvailability - Check the give Namespace name availability. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • parameters - Parameters to check availability of the given Namespace name
  • options - NamespacesClientCheckNameAvailabilityOptions contains the optional parameters for the NamespacesClient.CheckNameAvailability method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/EHNameSpaceCheckNameAvailability.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().CheckNameAvailability(ctx, armeventhub.CheckNameAvailabilityParameter{
		Name: to.Ptr("sdk-Namespace-8458"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CheckNameAvailabilityResult = armeventhub.CheckNameAvailabilityResult{
	// 	Message: to.Ptr(""),
	// 	NameAvailable: to.Ptr(true),
	// 	Reason: to.Ptr(armeventhub.UnavailableReasonNone),
	// }
}
Output:

func (*NamespacesClient) CreateOrUpdateAuthorizationRule

func (client *NamespacesClient) CreateOrUpdateAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, parameters AuthorizationRule, options *NamespacesClientCreateOrUpdateAuthorizationRuleOptions) (NamespacesClientCreateOrUpdateAuthorizationRuleResponse, error)

CreateOrUpdateAuthorizationRule - Creates or updates an AuthorizationRule for a Namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • authorizationRuleName - The authorization rule name.
  • parameters - The shared access AuthorizationRule.
  • options - NamespacesClientCreateOrUpdateAuthorizationRuleOptions contains the optional parameters for the NamespacesClient.CreateOrUpdateAuthorizationRule method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/EHNameSpaceAuthorizationRuleCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().CreateOrUpdateAuthorizationRule(ctx, "ArunMonocle", "sdk-Namespace-2702", "sdk-Authrules-1746", armeventhub.AuthorizationRule{
		Properties: &armeventhub.AuthorizationRuleProperties{
			Rights: []*armeventhub.AccessRights{
				to.Ptr(armeventhub.AccessRightsListen),
				to.Ptr(armeventhub.AccessRightsSend)},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AuthorizationRule = armeventhub.AuthorizationRule{
	// 	Name: to.Ptr("sdk-Authrules-1746"),
	// 	Type: to.Ptr("Microsoft.EventHub/Namespaces/AuthorizationRules"),
	// 	ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.EventHub/namespaces/sdk-Namespace-2702/AuthorizationRules/sdk-Authrules-1746"),
	// 	Properties: &armeventhub.AuthorizationRuleProperties{
	// 		Rights: []*armeventhub.AccessRights{
	// 			to.Ptr(armeventhub.AccessRightsListen),
	// 			to.Ptr(armeventhub.AccessRightsSend)},
	// 		},
	// 	}
}
Output:

func (*NamespacesClient) CreateOrUpdateNetworkRuleSet

func (client *NamespacesClient) CreateOrUpdateNetworkRuleSet(ctx context.Context, resourceGroupName string, namespaceName string, parameters NetworkRuleSet, options *NamespacesClientCreateOrUpdateNetworkRuleSetOptions) (NamespacesClientCreateOrUpdateNetworkRuleSetResponse, error)

CreateOrUpdateNetworkRuleSet - Create or update NetworkRuleSet for a Namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • parameters - The Namespace IpFilterRule.
  • options - NamespacesClientCreateOrUpdateNetworkRuleSetOptions contains the optional parameters for the NamespacesClient.CreateOrUpdateNetworkRuleSet method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/VirtualNetworkRule/EHNetworkRuleSetCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().CreateOrUpdateNetworkRuleSet(ctx, "ResourceGroup", "sdk-Namespace-6019", armeventhub.NetworkRuleSet{
		Properties: &armeventhub.NetworkRuleSetProperties{
			DefaultAction: to.Ptr(armeventhub.DefaultActionDeny),
			IPRules: []*armeventhub.NWRuleSetIPRules{
				{
					Action: to.Ptr(armeventhub.NetworkRuleIPActionAllow),
					IPMask: to.Ptr("1.1.1.1"),
				},
				{
					Action: to.Ptr(armeventhub.NetworkRuleIPActionAllow),
					IPMask: to.Ptr("1.1.1.2"),
				},
				{
					Action: to.Ptr(armeventhub.NetworkRuleIPActionAllow),
					IPMask: to.Ptr("1.1.1.3"),
				},
				{
					Action: to.Ptr(armeventhub.NetworkRuleIPActionAllow),
					IPMask: to.Ptr("1.1.1.4"),
				},
				{
					Action: to.Ptr(armeventhub.NetworkRuleIPActionAllow),
					IPMask: to.Ptr("1.1.1.5"),
				}},
			VirtualNetworkRules: []*armeventhub.NWRuleSetVirtualNetworkRules{
				{
					IgnoreMissingVnetServiceEndpoint: to.Ptr(true),
					Subnet: &armeventhub.Subnet{
						ID: to.Ptr("/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2"),
					},
				},
				{
					IgnoreMissingVnetServiceEndpoint: to.Ptr(false),
					Subnet: &armeventhub.Subnet{
						ID: to.Ptr("/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3"),
					},
				},
				{
					IgnoreMissingVnetServiceEndpoint: to.Ptr(false),
					Subnet: &armeventhub.Subnet{
						ID: to.Ptr("/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6"),
					},
				}},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.NetworkRuleSet = armeventhub.NetworkRuleSet{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.EventHub/Namespaces/NetworkRuleSet"),
	// 	ID: to.Ptr("/subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourceGroups/resourcegroupid/providers/Microsoft.EventHub/namespaces/sdk-Namespace-9659/networkruleset/default"),
	// 	Properties: &armeventhub.NetworkRuleSetProperties{
	// 		DefaultAction: to.Ptr(armeventhub.DefaultActionDeny),
	// 		IPRules: []*armeventhub.NWRuleSetIPRules{
	// 			{
	// 				Action: to.Ptr(armeventhub.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.1"),
	// 			},
	// 			{
	// 				Action: to.Ptr(armeventhub.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.2"),
	// 			},
	// 			{
	// 				Action: to.Ptr(armeventhub.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.3"),
	// 			},
	// 			{
	// 				Action: to.Ptr(armeventhub.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.4"),
	// 			},
	// 			{
	// 				Action: to.Ptr(armeventhub.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.5"),
	// 		}},
	// 		PublicNetworkAccess: to.Ptr(armeventhub.PublicNetworkAccessFlagEnabled),
	// 		VirtualNetworkRules: []*armeventhub.NWRuleSetVirtualNetworkRules{
	// 			{
	// 				IgnoreMissingVnetServiceEndpoint: to.Ptr(true),
	// 				Subnet: &armeventhub.Subnet{
	// 					ID: to.Ptr("/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2"),
	// 				},
	// 			},
	// 			{
	// 				IgnoreMissingVnetServiceEndpoint: to.Ptr(false),
	// 				Subnet: &armeventhub.Subnet{
	// 					ID: to.Ptr("/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3"),
	// 				},
	// 			},
	// 			{
	// 				IgnoreMissingVnetServiceEndpoint: to.Ptr(false),
	// 				Subnet: &armeventhub.Subnet{
	// 					ID: to.Ptr("/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6"),
	// 				},
	// 		}},
	// 	},
	// }
}
Output:

func (*NamespacesClient) DeleteAuthorizationRule

func (client *NamespacesClient) DeleteAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, options *NamespacesClientDeleteAuthorizationRuleOptions) (NamespacesClientDeleteAuthorizationRuleResponse, error)

DeleteAuthorizationRule - Deletes an AuthorizationRule for a Namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • authorizationRuleName - The authorization rule name.
  • options - NamespacesClientDeleteAuthorizationRuleOptions contains the optional parameters for the NamespacesClient.DeleteAuthorizationRule method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/EHNameSpaceAuthorizationRuleDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewNamespacesClient().DeleteAuthorizationRule(ctx, "ArunMonocle", "sdk-Namespace-8980", "sdk-Authrules-8929", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*NamespacesClient) Get

func (client *NamespacesClient) Get(ctx context.Context, resourceGroupName string, namespaceName string, options *NamespacesClientGetOptions) (NamespacesClientGetResponse, error)

Get - Gets the description of the specified namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • options - NamespacesClientGetOptions contains the optional parameters for the NamespacesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/EHNameSpaceGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().Get(ctx, "ResurceGroupSample", "NamespaceSample", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.EHNamespace = armeventhub.EHNamespace{
	// 	Name: to.Ptr("NamespaceSample"),
	// 	Type: to.Ptr("Microsoft.EventHub/Namespaces"),
	// 	ID: to.Ptr("/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.EventHub/namespaces/NamespaceSample"),
	// 	Location: to.Ptr("East US"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Identity: &armeventhub.Identity{
	// 		Type: to.Ptr(armeventhub.ManagedServiceIdentityTypeSystemAssignedUserAssigned),
	// 		PrincipalID: to.Ptr("PrincipalIdGUID"),
	// 		TenantID: to.Ptr("TenantIdGUID"),
	// 		UserAssignedIdentities: map[string]*armeventhub.UserAssignedIdentity{
	// 			"/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud1": &armeventhub.UserAssignedIdentity{
	// 				ClientID: to.Ptr("ClientIdGUID"),
	// 				PrincipalID: to.Ptr("PrincipalIdGUID"),
	// 			},
	// 			"/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud2": &armeventhub.UserAssignedIdentity{
	// 				ClientID: to.Ptr("6a35400f-6ccb-4817-8f1a-ce19ea4523bc"),
	// 				PrincipalID: to.Ptr("ce2d5953-5c15-40ca-9d51-cc3f4a63b0f5"),
	// 			},
	// 		},
	// 	},
	// 	Properties: &armeventhub.EHNamespaceProperties{
	// 		ClusterArmID: to.Ptr("/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.EventHub/clusters/enc-test"),
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-30T00:28:38.963Z"); return t}()),
	// 		DisableLocalAuth: to.Ptr(false),
	// 		Encryption: &armeventhub.Encryption{
	// 			KeySource: to.Ptr("Microsoft.KeyVault"),
	// 			KeyVaultProperties: []*armeventhub.KeyVaultProperties{
	// 				{
	// 					Identity: &armeventhub.UserAssignedIdentityProperties{
	// 						UserAssignedIdentity: to.Ptr("/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud1"),
	// 					},
	// 					KeyName: to.Ptr("Samplekey"),
	// 					KeyVaultURI: to.Ptr("https://sample-keyvault-user.vault-int.azure-int.net"),
	// 					KeyVersion: to.Ptr(""),
	// 			}},
	// 			RequireInfrastructureEncryption: to.Ptr(false),
	// 		},
	// 		IsAutoInflateEnabled: to.Ptr(false),
	// 		MaximumThroughputUnits: to.Ptr[int32](0),
	// 		MetricID: to.Ptr("MetricGUID:NamespaceSample"),
	// 		PrivateEndpointConnections: []*armeventhub.PrivateEndpointConnection{
	// 			{
	// 				Name: to.Ptr("privateEndpointConnectionName"),
	// 				Type: to.Ptr("Microsoft.EventHub/Namespaces/PrivateEndpointConnections"),
	// 				ID: to.Ptr("/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.EventHub/namespaces/NamespaceSample/privateEndpointConnections/privateEndpointConnectionName"),
	// 				Properties: &armeventhub.PrivateEndpointConnectionProperties{
	// 					PrivateEndpoint: &armeventhub.PrivateEndpoint{
	// 						ID: to.Ptr("/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.Network/privateEndpoints/NamespaceSample"),
	// 					},
	// 					PrivateLinkServiceConnectionState: &armeventhub.ConnectionState{
	// 						Description: to.Ptr("Auto-Approved"),
	// 						Status: to.Ptr(armeventhub.PrivateLinkConnectionStatusApproved),
	// 					},
	// 					ProvisioningState: to.Ptr(armeventhub.EndPointProvisioningStateSucceeded),
	// 				},
	// 		}},
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		ServiceBusEndpoint: to.Ptr("https://NamespaceSample.servicebus.windows-int.net:443"),
	// 		UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-30T00:30:55.143Z"); return t}()),
	// 		ZoneRedundant: to.Ptr(false),
	// 	},
	// 	SKU: &armeventhub.SKU{
	// 		Name: to.Ptr(armeventhub.SKUNameStandard),
	// 		Capacity: to.Ptr[int32](1),
	// 		Tier: to.Ptr(armeventhub.SKUTierStandard),
	// 	},
	// }
}
Output:

func (*NamespacesClient) GetAuthorizationRule

func (client *NamespacesClient) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, options *NamespacesClientGetAuthorizationRuleOptions) (NamespacesClientGetAuthorizationRuleResponse, error)

GetAuthorizationRule - Gets an AuthorizationRule for a Namespace by rule name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • authorizationRuleName - The authorization rule name.
  • options - NamespacesClientGetAuthorizationRuleOptions contains the optional parameters for the NamespacesClient.GetAuthorizationRule method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/EHNameSpaceAuthorizationRuleGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().GetAuthorizationRule(ctx, "ArunMonocle", "sdk-Namespace-2702", "sdk-Authrules-1746", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AuthorizationRule = armeventhub.AuthorizationRule{
	// 	Name: to.Ptr("sdk-Authrules-1746"),
	// 	Type: to.Ptr("Microsoft.EventHub/Namespaces/AuthorizationRules"),
	// 	ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.EventHub/namespaces/sdk-Namespace-2702/AuthorizationRules/sdk-Authrules-1746"),
	// 	Properties: &armeventhub.AuthorizationRuleProperties{
	// 		Rights: []*armeventhub.AccessRights{
	// 			to.Ptr(armeventhub.AccessRightsListen),
	// 			to.Ptr(armeventhub.AccessRightsSend)},
	// 		},
	// 	}
}
Output:

func (*NamespacesClient) GetNetworkRuleSet

func (client *NamespacesClient) GetNetworkRuleSet(ctx context.Context, resourceGroupName string, namespaceName string, options *NamespacesClientGetNetworkRuleSetOptions) (NamespacesClientGetNetworkRuleSetResponse, error)

GetNetworkRuleSet - Gets NetworkRuleSet for a Namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • options - NamespacesClientGetNetworkRuleSetOptions contains the optional parameters for the NamespacesClient.GetNetworkRuleSet method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/VirtualNetworkRule/EHNetworkRuleSetGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().GetNetworkRuleSet(ctx, "ResourceGroup", "sdk-Namespace-6019", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.NetworkRuleSet = armeventhub.NetworkRuleSet{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.EventHub/Namespaces/NetworkRuleSet"),
	// 	ID: to.Ptr("/subscriptions/subscriptionid/resourceGroups/resourcegroupid/providers/Microsoft.EventHub/namespaces/sdk-Namespace-9659/networkruleset/default"),
	// 	Properties: &armeventhub.NetworkRuleSetProperties{
	// 		DefaultAction: to.Ptr(armeventhub.DefaultActionAllow),
	// 		IPRules: []*armeventhub.NWRuleSetIPRules{
	// 			{
	// 				Action: to.Ptr(armeventhub.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.1"),
	// 			},
	// 			{
	// 				Action: to.Ptr(armeventhub.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.2"),
	// 			},
	// 			{
	// 				Action: to.Ptr(armeventhub.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.3"),
	// 			},
	// 			{
	// 				Action: to.Ptr(armeventhub.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.4"),
	// 			},
	// 			{
	// 				Action: to.Ptr(armeventhub.NetworkRuleIPActionAllow),
	// 				IPMask: to.Ptr("1.1.1.5"),
	// 		}},
	// 		PublicNetworkAccess: to.Ptr(armeventhub.PublicNetworkAccessFlagEnabled),
	// 		VirtualNetworkRules: []*armeventhub.NWRuleSetVirtualNetworkRules{
	// 			{
	// 				IgnoreMissingVnetServiceEndpoint: to.Ptr(true),
	// 				Subnet: &armeventhub.Subnet{
	// 					ID: to.Ptr("/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2"),
	// 				},
	// 			},
	// 			{
	// 				IgnoreMissingVnetServiceEndpoint: to.Ptr(false),
	// 				Subnet: &armeventhub.Subnet{
	// 					ID: to.Ptr("/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3"),
	// 				},
	// 			},
	// 			{
	// 				IgnoreMissingVnetServiceEndpoint: to.Ptr(false),
	// 				Subnet: &armeventhub.Subnet{
	// 					ID: to.Ptr("/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6"),
	// 				},
	// 		}},
	// 	},
	// }
}
Output:

func (*NamespacesClient) ListKeys

func (client *NamespacesClient) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, options *NamespacesClientListKeysOptions) (NamespacesClientListKeysResponse, error)

ListKeys - Gets the primary and secondary connection strings for the Namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • authorizationRuleName - The authorization rule name.
  • options - NamespacesClientListKeysOptions contains the optional parameters for the NamespacesClient.ListKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/EHNameSpaceAuthorizationRuleListKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().ListKeys(ctx, "ArunMonocle", "sdk-Namespace-2702", "sdk-Authrules-1746", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AccessKeys = armeventhub.AccessKeys{
	// 	KeyName: to.Ptr("sdk-Authrules-1746"),
	// 	PrimaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-2702.servicebus.windows-int.net/;SharedAccessKeyName=sdk-Authrules-1746;SharedAccessKey=############################################"),
	// 	PrimaryKey: to.Ptr("############################################"),
	// 	SecondaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-2702.servicebus.windows-int.net/;SharedAccessKeyName=sdk-Authrules-1746;SharedAccessKey=############################################"),
	// 	SecondaryKey: to.Ptr("############################################"),
	// }
}
Output:

func (*NamespacesClient) ListNetworkRuleSet added in v0.2.0

func (client *NamespacesClient) ListNetworkRuleSet(ctx context.Context, resourceGroupName string, namespaceName string, options *NamespacesClientListNetworkRuleSetOptions) (NamespacesClientListNetworkRuleSetResponse, error)

ListNetworkRuleSet - Gets NetworkRuleSet for a Namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • options - NamespacesClientListNetworkRuleSetOptions contains the optional parameters for the NamespacesClient.ListNetworkRuleSet method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/VirtualNetworkRule/EHNetworkRuleSetList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().ListNetworkRuleSet(ctx, "ResourceGroup", "sdk-Namespace-6019", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.NetworkRuleSetListResult = armeventhub.NetworkRuleSetListResult{
	// 	Value: []*armeventhub.NetworkRuleSet{
	// 		{
	// 			Name: to.Ptr("default"),
	// 			Type: to.Ptr("Microsoft.EventHub/Namespaces/NetworkRuleSet"),
	// 			ID: to.Ptr("/subscriptions/subscriptionid/resourceGroups/resourcegroupid/providers/Microsoft.EventHub/namespaces/sdk-Namespace-9659/networkruleset/default"),
	// 			Properties: &armeventhub.NetworkRuleSetProperties{
	// 				DefaultAction: to.Ptr(armeventhub.DefaultActionDeny),
	// 				IPRules: []*armeventhub.NWRuleSetIPRules{
	// 					{
	// 						Action: to.Ptr(armeventhub.NetworkRuleIPActionAllow),
	// 						IPMask: to.Ptr("1.1.1.1"),
	// 					},
	// 					{
	// 						Action: to.Ptr(armeventhub.NetworkRuleIPActionAllow),
	// 						IPMask: to.Ptr("1.1.1.2"),
	// 					},
	// 					{
	// 						Action: to.Ptr(armeventhub.NetworkRuleIPActionAllow),
	// 						IPMask: to.Ptr("1.1.1.3"),
	// 					},
	// 					{
	// 						Action: to.Ptr(armeventhub.NetworkRuleIPActionAllow),
	// 						IPMask: to.Ptr("1.1.1.4"),
	// 					},
	// 					{
	// 						Action: to.Ptr(armeventhub.NetworkRuleIPActionAllow),
	// 						IPMask: to.Ptr("1.1.1.5"),
	// 				}},
	// 				VirtualNetworkRules: []*armeventhub.NWRuleSetVirtualNetworkRules{
	// 					{
	// 						IgnoreMissingVnetServiceEndpoint: to.Ptr(true),
	// 						Subnet: &armeventhub.Subnet{
	// 							ID: to.Ptr("/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet2"),
	// 						},
	// 					},
	// 					{
	// 						IgnoreMissingVnetServiceEndpoint: to.Ptr(false),
	// 						Subnet: &armeventhub.Subnet{
	// 							ID: to.Ptr("/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet3"),
	// 						},
	// 					},
	// 					{
	// 						IgnoreMissingVnetServiceEndpoint: to.Ptr(false),
	// 						Subnet: &armeventhub.Subnet{
	// 							ID: to.Ptr("/subscriptions/subscriptionid/resourcegroups/resourcegroupid/providers/Microsoft.Network/virtualNetworks/myvn/subnets/subnet6"),
	// 						},
	// 				}},
	// 			},
	// 	}},
	// }
}
Output:

func (*NamespacesClient) NewListAuthorizationRulesPager added in v0.5.0

func (client *NamespacesClient) NewListAuthorizationRulesPager(resourceGroupName string, namespaceName string, options *NamespacesClientListAuthorizationRulesOptions) *runtime.Pager[NamespacesClientListAuthorizationRulesResponse]

NewListAuthorizationRulesPager - Gets a list of authorization rules for a Namespace.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • options - NamespacesClientListAuthorizationRulesOptions contains the optional parameters for the NamespacesClient.NewListAuthorizationRulesPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/EHNameSpaceAuthorizationRuleListAll.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewNamespacesClient().NewListAuthorizationRulesPager("ArunMonocle", "sdk-Namespace-2702", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AuthorizationRuleListResult = armeventhub.AuthorizationRuleListResult{
		// 	Value: []*armeventhub.AuthorizationRule{
		// 		{
		// 			Name: to.Ptr("RootManageSharedAccessKey"),
		// 			Type: to.Ptr("Microsoft.EventHub/Namespaces/AuthorizationRules"),
		// 			ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.EventHub/namespaces/sdk-Namespace-2702/AuthorizationRules?api-version=2017-04-01/RootManageSharedAccessKey"),
		// 			Properties: &armeventhub.AuthorizationRuleProperties{
		// 				Rights: []*armeventhub.AccessRights{
		// 					to.Ptr(armeventhub.AccessRightsListen),
		// 					to.Ptr(armeventhub.AccessRightsManage),
		// 					to.Ptr(armeventhub.AccessRightsSend)},
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("sdk-Authrules-1746"),
		// 				Type: to.Ptr("Microsoft.EventHub/Namespaces/AuthorizationRules"),
		// 				ID: to.Ptr("/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.EventHub/namespaces/sdk-Namespace-2702/AuthorizationRules?api-version=2017-04-01/sdk-Authrules-1746"),
		// 				Properties: &armeventhub.AuthorizationRuleProperties{
		// 					Rights: []*armeventhub.AccessRights{
		// 						to.Ptr(armeventhub.AccessRightsListen),
		// 						to.Ptr(armeventhub.AccessRightsSend)},
		// 					},
		// 			}},
		// 		}
	}
}
Output:

func (*NamespacesClient) NewListByResourceGroupPager added in v0.5.0

func (client *NamespacesClient) NewListByResourceGroupPager(resourceGroupName string, options *NamespacesClientListByResourceGroupOptions) *runtime.Pager[NamespacesClientListByResourceGroupResponse]

NewListByResourceGroupPager - Lists the available Namespaces within a resource group.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • options - NamespacesClientListByResourceGroupOptions contains the optional parameters for the NamespacesClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/EHNameSpaceListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewNamespacesClient().NewListByResourceGroupPager("ResurceGroupSample", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.EHNamespaceListResult = armeventhub.EHNamespaceListResult{
		// 	Value: []*armeventhub.EHNamespace{
		// 		{
		// 			Name: to.Ptr("NamespaceSample"),
		// 			Type: to.Ptr("Microsoft.EventHub/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.EventHub/namespaces/NamespaceSample"),
		// 			Location: to.Ptr("East US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Identity: &armeventhub.Identity{
		// 				Type: to.Ptr(armeventhub.ManagedServiceIdentityTypeSystemAssignedUserAssigned),
		// 				PrincipalID: to.Ptr("PrincipalIdGUID"),
		// 				TenantID: to.Ptr("TenantIdGUID"),
		// 				UserAssignedIdentities: map[string]*armeventhub.UserAssignedIdentity{
		// 					"/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud1": &armeventhub.UserAssignedIdentity{
		// 						ClientID: to.Ptr("ClientIdGUID"),
		// 						PrincipalID: to.Ptr("PrincipalIdGUID"),
		// 					},
		// 					"/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud2": &armeventhub.UserAssignedIdentity{
		// 						ClientID: to.Ptr("6a35400f-6ccb-4817-8f1a-ce19ea4523bc"),
		// 						PrincipalID: to.Ptr("ce2d5953-5c15-40ca-9d51-cc3f4a63b0f5"),
		// 					},
		// 				},
		// 			},
		// 			Properties: &armeventhub.EHNamespaceProperties{
		// 				ClusterArmID: to.Ptr("/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.EventHub/clusters/enc-test"),
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-30T00:28:38.963Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				Encryption: &armeventhub.Encryption{
		// 					KeySource: to.Ptr("Microsoft.KeyVault"),
		// 					KeyVaultProperties: []*armeventhub.KeyVaultProperties{
		// 						{
		// 							Identity: &armeventhub.UserAssignedIdentityProperties{
		// 								UserAssignedIdentity: to.Ptr("/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud1"),
		// 							},
		// 							KeyName: to.Ptr("Samplekey"),
		// 							KeyVaultURI: to.Ptr("https://sample-keyvault-user.vault-int.azure-int.net"),
		// 							KeyVersion: to.Ptr(""),
		// 					}},
		// 					RequireInfrastructureEncryption: to.Ptr(false),
		// 				},
		// 				IsAutoInflateEnabled: to.Ptr(false),
		// 				MaximumThroughputUnits: to.Ptr[int32](0),
		// 				MetricID: to.Ptr("MetricGUID:NamespaceSample"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NamespaceSample.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-30T00:30:55.143Z"); return t}()),
		// 				ZoneRedundant: to.Ptr(false),
		// 			},
		// 			SKU: &armeventhub.SKU{
		// 				Name: to.Ptr(armeventhub.SKUNameStandard),
		// 				Capacity: to.Ptr[int32](1),
		// 				Tier: to.Ptr(armeventhub.SKUTierStandard),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*NamespacesClient) NewListPager added in v0.5.0

NewListPager - Lists all the available Namespaces within a subscription, irrespective of the resource groups.

Generated from API version 2021-11-01

  • options - NamespacesClientListOptions contains the optional parameters for the NamespacesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/EHNameSpaceList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewNamespacesClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.EHNamespaceListResult = armeventhub.EHNamespaceListResult{
		// 	Value: []*armeventhub.EHNamespace{
		// 		{
		// 			Name: to.Ptr("NamespaceSample"),
		// 			Type: to.Ptr("Microsoft.EventHub/Namespaces"),
		// 			ID: to.Ptr("/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.EventHub/namespaces/NamespaceSample"),
		// 			Location: to.Ptr("East US"),
		// 			Tags: map[string]*string{
		// 			},
		// 			Identity: &armeventhub.Identity{
		// 				Type: to.Ptr(armeventhub.ManagedServiceIdentityTypeSystemAssignedUserAssigned),
		// 				PrincipalID: to.Ptr("PrincipalIdGUID"),
		// 				TenantID: to.Ptr("TenantIdGUID"),
		// 				UserAssignedIdentities: map[string]*armeventhub.UserAssignedIdentity{
		// 					"/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud1": &armeventhub.UserAssignedIdentity{
		// 						ClientID: to.Ptr("ClientIdGUID"),
		// 						PrincipalID: to.Ptr("PrincipalIdGUID"),
		// 					},
		// 					"/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud2": &armeventhub.UserAssignedIdentity{
		// 						ClientID: to.Ptr("6a35400f-6ccb-4817-8f1a-ce19ea4523bc"),
		// 						PrincipalID: to.Ptr("ce2d5953-5c15-40ca-9d51-cc3f4a63b0f5"),
		// 					},
		// 				},
		// 			},
		// 			Properties: &armeventhub.EHNamespaceProperties{
		// 				ClusterArmID: to.Ptr("/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.EventHub/clusters/enc-test"),
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-30T00:28:38.963Z"); return t}()),
		// 				DisableLocalAuth: to.Ptr(false),
		// 				Encryption: &armeventhub.Encryption{
		// 					KeySource: to.Ptr("Microsoft.KeyVault"),
		// 					KeyVaultProperties: []*armeventhub.KeyVaultProperties{
		// 						{
		// 							Identity: &armeventhub.UserAssignedIdentityProperties{
		// 								UserAssignedIdentity: to.Ptr("/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud1"),
		// 							},
		// 							KeyName: to.Ptr("Samplekey"),
		// 							KeyVaultURI: to.Ptr("https://sample-keyvault-user.vault-int.azure-int.net"),
		// 							KeyVersion: to.Ptr(""),
		// 					}},
		// 					RequireInfrastructureEncryption: to.Ptr(false),
		// 				},
		// 				IsAutoInflateEnabled: to.Ptr(false),
		// 				MaximumThroughputUnits: to.Ptr[int32](0),
		// 				MetricID: to.Ptr("MetricGUID:NamespaceSample"),
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 				ServiceBusEndpoint: to.Ptr("https://NamespaceSample.servicebus.windows-int.net:443/"),
		// 				UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-30T00:30:55.143Z"); return t}()),
		// 				ZoneRedundant: to.Ptr(false),
		// 			},
		// 			SKU: &armeventhub.SKU{
		// 				Name: to.Ptr(armeventhub.SKUNameStandard),
		// 				Capacity: to.Ptr[int32](0),
		// 				Tier: to.Ptr(armeventhub.SKUTierStandard),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*NamespacesClient) RegenerateKeys

func (client *NamespacesClient) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters, options *NamespacesClientRegenerateKeysOptions) (NamespacesClientRegenerateKeysResponse, error)

RegenerateKeys - Regenerates the primary or secondary connection strings for the specified Namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • authorizationRuleName - The authorization rule name.
  • parameters - Parameters required to regenerate the connection string.
  • options - NamespacesClientRegenerateKeysOptions contains the optional parameters for the NamespacesClient.RegenerateKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/EHNameSpaceAuthorizationRuleRegenerateKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().RegenerateKeys(ctx, "ArunMonocle", "sdk-Namespace-8980", "sdk-Authrules-8929", armeventhub.RegenerateAccessKeyParameters{
		KeyType: to.Ptr(armeventhub.KeyTypePrimaryKey),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AccessKeys = armeventhub.AccessKeys{
	// 	KeyName: to.Ptr("sdk-Authrules-8929"),
	// 	PrimaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-8980.servicebus.windows-int.net/;SharedAccessKeyName=sdk-Authrules-8929;SharedAccessKey=############################################"),
	// 	PrimaryKey: to.Ptr("############################################"),
	// 	SecondaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-8980.servicebus.windows-int.net/;SharedAccessKeyName=sdk-Authrules-8929;SharedAccessKey=############################################"),
	// 	SecondaryKey: to.Ptr("############################################"),
	// }
}
Output:

func (*NamespacesClient) Update

func (client *NamespacesClient) Update(ctx context.Context, resourceGroupName string, namespaceName string, parameters EHNamespace, options *NamespacesClientUpdateOptions) (NamespacesClientUpdateResponse, error)

Update - Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • parameters - Parameters for updating a namespace resource.
  • options - NamespacesClientUpdateOptions contains the optional parameters for the NamespacesClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/EHNameSpaceUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().Update(ctx, "ResurceGroupSample", "NamespaceSample", armeventhub.EHNamespace{
		Location: to.Ptr("East US"),
		Identity: &armeventhub.Identity{
			Type: to.Ptr(armeventhub.ManagedServiceIdentityTypeSystemAssignedUserAssigned),
			UserAssignedIdentities: map[string]*armeventhub.UserAssignedIdentity{
				"/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud2": nil,
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.EHNamespace = armeventhub.EHNamespace{
	// 	Name: to.Ptr("NamespaceSample"),
	// 	Type: to.Ptr("Microsoft.EventHub/Namespaces"),
	// 	ID: to.Ptr("/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.EventHub/namespaces/NamespaceSample"),
	// 	Location: to.Ptr("East US"),
	// 	Tags: map[string]*string{
	// 	},
	// 	Identity: &armeventhub.Identity{
	// 		Type: to.Ptr(armeventhub.ManagedServiceIdentityTypeSystemAssignedUserAssigned),
	// 		PrincipalID: to.Ptr("PrincipalIdGUID"),
	// 		TenantID: to.Ptr("TenantIdGUID"),
	// 		UserAssignedIdentities: map[string]*armeventhub.UserAssignedIdentity{
	// 			"/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud1": &armeventhub.UserAssignedIdentity{
	// 				ClientID: to.Ptr("ClientIdGUID"),
	// 				PrincipalID: to.Ptr("PrincipalIdGUID"),
	// 			},
	// 		},
	// 	},
	// 	Properties: &armeventhub.EHNamespaceProperties{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-30T00:28:38.963Z"); return t}()),
	// 		DisableLocalAuth: to.Ptr(false),
	// 		Encryption: &armeventhub.Encryption{
	// 			KeySource: to.Ptr("Microsoft.KeyVault"),
	// 			KeyVaultProperties: []*armeventhub.KeyVaultProperties{
	// 				{
	// 					Identity: &armeventhub.UserAssignedIdentityProperties{
	// 						UserAssignedIdentity: to.Ptr("/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud1"),
	// 					},
	// 					KeyName: to.Ptr("Samplekey"),
	// 					KeyVaultURI: to.Ptr("https://sample-keyvault-user.vault-int.azure-int.net"),
	// 					KeyVersion: to.Ptr(""),
	// 			}},
	// 			RequireInfrastructureEncryption: to.Ptr(false),
	// 		},
	// 		IsAutoInflateEnabled: to.Ptr(false),
	// 		MaximumThroughputUnits: to.Ptr[int32](0),
	// 		MetricID: to.Ptr("MetricGUID:NamespaceSample"),
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		ServiceBusEndpoint: to.Ptr("https://NamespaceSample.servicebus.windows-int.net:443/"),
	// 		UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-30T00:31:13.657Z"); return t}()),
	// 		ZoneRedundant: to.Ptr(false),
	// 	},
	// 	SKU: &armeventhub.SKU{
	// 		Name: to.Ptr(armeventhub.SKUNameStandard),
	// 		Capacity: to.Ptr[int32](1),
	// 		Tier: to.Ptr(armeventhub.SKUTierStandard),
	// 	},
	// }
}
Output:

type NamespacesClientBeginCreateOrUpdateOptions added in v0.3.0

type NamespacesClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

NamespacesClientBeginCreateOrUpdateOptions contains the optional parameters for the NamespacesClient.BeginCreateOrUpdate method.

type NamespacesClientBeginDeleteOptions added in v0.3.0

type NamespacesClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

NamespacesClientBeginDeleteOptions contains the optional parameters for the NamespacesClient.BeginDelete method.

type NamespacesClientCheckNameAvailabilityOptions added in v0.3.0

type NamespacesClientCheckNameAvailabilityOptions struct {
}

NamespacesClientCheckNameAvailabilityOptions contains the optional parameters for the NamespacesClient.CheckNameAvailability method.

type NamespacesClientCheckNameAvailabilityResponse added in v0.3.0

type NamespacesClientCheckNameAvailabilityResponse struct {
	// The Result of the CheckNameAvailability operation
	CheckNameAvailabilityResult
}

NamespacesClientCheckNameAvailabilityResponse contains the response from method NamespacesClient.CheckNameAvailability.

type NamespacesClientCreateOrUpdateAuthorizationRuleOptions added in v0.3.0

type NamespacesClientCreateOrUpdateAuthorizationRuleOptions struct {
}

NamespacesClientCreateOrUpdateAuthorizationRuleOptions contains the optional parameters for the NamespacesClient.CreateOrUpdateAuthorizationRule method.

type NamespacesClientCreateOrUpdateAuthorizationRuleResponse added in v0.3.0

type NamespacesClientCreateOrUpdateAuthorizationRuleResponse struct {
	// Single item in a List or Get AuthorizationRule operation
	AuthorizationRule
}

NamespacesClientCreateOrUpdateAuthorizationRuleResponse contains the response from method NamespacesClient.CreateOrUpdateAuthorizationRule.

type NamespacesClientCreateOrUpdateNetworkRuleSetOptions added in v0.3.0

type NamespacesClientCreateOrUpdateNetworkRuleSetOptions struct {
}

NamespacesClientCreateOrUpdateNetworkRuleSetOptions contains the optional parameters for the NamespacesClient.CreateOrUpdateNetworkRuleSet method.

type NamespacesClientCreateOrUpdateNetworkRuleSetResponse added in v0.3.0

type NamespacesClientCreateOrUpdateNetworkRuleSetResponse struct {
	// Description of topic resource.
	NetworkRuleSet
}

NamespacesClientCreateOrUpdateNetworkRuleSetResponse contains the response from method NamespacesClient.CreateOrUpdateNetworkRuleSet.

type NamespacesClientCreateOrUpdateResponse added in v0.3.0

type NamespacesClientCreateOrUpdateResponse struct {
	// Single Namespace item in List or Get Operation
	EHNamespace
}

NamespacesClientCreateOrUpdateResponse contains the response from method NamespacesClient.BeginCreateOrUpdate.

type NamespacesClientDeleteAuthorizationRuleOptions added in v0.3.0

type NamespacesClientDeleteAuthorizationRuleOptions struct {
}

NamespacesClientDeleteAuthorizationRuleOptions contains the optional parameters for the NamespacesClient.DeleteAuthorizationRule method.

type NamespacesClientDeleteAuthorizationRuleResponse added in v0.3.0

type NamespacesClientDeleteAuthorizationRuleResponse struct {
}

NamespacesClientDeleteAuthorizationRuleResponse contains the response from method NamespacesClient.DeleteAuthorizationRule.

type NamespacesClientDeleteResponse added in v0.3.0

type NamespacesClientDeleteResponse struct {
}

NamespacesClientDeleteResponse contains the response from method NamespacesClient.BeginDelete.

type NamespacesClientGetAuthorizationRuleOptions added in v0.3.0

type NamespacesClientGetAuthorizationRuleOptions struct {
}

NamespacesClientGetAuthorizationRuleOptions contains the optional parameters for the NamespacesClient.GetAuthorizationRule method.

type NamespacesClientGetAuthorizationRuleResponse added in v0.3.0

type NamespacesClientGetAuthorizationRuleResponse struct {
	// Single item in a List or Get AuthorizationRule operation
	AuthorizationRule
}

NamespacesClientGetAuthorizationRuleResponse contains the response from method NamespacesClient.GetAuthorizationRule.

type NamespacesClientGetNetworkRuleSetOptions added in v0.3.0

type NamespacesClientGetNetworkRuleSetOptions struct {
}

NamespacesClientGetNetworkRuleSetOptions contains the optional parameters for the NamespacesClient.GetNetworkRuleSet method.

type NamespacesClientGetNetworkRuleSetResponse added in v0.3.0

type NamespacesClientGetNetworkRuleSetResponse struct {
	// Description of topic resource.
	NetworkRuleSet
}

NamespacesClientGetNetworkRuleSetResponse contains the response from method NamespacesClient.GetNetworkRuleSet.

type NamespacesClientGetOptions added in v0.3.0

type NamespacesClientGetOptions struct {
}

NamespacesClientGetOptions contains the optional parameters for the NamespacesClient.Get method.

type NamespacesClientGetResponse added in v0.3.0

type NamespacesClientGetResponse struct {
	// Single Namespace item in List or Get Operation
	EHNamespace
}

NamespacesClientGetResponse contains the response from method NamespacesClient.Get.

type NamespacesClientListAuthorizationRulesOptions added in v0.3.0

type NamespacesClientListAuthorizationRulesOptions struct {
}

NamespacesClientListAuthorizationRulesOptions contains the optional parameters for the NamespacesClient.NewListAuthorizationRulesPager method.

type NamespacesClientListAuthorizationRulesResponse added in v0.3.0

type NamespacesClientListAuthorizationRulesResponse struct {
	// The response from the List namespace operation.
	AuthorizationRuleListResult
}

NamespacesClientListAuthorizationRulesResponse contains the response from method NamespacesClient.NewListAuthorizationRulesPager.

type NamespacesClientListByResourceGroupOptions added in v0.3.0

type NamespacesClientListByResourceGroupOptions struct {
}

NamespacesClientListByResourceGroupOptions contains the optional parameters for the NamespacesClient.NewListByResourceGroupPager method.

type NamespacesClientListByResourceGroupResponse added in v0.3.0

type NamespacesClientListByResourceGroupResponse struct {
	// The response of the List Namespace operation
	EHNamespaceListResult
}

NamespacesClientListByResourceGroupResponse contains the response from method NamespacesClient.NewListByResourceGroupPager.

type NamespacesClientListKeysOptions added in v0.3.0

type NamespacesClientListKeysOptions struct {
}

NamespacesClientListKeysOptions contains the optional parameters for the NamespacesClient.ListKeys method.

type NamespacesClientListKeysResponse added in v0.3.0

type NamespacesClientListKeysResponse struct {
	// Namespace/EventHub Connection String
	AccessKeys
}

NamespacesClientListKeysResponse contains the response from method NamespacesClient.ListKeys.

type NamespacesClientListNetworkRuleSetOptions added in v0.3.0

type NamespacesClientListNetworkRuleSetOptions struct {
}

NamespacesClientListNetworkRuleSetOptions contains the optional parameters for the NamespacesClient.ListNetworkRuleSet method.

type NamespacesClientListNetworkRuleSetResponse added in v0.3.0

type NamespacesClientListNetworkRuleSetResponse struct {
	// The response of the List NetworkRuleSet operation
	NetworkRuleSetListResult
}

NamespacesClientListNetworkRuleSetResponse contains the response from method NamespacesClient.ListNetworkRuleSet.

type NamespacesClientListOptions added in v0.3.0

type NamespacesClientListOptions struct {
}

NamespacesClientListOptions contains the optional parameters for the NamespacesClient.NewListPager method.

type NamespacesClientListResponse added in v0.3.0

type NamespacesClientListResponse struct {
	// The response of the List Namespace operation
	EHNamespaceListResult
}

NamespacesClientListResponse contains the response from method NamespacesClient.NewListPager.

type NamespacesClientRegenerateKeysOptions added in v0.3.0

type NamespacesClientRegenerateKeysOptions struct {
}

NamespacesClientRegenerateKeysOptions contains the optional parameters for the NamespacesClient.RegenerateKeys method.

type NamespacesClientRegenerateKeysResponse added in v0.3.0

type NamespacesClientRegenerateKeysResponse struct {
	// Namespace/EventHub Connection String
	AccessKeys
}

NamespacesClientRegenerateKeysResponse contains the response from method NamespacesClient.RegenerateKeys.

type NamespacesClientUpdateOptions added in v0.3.0

type NamespacesClientUpdateOptions struct {
}

NamespacesClientUpdateOptions contains the optional parameters for the NamespacesClient.Update method.

type NamespacesClientUpdateResponse added in v0.3.0

type NamespacesClientUpdateResponse struct {
	// Single Namespace item in List or Get Operation
	EHNamespace
}

NamespacesClientUpdateResponse contains the response from method NamespacesClient.Update.

type NetworkRuleIPAction

type NetworkRuleIPAction string

NetworkRuleIPAction - The IP Filter Action

const (
	NetworkRuleIPActionAllow NetworkRuleIPAction = "Allow"
)

func PossibleNetworkRuleIPActionValues

func PossibleNetworkRuleIPActionValues() []NetworkRuleIPAction

PossibleNetworkRuleIPActionValues returns the possible values for the NetworkRuleIPAction const type.

type NetworkRuleSet

type NetworkRuleSet struct {
	// NetworkRuleSet properties
	Properties *NetworkRuleSetProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The geo-location where the resource lives
	Location *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string
}

NetworkRuleSet - Description of topic resource.

func (NetworkRuleSet) MarshalJSON

func (n NetworkRuleSet) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkRuleSet.

func (*NetworkRuleSet) UnmarshalJSON added in v1.1.0

func (n *NetworkRuleSet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkRuleSet.

type NetworkRuleSetListResult added in v0.2.0

type NetworkRuleSetListResult struct {
	// Link to the next set of results. Not empty if Value contains incomplete list of NetworkRuleSet.
	NextLink *string

	// Result of the List NetworkRuleSet operation
	Value []*NetworkRuleSet
}

NetworkRuleSetListResult - The response of the List NetworkRuleSet operation

func (NetworkRuleSetListResult) MarshalJSON added in v0.2.0

func (n NetworkRuleSetListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkRuleSetListResult.

func (*NetworkRuleSetListResult) UnmarshalJSON added in v1.1.0

func (n *NetworkRuleSetListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkRuleSetListResult.

type NetworkRuleSetProperties

type NetworkRuleSetProperties struct {
	// Default Action for Network Rule Set
	DefaultAction *DefaultAction

	// List of IpRules
	IPRules []*NWRuleSetIPRules

	// This determines if traffic is allowed over public network. By default it is enabled.
	PublicNetworkAccess *PublicNetworkAccessFlag

	// Value that indicates whether Trusted Service Access is Enabled or not.
	TrustedServiceAccessEnabled *bool

	// List VirtualNetwork Rules
	VirtualNetworkRules []*NWRuleSetVirtualNetworkRules
}

NetworkRuleSetProperties - NetworkRuleSet properties

func (NetworkRuleSetProperties) MarshalJSON

func (n NetworkRuleSetProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkRuleSetProperties.

func (*NetworkRuleSetProperties) UnmarshalJSON added in v1.1.0

func (n *NetworkRuleSetProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkRuleSetProperties.

type Operation

type Operation struct {
	// Display of the operation
	Display *OperationDisplay

	// Indicates whether the operation is a data action
	IsDataAction *bool

	// Origin of the operation
	Origin *string

	// Properties of the operation
	Properties any

	// READ-ONLY; Operation name: {provider}/{resource}/{operation}
	Name *string
}

Operation - A Event Hub REST API operation

func (Operation) MarshalJSON added in v1.1.0

func (o Operation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON added in v1.1.0

func (o *Operation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// READ-ONLY; Localized friendly description for the operation
	Description *string

	// READ-ONLY; Localized friendly name for the operation
	Operation *string

	// READ-ONLY; Resource provider of the operation
	Provider *string

	// READ-ONLY; Resource of the operation
	Resource *string
}

OperationDisplay - Operation display payload

func (OperationDisplay) MarshalJSON added in v1.1.0

func (o OperationDisplay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON added in v1.1.0

func (o *OperationDisplay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationListResult

type OperationListResult struct {
	// READ-ONLY; URL to get the next set of operation list results if there are any.
	NextLink *string

	// READ-ONLY; List of Event Hub operations supported by the Microsoft.EventHub resource provider.
	Value []*Operation
}

OperationListResult - Result of the request to list Event Hub operations. It contains a list of operations and a URL link to get the next set of results.

func (OperationListResult) MarshalJSON

func (o OperationListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON added in v1.1.0

func (o *OperationListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

type OperationsClient

type OperationsClient struct {
	// contains filtered or unexported fields
}

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

NewOperationsClient creates a new instance of OperationsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*OperationsClient) NewListPager added in v0.5.0

NewListPager - Lists all of the available Event Hub REST API operations.

Generated from API version 2021-11-01

  • options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/EHOperations_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OperationListResult = armeventhub.OperationListResult{
		// 	Value: []*armeventhub.Operation{
		// 		{
		// 			Name: to.Ptr("Microsoft.EventHub/checkNameAvailability/action"),
		// 			Display: &armeventhub.OperationDisplay{
		// 				Operation: to.Ptr("Get namespace availability."),
		// 				Provider: to.Ptr("Microsoft Azure EventHub"),
		// 				Resource: to.Ptr("Non Resource Operation"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.EventHub/register/action"),
		// 			Display: &armeventhub.OperationDisplay{
		// 				Operation: to.Ptr("Registers the EventHub Resource Provider"),
		// 				Provider: to.Ptr("Microsoft Azure EventHub"),
		// 				Resource: to.Ptr("EventHub Resource Provider"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.EventHub/namespaces/write"),
		// 			Display: &armeventhub.OperationDisplay{
		// 				Operation: to.Ptr("Create Or Update Namespace "),
		// 				Provider: to.Ptr("Microsoft Azure EventHub"),
		// 				Resource: to.Ptr("Namespace"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.EventHub/namespaces/read"),
		// 			Display: &armeventhub.OperationDisplay{
		// 				Operation: to.Ptr("Get Namespace Resource"),
		// 				Provider: to.Ptr("Microsoft Azure EventHub"),
		// 				Resource: to.Ptr("Namespace"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.EventHub/namespaces/Delete"),
		// 			Display: &armeventhub.OperationDisplay{
		// 				Operation: to.Ptr("Delete Namespace"),
		// 				Provider: to.Ptr("Microsoft Azure EventHub"),
		// 				Resource: to.Ptr("Namespace"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.EventHub/namespaces/authorizationRules/read"),
		// 			Display: &armeventhub.OperationDisplay{
		// 				Operation: to.Ptr("Get Namespace Authorization Rules"),
		// 				Provider: to.Ptr("Microsoft Azure EventHub"),
		// 				Resource: to.Ptr("AuthorizationRules"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.EventHub/namespaces/authorizationRules/write"),
		// 			Display: &armeventhub.OperationDisplay{
		// 				Operation: to.Ptr("Create or Update Namespace Authorization Rules"),
		// 				Provider: to.Ptr("Microsoft Azure EventHub"),
		// 				Resource: to.Ptr("AuthorizationRules"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.EventHub/namespaces/authorizationRules/delete"),
		// 			Display: &armeventhub.OperationDisplay{
		// 				Operation: to.Ptr("Delete Namespace Authorization Rule"),
		// 				Provider: to.Ptr("Microsoft Azure EventHub"),
		// 				Resource: to.Ptr("AuthorizationRules"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.EventHub/namespaces/authorizationRules/listkeys/action"),
		// 			Display: &armeventhub.OperationDisplay{
		// 				Operation: to.Ptr("Get Namespace Listkeys"),
		// 				Provider: to.Ptr("Microsoft Azure EventHub"),
		// 				Resource: to.Ptr("AuthorizationRules"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.EventHub/namespaces/authorizationRules/regenerateKeys/action"),
		// 			Display: &armeventhub.OperationDisplay{
		// 				Operation: to.Ptr("Resource Regeneratekeys"),
		// 				Provider: to.Ptr("Microsoft Azure EventHub"),
		// 				Resource: to.Ptr("AuthorizationRules"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.EventHub/namespaces/eventhubs/write"),
		// 			Display: &armeventhub.OperationDisplay{
		// 				Operation: to.Ptr("Create or Update EventHub"),
		// 				Provider: to.Ptr("Microsoft Azure EventHub"),
		// 				Resource: to.Ptr("EventHub"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.EventHub/namespaces/eventhubs/read"),
		// 			Display: &armeventhub.OperationDisplay{
		// 				Operation: to.Ptr("Get EventHub"),
		// 				Provider: to.Ptr("Microsoft Azure EventHub"),
		// 				Resource: to.Ptr("EventHub"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.EventHub/namespaces/eventhubs/Delete"),
		// 			Display: &armeventhub.OperationDisplay{
		// 				Operation: to.Ptr("Delete EventHub"),
		// 				Provider: to.Ptr("Microsoft Azure EventHub"),
		// 				Resource: to.Ptr("EventHub"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.EventHub/namespaces/eventhubs/authorizationRules/read"),
		// 			Display: &armeventhub.OperationDisplay{
		// 				Operation: to.Ptr(" Get EventHub Authorization Rules"),
		// 				Provider: to.Ptr("Microsoft Azure EventHub"),
		// 				Resource: to.Ptr("EventHub AuthorizationRules"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.EventHub/namespaces/eventhubs/authorizationRules/write"),
		// 			Display: &armeventhub.OperationDisplay{
		// 				Operation: to.Ptr("Create or Update EventHub Authorization Rule"),
		// 				Provider: to.Ptr("Microsoft Azure EventHub"),
		// 				Resource: to.Ptr("EventHub AuthorizationRules"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.EventHub/namespaces/eventhubs/authorizationRules/delete"),
		// 			Display: &armeventhub.OperationDisplay{
		// 				Operation: to.Ptr("Delete EventHub Authorization Rules"),
		// 				Provider: to.Ptr("Microsoft Azure EventHub"),
		// 				Resource: to.Ptr("EventHub AuthorizationRules"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.EventHub/namespaces/eventhubs/authorizationRules/listkeys/action"),
		// 			Display: &armeventhub.OperationDisplay{
		// 				Operation: to.Ptr("List EventHub keys"),
		// 				Provider: to.Ptr("Microsoft Azure EventHub"),
		// 				Resource: to.Ptr("EventHub AuthorizationRules"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.EventHub/namespaces/eventhubs/authorizationRules/regenerateKeys/action"),
		// 			Display: &armeventhub.OperationDisplay{
		// 				Operation: to.Ptr("Resource Regeneratekeys"),
		// 				Provider: to.Ptr("Microsoft Azure EventHub"),
		// 				Resource: to.Ptr("EventHub AuthorizationRules"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.EventHub/namespaces/eventHubs/consumergroups/write"),
		// 			Display: &armeventhub.OperationDisplay{
		// 				Operation: to.Ptr("Create or Update ConsumerGroup"),
		// 				Provider: to.Ptr("Microsoft Azure EventHub"),
		// 				Resource: to.Ptr("ConsumerGroup"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.EventHub/namespaces/eventHubs/consumergroups/read"),
		// 			Display: &armeventhub.OperationDisplay{
		// 				Operation: to.Ptr("Get ConsumerGroup"),
		// 				Provider: to.Ptr("Microsoft Azure EventHub"),
		// 				Resource: to.Ptr("ConsumerGroup"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.EventHub/namespaces/eventHubs/consumergroups/Delete"),
		// 			Display: &armeventhub.OperationDisplay{
		// 				Operation: to.Ptr("Delete ConsumerGroup"),
		// 				Provider: to.Ptr("Microsoft Azure EventHub"),
		// 				Resource: to.Ptr("ConsumerGroup"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.EventHub/namespaces/metricDefinitions/read"),
		// 			Display: &armeventhub.OperationDisplay{
		// 				Operation: to.Ptr("Get Namespace metrics"),
		// 				Provider: to.Ptr("Microsoft Azure EventHub"),
		// 				Resource: to.Ptr("Namespace metrics"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.EventHub/namespaces/diagnosticSettings/read"),
		// 			Display: &armeventhub.OperationDisplay{
		// 				Operation: to.Ptr("Get Namespace diagnostic settings"),
		// 				Provider: to.Ptr("Microsoft Azure EventHub"),
		// 				Resource: to.Ptr("Namespace diagnostic settings"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.EventHub/namespaces/diagnosticSettings/write"),
		// 			Display: &armeventhub.OperationDisplay{
		// 				Operation: to.Ptr("Create or Update Namespace diagnostic settings"),
		// 				Provider: to.Ptr("Microsoft Azure EventHub"),
		// 				Resource: to.Ptr("Namespace diagnostic settings"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.EventHub/namespaces/logDefinitions/read"),
		// 			Display: &armeventhub.OperationDisplay{
		// 				Operation: to.Ptr("Get Namespace logs"),
		// 				Provider: to.Ptr("Microsoft Azure EventHub"),
		// 				Resource: to.Ptr("Namespace logs"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type OperationsClientListOptions added in v0.3.0

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.

type OperationsClientListResponse added in v0.3.0

type OperationsClientListResponse struct {
	// Result of the request to list Event Hub operations. It contains a list of operations and a URL link to get the next set
	// of results.
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type PrivateEndpoint

type PrivateEndpoint struct {
	// The ARM identifier for Private Endpoint.
	ID *string
}

PrivateEndpoint information.

func (PrivateEndpoint) MarshalJSON added in v1.1.0

func (p PrivateEndpoint) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint.

func (*PrivateEndpoint) UnmarshalJSON added in v1.1.0

func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint.

type PrivateEndpointConnection

type PrivateEndpointConnection struct {
	// Properties of the PrivateEndpointConnection.
	Properties *PrivateEndpointConnectionProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The geo-location where the resource lives
	Location *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string
}

PrivateEndpointConnection - Properties of the PrivateEndpointConnection.

func (PrivateEndpointConnection) MarshalJSON

func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection.

func (*PrivateEndpointConnection) UnmarshalJSON added in v1.1.0

func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection.

type PrivateEndpointConnectionListResult

type PrivateEndpointConnectionListResult struct {
	// A link for the next page of private endpoint connection resources.
	NextLink *string

	// A collection of private endpoint connection resources.
	Value []*PrivateEndpointConnection
}

PrivateEndpointConnectionListResult - Result of the list of all private endpoint connections operation.

func (PrivateEndpointConnectionListResult) MarshalJSON

func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult.

func (*PrivateEndpointConnectionListResult) UnmarshalJSON added in v1.1.0

func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult.

type PrivateEndpointConnectionProperties

type PrivateEndpointConnectionProperties struct {
	// The Private Endpoint resource for this Connection.
	PrivateEndpoint *PrivateEndpoint

	// Details about the state of the connection.
	PrivateLinkServiceConnectionState *ConnectionState

	// Provisioning state of the Private Endpoint Connection.
	ProvisioningState *EndPointProvisioningState
}

PrivateEndpointConnectionProperties - Properties of the private endpoint connection resource.

func (PrivateEndpointConnectionProperties) MarshalJSON added in v1.1.0

func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.

func (*PrivateEndpointConnectionProperties) UnmarshalJSON added in v1.1.0

func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties.

type PrivateEndpointConnectionsClient

type PrivateEndpointConnectionsClient struct {
	// contains filtered or unexported fields
}

PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead.

func NewPrivateEndpointConnectionsClient

func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error)

NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values.

  • subscriptionID - Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PrivateEndpointConnectionsClient) BeginDelete

func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, namespaceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)

BeginDelete - Deletes an existing namespace. This operation also removes all associated resources under the namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • privateEndpointConnectionName - The PrivateEndpointConnection name
  • options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/PrivateEndPointConnectionDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginDelete(ctx, "ArunMonocle", "sdk-Namespace-3285", "928c44d5-b7c6-423b-b6fa-811e0c27b3e0", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*PrivateEndpointConnectionsClient) CreateOrUpdate

func (client *PrivateEndpointConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientCreateOrUpdateOptions) (PrivateEndpointConnectionsClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates PrivateEndpointConnections of service namespace. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • privateEndpointConnectionName - The PrivateEndpointConnection name
  • parameters - Parameters supplied to update Status of PrivateEndPoint Connection to namespace resource.
  • options - PrivateEndpointConnectionsClientCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/PrivateEndPointConnectionCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateEndpointConnectionsClient().CreateOrUpdate(ctx, "ArunMonocle", "sdk-Namespace-2924", "privateEndpointConnectionName", armeventhub.PrivateEndpointConnection{
		Properties: &armeventhub.PrivateEndpointConnectionProperties{
			PrivateEndpoint: &armeventhub.PrivateEndpoint{
				ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/SDK-EventHub-8396/providers/Microsoft.Network/privateEndpoints/sdk-Namespace-2847"),
			},
			PrivateLinkServiceConnectionState: &armeventhub.ConnectionState{
				Description: to.Ptr("testing"),
				Status:      to.Ptr(armeventhub.PrivateLinkConnectionStatusRejected),
			},
			ProvisioningState: to.Ptr(armeventhub.EndPointProvisioningStateSucceeded),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PrivateEndpointConnection = armeventhub.PrivateEndpointConnection{
	// 	Name: to.Ptr("928c44d5-b7c6-423b-b6fa-811e0c27b3e0"),
	// 	Type: to.Ptr("Microsoft.EventHub/Namespaces/PrivateEndpointConnections"),
	// 	ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/SDK-EventHub-4794/providers/Microsoft.EventHub/namespaces/sdk-Namespace-5828/privateEndpointConnections/928c44d5-b7c6-423b-b6fa-811e0c27b3e0"),
	// 	Properties: &armeventhub.PrivateEndpointConnectionProperties{
	// 		PrivateEndpoint: &armeventhub.PrivateEndpoint{
	// 			ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/SDK-EventHub-4794/providers/Microsoft.Network/privateEndpoints/sdk-Namespace-5828"),
	// 		},
	// 		PrivateLinkServiceConnectionState: &armeventhub.ConnectionState{
	// 			Description: to.Ptr("Auto-Approved"),
	// 			Status: to.Ptr(armeventhub.PrivateLinkConnectionStatusApproved),
	// 		},
	// 		ProvisioningState: to.Ptr(armeventhub.EndPointProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*PrivateEndpointConnectionsClient) Get

func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, namespaceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error)

Get - Gets a description for the specified Private Endpoint Connection name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • privateEndpointConnectionName - The PrivateEndpointConnection name
  • options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/PrivateEndPointConnectionGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "SDK-EventHub-4794", "sdk-Namespace-5828", "privateEndpointConnectionName", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PrivateEndpointConnection = armeventhub.PrivateEndpointConnection{
	// 	Name: to.Ptr("privateEndpointConnectionName"),
	// 	Type: to.Ptr("Microsoft.EventHub/Namespaces/PrivateEndpointConnections"),
	// 	ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/SDK-EventHub-4794/providers/Microsoft.EventHub/namespaces/sdk-Namespace-5828/privateEndpointConnections/privateEndpointConnectionName"),
	// 	Properties: &armeventhub.PrivateEndpointConnectionProperties{
	// 		PrivateEndpoint: &armeventhub.PrivateEndpoint{
	// 			ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/SDK-EventHub-4794/providers/Microsoft.Network/privateEndpoints/sdk-Namespace-5828"),
	// 		},
	// 		PrivateLinkServiceConnectionState: &armeventhub.ConnectionState{
	// 			Description: to.Ptr("Auto-Approved"),
	// 			Status: to.Ptr(armeventhub.PrivateLinkConnectionStatusApproved),
	// 		},
	// 		ProvisioningState: to.Ptr(armeventhub.EndPointProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*PrivateEndpointConnectionsClient) NewListPager added in v0.5.0

NewListPager - Gets the available PrivateEndpointConnections within a namespace.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/PrivateEndPointConnectionList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListPager("SDK-EventHub-4794", "sdk-Namespace-5828", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.PrivateEndpointConnectionListResult = armeventhub.PrivateEndpointConnectionListResult{
		// 	Value: []*armeventhub.PrivateEndpointConnection{
		// 		{
		// 			Name: to.Ptr("5dc668b3-70e4-437f-b61c-a3c1e594be7a"),
		// 			Type: to.Ptr("Microsoft.EventHub/Namespaces/PrivateEndpointConnections"),
		// 			ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/SDK-EventHub-7182/providers/Microsoft.EventHub/namespaces/sdk-Namespace-5705-new/privateEndpointConnections/5dc668b3-70e4-437f-b61c-a3c1e594be7a"),
		// 			Properties: &armeventhub.PrivateEndpointConnectionProperties{
		// 				PrivateEndpoint: &armeventhub.PrivateEndpoint{
		// 					ID: to.Ptr("/subscriptions/dbedb4e0-40e6-4145-81f3-f1314c150774/resourceGroups/SDK-EventHub-7182/providers/Microsoft.Network/privateEndpoints/sdk-Namespace-5705-new"),
		// 				},
		// 				PrivateLinkServiceConnectionState: &armeventhub.ConnectionState{
		// 					Description: to.Ptr("Auto-Approved"),
		// 					Status: to.Ptr(armeventhub.PrivateLinkConnectionStatusApproved),
		// 				},
		// 				ProvisioningState: to.Ptr(armeventhub.EndPointProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

type PrivateEndpointConnectionsClientBeginDeleteOptions added in v0.3.0

type PrivateEndpointConnectionsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.

type PrivateEndpointConnectionsClientCreateOrUpdateOptions added in v0.3.0

type PrivateEndpointConnectionsClientCreateOrUpdateOptions struct {
}

PrivateEndpointConnectionsClientCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.CreateOrUpdate method.

type PrivateEndpointConnectionsClientCreateOrUpdateResponse added in v0.3.0

type PrivateEndpointConnectionsClientCreateOrUpdateResponse struct {
	// Properties of the PrivateEndpointConnection.
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.CreateOrUpdate.

type PrivateEndpointConnectionsClientDeleteResponse added in v0.3.0

type PrivateEndpointConnectionsClientDeleteResponse struct {
}

PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete.

type PrivateEndpointConnectionsClientGetOptions added in v0.3.0

type PrivateEndpointConnectionsClientGetOptions struct {
}

PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.

type PrivateEndpointConnectionsClientGetResponse added in v0.3.0

type PrivateEndpointConnectionsClientGetResponse struct {
	// Properties of the PrivateEndpointConnection.
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.

type PrivateEndpointConnectionsClientListOptions added in v0.3.0

type PrivateEndpointConnectionsClientListOptions struct {
}

PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager method.

type PrivateEndpointConnectionsClientListResponse added in v0.3.0

type PrivateEndpointConnectionsClientListResponse struct {
	// Result of the list of all private endpoint connections operation.
	PrivateEndpointConnectionListResult
}

PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.NewListPager.

type PrivateLinkConnectionStatus

type PrivateLinkConnectionStatus string

PrivateLinkConnectionStatus - Status of the connection.

const (
	PrivateLinkConnectionStatusApproved     PrivateLinkConnectionStatus = "Approved"
	PrivateLinkConnectionStatusDisconnected PrivateLinkConnectionStatus = "Disconnected"
	PrivateLinkConnectionStatusPending      PrivateLinkConnectionStatus = "Pending"
	PrivateLinkConnectionStatusRejected     PrivateLinkConnectionStatus = "Rejected"
)

func PossiblePrivateLinkConnectionStatusValues

func PossiblePrivateLinkConnectionStatusValues() []PrivateLinkConnectionStatus

PossiblePrivateLinkConnectionStatusValues returns the possible values for the PrivateLinkConnectionStatus const type.

type PrivateLinkResource

type PrivateLinkResource struct {
	// Fully qualified identifier of the resource.
	ID *string

	// Name of the resource
	Name *string

	// Properties of the private link resource.
	Properties *PrivateLinkResourceProperties

	// Type of the resource
	Type *string
}

PrivateLinkResource - Information of the private link resource.

func (PrivateLinkResource) MarshalJSON added in v1.1.0

func (p PrivateLinkResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource.

func (*PrivateLinkResource) UnmarshalJSON added in v1.1.0

func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource.

type PrivateLinkResourceProperties

type PrivateLinkResourceProperties struct {
	// The private link resource group id.
	GroupID *string

	// The private link resource required member names.
	RequiredMembers []*string

	// The private link resource Private link DNS zone name.
	RequiredZoneNames []*string
}

PrivateLinkResourceProperties - Properties of PrivateLinkResource

func (PrivateLinkResourceProperties) MarshalJSON

func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties.

func (*PrivateLinkResourceProperties) UnmarshalJSON added in v1.1.0

func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties.

type PrivateLinkResourcesClient

type PrivateLinkResourcesClient struct {
	// contains filtered or unexported fields
}

PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group. Don't use this type directly, use NewPrivateLinkResourcesClient() instead.

func NewPrivateLinkResourcesClient

func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error)

NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values.

  • subscriptionID - Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PrivateLinkResourcesClient) Get

Get - Gets lists of resources that supports Privatelinks. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/NameSpaces/PrivateLinkResourcesGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateLinkResourcesClient().Get(ctx, "ArunMonocle", "sdk-Namespace-2924", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PrivateLinkResourcesListResult = armeventhub.PrivateLinkResourcesListResult{
	// 	Value: []*armeventhub.PrivateLinkResource{
	// 		{
	// 			Name: to.Ptr("namespace"),
	// 			Type: to.Ptr("Microsoft.EventHub/namespaces/privateLinkResources"),
	// 			ID: to.Ptr("subscriptions/subID/resourceGroups/SDK-EventHub-4794/providers/Microsoft.EventHub/namespaces/sdk-Namespace-5828/privateLinkResources/namespace"),
	// 			Properties: &armeventhub.PrivateLinkResourceProperties{
	// 				GroupID: to.Ptr("namespace"),
	// 				RequiredMembers: []*string{
	// 					to.Ptr("namespace")},
	// 					RequiredZoneNames: []*string{
	// 						to.Ptr("privatelink.EventHub.windows.net")},
	// 					},
	// 			}},
	// 		}
}
Output:

type PrivateLinkResourcesClientGetOptions added in v0.3.0

type PrivateLinkResourcesClientGetOptions struct {
}

PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.

type PrivateLinkResourcesClientGetResponse added in v0.3.0

type PrivateLinkResourcesClientGetResponse struct {
	// Result of the List private link resources operation.
	PrivateLinkResourcesListResult
}

PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get.

type PrivateLinkResourcesListResult

type PrivateLinkResourcesListResult struct {
	// A link for the next page of private link resources.
	NextLink *string

	// A collection of private link resources
	Value []*PrivateLinkResource
}

PrivateLinkResourcesListResult - Result of the List private link resources operation.

func (PrivateLinkResourcesListResult) MarshalJSON

func (p PrivateLinkResourcesListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourcesListResult.

func (*PrivateLinkResourcesListResult) UnmarshalJSON added in v1.1.0

func (p *PrivateLinkResourcesListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourcesListResult.

type Properties added in v0.3.0

type Properties struct {
	// Properties of capture description
	CaptureDescription *CaptureDescription

	// Number of days to retain the events for this Event Hub, value should be 1 to 7 days
	MessageRetentionInDays *int64

	// Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions.
	PartitionCount *int64

	// Enumerates the possible values for the status of the Event Hub.
	Status *EntityStatus

	// READ-ONLY; Exact time the Event Hub was created.
	CreatedAt *time.Time

	// READ-ONLY; Current number of shards on the Event Hub.
	PartitionIDs []*string

	// READ-ONLY; The exact time the message was updated.
	UpdatedAt *time.Time
}

Properties supplied to the Create Or Update Event Hub operation.

func (Properties) MarshalJSON added in v0.3.0

func (p Properties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Properties.

func (*Properties) UnmarshalJSON added in v0.3.0

func (p *Properties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Properties.

type ProvisioningStateDR

type ProvisioningStateDR string

ProvisioningStateDR - Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed'

const (
	ProvisioningStateDRAccepted  ProvisioningStateDR = "Accepted"
	ProvisioningStateDRFailed    ProvisioningStateDR = "Failed"
	ProvisioningStateDRSucceeded ProvisioningStateDR = "Succeeded"
)

func PossibleProvisioningStateDRValues

func PossibleProvisioningStateDRValues() []ProvisioningStateDR

PossibleProvisioningStateDRValues returns the possible values for the ProvisioningStateDR const type.

type ProxyResource added in v0.2.0

type ProxyResource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The geo-location where the resource lives
	Location *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string
}

ProxyResource - Common fields that are returned in the response for all Azure Resource Manager resources

func (ProxyResource) MarshalJSON added in v1.1.0

func (p ProxyResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProxyResource.

func (*ProxyResource) UnmarshalJSON added in v1.1.0

func (p *ProxyResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.

type PublicNetworkAccessFlag

type PublicNetworkAccessFlag string

PublicNetworkAccessFlag - This determines if traffic is allowed over public network. By default it is enabled.

const (
	PublicNetworkAccessFlagDisabled PublicNetworkAccessFlag = "Disabled"
	PublicNetworkAccessFlagEnabled  PublicNetworkAccessFlag = "Enabled"
)

func PossiblePublicNetworkAccessFlagValues

func PossiblePublicNetworkAccessFlagValues() []PublicNetworkAccessFlag

PossiblePublicNetworkAccessFlagValues returns the possible values for the PublicNetworkAccessFlag const type.

type RegenerateAccessKeyParameters

type RegenerateAccessKeyParameters struct {
	// REQUIRED; The access key to regenerate.
	KeyType *KeyType

	// Optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType
	Key *string
}

RegenerateAccessKeyParameters - Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset.

func (RegenerateAccessKeyParameters) MarshalJSON added in v1.1.0

func (r RegenerateAccessKeyParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RegenerateAccessKeyParameters.

func (*RegenerateAccessKeyParameters) UnmarshalJSON added in v1.1.0

func (r *RegenerateAccessKeyParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RegenerateAccessKeyParameters.

type Resource

type Resource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Resource - Common fields that are returned in the response for all Azure Resource Manager resources

func (Resource) MarshalJSON

func (r Resource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON added in v1.1.0

func (r *Resource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type RoleDisasterRecovery

type RoleDisasterRecovery string

RoleDisasterRecovery - role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary'

const (
	RoleDisasterRecoveryPrimary               RoleDisasterRecovery = "Primary"
	RoleDisasterRecoveryPrimaryNotReplicating RoleDisasterRecovery = "PrimaryNotReplicating"
	RoleDisasterRecoverySecondary             RoleDisasterRecovery = "Secondary"
)

func PossibleRoleDisasterRecoveryValues

func PossibleRoleDisasterRecoveryValues() []RoleDisasterRecovery

PossibleRoleDisasterRecoveryValues returns the possible values for the RoleDisasterRecovery const type.

type SKU

type SKU struct {
	// REQUIRED; Name of this SKU.
	Name *SKUName

	// The Event Hubs throughput units for Basic or Standard tiers, where value should be 0 to 20 throughput units. The Event
	// Hubs premium units for Premium tier, where value should be 0 to 10 premium units.
	Capacity *int32

	// The billing tier of this particular SKU.
	Tier *SKUTier
}

SKU parameters supplied to the create namespace operation

func (SKU) MarshalJSON added in v1.1.0

func (s SKU) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SKU.

func (*SKU) UnmarshalJSON added in v1.1.0

func (s *SKU) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SKU.

type SKUName

type SKUName string

SKUName - Name of this SKU.

const (
	SKUNameBasic    SKUName = "Basic"
	SKUNamePremium  SKUName = "Premium"
	SKUNameStandard SKUName = "Standard"
)

func PossibleSKUNameValues

func PossibleSKUNameValues() []SKUName

PossibleSKUNameValues returns the possible values for the SKUName const type.

type SKUTier

type SKUTier string

SKUTier - The billing tier of this particular SKU.

const (
	SKUTierBasic    SKUTier = "Basic"
	SKUTierPremium  SKUTier = "Premium"
	SKUTierStandard SKUTier = "Standard"
)

func PossibleSKUTierValues

func PossibleSKUTierValues() []SKUTier

PossibleSKUTierValues returns the possible values for the SKUTier const type.

type SchemaCompatibility added in v0.2.0

type SchemaCompatibility string
const (
	SchemaCompatibilityBackward SchemaCompatibility = "Backward"
	SchemaCompatibilityForward  SchemaCompatibility = "Forward"
	SchemaCompatibilityNone     SchemaCompatibility = "None"
)

func PossibleSchemaCompatibilityValues added in v0.2.0

func PossibleSchemaCompatibilityValues() []SchemaCompatibility

PossibleSchemaCompatibilityValues returns the possible values for the SchemaCompatibility const type.

type SchemaGroup added in v0.2.0

type SchemaGroup struct {
	Properties *SchemaGroupProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The geo-location where the resource lives
	Location *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string
}

SchemaGroup - Single item in List or Get Schema Group operation

func (SchemaGroup) MarshalJSON added in v1.1.0

func (s SchemaGroup) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SchemaGroup.

func (*SchemaGroup) UnmarshalJSON added in v1.1.0

func (s *SchemaGroup) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SchemaGroup.

type SchemaGroupListResult added in v0.2.0

type SchemaGroupListResult struct {
	// Link to the next set of results. Not empty if Value contains incomplete list of Schema Groups.
	NextLink *string

	// Result of the List SchemaGroups operation.
	Value []*SchemaGroup
}

SchemaGroupListResult - The result of the List SchemaGroup operation.

func (SchemaGroupListResult) MarshalJSON added in v0.2.0

func (s SchemaGroupListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SchemaGroupListResult.

func (*SchemaGroupListResult) UnmarshalJSON added in v1.1.0

func (s *SchemaGroupListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SchemaGroupListResult.

type SchemaGroupProperties added in v0.2.0

type SchemaGroupProperties struct {
	// dictionary object for SchemaGroup group properties
	GroupProperties     map[string]*string
	SchemaCompatibility *SchemaCompatibility
	SchemaType          *SchemaType

	// READ-ONLY; Exact time the Schema Group was created.
	CreatedAtUTC *time.Time

	// READ-ONLY; The ETag value.
	ETag *string

	// READ-ONLY; Exact time the Schema Group was updated
	UpdatedAtUTC *time.Time
}

func (SchemaGroupProperties) MarshalJSON added in v0.2.0

func (s SchemaGroupProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SchemaGroupProperties.

func (*SchemaGroupProperties) UnmarshalJSON added in v0.2.0

func (s *SchemaGroupProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SchemaGroupProperties.

type SchemaRegistryClient added in v0.2.0

type SchemaRegistryClient struct {
	// contains filtered or unexported fields
}

SchemaRegistryClient contains the methods for the SchemaRegistry group. Don't use this type directly, use NewSchemaRegistryClient() instead.

func NewSchemaRegistryClient added in v0.2.0

func NewSchemaRegistryClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SchemaRegistryClient, error)

NewSchemaRegistryClient creates a new instance of SchemaRegistryClient with the specified values.

  • subscriptionID - Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*SchemaRegistryClient) CreateOrUpdate added in v0.2.0

func (client *SchemaRegistryClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, schemaGroupName string, parameters SchemaGroup, options *SchemaRegistryClientCreateOrUpdateOptions) (SchemaRegistryClientCreateOrUpdateResponse, error)

CreateOrUpdate - If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • schemaGroupName - The Schema Group name
  • parameters - Parameters supplied to create an Event Hub resource.
  • options - SchemaRegistryClientCreateOrUpdateOptions contains the optional parameters for the SchemaRegistryClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/SchemaRegistry/SchemaRegistryCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSchemaRegistryClient().CreateOrUpdate(ctx, "alitest", "ali-ua-test-eh-system-1", "testSchemaGroup1", armeventhub.SchemaGroup{
		Properties: &armeventhub.SchemaGroupProperties{
			GroupProperties:     map[string]*string{},
			SchemaCompatibility: to.Ptr(armeventhub.SchemaCompatibilityForward),
			SchemaType:          to.Ptr(armeventhub.SchemaTypeAvro),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SchemaGroup = armeventhub.SchemaGroup{
	// 	Name: to.Ptr("testSchemaGroup1"),
	// 	Type: to.Ptr("Microsoft.EventHub/Namespaces/SchemaGroups"),
	// 	ID: to.Ptr("/subscriptions/e8baea74-64ce-459b-bee3-5aa4c47b3ae3/resourceGroups/alitest/providers/Microsoft.EventHub/namespaces/ali-ua-test-eh-system-1/schemagroups/testSchemaGroup1"),
	// 	Location: to.Ptr("EAST US 2 EUAP"),
	// 	Properties: &armeventhub.SchemaGroupProperties{
	// 		CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-10-13T03:08:11.167Z"); return t}()),
	// 		ETag: to.Ptr("51ddcff4-a287-423c-b194-7a8ebbfd8366"),
	// 		GroupProperties: map[string]*string{
	// 		},
	// 		SchemaCompatibility: to.Ptr(armeventhub.SchemaCompatibilityForward),
	// 		SchemaType: to.Ptr(armeventhub.SchemaTypeAvro),
	// 		UpdatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-10-13T03:08:11.167Z"); return t}()),
	// 	},
	// }
}
Output:

func (*SchemaRegistryClient) Delete added in v0.2.0

func (client *SchemaRegistryClient) Delete(ctx context.Context, resourceGroupName string, namespaceName string, schemaGroupName string, options *SchemaRegistryClientDeleteOptions) (SchemaRegistryClientDeleteResponse, error)

Delete - If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • schemaGroupName - The Schema Group name
  • options - SchemaRegistryClientDeleteOptions contains the optional parameters for the SchemaRegistryClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/SchemaRegistry/SchemaRegistryDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewSchemaRegistryClient().Delete(ctx, "alitest", "ali-ua-test-eh-system-1", "testSchemaGroup1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*SchemaRegistryClient) Get added in v0.2.0

func (client *SchemaRegistryClient) Get(ctx context.Context, resourceGroupName string, namespaceName string, schemaGroupName string, options *SchemaRegistryClientGetOptions) (SchemaRegistryClientGetResponse, error)

Get - If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • schemaGroupName - The Schema Group name
  • options - SchemaRegistryClientGetOptions contains the optional parameters for the SchemaRegistryClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/SchemaRegistry/SchemaRegistryGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSchemaRegistryClient().Get(ctx, "alitest", "ali-ua-test-eh-system-1", "testSchemaGroup1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SchemaGroup = armeventhub.SchemaGroup{
	// 	Name: to.Ptr("testSchemaGroup1"),
	// 	Type: to.Ptr("Microsoft.EventHub/Namespaces/SchemaGroups"),
	// 	ID: to.Ptr("/subscriptions/e8baea74-64ce-459b-bee3-5aa4c47b3ae3/resourceGroups/alitest/providers/Microsoft.EventHub/namespaces/ali-ua-test-eh-system-1/schemagroups/testSchemaGroup1"),
	// 	Location: to.Ptr("EAST US 2 EUAP"),
	// 	Properties: &armeventhub.SchemaGroupProperties{
	// 		CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-10-13T03:08:11.167Z"); return t}()),
	// 		ETag: to.Ptr("51ddcff4-a287-423c-b194-7a8ebbfd8366"),
	// 		GroupProperties: map[string]*string{
	// 		},
	// 		SchemaCompatibility: to.Ptr(armeventhub.SchemaCompatibilityForward),
	// 		SchemaType: to.Ptr(armeventhub.SchemaTypeAvro),
	// 		UpdatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-10-13T03:08:11.167Z"); return t}()),
	// 	},
	// }
}
Output:

func (*SchemaRegistryClient) NewListByNamespacePager added in v0.5.0

func (client *SchemaRegistryClient) NewListByNamespacePager(resourceGroupName string, namespaceName string, options *SchemaRegistryClientListByNamespaceOptions) *runtime.Pager[SchemaRegistryClientListByNamespaceResponse]

NewListByNamespacePager - Gets all the Schema Groups in a Namespace.

Generated from API version 2021-11-01

  • resourceGroupName - Name of the resource group within the azure subscription.
  • namespaceName - The Namespace name
  • options - SchemaRegistryClientListByNamespaceOptions contains the optional parameters for the SchemaRegistryClient.NewListByNamespacePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/SchemaRegistry/SchemaRegistryListByNamespace.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventhub/armeventhub"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armeventhub.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSchemaRegistryClient().NewListByNamespacePager("alitest", "ali-ua-test-eh-system-1", &armeventhub.SchemaRegistryClientListByNamespaceOptions{Skip: nil,
		Top: nil,
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SchemaGroupListResult = armeventhub.SchemaGroupListResult{
		// 	Value: []*armeventhub.SchemaGroup{
		// 		{
		// 			Name: to.Ptr("testSchemaGroup1"),
		// 			Type: to.Ptr("Microsoft.EventHub/Namespaces/SchemaGroups"),
		// 			ID: to.Ptr("/subscriptions/e8baea74-64ce-459b-bee3-5aa4c47b3ae3/resourceGroups/alitest/providers/Microsoft.EventHub/namespaces/ali-ua-test-eh-system-1/schemagroups/testSchemaGroup1"),
		// 			Location: to.Ptr("EAST US 2 EUAP"),
		// 			Properties: &armeventhub.SchemaGroupProperties{
		// 				CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-10-13T03:08:11.167Z"); return t}()),
		// 				ETag: to.Ptr("51ddcff4-a287-423c-b194-7a8ebbfd8366"),
		// 				GroupProperties: map[string]*string{
		// 				},
		// 				SchemaCompatibility: to.Ptr(armeventhub.SchemaCompatibilityForward),
		// 				SchemaType: to.Ptr(armeventhub.SchemaTypeAvro),
		// 				UpdatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-10-13T03:08:11.167Z"); return t}()),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("testSchemaGroup2"),
		// 			Type: to.Ptr("Microsoft.EventHub/Namespaces/SchemaGroups"),
		// 			ID: to.Ptr("/subscriptions/e8baea74-64ce-459b-bee3-5aa4c47b3ae3/resourceGroups/alitest/providers/Microsoft.EventHub/namespaces/ali-ua-test-eh-system-1/schemagroups/testSchemaGroup2"),
		// 			Location: to.Ptr("EAST US 2 EUAP"),
		// 			Properties: &armeventhub.SchemaGroupProperties{
		// 				CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-10-13T03:10:33.697Z"); return t}()),
		// 				ETag: to.Ptr("d01173a4-08c5-43c9-b30f-d9666196a907"),
		// 				GroupProperties: map[string]*string{
		// 				},
		// 				SchemaCompatibility: to.Ptr(armeventhub.SchemaCompatibilityNone),
		// 				SchemaType: to.Ptr(armeventhub.SchemaTypeAvro),
		// 				UpdatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-10-13T03:10:33.697Z"); return t}()),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("testSchemaGroup3"),
		// 			Type: to.Ptr("Microsoft.EventHub/Namespaces/SchemaGroups"),
		// 			ID: to.Ptr("/subscriptions/e8baea74-64ce-459b-bee3-5aa4c47b3ae3/resourceGroups/alitest/providers/Microsoft.EventHub/namespaces/ali-ua-test-eh-system-1/schemagroups/testSchemaGroup3"),
		// 			Location: to.Ptr("EAST US 2 EUAP"),
		// 			Properties: &armeventhub.SchemaGroupProperties{
		// 				CreatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-10-13T03:13:30.893Z"); return t}()),
		// 				ETag: to.Ptr("2c1c3d08-2fb8-4a4e-91f4-6e8b940c1b7c"),
		// 				GroupProperties: map[string]*string{
		// 				},
		// 				SchemaCompatibility: to.Ptr(armeventhub.SchemaCompatibilityBackward),
		// 				SchemaType: to.Ptr(armeventhub.SchemaTypeAvro),
		// 				UpdatedAtUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-10-13T03:13:30.893Z"); return t}()),
		// 			},
		// 	}},
		// }
	}
}
Output:

type SchemaRegistryClientCreateOrUpdateOptions added in v0.3.0

type SchemaRegistryClientCreateOrUpdateOptions struct {
}

SchemaRegistryClientCreateOrUpdateOptions contains the optional parameters for the SchemaRegistryClient.CreateOrUpdate method.

type SchemaRegistryClientCreateOrUpdateResponse added in v0.3.0

type SchemaRegistryClientCreateOrUpdateResponse struct {
	// Single item in List or Get Schema Group operation
	SchemaGroup
}

SchemaRegistryClientCreateOrUpdateResponse contains the response from method SchemaRegistryClient.CreateOrUpdate.

type SchemaRegistryClientDeleteOptions added in v0.3.0

type SchemaRegistryClientDeleteOptions struct {
}

SchemaRegistryClientDeleteOptions contains the optional parameters for the SchemaRegistryClient.Delete method.

type SchemaRegistryClientDeleteResponse added in v0.3.0

type SchemaRegistryClientDeleteResponse struct {
}

SchemaRegistryClientDeleteResponse contains the response from method SchemaRegistryClient.Delete.

type SchemaRegistryClientGetOptions added in v0.3.0

type SchemaRegistryClientGetOptions struct {
}

SchemaRegistryClientGetOptions contains the optional parameters for the SchemaRegistryClient.Get method.

type SchemaRegistryClientGetResponse added in v0.3.0

type SchemaRegistryClientGetResponse struct {
	// Single item in List or Get Schema Group operation
	SchemaGroup
}

SchemaRegistryClientGetResponse contains the response from method SchemaRegistryClient.Get.

type SchemaRegistryClientListByNamespaceOptions added in v0.3.0

type SchemaRegistryClientListByNamespaceOptions struct {
	// Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element,
	// the value of the nextLink element will include a skip parameter that specifies
	// a starting point to use for subsequent calls.
	Skip *int32

	// May be used to limit the number of results to the most recent N usageDetails.
	Top *int32
}

SchemaRegistryClientListByNamespaceOptions contains the optional parameters for the SchemaRegistryClient.NewListByNamespacePager method.

type SchemaRegistryClientListByNamespaceResponse added in v0.3.0

type SchemaRegistryClientListByNamespaceResponse struct {
	// The result of the List SchemaGroup operation.
	SchemaGroupListResult
}

SchemaRegistryClientListByNamespaceResponse contains the response from method SchemaRegistryClient.NewListByNamespacePager.

type SchemaType added in v0.2.0

type SchemaType string
const (
	SchemaTypeAvro    SchemaType = "Avro"
	SchemaTypeUnknown SchemaType = "Unknown"
)

func PossibleSchemaTypeValues added in v0.2.0

func PossibleSchemaTypeValues() []SchemaType

PossibleSchemaTypeValues returns the possible values for the SchemaType const type.

type Subnet

type Subnet struct {
	// Resource ID of Virtual Network Subnet
	ID *string
}

Subnet - Properties supplied for Subnet

func (Subnet) MarshalJSON added in v1.1.0

func (s Subnet) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Subnet.

func (*Subnet) UnmarshalJSON added in v1.1.0

func (s *Subnet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Subnet.

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time

	// The identity that created the resource.
	CreatedBy *string

	// The type of identity that created the resource.
	CreatedByType *CreatedByType

	// The type of identity that last modified the resource.
	LastModifiedAt *time.Time

	// The identity that last modified the resource.
	LastModifiedBy *string

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON

func (s SystemData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type TrackedResource

type TrackedResource struct {
	// Resource location.
	Location *string

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

TrackedResource - Definition of resource.

func (TrackedResource) MarshalJSON

func (t TrackedResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TrackedResource.

func (*TrackedResource) UnmarshalJSON added in v1.1.0

func (t *TrackedResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.

type UnavailableReason

type UnavailableReason string

UnavailableReason - Specifies the reason for the unavailability of the service.

const (
	UnavailableReasonInvalidName                           UnavailableReason = "InvalidName"
	UnavailableReasonNameInLockdown                        UnavailableReason = "NameInLockdown"
	UnavailableReasonNameInUse                             UnavailableReason = "NameInUse"
	UnavailableReasonNone                                  UnavailableReason = "None"
	UnavailableReasonSubscriptionIsDisabled                UnavailableReason = "SubscriptionIsDisabled"
	UnavailableReasonTooManyNamespaceInCurrentSubscription UnavailableReason = "TooManyNamespaceInCurrentSubscription"
)

func PossibleUnavailableReasonValues

func PossibleUnavailableReasonValues() []UnavailableReason

PossibleUnavailableReasonValues returns the possible values for the UnavailableReason const type.

type UserAssignedIdentity

type UserAssignedIdentity struct {
	// READ-ONLY; Client Id of user assigned identity
	ClientID *string

	// READ-ONLY; Principal Id of user assigned identity
	PrincipalID *string
}

UserAssignedIdentity - Recognized Dictionary value.

func (UserAssignedIdentity) MarshalJSON added in v1.1.0

func (u UserAssignedIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity.

func (*UserAssignedIdentity) UnmarshalJSON added in v1.1.0

func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity.

type UserAssignedIdentityProperties

type UserAssignedIdentityProperties struct {
	// ARM ID of user Identity selected for encryption
	UserAssignedIdentity *string
}

func (UserAssignedIdentityProperties) MarshalJSON added in v1.1.0

func (u UserAssignedIdentityProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentityProperties.

func (*UserAssignedIdentityProperties) UnmarshalJSON added in v1.1.0

func (u *UserAssignedIdentityProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentityProperties.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL