- 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.
ListPortfoliosCommand
Lists all portfolios in the catalog.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { ServiceCatalogClient, ListPortfoliosCommand } from "@aws-sdk/client-service-catalog"; // ES Modules import
// const { ServiceCatalogClient, ListPortfoliosCommand } = require("@aws-sdk/client-service-catalog"); // CommonJS import
const client = new ServiceCatalogClient(config);
const input = { // ListPortfoliosInput
AcceptLanguage: "STRING_VALUE",
PageToken: "STRING_VALUE",
PageSize: Number("int"),
};
const command = new ListPortfoliosCommand(input);
const response = await client.send(command);
// { // ListPortfoliosOutput
// PortfolioDetails: [ // PortfolioDetails
// { // PortfolioDetail
// Id: "STRING_VALUE",
// ARN: "STRING_VALUE",
// DisplayName: "STRING_VALUE",
// Description: "STRING_VALUE",
// CreatedTime: new Date("TIMESTAMP"),
// ProviderName: "STRING_VALUE",
// },
// ],
// NextPageToken: "STRING_VALUE",
// };
ListPortfoliosCommand Input
See ListPortfoliosCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
AcceptLanguage | string | undefined | The language code.
|
PageSize | number | undefined | The maximum number of items to return with this call. |
PageToken | string | undefined | The page token for the next set of results. To retrieve the first set of results, use null. |
ListPortfoliosCommand Output
See ListPortfoliosCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
NextPageToken | string | undefined | The page token to use to retrieve the next set of results. If there are no additional results, this value is null. |
PortfolioDetails | PortfolioDetail[] | undefined | Information about the portfolios. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InvalidParametersException | client | One or more parameters provided to the operation are not valid. |
ServiceCatalogServiceException | Base exception class for all service exceptions from ServiceCatalog service. |