{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iam/json-schema/amazon-iam-get-delegation-request-response-schema.json",
  "title": "GetDelegationRequestResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iam-delegation-request-api-openapi.yml#/components/schemas/GetDelegationRequestResponse",
  "type": "object",
  "properties": {
    "DelegationRequest": {
      "$ref": "#/$defs/DelegationRequest"
    },
    "PermissionCheckStatus": {
      "type": "string",
      "enum": [
        "COMPLETE",
        "IN_PROGRESS",
        "FAILED"
      ],
      "description": "The status of the permission check for the delegation request. This value indicates the status of the process to check whether the caller has sufficient permissions to cover the requested actions in the delegation request. Since this is an asynchronous process, there are three potential values: IN_PROGRESS : The permission check process has started. COMPLETED : The permission check process has completed. The PermissionCheckResult will include the result. FAILED : The permission check process has failed."
    },
    "PermissionCheckResult": {
      "type": "string",
      "enum": [
        "ALLOWED",
        "DENIED",
        "UNSURE"
      ],
      "description": "The result of the permission check, indicating whether the caller has sufficient permissions to cover the requested permissions. This is an approximate result. ALLOWED : The caller has sufficient permissions cover all the requested permissions. DENIED : The caller does not have sufficient permissions to cover all the requested permissions. UNSURE : It is not possible to determine whether the caller has all the permissions needed. This output is most likely for cases when the caller has permissions with conditions."
    }
  },
  "$defs": {
    "DelegationPermission": {
      "type": "object",
      "properties": {
        "PolicyTemplateArn": {
          "type": "string",
          "description": "This ARN maps to a pre-registered policy content for this partner. See the partner onboarding documentation to understand how to create a delegation template."
        },
        "Parameters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PolicyParameter"
          },
          "description": "A list of policy parameters that define the scope and constraints of the delegated permissions."
        }
      }
    },
    "DelegationRequest": {
      "type": "object",
      "properties": {
        "DelegationRequestId": {
          "type": "string",
          "description": "The unique identifier for the delegation request."
        },
        "OwnerAccountId": {
          "type": "string",
          "description": "Amazon Web Services account ID of the owner of the delegation request."
        },
        "Description": {
          "type": "string",
          "description": "Description of the delegation request. This is a message that is provided by the Amazon Web Services partner that filed the delegation request."
        },
        "RequestMessage": {
          "type": "string",
          "description": "A custom message that is added to the delegation request by the partner. This element is different from the Description element such that this is a request specific message injected by the partner. The Description is typically a generic explanation of what the delegation request is targeted to do."
        },
        "Permissions": {
          "$ref": "#/$defs/DelegationPermission"
        },
        "PermissionPolicy": {
          "type": "string",
          "description": "JSON content of the associated permission policy of this delegation request."
        },
        "RolePermissionRestrictionArns": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "If the PermissionPolicy includes role creation permissions, this element will include the list of permissions boundary policies associated with the role creation. See Permissions boundaries for IAM entities for more details about IAM permission boundaries."
        },
        "OwnerId": {
          "type": "string",
          "description": "ARN of the owner of this delegation request."
        },
        "ApproverId": {
          "type": "string"
        },
        "State": {
          "type": "string",
          "enum": [
            "UNASSIGNED",
            "ASSIGNED",
            "PENDING_APPROVAL",
            "FINALIZED",
            "ACCEPTED",
            "REJECTED",
            "EXPIRED"
          ],
          "description": "The state of this delegation request. See the Understanding the Request Lifecycle for an explanation of how these states are transitioned."
        },
        "ExpirationTime": {
          "type": "string",
          "format": "date-time",
          "description": "The expiry time of this delegation request See the Understanding the Request Lifecycle for details on the life time of a delegation request at each state."
        },
        "RequestorId": {
          "type": "string",
          "description": "Identity of the requestor of this delegation request. This will be an Amazon Web Services account ID."
        },
        "RequestorName": {
          "type": "string",
          "description": "A friendly name of the requestor."
        },
        "CreateDate": {
          "type": "string",
          "format": "date-time",
          "description": "Creation date (timestamp) of this delegation request."
        },
        "SessionDuration": {
          "type": "integer",
          "description": "The life-time of the requested session credential."
        },
        "RedirectUrl": {
          "type": "string",
          "description": "A URL to be redirected to once the delegation request is approved. Partners provide this URL when creating the delegation request."
        },
        "Notes": {
          "type": "string",
          "description": "Notes added to this delegation request, if this request was updated via the UpdateDelegationRequest API."
        },
        "RejectionReason": {
          "type": "string",
          "description": "Reasons for rejecting this delegation request, if this request was rejected. See also RejectDelegationRequest API documentation."
        },
        "OnlySendByOwner": {
          "type": "boolean",
          "description": "A flag indicating whether the SendDelegationToken must be called by the owner of this delegation request. This is set by the requesting partner."
        },
        "UpdatedTime": {
          "type": "string",
          "format": "date-time",
          "description": "Last updated timestamp of the request."
        }
      }
    },
    "PolicyParameter": {
      "type": "object",
      "properties": {
        "Name": {
          "type": "string",
          "description": "The name of the policy parameter."
        },
        "Values": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The allowed values for the policy parameter."
        },
        "Type": {
          "type": "string",
          "enum": [
            "string",
            "stringList"
          ],
          "description": "The data type of the policy parameter value."
        }
      }
    }
  }
}