AppSyncCognitoConfig Struct
Configuration for Cognito user-pools in AppSync for Api.
| Source | aws-appsync/lib/auth-config.ts |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appsync as appsync } from 'aws-cdk-lib';
import { aws_cognito as cognito } from 'aws-cdk-lib';
declare const userPool: cognito.UserPool;
const appSyncCognitoConfig: appsync.AppSyncCognitoConfig = {
userPool: userPool,
// the properties below are optional
appIdClientRegex: 'appIdClientRegex',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appsync as appsync
from aws_cdk import aws_cognito as cognito
# user_pool: cognito.UserPool
app_sync_cognito_config = appsync.AppSyncCognitoConfig(
user_pool=user_pool,
# the properties below are optional
app_id_client_regex="appIdClientRegex"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.appsync.*;
import software.amazon.awscdk.services.cognito.*;
UserPool userPool;
AppSyncCognitoConfig appSyncCognitoConfig = AppSyncCognitoConfig.builder()
.userPool(userPool)
// the properties below are optional
.appIdClientRegex("appIdClientRegex")
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppSync;
using Amazon.CDK.AWS.Cognito;
UserPool userPool;
var appSyncCognitoConfig = new AppSyncCognitoConfig {
UserPool = userPool,
// the properties below are optional
AppIdClientRegex = "appIdClientRegex"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
var userPool UserPool
appSyncCognitoConfig := &AppSyncCognitoConfig{
UserPool: userPool,
// the properties below are optional
AppIdClientRegex: jsii.String("appIdClientRegex"),
}
Properties
appIdClientRegexoptionalstringapp_id_client_regexoptionalstrappIdClientRegexoptionalStringAppIdClientRegexoptionalstringAppIdClientRegexoptional*string = None #the optional app id regex.