from cognite.client.data_classes.hosted_extractors import EventHubSourceUpdate
source = EventHubSourceUpdate('my_event_hub').event_hub_name.set("My Updated EventHub")
res = client.hosted_extractors.sources.update(source){
"items": [
{
"type": "mqtt3",
"externalId": "my.known.id",
"host": "<string>",
"createdTime": 1730204346000,
"lastUpdatedTime": 1730204346000,
"port": 1883,
"authentication": {
"type": "basic",
"username": "<string>"
},
"useTls": true,
"caCertificate": {
"thumbprint": "<string>",
"expiresAt": 123
},
"authCertificate": {
"thumbprint": "<string>",
"expiresAt": 123
}
}
]
}Required capabilities:
hostedExtractors:WRITE
Update up to 100 sources.
from cognite.client.data_classes.hosted_extractors import EventHubSourceUpdate
source = EventHubSourceUpdate('my_event_hub').event_hub_name.set("My Updated EventHub")
res = client.hosted_extractors.sources.update(source){
"items": [
{
"type": "mqtt3",
"externalId": "my.known.id",
"host": "<string>",
"createdTime": 1730204346000,
"lastUpdatedTime": 1730204346000,
"port": 1883,
"authentication": {
"type": "basic",
"username": "<string>"
},
"useTls": true,
"caCertificate": {
"thumbprint": "<string>",
"expiresAt": 123
},
"authCertificate": {
"thumbprint": "<string>",
"expiresAt": 123
}
}
]
}Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.
Sources to update.
1 - 10 elementsShow child attributes
List of updated sources.
100Show child attributes
Was this page helpful?