armeventhub

package module
v1.1.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: MIT Imports: 17 Imported by: 30

README

Azure Event Hubs Module for Go

PkgGoDev

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

Source code

Getting started

Prerequisites

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.

Clients

Azure Event Hubs modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential.

client, err := armeventhub.NewPrivateEndpointConnectionsClient(<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,
    },
}
client, err := armeventhub.NewPrivateEndpointConnectionsClient(<subscription ID>, cred, &options)

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 `json:"aliasPrimaryConnectionString,omitempty" azure:"ro"`

	// READ-ONLY; Secondary connection string of the alias if GEO DR is enabled
	AliasSecondaryConnectionString *string `json:"aliasSecondaryConnectionString,omitempty" azure:"ro"`

	// READ-ONLY; A string that describes the AuthorizationRule.
	KeyName *string `json:"keyName,omitempty" azure:"ro"`

	// READ-ONLY; Primary connection string of the created namespace AuthorizationRule.
	PrimaryConnectionString *string `json:"primaryConnectionString,omitempty" azure:"ro"`

	// READ-ONLY; A base64-encoded 256-bit primary key for signing and validating the SAS token.
	PrimaryKey *string `json:"primaryKey,omitempty" azure:"ro"`

	// READ-ONLY; Secondary connection string of the created namespace AuthorizationRule.
	SecondaryConnectionString *string `json:"secondaryConnectionString,omitempty" azure:"ro"`

	// READ-ONLY; A base64-encoded 256-bit primary key for signing and validating the SAS token.
	SecondaryKey *string `json:"secondaryKey,omitempty" azure:"ro"`
}

AccessKeys - Namespace/EventHub Connection String

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 ApplicationGroup

type ApplicationGroup struct {
	Properties *ApplicationGroupProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The geo-location where the resource lives
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string `json:"type,omitempty" azure:"ro"`
}

ApplicationGroup - The Application Group object

type ApplicationGroupClient

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

ApplicationGroupClient contains the methods for the ApplicationGroup group. Don't use this type directly, use NewApplicationGroupClient() instead.

func NewApplicationGroupClient

func NewApplicationGroupClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationGroupClient, error)

NewApplicationGroupClient creates a new instance of ApplicationGroupClient 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 (*ApplicationGroupClient) CreateOrUpdateApplicationGroup

func (client *ApplicationGroupClient) CreateOrUpdateApplicationGroup(ctx context.Context, resourceGroupName string, namespaceName string, applicationGroupName string, parameters ApplicationGroup, options *ApplicationGroupClientCreateOrUpdateApplicationGroupOptions) (ApplicationGroupClientCreateOrUpdateApplicationGroupResponse, error)

CreateOrUpdateApplicationGroup - Creates or updates an ApplicationGroup for a Namespace. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview resourceGroupName - Name of the resource group within the azure subscription. namespaceName - The Namespace name applicationGroupName - The Application Group name parameters - The ApplicationGroup. options - ApplicationGroupClientCreateOrUpdateApplicationGroupOptions contains the optional parameters for the ApplicationGroupClient.CreateOrUpdateApplicationGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/ApplicationGroup/ApplicationGroupCreate.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()
	client, err := armeventhub.NewApplicationGroupClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdateApplicationGroup(ctx,
		"contosotest",
		"contoso-ua-test-eh-system-1",
		"appGroup1",
		armeventhub.ApplicationGroup{
			Properties: &armeventhub.ApplicationGroupProperties{
				ClientAppGroupIdentifier: to.Ptr("SASKeyName=KeyName"),
				IsEnabled:                to.Ptr(true),
				Policies: []armeventhub.ApplicationGroupPolicyClassification{
					&armeventhub.ThrottlingPolicy{
						Name:               to.Ptr("ThrottlingPolicy1"),
						Type:               to.Ptr(armeventhub.ApplicationGroupPolicyTypeThrottlingPolicy),
						MetricID:           to.Ptr(armeventhub.MetricIDIncomingMessages),
						RateLimitThreshold: to.Ptr[int64](7912),
					},
					&armeventhub.ThrottlingPolicy{
						Name:               to.Ptr("ThrottlingPolicy2"),
						Type:               to.Ptr(armeventhub.ApplicationGroupPolicyTypeThrottlingPolicy),
						MetricID:           to.Ptr(armeventhub.MetricIDIncomingBytes),
						RateLimitThreshold: to.Ptr[int64](3951729),
					},
					&armeventhub.ThrottlingPolicy{
						Name:               to.Ptr("ThrottlingPolicy3"),
						Type:               to.Ptr(armeventhub.ApplicationGroupPolicyTypeThrottlingPolicy),
						MetricID:           to.Ptr(armeventhub.MetricIDOutgoingBytes),
						RateLimitThreshold: to.Ptr[int64](245175),
					}},
			},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ApplicationGroupClient) Delete

func (client *ApplicationGroupClient) Delete(ctx context.Context, resourceGroupName string, namespaceName string, applicationGroupName string, options *ApplicationGroupClientDeleteOptions) (ApplicationGroupClientDeleteResponse, error)

Delete - Deletes an ApplicationGroup for a Namespace. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview resourceGroupName - Name of the resource group within the azure subscription. namespaceName - The Namespace name applicationGroupName - The Application Group name options - ApplicationGroupClientDeleteOptions contains the optional parameters for the ApplicationGroupClient.Delete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/ApplicationGroup/ApplicationGroupDelete.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()
	client, err := armeventhub.NewApplicationGroupClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.Delete(ctx,
		"contosotest",
		"contoso-ua-test-eh-system-1",
		"appGroup1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*ApplicationGroupClient) Get

func (client *ApplicationGroupClient) Get(ctx context.Context, resourceGroupName string, namespaceName string, applicationGroupName string, options *ApplicationGroupClientGetOptions) (ApplicationGroupClientGetResponse, error)

Get - Gets an ApplicationGroup for a Namespace. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview resourceGroupName - Name of the resource group within the azure subscription. namespaceName - The Namespace name applicationGroupName - The Application Group name options - ApplicationGroupClientGetOptions contains the optional parameters for the ApplicationGroupClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/ApplicationGroup/ApplicationGroupGet.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()
	client, err := armeventhub.NewApplicationGroupClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"contosotest",
		"contoso-ua-test-eh-system-1",
		"appGroup1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ApplicationGroupClient) NewListByNamespacePager

func (client *ApplicationGroupClient) NewListByNamespacePager(resourceGroupName string, namespaceName string, options *ApplicationGroupClientListByNamespaceOptions) *runtime.Pager[ApplicationGroupClientListByNamespaceResponse]

NewListByNamespacePager - Gets a list of application groups for a Namespace. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview resourceGroupName - Name of the resource group within the azure subscription. namespaceName - The Namespace name options - ApplicationGroupClientListByNamespaceOptions contains the optional parameters for the ApplicationGroupClient.ListByNamespace method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/ApplicationGroup/ApplicationGroupListByNamespace.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()
	client, err := armeventhub.NewApplicationGroupClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByNamespacePager("contosotest",
		"contoso-ua-test-eh-system-1",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type ApplicationGroupClientCreateOrUpdateApplicationGroupOptions

type ApplicationGroupClientCreateOrUpdateApplicationGroupOptions struct {
}

ApplicationGroupClientCreateOrUpdateApplicationGroupOptions contains the optional parameters for the ApplicationGroupClient.CreateOrUpdateApplicationGroup method.

type ApplicationGroupClientCreateOrUpdateApplicationGroupResponse

type ApplicationGroupClientCreateOrUpdateApplicationGroupResponse struct {
	ApplicationGroup
}

ApplicationGroupClientCreateOrUpdateApplicationGroupResponse contains the response from method ApplicationGroupClient.CreateOrUpdateApplicationGroup.

type ApplicationGroupClientDeleteOptions

type ApplicationGroupClientDeleteOptions struct {
}

ApplicationGroupClientDeleteOptions contains the optional parameters for the ApplicationGroupClient.Delete method.

type ApplicationGroupClientDeleteResponse

type ApplicationGroupClientDeleteResponse struct {
}

ApplicationGroupClientDeleteResponse contains the response from method ApplicationGroupClient.Delete.

type ApplicationGroupClientGetOptions

type ApplicationGroupClientGetOptions struct {
}

ApplicationGroupClientGetOptions contains the optional parameters for the ApplicationGroupClient.Get method.

type ApplicationGroupClientGetResponse

type ApplicationGroupClientGetResponse struct {
	ApplicationGroup
}

ApplicationGroupClientGetResponse contains the response from method ApplicationGroupClient.Get.

type ApplicationGroupClientListByNamespaceOptions

type ApplicationGroupClientListByNamespaceOptions struct {
}

ApplicationGroupClientListByNamespaceOptions contains the optional parameters for the ApplicationGroupClient.ListByNamespace method.

type ApplicationGroupClientListByNamespaceResponse

type ApplicationGroupClientListByNamespaceResponse struct {
	ApplicationGroupListResult
}

ApplicationGroupClientListByNamespaceResponse contains the response from method ApplicationGroupClient.ListByNamespace.

type ApplicationGroupListResult

type ApplicationGroupListResult struct {
	// Result of the List Application Groups operation.
	Value []*ApplicationGroup `json:"value,omitempty"`

	// READ-ONLY; Link to the next set of results. Not empty if Value contains an incomplete list of Authorization Rules
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

ApplicationGroupListResult - The response from the List Application Groups operation.

type ApplicationGroupPolicy

type ApplicationGroupPolicy struct {
	// REQUIRED; The Name of this policy
	Name *string `json:"name,omitempty"`

	// REQUIRED; Application Group Policy types
	Type *ApplicationGroupPolicyType `json:"type,omitempty"`
}

ApplicationGroupPolicy - Properties of the Application Group policy

func (*ApplicationGroupPolicy) GetApplicationGroupPolicy

func (a *ApplicationGroupPolicy) GetApplicationGroupPolicy() *ApplicationGroupPolicy

GetApplicationGroupPolicy implements the ApplicationGroupPolicyClassification interface for type ApplicationGroupPolicy.

type ApplicationGroupPolicyClassification

type ApplicationGroupPolicyClassification interface {
	// GetApplicationGroupPolicy returns the ApplicationGroupPolicy content of the underlying type.
	GetApplicationGroupPolicy() *ApplicationGroupPolicy
}

ApplicationGroupPolicyClassification provides polymorphic access to related types. Call the interface's GetApplicationGroupPolicy() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ApplicationGroupPolicy, *ThrottlingPolicy

type ApplicationGroupPolicyType

type ApplicationGroupPolicyType string

ApplicationGroupPolicyType - Application Group Policy types

const (
	ApplicationGroupPolicyTypeThrottlingPolicy ApplicationGroupPolicyType = "ThrottlingPolicy"
)

func PossibleApplicationGroupPolicyTypeValues

func PossibleApplicationGroupPolicyTypeValues() []ApplicationGroupPolicyType

PossibleApplicationGroupPolicyTypeValues returns the possible values for the ApplicationGroupPolicyType const type.

type ApplicationGroupProperties

type ApplicationGroupProperties struct {
	// REQUIRED; The Unique identifier for application group.Supports SAS(SASKeyName=KeyName) or AAD(AADAppID=Guid)
	ClientAppGroupIdentifier *string `json:"clientAppGroupIdentifier,omitempty"`

	// Determines if Application Group is allowed to create connection with namespace or not. Once the isEnabled is set to false,
	// all the existing connections of application group gets dropped and no new
	// connections will be allowed
	IsEnabled *bool `json:"isEnabled,omitempty"`

	// List of group policies that define the behavior of application group. The policies can support resource governance scenarios
	// such as limiting ingress or egress traffic.
	Policies []ApplicationGroupPolicyClassification `json:"policies,omitempty"`
}

func (ApplicationGroupProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ApplicationGroupProperties.

func (*ApplicationGroupProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationGroupProperties.

type ArmDisasterRecovery

type ArmDisasterRecovery struct {
	// Properties required to the Create Or Update Alias(Disaster Recovery configurations)
	Properties *ArmDisasterRecoveryProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The geo-location where the resource lives
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string `json:"type,omitempty" azure:"ro"`
}

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

type ArmDisasterRecoveryListResult

type ArmDisasterRecoveryListResult struct {
	// List of Alias(Disaster Recovery configurations)
	Value []*ArmDisasterRecovery `json:"value,omitempty"`

	// READ-ONLY; Link to the next set of results. Not empty if Value contains incomplete list of Alias(Disaster Recovery configuration)
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`
}

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

type ArmDisasterRecoveryProperties

type ArmDisasterRecoveryProperties struct {
	// Alternate name specified when alias and namespace names are same.
	AlternateName *string `json:"alternateName,omitempty"`

	// ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing
	PartnerNamespace *string `json:"partnerNamespace,omitempty"`

	// READ-ONLY; Number of entities pending to be replicated.
	PendingReplicationOperationsCount *int64 `json:"pendingReplicationOperationsCount,omitempty" azure:"ro"`

	// READ-ONLY; Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded'
	// or 'Failed'
	ProvisioningState *ProvisioningStateDR `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary'
	Role *RoleDisasterRecovery `json:"role,omitempty" azure:"ro"`
}

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

type AuthorizationRule

type AuthorizationRule struct {
	// Properties supplied to create or update AuthorizationRule
	Properties *AuthorizationRuleProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The geo-location where the resource lives
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string `json:"type,omitempty" azure:"ro"`
}

AuthorizationRule - Single item in a List or Get AuthorizationRule operation

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 `json:"nextLink,omitempty"`

	// Result of the List Authorization Rules operation.
	Value []*AuthorizationRule `json:"value,omitempty"`
}

AuthorizationRuleListResult - The response from the List namespace operation.

type AuthorizationRuleProperties

type AuthorizationRuleProperties struct {
	// REQUIRED; The rights associated with the rule.
	Rights []*AccessRights `json:"rights,omitempty"`
}

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.

type AvailableCluster

type AvailableCluster struct {
	// Location fo the Available Cluster
	Location *string `json:"location,omitempty"`
}

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

type AvailableClustersList

type AvailableClustersList struct {
	// The count of readily available and pre-provisioned Event Hubs Clusters per region.
	Value []*AvailableCluster `json:"value,omitempty"`
}

AvailableClustersList - The response of the List Available Clusters operation.

type CaptureDescription

type CaptureDescription struct {
	// Properties of Destination where capture will be stored. (Storage Account, Blob Names)
	Destination *Destination `json:"destination,omitempty"`

	// A value that indicates whether capture description is enabled.
	Enabled *bool `json:"enabled,omitempty"`

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

	// 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 `json:"intervalInSeconds,omitempty"`

	// 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 `json:"sizeLimitInBytes,omitempty"`

	// A value that indicates whether to Skip Empty Archives
	SkipEmptyArchives *bool `json:"skipEmptyArchives,omitempty"`
}

CaptureDescription - Properties to configure capture description for eventhub

type CheckNameAvailabilityParameter

type CheckNameAvailabilityParameter struct {
	// REQUIRED; Name to check the namespace name availability
	Name *string `json:"name,omitempty"`
}

CheckNameAvailabilityParameter - Parameter supplied to check Namespace name availability operation

type CheckNameAvailabilityResult

type CheckNameAvailabilityResult struct {
	// Value indicating Namespace is availability, true if the Namespace is available; otherwise, false.
	NameAvailable *bool `json:"nameAvailable,omitempty"`

	// The reason for unavailability of a Namespace.
	Reason *UnavailableReason `json:"reason,omitempty"`

	// READ-ONLY; The detailed info regarding the reason associated with the Namespace.
	Message *string `json:"message,omitempty" azure:"ro"`
}

CheckNameAvailabilityResult - The Result of the CheckNameAvailability operation

type Cluster

type Cluster struct {
	// Resource location.
	Location *string `json:"location,omitempty"`

	// Event Hubs Cluster properties supplied in responses in List or Get operations.
	Properties *ClusterProperties `json:"properties,omitempty"`

	// Properties of the cluster SKU.
	SKU *ClusterSKU `json:"sku,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

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.

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 `json:"nextLink,omitempty"`

	// The Event Hubs Clusters present in the List Event Hubs operation results.
	Value []*Cluster `json:"value,omitempty"`
}

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

type ClusterProperties

type ClusterProperties struct {
	// A value that indicates whether Scaling is Supported.
	SupportsScaling *bool `json:"supportsScaling,omitempty"`

	// READ-ONLY; The UTC time when the Event Hubs Cluster was created.
	CreatedAt *string `json:"createdAt,omitempty" azure:"ro"`

	// READ-ONLY; The metric ID of the cluster resource. Provided by the service and not modifiable by the user.
	MetricID *string `json:"metricId,omitempty" azure:"ro"`

	// READ-ONLY; Status of the Cluster resource
	Status *string `json:"status,omitempty" azure:"ro"`

	// READ-ONLY; The UTC time when the Event Hubs Cluster was last updated.
	UpdatedAt *string `json:"updatedAt,omitempty" azure:"ro"`
}

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

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 `json:"settings,omitempty"`
}

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.

type ClusterSKU

type ClusterSKU struct {
	// REQUIRED; Name of this SKU.
	Name *ClusterSKUName `json:"name,omitempty"`

	// The quantity of Event Hubs Cluster Capacity Units contained in this cluster.
	Capacity *int32 `json:"capacity,omitempty"`
}

ClusterSKU - SKU parameters particular to a cluster instance.

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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewClustersClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.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)
	}
	// TODO: use response item
	_ = res
}
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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewClustersClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewClustersClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.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)
	}
	// TODO: use response item
	_ = res
}
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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewClustersClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"testCluster",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
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 2022-01-01-preview options - ClustersClientListAvailableClusterRegionOptions contains the optional parameters for the ClustersClient.ListAvailableClusterRegion method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewClustersClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.ListAvailableClusterRegion(ctx,
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewClustersClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.ListNamespaces(ctx,
		"myResourceGroup",
		"testCluster",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
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 If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview resourceGroupName - Name of the resource group within the azure subscription. options - ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewClustersClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("myResourceGroup",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*ClustersClient) NewListBySubscriptionPager added in v0.5.0

NewListBySubscriptionPager - Lists the available Event Hubs Clusters within an ARM resource group If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview options - ClustersClientListBySubscriptionOptions contains the optional parameters for the ClustersClient.ListBySubscription method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewClustersClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListBySubscriptionPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
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 {
	Cluster
}

ClustersClientCreateOrUpdateResponse contains the response from method ClustersClient.CreateOrUpdate.

type ClustersClientDeleteResponse added in v0.3.0

type ClustersClientDeleteResponse struct {
}

ClustersClientDeleteResponse contains the response from method ClustersClient.Delete.

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 {
	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 {
	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.ListByResourceGroup method.

type ClustersClientListByResourceGroupResponse added in v0.3.0

type ClustersClientListByResourceGroupResponse struct {
	ClusterListResult
}

ClustersClientListByResourceGroupResponse contains the response from method ClustersClient.ListByResourceGroup.

type ClustersClientListBySubscriptionOptions added in v0.3.0

type ClustersClientListBySubscriptionOptions struct {
}

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

type ClustersClientListBySubscriptionResponse added in v0.3.0

type ClustersClientListBySubscriptionResponse struct {
	ClusterListResult
}

ClustersClientListBySubscriptionResponse contains the response from method ClustersClient.ListBySubscription.

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 {
	EHNamespaceIDListResult
}

ClustersClientListNamespacesResponse contains the response from method ClustersClient.ListNamespaces.

type ClustersClientUpdateResponse added in v0.3.0

type ClustersClientUpdateResponse struct {
	Cluster
}

ClustersClientUpdateResponse contains the response from method ClustersClient.Update.

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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewConfigurationClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"testCluster",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewConfigurationClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.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)
	}
	// TODO: use response item
	_ = res
}
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 {
	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 {
	ClusterQuotaConfigurationProperties
}

ConfigurationClientPatchResponse contains the response from method ConfigurationClient.Patch.

type ConnectionState

type ConnectionState struct {
	// Description of the connection state.
	Description *string `json:"description,omitempty"`

	// Status of the connection.
	Status *PrivateLinkConnectionStatus `json:"status,omitempty"`
}

ConnectionState information.

type ConsumerGroup

type ConsumerGroup struct {
	// Single item in List or Get Consumer group operation
	Properties *ConsumerGroupProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The geo-location where the resource lives
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string `json:"type,omitempty" azure:"ro"`
}

ConsumerGroup - Single item in List or Get Consumer group operation

type ConsumerGroupListResult

type ConsumerGroupListResult struct {
	// Link to the next set of results. Not empty if Value contains incomplete list of Consumer Group
	NextLink *string `json:"nextLink,omitempty"`

	// Result of the List Consumer Group operation.
	Value []*ConsumerGroup `json:"value,omitempty"`
}

ConsumerGroupListResult - The result to the List Consumer Group operation.

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 `json:"userMetadata,omitempty"`

	// READ-ONLY; Exact time the message was created.
	CreatedAt *time.Time `json:"createdAt,omitempty" azure:"ro"`

	// READ-ONLY; The exact time the message was updated.
	UpdatedAt *time.Time `json:"updatedAt,omitempty" azure:"ro"`
}

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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewConsumerGroupsClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.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)
	}
	// TODO: use response item
	_ = res
}
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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewConsumerGroupsClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewConsumerGroupsClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.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)
	}
	// TODO: use response item
	_ = res
}
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview 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.ListByEventHub method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewConsumerGroupsClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByEventHubPager("ArunMonocle",
		"sdk-Namespace-2661",
		"sdk-EventHub-6681",
		&armeventhub.ConsumerGroupsClientListByEventHubOptions{Skip: nil,
			Top: nil,
		})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
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 {
	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 {
	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.ListByEventHub method.

type ConsumerGroupsClientListByEventHubResponse added in v0.3.0

type ConsumerGroupsClientListByEventHubResponse struct {
	ConsumerGroupListResult
}

ConsumerGroupsClientListByEventHubResponse contains the response from method ConsumerGroupsClient.ListByEventHub.

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 `json:"name,omitempty"`

	// Properties describing the storage account, blob container and archive name format for capture destination
	Properties *DestinationProperties `json:"properties,omitempty"`
}

Destination - Capture storage details for capture description

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 `json:"archiveNameFormat,omitempty"`

	// Blob container Name
	BlobContainer *string `json:"blobContainer,omitempty"`

	// The Azure Data Lake Store name for the captured events
	DataLakeAccountName *string `json:"dataLakeAccountName,omitempty"`

	// The destination folder path for the captured events
	DataLakeFolderPath *string `json:"dataLakeFolderPath,omitempty"`

	// Subscription Id of Azure Data Lake Store
	DataLakeSubscriptionID *string `json:"dataLakeSubscriptionId,omitempty"`

	// Resource id of the storage account to be used to create the blobs
	StorageAccountResourceID *string `json:"storageAccountResourceId,omitempty"`
}

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

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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewDisasterRecoveryConfigsClient("exampleSubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewDisasterRecoveryConfigsClient("exampleSubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.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)
	}
	// TODO: use response item
	_ = res
}
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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewDisasterRecoveryConfigsClient("exampleSubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.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)
	}
	// TODO: use response item
	_ = res
}
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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewDisasterRecoveryConfigsClient("exampleSubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewDisasterRecoveryConfigsClient("exampleSubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewDisasterRecoveryConfigsClient("exampleSubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"exampleResourceGroup",
		"sdk-Namespace-8859",
		"sdk-DisasterRecovery-3814",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewDisasterRecoveryConfigsClient("exampleSubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.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)
	}
	// TODO: use response item
	_ = res
}
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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewDisasterRecoveryConfigsClient("exampleSubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*DisasterRecoveryConfigsClient) NewListAuthorizationRulesPager added in v0.5.0

NewListAuthorizationRulesPager - Gets a list of authorization rules for a Namespace. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview 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.ListAuthorizationRules method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewDisasterRecoveryConfigsClient("exampleSubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListAuthorizationRulesPager("exampleResourceGroup",
		"sdk-Namespace-9080",
		"sdk-DisasterRecovery-4047",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*DisasterRecoveryConfigsClient) NewListPager added in v0.5.0

NewListPager - Gets all Alias(Disaster Recovery configurations) If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview resourceGroupName - Name of the resource group within the azure subscription. namespaceName - The Namespace name options - DisasterRecoveryConfigsClientListOptions contains the optional parameters for the DisasterRecoveryConfigsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewDisasterRecoveryConfigsClient("exampleSubscriptionId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("exampleResourceGroup",
		"sdk-Namespace-8859",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
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 {
	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 {
	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 {
	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 {
	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.ListAuthorizationRules method.

type DisasterRecoveryConfigsClientListAuthorizationRulesResponse added in v0.3.0

type DisasterRecoveryConfigsClientListAuthorizationRulesResponse struct {
	AuthorizationRuleListResult
}

DisasterRecoveryConfigsClientListAuthorizationRulesResponse contains the response from method DisasterRecoveryConfigsClient.ListAuthorizationRules.

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 {
	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.List method.

type DisasterRecoveryConfigsClientListResponse added in v0.3.0

type DisasterRecoveryConfigsClientListResponse struct {
	ArmDisasterRecoveryListResult
}

DisasterRecoveryConfigsClientListResponse contains the response from method DisasterRecoveryConfigsClient.List.

type EHNamespace

type EHNamespace struct {
	// Properties of BYOK Identity description
	Identity *Identity `json:"identity,omitempty"`

	// Resource location.
	Location *string `json:"location,omitempty"`

	// Namespace properties supplied for create namespace operation.
	Properties *EHNamespaceProperties `json:"properties,omitempty"`

	// Properties of sku resource
	SKU *SKU `json:"sku,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

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.

type EHNamespaceIDContainer

type EHNamespaceIDContainer struct {
	// id parameter
	ID *string `json:"id,omitempty"`
}

EHNamespaceIDContainer - The full ARM ID of an Event Hubs Namespace

type EHNamespaceIDListResult

type EHNamespaceIDListResult struct {
	// Result of the List Namespace IDs operation
	Value []*EHNamespaceIDContainer `json:"value,omitempty"`
}

EHNamespaceIDListResult - The response of the List Namespace IDs operation

type EHNamespaceListResult

type EHNamespaceListResult struct {
	// Link to the next set of results. Not empty if Value contains incomplete list of namespaces.
	NextLink *string `json:"nextLink,omitempty"`

	// Result of the List Namespace operation
	Value []*EHNamespace `json:"value,omitempty"`
}

EHNamespaceListResult - The response of the List Namespace operation

type EHNamespaceProperties

type EHNamespaceProperties struct {
	// Alternate name specified when alias and namespace names are same.
	AlternateName *string `json:"alternateName,omitempty"`

	// Cluster ARM ID of the Namespace.
	ClusterArmID *string `json:"clusterArmId,omitempty"`

	// This property disables SAS authentication for the Event Hubs namespace.
	DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"`

	// Properties of BYOK Encryption description
	Encryption *Encryption `json:"encryption,omitempty"`

	// Value that indicates whether AutoInflate is enabled for eventhub namespace.
	IsAutoInflateEnabled *bool `json:"isAutoInflateEnabled,omitempty"`

	// Value that indicates whether Kafka is enabled for eventhub namespace.
	KafkaEnabled *bool `json:"kafkaEnabled,omitempty"`

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

	// The minimum TLS version for the cluster to support, e.g. '1.2'
	MinimumTLSVersion *TLSVersion `json:"minimumTlsVersion,omitempty"`

	// List of private endpoint connections.
	PrivateEndpointConnections []*PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`

	// This determines if traffic is allowed over public network. By default it is enabled.
	PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`

	// Enabling this property creates a Standard Event Hubs Namespace in regions supported availability zones.
	ZoneRedundant *bool `json:"zoneRedundant,omitempty"`

	// READ-ONLY; The time the Namespace was created.
	CreatedAt *time.Time `json:"createdAt,omitempty" azure:"ro"`

	// READ-ONLY; Identifier for Azure Insights metrics.
	MetricID *string `json:"metricId,omitempty" azure:"ro"`

	// READ-ONLY; Provisioning state of the Namespace.
	ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; Endpoint you can use to perform Service Bus operations.
	ServiceBusEndpoint *string `json:"serviceBusEndpoint,omitempty" azure:"ro"`

	// READ-ONLY; Status of the Namespace.
	Status *string `json:"status,omitempty" azure:"ro"`

	// READ-ONLY; The time the Namespace was updated.
	UpdatedAt *time.Time `json:"updatedAt,omitempty" azure:"ro"`
}

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 `json:"keySource,omitempty"`

	// Properties of KeyVault
	KeyVaultProperties []*KeyVaultProperties `json:"keyVaultProperties,omitempty"`

	// Enable Infrastructure Encryption (Double Encryption)
	RequireInfrastructureEncryption *bool `json:"requireInfrastructureEncryption,omitempty"`
}

Encryption - Properties to configure Encryption

func (Encryption) MarshalJSON

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

MarshalJSON implements the json.Marshaller 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"
	EntityStatusDisabled        EntityStatus = "Disabled"
	EntityStatusRestoring       EntityStatus = "Restoring"
	EntityStatusSendDisabled    EntityStatus = "SendDisabled"
	EntityStatusReceiveDisabled EntityStatus = "ReceiveDisabled"
	EntityStatusCreating        EntityStatus = "Creating"
	EntityStatusDeleting        EntityStatus = "Deleting"
	EntityStatusRenaming        EntityStatus = "Renaming"
	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 interface{} `json:"info,omitempty" azure:"ro"`

	// READ-ONLY; The additional info type.
	Type *string `json:"type,omitempty" azure:"ro"`
}

ErrorAdditionalInfo - The resource management error additional info.

type ErrorDetail added in v0.2.0

type ErrorDetail struct {
	// READ-ONLY; The error additional info.
	AdditionalInfo []*ErrorAdditionalInfo `json:"additionalInfo,omitempty" azure:"ro"`

	// READ-ONLY; The error code.
	Code *string `json:"code,omitempty" azure:"ro"`

	// READ-ONLY; The error details.
	Details []*ErrorDetail `json:"details,omitempty" azure:"ro"`

	// READ-ONLY; The error message.
	Message *string `json:"message,omitempty" azure:"ro"`

	// READ-ONLY; The error target.
	Target *string `json:"target,omitempty" azure:"ro"`
}

ErrorDetail - The error detail.

type ErrorResponse

type ErrorResponse struct {
	// The error object.
	Error *ErrorDetail `json:"error,omitempty"`
}

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

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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewEventHubsClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.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)
	}
	// TODO: use response item
	_ = res
}
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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewEventHubsClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.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)
	}
	// TODO: use response item
	_ = res
}
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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewEventHubsClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewEventHubsClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewEventHubsClient("e2f361f0-3b27-4503-a9cc-21cfba380093", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"Default-NotificationHubs-AustraliaEast",
		"sdk-Namespace-716",
		"sdk-EventHub-10",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewEventHubsClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.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)
	}
	// TODO: use response item
	_ = res
}
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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewEventHubsClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.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)
	}
	// TODO: use response item
	_ = res
}
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview 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.ListAuthorizationRules method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewEventHubsClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListAuthorizationRulesPager("ArunMonocle",
		"sdk-Namespace-960",
		"sdk-EventHub-532",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview resourceGroupName - Name of the resource group within the azure subscription. namespaceName - The Namespace name options - EventHubsClientListByNamespaceOptions contains the optional parameters for the EventHubsClient.ListByNamespace method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewEventHubsClient("e2f361f0-3b27-4503-a9cc-21cfba380093", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByNamespacePager("Default-NotificationHubs-AustraliaEast",
		"sdk-Namespace-5357",
		&armeventhub.EventHubsClientListByNamespaceOptions{Skip: nil,
			Top: nil,
		})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewEventHubsClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.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)
	}
	// TODO: use response item
	_ = res
}
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 {
	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 {
	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 {
	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 {
	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.ListAuthorizationRules method.

type EventHubsClientListAuthorizationRulesResponse added in v0.3.0

type EventHubsClientListAuthorizationRulesResponse struct {
	AuthorizationRuleListResult
}

EventHubsClientListAuthorizationRulesResponse contains the response from method EventHubsClient.ListAuthorizationRules.

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.ListByNamespace method.

type EventHubsClientListByNamespaceResponse added in v0.3.0

type EventHubsClientListByNamespaceResponse struct {
	ListResult
}

EventHubsClientListByNamespaceResponse contains the response from method EventHubsClient.ListByNamespace.

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 {
	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 {
	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 `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The geo-location where the resource lives
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string `json:"type,omitempty" azure:"ro"`
}

Eventhub - Single item in List or Get Event Hub operation

type Identity

type Identity struct {
	// Type of managed service identity.
	Type *ManagedServiceIdentityType `json:"type,omitempty"`

	// Properties for User Assigned Identities
	UserAssignedIdentities map[string]*UserAssignedIdentity `json:"userAssignedIdentities,omitempty"`

	// READ-ONLY; ObjectId from the KeyVault
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`

	// READ-ONLY; TenantId from the KeyVault
	TenantID *string `json:"tenantId,omitempty" azure:"ro"`
}

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.

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 `json:"identity,omitempty"`

	// Name of the Key from KeyVault
	KeyName *string `json:"keyName,omitempty"`

	// Uri of KeyVault
	KeyVaultURI *string `json:"keyVaultUri,omitempty"`

	// Key Version
	KeyVersion *string `json:"keyVersion,omitempty"`
}

KeyVaultProperties - Properties to configure keyVault Properties

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 `json:"nextLink,omitempty"`

	// Result of the List EventHubs operation.
	Value []*Eventhub `json:"value,omitempty"`
}

ListResult - The result of the List EventHubs operation.

type ManagedServiceIdentityType

type ManagedServiceIdentityType string

ManagedServiceIdentityType - Type of managed service identity.

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

func PossibleManagedServiceIdentityTypeValues

func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType

PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type.

type MetricID

type MetricID string

MetricID - Metric Id on which the throttle limit should be set, MetricId can be discovered by hovering over Metric in the Metrics section of Event Hub Namespace inside Azure Portal

const (
	MetricIDIncomingBytes    MetricID = "IncomingBytes"
	MetricIDIncomingMessages MetricID = "IncomingMessages"
	MetricIDOutgoingBytes    MetricID = "OutgoingBytes"
	MetricIDOutgoingMessages MetricID = "OutgoingMessages"
)

func PossibleMetricIDValues

func PossibleMetricIDValues() []MetricID

PossibleMetricIDValues returns the possible values for the MetricID const type.

type NWRuleSetIPRules

type NWRuleSetIPRules struct {
	// The IP Filter Action
	Action *NetworkRuleIPAction `json:"action,omitempty"`

	// IP Mask
	IPMask *string `json:"ipMask,omitempty"`
}

NWRuleSetIPRules - The response from the List namespace operation.

type NWRuleSetVirtualNetworkRules

type NWRuleSetVirtualNetworkRules struct {
	// Value that indicates whether to ignore missing Vnet Service Endpoint
	IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty"`

	// Subnet properties
	Subnet *Subnet `json:"subnet,omitempty"`
}

NWRuleSetVirtualNetworkRules - The response from the List namespace operation.

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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewNamespacesClient("SampleSubscription", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.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)
	}
	// TODO: use response item
	_ = res
}
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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewNamespacesClient("SampleSubscription", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewNamespacesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CheckNameAvailability(ctx,
		armeventhub.CheckNameAvailabilityParameter{
			Name: to.Ptr("sdk-Namespace-8458"),
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewNamespacesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.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)
	}
	// TODO: use response item
	_ = res
}
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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewNamespacesClient("Subscription", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.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)
	}
	// TODO: use response item
	_ = res
}
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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewNamespacesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewNamespacesClient("SampleSubscription", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"ResurceGroupSample",
		"NamespaceSample",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewNamespacesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetAuthorizationRule(ctx,
		"ArunMonocle",
		"sdk-Namespace-2702",
		"sdk-Authrules-1746",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewNamespacesClient("Subscription", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetNetworkRuleSet(ctx,
		"ResourceGroup",
		"sdk-Namespace-6019",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewNamespacesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.ListKeys(ctx,
		"ArunMonocle",
		"sdk-Namespace-2702",
		"sdk-Authrules-1746",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewNamespacesClient("Subscription", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.ListNetworkRuleSet(ctx,
		"ResourceGroup",
		"sdk-Namespace-6019",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview resourceGroupName - Name of the resource group within the azure subscription. namespaceName - The Namespace name options - NamespacesClientListAuthorizationRulesOptions contains the optional parameters for the NamespacesClient.ListAuthorizationRules method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewNamespacesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListAuthorizationRulesPager("ArunMonocle",
		"sdk-Namespace-2702",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview resourceGroupName - Name of the resource group within the azure subscription. options - NamespacesClientListByResourceGroupOptions contains the optional parameters for the NamespacesClient.ListByResourceGroup method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewNamespacesClient("SampleSubscription", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("ResurceGroupSample",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*NamespacesClient) NewListPager added in v0.5.0

NewListPager - Lists all the available Namespaces within a subscription, irrespective of the resource groups. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview options - NamespacesClientListOptions contains the optional parameters for the NamespacesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewNamespacesClient("SampleSubscription", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewNamespacesClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.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)
	}
	// TODO: use response item
	_ = res
}
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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewNamespacesClient("SampleSubscription", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.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)
	}
	// TODO: use response item
	_ = res
}
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 {
	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 {
	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 {
	NetworkRuleSet
}

NamespacesClientCreateOrUpdateNetworkRuleSetResponse contains the response from method NamespacesClient.CreateOrUpdateNetworkRuleSet.

type NamespacesClientCreateOrUpdateResponse added in v0.3.0

type NamespacesClientCreateOrUpdateResponse struct {
	EHNamespace
}

NamespacesClientCreateOrUpdateResponse contains the response from method NamespacesClient.CreateOrUpdate.

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.Delete.

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 {
	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 {
	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 {
	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.ListAuthorizationRules method.

type NamespacesClientListAuthorizationRulesResponse added in v0.3.0

type NamespacesClientListAuthorizationRulesResponse struct {
	AuthorizationRuleListResult
}

NamespacesClientListAuthorizationRulesResponse contains the response from method NamespacesClient.ListAuthorizationRules.

type NamespacesClientListByResourceGroupOptions added in v0.3.0

type NamespacesClientListByResourceGroupOptions struct {
}

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

type NamespacesClientListByResourceGroupResponse added in v0.3.0

type NamespacesClientListByResourceGroupResponse struct {
	EHNamespaceListResult
}

NamespacesClientListByResourceGroupResponse contains the response from method NamespacesClient.ListByResourceGroup.

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 {
	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 {
	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.List method.

type NamespacesClientListResponse added in v0.3.0

type NamespacesClientListResponse struct {
	EHNamespaceListResult
}

NamespacesClientListResponse contains the response from method NamespacesClient.List.

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 {
	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 {
	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 `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The geo-location where the resource lives
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string `json:"type,omitempty" azure:"ro"`
}

NetworkRuleSet - Description of topic resource.

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 `json:"nextLink,omitempty"`

	// Result of the List NetworkRuleSet operation
	Value []*NetworkRuleSet `json:"value,omitempty"`
}

NetworkRuleSetListResult - The response of the List NetworkRuleSet operation

type NetworkRuleSetProperties

type NetworkRuleSetProperties struct {
	// Default Action for Network Rule Set
	DefaultAction *DefaultAction `json:"defaultAction,omitempty"`

	// List of IpRules
	IPRules []*NWRuleSetIPRules `json:"ipRules,omitempty"`

	// This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then
	// Inbound and Outbound communication is controlled by the network security
	// perimeter and profile's access rules.
	PublicNetworkAccess *PublicNetworkAccessFlag `json:"publicNetworkAccess,omitempty"`

	// Value that indicates whether Trusted Service Access is Enabled or not.
	TrustedServiceAccessEnabled *bool `json:"trustedServiceAccessEnabled,omitempty"`

	// List VirtualNetwork Rules
	VirtualNetworkRules []*NWRuleSetVirtualNetworkRules `json:"virtualNetworkRules,omitempty"`
}

NetworkRuleSetProperties - NetworkRuleSet properties

func (NetworkRuleSetProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NetworkRuleSetProperties.

type NetworkSecurityPerimeter

type NetworkSecurityPerimeter struct {
	// Fully qualified identifier of the resource
	ID *string `json:"id,omitempty"`

	// Location of the resource
	Location *string `json:"location,omitempty"`

	// Guid of the resource
	PerimeterGUID *string `json:"perimeterGuid,omitempty"`
}

NetworkSecurityPerimeter related information

type NetworkSecurityPerimeterConfiguration

type NetworkSecurityPerimeterConfiguration struct {
	// Resource location.
	Location *string `json:"location,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; Properties of the Network Security Perimeter Configuration
	Properties *NetworkSecurityPerimeterConfigurationProperties `json:"properties,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

NetworkSecurityPerimeterConfiguration - Network Security Perimeter related configurations of a given namespace

func (NetworkSecurityPerimeterConfiguration) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterConfiguration.

type NetworkSecurityPerimeterConfigurationClient

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

NetworkSecurityPerimeterConfigurationClient contains the methods for the NetworkSecurityPerimeterConfiguration group. Don't use this type directly, use NewNetworkSecurityPerimeterConfigurationClient() instead.

func NewNetworkSecurityPerimeterConfigurationClient

func NewNetworkSecurityPerimeterConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NetworkSecurityPerimeterConfigurationClient, error)

NewNetworkSecurityPerimeterConfigurationClient creates a new instance of NetworkSecurityPerimeterConfigurationClient 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 (*NetworkSecurityPerimeterConfigurationClient) List

List - Gets list of current NetworkSecurityPerimeterConfiguration for Namespace If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview resourceGroupName - Name of the resource group within the azure subscription. namespaceName - The Namespace name options - NetworkSecurityPerimeterConfigurationClientListOptions contains the optional parameters for the NetworkSecurityPerimeterConfigurationClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/NameSpaces/NetworkSecurityPerimeterConfigurationList.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()
	client, err := armeventhub.NewNetworkSecurityPerimeterConfigurationClient("subID", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.List(ctx,
		"SDK-EventHub-4794",
		"sdk-Namespace-5828",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type NetworkSecurityPerimeterConfigurationClientListOptions

type NetworkSecurityPerimeterConfigurationClientListOptions struct {
}

NetworkSecurityPerimeterConfigurationClientListOptions contains the optional parameters for the NetworkSecurityPerimeterConfigurationClient.List method.

type NetworkSecurityPerimeterConfigurationClientListResponse

type NetworkSecurityPerimeterConfigurationClientListResponse struct {
	NetworkSecurityPerimeterConfigurationList
}

NetworkSecurityPerimeterConfigurationClientListResponse contains the response from method NetworkSecurityPerimeterConfigurationClient.List.

type NetworkSecurityPerimeterConfigurationList

type NetworkSecurityPerimeterConfigurationList struct {
	// READ-ONLY; A collection of NetworkSecurityPerimeterConfigurations
	Value []*NetworkSecurityPerimeterConfiguration `json:"value,omitempty" azure:"ro"`
}

NetworkSecurityPerimeterConfigurationList - Result of the List NetworkSecurityPerimeterConfiguration operation.

type NetworkSecurityPerimeterConfigurationProperties

type NetworkSecurityPerimeterConfigurationProperties struct {
	// List of Provisioning Issues if any
	ProvisioningIssues []*ProvisioningIssue `json:"provisioningIssues,omitempty"`

	// Provisioning state of NetworkSecurityPerimeter configuration propagation
	ProvisioningState *NetworkSecurityPerimeterConfigurationProvisioningState `json:"provisioningState,omitempty"`

	// READ-ONLY; NetworkSecurityPerimeter related information
	NetworkSecurityPerimeter *NetworkSecurityPerimeter `json:"networkSecurityPerimeter,omitempty" azure:"ro"`

	// READ-ONLY; Information about current network profile
	Profile *NetworkSecurityPerimeterConfigurationPropertiesProfile `json:"profile,omitempty" azure:"ro"`

	// READ-ONLY; Information about resource association
	ResourceAssociation *NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation `json:"resourceAssociation,omitempty" azure:"ro"`
}

NetworkSecurityPerimeterConfigurationProperties - Properties of NetworkSecurityPerimeterConfiguration

func (NetworkSecurityPerimeterConfigurationProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterConfigurationProperties.

type NetworkSecurityPerimeterConfigurationPropertiesProfile

type NetworkSecurityPerimeterConfigurationPropertiesProfile struct {
	// List of Access Rules
	AccessRules []*NspAccessRule `json:"accessRules,omitempty"`

	// Current access rules version
	AccessRulesVersion *string `json:"accessRulesVersion,omitempty"`

	// Name of the resource
	Name *string `json:"name,omitempty"`
}

NetworkSecurityPerimeterConfigurationPropertiesProfile - Information about current network profile

func (NetworkSecurityPerimeterConfigurationPropertiesProfile) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type NetworkSecurityPerimeterConfigurationPropertiesProfile.

type NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation

type NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation struct {
	// Access Mode of the resource association
	AccessMode *ResourceAssociationAccessMode `json:"accessMode,omitempty"`

	// Name of the resource association
	Name *string `json:"name,omitempty"`
}

NetworkSecurityPerimeterConfigurationPropertiesResourceAssociation - Information about resource association

type NetworkSecurityPerimeterConfigurationProvisioningState

type NetworkSecurityPerimeterConfigurationProvisioningState string

NetworkSecurityPerimeterConfigurationProvisioningState - Provisioning state of NetworkSecurityPerimeter configuration propagation

const (
	NetworkSecurityPerimeterConfigurationProvisioningStateAccepted            NetworkSecurityPerimeterConfigurationProvisioningState = "Accepted"
	NetworkSecurityPerimeterConfigurationProvisioningStateCanceled            NetworkSecurityPerimeterConfigurationProvisioningState = "Canceled"
	NetworkSecurityPerimeterConfigurationProvisioningStateCreating            NetworkSecurityPerimeterConfigurationProvisioningState = "Creating"
	NetworkSecurityPerimeterConfigurationProvisioningStateDeleted             NetworkSecurityPerimeterConfigurationProvisioningState = "Deleted"
	NetworkSecurityPerimeterConfigurationProvisioningStateDeleting            NetworkSecurityPerimeterConfigurationProvisioningState = "Deleting"
	NetworkSecurityPerimeterConfigurationProvisioningStateFailed              NetworkSecurityPerimeterConfigurationProvisioningState = "Failed"
	NetworkSecurityPerimeterConfigurationProvisioningStateInvalidResponse     NetworkSecurityPerimeterConfigurationProvisioningState = "InvalidResponse"
	NetworkSecurityPerimeterConfigurationProvisioningStateSucceeded           NetworkSecurityPerimeterConfigurationProvisioningState = "Succeeded"
	NetworkSecurityPerimeterConfigurationProvisioningStateSucceededWithIssues NetworkSecurityPerimeterConfigurationProvisioningState = "SucceededWithIssues"
	NetworkSecurityPerimeterConfigurationProvisioningStateUnknown             NetworkSecurityPerimeterConfigurationProvisioningState = "Unknown"
	NetworkSecurityPerimeterConfigurationProvisioningStateUpdating            NetworkSecurityPerimeterConfigurationProvisioningState = "Updating"
)

func PossibleNetworkSecurityPerimeterConfigurationProvisioningStateValues

func PossibleNetworkSecurityPerimeterConfigurationProvisioningStateValues() []NetworkSecurityPerimeterConfigurationProvisioningState

PossibleNetworkSecurityPerimeterConfigurationProvisioningStateValues returns the possible values for the NetworkSecurityPerimeterConfigurationProvisioningState const type.

type NetworkSecurityPerimeterConfigurationsClient

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

NetworkSecurityPerimeterConfigurationsClient contains the methods for the NetworkSecurityPerimeterConfigurations group. Don't use this type directly, use NewNetworkSecurityPerimeterConfigurationsClient() instead.

func NewNetworkSecurityPerimeterConfigurationsClient

func NewNetworkSecurityPerimeterConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NetworkSecurityPerimeterConfigurationsClient, error)

NewNetworkSecurityPerimeterConfigurationsClient creates a new instance of NetworkSecurityPerimeterConfigurationsClient 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 (*NetworkSecurityPerimeterConfigurationsClient) BeginCreateOrUpdate

BeginCreateOrUpdate - Refreshes any information about the association. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview resourceGroupName - Name of the resource group within the azure subscription. namespaceName - The Namespace name resourceAssociationName - The ResourceAssociation Name options - NetworkSecurityPerimeterConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the NetworkSecurityPerimeterConfigurationsClient.BeginCreateOrUpdate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/examples/NameSpaces/NetworkSecurityPerimeterConfigurationReconcile.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()
	client, err := armeventhub.NewNetworkSecurityPerimeterConfigurationsClient("subID", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreateOrUpdate(ctx,
		"SDK-EventHub-4794",
		"sdk-Namespace-5828",
		"resourceAssociation1",
		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:

type NetworkSecurityPerimeterConfigurationsClientBeginCreateOrUpdateOptions

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

NetworkSecurityPerimeterConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the NetworkSecurityPerimeterConfigurationsClient.BeginCreateOrUpdate method.

type NetworkSecurityPerimeterConfigurationsClientCreateOrUpdateResponse

type NetworkSecurityPerimeterConfigurationsClientCreateOrUpdateResponse struct {
}

NetworkSecurityPerimeterConfigurationsClientCreateOrUpdateResponse contains the response from method NetworkSecurityPerimeterConfigurationsClient.CreateOrUpdate.

type NspAccessRule

type NspAccessRule struct {
	// Fully qualified identifier of the resource
	ID *string `json:"id,omitempty"`

	// Name of the resource
	Name *string `json:"name,omitempty"`

	// Type of the resource
	Type *string `json:"type,omitempty"`

	// READ-ONLY; Properties of Access Rule
	Properties *NspAccessRuleProperties `json:"properties,omitempty" azure:"ro"`
}

NspAccessRule - Information of Access Rule in Network Profile

type NspAccessRuleDirection

type NspAccessRuleDirection string

NspAccessRuleDirection - Direction of Access Rule

const (
	NspAccessRuleDirectionInbound  NspAccessRuleDirection = "Inbound"
	NspAccessRuleDirectionOutbound NspAccessRuleDirection = "Outbound"
)

func PossibleNspAccessRuleDirectionValues

func PossibleNspAccessRuleDirectionValues() []NspAccessRuleDirection

PossibleNspAccessRuleDirectionValues returns the possible values for the NspAccessRuleDirection const type.

type NspAccessRuleProperties

type NspAccessRuleProperties struct {
	// Address prefixes in the CIDR format for inbound rules
	AddressPrefixes []*string `json:"addressPrefixes,omitempty"`

	// Direction of Access Rule
	Direction *NspAccessRuleDirection `json:"direction,omitempty"`

	// Subscriptions for inbound rules
	Subscriptions []*NspAccessRulePropertiesSubscriptionsItem `json:"subscriptions,omitempty"`

	// READ-ONLY; FQDN for outbound rules
	FullyQualifiedDomainNames []*string `json:"fullyQualifiedDomainNames,omitempty" azure:"ro"`

	// READ-ONLY; NetworkSecurityPerimeters for inbound rules
	NetworkSecurityPerimeters []*NetworkSecurityPerimeter `json:"networkSecurityPerimeters,omitempty" azure:"ro"`
}

NspAccessRuleProperties - Properties of Access Rule

func (NspAccessRuleProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NspAccessRuleProperties.

type NspAccessRulePropertiesSubscriptionsItem

type NspAccessRulePropertiesSubscriptionsItem struct {
	// Fully qualified identifier of subscription
	ID *string `json:"id,omitempty"`
}

NspAccessRulePropertiesSubscriptionsItem - Subscription for inbound rule

type Operation

type Operation struct {
	// Display of the operation
	Display *OperationDisplay `json:"display,omitempty"`

	// Indicates whether the operation is a data action
	IsDataAction *bool `json:"isDataAction,omitempty"`

	// Origin of the operation
	Origin *string `json:"origin,omitempty"`

	// Properties of the operation
	Properties interface{} `json:"properties,omitempty"`

	// READ-ONLY; Operation name: {provider}/{resource}/{operation}
	Name *string `json:"name,omitempty" azure:"ro"`
}

Operation - A Event Hub REST API operation

type OperationDisplay

type OperationDisplay struct {
	// READ-ONLY; Localized friendly description for the operation
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; Localized friendly name for the operation
	Operation *string `json:"operation,omitempty" azure:"ro"`

	// READ-ONLY; Resource provider of the operation
	Provider *string `json:"provider,omitempty" azure:"ro"`

	// READ-ONLY; Resource of the operation
	Resource *string `json:"resource,omitempty" azure:"ro"`
}

OperationDisplay - Operation display payload

type OperationListResult

type OperationListResult struct {
	// READ-ONLY; URL to get the next set of operation list results if there are any.
	NextLink *string `json:"nextLink,omitempty" azure:"ro"`

	// READ-ONLY; List of Event Hub operations supported by the Microsoft.EventHub resource provider.
	Value []*Operation `json:"value,omitempty" azure:"ro"`
}

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.

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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewOperationsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type OperationsClientListOptions added in v0.3.0

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse added in v0.3.0

type OperationsClientListResponse struct {
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.List.

type PrivateEndpoint

type PrivateEndpoint struct {
	// The ARM identifier for Private Endpoint.
	ID *string `json:"id,omitempty"`
}

PrivateEndpoint information.

type PrivateEndpointConnection

type PrivateEndpointConnection struct {
	// Properties of the PrivateEndpointConnection.
	Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The geo-location where the resource lives
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string `json:"type,omitempty" azure:"ro"`
}

PrivateEndpointConnection - Properties of the PrivateEndpointConnection.

type PrivateEndpointConnectionListResult

type PrivateEndpointConnectionListResult struct {
	// A link for the next page of private endpoint connection resources.
	NextLink *string `json:"nextLink,omitempty"`

	// A collection of private endpoint connection resources.
	Value []*PrivateEndpointConnection `json:"value,omitempty"`
}

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

type PrivateEndpointConnectionProperties

type PrivateEndpointConnectionProperties struct {
	// The Private Endpoint resource for this Connection.
	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`

	// Details about the state of the connection.
	PrivateLinkServiceConnectionState *ConnectionState `json:"privateLinkServiceConnectionState,omitempty"`

	// Provisioning state of the Private Endpoint Connection.
	ProvisioningState *EndPointProvisioningState `json:"provisioningState,omitempty"`
}

PrivateEndpointConnectionProperties - Properties of the private endpoint connection resource.

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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewPrivateEndpointConnectionsClient("5f750a97-50d9-4e36-8081-c9ee4c0210d4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewPrivateEndpointConnectionsClient("subID", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.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)
	}
	// TODO: use response item
	_ = res
}
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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewPrivateEndpointConnectionsClient("subID", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"SDK-EventHub-4794",
		"sdk-Namespace-5828",
		"privateEndpointConnectionName",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*PrivateEndpointConnectionsClient) NewListPager added in v0.5.0

NewListPager - Gets the available PrivateEndpointConnections within a namespace. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview resourceGroupName - Name of the resource group within the azure subscription. namespaceName - The Namespace name options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewPrivateEndpointConnectionsClient("subID", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("SDK-EventHub-4794",
		"sdk-Namespace-5828",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
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 {
	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.Delete.

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 {
	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.List method.

type PrivateEndpointConnectionsClientListResponse added in v0.3.0

type PrivateEndpointConnectionsClientListResponse struct {
	PrivateEndpointConnectionListResult
}

PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.List.

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 `json:"id,omitempty"`

	// Name of the resource
	Name *string `json:"name,omitempty"`

	// Properties of the private link resource.
	Properties *PrivateLinkResourceProperties `json:"properties,omitempty"`

	// Type of the resource
	Type *string `json:"type,omitempty"`
}

PrivateLinkResource - Information of the private link resource.

type PrivateLinkResourceProperties

type PrivateLinkResourceProperties struct {
	// The private link resource group id.
	GroupID *string `json:"groupId,omitempty"`

	// The private link resource required member names.
	RequiredMembers []*string `json:"requiredMembers,omitempty"`

	// The private link resource Private link DNS zone name.
	RequiredZoneNames []*string `json:"requiredZoneNames,omitempty"`
}

PrivateLinkResourceProperties - Properties of PrivateLinkResource

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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewPrivateLinkResourcesClient("subID", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"ArunMonocle",
		"sdk-Namespace-2924",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
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 {
	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 `json:"nextLink,omitempty"`

	// A collection of private link resources
	Value []*PrivateLinkResource `json:"value,omitempty"`
}

PrivateLinkResourcesListResult - Result of the List private link resources operation.

type Properties added in v0.3.0

type Properties struct {
	// Properties of capture description
	CaptureDescription *CaptureDescription `json:"captureDescription,omitempty"`

	// Number of days to retain the events for this Event Hub, value should be 1 to 7 days
	MessageRetentionInDays *int64 `json:"messageRetentionInDays,omitempty"`

	// Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions.
	PartitionCount *int64 `json:"partitionCount,omitempty"`

	// Enumerates the possible values for the status of the Event Hub.
	Status *EntityStatus `json:"status,omitempty"`

	// READ-ONLY; Exact time the Event Hub was created.
	CreatedAt *time.Time `json:"createdAt,omitempty" azure:"ro"`

	// READ-ONLY; Current number of shards on the Event Hub.
	PartitionIDs []*string `json:"partitionIds,omitempty" azure:"ro"`

	// READ-ONLY; The exact time the message was updated.
	UpdatedAt *time.Time `json:"updatedAt,omitempty" azure:"ro"`
}

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 ProvisioningIssue

type ProvisioningIssue struct {
	// Name of the issue
	Name *string `json:"name,omitempty"`

	// READ-ONLY; Properties of Provisioning Issue
	Properties *ProvisioningIssueProperties `json:"properties,omitempty" azure:"ro"`
}

ProvisioningIssue - Describes Provisioning issue for given NetworkSecurityPerimeterConfiguration

type ProvisioningIssueProperties

type ProvisioningIssueProperties struct {
	// Description of the issue
	Description *string `json:"description,omitempty"`

	// Type of Issue
	IssueType *string `json:"issueType,omitempty"`
}

ProvisioningIssueProperties - Properties of Provisioning Issue

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"
	ProvisioningStateDRSucceeded ProvisioningStateDR = "Succeeded"
	ProvisioningStateDRFailed    ProvisioningStateDR = "Failed"
)

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 `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The geo-location where the resource lives
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string `json:"type,omitempty" azure:"ro"`
}

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

type PublicNetworkAccess

type PublicNetworkAccess string

PublicNetworkAccess - This determines if traffic is allowed over public network. By default it is enabled.

const (
	PublicNetworkAccessDisabled           PublicNetworkAccess = "Disabled"
	PublicNetworkAccessEnabled            PublicNetworkAccess = "Enabled"
	PublicNetworkAccessSecuredByPerimeter PublicNetworkAccess = "SecuredByPerimeter"
)

func PossiblePublicNetworkAccessValues

func PossiblePublicNetworkAccessValues() []PublicNetworkAccess

PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type.

type PublicNetworkAccessFlag

type PublicNetworkAccessFlag string

PublicNetworkAccessFlag - This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules.

const (
	PublicNetworkAccessFlagDisabled           PublicNetworkAccessFlag = "Disabled"
	PublicNetworkAccessFlagEnabled            PublicNetworkAccessFlag = "Enabled"
	PublicNetworkAccessFlagSecuredByPerimeter PublicNetworkAccessFlag = "SecuredByPerimeter"
)

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 `json:"keyType,omitempty"`

	// Optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType
	Key *string `json:"key,omitempty"`
}

RegenerateAccessKeyParameters - Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset.

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 `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

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

type ResourceAssociationAccessMode

type ResourceAssociationAccessMode string

ResourceAssociationAccessMode - Access Mode of the resource association

const (
	ResourceAssociationAccessModeAuditMode         ResourceAssociationAccessMode = "AuditMode"
	ResourceAssociationAccessModeEnforcedMode      ResourceAssociationAccessMode = "EnforcedMode"
	ResourceAssociationAccessModeLearningMode      ResourceAssociationAccessMode = "LearningMode"
	ResourceAssociationAccessModeNoAssociationMode ResourceAssociationAccessMode = "NoAssociationMode"
	ResourceAssociationAccessModeUnspecifiedMode   ResourceAssociationAccessMode = "UnspecifiedMode"
)

func PossibleResourceAssociationAccessModeValues

func PossibleResourceAssociationAccessModeValues() []ResourceAssociationAccessMode

PossibleResourceAssociationAccessModeValues returns the possible values for the ResourceAssociationAccessMode const type.

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 `json:"name,omitempty"`

	// 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 `json:"capacity,omitempty"`

	// The billing tier of this particular SKU.
	Tier *SKUTier `json:"tier,omitempty"`
}

SKU parameters supplied to the create namespace operation

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 `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The geo-location where the resource lives
	Location *string `json:"location,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData `json:"systemData,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
	Type *string `json:"type,omitempty" azure:"ro"`
}

SchemaGroup - Single item in List or Get Schema Group operation

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 `json:"nextLink,omitempty"`

	// Result of the List SchemaGroups operation.
	Value []*SchemaGroup `json:"value,omitempty"`
}

SchemaGroupListResult - The result of the List SchemaGroup operation.

type SchemaGroupProperties added in v0.2.0

type SchemaGroupProperties struct {
	// dictionary object for SchemaGroup group properties
	GroupProperties     map[string]*string   `json:"groupProperties,omitempty"`
	SchemaCompatibility *SchemaCompatibility `json:"schemaCompatibility,omitempty"`
	SchemaType          *SchemaType          `json:"schemaType,omitempty"`

	// READ-ONLY; Exact time the Schema Group was created.
	CreatedAtUTC *time.Time `json:"createdAtUtc,omitempty" azure:"ro"`

	// READ-ONLY; The ETag value.
	ETag *string `json:"eTag,omitempty" azure:"ro"`

	// READ-ONLY; Exact time the Schema Group was updated
	UpdatedAtUTC *time.Time `json:"updatedAtUtc,omitempty" azure:"ro"`
}

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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewSchemaRegistryClient("e8baea74-64ce-459b-bee3-5aa4c47b3ae3", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.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)
	}
	// TODO: use response item
	_ = res
}
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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewSchemaRegistryClient("e8baea74-64ce-459b-bee3-5aa4c47b3ae3", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = client.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 2022-01-01-preview 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/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewSchemaRegistryClient("e8baea74-64ce-459b-bee3-5aa4c47b3ae3", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"alitest",
		"ali-ua-test-eh-system-1",
		"testSchemaGroup1",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
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. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01-preview resourceGroupName - Name of the resource group within the azure subscription. namespaceName - The Namespace name options - SchemaRegistryClientListByNamespaceOptions contains the optional parameters for the SchemaRegistryClient.ListByNamespace method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-01-01-preview/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()
	client, err := armeventhub.NewSchemaRegistryClient("e8baea74-64ce-459b-bee3-5aa4c47b3ae3", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByNamespacePager("alitest",
		"ali-ua-test-eh-system-1",
		&armeventhub.SchemaRegistryClientListByNamespaceOptions{Skip: nil,
			Top: nil,
		})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
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 {
	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 {
	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.ListByNamespace method.

type SchemaRegistryClientListByNamespaceResponse added in v0.3.0

type SchemaRegistryClientListByNamespaceResponse struct {
	SchemaGroupListResult
}

SchemaRegistryClientListByNamespaceResponse contains the response from method SchemaRegistryClient.ListByNamespace.

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 `json:"id,omitempty"`
}

Subnet - Properties supplied for Subnet

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time `json:"createdAt,omitempty"`

	// The identity that created the resource.
	CreatedBy *string `json:"createdBy,omitempty"`

	// The type of identity that created the resource.
	CreatedByType *CreatedByType `json:"createdByType,omitempty"`

	// The type of identity that last modified the resource.
	LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"`

	// The identity that last modified the resource.
	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"`
}

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 TLSVersion

type TLSVersion string

TLSVersion - The minimum TLS version for the cluster to support, e.g. '1.2'

const (
	TLSVersionOne0 TLSVersion = "1.0"
	TLSVersionOne1 TLSVersion = "1.1"
	TLSVersionOne2 TLSVersion = "1.2"
)

func PossibleTLSVersionValues

func PossibleTLSVersionValues() []TLSVersion

PossibleTLSVersionValues returns the possible values for the TLSVersion const type.

type ThrottlingPolicy

type ThrottlingPolicy struct {
	// REQUIRED; Metric Id on which the throttle limit should be set, MetricId can be discovered by hovering over Metric in the
	// Metrics section of Event Hub Namespace inside Azure Portal
	MetricID *MetricID `json:"metricId,omitempty"`

	// REQUIRED; The Name of this policy
	Name *string `json:"name,omitempty"`

	// REQUIRED; The Threshold limit above which the application group will be throttled.Rate limit is always per second.
	RateLimitThreshold *int64 `json:"rateLimitThreshold,omitempty"`

	// REQUIRED; Application Group Policy types
	Type *ApplicationGroupPolicyType `json:"type,omitempty"`
}

ThrottlingPolicy - Properties of the throttling policy

func (*ThrottlingPolicy) GetApplicationGroupPolicy

func (t *ThrottlingPolicy) GetApplicationGroupPolicy() *ApplicationGroupPolicy

GetApplicationGroupPolicy implements the ApplicationGroupPolicyClassification interface for type ThrottlingPolicy.

func (ThrottlingPolicy) MarshalJSON

func (t ThrottlingPolicy) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ThrottlingPolicy.

func (*ThrottlingPolicy) UnmarshalJSON

func (t *ThrottlingPolicy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ThrottlingPolicy.

type TrackedResource

type TrackedResource struct {
	// Resource location.
	Location *string `json:"location,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

TrackedResource - Definition of resource.

func (TrackedResource) MarshalJSON

func (t TrackedResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TrackedResource.

type UnavailableReason

type UnavailableReason string

UnavailableReason - Specifies the reason for the unavailability of the service.

const (
	UnavailableReasonNone                                  UnavailableReason = "None"
	UnavailableReasonInvalidName                           UnavailableReason = "InvalidName"
	UnavailableReasonSubscriptionIsDisabled                UnavailableReason = "SubscriptionIsDisabled"
	UnavailableReasonNameInUse                             UnavailableReason = "NameInUse"
	UnavailableReasonNameInLockdown                        UnavailableReason = "NameInLockdown"
	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 `json:"clientId,omitempty" azure:"ro"`

	// READ-ONLY; Principal Id of user assigned identity
	PrincipalID *string `json:"principalId,omitempty" azure:"ro"`
}

UserAssignedIdentity - Recognized Dictionary value.

type UserAssignedIdentityProperties

type UserAssignedIdentityProperties struct {
	// ARM ID of user Identity selected for encryption
	UserAssignedIdentity *string `json:"userAssignedIdentity,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL