1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package types 4 5// Describes an additional authentication provider. 6type AdditionalAuthenticationProvider struct { 7 8 // The authentication type: API key, AWS IAM, OIDC, or Amazon Cognito user pools. 9 AuthenticationType AuthenticationType 10 11 // The OpenID Connect configuration. 12 OpenIDConnectConfig *OpenIDConnectConfig 13 14 // The Amazon Cognito user pool configuration. 15 UserPoolConfig *CognitoUserPoolConfig 16} 17 18// The ApiCache object. 19type ApiCache struct { 20 21 // Caching behavior. 22 // 23 // * FULL_REQUEST_CACHING: All requests are fully cached. 24 // 25 // * 26 // PER_RESOLVER_CACHING: Individual resolvers that you specify are cached. 27 ApiCachingBehavior ApiCachingBehavior 28 29 // At rest encryption flag for cache. This setting cannot be updated after 30 // creation. 31 AtRestEncryptionEnabled bool 32 33 // The cache instance status. 34 // 35 // * AVAILABLE: The instance is available for use. 36 // 37 // * 38 // CREATING: The instance is currently creating. 39 // 40 // * DELETING: The instance is 41 // currently deleting. 42 // 43 // * MODIFYING: The instance is currently modifying. 44 // 45 // * 46 // FAILED: The instance has failed creation. 47 Status ApiCacheStatus 48 49 // Transit encryption flag when connecting to cache. This setting cannot be updated 50 // after creation. 51 TransitEncryptionEnabled bool 52 53 // TTL in seconds for cache entries. Valid values are between 1 and 3600 seconds. 54 Ttl int64 55 56 // The cache instance type. Valid values are 57 // 58 // * SMALL 59 // 60 // * MEDIUM 61 // 62 // * LARGE 63 // 64 // * 65 // XLARGE 66 // 67 // * LARGE_2X 68 // 69 // * LARGE_4X 70 // 71 // * LARGE_8X (not available in all regions) 72 // 73 // * 74 // LARGE_12X 75 // 76 // Historically, instance types were identified by an EC2-style value. 77 // As of July 2020, this is deprecated, and the generic identifiers above should be 78 // used. The following legacy instance types are available, but their use is 79 // discouraged: 80 // 81 // * T2_SMALL: A t2.small instance type. 82 // 83 // * T2_MEDIUM: A t2.medium 84 // instance type. 85 // 86 // * R4_LARGE: A r4.large instance type. 87 // 88 // * R4_XLARGE: A r4.xlarge 89 // instance type. 90 // 91 // * R4_2XLARGE: A r4.2xlarge instance type. 92 // 93 // * R4_4XLARGE: A 94 // r4.4xlarge instance type. 95 // 96 // * R4_8XLARGE: A r4.8xlarge instance type. 97 Type ApiCacheType 98} 99 100// Describes an API key. Customers invoke AWS AppSync GraphQL API operations with 101// API keys as an identity mechanism. There are two key versions: da1: This version 102// was introduced at launch in November 2017. These keys always expire after 7 103// days. Key expiration is managed by Amazon DynamoDB TTL. The keys ceased to be 104// valid after February 21, 2018 and should not be used after that date. 105// 106// * 107// ListApiKeys returns the expiration time in milliseconds. 108// 109// * CreateApiKey returns 110// the expiration time in milliseconds. 111// 112// * UpdateApiKey is not available for this 113// key version. 114// 115// * DeleteApiKey deletes the item from the table. 116// 117// * Expiration is 118// stored in Amazon DynamoDB as milliseconds. This results in a bug where keys are 119// not automatically deleted because DynamoDB expects the TTL to be stored in 120// seconds. As a one-time action, we will delete these keys from the table after 121// February 21, 2018. 122// 123// da2: This version was introduced in February 2018 when 124// AppSync added support to extend key expiration. 125// 126// * ListApiKeys returns the 127// expiration time and deletion time in seconds. 128// 129// * CreateApiKey returns the 130// expiration time and deletion time in seconds and accepts a user-provided 131// expiration time in seconds. 132// 133// * UpdateApiKey returns the expiration time and and 134// deletion time in seconds and accepts a user-provided expiration time in seconds. 135// Expired API keys are kept for 60 days after the expiration time. Key expiration 136// time can be updated while the key is not deleted. 137// 138// * DeleteApiKey deletes the 139// item from the table. 140// 141// * Expiration is stored in Amazon DynamoDB as seconds. 142// After the expiration time, using the key to authenticate will fail. But the key 143// can be reinstated before deletion. 144// 145// * Deletion is stored in Amazon DynamoDB as 146// seconds. The key will be deleted after deletion time. 147type ApiKey struct { 148 149 // The time after which the API key is deleted. The date is represented as seconds 150 // since the epoch, rounded down to the nearest hour. 151 Deletes int64 152 153 // A description of the purpose of the API key. 154 Description *string 155 156 // The time after which the API key expires. The date is represented as seconds 157 // since the epoch, rounded down to the nearest hour. 158 Expires int64 159 160 // The API key ID. 161 Id *string 162} 163 164// The authorization config in case the HTTP endpoint requires authorization. 165type AuthorizationConfig struct { 166 167 // The authorization type required by the HTTP endpoint. 168 // 169 // * AWS_IAM: The 170 // authorization type is Sigv4. 171 // 172 // This member is required. 173 AuthorizationType AuthorizationType 174 175 // The AWS IAM settings. 176 AwsIamConfig *AwsIamConfig 177} 178 179// The AWS IAM configuration. 180type AwsIamConfig struct { 181 182 // The signing region for AWS IAM authorization. 183 SigningRegion *string 184 185 // The signing service name for AWS IAM authorization. 186 SigningServiceName *string 187} 188 189// The caching configuration for a resolver that has caching enabled. 190type CachingConfig struct { 191 192 // The caching keys for a resolver that has caching enabled. Valid values are 193 // entries from the $context.arguments, $context.source, and $context.identity 194 // maps. 195 CachingKeys []string 196 197 // The TTL in seconds for a resolver that has caching enabled. Valid values are 198 // between 1 and 3600 seconds. 199 Ttl int64 200} 201 202// Describes an Amazon Cognito user pool configuration. 203type CognitoUserPoolConfig struct { 204 205 // The AWS Region in which the user pool was created. 206 // 207 // This member is required. 208 AwsRegion *string 209 210 // The user pool ID. 211 // 212 // This member is required. 213 UserPoolId *string 214 215 // A regular expression for validating the incoming Amazon Cognito user pool app 216 // client ID. 217 AppIdClientRegex *string 218} 219 220// Describes a data source. 221type DataSource struct { 222 223 // The data source ARN. 224 DataSourceArn *string 225 226 // The description of the data source. 227 Description *string 228 229 // Amazon DynamoDB settings. 230 DynamodbConfig *DynamodbDataSourceConfig 231 232 // Amazon Elasticsearch Service settings. 233 ElasticsearchConfig *ElasticsearchDataSourceConfig 234 235 // HTTP endpoint settings. 236 HttpConfig *HttpDataSourceConfig 237 238 // AWS Lambda settings. 239 LambdaConfig *LambdaDataSourceConfig 240 241 // The name of the data source. 242 Name *string 243 244 // Relational database settings. 245 RelationalDatabaseConfig *RelationalDatabaseDataSourceConfig 246 247 // The AWS IAM service role ARN for the data source. The system assumes this role 248 // when accessing the data source. 249 ServiceRoleArn *string 250 251 // The type of the data source. 252 // 253 // * AMAZON_DYNAMODB: The data source is an Amazon 254 // DynamoDB table. 255 // 256 // * AMAZON_ELASTICSEARCH: The data source is an Amazon 257 // Elasticsearch Service domain. 258 // 259 // * AWS_LAMBDA: The data source is an AWS Lambda 260 // function. 261 // 262 // * NONE: There is no data source. This type is used when you wish to 263 // invoke a GraphQL operation without connecting to a data source, such as 264 // performing data transformation with resolvers or triggering a subscription to be 265 // invoked from a mutation. 266 // 267 // * HTTP: The data source is an HTTP endpoint. 268 // 269 // * 270 // RELATIONAL_DATABASE: The data source is a relational database. 271 Type DataSourceType 272} 273 274// Describes a Delta Sync configuration. 275type DeltaSyncConfig struct { 276 277 // The number of minutes an Item is stored in the datasource. 278 BaseTableTTL int64 279 280 // The Delta Sync table name. 281 DeltaSyncTableName *string 282 283 // The number of minutes a Delta Sync log entry is stored in the Delta Sync table. 284 DeltaSyncTableTTL int64 285} 286 287// Describes an Amazon DynamoDB data source configuration. 288type DynamodbDataSourceConfig struct { 289 290 // The AWS Region. 291 // 292 // This member is required. 293 AwsRegion *string 294 295 // The table name. 296 // 297 // This member is required. 298 TableName *string 299 300 // The DeltaSyncConfig for a versioned datasource. 301 DeltaSyncConfig *DeltaSyncConfig 302 303 // Set to TRUE to use Amazon Cognito credentials with this data source. 304 UseCallerCredentials bool 305 306 // Set to TRUE to use Conflict Detection and Resolution with this data source. 307 Versioned bool 308} 309 310// Describes an Elasticsearch data source configuration. 311type ElasticsearchDataSourceConfig struct { 312 313 // The AWS Region. 314 // 315 // This member is required. 316 AwsRegion *string 317 318 // The endpoint. 319 // 320 // This member is required. 321 Endpoint *string 322} 323 324// A function is a reusable entity. Multiple functions can be used to compose the 325// resolver logic. 326type FunctionConfiguration struct { 327 328 // The name of the DataSource. 329 DataSourceName *string 330 331 // The Function description. 332 Description *string 333 334 // The ARN of the Function object. 335 FunctionArn *string 336 337 // A unique ID representing the Function object. 338 FunctionId *string 339 340 // The version of the request mapping template. Currently only the 2018-05-29 341 // version of the template is supported. 342 FunctionVersion *string 343 344 // The name of the Function object. 345 Name *string 346 347 // The Function request mapping template. Functions support only the 2018-05-29 348 // version of the request mapping template. 349 RequestMappingTemplate *string 350 351 // The Function response mapping template. 352 ResponseMappingTemplate *string 353 354 // Describes a Sync configuration for a resolver. Contains information on which 355 // Conflict Detection as well as Resolution strategy should be performed when the 356 // resolver is invoked. 357 SyncConfig *SyncConfig 358} 359 360// Describes a GraphQL API. 361type GraphqlApi struct { 362 363 // A list of additional authentication providers for the GraphqlApi API. 364 AdditionalAuthenticationProviders []AdditionalAuthenticationProvider 365 366 // The API ID. 367 ApiId *string 368 369 // The ARN. 370 Arn *string 371 372 // The authentication type. 373 AuthenticationType AuthenticationType 374 375 // The Amazon CloudWatch Logs configuration. 376 LogConfig *LogConfig 377 378 // The API name. 379 Name *string 380 381 // The OpenID Connect configuration. 382 OpenIDConnectConfig *OpenIDConnectConfig 383 384 // The tags. 385 Tags map[string]string 386 387 // The URIs. 388 Uris map[string]string 389 390 // The Amazon Cognito user pool configuration. 391 UserPoolConfig *UserPoolConfig 392 393 // The ARN of the AWS Web Application Firewall (WAF) ACL associated with this 394 // GraphqlApi, if one exists. 395 WafWebAclArn *string 396 397 // A flag representing whether X-Ray tracing is enabled for this GraphqlApi. 398 XrayEnabled bool 399} 400 401// Describes an HTTP data source configuration. 402type HttpDataSourceConfig struct { 403 404 // The authorization config in case the HTTP endpoint requires authorization. 405 AuthorizationConfig *AuthorizationConfig 406 407 // The HTTP URL endpoint. You can either specify the domain name or IP, and port 408 // combination, and the URL scheme must be HTTP or HTTPS. If the port is not 409 // specified, AWS AppSync uses the default port 80 for the HTTP endpoint and port 410 // 443 for HTTPS endpoints. 411 Endpoint *string 412} 413 414// The LambdaConflictHandlerConfig object when configuring LAMBDA as the Conflict 415// Handler. 416type LambdaConflictHandlerConfig struct { 417 418 // The Arn for the Lambda function to use as the Conflict Handler. 419 LambdaConflictHandlerArn *string 420} 421 422// Describes an AWS Lambda data source configuration. 423type LambdaDataSourceConfig struct { 424 425 // The ARN for the Lambda function. 426 // 427 // This member is required. 428 LambdaFunctionArn *string 429} 430 431// The CloudWatch Logs configuration. 432type LogConfig struct { 433 434 // The service role that AWS AppSync will assume to publish to Amazon CloudWatch 435 // logs in your account. 436 // 437 // This member is required. 438 CloudWatchLogsRoleArn *string 439 440 // The field logging level. Values can be NONE, ERROR, or ALL. 441 // 442 // * NONE: No 443 // field-level logs are captured. 444 // 445 // * ERROR: Logs the following information only for 446 // the fields that are in error: 447 // 448 // * The error section in the server response. 449 // 450 // * 451 // Field-level errors. 452 // 453 // * The generated request/response functions that got 454 // resolved for error fields. 455 // 456 // * ALL: The following information is logged for all 457 // fields in the query: 458 // 459 // * Field-level tracing information. 460 // 461 // * The generated 462 // request/response functions that got resolved for each field. 463 // 464 // This member is required. 465 FieldLogLevel FieldLogLevel 466 467 // Set to TRUE to exclude sections that contain information such as headers, 468 // context, and evaluated mapping templates, regardless of logging level. 469 ExcludeVerboseContent bool 470} 471 472// Describes an OpenID Connect configuration. 473type OpenIDConnectConfig struct { 474 475 // The issuer for the OpenID Connect configuration. The issuer returned by 476 // discovery must exactly match the value of iss in the ID token. 477 // 478 // This member is required. 479 Issuer *string 480 481 // The number of milliseconds a token is valid after being authenticated. 482 AuthTTL int64 483 484 // The client identifier of the Relying party at the OpenID identity provider. This 485 // identifier is typically obtained when the Relying party is registered with the 486 // OpenID identity provider. You can specify a regular expression so the AWS 487 // AppSync can validate against multiple client identifiers at a time. 488 ClientId *string 489 490 // The number of milliseconds a token is valid after being issued to a user. 491 IatTTL int64 492} 493 494// The pipeline configuration for a resolver of kind PIPELINE. 495type PipelineConfig struct { 496 497 // A list of Function objects. 498 Functions []string 499} 500 501// The Amazon RDS HTTP endpoint configuration. 502type RdsHttpEndpointConfig struct { 503 504 // AWS Region for RDS HTTP endpoint. 505 AwsRegion *string 506 507 // AWS secret store ARN for database credentials. 508 AwsSecretStoreArn *string 509 510 // Logical database name. 511 DatabaseName *string 512 513 // Amazon RDS cluster ARN. 514 DbClusterIdentifier *string 515 516 // Logical schema name. 517 Schema *string 518} 519 520// Describes a relational database data source configuration. 521type RelationalDatabaseDataSourceConfig struct { 522 523 // Amazon RDS HTTP endpoint settings. 524 RdsHttpEndpointConfig *RdsHttpEndpointConfig 525 526 // Source type for the relational database. 527 // 528 // * RDS_HTTP_ENDPOINT: The relational 529 // database source type is an Amazon RDS HTTP endpoint. 530 RelationalDatabaseSourceType RelationalDatabaseSourceType 531} 532 533// Describes a resolver. 534type Resolver struct { 535 536 // The caching configuration for the resolver. 537 CachingConfig *CachingConfig 538 539 // The resolver data source name. 540 DataSourceName *string 541 542 // The resolver field name. 543 FieldName *string 544 545 // The resolver type. 546 // 547 // * UNIT: A UNIT resolver type. A UNIT resolver is the default 548 // resolver type. A UNIT resolver enables you to execute a GraphQL query against a 549 // single data source. 550 // 551 // * PIPELINE: A PIPELINE resolver type. A PIPELINE resolver 552 // enables you to execute a series of Function in a serial manner. You can use a 553 // pipeline resolver to execute a GraphQL query against multiple data sources. 554 Kind ResolverKind 555 556 // The PipelineConfig. 557 PipelineConfig *PipelineConfig 558 559 // The request mapping template. 560 RequestMappingTemplate *string 561 562 // The resolver ARN. 563 ResolverArn *string 564 565 // The response mapping template. 566 ResponseMappingTemplate *string 567 568 // The SyncConfig for a resolver attached to a versioned datasource. 569 SyncConfig *SyncConfig 570 571 // The resolver type name. 572 TypeName *string 573} 574 575// Describes a Sync configuration for a resolver. Contains information on which 576// Conflict Detection as well as Resolution strategy should be performed when the 577// resolver is invoked. 578type SyncConfig struct { 579 580 // The Conflict Detection strategy to use. 581 // 582 // * VERSION: Detect conflicts based on 583 // object versions for this resolver. 584 // 585 // * NONE: Do not detect conflicts when 586 // executing this resolver. 587 ConflictDetection ConflictDetectionType 588 589 // The Conflict Resolution strategy to perform in the event of a conflict. 590 // 591 // * 592 // OPTIMISTIC_CONCURRENCY: Resolve conflicts by rejecting mutations when versions 593 // do not match the latest version at the server. 594 // 595 // * AUTOMERGE: Resolve conflicts 596 // with the Automerge conflict resolution strategy. 597 // 598 // * LAMBDA: Resolve conflicts 599 // with a Lambda function supplied in the LambdaConflictHandlerConfig. 600 ConflictHandler ConflictHandlerType 601 602 // The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler. 603 LambdaConflictHandlerConfig *LambdaConflictHandlerConfig 604} 605 606// Describes a type. 607type Type struct { 608 609 // The type ARN. 610 Arn *string 611 612 // The type definition. 613 Definition *string 614 615 // The type description. 616 Description *string 617 618 // The type format: SDL or JSON. 619 Format TypeDefinitionFormat 620 621 // The type name. 622 Name *string 623} 624 625// Describes an Amazon Cognito user pool configuration. 626type UserPoolConfig struct { 627 628 // The AWS Region in which the user pool was created. 629 // 630 // This member is required. 631 AwsRegion *string 632 633 // The action that you want your GraphQL API to take when a request that uses 634 // Amazon Cognito user pool authentication doesn't match the Amazon Cognito user 635 // pool configuration. 636 // 637 // This member is required. 638 DefaultAction DefaultAction 639 640 // The user pool ID. 641 // 642 // This member is required. 643 UserPoolId *string 644 645 // A regular expression for validating the incoming Amazon Cognito user pool app 646 // client ID. 647 AppIdClientRegex *string 648} 649