CodeTransparencyClient.GetParameters 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
GetParameters(RequestContext) |
[Protocol Method] Get service parameters
|
GetParameters(CancellationToken) |
Get service parameters. |
GetParameters(RequestContext)
- Source:
- CodeTransparencyClient.cs
[Protocol Method] Get service parameters
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler GetParameters(CancellationToken) convenience overload with strongly typed models first.
public virtual Azure.Response GetParameters (Azure.RequestContext context);
abstract member GetParameters : Azure.RequestContext -> Azure.Response
override this.GetParameters : Azure.RequestContext -> Azure.Response
Public Overridable Function GetParameters (context As RequestContext) As Response
Parameters
- context
- RequestContext
The request context, which can override default behaviors of the client pipeline on a per-call basis.
Returns
The response returned from the service.
Exceptions
Service returned a non-success status code.
Examples
This sample shows how to call GetParameters and parse the result.
Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential);
Response response = client.GetParameters(null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("serviceCertificate").ToString());
Console.WriteLine(result.GetProperty("serviceId").ToString());
Console.WriteLine(result.GetProperty("signatureAlgorithm").ToString());
Console.WriteLine(result.GetProperty("treeAlgorithm").ToString());
This sample shows how to call GetParameters with all parameters and parse the result.
Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential);
Response response = client.GetParameters(null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("serviceCertificate").ToString());
Console.WriteLine(result.GetProperty("serviceId").ToString());
Console.WriteLine(result.GetProperty("signatureAlgorithm").ToString());
Console.WriteLine(result.GetProperty("treeAlgorithm").ToString());
Applies to
GetParameters(CancellationToken)
- Source:
- CodeTransparencyClient.cs
Get service parameters.
public virtual Azure.Response<Azure.Security.CodeTransparency.ParametersResult> GetParameters (System.Threading.CancellationToken cancellationToken = default);
abstract member GetParameters : System.Threading.CancellationToken -> Azure.Response<Azure.Security.CodeTransparency.ParametersResult>
override this.GetParameters : System.Threading.CancellationToken -> Azure.Response<Azure.Security.CodeTransparency.ParametersResult>
Public Overridable Function GetParameters (Optional cancellationToken As CancellationToken = Nothing) As Response(Of ParametersResult)
Parameters
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Examples
This sample shows how to call GetParameters.
Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential);
Response<ParametersResult> response = client.GetParameters();
This sample shows how to call GetParameters with all parameters.
Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential);
Response<ParametersResult> response = client.GetParameters();
Applies to
Azure SDK for .NET