-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3af9b63
commit 11291b0
Showing
10 changed files
with
1,108 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
227 changes: 227 additions & 0 deletions
227
...-cdk/aws-appsync/test/log-retention.integ.snapshot/AppSyncIntegLogRetention.template.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,227 @@ | ||
{ | ||
"Resources": { | ||
"GraphqlApiApiLogsRoleBB9E6BAD": { | ||
"Type": "AWS::IAM::Role", | ||
"Properties": { | ||
"AssumeRolePolicyDocument": { | ||
"Statement": [ | ||
{ | ||
"Action": "sts:AssumeRole", | ||
"Effect": "Allow", | ||
"Principal": { | ||
"Service": "appsync.amazonaws.com" | ||
} | ||
} | ||
], | ||
"Version": "2012-10-17" | ||
}, | ||
"ManagedPolicyArns": [ | ||
{ | ||
"Fn::Join": [ | ||
"", | ||
[ | ||
"arn:", | ||
{ | ||
"Ref": "AWS::Partition" | ||
}, | ||
":iam::aws:policy/service-role/AWSAppSyncPushToCloudWatchLogs" | ||
] | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
"GraphqlApi1B6CF24C": { | ||
"Type": "AWS::AppSync::GraphQLApi", | ||
"Properties": { | ||
"AuthenticationType": "API_KEY", | ||
"Name": "IntegLogRetention", | ||
"LogConfig": { | ||
"CloudWatchLogsRoleArn": { | ||
"Fn::GetAtt": [ | ||
"GraphqlApiApiLogsRoleBB9E6BAD", | ||
"Arn" | ||
] | ||
}, | ||
"FieldLogLevel": "NONE" | ||
} | ||
} | ||
}, | ||
"GraphqlApiSchema1B71CE4F": { | ||
"Type": "AWS::AppSync::GraphQLSchema", | ||
"Properties": { | ||
"ApiId": { | ||
"Fn::GetAtt": [ | ||
"GraphqlApi1B6CF24C", | ||
"ApiId" | ||
] | ||
}, | ||
"Definition": "type test {\n version: String!\n}\ntype Query {\n getTests: [test]!\n}\ntype Mutation {\n addTest(version: String!): test\n}\n" | ||
} | ||
}, | ||
"GraphqlApiDefaultApiKey47EE7128": { | ||
"Type": "AWS::AppSync::ApiKey", | ||
"Properties": { | ||
"ApiId": { | ||
"Fn::GetAtt": [ | ||
"GraphqlApi1B6CF24C", | ||
"ApiId" | ||
] | ||
} | ||
}, | ||
"DependsOn": [ | ||
"GraphqlApiSchema1B71CE4F" | ||
] | ||
}, | ||
"GraphqlApiLogRetention082A7017": { | ||
"Type": "Custom::LogRetention", | ||
"Properties": { | ||
"ServiceToken": { | ||
"Fn::GetAtt": [ | ||
"LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A", | ||
"Arn" | ||
] | ||
}, | ||
"LogGroupName": { | ||
"Fn::Join": [ | ||
"", | ||
[ | ||
"/aws/appsync/apis/", | ||
{ | ||
"Fn::GetAtt": [ | ||
"GraphqlApi1B6CF24C", | ||
"ApiId" | ||
] | ||
} | ||
] | ||
] | ||
}, | ||
"RetentionInDays": 7 | ||
} | ||
}, | ||
"LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB": { | ||
"Type": "AWS::IAM::Role", | ||
"Properties": { | ||
"AssumeRolePolicyDocument": { | ||
"Statement": [ | ||
{ | ||
"Action": "sts:AssumeRole", | ||
"Effect": "Allow", | ||
"Principal": { | ||
"Service": "lambda.amazonaws.com" | ||
} | ||
} | ||
], | ||
"Version": "2012-10-17" | ||
}, | ||
"ManagedPolicyArns": [ | ||
{ | ||
"Fn::Join": [ | ||
"", | ||
[ | ||
"arn:", | ||
{ | ||
"Ref": "AWS::Partition" | ||
}, | ||
":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" | ||
] | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
"LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB": { | ||
"Type": "AWS::IAM::Policy", | ||
"Properties": { | ||
"PolicyDocument": { | ||
"Statement": [ | ||
{ | ||
"Action": [ | ||
"logs:DeleteRetentionPolicy", | ||
"logs:PutRetentionPolicy" | ||
], | ||
"Effect": "Allow", | ||
"Resource": "*" | ||
} | ||
], | ||
"Version": "2012-10-17" | ||
}, | ||
"PolicyName": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB", | ||
"Roles": [ | ||
{ | ||
"Ref": "LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB" | ||
} | ||
] | ||
} | ||
}, | ||
"LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A": { | ||
"Type": "AWS::Lambda::Function", | ||
"Properties": { | ||
"Handler": "index.handler", | ||
"Runtime": "nodejs14.x", | ||
"Code": { | ||
"S3Bucket": { | ||
"Ref": "AssetParametersc70c1d1695771af4771fd98971e16bb3e6443c62c2994b002b2c3d76e707b13aS3BucketB4787383" | ||
}, | ||
"S3Key": { | ||
"Fn::Join": [ | ||
"", | ||
[ | ||
{ | ||
"Fn::Select": [ | ||
0, | ||
{ | ||
"Fn::Split": [ | ||
"||", | ||
{ | ||
"Ref": "AssetParametersc70c1d1695771af4771fd98971e16bb3e6443c62c2994b002b2c3d76e707b13aS3VersionKey8CF8E820" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"Fn::Select": [ | ||
1, | ||
{ | ||
"Fn::Split": [ | ||
"||", | ||
{ | ||
"Ref": "AssetParametersc70c1d1695771af4771fd98971e16bb3e6443c62c2994b002b2c3d76e707b13aS3VersionKey8CF8E820" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
] | ||
} | ||
}, | ||
"Role": { | ||
"Fn::GetAtt": [ | ||
"LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB", | ||
"Arn" | ||
] | ||
} | ||
}, | ||
"DependsOn": [ | ||
"LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRoleDefaultPolicyADDA7DEB", | ||
"LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aServiceRole9741ECFB" | ||
] | ||
} | ||
}, | ||
"Parameters": { | ||
"AssetParametersc70c1d1695771af4771fd98971e16bb3e6443c62c2994b002b2c3d76e707b13aS3BucketB4787383": { | ||
"Type": "String", | ||
"Description": "S3 bucket for asset \"c70c1d1695771af4771fd98971e16bb3e6443c62c2994b002b2c3d76e707b13a\"" | ||
}, | ||
"AssetParametersc70c1d1695771af4771fd98971e16bb3e6443c62c2994b002b2c3d76e707b13aS3VersionKey8CF8E820": { | ||
"Type": "String", | ||
"Description": "S3 key for asset version \"c70c1d1695771af4771fd98971e16bb3e6443c62c2994b002b2c3d76e707b13a\"" | ||
}, | ||
"AssetParametersc70c1d1695771af4771fd98971e16bb3e6443c62c2994b002b2c3d76e707b13aArtifactHashC9560B34": { | ||
"Type": "String", | ||
"Description": "Artifact hash for asset \"c70c1d1695771af4771fd98971e16bb3e6443c62c2994b002b2c3d76e707b13a\"" | ||
} | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...sync/test/log-retention.integ.snapshot/IntegDefaultTestDeployAssert4E6713E1.template.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
1 change: 1 addition & 0 deletions
1
...napshot/asset.c70c1d1695771af4771fd98971e16bb3e6443c62c2994b002b2c3d76e707b13a/index.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export declare function handler(event: AWSLambda.CloudFormationCustomResourceEvent, context: AWSLambda.Context): Promise<void>; |
Oops, something went wrong.