GetPackageDecision
Returns one package decision owned by the calling account. Never re-evaluates. Use ListDecisionEvidence to read the evidence recorded for the decision.
Request Syntax
GET /supplychain/package-decisions/decisionId HTTP/1.1
URI Request Parameters
The request uses the following URI parameters.
- decisionId
-
The ID of the decision, as returned by CreatePackageDecision.
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
[a-z0-9]+Required: Yes
Request Body
The request does not have a request body.
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"canonicalPurl": "string",
"completedAt": "string",
"decisionId": "string",
"enforcementAction": "string",
"enforcementMode": "string",
"evaluatedAction": "string",
"evaluatedAt": "string",
"reason": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- canonicalPurl
-
The package URL (purl) that was evaluated, as accepted by the service.
Type: String
Length Constraints: Minimum length of 7. Maximum length of 4096.
Pattern:
pkg:[a-z][a-z0-9-\.]+/.* - completedAt
-
The time the decision was recorded.
Type: Timestamp
- decisionId
-
The ID of the decision.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
[a-z0-9]+ - enforcementAction
-
The action the caller was told to take. It differs from evaluatedAction only when enforcementMode is AUDIT.
Type: String
Valid Values:
ALLOW | DENY - enforcementMode
-
The strongest enforcement mode among matches that a policy exception didn't suppress: ENFORCE for the malicious-package baseline or an enforced rule, AUDIT for an audit-mode rule. NONE when there is no such match, including when policy exceptions suppressed every match.
Type: String
Valid Values:
NONE | AUDIT | ENFORCE - evaluatedAction
-
The result of policy evaluation: DENY when the malicious-package baseline or a deny rule matched and no policy exception suppressed it, otherwise ALLOW.
Type: String
Valid Values:
ALLOW | DENY - evaluatedAt
-
The time the package was evaluated. Policy exceptions are applied based on this time.
Type: Timestamp
- reason
-
Why the decision was made.
Type: String
Valid Values:
NO_DENY_MATCH | MALICIOUS_PACKAGE | POLICY_RULE_MATCHED
Errors
For information about the errors that are common to all actions, see Common Error Types.
- AccessDeniedException
-
You don't have permission to perform this action. Verify that your IAM policy includes the required permissions.
- message
-
Error description.
HTTP Status Code: 403
- InternalServerException
-
An unexpected error occurred on the server. Try the request again.
- message
-
Error description.
HTTP Status Code: 500
- ResourceNotFoundException
-
The resource you requested doesn't exist. Check the identifier and try again.
- message
-
Error description.
HTTP Status Code: 404
- ThrottlingException
-
The request was denied due to request throttling.
- message
-
Description of the throttling error.
HTTP Status Code: 429
- ValidationException
-
The request isn't valid. Check the request parameters and try again.
- fieldList
-
The fields that failed validation, if the failure is about specific fields.
- message
-
Error description.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: