1. Packages
  2. AWS
  3. API Docs
  4. appsync
  5. Api
AWS v7.5.0 published on Wednesday, Aug 20, 2025 by Pulumi

aws.appsync.Api

Explore with Pulumi AI

aws logo
AWS v7.5.0 published on Wednesday, Aug 20, 2025 by Pulumi

    Manages an AWS AppSync Event API. Event APIs enable real-time subscriptions and event-driven communication in AppSync applications.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.appsync.Api("example", {
        name: "example-event-api",
        eventConfig: {
            authProviders: [{
                authType: "API_KEY",
            }],
            connectionAuthModes: [{
                authType: "API_KEY",
            }],
            defaultPublishAuthModes: [{
                authType: "API_KEY",
            }],
            defaultSubscribeAuthModes: [{
                authType: "API_KEY",
            }],
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.appsync.Api("example",
        name="example-event-api",
        event_config={
            "auth_providers": [{
                "auth_type": "API_KEY",
            }],
            "connection_auth_modes": [{
                "auth_type": "API_KEY",
            }],
            "default_publish_auth_modes": [{
                "auth_type": "API_KEY",
            }],
            "default_subscribe_auth_modes": [{
                "auth_type": "API_KEY",
            }],
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/appsync"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := appsync.NewApi(ctx, "example", &appsync.ApiArgs{
    			Name: pulumi.String("example-event-api"),
    			EventConfig: &appsync.ApiEventConfigArgs{
    				AuthProviders: appsync.ApiEventConfigAuthProviderArray{
    					&appsync.ApiEventConfigAuthProviderArgs{
    						AuthType: pulumi.String("API_KEY"),
    					},
    				},
    				ConnectionAuthModes: appsync.ApiEventConfigConnectionAuthModeArray{
    					&appsync.ApiEventConfigConnectionAuthModeArgs{
    						AuthType: pulumi.String("API_KEY"),
    					},
    				},
    				DefaultPublishAuthModes: appsync.ApiEventConfigDefaultPublishAuthModeArray{
    					&appsync.ApiEventConfigDefaultPublishAuthModeArgs{
    						AuthType: pulumi.String("API_KEY"),
    					},
    				},
    				DefaultSubscribeAuthModes: appsync.ApiEventConfigDefaultSubscribeAuthModeArray{
    					&appsync.ApiEventConfigDefaultSubscribeAuthModeArgs{
    						AuthType: pulumi.String("API_KEY"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.AppSync.Api("example", new()
        {
            Name = "example-event-api",
            EventConfig = new Aws.AppSync.Inputs.ApiEventConfigArgs
            {
                AuthProviders = new[]
                {
                    new Aws.AppSync.Inputs.ApiEventConfigAuthProviderArgs
                    {
                        AuthType = "API_KEY",
                    },
                },
                ConnectionAuthModes = new[]
                {
                    new Aws.AppSync.Inputs.ApiEventConfigConnectionAuthModeArgs
                    {
                        AuthType = "API_KEY",
                    },
                },
                DefaultPublishAuthModes = new[]
                {
                    new Aws.AppSync.Inputs.ApiEventConfigDefaultPublishAuthModeArgs
                    {
                        AuthType = "API_KEY",
                    },
                },
                DefaultSubscribeAuthModes = new[]
                {
                    new Aws.AppSync.Inputs.ApiEventConfigDefaultSubscribeAuthModeArgs
                    {
                        AuthType = "API_KEY",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.appsync.Api;
    import com.pulumi.aws.appsync.ApiArgs;
    import com.pulumi.aws.appsync.inputs.ApiEventConfigArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Api("example", ApiArgs.builder()
                .name("example-event-api")
                .eventConfig(ApiEventConfigArgs.builder()
                    .authProviders(ApiEventConfigAuthProviderArgs.builder()
                        .authType("API_KEY")
                        .build())
                    .connectionAuthModes(ApiEventConfigConnectionAuthModeArgs.builder()
                        .authType("API_KEY")
                        .build())
                    .defaultPublishAuthModes(ApiEventConfigDefaultPublishAuthModeArgs.builder()
                        .authType("API_KEY")
                        .build())
                    .defaultSubscribeAuthModes(ApiEventConfigDefaultSubscribeAuthModeArgs.builder()
                        .authType("API_KEY")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:appsync:Api
        properties:
          name: example-event-api
          eventConfig:
            authProviders:
              - authType: API_KEY
            connectionAuthModes:
              - authType: API_KEY
            defaultPublishAuthModes:
              - authType: API_KEY
            defaultSubscribeAuthModes:
              - authType: API_KEY
    

    With Cognito Authentication

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.cognito.UserPool("example", {name: "example-user-pool"});
    const current = aws.getRegion({});
    const exampleApi = new aws.appsync.Api("example", {
        name: "example-event-api",
        eventConfig: {
            authProviders: [{
                authType: "AMAZON_COGNITO_USER_POOLS",
                cognitoConfig: {
                    userPoolId: example.id,
                    awsRegion: current.then(current => current.name),
                },
            }],
            connectionAuthModes: [{
                authType: "AMAZON_COGNITO_USER_POOLS",
            }],
            defaultPublishAuthModes: [{
                authType: "AMAZON_COGNITO_USER_POOLS",
            }],
            defaultSubscribeAuthModes: [{
                authType: "AMAZON_COGNITO_USER_POOLS",
            }],
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.cognito.UserPool("example", name="example-user-pool")
    current = aws.get_region()
    example_api = aws.appsync.Api("example",
        name="example-event-api",
        event_config={
            "auth_providers": [{
                "auth_type": "AMAZON_COGNITO_USER_POOLS",
                "cognito_config": {
                    "user_pool_id": example.id,
                    "aws_region": current.name,
                },
            }],
            "connection_auth_modes": [{
                "auth_type": "AMAZON_COGNITO_USER_POOLS",
            }],
            "default_publish_auth_modes": [{
                "auth_type": "AMAZON_COGNITO_USER_POOLS",
            }],
            "default_subscribe_auth_modes": [{
                "auth_type": "AMAZON_COGNITO_USER_POOLS",
            }],
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws"
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/appsync"
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/cognito"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := cognito.NewUserPool(ctx, "example", &cognito.UserPoolArgs{
    			Name: pulumi.String("example-user-pool"),
    		})
    		if err != nil {
    			return err
    		}
    		current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = appsync.NewApi(ctx, "example", &appsync.ApiArgs{
    			Name: pulumi.String("example-event-api"),
    			EventConfig: &appsync.ApiEventConfigArgs{
    				AuthProviders: appsync.ApiEventConfigAuthProviderArray{
    					&appsync.ApiEventConfigAuthProviderArgs{
    						AuthType: pulumi.String("AMAZON_COGNITO_USER_POOLS"),
    						CognitoConfig: &appsync.ApiEventConfigAuthProviderCognitoConfigArgs{
    							UserPoolId: example.ID(),
    							AwsRegion:  pulumi.String(current.Name),
    						},
    					},
    				},
    				ConnectionAuthModes: appsync.ApiEventConfigConnectionAuthModeArray{
    					&appsync.ApiEventConfigConnectionAuthModeArgs{
    						AuthType: pulumi.String("AMAZON_COGNITO_USER_POOLS"),
    					},
    				},
    				DefaultPublishAuthModes: appsync.ApiEventConfigDefaultPublishAuthModeArray{
    					&appsync.ApiEventConfigDefaultPublishAuthModeArgs{
    						AuthType: pulumi.String("AMAZON_COGNITO_USER_POOLS"),
    					},
    				},
    				DefaultSubscribeAuthModes: appsync.ApiEventConfigDefaultSubscribeAuthModeArray{
    					&appsync.ApiEventConfigDefaultSubscribeAuthModeArgs{
    						AuthType: pulumi.String("AMAZON_COGNITO_USER_POOLS"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Cognito.UserPool("example", new()
        {
            Name = "example-user-pool",
        });
    
        var current = Aws.GetRegion.Invoke();
    
        var exampleApi = new Aws.AppSync.Api("example", new()
        {
            Name = "example-event-api",
            EventConfig = new Aws.AppSync.Inputs.ApiEventConfigArgs
            {
                AuthProviders = new[]
                {
                    new Aws.AppSync.Inputs.ApiEventConfigAuthProviderArgs
                    {
                        AuthType = "AMAZON_COGNITO_USER_POOLS",
                        CognitoConfig = new Aws.AppSync.Inputs.ApiEventConfigAuthProviderCognitoConfigArgs
                        {
                            UserPoolId = example.Id,
                            AwsRegion = current.Apply(getRegionResult => getRegionResult.Name),
                        },
                    },
                },
                ConnectionAuthModes = new[]
                {
                    new Aws.AppSync.Inputs.ApiEventConfigConnectionAuthModeArgs
                    {
                        AuthType = "AMAZON_COGNITO_USER_POOLS",
                    },
                },
                DefaultPublishAuthModes = new[]
                {
                    new Aws.AppSync.Inputs.ApiEventConfigDefaultPublishAuthModeArgs
                    {
                        AuthType = "AMAZON_COGNITO_USER_POOLS",
                    },
                },
                DefaultSubscribeAuthModes = new[]
                {
                    new Aws.AppSync.Inputs.ApiEventConfigDefaultSubscribeAuthModeArgs
                    {
                        AuthType = "AMAZON_COGNITO_USER_POOLS",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.cognito.UserPool;
    import com.pulumi.aws.cognito.UserPoolArgs;
    import com.pulumi.aws.AwsFunctions;
    import com.pulumi.aws.inputs.GetRegionArgs;
    import com.pulumi.aws.appsync.Api;
    import com.pulumi.aws.appsync.ApiArgs;
    import com.pulumi.aws.appsync.inputs.ApiEventConfigArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new UserPool("example", UserPoolArgs.builder()
                .name("example-user-pool")
                .build());
    
            final var current = AwsFunctions.getRegion(GetRegionArgs.builder()
                .build());
    
            var exampleApi = new Api("exampleApi", ApiArgs.builder()
                .name("example-event-api")
                .eventConfig(ApiEventConfigArgs.builder()
                    .authProviders(ApiEventConfigAuthProviderArgs.builder()
                        .authType("AMAZON_COGNITO_USER_POOLS")
                        .cognitoConfig(ApiEventConfigAuthProviderCognitoConfigArgs.builder()
                            .userPoolId(example.id())
                            .awsRegion(current.name())
                            .build())
                        .build())
                    .connectionAuthModes(ApiEventConfigConnectionAuthModeArgs.builder()
                        .authType("AMAZON_COGNITO_USER_POOLS")
                        .build())
                    .defaultPublishAuthModes(ApiEventConfigDefaultPublishAuthModeArgs.builder()
                        .authType("AMAZON_COGNITO_USER_POOLS")
                        .build())
                    .defaultSubscribeAuthModes(ApiEventConfigDefaultSubscribeAuthModeArgs.builder()
                        .authType("AMAZON_COGNITO_USER_POOLS")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:cognito:UserPool
        properties:
          name: example-user-pool
      exampleApi:
        type: aws:appsync:Api
        name: example
        properties:
          name: example-event-api
          eventConfig:
            authProviders:
              - authType: AMAZON_COGNITO_USER_POOLS
                cognitoConfig:
                  userPoolId: ${example.id}
                  awsRegion: ${current.name}
            connectionAuthModes:
              - authType: AMAZON_COGNITO_USER_POOLS
            defaultPublishAuthModes:
              - authType: AMAZON_COGNITO_USER_POOLS
            defaultSubscribeAuthModes:
              - authType: AMAZON_COGNITO_USER_POOLS
    variables:
      current:
        fn::invoke:
          function: aws:getRegion
          arguments: {}
    

    With Lambda Authorizer

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.appsync.Api("example", {
        name: "example-event-api",
        eventConfig: {
            authProviders: [{
                authType: "AWS_LAMBDA",
                lambdaAuthorizerConfig: {
                    authorizerUri: exampleAwsLambdaFunction.invokeArn,
                    authorizerResultTtlInSeconds: 300,
                },
            }],
            connectionAuthModes: [{
                authType: "AWS_LAMBDA",
            }],
            defaultPublishAuthModes: [{
                authType: "AWS_LAMBDA",
            }],
            defaultSubscribeAuthModes: [{
                authType: "AWS_LAMBDA",
            }],
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.appsync.Api("example",
        name="example-event-api",
        event_config={
            "auth_providers": [{
                "auth_type": "AWS_LAMBDA",
                "lambda_authorizer_config": {
                    "authorizer_uri": example_aws_lambda_function["invokeArn"],
                    "authorizer_result_ttl_in_seconds": 300,
                },
            }],
            "connection_auth_modes": [{
                "auth_type": "AWS_LAMBDA",
            }],
            "default_publish_auth_modes": [{
                "auth_type": "AWS_LAMBDA",
            }],
            "default_subscribe_auth_modes": [{
                "auth_type": "AWS_LAMBDA",
            }],
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/appsync"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := appsync.NewApi(ctx, "example", &appsync.ApiArgs{
    			Name: pulumi.String("example-event-api"),
    			EventConfig: &appsync.ApiEventConfigArgs{
    				AuthProviders: appsync.ApiEventConfigAuthProviderArray{
    					&appsync.ApiEventConfigAuthProviderArgs{
    						AuthType: pulumi.String("AWS_LAMBDA"),
    						LambdaAuthorizerConfig: &appsync.ApiEventConfigAuthProviderLambdaAuthorizerConfigArgs{
    							AuthorizerUri:                pulumi.Any(exampleAwsLambdaFunction.InvokeArn),
    							AuthorizerResultTtlInSeconds: pulumi.Int(300),
    						},
    					},
    				},
    				ConnectionAuthModes: appsync.ApiEventConfigConnectionAuthModeArray{
    					&appsync.ApiEventConfigConnectionAuthModeArgs{
    						AuthType: pulumi.String("AWS_LAMBDA"),
    					},
    				},
    				DefaultPublishAuthModes: appsync.ApiEventConfigDefaultPublishAuthModeArray{
    					&appsync.ApiEventConfigDefaultPublishAuthModeArgs{
    						AuthType: pulumi.String("AWS_LAMBDA"),
    					},
    				},
    				DefaultSubscribeAuthModes: appsync.ApiEventConfigDefaultSubscribeAuthModeArray{
    					&appsync.ApiEventConfigDefaultSubscribeAuthModeArgs{
    						AuthType: pulumi.String("AWS_LAMBDA"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.AppSync.Api("example", new()
        {
            Name = "example-event-api",
            EventConfig = new Aws.AppSync.Inputs.ApiEventConfigArgs
            {
                AuthProviders = new[]
                {
                    new Aws.AppSync.Inputs.ApiEventConfigAuthProviderArgs
                    {
                        AuthType = "AWS_LAMBDA",
                        LambdaAuthorizerConfig = new Aws.AppSync.Inputs.ApiEventConfigAuthProviderLambdaAuthorizerConfigArgs
                        {
                            AuthorizerUri = exampleAwsLambdaFunction.InvokeArn,
                            AuthorizerResultTtlInSeconds = 300,
                        },
                    },
                },
                ConnectionAuthModes = new[]
                {
                    new Aws.AppSync.Inputs.ApiEventConfigConnectionAuthModeArgs
                    {
                        AuthType = "AWS_LAMBDA",
                    },
                },
                DefaultPublishAuthModes = new[]
                {
                    new Aws.AppSync.Inputs.ApiEventConfigDefaultPublishAuthModeArgs
                    {
                        AuthType = "AWS_LAMBDA",
                    },
                },
                DefaultSubscribeAuthModes = new[]
                {
                    new Aws.AppSync.Inputs.ApiEventConfigDefaultSubscribeAuthModeArgs
                    {
                        AuthType = "AWS_LAMBDA",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.appsync.Api;
    import com.pulumi.aws.appsync.ApiArgs;
    import com.pulumi.aws.appsync.inputs.ApiEventConfigArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Api("example", ApiArgs.builder()
                .name("example-event-api")
                .eventConfig(ApiEventConfigArgs.builder()
                    .authProviders(ApiEventConfigAuthProviderArgs.builder()
                        .authType("AWS_LAMBDA")
                        .lambdaAuthorizerConfig(ApiEventConfigAuthProviderLambdaAuthorizerConfigArgs.builder()
                            .authorizerUri(exampleAwsLambdaFunction.invokeArn())
                            .authorizerResultTtlInSeconds(300)
                            .build())
                        .build())
                    .connectionAuthModes(ApiEventConfigConnectionAuthModeArgs.builder()
                        .authType("AWS_LAMBDA")
                        .build())
                    .defaultPublishAuthModes(ApiEventConfigDefaultPublishAuthModeArgs.builder()
                        .authType("AWS_LAMBDA")
                        .build())
                    .defaultSubscribeAuthModes(ApiEventConfigDefaultSubscribeAuthModeArgs.builder()
                        .authType("AWS_LAMBDA")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:appsync:Api
        properties:
          name: example-event-api
          eventConfig:
            authProviders:
              - authType: AWS_LAMBDA
                lambdaAuthorizerConfig:
                  authorizerUri: ${exampleAwsLambdaFunction.invokeArn}
                  authorizerResultTtlInSeconds: 300
            connectionAuthModes:
              - authType: AWS_LAMBDA
            defaultPublishAuthModes:
              - authType: AWS_LAMBDA
            defaultSubscribeAuthModes:
              - authType: AWS_LAMBDA
    

    Create Api Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Api(name: string, args?: ApiArgs, opts?: CustomResourceOptions);
    @overload
    def Api(resource_name: str,
            args: Optional[ApiArgs] = None,
            opts: Optional[ResourceOptions] = None)
    
    @overload
    def Api(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            event_config: Optional[ApiEventConfigArgs] = None,
            name: Optional[str] = None,
            owner_contact: Optional[str] = None,
            region: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None)
    func NewApi(ctx *Context, name string, args *ApiArgs, opts ...ResourceOption) (*Api, error)
    public Api(string name, ApiArgs? args = null, CustomResourceOptions? opts = null)
    public Api(String name, ApiArgs args)
    public Api(String name, ApiArgs args, CustomResourceOptions options)
    
    type: aws:appsync:Api
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ApiArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ApiArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ApiArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApiArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApiArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var awsApiResource = new Aws.AppSync.Api("awsApiResource", new()
    {
        EventConfig = new Aws.AppSync.Inputs.ApiEventConfigArgs
        {
            AuthProviders = new[]
            {
                new Aws.AppSync.Inputs.ApiEventConfigAuthProviderArgs
                {
                    AuthType = "string",
                    CognitoConfig = new Aws.AppSync.Inputs.ApiEventConfigAuthProviderCognitoConfigArgs
                    {
                        AwsRegion = "string",
                        UserPoolId = "string",
                        AppIdClientRegex = "string",
                    },
                    LambdaAuthorizerConfig = new Aws.AppSync.Inputs.ApiEventConfigAuthProviderLambdaAuthorizerConfigArgs
                    {
                        AuthorizerUri = "string",
                        AuthorizerResultTtlInSeconds = 0,
                        IdentityValidationExpression = "string",
                    },
                    OpenidConnectConfig = new Aws.AppSync.Inputs.ApiEventConfigAuthProviderOpenidConnectConfigArgs
                    {
                        Issuer = "string",
                        AuthTtl = 0,
                        ClientId = "string",
                        IatTtl = 0,
                    },
                },
            },
            ConnectionAuthModes = new[]
            {
                new Aws.AppSync.Inputs.ApiEventConfigConnectionAuthModeArgs
                {
                    AuthType = "string",
                },
            },
            DefaultPublishAuthModes = new[]
            {
                new Aws.AppSync.Inputs.ApiEventConfigDefaultPublishAuthModeArgs
                {
                    AuthType = "string",
                },
            },
            DefaultSubscribeAuthModes = new[]
            {
                new Aws.AppSync.Inputs.ApiEventConfigDefaultSubscribeAuthModeArgs
                {
                    AuthType = "string",
                },
            },
            LogConfig = new Aws.AppSync.Inputs.ApiEventConfigLogConfigArgs
            {
                CloudwatchLogsRoleArn = "string",
                LogLevel = "string",
            },
        },
        Name = "string",
        OwnerContact = "string",
        Region = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := appsync.NewApi(ctx, "awsApiResource", &appsync.ApiArgs{
    	EventConfig: &appsync.ApiEventConfigArgs{
    		AuthProviders: appsync.ApiEventConfigAuthProviderArray{
    			&appsync.ApiEventConfigAuthProviderArgs{
    				AuthType: pulumi.String("string"),
    				CognitoConfig: &appsync.ApiEventConfigAuthProviderCognitoConfigArgs{
    					AwsRegion:        pulumi.String("string"),
    					UserPoolId:       pulumi.String("string"),
    					AppIdClientRegex: pulumi.String("string"),
    				},
    				LambdaAuthorizerConfig: &appsync.ApiEventConfigAuthProviderLambdaAuthorizerConfigArgs{
    					AuthorizerUri:                pulumi.String("string"),
    					AuthorizerResultTtlInSeconds: pulumi.Int(0),
    					IdentityValidationExpression: pulumi.String("string"),
    				},
    				OpenidConnectConfig: &appsync.ApiEventConfigAuthProviderOpenidConnectConfigArgs{
    					Issuer:   pulumi.String("string"),
    					AuthTtl:  pulumi.Int(0),
    					ClientId: pulumi.String("string"),
    					IatTtl:   pulumi.Int(0),
    				},
    			},
    		},
    		ConnectionAuthModes: appsync.ApiEventConfigConnectionAuthModeArray{
    			&appsync.ApiEventConfigConnectionAuthModeArgs{
    				AuthType: pulumi.String("string"),
    			},
    		},
    		DefaultPublishAuthModes: appsync.ApiEventConfigDefaultPublishAuthModeArray{
    			&appsync.ApiEventConfigDefaultPublishAuthModeArgs{
    				AuthType: pulumi.String("string"),
    			},
    		},
    		DefaultSubscribeAuthModes: appsync.ApiEventConfigDefaultSubscribeAuthModeArray{
    			&appsync.ApiEventConfigDefaultSubscribeAuthModeArgs{
    				AuthType: pulumi.String("string"),
    			},
    		},
    		LogConfig: &appsync.ApiEventConfigLogConfigArgs{
    			CloudwatchLogsRoleArn: pulumi.String("string"),
    			LogLevel:              pulumi.String("string"),
    		},
    	},
    	Name:         pulumi.String("string"),
    	OwnerContact: pulumi.String("string"),
    	Region:       pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var awsApiResource = new com.pulumi.aws.appsync.Api("awsApiResource", com.pulumi.aws.appsync.ApiArgs.builder()
        .eventConfig(ApiEventConfigArgs.builder()
            .authProviders(ApiEventConfigAuthProviderArgs.builder()
                .authType("string")
                .cognitoConfig(ApiEventConfigAuthProviderCognitoConfigArgs.builder()
                    .awsRegion("string")
                    .userPoolId("string")
                    .appIdClientRegex("string")
                    .build())
                .lambdaAuthorizerConfig(ApiEventConfigAuthProviderLambdaAuthorizerConfigArgs.builder()
                    .authorizerUri("string")
                    .authorizerResultTtlInSeconds(0)
                    .identityValidationExpression("string")
                    .build())
                .openidConnectConfig(ApiEventConfigAuthProviderOpenidConnectConfigArgs.builder()
                    .issuer("string")
                    .authTtl(0)
                    .clientId("string")
                    .iatTtl(0)
                    .build())
                .build())
            .connectionAuthModes(ApiEventConfigConnectionAuthModeArgs.builder()
                .authType("string")
                .build())
            .defaultPublishAuthModes(ApiEventConfigDefaultPublishAuthModeArgs.builder()
                .authType("string")
                .build())
            .defaultSubscribeAuthModes(ApiEventConfigDefaultSubscribeAuthModeArgs.builder()
                .authType("string")
                .build())
            .logConfig(ApiEventConfigLogConfigArgs.builder()
                .cloudwatchLogsRoleArn("string")
                .logLevel("string")
                .build())
            .build())
        .name("string")
        .ownerContact("string")
        .region("string")
        .tags(Map.of("string", "string"))
        .build());
    
    aws_api_resource = aws.appsync.Api("awsApiResource",
        event_config={
            "auth_providers": [{
                "auth_type": "string",
                "cognito_config": {
                    "aws_region": "string",
                    "user_pool_id": "string",
                    "app_id_client_regex": "string",
                },
                "lambda_authorizer_config": {
                    "authorizer_uri": "string",
                    "authorizer_result_ttl_in_seconds": 0,
                    "identity_validation_expression": "string",
                },
                "openid_connect_config": {
                    "issuer": "string",
                    "auth_ttl": 0,
                    "client_id": "string",
                    "iat_ttl": 0,
                },
            }],
            "connection_auth_modes": [{
                "auth_type": "string",
            }],
            "default_publish_auth_modes": [{
                "auth_type": "string",
            }],
            "default_subscribe_auth_modes": [{
                "auth_type": "string",
            }],
            "log_config": {
                "cloudwatch_logs_role_arn": "string",
                "log_level": "string",
            },
        },
        name="string",
        owner_contact="string",
        region="string",
        tags={
            "string": "string",
        })
    
    const awsApiResource = new aws.appsync.Api("awsApiResource", {
        eventConfig: {
            authProviders: [{
                authType: "string",
                cognitoConfig: {
                    awsRegion: "string",
                    userPoolId: "string",
                    appIdClientRegex: "string",
                },
                lambdaAuthorizerConfig: {
                    authorizerUri: "string",
                    authorizerResultTtlInSeconds: 0,
                    identityValidationExpression: "string",
                },
                openidConnectConfig: {
                    issuer: "string",
                    authTtl: 0,
                    clientId: "string",
                    iatTtl: 0,
                },
            }],
            connectionAuthModes: [{
                authType: "string",
            }],
            defaultPublishAuthModes: [{
                authType: "string",
            }],
            defaultSubscribeAuthModes: [{
                authType: "string",
            }],
            logConfig: {
                cloudwatchLogsRoleArn: "string",
                logLevel: "string",
            },
        },
        name: "string",
        ownerContact: "string",
        region: "string",
        tags: {
            string: "string",
        },
    });
    
    type: aws:appsync:Api
    properties:
        eventConfig:
            authProviders:
                - authType: string
                  cognitoConfig:
                    appIdClientRegex: string
                    awsRegion: string
                    userPoolId: string
                  lambdaAuthorizerConfig:
                    authorizerResultTtlInSeconds: 0
                    authorizerUri: string
                    identityValidationExpression: string
                  openidConnectConfig:
                    authTtl: 0
                    clientId: string
                    iatTtl: 0
                    issuer: string
            connectionAuthModes:
                - authType: string
            defaultPublishAuthModes:
                - authType: string
            defaultSubscribeAuthModes:
                - authType: string
            logConfig:
                cloudwatchLogsRoleArn: string
                logLevel: string
        name: string
        ownerContact: string
        region: string
        tags:
            string: string
    

    Api Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Api resource accepts the following input properties:

    EventConfig ApiEventConfig
    Configuration for the Event API. See Event Config below.
    Name string

    Name of the Event API.

    The following arguments are optional:

    OwnerContact string
    Contact information for the owner of the Event API.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Tags Dictionary<string, string>
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    EventConfig ApiEventConfigArgs
    Configuration for the Event API. See Event Config below.
    Name string

    Name of the Event API.

    The following arguments are optional:

    OwnerContact string
    Contact information for the owner of the Event API.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Tags map[string]string
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    eventConfig ApiEventConfig
    Configuration for the Event API. See Event Config below.
    name String

    Name of the Event API.

    The following arguments are optional:

    ownerContact String
    Contact information for the owner of the Event API.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags Map<String,String>
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    eventConfig ApiEventConfig
    Configuration for the Event API. See Event Config below.
    name string

    Name of the Event API.

    The following arguments are optional:

    ownerContact string
    Contact information for the owner of the Event API.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags {[key: string]: string}
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    event_config ApiEventConfigArgs
    Configuration for the Event API. See Event Config below.
    name str

    Name of the Event API.

    The following arguments are optional:

    owner_contact str
    Contact information for the owner of the Event API.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags Mapping[str, str]
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    eventConfig Property Map
    Configuration for the Event API. See Event Config below.
    name String

    Name of the Event API.

    The following arguments are optional:

    ownerContact String
    Contact information for the owner of the Event API.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags Map<String>
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Api resource produces the following output properties:

    ApiArn string
    ARN of the Event API.
    ApiId string
    ID of the Event API.
    Dns Dictionary<string, string>
    DNS configuration for the Event API.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    WafWebAclArn string
    ARN of the associated WAF web ACL.
    XrayEnabled bool
    ApiArn string
    ARN of the Event API.
    ApiId string
    ID of the Event API.
    Dns map[string]string
    DNS configuration for the Event API.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    WafWebAclArn string
    ARN of the associated WAF web ACL.
    XrayEnabled bool
    apiArn String
    ARN of the Event API.
    apiId String
    ID of the Event API.
    dns Map<String,String>
    DNS configuration for the Event API.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    wafWebAclArn String
    ARN of the associated WAF web ACL.
    xrayEnabled Boolean
    apiArn string
    ARN of the Event API.
    apiId string
    ID of the Event API.
    dns {[key: string]: string}
    DNS configuration for the Event API.
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    wafWebAclArn string
    ARN of the associated WAF web ACL.
    xrayEnabled boolean
    api_arn str
    ARN of the Event API.
    api_id str
    ID of the Event API.
    dns Mapping[str, str]
    DNS configuration for the Event API.
    id str
    The provider-assigned unique ID for this managed resource.
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    waf_web_acl_arn str
    ARN of the associated WAF web ACL.
    xray_enabled bool
    apiArn String
    ARN of the Event API.
    apiId String
    ID of the Event API.
    dns Map<String>
    DNS configuration for the Event API.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    wafWebAclArn String
    ARN of the associated WAF web ACL.
    xrayEnabled Boolean

    Look up Existing Api Resource

    Get an existing Api resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ApiState, opts?: CustomResourceOptions): Api
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            api_arn: Optional[str] = None,
            api_id: Optional[str] = None,
            dns: Optional[Mapping[str, str]] = None,
            event_config: Optional[ApiEventConfigArgs] = None,
            name: Optional[str] = None,
            owner_contact: Optional[str] = None,
            region: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            waf_web_acl_arn: Optional[str] = None,
            xray_enabled: Optional[bool] = None) -> Api
    func GetApi(ctx *Context, name string, id IDInput, state *ApiState, opts ...ResourceOption) (*Api, error)
    public static Api Get(string name, Input<string> id, ApiState? state, CustomResourceOptions? opts = null)
    public static Api get(String name, Output<String> id, ApiState state, CustomResourceOptions options)
    resources:  _:    type: aws:appsync:Api    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ApiArn string
    ARN of the Event API.
    ApiId string
    ID of the Event API.
    Dns Dictionary<string, string>
    DNS configuration for the Event API.
    EventConfig ApiEventConfig
    Configuration for the Event API. See Event Config below.
    Name string

    Name of the Event API.

    The following arguments are optional:

    OwnerContact string
    Contact information for the owner of the Event API.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Tags Dictionary<string, string>
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    WafWebAclArn string
    ARN of the associated WAF web ACL.
    XrayEnabled bool
    ApiArn string
    ARN of the Event API.
    ApiId string
    ID of the Event API.
    Dns map[string]string
    DNS configuration for the Event API.
    EventConfig ApiEventConfigArgs
    Configuration for the Event API. See Event Config below.
    Name string

    Name of the Event API.

    The following arguments are optional:

    OwnerContact string
    Contact information for the owner of the Event API.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Tags map[string]string
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    WafWebAclArn string
    ARN of the associated WAF web ACL.
    XrayEnabled bool
    apiArn String
    ARN of the Event API.
    apiId String
    ID of the Event API.
    dns Map<String,String>
    DNS configuration for the Event API.
    eventConfig ApiEventConfig
    Configuration for the Event API. See Event Config below.
    name String

    Name of the Event API.

    The following arguments are optional:

    ownerContact String
    Contact information for the owner of the Event API.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags Map<String,String>
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    wafWebAclArn String
    ARN of the associated WAF web ACL.
    xrayEnabled Boolean
    apiArn string
    ARN of the Event API.
    apiId string
    ID of the Event API.
    dns {[key: string]: string}
    DNS configuration for the Event API.
    eventConfig ApiEventConfig
    Configuration for the Event API. See Event Config below.
    name string

    Name of the Event API.

    The following arguments are optional:

    ownerContact string
    Contact information for the owner of the Event API.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags {[key: string]: string}
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    wafWebAclArn string
    ARN of the associated WAF web ACL.
    xrayEnabled boolean
    api_arn str
    ARN of the Event API.
    api_id str
    ID of the Event API.
    dns Mapping[str, str]
    DNS configuration for the Event API.
    event_config ApiEventConfigArgs
    Configuration for the Event API. See Event Config below.
    name str

    Name of the Event API.

    The following arguments are optional:

    owner_contact str
    Contact information for the owner of the Event API.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags Mapping[str, str]
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    waf_web_acl_arn str
    ARN of the associated WAF web ACL.
    xray_enabled bool
    apiArn String
    ARN of the Event API.
    apiId String
    ID of the Event API.
    dns Map<String>
    DNS configuration for the Event API.
    eventConfig Property Map
    Configuration for the Event API. See Event Config below.
    name String

    Name of the Event API.

    The following arguments are optional:

    ownerContact String
    Contact information for the owner of the Event API.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags Map<String>
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    wafWebAclArn String
    ARN of the associated WAF web ACL.
    xrayEnabled Boolean

    Supporting Types

    ApiEventConfig, ApiEventConfigArgs

    AuthProviders List<ApiEventConfigAuthProvider>
    List of authentication providers. See Auth Providers below.
    ConnectionAuthModes List<ApiEventConfigConnectionAuthMode>
    List of authentication modes for connections. See Auth Modes below.
    DefaultPublishAuthModes List<ApiEventConfigDefaultPublishAuthMode>
    List of default authentication modes for publishing. See Auth Modes below.
    DefaultSubscribeAuthModes List<ApiEventConfigDefaultSubscribeAuthMode>
    List of default authentication modes for subscribing. See Auth Modes below.
    LogConfig ApiEventConfigLogConfig
    Logging configuration. See Log Config below.
    AuthProviders []ApiEventConfigAuthProvider
    List of authentication providers. See Auth Providers below.
    ConnectionAuthModes []ApiEventConfigConnectionAuthMode
    List of authentication modes for connections. See Auth Modes below.
    DefaultPublishAuthModes []ApiEventConfigDefaultPublishAuthMode
    List of default authentication modes for publishing. See Auth Modes below.
    DefaultSubscribeAuthModes []ApiEventConfigDefaultSubscribeAuthMode
    List of default authentication modes for subscribing. See Auth Modes below.
    LogConfig ApiEventConfigLogConfig
    Logging configuration. See Log Config below.
    authProviders List<ApiEventConfigAuthProvider>
    List of authentication providers. See Auth Providers below.
    connectionAuthModes List<ApiEventConfigConnectionAuthMode>
    List of authentication modes for connections. See Auth Modes below.
    defaultPublishAuthModes List<ApiEventConfigDefaultPublishAuthMode>
    List of default authentication modes for publishing. See Auth Modes below.
    defaultSubscribeAuthModes List<ApiEventConfigDefaultSubscribeAuthMode>
    List of default authentication modes for subscribing. See Auth Modes below.
    logConfig ApiEventConfigLogConfig
    Logging configuration. See Log Config below.
    authProviders ApiEventConfigAuthProvider[]
    List of authentication providers. See Auth Providers below.
    connectionAuthModes ApiEventConfigConnectionAuthMode[]
    List of authentication modes for connections. See Auth Modes below.
    defaultPublishAuthModes ApiEventConfigDefaultPublishAuthMode[]
    List of default authentication modes for publishing. See Auth Modes below.
    defaultSubscribeAuthModes ApiEventConfigDefaultSubscribeAuthMode[]
    List of default authentication modes for subscribing. See Auth Modes below.
    logConfig ApiEventConfigLogConfig
    Logging configuration. See Log Config below.
    auth_providers Sequence[ApiEventConfigAuthProvider]
    List of authentication providers. See Auth Providers below.
    connection_auth_modes Sequence[ApiEventConfigConnectionAuthMode]
    List of authentication modes for connections. See Auth Modes below.
    default_publish_auth_modes Sequence[ApiEventConfigDefaultPublishAuthMode]
    List of default authentication modes for publishing. See Auth Modes below.
    default_subscribe_auth_modes Sequence[ApiEventConfigDefaultSubscribeAuthMode]
    List of default authentication modes for subscribing. See Auth Modes below.
    log_config ApiEventConfigLogConfig
    Logging configuration. See Log Config below.
    authProviders List<Property Map>
    List of authentication providers. See Auth Providers below.
    connectionAuthModes List<Property Map>
    List of authentication modes for connections. See Auth Modes below.
    defaultPublishAuthModes List<Property Map>
    List of default authentication modes for publishing. See Auth Modes below.
    defaultSubscribeAuthModes List<Property Map>
    List of default authentication modes for subscribing. See Auth Modes below.
    logConfig Property Map
    Logging configuration. See Log Config below.

    ApiEventConfigAuthProvider, ApiEventConfigAuthProviderArgs

    AuthType string
    Type of authentication provider. Valid values: AMAZON_COGNITO_USER_POOLS, AWS_LAMBDA, OPENID_CONNECT, API_KEY.
    CognitoConfig ApiEventConfigAuthProviderCognitoConfig
    Configuration for Cognito user pool authentication. Required when auth_type is AMAZON_COGNITO_USER_POOLS. See Cognito Config below.
    LambdaAuthorizerConfig ApiEventConfigAuthProviderLambdaAuthorizerConfig
    Configuration for Lambda authorization. Required when auth_type is AWS_LAMBDA. See Lambda Authorizer Config below.
    OpenidConnectConfig ApiEventConfigAuthProviderOpenidConnectConfig
    Configuration for OpenID Connect. Required when auth_type is OPENID_CONNECT. See OpenID Connect Config below.
    AuthType string
    Type of authentication provider. Valid values: AMAZON_COGNITO_USER_POOLS, AWS_LAMBDA, OPENID_CONNECT, API_KEY.
    CognitoConfig ApiEventConfigAuthProviderCognitoConfig
    Configuration for Cognito user pool authentication. Required when auth_type is AMAZON_COGNITO_USER_POOLS. See Cognito Config below.
    LambdaAuthorizerConfig ApiEventConfigAuthProviderLambdaAuthorizerConfig
    Configuration for Lambda authorization. Required when auth_type is AWS_LAMBDA. See Lambda Authorizer Config below.
    OpenidConnectConfig ApiEventConfigAuthProviderOpenidConnectConfig
    Configuration for OpenID Connect. Required when auth_type is OPENID_CONNECT. See OpenID Connect Config below.
    authType String
    Type of authentication provider. Valid values: AMAZON_COGNITO_USER_POOLS, AWS_LAMBDA, OPENID_CONNECT, API_KEY.
    cognitoConfig ApiEventConfigAuthProviderCognitoConfig
    Configuration for Cognito user pool authentication. Required when auth_type is AMAZON_COGNITO_USER_POOLS. See Cognito Config below.
    lambdaAuthorizerConfig ApiEventConfigAuthProviderLambdaAuthorizerConfig
    Configuration for Lambda authorization. Required when auth_type is AWS_LAMBDA. See Lambda Authorizer Config below.
    openidConnectConfig ApiEventConfigAuthProviderOpenidConnectConfig
    Configuration for OpenID Connect. Required when auth_type is OPENID_CONNECT. See OpenID Connect Config below.
    authType string
    Type of authentication provider. Valid values: AMAZON_COGNITO_USER_POOLS, AWS_LAMBDA, OPENID_CONNECT, API_KEY.
    cognitoConfig ApiEventConfigAuthProviderCognitoConfig
    Configuration for Cognito user pool authentication. Required when auth_type is AMAZON_COGNITO_USER_POOLS. See Cognito Config below.
    lambdaAuthorizerConfig ApiEventConfigAuthProviderLambdaAuthorizerConfig
    Configuration for Lambda authorization. Required when auth_type is AWS_LAMBDA. See Lambda Authorizer Config below.
    openidConnectConfig ApiEventConfigAuthProviderOpenidConnectConfig
    Configuration for OpenID Connect. Required when auth_type is OPENID_CONNECT. See OpenID Connect Config below.
    auth_type str
    Type of authentication provider. Valid values: AMAZON_COGNITO_USER_POOLS, AWS_LAMBDA, OPENID_CONNECT, API_KEY.
    cognito_config ApiEventConfigAuthProviderCognitoConfig
    Configuration for Cognito user pool authentication. Required when auth_type is AMAZON_COGNITO_USER_POOLS. See Cognito Config below.
    lambda_authorizer_config ApiEventConfigAuthProviderLambdaAuthorizerConfig
    Configuration for Lambda authorization. Required when auth_type is AWS_LAMBDA. See Lambda Authorizer Config below.
    openid_connect_config ApiEventConfigAuthProviderOpenidConnectConfig
    Configuration for OpenID Connect. Required when auth_type is OPENID_CONNECT. See OpenID Connect Config below.
    authType String
    Type of authentication provider. Valid values: AMAZON_COGNITO_USER_POOLS, AWS_LAMBDA, OPENID_CONNECT, API_KEY.
    cognitoConfig Property Map
    Configuration for Cognito user pool authentication. Required when auth_type is AMAZON_COGNITO_USER_POOLS. See Cognito Config below.
    lambdaAuthorizerConfig Property Map
    Configuration for Lambda authorization. Required when auth_type is AWS_LAMBDA. See Lambda Authorizer Config below.
    openidConnectConfig Property Map
    Configuration for OpenID Connect. Required when auth_type is OPENID_CONNECT. See OpenID Connect Config below.

    ApiEventConfigAuthProviderCognitoConfig, ApiEventConfigAuthProviderCognitoConfigArgs

    AwsRegion string
    AWS region where the user pool is located.
    UserPoolId string
    ID of the Cognito user pool.
    AppIdClientRegex string
    Regular expression for matching the client ID.
    AwsRegion string
    AWS region where the user pool is located.
    UserPoolId string
    ID of the Cognito user pool.
    AppIdClientRegex string
    Regular expression for matching the client ID.
    awsRegion String
    AWS region where the user pool is located.
    userPoolId String
    ID of the Cognito user pool.
    appIdClientRegex String
    Regular expression for matching the client ID.
    awsRegion string
    AWS region where the user pool is located.
    userPoolId string
    ID of the Cognito user pool.
    appIdClientRegex string
    Regular expression for matching the client ID.
    aws_region str
    AWS region where the user pool is located.
    user_pool_id str
    ID of the Cognito user pool.
    app_id_client_regex str
    Regular expression for matching the client ID.
    awsRegion String
    AWS region where the user pool is located.
    userPoolId String
    ID of the Cognito user pool.
    appIdClientRegex String
    Regular expression for matching the client ID.

    ApiEventConfigAuthProviderLambdaAuthorizerConfig, ApiEventConfigAuthProviderLambdaAuthorizerConfigArgs

    AuthorizerUri string
    URI of the Lambda function for authorization.
    AuthorizerResultTtlInSeconds int
    TTL in seconds for the authorization result cache.
    IdentityValidationExpression string
    Regular expression for identity validation.
    AuthorizerUri string
    URI of the Lambda function for authorization.
    AuthorizerResultTtlInSeconds int
    TTL in seconds for the authorization result cache.
    IdentityValidationExpression string
    Regular expression for identity validation.
    authorizerUri String
    URI of the Lambda function for authorization.
    authorizerResultTtlInSeconds Integer
    TTL in seconds for the authorization result cache.
    identityValidationExpression String
    Regular expression for identity validation.
    authorizerUri string
    URI of the Lambda function for authorization.
    authorizerResultTtlInSeconds number
    TTL in seconds for the authorization result cache.
    identityValidationExpression string
    Regular expression for identity validation.
    authorizer_uri str
    URI of the Lambda function for authorization.
    authorizer_result_ttl_in_seconds int
    TTL in seconds for the authorization result cache.
    identity_validation_expression str
    Regular expression for identity validation.
    authorizerUri String
    URI of the Lambda function for authorization.
    authorizerResultTtlInSeconds Number
    TTL in seconds for the authorization result cache.
    identityValidationExpression String
    Regular expression for identity validation.

    ApiEventConfigAuthProviderOpenidConnectConfig, ApiEventConfigAuthProviderOpenidConnectConfigArgs

    Issuer string
    Issuer URL for the OpenID Connect provider.
    AuthTtl int
    TTL in seconds for the authentication token.
    ClientId string
    Client ID for the OpenID Connect provider.
    IatTtl int
    TTL in seconds for the issued at time.
    Issuer string
    Issuer URL for the OpenID Connect provider.
    AuthTtl int
    TTL in seconds for the authentication token.
    ClientId string
    Client ID for the OpenID Connect provider.
    IatTtl int
    TTL in seconds for the issued at time.
    issuer String
    Issuer URL for the OpenID Connect provider.
    authTtl Integer
    TTL in seconds for the authentication token.
    clientId String
    Client ID for the OpenID Connect provider.
    iatTtl Integer
    TTL in seconds for the issued at time.
    issuer string
    Issuer URL for the OpenID Connect provider.
    authTtl number
    TTL in seconds for the authentication token.
    clientId string
    Client ID for the OpenID Connect provider.
    iatTtl number
    TTL in seconds for the issued at time.
    issuer str
    Issuer URL for the OpenID Connect provider.
    auth_ttl int
    TTL in seconds for the authentication token.
    client_id str
    Client ID for the OpenID Connect provider.
    iat_ttl int
    TTL in seconds for the issued at time.
    issuer String
    Issuer URL for the OpenID Connect provider.
    authTtl Number
    TTL in seconds for the authentication token.
    clientId String
    Client ID for the OpenID Connect provider.
    iatTtl Number
    TTL in seconds for the issued at time.

    ApiEventConfigConnectionAuthMode, ApiEventConfigConnectionAuthModeArgs

    AuthType string
    Type of authentication. Valid values: API_KEY, AWS_IAM, AMAZON_COGNITO_USER_POOLS, OPENID_CONNECT, AWS_LAMBDA.
    AuthType string
    Type of authentication. Valid values: API_KEY, AWS_IAM, AMAZON_COGNITO_USER_POOLS, OPENID_CONNECT, AWS_LAMBDA.
    authType String
    Type of authentication. Valid values: API_KEY, AWS_IAM, AMAZON_COGNITO_USER_POOLS, OPENID_CONNECT, AWS_LAMBDA.
    authType string
    Type of authentication. Valid values: API_KEY, AWS_IAM, AMAZON_COGNITO_USER_POOLS, OPENID_CONNECT, AWS_LAMBDA.
    auth_type str
    Type of authentication. Valid values: API_KEY, AWS_IAM, AMAZON_COGNITO_USER_POOLS, OPENID_CONNECT, AWS_LAMBDA.
    authType String
    Type of authentication. Valid values: API_KEY, AWS_IAM, AMAZON_COGNITO_USER_POOLS, OPENID_CONNECT, AWS_LAMBDA.

    ApiEventConfigDefaultPublishAuthMode, ApiEventConfigDefaultPublishAuthModeArgs

    AuthType string
    Type of authentication. Valid values: API_KEY, AWS_IAM, AMAZON_COGNITO_USER_POOLS, OPENID_CONNECT, AWS_LAMBDA.
    AuthType string
    Type of authentication. Valid values: API_KEY, AWS_IAM, AMAZON_COGNITO_USER_POOLS, OPENID_CONNECT, AWS_LAMBDA.
    authType String
    Type of authentication. Valid values: API_KEY, AWS_IAM, AMAZON_COGNITO_USER_POOLS, OPENID_CONNECT, AWS_LAMBDA.
    authType string
    Type of authentication. Valid values: API_KEY, AWS_IAM, AMAZON_COGNITO_USER_POOLS, OPENID_CONNECT, AWS_LAMBDA.
    auth_type str
    Type of authentication. Valid values: API_KEY, AWS_IAM, AMAZON_COGNITO_USER_POOLS, OPENID_CONNECT, AWS_LAMBDA.
    authType String
    Type of authentication. Valid values: API_KEY, AWS_IAM, AMAZON_COGNITO_USER_POOLS, OPENID_CONNECT, AWS_LAMBDA.

    ApiEventConfigDefaultSubscribeAuthMode, ApiEventConfigDefaultSubscribeAuthModeArgs

    AuthType string
    Type of authentication. Valid values: API_KEY, AWS_IAM, AMAZON_COGNITO_USER_POOLS, OPENID_CONNECT, AWS_LAMBDA.
    AuthType string
    Type of authentication. Valid values: API_KEY, AWS_IAM, AMAZON_COGNITO_USER_POOLS, OPENID_CONNECT, AWS_LAMBDA.
    authType String
    Type of authentication. Valid values: API_KEY, AWS_IAM, AMAZON_COGNITO_USER_POOLS, OPENID_CONNECT, AWS_LAMBDA.
    authType string
    Type of authentication. Valid values: API_KEY, AWS_IAM, AMAZON_COGNITO_USER_POOLS, OPENID_CONNECT, AWS_LAMBDA.
    auth_type str
    Type of authentication. Valid values: API_KEY, AWS_IAM, AMAZON_COGNITO_USER_POOLS, OPENID_CONNECT, AWS_LAMBDA.
    authType String
    Type of authentication. Valid values: API_KEY, AWS_IAM, AMAZON_COGNITO_USER_POOLS, OPENID_CONNECT, AWS_LAMBDA.

    ApiEventConfigLogConfig, ApiEventConfigLogConfigArgs

    CloudwatchLogsRoleArn string
    ARN of the IAM role for CloudWatch logs.
    LogLevel string
    Log level. Valid values: NONE, ERROR, ALL, INFO, DEBUG.
    CloudwatchLogsRoleArn string
    ARN of the IAM role for CloudWatch logs.
    LogLevel string
    Log level. Valid values: NONE, ERROR, ALL, INFO, DEBUG.
    cloudwatchLogsRoleArn String
    ARN of the IAM role for CloudWatch logs.
    logLevel String
    Log level. Valid values: NONE, ERROR, ALL, INFO, DEBUG.
    cloudwatchLogsRoleArn string
    ARN of the IAM role for CloudWatch logs.
    logLevel string
    Log level. Valid values: NONE, ERROR, ALL, INFO, DEBUG.
    cloudwatch_logs_role_arn str
    ARN of the IAM role for CloudWatch logs.
    log_level str
    Log level. Valid values: NONE, ERROR, ALL, INFO, DEBUG.
    cloudwatchLogsRoleArn String
    ARN of the IAM role for CloudWatch logs.
    logLevel String
    Log level. Valid values: NONE, ERROR, ALL, INFO, DEBUG.

    Import

    Using pulumi import, import AppSync Event API using the api_id. For example:

    $ pulumi import aws:appsync/api:Api example example-api-id
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v7.5.0 published on Wednesday, Aug 20, 2025 by Pulumi