Skip to content

Commit 369aeb1

Browse files
feat: Updates AccessListAPIKey with recent changes in CFN adding new read only property (#288)
1 parent 71aa4fe commit 369aeb1

File tree

4 files changed

+86
-2
lines changed

4 files changed

+86
-2
lines changed

API.md

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# access-list-api-key
2+
3+
The official [MongoDB Atlas](https://www.mongodb.com/) AWS CDK resource for Node.js.
4+
5+
> AWS CDK [L1 construct] and data structures for the [AWS CloudFormation Registry] type `MongoDB::Atlas::AccessListAPIKey`.
6+
7+
[L1 construct]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html
8+
[AWS CloudFormation Registry]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html
9+
10+
## Description
11+
12+
Manages the access list entries for the specified organization API key.
13+
14+
## MongoDB Atlas API Docs
15+
16+
For more information about the API refer to: [API Endpoints](https://www.mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Programmatic-API-Keys)
17+
18+
## Usage
19+
20+
In order to use this library, you will need to activate this AWS CloudFormation Registry type in your account. You can do this via the AWS Management Console or using the [AWS CLI](https://aws.amazon.com/cli/) using the following command:
21+
22+
```sh
23+
aws cloudformation activate-type \
24+
--type-name MongoDB::Atlas::AccessListAPIKey \
25+
--publisher-id bb989456c78c398a858fef18f2ca1bfc1fbba082 \
26+
--type RESOURCE \
27+
--execution-role-arn ROLE-ARN
28+
```
29+
30+
Alternatively:
31+
32+
```sh
33+
aws cloudformation activate-type \
34+
--public-type-arn arn:aws:cloudformation:us-east-1::type/resource/bb989456c78c398a858fef18f2ca1bfc1fbba082/MongoDB-Atlas-AccessListAPIKey \
35+
--execution-role-arn ROLE-ARN
36+
```
37+
38+
You can find more information about activating this type in the [AWS CloudFormation documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-public.html).
39+
40+
## Example: [access-list-api-key.ts](../../../examples/l1-resources/access-list-api-key.ts)
41+
```ts
42+
import { CfnAccessListAPIKey } from 'awscdk-resources-mongodbatlas';
43+
44+
const accessListApiKey = new CfnAccessListApiKey(this, 'accesslistApiKey', {
45+
profile: atlasProps.profile,
46+
orgId: atlasProps.orgId,
47+
apiUserId: atlasProps.apiUserId,
48+
ipAddress : atlasProps.ipAddress
49+
});
50+
```
51+
52+
## Feedback
53+
54+
This library is auto-generated and published to all supported programming languages by the [cdklabs/cdk-cloudformation] project based on the API schema published for `MongoDB::Atlas::AccessListAPIKey`.
55+
56+
* Issues related to this generated library should be [reported here](https://github.com/cdklabs/cdk-cloudformation/issues/new?title=Issue+with+%40cdk-cloudformation%2Fmongodb-atlas-project+v1.0.0).
57+
* Issues related to `MongoDB::Atlas::AccessListAPIKey` should be reported to the [publisher](https://github.com/mongodb/mongodbatlas-cloudformation-resources/issues).
58+
* Feature requests should be [reported here](https://feedback.mongodb.com/forums/924145-atlas?category_id=392596)
59+
60+
[cdklabs/cdk-cloudformation]: https://github.com/cdklabs/cdk-cloudformation
61+
62+
## License
63+
64+
Distributed under the Apache-2.0 License.

src/l1-resources/access-list-api-key/index.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export interface CfnAccessListApiKeyProps {
1818
/**
1919
* Unique 24-hexadecimal digit string that identifies this organization API key for which you want to return access list entries.
2020
*
21-
* @schema CfnAccessListApiKeyProps#ApiUserId
21+
* @schema CfnAccessListApiKeyProps#APIUserId
2222
*/
2323
readonly apiUserId: string;
2424

@@ -95,6 +95,11 @@ export class CfnAccessListApiKey extends cdk.CfnResource {
9595
*/
9696
public readonly props: CfnAccessListApiKeyProps;
9797

98+
/**
99+
* Attribute `MongoDB::Atlas::AccessListAPIKey.Entry`
100+
*/
101+
public readonly attrEntry: string;
102+
98103
/**
99104
* Create a new `MongoDB::Atlas::AccessListAPIKey`.
100105
*
@@ -113,5 +118,7 @@ export class CfnAccessListApiKey extends cdk.CfnResource {
113118
});
114119

115120
this.props = props;
121+
122+
this.attrEntry = cdk.Token.asString(this.getAtt("Entry"));
116123
}
117124
}

0 commit comments

Comments
 (0)