@anvil-cloud/sdk 0.0.13 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/aws/cognitoAuth.ts +70 -0
  2. package/aws/cognitoUserPool.ts +132 -0
  3. package/aws/dynamoDB.ts +176 -0
  4. package/aws/eventBus.ts +91 -0
  5. package/aws/httpApi.ts +108 -0
  6. package/aws/index.ts +63 -0
  7. package/aws/lambda.ts +9 -3
  8. package/aws/oauthAuthorizer.ts +70 -0
  9. package/aws/queue.ts +156 -0
  10. package/aws/svelteKitSite.ts +14 -0
  11. package/aws/vpc.ts +159 -0
  12. package/aws/vpcEndpoint.ts +98 -0
  13. package/bin/aws/cognitoAuth.d.ts +36 -0
  14. package/bin/aws/cognitoAuth.js +53 -0
  15. package/bin/aws/cognitoAuth.js.map +1 -0
  16. package/bin/aws/cognitoUserPool.d.ts +82 -0
  17. package/bin/aws/cognitoUserPool.js +65 -0
  18. package/bin/aws/cognitoUserPool.js.map +1 -0
  19. package/bin/aws/dynamoDB.d.ts +115 -0
  20. package/bin/aws/dynamoDB.js +121 -0
  21. package/bin/aws/dynamoDB.js.map +1 -0
  22. package/bin/aws/eventBus.d.ts +47 -0
  23. package/bin/aws/eventBus.js +63 -0
  24. package/bin/aws/eventBus.js.map +1 -0
  25. package/bin/aws/httpApi.d.ts +66 -0
  26. package/bin/aws/httpApi.js +60 -0
  27. package/bin/aws/httpApi.js.map +1 -0
  28. package/bin/aws/index.d.ts +27 -0
  29. package/bin/aws/index.js +37 -1
  30. package/bin/aws/index.js.map +1 -1
  31. package/bin/aws/lambda.d.ts +7 -3
  32. package/bin/aws/lambda.js +2 -0
  33. package/bin/aws/lambda.js.map +1 -1
  34. package/bin/aws/oauthAuthorizer.d.ts +36 -0
  35. package/bin/aws/oauthAuthorizer.js +53 -0
  36. package/bin/aws/oauthAuthorizer.js.map +1 -0
  37. package/bin/aws/queue.d.ts +83 -0
  38. package/bin/aws/queue.js +103 -0
  39. package/bin/aws/queue.js.map +1 -0
  40. package/bin/aws/svelteKitSite.d.ts +9 -0
  41. package/bin/aws/svelteKitSite.js +3 -0
  42. package/bin/aws/svelteKitSite.js.map +1 -1
  43. package/bin/aws/vpc.d.ts +98 -0
  44. package/bin/aws/vpc.js +94 -0
  45. package/bin/aws/vpc.js.map +1 -0
  46. package/bin/aws/vpcEndpoint.d.ts +53 -0
  47. package/bin/aws/vpcEndpoint.js +62 -0
  48. package/bin/aws/vpcEndpoint.js.map +1 -0
  49. package/bin/grants.d.ts +0 -10
  50. package/bin/grants.js +5 -10
  51. package/bin/grants.js.map +1 -1
  52. package/bin/package.json +1 -1
  53. package/bin/types/enums/aws/index.d.ts +211 -7
  54. package/bin/types/enums/aws/index.js +192 -8
  55. package/bin/types/enums/aws/index.js.map +1 -1
  56. package/bin/types/input.d.ts +1040 -0
  57. package/bin/types/output.d.ts +13 -0
  58. package/grants.ts +7 -22
  59. package/package.json +1 -1
  60. package/tsconfig.json +9 -0
  61. package/types/enums/aws/index.ts +239 -7
  62. package/types/input.ts +1079 -0
  63. package/types/output.ts +14 -0
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.CognitoAuth = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("../utilities");
8
+ /**
9
+ * An Anvil-managed JWT authorizer backed by a Cognito user pool. Derives the issuer URL automatically from the user pool ID — no manual Cognito endpoint construction required. Creates a native API Gateway JWT authorizer; verification is handled entirely by API Gateway with no Lambda or custom code. Pass authorizerId to HttpApi defaultAuthorizerId to protect your API routes.
10
+ */
11
+ class CognitoAuth extends pulumi.ComponentResource {
12
+ /**
13
+ * Returns true if the given object is an instance of CognitoAuth. This is designed to work even
14
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
15
+ */
16
+ static isInstance(obj) {
17
+ if (obj === undefined || obj === null) {
18
+ return false;
19
+ }
20
+ return obj['__pulumiType'] === CognitoAuth.__pulumiType;
21
+ }
22
+ /**
23
+ * Create a CognitoAuth resource with the given unique name, arguments, and options.
24
+ *
25
+ * @param name The _unique_ name of the resource.
26
+ * @param args The arguments to use to populate this resource's properties.
27
+ * @param opts A bag of options that control this resource's behavior.
28
+ */
29
+ constructor(name, args, opts) {
30
+ let resourceInputs = {};
31
+ opts = opts || {};
32
+ if (!opts.id) {
33
+ if (args?.audience === undefined && !opts.urn) {
34
+ throw new Error("Missing required property 'audience'");
35
+ }
36
+ if (args?.userPoolId === undefined && !opts.urn) {
37
+ throw new Error("Missing required property 'userPoolId'");
38
+ }
39
+ resourceInputs["audience"] = args?.audience;
40
+ resourceInputs["userPoolId"] = args?.userPoolId;
41
+ resourceInputs["authorizerId"] = undefined /*out*/;
42
+ }
43
+ else {
44
+ resourceInputs["authorizerId"] = undefined /*out*/;
45
+ }
46
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
47
+ super(CognitoAuth.__pulumiType, name, resourceInputs, opts, true /*remote*/);
48
+ }
49
+ }
50
+ exports.CognitoAuth = CognitoAuth;
51
+ /** @internal */
52
+ CognitoAuth.__pulumiType = 'anvil:aws:CognitoAuth';
53
+ //# sourceMappingURL=cognitoAuth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cognitoAuth.js","sourceRoot":"","sources":["../../aws/cognitoAuth.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AACzC,0CAA0C;AAE1C;;GAEG;AACH,MAAa,WAAY,SAAQ,MAAM,CAAC,iBAAiB;IAIrD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,WAAW,CAAC,YAAY,CAAC;IAC5D,CAAC;IAOD;;;;;;OAMG;IACH,YAAY,IAAY,EAAE,IAAqB,EAAE,IAAsC;QACnF,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;YACV,IAAI,IAAI,EAAE,QAAQ,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBAC3C,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;aAC3D;YACD,IAAI,IAAI,EAAE,UAAU,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBAC7C,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;aAC7D;YACD,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,EAAE,QAAQ,CAAC;YAC5C,cAAc,CAAC,YAAY,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC;YAChD,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SACtD;aAAM;YACH,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SACtD;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,WAAW,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IACjF,CAAC;;AA7CL,kCA8CC;AA7CG,gBAAgB;AACO,wBAAY,GAAG,uBAAuB,CAAC"}
@@ -0,0 +1,82 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ import * as inputs from "../types/input";
3
+ /**
4
+ * An Anvil-managed Cognito user pool. Tier 1 controls (deletion protection, enforced password policy, account recovery via email) are always on. Pair with CognitoAuth to protect API Gateway routes.
5
+ */
6
+ export declare class CognitoUserPool extends pulumi.ComponentResource {
7
+ /**
8
+ * Returns true if the given object is an instance of CognitoUserPool. This is designed to work even
9
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
10
+ */
11
+ static isInstance(obj: any): obj is CognitoUserPool;
12
+ /**
13
+ * The ID of the default app client. Pass to CognitoAuth audience.
14
+ */
15
+ readonly appClientId: pulumi.Output<string>;
16
+ /**
17
+ * The client secret of the default app client. Only populated when appClient.generateSecret is true. Treat as sensitive.
18
+ */
19
+ readonly appClientSecret: pulumi.Output<string | undefined>;
20
+ /**
21
+ * The CloudFront distribution domain for the custom hosted UI. Only populated when hostedUi.customDomain is true. Create a Route53 alias record pointing hostedUi.domain to this value to complete DNS setup. Empty string for Cognito-managed domains.
22
+ */
23
+ readonly cloudFrontDomain: pulumi.Output<string>;
24
+ /**
25
+ * The Cognito OIDC issuer URL. Format: https://cognito-idp.{region}.amazonaws.com/{userPoolId}. Pass directly to CognitoAuth if building the authorizer manually.
26
+ */
27
+ readonly endpoint: pulumi.Output<string>;
28
+ /**
29
+ * The full hosted UI domain (e.g. https://auth.myapp.com or https://myprefix.auth.us-east-1.amazoncognito.com). Empty string if hostedUi is not configured.
30
+ */
31
+ readonly hostedUiDomain: pulumi.Output<string>;
32
+ /**
33
+ * The ARN of the Cognito user pool.
34
+ */
35
+ readonly userPoolArn: pulumi.Output<string>;
36
+ /**
37
+ * The Cognito user pool ID. Pass to CognitoAuth.userPoolId.
38
+ */
39
+ readonly userPoolId: pulumi.Output<string>;
40
+ /**
41
+ * Create a CognitoUserPool resource with the given unique name, arguments, and options.
42
+ *
43
+ * @param name The _unique_ name of the resource.
44
+ * @param args The arguments to use to populate this resource's properties.
45
+ * @param opts A bag of options that control this resource's behavior.
46
+ */
47
+ constructor(name: string, args?: CognitoUserPoolArgs, opts?: pulumi.ComponentResourceOptions);
48
+ }
49
+ /**
50
+ * The set of arguments for constructing a CognitoUserPool resource.
51
+ */
52
+ export interface CognitoUserPoolArgs {
53
+ /**
54
+ * Default app client created with the user pool. Covers the 80% case of one application per pool. Use transform for additional clients.
55
+ */
56
+ appClient?: pulumi.Input<inputs.aws.CognitoUserPoolAppClientArgs>;
57
+ /**
58
+ * User attribute configuration. Controls sign-in identifiers and required attributes on sign-up.
59
+ */
60
+ attributes?: pulumi.Input<inputs.aws.CognitoUserPoolAttributesArgs>;
61
+ /**
62
+ * Email delivery configuration. Default: Cognito-managed email (5 emails/day limit). Set sesFromAddress for SES delivery in production.
63
+ */
64
+ emailConfiguration?: pulumi.Input<inputs.aws.CognitoUserPoolEmailConfigurationArgs>;
65
+ /**
66
+ * Hosted UI / Managed Login configuration. Omit to use the Cognito user pools API directly without a hosted sign-in page.
67
+ */
68
+ hostedUi?: pulumi.Input<inputs.aws.CognitoUserPoolHostedUiArgs>;
69
+ /**
70
+ * External identity providers to federate with this user pool. Supports Google, Facebook, LoginWithAmazon, SignInWithApple, OIDC, and SAML. Schema never changes per provider — add new providers by extending this array.
71
+ */
72
+ identityProviders?: pulumi.Input<pulumi.Input<inputs.aws.CognitoUserPoolIdentityProviderArgs>[]>;
73
+ /**
74
+ * MFA configuration. TOTP requires no additional AWS resources. SMS requires an SNS caller ARN.
75
+ */
76
+ mfa?: pulumi.Input<inputs.aws.CognitoUserPoolMfaArgs>;
77
+ /**
78
+ * Password policy for the user pool. Anvil enforces a secure baseline by default — override only to strengthen.
79
+ */
80
+ passwordPolicy?: pulumi.Input<inputs.aws.CognitoUserPoolPasswordPolicyArgs>;
81
+ transform?: pulumi.Input<inputs.aws.CognitoUserPoolTransformArgsArgs>;
82
+ }
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.CognitoUserPool = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("../utilities");
8
+ /**
9
+ * An Anvil-managed Cognito user pool. Tier 1 controls (deletion protection, enforced password policy, account recovery via email) are always on. Pair with CognitoAuth to protect API Gateway routes.
10
+ */
11
+ class CognitoUserPool extends pulumi.ComponentResource {
12
+ /**
13
+ * Returns true if the given object is an instance of CognitoUserPool. This is designed to work even
14
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
15
+ */
16
+ static isInstance(obj) {
17
+ if (obj === undefined || obj === null) {
18
+ return false;
19
+ }
20
+ return obj['__pulumiType'] === CognitoUserPool.__pulumiType;
21
+ }
22
+ /**
23
+ * Create a CognitoUserPool resource with the given unique name, arguments, and options.
24
+ *
25
+ * @param name The _unique_ name of the resource.
26
+ * @param args The arguments to use to populate this resource's properties.
27
+ * @param opts A bag of options that control this resource's behavior.
28
+ */
29
+ constructor(name, args, opts) {
30
+ let resourceInputs = {};
31
+ opts = opts || {};
32
+ if (!opts.id) {
33
+ resourceInputs["appClient"] = args?.appClient;
34
+ resourceInputs["attributes"] = args?.attributes;
35
+ resourceInputs["emailConfiguration"] = args?.emailConfiguration;
36
+ resourceInputs["hostedUi"] = args?.hostedUi;
37
+ resourceInputs["identityProviders"] = args?.identityProviders;
38
+ resourceInputs["mfa"] = args?.mfa;
39
+ resourceInputs["passwordPolicy"] = args?.passwordPolicy;
40
+ resourceInputs["transform"] = args?.transform;
41
+ resourceInputs["appClientId"] = undefined /*out*/;
42
+ resourceInputs["appClientSecret"] = undefined /*out*/;
43
+ resourceInputs["cloudFrontDomain"] = undefined /*out*/;
44
+ resourceInputs["endpoint"] = undefined /*out*/;
45
+ resourceInputs["hostedUiDomain"] = undefined /*out*/;
46
+ resourceInputs["userPoolArn"] = undefined /*out*/;
47
+ resourceInputs["userPoolId"] = undefined /*out*/;
48
+ }
49
+ else {
50
+ resourceInputs["appClientId"] = undefined /*out*/;
51
+ resourceInputs["appClientSecret"] = undefined /*out*/;
52
+ resourceInputs["cloudFrontDomain"] = undefined /*out*/;
53
+ resourceInputs["endpoint"] = undefined /*out*/;
54
+ resourceInputs["hostedUiDomain"] = undefined /*out*/;
55
+ resourceInputs["userPoolArn"] = undefined /*out*/;
56
+ resourceInputs["userPoolId"] = undefined /*out*/;
57
+ }
58
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
59
+ super(CognitoUserPool.__pulumiType, name, resourceInputs, opts, true /*remote*/);
60
+ }
61
+ }
62
+ exports.CognitoUserPool = CognitoUserPool;
63
+ /** @internal */
64
+ CognitoUserPool.__pulumiType = 'anvil:aws:CognitoUserPool';
65
+ //# sourceMappingURL=cognitoUserPool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cognitoUserPool.js","sourceRoot":"","sources":["../../aws/cognitoUserPool.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AAIzC,0CAA0C;AAI1C;;GAEG;AACH,MAAa,eAAgB,SAAQ,MAAM,CAAC,iBAAiB;IAIzD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,eAAe,CAAC,YAAY,CAAC;IAChE,CAAC;IA+BD;;;;;;OAMG;IACH,YAAY,IAAY,EAAE,IAA0B,EAAE,IAAsC;QACxF,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;YACV,cAAc,CAAC,WAAW,CAAC,GAAG,IAAI,EAAE,SAAS,CAAC;YAC9C,cAAc,CAAC,YAAY,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC;YAChD,cAAc,CAAC,oBAAoB,CAAC,GAAG,IAAI,EAAE,kBAAkB,CAAC;YAChE,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,EAAE,QAAQ,CAAC;YAC5C,cAAc,CAAC,mBAAmB,C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IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IACrF,CAAC;;AAjFL,0CAkFC;AAjFG,gBAAgB;AACO,4BAAY,GAAG,2BAA2B,CAAC"}
@@ -0,0 +1,115 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ import * as inputs from "../types/input";
3
+ import * as grants from "../grants";
4
+ /**
5
+ * Serverless key-value and document store. Secure-by-default DynamoDB table with GSI support, optional streams, and Lambda/EventBridge consumers. First data layer component — pairs naturally with anvil.aws.Lambda.
6
+ */
7
+ export declare class DynamoDB extends pulumi.ComponentResource {
8
+ /**
9
+ * Returns true if the given object is an instance of DynamoDB. This is designed to work even
10
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
11
+ */
12
+ static isInstance(obj: any): obj is DynamoDB;
13
+ /**
14
+ * The ARN of the DynamoDB stream. Only present when stream is enabled.
15
+ */
16
+ readonly streamArn: pulumi.Output<string | undefined>;
17
+ /**
18
+ * The ARN of the DynamoDB table.
19
+ */
20
+ readonly tableArn: pulumi.Output<string>;
21
+ /**
22
+ * The physical DynamoDB table name. Scoped as {name}-{stage}.
23
+ */
24
+ readonly tableName: pulumi.Output<string>;
25
+ /**
26
+ * Create a DynamoDB resource with the given unique name, arguments, and options.
27
+ *
28
+ * @param name The _unique_ name of the resource.
29
+ * @param args The arguments to use to populate this resource's properties.
30
+ * @param opts A bag of options that control this resource's behavior.
31
+ */
32
+ constructor(name: string, args: DynamoDBArgs, opts?: pulumi.ComponentResourceOptions);
33
+ /**
34
+ * Grants read access (dynamodb:GetItem, dynamodb:BatchGetItem, dynamodb:Query, dynamodb:Scan) on this dynamodb
35
+ * to the target compute resource's execution role.
36
+ *
37
+ * @param target - The compute resource to grant access to.
38
+ * @param opts - Optional. indexes: scope to specific GSI names only.
39
+ * If omitted, grants table access only — no index access.
40
+ * @param opts.justification - Optional audit trail note.
41
+ */
42
+ grantRead(target: grants.GrantTarget, opts?: {
43
+ indexes?: string[];
44
+ justification?: string;
45
+ }): void;
46
+ /**
47
+ * Grants write access (dynamodb:PutItem, dynamodb:UpdateItem, dynamodb:BatchWriteItem) on this dynamodb
48
+ * to the target compute resource's execution role.
49
+ *
50
+ * @param target - The compute resource to grant access to.
51
+ * @param opts - Optional. indexes: scope to specific GSI names only.
52
+ * If omitted, grants table access only — no index access.
53
+ * @param opts.justification - Optional audit trail note.
54
+ */
55
+ grantWrite(target: grants.GrantTarget, opts?: {
56
+ indexes?: string[];
57
+ justification?: string;
58
+ }): void;
59
+ /**
60
+ * Grants readwrite access (dynamodb:GetItem, dynamodb:BatchGetItem, dynamodb:Query, dynamodb:Scan, dynamodb:PutItem, dynamodb:UpdateItem, dynamodb:BatchWriteItem) on this dynamodb
61
+ * to the target compute resource's execution role.
62
+ *
63
+ * @param target - The compute resource to grant access to.
64
+ * @param opts - Optional. indexes: scope to specific GSI names only.
65
+ * If omitted, grants table access only — no index access.
66
+ * @param opts.justification - Optional audit trail note.
67
+ */
68
+ grantReadWrite(target: grants.GrantTarget, opts?: {
69
+ indexes?: string[];
70
+ justification?: string;
71
+ }): void;
72
+ /**
73
+ * Grants delete access (dynamodb:DeleteItem) on this dynamodb
74
+ * to the target compute resource's execution role.
75
+ *
76
+ * @param target - The compute resource to grant access to.
77
+ * @param opts - Optional. indexes: scope to specific GSI names only.
78
+ * If omitted, grants table access only — no index access.
79
+ * @param opts.justification - Optional audit trail note.
80
+ */
81
+ grantDelete(target: grants.GrantTarget, opts?: {
82
+ indexes?: string[];
83
+ justification?: string;
84
+ }): void;
85
+ }
86
+ /**
87
+ * The set of arguments for constructing a DynamoDB resource.
88
+ */
89
+ export interface DynamoDBArgs {
90
+ /**
91
+ * Global Secondary Indexes. All GSI key types must be explicitly declared — Anvil derives attributeDefinitions automatically from all declared keys.
92
+ */
93
+ globalSecondaryIndexes?: pulumi.Input<pulumi.Input<inputs.aws.DynamoDBGlobalSecondaryIndexArgs>[]>;
94
+ /**
95
+ * Primary hash (partition) key. Required.
96
+ */
97
+ hashKey: pulumi.Input<inputs.aws.DynamoDBKeyAttributeArgs>;
98
+ /**
99
+ * Tier 2 opt-in. ARN of a KMS CMK for encryption at rest. If omitted, AWS_OWNED_KMS is used (Tier 1 default — always on, zero cost). Use this for compliance workloads requiring key rotation control, audit trail, or the ability to revoke access by disabling the key.
100
+ */
101
+ kmsKeyArn?: pulumi.Input<string>;
102
+ /**
103
+ * Primary range (sort) key. Optional.
104
+ */
105
+ rangeKey?: pulumi.Input<inputs.aws.DynamoDBKeyAttributeArgs>;
106
+ /**
107
+ * DynamoDB Streams configuration. Opt-in. Enables change data capture on the table.
108
+ */
109
+ stream?: pulumi.Input<inputs.aws.DynamoDBStreamArgs>;
110
+ transform?: pulumi.Input<inputs.aws.DynamoTransformArgsArgs>;
111
+ /**
112
+ * Name of the attribute used for TTL (time-to-live). Items with this attribute set to a past Unix timestamp are automatically deleted by DynamoDB.
113
+ */
114
+ ttlAttribute?: pulumi.Input<string>;
115
+ }
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.DynamoDB = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("../utilities");
8
+ const grants = require("../grants");
9
+ /**
10
+ * Serverless key-value and document store. Secure-by-default DynamoDB table with GSI support, optional streams, and Lambda/EventBridge consumers. First data layer component — pairs naturally with anvil.aws.Lambda.
11
+ */
12
+ class DynamoDB extends pulumi.ComponentResource {
13
+ /**
14
+ * Returns true if the given object is an instance of DynamoDB. This is designed to work even
15
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
16
+ */
17
+ static isInstance(obj) {
18
+ if (obj === undefined || obj === null) {
19
+ return false;
20
+ }
21
+ return obj['__pulumiType'] === DynamoDB.__pulumiType;
22
+ }
23
+ /**
24
+ * Create a DynamoDB resource with the given unique name, arguments, and options.
25
+ *
26
+ * @param name The _unique_ name of the resource.
27
+ * @param args The arguments to use to populate this resource's properties.
28
+ * @param opts A bag of options that control this resource's behavior.
29
+ */
30
+ constructor(name, args, opts) {
31
+ let resourceInputs = {};
32
+ opts = opts || {};
33
+ if (!opts.id) {
34
+ if (args?.hashKey === undefined && !opts.urn) {
35
+ throw new Error("Missing required property 'hashKey'");
36
+ }
37
+ resourceInputs["globalSecondaryIndexes"] = args?.globalSecondaryIndexes;
38
+ resourceInputs["hashKey"] = args?.hashKey;
39
+ resourceInputs["kmsKeyArn"] = args?.kmsKeyArn;
40
+ resourceInputs["rangeKey"] = args?.rangeKey;
41
+ resourceInputs["stream"] = args?.stream;
42
+ resourceInputs["transform"] = args?.transform;
43
+ resourceInputs["ttlAttribute"] = args?.ttlAttribute;
44
+ resourceInputs["streamArn"] = undefined /*out*/;
45
+ resourceInputs["tableArn"] = undefined /*out*/;
46
+ resourceInputs["tableName"] = undefined /*out*/;
47
+ }
48
+ else {
49
+ resourceInputs["streamArn"] = undefined /*out*/;
50
+ resourceInputs["tableArn"] = undefined /*out*/;
51
+ resourceInputs["tableName"] = undefined /*out*/;
52
+ }
53
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
54
+ super(DynamoDB.__pulumiType, name, resourceInputs, opts, true /*remote*/);
55
+ this.__name = name;
56
+ }
57
+ /**
58
+ * Grants read access (dynamodb:GetItem, dynamodb:BatchGetItem, dynamodb:Query, dynamodb:Scan) on this dynamodb
59
+ * to the target compute resource's execution role.
60
+ *
61
+ * @param target - The compute resource to grant access to.
62
+ * @param opts - Optional. indexes: scope to specific GSI names only.
63
+ * If omitted, grants table access only — no index access.
64
+ * @param opts.justification - Optional audit trail note.
65
+ */
66
+ grantRead(target, opts) {
67
+ const name = `${this.__name}-${target.grantName()}-read`;
68
+ const indexPaths = opts?.indexes?.map(i => `index/${i}`) ?? null;
69
+ const arns = grants.buildResourceArns(this.tableArn, indexPaths);
70
+ grants.createGrant(this, name, target, ["dynamodb:GetItem", "dynamodb:BatchGetItem", "dynamodb:Query", "dynamodb:Scan"], arns, { justification: opts?.justification });
71
+ }
72
+ /**
73
+ * Grants write access (dynamodb:PutItem, dynamodb:UpdateItem, dynamodb:BatchWriteItem) on this dynamodb
74
+ * to the target compute resource's execution role.
75
+ *
76
+ * @param target - The compute resource to grant access to.
77
+ * @param opts - Optional. indexes: scope to specific GSI names only.
78
+ * If omitted, grants table access only — no index access.
79
+ * @param opts.justification - Optional audit trail note.
80
+ */
81
+ grantWrite(target, opts) {
82
+ const name = `${this.__name}-${target.grantName()}-write`;
83
+ const indexPaths = opts?.indexes?.map(i => `index/${i}`) ?? null;
84
+ const arns = grants.buildResourceArns(this.tableArn, indexPaths);
85
+ grants.createGrant(this, name, target, ["dynamodb:PutItem", "dynamodb:UpdateItem", "dynamodb:BatchWriteItem"], arns, { justification: opts?.justification });
86
+ }
87
+ /**
88
+ * Grants readwrite access (dynamodb:GetItem, dynamodb:BatchGetItem, dynamodb:Query, dynamodb:Scan, dynamodb:PutItem, dynamodb:UpdateItem, dynamodb:BatchWriteItem) on this dynamodb
89
+ * to the target compute resource's execution role.
90
+ *
91
+ * @param target - The compute resource to grant access to.
92
+ * @param opts - Optional. indexes: scope to specific GSI names only.
93
+ * If omitted, grants table access only — no index access.
94
+ * @param opts.justification - Optional audit trail note.
95
+ */
96
+ grantReadWrite(target, opts) {
97
+ const name = `${this.__name}-${target.grantName()}-readwrite`;
98
+ const indexPaths = opts?.indexes?.map(i => `index/${i}`) ?? null;
99
+ const arns = grants.buildResourceArns(this.tableArn, indexPaths);
100
+ grants.createGrant(this, name, target, ["dynamodb:GetItem", "dynamodb:BatchGetItem", "dynamodb:Query", "dynamodb:Scan", "dynamodb:PutItem", "dynamodb:UpdateItem", "dynamodb:BatchWriteItem"], arns, { justification: opts?.justification });
101
+ }
102
+ /**
103
+ * Grants delete access (dynamodb:DeleteItem) on this dynamodb
104
+ * to the target compute resource's execution role.
105
+ *
106
+ * @param target - The compute resource to grant access to.
107
+ * @param opts - Optional. indexes: scope to specific GSI names only.
108
+ * If omitted, grants table access only — no index access.
109
+ * @param opts.justification - Optional audit trail note.
110
+ */
111
+ grantDelete(target, opts) {
112
+ const name = `${this.__name}-${target.grantName()}-delete`;
113
+ const indexPaths = opts?.indexes?.map(i => `index/${i}`) ?? null;
114
+ const arns = grants.buildResourceArns(this.tableArn, indexPaths);
115
+ grants.createGrant(this, name, target, ["dynamodb:DeleteItem"], arns, { justification: opts?.justification });
116
+ }
117
+ }
118
+ exports.DynamoDB = DynamoDB;
119
+ /** @internal */
120
+ DynamoDB.__pulumiType = 'anvil:aws:DynamoDB';
121
+ //# sourceMappingURL=dynamoDB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamoDB.js","sourceRoot":"","sources":["../../aws/dynamoDB.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AAIzC,0CAA0C;AAG1C,oCAAoC;AAEpC;;GAEG;AACH,MAAa,QAAS,SAAQ,MAAM,CAAC,iBAAiB;IAOlD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,QAAQ,CAAC,YAAY,CAAC;IACzD,CAAC;IAeD;;;;;;OAMG;IACH,YAAY,IAAY,EAAE,IAAkB,EAAE,IAAsC;QAChF,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;YACV,IAAI,IAAI,EAAE,OAAO,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBAC1C,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;aAC1D;YACD,cAAc,CAAC,wBAAwB,CAAC,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QACjE,MAAM,IAAI,GAAG,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;QACjE,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,kBAAkB,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,eAAe,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,yBAAyB,CAAC,EAAE,IAAI,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,CAAC;IACjP,CAAC;IAED;;;;;;;;OAQG;IACI,WAAW,CAAC,MAA0B,EAAE,IAAqD;QAChG,MAAM,IAAI,GAAG,GAAG,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC;QAC3D,MAAM,UAAU,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC;QACjE,MAAM,IAAI,GAAG,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;QACjE,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,qBAAqB,CAAC,EAAE,IAAI,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,CAAC;IAClH,CAAC;;AA/HP,4BAiIC;AAhIG,gBAAgB;AACO,qBAAY,GAAG,oBAAoB,CAAC"}
@@ -0,0 +1,47 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ import * as inputs from "../types/input";
3
+ import * as grants from "../grants";
4
+ /**
5
+ * An Anvil-managed EventBridge event bus. Archives events for 7 days by default for replay and debugging. Rules route matching events to Lambda targets.
6
+ */
7
+ export declare class EventBus extends pulumi.ComponentResource {
8
+ /**
9
+ * Returns true if the given object is an instance of EventBus. This is designed to work even
10
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
11
+ */
12
+ static isInstance(obj: any): obj is EventBus;
13
+ /**
14
+ * The ARN of the EventBridge event bus.
15
+ */
16
+ readonly arn: pulumi.Output<string>;
17
+ /**
18
+ * The name of the EventBridge event bus. Pass to HttpApi consumer: { eventBridge: { name: bus.name } }
19
+ */
20
+ readonly name: pulumi.Output<string>;
21
+ /**
22
+ * Create a EventBus resource with the given unique name, arguments, and options.
23
+ *
24
+ * @param name The _unique_ name of the resource.
25
+ * @param args The arguments to use to populate this resource's properties.
26
+ * @param opts A bag of options that control this resource's behavior.
27
+ */
28
+ constructor(name: string, args?: EventBusArgs, opts?: pulumi.ComponentResourceOptions);
29
+ /**
30
+ * Grants putevents access (events:PutEvents) on this eventbus
31
+ * to the target compute resource's execution role.
32
+ *
33
+ * @param target - The compute resource to grant access to.
34
+ * @param opts - Optional grant options (justification for audit trail).
35
+ */
36
+ grantPutEvents(target: grants.GrantTarget, opts?: grants.GrantOptions): void;
37
+ }
38
+ /**
39
+ * The set of arguments for constructing a EventBus resource.
40
+ */
41
+ export interface EventBusArgs {
42
+ /**
43
+ * EventBridge rules on this bus. Each rule matches events by pattern and routes them to a target.
44
+ */
45
+ rules?: pulumi.Input<pulumi.Input<inputs.aws.EventBusRuleArgs>[]>;
46
+ transform?: pulumi.Input<inputs.aws.EventBridgeTransformArgsArgs>;
47
+ }
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.EventBus = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("../utilities");
8
+ const grants = require("../grants");
9
+ /**
10
+ * An Anvil-managed EventBridge event bus. Archives events for 7 days by default for replay and debugging. Rules route matching events to Lambda targets.
11
+ */
12
+ class EventBus extends pulumi.ComponentResource {
13
+ /**
14
+ * Returns true if the given object is an instance of EventBus. This is designed to work even
15
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
16
+ */
17
+ static isInstance(obj) {
18
+ if (obj === undefined || obj === null) {
19
+ return false;
20
+ }
21
+ return obj['__pulumiType'] === EventBus.__pulumiType;
22
+ }
23
+ /**
24
+ * Create a EventBus resource with the given unique name, arguments, and options.
25
+ *
26
+ * @param name The _unique_ name of the resource.
27
+ * @param args The arguments to use to populate this resource's properties.
28
+ * @param opts A bag of options that control this resource's behavior.
29
+ */
30
+ constructor(name, args, opts) {
31
+ let resourceInputs = {};
32
+ opts = opts || {};
33
+ if (!opts.id) {
34
+ resourceInputs["rules"] = args?.rules;
35
+ resourceInputs["transform"] = args?.transform;
36
+ resourceInputs["arn"] = undefined /*out*/;
37
+ resourceInputs["name"] = undefined /*out*/;
38
+ }
39
+ else {
40
+ resourceInputs["arn"] = undefined /*out*/;
41
+ resourceInputs["name"] = undefined /*out*/;
42
+ }
43
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
44
+ super(EventBus.__pulumiType, name, resourceInputs, opts, true /*remote*/);
45
+ this.__name = name;
46
+ }
47
+ /**
48
+ * Grants putevents access (events:PutEvents) on this eventbus
49
+ * to the target compute resource's execution role.
50
+ *
51
+ * @param target - The compute resource to grant access to.
52
+ * @param opts - Optional grant options (justification for audit trail).
53
+ */
54
+ grantPutEvents(target, opts) {
55
+ const name = `${this.__name}-${target.grantName()}-putevents`;
56
+ const arns = grants.buildResourceArns(this.arn, undefined);
57
+ grants.createGrant(this, name, target, ["events:PutEvents"], arns, opts);
58
+ }
59
+ }
60
+ exports.EventBus = EventBus;
61
+ /** @internal */
62
+ EventBus.__pulumiType = 'anvil:aws:EventBus';
63
+ //# sourceMappingURL=eventBus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eventBus.js","sourceRoot":"","sources":["../../aws/eventBus.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AAIzC,0CAA0C;AAG1C,oCAAoC;A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,YAAY,CAAC;QAC9D,MAAM,IAAI,GAAG,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QAC3D,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,kBAAkB,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC7E,CAAC;;AA9DL,4BAgEC;AA/DG,gBAAgB;AACO,qBAAY,GAAG,oBAAoB,CAAC"}
@@ -0,0 +1,66 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ import * as inputs from "../types/input";
3
+ import * as outputs from "../types/output";
4
+ /**
5
+ * An Anvil-managed AWS HTTP API Gateway (API Gateway v2). Route-level consumers support Lambda, SQS, EventBridge, Step Functions, and HTTP proxy integrations. Secure by default: TLS 1.2 minimum enforced on custom domains, execute-api endpoint disabled when a custom domain is set, conservative throttling defaults (1000 rps / 500 burst), CORS opt-in with wildcard origin blocked, per-consumer least-privilege IAM roles, access logs on by default.
6
+ */
7
+ export declare class HttpApi extends pulumi.ComponentResource {
8
+ /**
9
+ * Returns true if the given object is an instance of HttpApi. This is designed to work even
10
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
11
+ */
12
+ static isInstance(obj: any): obj is HttpApi;
13
+ /**
14
+ * The default execute-api endpoint URL. Empty string when a custom domain is set and the execute-api endpoint is disabled.
15
+ */
16
+ readonly apiEndpoint: pulumi.Output<string>;
17
+ /**
18
+ * The API Gateway HTTP API ID.
19
+ */
20
+ readonly apiId: pulumi.Output<string>;
21
+ /**
22
+ * ACM cert validation CNAME. Only populated when domain.dns: false and domain.certificateArn is omitted. Add this record in Cloudflare (or your DNS provider) then re-run deploy — Anvil blocks until ACM confirms validation.
23
+ */
24
+ readonly certValidationCname: pulumi.Output<outputs.aws.HttpApiCertValidationCname>;
25
+ /**
26
+ * The primary URL for the API. When a custom domain is configured this is the custom domain URL. Otherwise it is the execute-api endpoint URL.
27
+ */
28
+ readonly url: pulumi.Output<string>;
29
+ /**
30
+ * Create a HttpApi resource with the given unique name, arguments, and options.
31
+ *
32
+ * @param name The _unique_ name of the resource.
33
+ * @param args The arguments to use to populate this resource's properties.
34
+ * @param opts A bag of options that control this resource's behavior.
35
+ */
36
+ constructor(name: string, args: HttpApiArgs, opts?: pulumi.ComponentResourceOptions);
37
+ }
38
+ /**
39
+ * The set of arguments for constructing a HttpApi resource.
40
+ */
41
+ export interface HttpApiArgs {
42
+ /**
43
+ * Optional CORS configuration. Opt-in — omit to disable CORS entirely. When enabled, allowOrigins is required and wildcard '*' is blocked as a security measure.
44
+ */
45
+ cors?: pulumi.Input<inputs.aws.HttpApiCorsArgs>;
46
+ /**
47
+ * The API Gateway authorizer ID to apply to all routes. Pass auth.authorizerId from an OAuthAuthorizer or CognitoAuth component. All routes inherit this authorizer unless skipAuth: true is set on the route. Omit to leave all routes public.
48
+ */
49
+ defaultAuthorizerId?: any;
50
+ /**
51
+ * Optional custom domain for the API. When set, Anvil provisions the ACM certificate, API Gateway domain name, and Route 53 DNS record automatically. The raw execute-api endpoint is disabled — all traffic must flow through the custom domain.
52
+ */
53
+ domain?: pulumi.Input<inputs.aws.HttpApiDomainArgs>;
54
+ /**
55
+ * CloudWatch access log retention period. Presets: '7d' | '30d' | '90d' | '1y' | '3y' | '6y' | '7y'. Default: '1y' — satisfies SOC 2, ISO 27001, and PCI DSS baseline retention requirements.
56
+ */
57
+ logRetention?: pulumi.Input<string>;
58
+ /**
59
+ * The API routes. Each route maps a method and path to a consumer. At least one route is required.
60
+ */
61
+ routes: pulumi.Input<pulumi.Input<inputs.aws.HttpApiRouteArgs>[]>;
62
+ /**
63
+ * Optional throttling configuration. Defaults to rateLimit: 1000 rps and burstLimit: 500 concurrent requests when omitted. Without throttling a single route can exhaust the account-level limit shared across all APIs.
64
+ */
65
+ throttling?: pulumi.Input<inputs.aws.HttpApiThrottlingArgs>;
66
+ }