import * as core from "@terrascript/core"; export interface LambdaConflictHandlerConfigArgs extends core.SchemaArgs { lambdaConflictHandlerArn?: string | core.StringOut; } export class LambdaConflictHandlerConfig extends core.Schema { @core.attr(String) public lambdaConflictHandlerArn?: string | core.StringOut; } export interface SyncConfigArgs extends core.SchemaArgs { conflictDetection?: string | core.StringOut; conflictHandler?: string | core.StringOut; lambdaConflictHandlerConfig?: LambdaConflictHandlerConfig; } export class SyncConfig extends core.Schema { @core.attr(String) public conflictDetection?: string | core.StringOut; @core.attr(String) public conflictHandler?: string | core.StringOut; @core.attr(LambdaConflictHandlerConfig) public lambdaConflictHandlerConfig?: LambdaConflictHandlerConfig; } export interface FunctionArgs extends core.ResourceArgs { /** * (Required) The ID of the associated AppSync API. */ apiId: string | core.StringOut; /** * (Required) The Function data source name. */ dataSource: string | core.StringOut; /** * (Optional) The Function description. */ description?: string | core.StringOut; /** * (Optional) The version of the request mapping template. Currently the supported value is `2018-05-29 * . */ functionVersion?: string | core.StringOut; /** * (Optional) The maximum batching size for a resolver. Valid values are between `0` and `2000`. */ maxBatchSize?: number | core.NumberOut; /** * (Required) The Function name. The function name does not have to be unique. */ name: string | core.StringOut; /** * (Required) The Function request mapping template. Functions support only the 2018-05-29 version of t * he request mapping template. */ requestMappingTemplate: string | core.StringOut; /** * (Required) The Function response mapping template. */ responseMappingTemplate: string | core.StringOut; /** * (Optional) Describes a Sync configuration for a resolver. See [Sync Config](#sync-config). */ syncConfig?: SyncConfig; } export class Function extends core.Resource { /** * (Required) The ID of the associated AppSync API. */ @core.attr(String) public apiId!: string | core.StringOut; /** * The ARN of the Function object. */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * (Required) The Function data source name. */ @core.attr(String) public dataSource!: string | core.StringOut; /** * (Optional) The Function description. */ @core.attr(String) public description?: string | core.StringOut; /** * A unique ID representing the Function object. */ @core.attr(String, { computed: true }) public functionId!: string | core.StringOut; /** * (Optional) The version of the request mapping template. Currently the supported value is `2018-05-29 * . */ @core.attr(String) public functionVersion?: string | core.StringOut; /** * API Function ID (Formatted as ApiId-FunctionId) */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) The maximum batching size for a resolver. Valid values are between `0` and `2000`. */ @core.attr(Number) public maxBatchSize?: number | core.NumberOut; /** * (Required) The Function name. The function name does not have to be unique. */ @core.attr(String) public name!: string | core.StringOut; /** * (Required) The Function request mapping template. Functions support only the 2018-05-29 version of t * he request mapping template. */ @core.attr(String) public requestMappingTemplate!: string | core.StringOut; /** * (Required) The Function response mapping template. */ @core.attr(String) public responseMappingTemplate!: string | core.StringOut; /** * (Optional) Describes a Sync configuration for a resolver. See [Sync Config](#sync-config). */ @core.attr(SyncConfig) public syncConfig?: SyncConfig; constructor(name: string, args?: FunctionArgs) { super(name, "aws_appsync_function", args); } public override getNamespace(): string { return "aws_appsync"; } }