Show / Hide Table of Contents

Class AppSyncAuthProvider

Auth provider settings for AppSync Event APIs.

Inheritance
object
AppSyncAuthProvider
Implements
IAppSyncAuthProvider
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class AppSyncAuthProvider : IAppSyncAuthProvider
Syntax (vb)
Public Class AppSyncAuthProvider Implements IAppSyncAuthProvider
Remarks

See: https://docs.aws.amazon.com/appsync/latest/eventapi/configure-event-api-auth.html

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.Logs;


             var apiKeyProvider = new AppSyncAuthProvider {
                 AuthorizationType = AppSyncAuthorizationType.API_KEY
             };

             var api = new EventApi(this, "api", new EventApiProps {
                 ApiName = "Api",
                 OwnerContact = "OwnerContact",
                 AuthorizationConfig = new EventApiAuthConfig {
                     AuthProviders = new [] { apiKeyProvider },
                     ConnectionAuthModeTypes = new [] { AppSyncAuthorizationType.API_KEY },
                     DefaultPublishAuthModeTypes = new [] { AppSyncAuthorizationType.API_KEY },
                     DefaultSubscribeAuthModeTypes = new [] { AppSyncAuthorizationType.API_KEY }
                 },
                 LogConfig = new AppSyncLogConfig {
                     FieldLogLevel = AppSyncFieldLogLevel.INFO,
                     Retention = RetentionDays.ONE_WEEK
                 }
             });

             api.AddChannelNamespace("default");

Synopsis

Constructors

AppSyncAuthProvider()

Auth provider settings for AppSync Event APIs.

Properties

ApiKeyConfig

If authorizationType is AuthorizationType.API_KEY, this option can be configured.

AuthorizationType

One of possible authorization types AppSync supports.

CognitoConfig

If authorizationType is AuthorizationType.USER_POOL, this option is required.

LambdaAuthorizerConfig

If authorizationType is AuthorizationType.LAMBDA, this option is required.

OpenIdConnectConfig

If authorizationType is AuthorizationType.OIDC, this option is required.

Constructors

AppSyncAuthProvider()

Auth provider settings for AppSync Event APIs.

public AppSyncAuthProvider()
Remarks

See: https://docs.aws.amazon.com/appsync/latest/eventapi/configure-event-api-auth.html

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.Logs;


             var apiKeyProvider = new AppSyncAuthProvider {
                 AuthorizationType = AppSyncAuthorizationType.API_KEY
             };

             var api = new EventApi(this, "api", new EventApiProps {
                 ApiName = "Api",
                 OwnerContact = "OwnerContact",
                 AuthorizationConfig = new EventApiAuthConfig {
                     AuthProviders = new [] { apiKeyProvider },
                     ConnectionAuthModeTypes = new [] { AppSyncAuthorizationType.API_KEY },
                     DefaultPublishAuthModeTypes = new [] { AppSyncAuthorizationType.API_KEY },
                     DefaultSubscribeAuthModeTypes = new [] { AppSyncAuthorizationType.API_KEY }
                 },
                 LogConfig = new AppSyncLogConfig {
                     FieldLogLevel = AppSyncFieldLogLevel.INFO,
                     Retention = RetentionDays.ONE_WEEK
                 }
             });

             api.AddChannelNamespace("default");

Properties

ApiKeyConfig

If authorizationType is AuthorizationType.API_KEY, this option can be configured.

public IAppSyncApiKeyConfig? ApiKeyConfig { get; set; }
Property Value

IAppSyncApiKeyConfig

Remarks

Default: - name: 'DefaultAPIKey'

AuthorizationType

One of possible authorization types AppSync supports.

public AppSyncAuthorizationType AuthorizationType { get; set; }
Property Value

AppSyncAuthorizationType

Remarks

Default: - AuthorizationType.API_KEY

CognitoConfig

If authorizationType is AuthorizationType.USER_POOL, this option is required.

public IAppSyncCognitoConfig? CognitoConfig { get; set; }
Property Value

IAppSyncCognitoConfig

Remarks

Default: - none

LambdaAuthorizerConfig

If authorizationType is AuthorizationType.LAMBDA, this option is required.

public IAppSyncLambdaAuthorizerConfig? LambdaAuthorizerConfig { get; set; }
Property Value

IAppSyncLambdaAuthorizerConfig

Remarks

Default: - none

OpenIdConnectConfig

If authorizationType is AuthorizationType.OIDC, this option is required.

public IAppSyncOpenIdConnectConfig? OpenIdConnectConfig { get; set; }
Property Value

IAppSyncOpenIdConnectConfig

Remarks

Default: - none

Implements

IAppSyncAuthProvider
Back to top Generated by DocFX