EasmClient.GetDataConnections Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetDataConnections(Nullable<Int32>, Nullable<Int32>, RequestContext) |
[Protocol Method] Retrieve a list of data connections.
|
GetDataConnections(Nullable<Int32>, Nullable<Int32>, CancellationToken) |
Retrieve a list of data connections. |
GetDataConnections(Nullable<Int32>, Nullable<Int32>, RequestContext)
- Source:
- EasmClient.cs
[Protocol Method] Retrieve a list of data connections.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler GetDataConnections(Nullable<Int32>, Nullable<Int32>, CancellationToken) convenience overload with strongly typed models first.
public virtual Azure.Pageable<BinaryData> GetDataConnections (int? skip, int? maxpagesize, Azure.RequestContext context);
abstract member GetDataConnections : Nullable<int> * Nullable<int> * Azure.RequestContext -> Azure.Pageable<BinaryData>
override this.GetDataConnections : Nullable<int> * Nullable<int> * Azure.RequestContext -> Azure.Pageable<BinaryData>
Public Overridable Function GetDataConnections (skip As Nullable(Of Integer), maxpagesize As Nullable(Of Integer), context As RequestContext) As Pageable(Of BinaryData)
Parameters
- context
- RequestContext
The request context, which can override default behaviors of the client pipeline on a per-call basis.
Returns
The Pageable<T> from the service containing a list of BinaryData objects. Details of the body schema for each item in the collection are in the Remarks section below.
Exceptions
Service returned a non-success status code.
Examples
This sample shows how to call GetDataConnections and parse the result.
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
foreach (BinaryData item in client.GetDataConnections(null, null, null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("name").ToString());
}
This sample shows how to call GetDataConnections with all parameters and parse the result.
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
foreach (BinaryData item in client.GetDataConnections(1234, 1234, null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("displayName").ToString());
Console.WriteLine(result.GetProperty("content").ToString());
Console.WriteLine(result.GetProperty("createdDate").ToString());
Console.WriteLine(result.GetProperty("frequency").ToString());
Console.WriteLine(result.GetProperty("frequencyOffset").ToString());
Console.WriteLine(result.GetProperty("updatedDate").ToString());
Console.WriteLine(result.GetProperty("userUpdatedAt").ToString());
Console.WriteLine(result.GetProperty("active").ToString());
Console.WriteLine(result.GetProperty("inactiveMessage").ToString());
}
Applies to
GetDataConnections(Nullable<Int32>, Nullable<Int32>, CancellationToken)
- Source:
- EasmClient.cs
Retrieve a list of data connections.
public virtual Azure.Pageable<Azure.Analytics.Defender.Easm.DataConnection> GetDataConnections (int? skip = default, int? maxpagesize = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetDataConnections : Nullable<int> * Nullable<int> * System.Threading.CancellationToken -> Azure.Pageable<Azure.Analytics.Defender.Easm.DataConnection>
override this.GetDataConnections : Nullable<int> * Nullable<int> * System.Threading.CancellationToken -> Azure.Pageable<Azure.Analytics.Defender.Easm.DataConnection>
Public Overridable Function GetDataConnections (Optional skip As Nullable(Of Integer) = Nothing, Optional maxpagesize As Nullable(Of Integer) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of DataConnection)
Parameters
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Examples
This sample shows how to call GetDataConnections.
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
foreach (DataConnection item in client.GetDataConnections())
{
}
This sample shows how to call GetDataConnections with all parameters.
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
foreach (DataConnection item in client.GetDataConnections(skip: 1234, maxpagesize: 1234))
{
}
Applies to
Azure SDK for .NET