Skip to content

Commit 4044b9a

Browse files
committed
Merge branch 'master' into integrations-updates
2 parents 5e328eb + ada8ef5 commit 4044b9a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+4351
-3389
lines changed
111 KB
Loading
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
import React from "react";
2+
const jsonData = import.meta.glob('/src/data/coverage/*.json');
3+
import {
4+
Table,
5+
TableHeader,
6+
TableBody,
7+
TableRow,
8+
TableHead,
9+
TableCell,
10+
} from "@/components/ui/table";
11+
import {
12+
useReactTable,
13+
getCoreRowModel,
14+
getSortedRowModel,
15+
flexRender,
16+
getFilteredRowModel,
17+
getPaginationRowModel,
18+
} from "@tanstack/react-table";
19+
import type { SortingState, ColumnDef, ColumnFiltersState } from "@tanstack/react-table";
20+
21+
const columns: ColumnDef<any>[] = [
22+
{
23+
id: "operation",
24+
accessorFn: (row) => (
25+
Object.keys(row)[0]
26+
),
27+
header: () => "Operation",
28+
enableColumnFilter: true,
29+
filterFn: (row, columnId, filterValue) => {
30+
let operation = Object.keys(row.original)[0];
31+
return operation
32+
.toLowerCase()
33+
.includes((filterValue ?? "").toLowerCase());
34+
},
35+
meta: { className: "w-1/3" },
36+
},
37+
{
38+
id: "implemented",
39+
accessorFn: row => row[Object.keys(row)[0]].implemented,
40+
header: () => "Implemented",
41+
cell: ({ getValue }) => (getValue() ? "✔️" : ""),
42+
meta: { className: "w-1/6" },
43+
enableSorting: true,
44+
},
45+
{
46+
id: "image",
47+
accessorFn: row => row[Object.keys(row)[0]].availability,
48+
header: () => "Image",
49+
meta: { className: "w-1/6" },
50+
enableSorting: false,
51+
},
52+
];
53+
54+
export default function PersistenceCoverage({service}: {service: string}) {
55+
const [coverage, setCoverage] = React.useState<any[]>([]);
56+
const [sorting, setSorting] = React.useState<SortingState>([
57+
{ id: "operation", desc: false },
58+
]);
59+
const [columnFilters, setColumnFilters] = React.useState<ColumnFiltersState>([]);
60+
61+
React.useEffect(() => {
62+
const loadData = async () => {
63+
const moduleData = await jsonData[`/src/data/coverage/${service}.json`]() as { default: Record<string, any> };
64+
setCoverage(moduleData.default.operations);
65+
};
66+
loadData();
67+
}, [service]);
68+
69+
const table = useReactTable({
70+
data: coverage,
71+
columns,
72+
state: { sorting, columnFilters },
73+
onSortingChange: setSorting,
74+
onColumnFiltersChange: setColumnFilters,
75+
getCoreRowModel: getCoreRowModel(),
76+
getSortedRowModel: getSortedRowModel(),
77+
getFilteredRowModel: getFilteredRowModel(),
78+
getPaginationRowModel: getPaginationRowModel(),
79+
debugTable: false,
80+
initialState: { pagination: { pageSize: 10 } },
81+
});
82+
83+
return (
84+
<div className="w-full">
85+
<div style={{ marginBottom: 12, marginTop: 12 }}>
86+
<input
87+
type="text"
88+
placeholder="Filter by operation name..."
89+
value={
90+
table.getColumn("operation")?.getFilterValue() as string || ""
91+
}
92+
onChange={e =>
93+
table.getColumn("operation")?.setFilterValue(e.target.value)
94+
}
95+
className="border rounded px-2 py-1 w-full max-w-xs"
96+
/>
97+
</div>
98+
<div className="rounded-md border">
99+
<Table>
100+
<TableHeader>
101+
{table.getHeaderGroups().map((headerGroup) => (
102+
<TableRow key={headerGroup.id}>
103+
{headerGroup.headers.map((header) => {
104+
const canSort = header.column.getCanSort();
105+
const meta = header.column.columnDef.meta as { className?: string } | undefined;
106+
return (
107+
<TableHead
108+
key={header.id}
109+
onClick={canSort ? header.column.getToggleSortingHandler() : undefined}
110+
className={
111+
(meta?.className || "") +
112+
(canSort ? " cursor-pointer select-none" : "")
113+
}
114+
>
115+
{flexRender(header.column.columnDef.header, header.getContext())}
116+
{canSort && (
117+
<span>
118+
{header.column.getIsSorted() === "asc"
119+
? " ▲"
120+
: header.column.getIsSorted() === "desc"
121+
? " ▼"
122+
: ""}
123+
</span>
124+
)}
125+
</TableHead>
126+
);
127+
})}
128+
</TableRow>
129+
))}
130+
</TableHeader>
131+
<TableBody>
132+
{table.getRowModel().rows.map((row) => (
133+
<TableRow key={row.id}>
134+
{row.getVisibleCells().map((cell) => {
135+
const meta = cell.column.columnDef.meta as { className?: string } | undefined;
136+
return (
137+
<TableCell
138+
key={cell.id}
139+
className={meta?.className || undefined}
140+
>
141+
{flexRender(cell.column.columnDef.cell, cell.getContext())}
142+
</TableCell>
143+
);
144+
})}
145+
</TableRow>
146+
))}
147+
</TableBody>
148+
</Table>
149+
</div>
150+
<div className="flex items-center justify-between mt-4">
151+
<button
152+
className="px-3 py-1 border rounded disabled:opacity-50"
153+
onClick={() => table.previousPage()}
154+
disabled={!table.getCanPreviousPage()}
155+
>
156+
Previous
157+
</button>
158+
<span>
159+
Page {table.getState().pagination.pageIndex + 1} of {table.getPageCount()}
160+
</span>
161+
<button
162+
className="px-3 py-1 border rounded disabled:opacity-50"
163+
onClick={() => table.nextPage()}
164+
disabled={!table.getCanNextPage()}
165+
>
166+
Next
167+
</button>
168+
</div>
169+
</div>
170+
);
171+
}

src/content/docs/aws/capabilities/config/filesystem-layout.mdx renamed to src/content/docs/aws/capabilities/config/filesystem.mdx

File renamed without changes.

src/content/docs/aws/services/account-management.md renamed to src/content/docs/aws/services/account.md

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
---
22
title: "Account Management"
3-
linkTitle: "Account Management"
43
description: Get started with AWS Account Management on LocalStack
54
tags: ["Ultimate"]
65
---
76

87
## Introduction
98

10-
The Account service provides APIs to manage your AWS account.
9+
Account service provides APIs to manage your AWS account.
1110
You can use the Account APIs to retrieve information about your account, manage your contact information and alternate contacts.
1211
Additionally, you can use the Account APIs to enable or disable a region for your account, and delete alternate contacts in your account.
1312

1413
LocalStack allows you to use the Account API to retrieve information about your account.
15-
The supported APIs are available on our [API coverage page]({{< ref "coverage_account" >}}), which provides information on the extent of Account's integration with LocalStack.
14+
The supported APIs are available on our [API coverage page](), which provides information on the extent of Account's integration with LocalStack.
1615

17-
{{< callout >}}
18-
LocalStack's Account provider is mock-only and does not support any real AWS account.
16+
:::note
17+
LocalStack's Account provider is mock-only and does not support connecting to any real AWS account.
1918
The Account APIs are only intended to demonstrate how you can use and mock the AWS Account APIs in your local environment.
2019
It's important to note that LocalStack doesn't offer a programmatic interface to manage your AWS or your LocalStack account.
21-
{{< /callout >}}
20+
:::
2221

2322
## Getting started
2423

@@ -32,8 +31,8 @@ We will demonstrate how to put contact information, fetch account details, and a
3231
You can use the [`PutContactInformation`](https://docs.aws.amazon.com/accounts/latest/reference/API_PutContactInformation.html) API to add or update the contact information for your AWS account.
3332
Run the following command to add contact information to your account:
3433

35-
{{< command >}}
36-
$ awslocal account put-contact-information \
34+
```bash
35+
awslocal account put-contact-information \
3736
--contact-information '{
3837
"FullName": "Jane Doe",
3938
"PhoneNumber": "+XXXXXXXXX",
@@ -43,16 +42,16 @@ $ awslocal account put-contact-information \
4342
"CountryCode": "US",
4443
"StateOrRegion": "WA"
4544
}'
46-
{{< /command >}}
45+
```
4746

4847
### Fetch account details
4948

5049
You can use the [`GetContactInformation`](https://docs.aws.amazon.com/accounts/latest/reference/API_GetContactInformation.html) API to retrieve the contact information for your AWS account.
5150
Run the following command to fetch the contact information for your account:
5251

53-
{{< command >}}
54-
$ awslocal account get-contact-information
55-
{{< /command >}}
52+
```bash
53+
awslocal account get-contact-information
54+
```
5655

5756
The command will return the contact information for your account:
5857

@@ -75,22 +74,21 @@ The command will return the contact information for your account:
7574
You can attach an alternate contact using [`PutAlternateContact`](https://docs.aws.amazon.com/accounts/latest/reference/API_PutAlternateContact.html) API.
7675
Run the following command to attach an alternate contact to your account:
7776

78-
{{< command >}}
79-
$ awslocal account put-alternate-contact \
77+
```bash
78+
awslocal account put-alternate-contact \
8079
--alternate-contact-type "BILLING" \
8180
--email-address "[email protected]" \
8281
--name "Bill Ing" \
8382
--phone-number "+1 555-555-5555" \
8483
--title "Billing"
85-
{{< /command >}}
84+
```
8685

8786
## Resource Browser
8887

8988
The LocalStack Web Application provides a Resource Browser for managing contact information & alternate accounts for the Account service.
9089
You can access the Resource Browser by opening the LocalStack Web Application in your browser, navigating to the Resources section, and then clicking on **Account** under the **Management & Governance** section.
9190

92-
<img src="account-resource-browser.png" alt="Account Resource Browser" title="Account Resource Browser" width="900" />
93-
<br><br>
91+
![Account Resource Browser](/images/aws/account-resource-browser.png)
9492

9593
The Resource Browser allows you to perform the following actions:
9694

src/content/docs/aws/services/acm.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
title: "Certificate Manager (ACM)"
3-
linkTitle: "Certificate Manager (ACM)"
43
description: Get started with AWS Certificate Manager (ACM) on LocalStack
54
tags: ["Free"]
65
---
@@ -14,7 +13,7 @@ ACM supports securing multiple domain names and subdomains and can create wildca
1413
You can also use ACM to import certificates from third-party certificate authorities or to generate private certificates for internal use.
1514

1615
LocalStack allows you to use the ACM APIs to create, list, and delete certificates.
17-
The supported APIs are available on our [API coverage page]({{< ref "coverage_acm" >}}), which provides information on the extent of ACM's integration with LocalStack.
16+
The supported APIs are available on our [API coverage page](), which provides information on the extent of ACM's integration with LocalStack.
1817

1918
## Getting started
2019

@@ -26,13 +25,13 @@ Start your LocalStack container using your preferred method, then use the [Reque
2625
Specify the domain name you want to request the certificate for, and any additional options you need.
2726
Here's an example command:
2827

29-
{{< command >}}
30-
$ awslocal acm request-certificate \
28+
```bash
29+
awslocal acm request-certificate \
3130
--domain-name www.example.com \
3231
--validation-method DNS \
3332
--idempotency-token 1234 \
3433
--options CertificateTransparencyLoggingPreference=DISABLED
35-
{{< /command >}}
34+
```
3635

3736
This command will return the Amazon Resource Name (ARN) of the new certificate, which you can use in other ACM commands.
3837

@@ -48,36 +47,35 @@ Use the [`ListCertificates` API](https://docs.aws.amazon.com/acm/latest/APIRefer
4847
This command returns a list of the ARNs of all the certificates that have been requested or imported into ACM.
4948
Here's an example command:
5049

51-
{{< command >}}
52-
$ awslocal acm list-certificates --max-items 10
53-
{{< /command >}}
50+
```bash
51+
awslocal acm list-certificates --max-items 10
52+
```
5453

5554
### Describe the certificate
5655

5756
Use the [`DescribeCertificate` API](https://docs.aws.amazon.com/acm/latest/APIReference/API_DescribeCertificate.html) to view the details of a specific certificate.
5857
Provide the ARN of the certificate you want to view, and this command will return information about the certificate's status, domain name, and other attributes.
5958
Here's an example command:
6059

61-
{{< command >}}
62-
$ awslocal acm describe-certificate --certificate-arn arn:aws:acm:<region>:account:certificate/<certificate_ID>
63-
{{< /command >}}
60+
```bash
61+
awslocal acm describe-certificate --certificate-arn arn:aws:acm:<region>:account:certificate/<certificate_ID>
62+
```
6463

6564
### Delete the certificate
6665

6766
Finally you can use the [`DeleteCertificate` API](https://docs.aws.amazon.com/acm/latest/APIReference/API_DeleteCertificate.html) to delete a certificate from ACM, by passing the ARN of the certificate you want to delete.
6867
Here's an example command:
6968

70-
{{< command >}}
71-
$ awslocal acm delete-certificate --certificate-arn arn:aws:acm:<region>:account:certificate/<certificate_ID>
72-
{{< /command >}}
69+
```bash
70+
awslocal acm delete-certificate --certificate-arn arn:aws:acm:<region>:account:certificate/<certificate_ID>
71+
```
7372

7473
## Resource Browser
7574

7675
The LocalStack Web Application provides a Resource Browser for managing ACM Certificates.
7776
You can access the Resource Browser by opening the LocalStack Web Application in your browser, navigating to the **Resource Browser** section, and then clicking on **Certificate Manager** under the **Security Identity Compliance** section.
7877

79-
<img src="acm-resource-browser.png" alt="ACM Resource Browser" title="ACM Resource Browser" width="900" />
80-
<br><br>
78+
![ACM Resource Browser](/images/aws/acm-resource-browser.png)
8179

8280
The Resource Browser allows you to perform the following actions:
8381

0 commit comments

Comments
 (0)