{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iam-access-analyzer/json-schema/amazon-iam-access-analyzer-get-finding-recommendation-response-schema.json",
  "title": "GetFindingRecommendationResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iam-access-analyzer-operations-api-openapi.yml#/components/schemas/GetFindingRecommendationResponse",
  "type": "object",
  "properties": {
    "startedAt": {
      "type": "string",
      "format": "date-time",
      "description": "The time at which the retrieval of the finding recommendation was started."
    },
    "completedAt": {
      "type": "string",
      "format": "date-time",
      "description": "The time at which the retrieval of the finding recommendation was completed."
    },
    "nextToken": {
      "type": "string",
      "description": "A token used for pagination of results returned."
    },
    "error": {
      "$ref": "#/$defs/RecommendationError"
    },
    "resourceArn": {
      "type": "string",
      "description": "The ARN of the resource of the finding."
    },
    "recommendedSteps": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/RecommendedStep"
      },
      "description": "A group of recommended steps for the finding."
    },
    "recommendationType": {
      "type": "string",
      "description": "The type of recommendation for the finding."
    },
    "status": {
      "type": "string",
      "description": "The status of the retrieval of the finding recommendation."
    }
  },
  "required": [
    "startedAt",
    "resourceArn",
    "recommendationType",
    "status"
  ],
  "$defs": {
    "RecommendationError": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "description": "The error code for a failed retrieval of a recommendation for a finding."
        },
        "message": {
          "type": "string",
          "description": "The error message for a failed retrieval of a recommendation for a finding."
        }
      },
      "required": [
        "code",
        "message"
      ]
    },
    "RecommendedStep": {
      "type": "object",
      "properties": {
        "unusedPermissionsRecommendedStep": {
          "$ref": "#/$defs/UnusedPermissionsRecommendedStep"
        }
      },
      "description": "Exactly one member is set."
    },
    "UnusedPermissionsRecommendedStep": {
      "type": "object",
      "properties": {
        "policyUpdatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The time at which the existing policy for the unused permissions finding was last updated."
        },
        "recommendedAction": {
          "type": "string",
          "description": "A recommendation of whether to create or detach a policy for an unused permissions finding."
        },
        "recommendedPolicy": {
          "type": "string",
          "description": "If the recommended action for the unused permissions finding is to replace the existing policy, the contents of the recommended policy to replace the policy specified in the existingPolicyId field."
        },
        "existingPolicyId": {
          "type": "string",
          "description": "If the recommended action for the unused permissions finding is to detach a policy, the ID of an existing policy to be detached."
        }
      },
      "required": [
        "recommendedAction"
      ]
    }
  }
}