|
| 1 | +// smithy-typescript generated code |
| 2 | +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; |
| 3 | +import { getSerdePlugin } from "@smithy/middleware-serde"; |
| 4 | +import { Command as $Command } from "@smithy/smithy-client"; |
| 5 | +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; |
| 6 | + |
| 7 | +import { commonParams } from "../endpoint/EndpointParameters"; |
| 8 | +import { ListResourcesInput, ListResourcesInputFilterSensitiveLog, ListResourcesOutput } from "../models/models_0"; |
| 9 | +import { de_ListResourcesCommand, se_ListResourcesCommand } from "../protocols/Aws_restJson1"; |
| 10 | +import { |
| 11 | + ResourceExplorer2ClientResolvedConfig, |
| 12 | + ServiceInputTypes, |
| 13 | + ServiceOutputTypes, |
| 14 | +} from "../ResourceExplorer2Client"; |
| 15 | + |
| 16 | +/** |
| 17 | + * @public |
| 18 | + */ |
| 19 | +export type { __MetadataBearer }; |
| 20 | +export { $Command }; |
| 21 | +/** |
| 22 | + * @public |
| 23 | + * |
| 24 | + * The input for {@link ListResourcesCommand}. |
| 25 | + */ |
| 26 | +export interface ListResourcesCommandInput extends ListResourcesInput {} |
| 27 | +/** |
| 28 | + * @public |
| 29 | + * |
| 30 | + * The output of {@link ListResourcesCommand}. |
| 31 | + */ |
| 32 | +export interface ListResourcesCommandOutput extends ListResourcesOutput, __MetadataBearer {} |
| 33 | + |
| 34 | +/** |
| 35 | + * <p>Returns a list of resources and their details that match the specified criteria. This query must |
| 36 | + * use a view. If you don’t explicitly specify a view, then Resource Explorer uses the default view for the Amazon Web Services Region |
| 37 | + * in which you call this operation. </p> |
| 38 | + * @example |
| 39 | + * Use a bare-bones client and the command you need to make an API call. |
| 40 | + * ```javascript |
| 41 | + * import { ResourceExplorer2Client, ListResourcesCommand } from "@aws-sdk/client-resource-explorer-2"; // ES Modules import |
| 42 | + * // const { ResourceExplorer2Client, ListResourcesCommand } = require("@aws-sdk/client-resource-explorer-2"); // CommonJS import |
| 43 | + * const client = new ResourceExplorer2Client(config); |
| 44 | + * const input = { // ListResourcesInput |
| 45 | + * Filters: { // SearchFilter |
| 46 | + * FilterString: "STRING_VALUE", // required |
| 47 | + * }, |
| 48 | + * MaxResults: Number("int"), |
| 49 | + * ViewArn: "STRING_VALUE", |
| 50 | + * NextToken: "STRING_VALUE", |
| 51 | + * }; |
| 52 | + * const command = new ListResourcesCommand(input); |
| 53 | + * const response = await client.send(command); |
| 54 | + * // { // ListResourcesOutput |
| 55 | + * // Resources: [ // ResourceList |
| 56 | + * // { // Resource |
| 57 | + * // Arn: "STRING_VALUE", |
| 58 | + * // OwningAccountId: "STRING_VALUE", |
| 59 | + * // Region: "STRING_VALUE", |
| 60 | + * // ResourceType: "STRING_VALUE", |
| 61 | + * // Service: "STRING_VALUE", |
| 62 | + * // LastReportedAt: new Date("TIMESTAMP"), |
| 63 | + * // Properties: [ // ResourcePropertyList |
| 64 | + * // { // ResourceProperty |
| 65 | + * // Name: "STRING_VALUE", |
| 66 | + * // LastReportedAt: new Date("TIMESTAMP"), |
| 67 | + * // Data: "DOCUMENT_VALUE", |
| 68 | + * // }, |
| 69 | + * // ], |
| 70 | + * // }, |
| 71 | + * // ], |
| 72 | + * // NextToken: "STRING_VALUE", |
| 73 | + * // ViewArn: "STRING_VALUE", |
| 74 | + * // }; |
| 75 | + * |
| 76 | + * ``` |
| 77 | + * |
| 78 | + * @param ListResourcesCommandInput - {@link ListResourcesCommandInput} |
| 79 | + * @returns {@link ListResourcesCommandOutput} |
| 80 | + * @see {@link ListResourcesCommandInput} for command's `input` shape. |
| 81 | + * @see {@link ListResourcesCommandOutput} for command's `response` shape. |
| 82 | + * @see {@link ResourceExplorer2ClientResolvedConfig | config} for ResourceExplorer2Client's `config` shape. |
| 83 | + * |
| 84 | + * @throws {@link AccessDeniedException} (client fault) |
| 85 | + * <p>The credentials that you used to call this operation don't have the minimum required |
| 86 | + * permissions.</p> |
| 87 | + * |
| 88 | + * @throws {@link InternalServerException} (server fault) |
| 89 | + * <p>The request failed because of internal service error. Try your request again |
| 90 | + * later.</p> |
| 91 | + * |
| 92 | + * @throws {@link ResourceNotFoundException} (client fault) |
| 93 | + * <p>You specified a resource that doesn't exist. Check the ID or ARN that you used to |
| 94 | + * identity the resource, and try again.</p> |
| 95 | + * |
| 96 | + * @throws {@link ThrottlingException} (client fault) |
| 97 | + * <p>The request failed because you exceeded a rate limit for this operation. For more |
| 98 | + * information, see <a href="https://docs.aws.amazon.com/resource-explorer/latest/userguide/quotas.html">Quotas for |
| 99 | + * Resource Explorer</a>.</p> |
| 100 | + * |
| 101 | + * @throws {@link UnauthorizedException} (client fault) |
| 102 | + * <p>The principal making the request isn't permitted to perform the operation.</p> |
| 103 | + * |
| 104 | + * @throws {@link ValidationException} (client fault) |
| 105 | + * <p>You provided an invalid value for one of the operation's parameters. Check the syntax |
| 106 | + * for the operation, and try again.</p> |
| 107 | + * |
| 108 | + * @throws {@link ResourceExplorer2ServiceException} |
| 109 | + * <p>Base exception class for all service exceptions from ResourceExplorer2 service.</p> |
| 110 | + * |
| 111 | + * @public |
| 112 | + */ |
| 113 | +export class ListResourcesCommand extends $Command |
| 114 | + .classBuilder< |
| 115 | + ListResourcesCommandInput, |
| 116 | + ListResourcesCommandOutput, |
| 117 | + ResourceExplorer2ClientResolvedConfig, |
| 118 | + ServiceInputTypes, |
| 119 | + ServiceOutputTypes |
| 120 | + >() |
| 121 | + .ep(commonParams) |
| 122 | + .m(function (this: any, Command: any, cs: any, config: ResourceExplorer2ClientResolvedConfig, o: any) { |
| 123 | + return [ |
| 124 | + getSerdePlugin(config, this.serialize, this.deserialize), |
| 125 | + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), |
| 126 | + ]; |
| 127 | + }) |
| 128 | + .s("ResourceExplorer", "ListResources", {}) |
| 129 | + .n("ResourceExplorer2Client", "ListResourcesCommand") |
| 130 | + .f(ListResourcesInputFilterSensitiveLog, void 0) |
| 131 | + .ser(se_ListResourcesCommand) |
| 132 | + .de(de_ListResourcesCommand) |
| 133 | + .build() { |
| 134 | + /** @internal type navigation helper, not in runtime. */ |
| 135 | + protected declare static __types: { |
| 136 | + api: { |
| 137 | + input: ListResourcesInput; |
| 138 | + output: ListResourcesOutput; |
| 139 | + }; |
| 140 | + sdk: { |
| 141 | + input: ListResourcesCommandInput; |
| 142 | + output: ListResourcesCommandOutput; |
| 143 | + }; |
| 144 | + }; |
| 145 | +} |
0 commit comments