@reventlessdev/rescript-pulumi-aws 2.4.0-alpha.43
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.
- package/CHANGELOG.md +366 -0
- package/LICENSE +202 -0
- package/README.md +19 -0
- package/package.json +52 -0
- package/rescript.json +27 -0
- package/scripts/bundle-resolvers.mjs +77 -0
- package/src/AWS/Aws_AvailabilityZone.res +9 -0
- package/src/AWS/Aws_AvailabilityZone.res.mjs +9 -0
- package/src/AWS/Aws_AvailabilityZone.resi +9 -0
- package/src/AWS/Aws_Aws.res +29 -0
- package/src/AWS/Aws_Aws.res.mjs +32 -0
- package/src/AWS/Aws_Common.res +2 -0
- package/src/AWS/Aws_Common.res.mjs +2 -0
- package/src/AWS/Aws_Provider.res +10 -0
- package/src/AWS/Aws_Provider.res.mjs +2 -0
- package/src/Acm/Acm.res +5 -0
- package/src/Acm/Acm.res.mjs +12 -0
- package/src/Acm/Acm_Certificate.res +27 -0
- package/src/Acm/Acm_Certificate.res.mjs +2 -0
- package/src/Acm/Acm_CertificateValidation.res +22 -0
- package/src/Acm/Acm_CertificateValidation.res.mjs +2 -0
- package/src/AppSync/AppSync.res +7 -0
- package/src/AppSync/AppSync.res.mjs +18 -0
- package/src/AppSync/AppSync_DataSource.res +93 -0
- package/src/AppSync/AppSync_DataSource.res.mjs +42 -0
- package/src/AppSync/AppSync_Function.res +75 -0
- package/src/AppSync/AppSync_Function.res.mjs +36 -0
- package/src/AppSync/AppSync_GraphQLApi.res +65 -0
- package/src/AppSync/AppSync_GraphQLApi.res.mjs +20 -0
- package/src/AppSync/AppSync_Resolver.res +229 -0
- package/src/AppSync/AppSync_Resolver.res.mjs +113 -0
- package/src/AppSync/AppSync_ResolverRuntime.res +214 -0
- package/src/AppSync/AppSync_ResolverRuntime.res.mjs +15 -0
- package/src/AppSync/AppSync_Resolver_Functions.res +998 -0
- package/src/AppSync/AppSync_Resolver_Functions.res.mjs +913 -0
- package/src/Aws.res +5 -0
- package/src/Aws.res.mjs +16 -0
- package/src/AwsNative/AppSync/AwsNative_AppSync_Api.res +92 -0
- package/src/AwsNative/AppSync/AwsNative_AppSync_Api.res.mjs +12 -0
- package/src/AwsNative/AppSync/AwsNative_AppSync_ChannelNamespace.res +81 -0
- package/src/AwsNative/AppSync/AwsNative_AppSync_ChannelNamespace.res.mjs +18 -0
- package/src/AwsNative/AppSync/AwsNative_AppSync_Resolver.res +39 -0
- package/src/AwsNative/AppSync/AwsNative_AppSync_Resolver.res.mjs +12 -0
- package/src/AwsNative/AwsNative.res +10 -0
- package/src/AwsNative/AwsNative.res.mjs +13 -0
- package/src/CloudFront/CloudFront.res +5 -0
- package/src/CloudFront/CloudFront.res.mjs +12 -0
- package/src/CloudFront/CloudFront_Distribution.res +81 -0
- package/src/CloudFront/CloudFront_Distribution.res.mjs +2 -0
- package/src/CloudFront/CloudFront_OriginAccessControl.res +20 -0
- package/src/CloudFront/CloudFront_OriginAccessControl.res.mjs +2 -0
- package/src/Cloudwatch/Cloudwatch.res +7 -0
- package/src/Cloudwatch/Cloudwatch.res.mjs +18 -0
- package/src/Cloudwatch/Cloudwatch_EventRule.res +52 -0
- package/src/Cloudwatch/Cloudwatch_EventRule.res.mjs +37 -0
- package/src/Cloudwatch/Cloudwatch_EventTarget.res +28 -0
- package/src/Cloudwatch/Cloudwatch_EventTarget.res.mjs +25 -0
- package/src/Cloudwatch/Cloudwatch_LogGroup.res +14 -0
- package/src/Cloudwatch/Cloudwatch_LogGroup.res.mjs +2 -0
- package/src/Cloudwatch/Cloudwatch_LogMetricFilter.res +28 -0
- package/src/Cloudwatch/Cloudwatch_LogMetricFilter.res.mjs +2 -0
- package/src/Cognito/Cognito.res +8 -0
- package/src/Cognito/Cognito.res.mjs +21 -0
- package/src/Cognito/Cognito_IdentityPool.res +148 -0
- package/src/Cognito/Cognito_IdentityPool.res.mjs +65 -0
- package/src/Cognito/Cognito_IdentityPoolRoleAttachment.res +18 -0
- package/src/Cognito/Cognito_IdentityPoolRoleAttachment.res.mjs +2 -0
- package/src/Cognito/Cognito_UserGroup.res +16 -0
- package/src/Cognito/Cognito_UserGroup.res.mjs +2 -0
- package/src/Cognito/Cognito_UserPool.res +125 -0
- package/src/Cognito/Cognito_UserPool.res.mjs +44 -0
- package/src/Cognito/Cognito_UserPoolClient.res +33 -0
- package/src/Cognito/Cognito_UserPoolClient.res.mjs +2 -0
- package/src/DynamoDb/DynamoDb.res +5 -0
- package/src/DynamoDb/DynamoDb.res.mjs +12 -0
- package/src/DynamoDb/DynamoDb_Stream.res +41 -0
- package/src/DynamoDb/DynamoDb_Stream.res.mjs +2 -0
- package/src/DynamoDb/DynamoDb_Table.res +66 -0
- package/src/DynamoDb/DynamoDb_Table.res.mjs +2 -0
- package/src/EC2/EC2.res +13 -0
- package/src/EC2/EC2.res.mjs +36 -0
- package/src/EC2/EC2_Common.res +13 -0
- package/src/EC2/EC2_Common.res.mjs +22 -0
- package/src/EC2/EC2_DefaultSecurityGroup.res +22 -0
- package/src/EC2/EC2_DefaultSecurityGroup.res.mjs +19 -0
- package/src/EC2/EC2_Eip.res +24 -0
- package/src/EC2/EC2_Eip.res.mjs +18 -0
- package/src/EC2/EC2_InternetGateway.res +25 -0
- package/src/EC2/EC2_InternetGateway.res.mjs +18 -0
- package/src/EC2/EC2_NatGateway.res +30 -0
- package/src/EC2/EC2_NatGateway.res.mjs +18 -0
- package/src/EC2/EC2_RouteTable.res +49 -0
- package/src/EC2/EC2_RouteTable.res.mjs +38 -0
- package/src/EC2/EC2_RouteTableAssociation.res +30 -0
- package/src/EC2/EC2_RouteTableAssociation.res.mjs +18 -0
- package/src/EC2/EC2_SecurityGroup.res +44 -0
- package/src/EC2/EC2_SecurityGroup.res.mjs +49 -0
- package/src/EC2/EC2_Subnet.res +31 -0
- package/src/EC2/EC2_Subnet.res.mjs +19 -0
- package/src/EC2/EC2_Vpc.res +25 -0
- package/src/EC2/EC2_Vpc.res.mjs +18 -0
- package/src/EC2/EC2_VpcEndpoint.res +43 -0
- package/src/EC2/EC2_VpcEndpoint.res.mjs +22 -0
- package/src/ECS/ECS.res +6 -0
- package/src/ECS/ECS.res.mjs +15 -0
- package/src/ECS/ECS_Cluster.res +10 -0
- package/src/ECS/ECS_Cluster.res.mjs +2 -0
- package/src/ECS/ECS_Container.res +58 -0
- package/src/ECS/ECS_Container.res.mjs +2 -0
- package/src/ECS/ECS_TaskDefinition.res +31 -0
- package/src/ECS/ECS_TaskDefinition.res.mjs +2 -0
- package/src/IAM/IAM.res +148 -0
- package/src/IAM/IAM.res.mjs +61 -0
- package/src/IAM/IAM_ManagedPolicies.res +32 -0
- package/src/IAM/IAM_ManagedPolicies.res.mjs +2 -0
- package/src/IAM/PolicyDocument.res +163 -0
- package/src/IAM/PolicyDocument.res.mjs +164 -0
- package/src/Kinesis/Kinesis.res +4 -0
- package/src/Kinesis/Kinesis.res.mjs +9 -0
- package/src/Kinesis/Kinesis_Stream.res +70 -0
- package/src/Kinesis/Kinesis_Stream.res.mjs +9 -0
- package/src/Lambda/EventSourceMapping.res +78 -0
- package/src/Lambda/EventSourceMapping.res.mjs +2 -0
- package/src/Lambda/FunctionUrl.res +41 -0
- package/src/Lambda/FunctionUrl.res.mjs +2 -0
- package/src/Lambda/Lambda.res +270 -0
- package/src/Lambda/Lambda.res.mjs +94 -0
- package/src/Route53/Route53.res +4 -0
- package/src/Route53/Route53.res.mjs +9 -0
- package/src/Route53/Route53_Record.res +36 -0
- package/src/Route53/Route53_Record.res.mjs +2 -0
- package/src/S3/S3.res +10 -0
- package/src/S3/S3.res.mjs +27 -0
- package/src/S3/S3_Bucket.res +236 -0
- package/src/S3/S3_Bucket.res.mjs +2 -0
- package/src/S3/S3_BucketAclV2.res +24 -0
- package/src/S3/S3_BucketAclV2.res.mjs +2 -0
- package/src/S3/S3_BucketObject.res +22 -0
- package/src/S3/S3_BucketObject.res.mjs +2 -0
- package/src/S3/S3_BucketOwnershipControls.res +19 -0
- package/src/S3/S3_BucketOwnershipControls.res.mjs +2 -0
- package/src/S3/S3_BucketPolicy.res +13 -0
- package/src/S3/S3_BucketPolicy.res.mjs +2 -0
- package/src/S3/S3_BucketPublicAccessBlock.res +16 -0
- package/src/S3/S3_BucketPublicAccessBlock.res.mjs +2 -0
- package/src/S3/S3_BucketV2.res +11 -0
- package/src/S3/S3_BucketV2.res.mjs +2 -0
- package/src/SES/SES.bs.js +11 -0
- package/src/SES/SES.res +25 -0
- package/src/SES/SES.res.mjs +12 -0
- package/src/SNS/SNS.res +5 -0
- package/src/SNS/SNS.res.mjs +12 -0
- package/src/SNS/SNS_Topic.res +71 -0
- package/src/SNS/SNS_Topic.res.mjs +2 -0
- package/src/SNS/SNS_TopicSubscription.res +21 -0
- package/src/SNS/SNS_TopicSubscription.res.mjs +2 -0
- package/src/SQS/SQS.res +5 -0
- package/src/SQS/SQS.res.mjs +12 -0
- package/src/SQS/SQS_Queue.res +92 -0
- package/src/SQS/SQS_Queue.res.mjs +19 -0
- package/src/SQS/SQS_QueuePolicy.res +13 -0
- package/src/SQS/SQS_QueuePolicy.res.mjs +2 -0
- package/src/SecretsManager/GetSecretVersion.res +37 -0
- package/src/SecretsManager/GetSecretVersion.res.mjs +23 -0
- package/src/example/CustomDomainExample.res +71 -0
- package/src/example/CustomDomainExample.res.mjs +57 -0
- package/tests/AppSync_Resolver_FunctionsTest.mjs +597 -0
- package/tests/__mocks__/appsync-utils.mjs +26 -0
- package/tests/resolverTestHelper.mjs +46 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
|
|
4
|
+
|
|
5
|
+
function make(deadLetterTargetArn, maxReceiveCount) {
|
|
6
|
+
return Stdlib_Option.getOr(JSON.stringify({
|
|
7
|
+
deadLetterTargetArn: deadLetterTargetArn,
|
|
8
|
+
maxReceiveCount: maxReceiveCount
|
|
9
|
+
}), "{}");
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
let RedrivePolicy = {
|
|
13
|
+
make: make
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
RedrivePolicy,
|
|
18
|
+
}
|
|
19
|
+
/* No side effect */
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**ocaml.doc(" @pulumi/aws/sqsqueuepolicy
|
|
2
|
+
see: https://www.pulumi.com/registry/packages/aws/api-docs/sqs/queuepolicy
|
|
3
|
+
*/
|
|
4
|
+
type args = {
|
|
5
|
+
policy: Pulumi.Input.t<string>,
|
|
6
|
+
queueUrl: Pulumi.Input.t<string>,
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
type t = {id: Pulumi.Output.t<string>}
|
|
10
|
+
|
|
11
|
+
@module("@pulumi/aws") @scope("sqs") @new
|
|
12
|
+
external make: (~name: string, ~args: args, ~opts: option<Pulumi.CustomResourceOptions.t>) => t =
|
|
13
|
+
"QueuePolicy"
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** @pulumi/aws/secretsmanager/getsecretversion
|
|
2
|
+
see: https://www.pulumi.com/registry/packages/aws/api-docs/secretsmanager/getsecretversion
|
|
3
|
+
*/
|
|
4
|
+
type args = {
|
|
5
|
+
secretId: string,
|
|
6
|
+
versionId?: string,
|
|
7
|
+
versionStage?: string,
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
type t = {
|
|
11
|
+
arn: string,
|
|
12
|
+
id: string,
|
|
13
|
+
secretId: string,
|
|
14
|
+
secretBinary: string,
|
|
15
|
+
secretString: string,
|
|
16
|
+
versionId: string,
|
|
17
|
+
versionStage: option<string>,
|
|
18
|
+
versionStages: array<string>,
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@module("@pulumi/aws") @scope("secretsmanager") @val
|
|
22
|
+
external getSecretVersionOutput: (
|
|
23
|
+
~args: args=?,
|
|
24
|
+
~opts: Pulumi.CustomResourceOptions.t=?,
|
|
25
|
+
) => Pulumi.Output.t<t> = "getSecretVersionOutput"
|
|
26
|
+
|
|
27
|
+
let decodeSecret = secret =>
|
|
28
|
+
secret.secretString
|
|
29
|
+
->JSON.parseOrThrow
|
|
30
|
+
->JSON.Decode.object
|
|
31
|
+
->Option.getOr(Dict.make())
|
|
32
|
+
->Dict.mapValues(_, json => json->JSON.Decode.string->Option.getOr(""))
|
|
33
|
+
|
|
34
|
+
let getSecretNames = arn =>
|
|
35
|
+
getSecretVersionOutput(~args={secretId: arn})->Pulumi.Output.apply(secret =>
|
|
36
|
+
secret->decodeSecret->Dict.keysToArray
|
|
37
|
+
)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
import * as Aws from "@pulumi/aws";
|
|
4
|
+
import * as Stdlib_Dict from "@rescript/runtime/lib/es6/Stdlib_Dict.js";
|
|
5
|
+
import * as Stdlib_JSON from "@rescript/runtime/lib/es6/Stdlib_JSON.js";
|
|
6
|
+
import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
|
|
7
|
+
|
|
8
|
+
function decodeSecret(secret) {
|
|
9
|
+
let __x = Stdlib_Option.getOr(Stdlib_JSON.Decode.object(JSON.parse(secret.secretString)), {});
|
|
10
|
+
return Stdlib_Dict.mapValues(__x, json => Stdlib_Option.getOr(Stdlib_JSON.Decode.string(json), ""));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function getSecretNames(arn) {
|
|
14
|
+
return Aws.secretsmanager.getSecretVersionOutput({
|
|
15
|
+
secretId: arn
|
|
16
|
+
}).apply(secret => Object.keys(decodeSecret(secret)));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
decodeSecret,
|
|
21
|
+
getSecretNames,
|
|
22
|
+
}
|
|
23
|
+
/* @pulumi/aws Not a pure module */
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// Compile-only smoke for the ACM / Route53 / Provider bindings used by
|
|
2
|
+
// custom-domain provisioning. Not executed at deploy time — its sole job is
|
|
3
|
+
// to keep the four new bindings type-checked together (alt-region provider →
|
|
4
|
+
// cert → DNS validation record → cert validation → Route53 alias on a
|
|
5
|
+
// fictitious distribution domain). See docs/plans/done/host-ui-custom-domain.md.
|
|
6
|
+
|
|
7
|
+
let usEast1 = Aws.Provider.make(
|
|
8
|
+
~name="example-us-east-1",
|
|
9
|
+
~args={region: Pulumi.Input.make("us-east-1")},
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
let cert = Acm.Certificate.make(
|
|
13
|
+
~name="example-cert",
|
|
14
|
+
~args={
|
|
15
|
+
domainName: Pulumi.Input.make("example.app.reventless.dev"),
|
|
16
|
+
validationMethod: Pulumi.Input.make("DNS"),
|
|
17
|
+
},
|
|
18
|
+
~opts={provider: usEast1},
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
let firstValidationOption = cert.domainValidationOptions->Pulumi.Output.apply(opts =>
|
|
22
|
+
opts->Array.getUnsafe(0)
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
let validationRecord = Route53.Record.make(
|
|
26
|
+
~name="example-cert-validation",
|
|
27
|
+
~args={
|
|
28
|
+
zoneId: Pulumi.Input.make("Z00000000000000000000"),
|
|
29
|
+
name: firstValidationOption
|
|
30
|
+
->Pulumi.Output.apply(o => o.resourceRecordName)
|
|
31
|
+
->Pulumi.Output.asInput,
|
|
32
|
+
type_: firstValidationOption
|
|
33
|
+
->Pulumi.Output.apply(o => o.resourceRecordType)
|
|
34
|
+
->Pulumi.Output.asInput,
|
|
35
|
+
ttl: Pulumi.Input.make(60),
|
|
36
|
+
records: firstValidationOption
|
|
37
|
+
->Pulumi.Output.apply(o => [o.resourceRecordValue])
|
|
38
|
+
->Pulumi.Output.asInput,
|
|
39
|
+
},
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
let validated = Acm.CertificateValidation.make(
|
|
43
|
+
~name="example-cert-validated",
|
|
44
|
+
~args={
|
|
45
|
+
certificateArn: cert.arn->Pulumi.Output.asInput,
|
|
46
|
+
validationRecordFqdns: [validationRecord.fqdn]
|
|
47
|
+
->Pulumi.Output.all
|
|
48
|
+
->Pulumi.Output.asInput,
|
|
49
|
+
},
|
|
50
|
+
~opts={provider: usEast1},
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
let _aliasRecord = Route53.Record.make(
|
|
54
|
+
~name="example-alias",
|
|
55
|
+
~args={
|
|
56
|
+
zoneId: Pulumi.Input.make("Z00000000000000000000"),
|
|
57
|
+
name: Pulumi.Input.make("example.app.reventless.dev"),
|
|
58
|
+
type_: Pulumi.Input.make("A"),
|
|
59
|
+
aliases: [
|
|
60
|
+
(
|
|
61
|
+
{
|
|
62
|
+
name: Pulumi.Input.make("d123abc.cloudfront.net"),
|
|
63
|
+
zoneId: Pulumi.Input.make("Z2FDTNDATAQYW2"),
|
|
64
|
+
evaluateTargetHealth: Pulumi.Input.make(false),
|
|
65
|
+
}: Route53.Record.alias
|
|
66
|
+
),
|
|
67
|
+
]->Pulumi.Input.make,
|
|
68
|
+
},
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
let _certArn = validated.certificateArn
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
import * as Aws from "@pulumi/aws";
|
|
4
|
+
import * as Pulumi from "@pulumi/pulumi";
|
|
5
|
+
import * as Primitive_option from "@rescript/runtime/lib/es6/Primitive_option.js";
|
|
6
|
+
|
|
7
|
+
let usEast1 = new Aws.Provider("example-us-east-1", {
|
|
8
|
+
region: "us-east-1"
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
let cert = new (Aws.acm.Certificate)("example-cert", {
|
|
12
|
+
domainName: "example.app.reventless.dev",
|
|
13
|
+
validationMethod: "DNS"
|
|
14
|
+
}, {
|
|
15
|
+
provider: Primitive_option.some(usEast1)
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
let firstValidationOption = cert.domainValidationOptions.apply(opts => opts[0]);
|
|
19
|
+
|
|
20
|
+
let validationRecord = new (Aws.route53.Record)("example-cert-validation", {
|
|
21
|
+
zoneId: "Z00000000000000000000",
|
|
22
|
+
name: firstValidationOption.apply(o => o.resourceRecordName),
|
|
23
|
+
type: firstValidationOption.apply(o => o.resourceRecordType),
|
|
24
|
+
ttl: 60,
|
|
25
|
+
records: firstValidationOption.apply(o => [o.resourceRecordValue])
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
let validated = new (Aws.acm.CertificateValidation)("example-cert-validated", {
|
|
29
|
+
certificateArn: cert.arn,
|
|
30
|
+
validationRecordFqdns: Pulumi.all([validationRecord.fqdn])
|
|
31
|
+
}, {
|
|
32
|
+
provider: Primitive_option.some(usEast1)
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
let _aliasRecord = new (Aws.route53.Record)("example-alias", {
|
|
36
|
+
zoneId: "Z00000000000000000000",
|
|
37
|
+
name: "example.app.reventless.dev",
|
|
38
|
+
type: "A",
|
|
39
|
+
aliases: [{
|
|
40
|
+
name: "d123abc.cloudfront.net",
|
|
41
|
+
zoneId: "Z2FDTNDATAQYW2",
|
|
42
|
+
evaluateTargetHealth: false
|
|
43
|
+
}]
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
let _certArn = validated.certificateArn;
|
|
47
|
+
|
|
48
|
+
export {
|
|
49
|
+
usEast1,
|
|
50
|
+
cert,
|
|
51
|
+
firstValidationOption,
|
|
52
|
+
validationRecord,
|
|
53
|
+
validated,
|
|
54
|
+
_aliasRecord,
|
|
55
|
+
_certArn,
|
|
56
|
+
}
|
|
57
|
+
/* usEast1 Not a pure module */
|