Skip to content

Commit 65c054c

Browse files
authored
fix(commons): rename AvailabilityZoneId to AvailabilityZoneID in docs and tests (#5118)
1 parent dcf114b commit 65c054c

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

docs/features/metadata.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ You can fetch data from the LMDS using the `getMetadata` function. For example,
3434

3535
| Property | Type | Description |
3636
| -------------------- | -------- | ------------------------------------------------------- |
37-
| `AvailabilityZoneId` | `string` | The AZ where the function is running (e.g., `use1-az1`) |
37+
| `AvailabilityZoneID` | `string` | The AZ where the function is running (e.g., `use1-az1`) |
3838

3939
## Testing your code
4040

examples/snippets/commons/metadata.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ const logger = new Logger({ serviceName: 'serverlessAirline' });
55
const metadata = await getMetadata();
66

77
export const handler = async () => {
8-
const { AvailabilityZoneId: azId } = metadata;
8+
const { AvailabilityZoneID: azId } = metadata;
99
logger.appendKeys({ azId });
1010
};

packages/commons/tests/unit/metadata.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ describe('Function: getMetadata', () => {
4646
vi.stubEnv('AWS_LAMBDA_METADATA_API', '127.0.0.1:1234');
4747
vi.stubEnv('AWS_LAMBDA_METADATA_TOKEN', 'test-token');
4848

49-
const payload = { AvailabilityZoneId: 'use1-az1' };
49+
const payload = { AvailabilityZoneID: 'use1-az1' };
5050
fetchMock.mockResolvedValue({
5151
ok: true,
5252
json: vi.fn().mockResolvedValue(payload),
@@ -82,7 +82,7 @@ describe('Function: getMetadata', () => {
8282
.spyOn(AbortSignal, 'timeout')
8383
.mockReturnValue(new AbortController().signal);
8484

85-
const payload = { AvailabilityZoneId: 'use1-az1' };
85+
const payload = { AvailabilityZoneID: 'use1-az1' };
8686
fetchMock.mockResolvedValue({
8787
ok: true,
8888
json: vi.fn().mockResolvedValue(payload),

0 commit comments

Comments
 (0)