Summary

The updateAzureEventHubIngestFeed() mutation updates an existing ingest feed that uses Azure Event Hubs. The update applies as a delta, so you provide only the fields you want to change. Call this mutation after creating a feed with createAzureEventHubIngestFeed() to edit its configuration, such as the parser, connection details, or enabled state.

Syntax

graphql
updateAzureEventHubIngestFeed(
      input: UpdateAzureEventHubIngestFeed!
   ): IngestFeed!

The required input argument accepts an UpdateAzureEventHubIngestFeed object. This is a delta update: supply only the fields you want to change. The mutation returns an IngestFeed! object representing the updated feed.

Example

Raw
graphql
mutation {
	updateAzureEventHubIngestFeed( input: {
       repositoryName: "humio",
       id: "abc123",
       enabled: true } )
    { id }
}
Mac OS or Linux (curl)
shell
curl -v -X POST $YOUR_LOGSCALE_URL/graphql \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d @- << EOF
{"query" : "mutation {
	updateAzureEventHubIngestFeed( input: {
       repositoryName: \"humio\",
       id: \"abc123\",
       enabled: true } )
    { id }
}"
}
EOF
Mac OS or Linux (curl) One-line
shell
curl -v -X POST $YOUR_LOGSCALE_URL/graphql \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d @- << EOF
{"query" : "mutation {
	updateAzureEventHubIngestFeed( input: {
       repositoryName: \"humio\",
       id: \"abc123\",
       enabled: true } )
    { id }
}"
}
EOF
Windows Cmd and curl
shell
curl -v -X POST $YOUR_LOGSCALE_URL/graphql ^
    -H "Authorization: Bearer $TOKEN" ^
    -H "Content-Type: application/json" ^
    -d @'{"query" : "mutation { ^
	updateAzureEventHubIngestFeed( input: { ^
       repositoryName: \"humio\", ^
       id: \"abc123\", ^
       enabled: true } ) ^
    { id } ^
}" ^
} '
Windows Powershell and curl
powershell
curl.exe -X POST 
    -H "Authorization: Bearer $TOKEN"
    -H "Content-Type: application/json"
    -d '{"query" : "mutation {
	updateAzureEventHubIngestFeed( input: {
       repositoryName: \"humio\",
       id: \"abc123\",
       enabled: true } )
    { id }
}"
}'
    "$YOUR_LOGSCALE_URL/graphql"
Perl
perl
#!/usr/bin/perl

use HTTP::Request;
use LWP;

my $TOKEN = "TOKEN";

my $uri = '$YOUR_LOGSCALE_URL/graphql';

my $query = "mutation {
	updateAzureEventHubIngestFeed( input: {
       repositoryName: \"humio\",
       id: \"abc123\",
       enabled: true } )
    { id }
}";
$query =~ s/\n/ /g;
my $json = sprintf('{"query" : "%s"}',$query);
my $req = HTTP::Request->new("POST", $uri );

$req->header("Authorization" => "Bearer $TOKEN");
$req->header("Content-Type" => "application/json");

$req->content( $json );

my $lwp = LWP::UserAgent->new;

my $result = $lwp->request( $req );

print $result->{"_content"},"\n";
Python
python
#! /usr/local/bin/python3

import requests

url = '$YOUR_LOGSCALE_URL/graphql'
mydata = r'''{"query" : "mutation {
	updateAzureEventHubIngestFeed( input: {
       repositoryName: \"humio\",
       id: \"abc123\",
       enabled: true } )
    { id }
}"
}'''

resp = requests.post(url,
                     data = mydata,
                     headers = {
   "Authorization" : "Bearer $TOKEN",
   "Content-Type" : "application/json"
}
)

print(resp.text)
Node.js
javascript
const https = require('https');

const data = JSON.stringify(
    {"query" : "mutation {
	updateAzureEventHubIngestFeed( input: {
       repositoryName: \"humio\",
       id: \"abc123\",
       enabled: true } )
    { id }
}"
}
);


const options = {
  hostname: '$YOUR_LOGSCALE_URL',
  path: 'graphql',
  port: 443,
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Content-Length': data.length,
    Authorization: 'BEARER ' + process.env.TOKEN,
    'User-Agent': 'Node',
  },
};

const req = https.request(options, (res) => {
  let data = '';
  console.log(`statusCode: ${res.statusCode}`);

  res.on('data', (d) => {
    data += d;
  });
  res.on('end', () => {
    console.log(JSON.parse(data).data);
  });
});

req.on('error', (error) => {
  console.error(error);
});

req.write(data);
req.end();
Example Responses
Success (HTTP Response Code 200 OK)
json
{
  "data": {
    "updateAzureEventHubIngestFeed": {
      "id": "abc123"
    }
  }
}

Input parameters

Provide the ingest feed identifier and any fields to update. Include the associated repository, parser name or unique identifier, and Azure Event Hub connection details. Only the fields you include are updated; omitted fields retain their current values.

Table: UpdateAzureEventHubIngestFeed Input Datatype

ParameterTypeRequiredDefaultStabilityAvailabilityDescription
checkpointHandlingAzureEventHubsCheckpointHandlingInput  Preview The configuration for how the Event Hub checkpoints should be handled. See AzureEventHubsCheckpointHandlingInput.
consumerGroupString  Preview The consumer group for the Event Hub, if exists.
defaultCheckpointAzureEventHubsCheckpointInput  Preview Specifies the starting point for reading events from the Event Hub when no previous checkpoint exists. See AzureEventHubsCheckpointInput.
descriptionUpdateIngestFeedDescription  Preview If the description should be cleared, supply an UpdateDescription object with no value or a null value. If the description should be changed, supply an UpdateDescription object with the desired value. See UpdateIngestFeedDescription.
enabledBoolean  Preview Whether the ingest feed is enabled.
eventHubFullyQualifiedNamespaceString  Preview The fully qualified namespace of the Event Hub. Often structured like this: <namespace>.servicebus.windows.net.
eventHubNameString  Preview The name of the Event Hub.
idStringyes Preview The unique identifier of the ingest feed.
nameString  Preview The name of the ingest feed.
parserString  Preview The identifier or name of the parser that should be used to parse the ingest feed. Parsers in packages can be referred to as packagescope/packagename:parsername.
preprocessingAzureEventHubsPreprocessingInput  Preview The preprocessing to apply to an ingest feed before parsing. See AzureEventHubsPreprocessingInput.
repositoryNameRepoOrViewNameyes Preview The name of the repository of the ingest feed. RepoOrViewName is a scalar.

Returned values

The mutation returns an IngestFeed object for the updated feed. The returned data includes the feed identifier, name, enabled state, parser details, and Azure Event Hub connection configuration.

Table: IngestFeed Datatype

ParameterTypeRequiredDefaultStabilityAvailabilityDescription
createdAtLongyes Long-Term Unix timestamp for when this feed was created.
descriptionString  Long-Term A description of the ingest feed.
enabledBooleanyes Long-Term Whether the ingest from the ingest feed is enabled.
executionInfoIngestFeedExecutionInfo  Long-Term Details about how the ingest feed is running. See IngestFeedExecutionInfo.
forceStoppedBooleanyes Preview Whether the ingest feed is force stopped, meaning only a cluster manager can start the ingest feed again.
idStringyes Long-Term The unique identifier of the ingest feed.
nameStringyes Long-Term The name of the ingest feed.
parserParser  Long-Term The parser used to parse the ingest feed. See Parser.
sourceIngestFeedSourceyes Long-Term The source of the ingest feed. See IngestFeedSource.