Package: aws-solutions-constructs.aws-wafwebacl-appsync
aws-wafwebacl-appsync module---All classes are under active development and subject to non-backward compatible changes or removal in any
future version. These are not subject to theSemantic Versioningmodel.
This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.Reference Documentation:https://docs.aws.amazon.com/solutions/latest/constructs/LanguagePackagePythonaws_solutions_constructs.aws_wafwebacl_appsyncTypescript@aws-solutions-constructs/aws-wafwebacl-appsyncJavasoftware.amazon.awsconstructs.services.wafwebaclappsyncOverviewThis AWS Solutions Construct implements an AWS WAF web ACL connected to an AWS AppSync API.Here is a minimal deployable pattern definition:Typescriptimport{Construct}from"constructs";import{Stack,StackProps}from"aws-cdk-lib";import{WafwebaclToAppsyncProps,WafwebaclToAppsync,}from"@aws-solutions-constructs/aws-wafwebacl-appsync";//UseanexistingAppSyncGraphQLAPIconstexistingGraphQLApi=previouslyCreatedApi;//ThisconstructcanonlybeattachedtoaconfiguredAWSAppSyncAPI.newWafwebaclToAppsync(this,"test-wafwebacl-appsync",{existingAppsyncApi:existingGraphQLApi,});Pythonfromaws_solutions_constructs.aws_wafwebacl_appsyncimportWafwebaclToAppsyncProps,WafwebaclToAppsyncfromaws_cdkimport(aws_route53asroute53,Stack)fromconstructsimportConstruct# Use an existing AppSync APIexistingGraphQLApi=previouslyCreatedApi# This construct can only be attached to a configured AWS AppSync API.WafwebaclToAppsync(self,'test_wafwebacl_appsync',existing_appsync_api=existingGraphQLApi)Javaimportsoftware.constructs.Construct;importsoftware.amazon.awscdk.Stack;importsoftware.amazon.awscdk.StackProps;importsoftware.amazon.awsconstructs.services.wafwebaclappsync.*;// Use an existing AppSync APIfinalexistingGraphQLApi=previouslyCreatedApi// This construct can only be attached to a configured AWS AppSync API.newWafwebaclToAppsync(this,"test-wafwebacl-appsync",newWafwebaclToAppsyncProps.Builder().existingAppsyncApi(existingGraphQLApi).build());Pattern Construct PropsNameTypeDescriptionexistingAppsyncApiappsync.CfnGraphQLApiThe existing Appsync CfnGraphQLApi object that will be protected with the WAF web ACL.Note that a WAF web ACL can only be added to a configured AppSync API, so this construct only accepts an existing CfnGraphQLApi and does not accept CfnGraphQLApiProps.existingWebaclObj?waf.CfnWebACLExisting instance of a WAF web ACL, an error will occur if this and props is set.webaclProps?waf.CfnWebACLPropsOptional user-provided props to override the default props for the AWS WAF web ACL. To use a different collection of managed rule sets, specify a new rules property. Use ourwrapManagedRuleSet(managedGroupName: string, vendorName: string, priority: number)function from core to create an array entry from each desired managed rule set.Pattern PropertiesNameTypeDescriptionwebaclwaf.CfnWebACLReturns an instance of the waf.CfnWebACL created by the construct.appsyncApiappsync.CfnGraphQLApiReturns an instance of the CfnGraphQLApi used by the pattern.Default settingsOut of the box implementation of the Construct without any override will set the following defaults:AWS WAFDeploy a WAF web ACL with 7AWS managed rule groups.AWSManagedRulesBotControlRuleSetAWSManagedRulesKnownBadInputsRuleSetAWSManagedRulesCommonRuleSetAWSManagedRulesAnonymousIpListAWSManagedRulesAmazonIpReputationListAWSManagedRulesAdminProtectionRuleSetAWSManagedRulesSQLiRuleSetNote that the default rules can be replaced by specifying the rules property of CfnWebACLPropsSend metrics to Amazon CloudWatchAppSync APIUser provided AppSync graphql API object is used as-isArchitecture© Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.