-
Notifications
You must be signed in to change notification settings - Fork 587
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client-resource-explorer-2): AWS Resource Explorer released List…
…Resources feature which allows customers to list all indexed AWS resources within a view.
- Loading branch information
awstools
committed
Sep 23, 2024
1 parent
a99738f
commit 093a53f
Showing
11 changed files
with
520 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
145 changes: 145 additions & 0 deletions
145
clients/client-resource-explorer-2/src/commands/ListResourcesCommand.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
// smithy-typescript generated code | ||
import { getEndpointPlugin } from "@smithy/middleware-endpoint"; | ||
import { getSerdePlugin } from "@smithy/middleware-serde"; | ||
import { Command as $Command } from "@smithy/smithy-client"; | ||
import { MetadataBearer as __MetadataBearer } from "@smithy/types"; | ||
|
||
import { commonParams } from "../endpoint/EndpointParameters"; | ||
import { ListResourcesInput, ListResourcesInputFilterSensitiveLog, ListResourcesOutput } from "../models/models_0"; | ||
import { de_ListResourcesCommand, se_ListResourcesCommand } from "../protocols/Aws_restJson1"; | ||
import { | ||
ResourceExplorer2ClientResolvedConfig, | ||
ServiceInputTypes, | ||
ServiceOutputTypes, | ||
} from "../ResourceExplorer2Client"; | ||
|
||
/** | ||
* @public | ||
*/ | ||
export type { __MetadataBearer }; | ||
export { $Command }; | ||
/** | ||
* @public | ||
* | ||
* The input for {@link ListResourcesCommand}. | ||
*/ | ||
export interface ListResourcesCommandInput extends ListResourcesInput {} | ||
/** | ||
* @public | ||
* | ||
* The output of {@link ListResourcesCommand}. | ||
*/ | ||
export interface ListResourcesCommandOutput extends ListResourcesOutput, __MetadataBearer {} | ||
|
||
/** | ||
* <p>Returns a list of resources and their details that match the specified criteria. This query must | ||
* use a view. If you don’t explicitly specify a view, then Resource Explorer uses the default view for the Amazon Web Services Region | ||
* in which you call this operation. </p> | ||
* @example | ||
* Use a bare-bones client and the command you need to make an API call. | ||
* ```javascript | ||
* import { ResourceExplorer2Client, ListResourcesCommand } from "@aws-sdk/client-resource-explorer-2"; // ES Modules import | ||
* // const { ResourceExplorer2Client, ListResourcesCommand } = require("@aws-sdk/client-resource-explorer-2"); // CommonJS import | ||
* const client = new ResourceExplorer2Client(config); | ||
* const input = { // ListResourcesInput | ||
* Filters: { // SearchFilter | ||
* FilterString: "STRING_VALUE", // required | ||
* }, | ||
* MaxResults: Number("int"), | ||
* ViewArn: "STRING_VALUE", | ||
* NextToken: "STRING_VALUE", | ||
* }; | ||
* const command = new ListResourcesCommand(input); | ||
* const response = await client.send(command); | ||
* // { // ListResourcesOutput | ||
* // Resources: [ // ResourceList | ||
* // { // Resource | ||
* // Arn: "STRING_VALUE", | ||
* // OwningAccountId: "STRING_VALUE", | ||
* // Region: "STRING_VALUE", | ||
* // ResourceType: "STRING_VALUE", | ||
* // Service: "STRING_VALUE", | ||
* // LastReportedAt: new Date("TIMESTAMP"), | ||
* // Properties: [ // ResourcePropertyList | ||
* // { // ResourceProperty | ||
* // Name: "STRING_VALUE", | ||
* // LastReportedAt: new Date("TIMESTAMP"), | ||
* // Data: "DOCUMENT_VALUE", | ||
* // }, | ||
* // ], | ||
* // }, | ||
* // ], | ||
* // NextToken: "STRING_VALUE", | ||
* // ViewArn: "STRING_VALUE", | ||
* // }; | ||
* | ||
* ``` | ||
* | ||
* @param ListResourcesCommandInput - {@link ListResourcesCommandInput} | ||
* @returns {@link ListResourcesCommandOutput} | ||
* @see {@link ListResourcesCommandInput} for command's `input` shape. | ||
* @see {@link ListResourcesCommandOutput} for command's `response` shape. | ||
* @see {@link ResourceExplorer2ClientResolvedConfig | config} for ResourceExplorer2Client's `config` shape. | ||
* | ||
* @throws {@link AccessDeniedException} (client fault) | ||
* <p>The credentials that you used to call this operation don't have the minimum required | ||
* permissions.</p> | ||
* | ||
* @throws {@link InternalServerException} (server fault) | ||
* <p>The request failed because of internal service error. Try your request again | ||
* later.</p> | ||
* | ||
* @throws {@link ResourceNotFoundException} (client fault) | ||
* <p>You specified a resource that doesn't exist. Check the ID or ARN that you used to | ||
* identity the resource, and try again.</p> | ||
* | ||
* @throws {@link ThrottlingException} (client fault) | ||
* <p>The request failed because you exceeded a rate limit for this operation. For more | ||
* information, see <a href="https://docs.aws.amazon.com/resource-explorer/latest/userguide/quotas.html">Quotas for | ||
* Resource Explorer</a>.</p> | ||
* | ||
* @throws {@link UnauthorizedException} (client fault) | ||
* <p>The principal making the request isn't permitted to perform the operation.</p> | ||
* | ||
* @throws {@link ValidationException} (client fault) | ||
* <p>You provided an invalid value for one of the operation's parameters. Check the syntax | ||
* for the operation, and try again.</p> | ||
* | ||
* @throws {@link ResourceExplorer2ServiceException} | ||
* <p>Base exception class for all service exceptions from ResourceExplorer2 service.</p> | ||
* | ||
* @public | ||
*/ | ||
export class ListResourcesCommand extends $Command | ||
.classBuilder< | ||
ListResourcesCommandInput, | ||
ListResourcesCommandOutput, | ||
ResourceExplorer2ClientResolvedConfig, | ||
ServiceInputTypes, | ||
ServiceOutputTypes | ||
>() | ||
.ep(commonParams) | ||
.m(function (this: any, Command: any, cs: any, config: ResourceExplorer2ClientResolvedConfig, o: any) { | ||
return [ | ||
getSerdePlugin(config, this.serialize, this.deserialize), | ||
getEndpointPlugin(config, Command.getEndpointParameterInstructions()), | ||
]; | ||
}) | ||
.s("ResourceExplorer", "ListResources", {}) | ||
.n("ResourceExplorer2Client", "ListResourcesCommand") | ||
.f(ListResourcesInputFilterSensitiveLog, void 0) | ||
.ser(se_ListResourcesCommand) | ||
.de(de_ListResourcesCommand) | ||
.build() { | ||
/** @internal type navigation helper, not in runtime. */ | ||
protected declare static __types: { | ||
api: { | ||
input: ListResourcesInput; | ||
output: ListResourcesOutput; | ||
}; | ||
sdk: { | ||
input: ListResourcesCommandInput; | ||
output: ListResourcesCommandOutput; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.