/// <summary> /// Gets all the consumer groups in a Namespace. An empty feed is returned if /// no consumer group exists in the Namespace. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group within the azure subscription. /// </param> /// <param name='namespaceName'> /// The Namespace name /// </param> /// <param name='eventHubName'> /// The Event Hub name /// </param> /// <param name='skip'> /// 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. /// </param> /// <param name='top'> /// May be used to limit the number of results to the most recent N /// usageDetails. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <ConsumerGroup> > ListByEventHubAsync(this IConsumerGroupsOperations operations, string resourceGroupName, string namespaceName, string eventHubName, int?skip = default(int?), int?top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByEventHubWithHttpMessagesAsync(resourceGroupName, namespaceName, eventHubName, skip, top, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates or updates an Event Hubs consumer group as a nested resource within /// a Namespace. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group within the azure subscription. /// </param> /// <param name='namespaceName'> /// The Namespace name /// </param> /// <param name='eventHubName'> /// The Event Hub name /// </param> /// <param name='consumerGroupName'> /// The consumer group name /// </param> /// <param name='parameters'> /// Parameters supplied to create or update a consumer group resource. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ConsumerGroup> CreateOrUpdateAsync(this IConsumerGroupsOperations operations, string resourceGroupName, string namespaceName, string eventHubName, string consumerGroupName, ConsumerGroup parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets all the consumer groups in a Namespace. An empty feed is returned if /// no consumer group exists in the Namespace. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <ConsumerGroup> > ListByEventHubNextAsync(this IConsumerGroupsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByEventHubNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { Clusters = new ClustersOperations(this); Configuration = new ConfigurationOperations(this); Namespaces = new NamespacesOperations(this); PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this); PrivateLinkResources = new PrivateLinkResourcesOperations(this); Operations = new Operations(this); EventHubs = new EventHubsOperations(this); DisasterRecoveryConfigs = new DisasterRecoveryConfigsOperations(this); ConsumerGroups = new ConsumerGroupsOperations(this); BaseUri = new System.Uri("https://management.azure.com"); ApiVersion = "2021-06-01-preview"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; SerializationSettings = new JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; SerializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings = new JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; CustomInitialize(); DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); }
/// <summary> /// Creates or updates an Event Hubs consumer group as a nested resource within /// a Namespace. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group within the azure subscription. /// </param> /// <param name='namespaceName'> /// The Namespace name /// </param> /// <param name='eventHubName'> /// The Event Hub name /// </param> /// <param name='consumerGroupName'> /// The consumer group name /// </param> /// <param name='parameters'> /// Parameters supplied to create or update a consumer group resource. /// </param> public static ConsumerGroup CreateOrUpdate(this IConsumerGroupsOperations operations, string resourceGroupName, string namespaceName, string eventHubName, string consumerGroupName, ConsumerGroup parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Gets all the consumer groups in a Namespace. An empty feed is returned if /// no consumer group exists in the Namespace. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> public static IPage <ConsumerGroup> ListByEventHubNext(this IConsumerGroupsOperations operations, string nextPageLink) { return(operations.ListByEventHubNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Gets all the consumer groups in a Namespace. An empty feed is returned if /// no consumer group exists in the Namespace. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group within the azure subscription. /// </param> /// <param name='namespaceName'> /// The Namespace name /// </param> /// <param name='eventHubName'> /// The Event Hub name /// </param> /// <param name='skip'> /// 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. /// </param> /// <param name='top'> /// May be used to limit the number of results to the most recent N /// usageDetails. /// </param> public static IPage <ConsumerGroup> ListByEventHub(this IConsumerGroupsOperations operations, string resourceGroupName, string namespaceName, string eventHubName, int?skip = default(int?), int?top = default(int?)) { return(operations.ListByEventHubAsync(resourceGroupName, namespaceName, eventHubName, skip, top).GetAwaiter().GetResult()); }
/// <summary> /// Gets a description for the specified consumer group. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group within the azure subscription. /// </param> /// <param name='namespaceName'> /// The Namespace name /// </param> /// <param name='eventHubName'> /// The Event Hub name /// </param> /// <param name='consumerGroupName'> /// The consumer group name /// </param> public static ConsumerGroup Get(this IConsumerGroupsOperations operations, string resourceGroupName, string namespaceName, string eventHubName, string consumerGroupName) { return(operations.GetAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName).GetAwaiter().GetResult()); }
/// <summary> /// Deletes a consumer group from the specified Event Hub and resource group. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group within the azure subscription. /// </param> /// <param name='namespaceName'> /// The Namespace name /// </param> /// <param name='eventHubName'> /// The Event Hub name /// </param> /// <param name='consumerGroupName'> /// The consumer group name /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IConsumerGroupsOperations operations, string resourceGroupName, string namespaceName, string eventHubName, string consumerGroupName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes a consumer group from the specified Event Hub and resource group. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group within the azure subscription. /// </param> /// <param name='namespaceName'> /// The Namespace name /// </param> /// <param name='eventHubName'> /// The Event Hub name /// </param> /// <param name='consumerGroupName'> /// The consumer group name /// </param> public static void Delete(this IConsumerGroupsOperations operations, string resourceGroupName, string namespaceName, string eventHubName, string consumerGroupName) { operations.DeleteAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName).GetAwaiter().GetResult(); }
/// <summary> /// Creates or updates an Event Hubs consumer group as a nested resource within /// a Namespace. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group within the azure subscription. /// </param> /// <param name='namespaceName'> /// The Namespace name /// </param> /// <param name='eventHubName'> /// The Event Hub name /// </param> /// <param name='consumerGroupName'> /// The consumer group name /// </param> /// <param name='userMetadata'> /// 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. /// </param> public static ConsumerGroup CreateOrUpdate(this IConsumerGroupsOperations operations, string resourceGroupName, string namespaceName, string eventHubName, string consumerGroupName, string userMetadata = default(string)) { return(operations.CreateOrUpdateAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName, userMetadata).GetAwaiter().GetResult()); }