- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
ListReportsCommand
List available reports.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { ArtifactClient, ListReportsCommand } from "@aws-sdk/client-artifact"; // ES Modules import
// const { ArtifactClient, ListReportsCommand } = require("@aws-sdk/client-artifact"); // CommonJS import
const client = new ArtifactClient(config);
const input = { // ListReportsRequest
maxResults: Number("int"),
nextToken: "STRING_VALUE",
};
const command = new ListReportsCommand(input);
const response = await client.send(command);
// { // ListReportsResponse
// reports: [ // ReportsList
// { // ReportSummary
// id: "STRING_VALUE",
// name: "STRING_VALUE",
// state: "PUBLISHED" || "UNPUBLISHED",
// arn: "STRING_VALUE",
// version: Number("long"),
// uploadState: "PROCESSING" || "COMPLETE" || "FAILED" || "FAULT",
// description: "STRING_VALUE",
// periodStart: new Date("TIMESTAMP"),
// periodEnd: new Date("TIMESTAMP"),
// series: "STRING_VALUE",
// category: "STRING_VALUE",
// companyName: "STRING_VALUE",
// productName: "STRING_VALUE",
// statusMessage: "STRING_VALUE",
// acceptanceType: "PASSTHROUGH" || "EXPLICIT",
// },
// ],
// nextToken: "STRING_VALUE",
// };
Example Usage
Loading code editor
ListReportsCommand Input
See ListReportsCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
maxResults | number | undefined | Maximum number of resources to return in the paginated response. |
nextToken | string | undefined | Pagination token to request the next page of resources. |
ListReportsCommand Output
See ListReportsCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
nextToken | string | undefined | Pagination token to request the next page of resources. |
reports | ReportSummary[] | undefined | List of report resources. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | User does not have sufficient access to perform this action. |
InternalServerException | server | An unknown server exception has occurred. |
ResourceNotFoundException | client | Request references a resource which does not exist. |
ServiceQuotaExceededException | client | Request would cause a service quota to be exceeded. |
ThrottlingException | client | Request was denied due to request throttling. |
ValidationException | client | Request fails to satisfy the constraints specified by an AWS service. |
ArtifactServiceException | Base exception class for all service exceptions from Artifact service. |