list_cloudfront_distributions
Retrieve CloudFront distribution details including domain names and status to monitor content delivery network configurations.
Instructions
Lists CloudFront distributions with their domain names and status.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:2255-2268 (handler)Handler function that lists CloudFront distributions using ListDistributionsCommand on the CloudFrontClient and formats the response.if (name === "list_cloudfront_distributions") { const command = new ListDistributionsCommand({}); const response = await cloudFrontClient.send(command); const dists = response.DistributionList?.Items?.map(d => ({ Id: d.Id, DomainName: d.DomainName, Status: d.Status, Enabled: d.Enabled, Aliases: d.Aliases?.Items })) || []; return { content: [{ type: "text", text: JSON.stringify(dists, null, 2) }] }; }
- src/index.ts:753-757 (registration)Registration of the "list_cloudfront_distributions" tool in the ListToolsRequestSchema handler, including its description and input schema.name: "list_cloudfront_distributions", description: "Lists CloudFront distributions with their domain names and status.", inputSchema: { "type": "object", "properties": {} } }, {
- src/index.ts:756-756 (schema)Input schema definition for the tool (empty object, no parameters).},
- src/index.ts:41-41 (helper)Import of the CloudFront SDK client and command used by the tool handler.import { CloudFrontClient, ListDistributionsCommand } from "@aws-sdk/client-cloudfront";
- src/index.ts:74-74 (helper)Initialization of the CloudFrontClient instance used in the tool handler.const cloudFrontClient = new CloudFrontClient({});