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