Class EvaluationsRequestBuilder
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Represents the query parameters.static class
Request configuration object for the query parameters.Nested classes/interfaces inherited from class org.azd.abstractions.BaseRequestBuilder
BaseRequestBuilder.ProjectExcludeParameter
-
Field Summary
Fields inherited from class org.azd.abstractions.BaseRequestBuilder
accessTokenCredential, apiVersion, area, locationId, organizationUrl, serializer
-
Constructor Summary
ConstructorsConstructorDescriptionEvaluationsRequestBuilder
(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values. -
Method Summary
Modifier and TypeMethodDescriptionGets the present evaluation state of a policy.Gets the present evaluation state of a policy.list
(Consumer<EvaluationsRequestBuilder.RequestConfiguration> requestConfiguration) Retrieves a list of all the policy evaluation statuses for a specific pull request.listAsync
(Consumer<EvaluationsRequestBuilder.RequestConfiguration> requestConfiguration) Retrieves a list of all the policy evaluation statuses for a specific pull request.Requeue the policy evaluation.requeueAsync
(String evaluationId) Requeue the policy evaluation.Methods inherited from class org.azd.abstractions.BaseRequestBuilder
builder
-
Constructor Details
-
EvaluationsRequestBuilder
public EvaluationsRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values.- Parameters:
organizationUrl
- Represents organization location request url.accessTokenCredential
- Access token credential object.
-
-
Method Details
-
getAsync
Gets the present evaluation state of a policy.Each policy which applies to a pull request will have an evaluation state which is specific to that policy running in the context of that pull request. Each evaluation is uniquely identified via a Guid. You can find all the policy evaluations for a specific pull request using the List operation of this controller.
- Parameters:
evaluationId
- ID of the policy evaluation to be retrieved.- Returns:
- PolicyEvaluationRecord Object
PolicyEvaluationRecord
- Throws:
AzDException
- Default Api Exception handler.
-
listAsync
public CompletableFuture<PolicyEvaluationRecords> listAsync(Consumer<EvaluationsRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Retrieves a list of all the policy evaluation statuses for a specific pull request.Evaluations are retrieved using an artifact ID which uniquely identifies the pull request. To generate an artifact ID for a pull request, use this template:
vstfs:///CodeReview/CodeReviewId/{projectId}/{pullRequestId}
- Parameters:
requestConfiguration
- Represents the query parameters.- Returns:
- Collection of evaluation records
PolicyEvaluationRecords
- Throws:
AzDException
- Default Api Exception handler.
-
requeueAsync
public CompletableFuture<PolicyEvaluationRecord> requeueAsync(String evaluationId) throws AzDException Requeue the policy evaluation.Some policies define a "requeue" action which performs some policy-specific operation. You can trigger this operation by updating an existing policy evaluation and setting the PolicyEvaluationRecord.Status field to Queued. Although any policy evaluation can be requeued, at present only build policies perform any action in response. Requeueing a build policy will queue a new build to run (cancelling any existing build which is running).
- Parameters:
evaluationId
- ID of the policy evaluation to be retrieved.- Returns:
- PolicyEvaluationRecord Object
PolicyEvaluationRecord
- Throws:
AzDException
- Default Api Exception handler.
-
get
Gets the present evaluation state of a policy.Each policy which applies to a pull request will have an evaluation state which is specific to that policy running in the context of that pull request. Each evaluation is uniquely identified via a Guid. You can find all the policy evaluations for a specific pull request using the List operation of this controller.
- Parameters:
evaluationId
- ID of the policy evaluation to be retrieved.- Returns:
- PolicyEvaluationRecord Object
PolicyEvaluationRecord
- Throws:
AzDException
- Default Api Exception handler.
-
list
public PolicyEvaluationRecords list(Consumer<EvaluationsRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Retrieves a list of all the policy evaluation statuses for a specific pull request.Evaluations are retrieved using an artifact ID which uniquely identifies the pull request. To generate an artifact ID for a pull request, use this template:
vstfs:///CodeReview/CodeReviewId/{projectId}/{pullRequestId}
- Parameters:
requestConfiguration
- Represents the query parameters.- Returns:
- Collection of evaluation records
PolicyEvaluationRecords
- Throws:
AzDException
- Default Api Exception handler.
-
requeue
Requeue the policy evaluation.Some policies define a "requeue" action which performs some policy-specific operation. You can trigger this operation by updating an existing policy evaluation and setting the PolicyEvaluationRecord.Status field to Queued. Although any policy evaluation can be requeued, at present only build policies perform any action in response. Requeueing a build policy will queue a new build to run (cancelling any existing build which is running).
- Parameters:
evaluationId
- ID of the policy evaluation to be retrieved.- Returns:
- PolicyEvaluationRecord Object
PolicyEvaluationRecord
- Throws:
AzDException
- Default Api Exception handler.
-