Skip to content
v2.278.0

AuthProviderProperty Struct ​

Describes an authorization provider.

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';
const authProviderProperty: appsync.CfnApi.AuthProviderProperty = {
  authType: 'authType',

  // the properties below are optional
  cognitoConfig: {
    awsRegion: 'awsRegion',
    userPoolId: 'userPoolId',

    // the properties below are optional
    appIdClientRegex: 'appIdClientRegex',
  },
  lambdaAuthorizerConfig: {
    authorizerUri: 'authorizerUri',

    // the properties below are optional
    authorizerResultTtlInSeconds: 123,
    identityValidationExpression: 'identityValidationExpression',
  },
  openIdConnectConfig: {
    issuer: 'issuer',

    // the properties below are optional
    authTtl: 123,
    clientId: 'clientId',
    iatTtl: 123,
  },
};
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

auth_provider_property = appsync.CfnApi.AuthProviderProperty(
    auth_type="authType",

    # the properties below are optional
    cognito_config=appsync.CfnApi.CognitoConfigProperty(
        aws_region="awsRegion",
        user_pool_id="userPoolId",

        # the properties below are optional
        app_id_client_regex="appIdClientRegex"
    ),
    lambda_authorizer_config=appsync.CfnApi.LambdaAuthorizerConfigProperty(
        authorizer_uri="authorizerUri",

        # the properties below are optional
        authorizer_result_ttl_in_seconds=123,
        identity_validation_expression="identityValidationExpression"
    ),
    open_id_connect_config=appsync.CfnApi.OpenIDConnectConfigProperty(
        issuer="issuer",

        # the properties below are optional
        auth_ttl=123,
        client_id="clientId",
        iat_ttl=123
    )
)
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.*;

AuthProviderProperty authProviderProperty = AuthProviderProperty.builder()
        .authType("authType")

        // the properties below are optional
        .cognitoConfig(CognitoConfigProperty.builder()
                .awsRegion("awsRegion")
                .userPoolId("userPoolId")

                // the properties below are optional
                .appIdClientRegex("appIdClientRegex")
                .build())
        .lambdaAuthorizerConfig(LambdaAuthorizerConfigProperty.builder()
                .authorizerUri("authorizerUri")

                // the properties below are optional
                .authorizerResultTtlInSeconds(123)
                .identityValidationExpression("identityValidationExpression")
                .build())
        .openIdConnectConfig(OpenIDConnectConfigProperty.builder()
                .issuer("issuer")

                // the properties below are optional
                .authTtl(123)
                .clientId("clientId")
                .iatTtl(123)
                .build())
        .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;

var authProviderProperty = new AuthProviderProperty {
    AuthType = "authType",

    // the properties below are optional
    CognitoConfig = new CognitoConfigProperty {
        AwsRegion = "awsRegion",
        UserPoolId = "userPoolId",

        // the properties below are optional
        AppIdClientRegex = "appIdClientRegex"
    },
    LambdaAuthorizerConfig = new LambdaAuthorizerConfigProperty {
        AuthorizerUri = "authorizerUri",

        // the properties below are optional
        AuthorizerResultTtlInSeconds = 123,
        IdentityValidationExpression = "identityValidationExpression"
    },
    OpenIdConnectConfig = new OpenIDConnectConfigProperty {
        Issuer = "issuer",

        // the properties below are optional
        AuthTtl = 123,
        ClientId = "clientId",
        IatTtl = 123
    }
};
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"

authProviderProperty := &AuthProviderProperty{
	AuthType: jsii.String("authType"),

	// the properties below are optional
	CognitoConfig: &CognitoConfigProperty{
		AwsRegion: jsii.String("awsRegion"),
		UserPoolId: jsii.String("userPoolId"),

		// the properties below are optional
		AppIdClientRegex: jsii.String("appIdClientRegex"),
	},
	LambdaAuthorizerConfig: &LambdaAuthorizerConfigProperty{
		AuthorizerUri: jsii.String("authorizerUri"),

		// the properties below are optional
		AuthorizerResultTtlInSeconds: jsii.Number(123),
		IdentityValidationExpression: jsii.String("identityValidationExpression"),
	},
	OpenIdConnectConfig: &OpenIDConnectConfigProperty{
		Issuer: jsii.String("issuer"),

		// the properties below are optional
		AuthTtl: jsii.Number(123),
		ClientId: jsii.String("clientId"),
		IatTtl: jsii.Number(123),
	},
}

Properties ​

authTypestringauth_typestrauthTypeStringAuthTypestringAuthType*string required #
The authorization type.
cognitoConfigoptionalIResolvable | CfnApi.CognitoConfigPropertycognito_configoptionaltyping.Union[IResolvable, CognitoConfigProperty]cognitoConfigoptionalIResolvableCognitoConfigoptionalIResolvableCognitoConfigoptionalinterface{} #
Describes an Amazon Cognito user pool configuration.
lambdaAuthorizerConfigoptionalIResolvable | CfnApi.LambdaAuthorizerConfigPropertylambda_authorizer_configoptionaltyping.Union[IResolvable, LambdaAuthorizerConfigProperty]lambdaAuthorizerConfigoptionalIResolvableLambdaAuthorizerConfigoptionalIResolvableLambdaAuthorizerConfigoptionalinterface{} #
A `LambdaAuthorizerConfig` specifies how to authorize AWS AppSync API access when using the `AWS_LAMBDA` authorizer mode.

Be aware that an AWS AppSync API can have only one AWS Lambda authorizer configured at a time.

openIdConnectConfigoptionalIResolvable | CfnApi.OpenIDConnectConfigPropertyopen_id_connect_configoptionaltyping.Union[IResolvable, OpenIDConnectConfigProperty]openIdConnectConfigoptionalIResolvableOpenIdConnectConfigoptionalIResolvableOpenIdConnectConfigoptionalinterface{} #
Describes an OpenID Connect (OIDC) configuration.