CodeTransparencyClient.GetEntryStatus 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
GetEntryStatus(String, CancellationToken) |
Get the status the entry operation. |
GetEntryStatus(String, RequestContext) |
[Protocol Method] Get the status the entry operation
|
GetEntryStatus(String, CancellationToken)
- Source:
- CodeTransparencyClient.cs
Get the status the entry operation.
public virtual Azure.Response<Azure.Security.CodeTransparency.GetOperationResult> GetEntryStatus (string operationId, System.Threading.CancellationToken cancellationToken = default);
abstract member GetEntryStatus : string * System.Threading.CancellationToken -> Azure.Response<Azure.Security.CodeTransparency.GetOperationResult>
override this.GetEntryStatus : string * System.Threading.CancellationToken -> Azure.Response<Azure.Security.CodeTransparency.GetOperationResult>
Public Overridable Function GetEntryStatus (operationId As String, Optional cancellationToken As CancellationToken = Nothing) As Response(Of GetOperationResult)
Parameters
- operationId
- String
ID of the operation to retrieve.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
operationId
is null.
operationId
is an empty string, and was expected to be non-empty.
Examples
This sample shows how to call GetEntryStatus.
Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential);
Response<GetOperationResult> response = client.GetEntryStatus("<operationId>");
This sample shows how to call GetEntryStatus with all parameters.
Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential);
Response<GetOperationResult> response = client.GetEntryStatus("<operationId>");
Applies to
GetEntryStatus(String, RequestContext)
- Source:
- CodeTransparencyClient.cs
[Protocol Method] Get the status the entry operation
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler GetEntryStatus(String, CancellationToken) convenience overload with strongly typed models first.
public virtual Azure.Response GetEntryStatus (string operationId, Azure.RequestContext context);
abstract member GetEntryStatus : string * Azure.RequestContext -> Azure.Response
override this.GetEntryStatus : string * Azure.RequestContext -> Azure.Response
Public Overridable Function GetEntryStatus (operationId As String, context As RequestContext) As Response
Parameters
- operationId
- String
ID of the operation to retrieve.
- 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
operationId
is null.
operationId
is an empty string, and was expected to be non-empty.
Service returned a non-success status code.
Examples
This sample shows how to call GetEntryStatus 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.GetEntryStatus("<operationId>", null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("operationId").ToString());
Console.WriteLine(result.GetProperty("status").ToString());
This sample shows how to call GetEntryStatus 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.GetEntryStatus("<operationId>", null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("entryId").ToString());
Console.WriteLine(result.GetProperty("error").ToString());
Console.WriteLine(result.GetProperty("operationId").ToString());
Console.WriteLine(result.GetProperty("status").ToString());