Class CogniteClientExtensions
Extension utility methods for CogniteSdk.Client
Inherited Members
Namespace: Cognite.Extractor.Utils
Assembly: ExtractorUtils.dll
Syntax
public static class CogniteClientExtensions
Methods
| Edit this page View SourceTestCogniteConfig(Client, CogniteConfig, CancellationToken)
Verifies that the client configured according to config
can access Cognite Data Fusion
Declaration
public static Task TestCogniteConfig(this Client client, CogniteConfig config, CancellationToken token)
Parameters
| Type | Name | Description |
|---|---|---|
| Client | client | Cognite SDK client |
| CogniteConfig | config | Configuration object |
| CancellationToken | token | Cancellation token |
Returns
| Type | Description |
|---|---|
| Task |
Exceptions
| Type | Condition |
|---|---|
| CogniteUtilsException | Thrown when credentials are invalid or the client cannot be used to access CDF resources |
TestCogniteConfig(Client, string, CancellationToken, bool)
Verifies that the client configured with project
can access Cognite Data Fusion
Declaration
public static Task TestCogniteConfig(this Client client, string project, CancellationToken token, bool checkProjectOwnership = true)
Parameters
| Type | Name | Description |
|---|---|---|
| Client | client | Cognite SDK client |
| string | project | Configured project |
| CancellationToken | token | Cancellation token |
| bool | checkProjectOwnership | If true, check if the token has access to the project. Note that this check requires projects:list and groups:list. |
Returns
| Type | Description |
|---|---|
| Task |
Exceptions
| Type | Condition |
|---|---|
| CogniteUtilsException | Thrown when credentials are invalid or the client cannot be used to access CDF resources |