• 沒有找到結果。

AWS AppSync

N/A
N/A
Protected

Academic year: 2022

Share "AWS AppSync"

Copied!
200
0
0

加載中.... (立即查看全文)

全文

(1)

AWS AppSync

API Reference

API Version 2017-07-25

(2)

AWS AppSync: API Reference

Copyright © Amazon Web Services, Inc. and/or its affiliates. All rights reserved.

Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon.

(3)

Table of Contents

Welcome ... 1

Actions ... 2

AssociateApi ... 4

Request Syntax ... 4

URI Request Parameters ... 4

Request Body ... 4

Response Syntax ... 4

Response Elements ... 5

Errors ... 5

See Also ... 5

CreateApiCache ... 6

Request Syntax ... 6

URI Request Parameters ... 6

Request Body ... 6

Response Syntax ... 7

Response Elements ... 8

Errors ... 8

See Also ... 8

CreateApiKey ... 10

Request Syntax ... 10

URI Request Parameters ... 10

Request Body ... 10

Response Syntax ... 10

Response Elements ... 11

Errors ... 11

See Also ... 12

CreateDataSource ... 13

Request Syntax ... 13

URI Request Parameters ... 13

Request Body ... 14

Response Syntax ... 15

Response Elements ... 16

Errors ... 16

See Also ... 17

CreateDomainName ... 18

Request Syntax ... 18

URI Request Parameters ... 18

Request Body ... 18

Response Syntax ... 19

Response Elements ... 19

Errors ... 19

See Also ... 19

CreateFunction ... 21

Request Syntax ... 21

URI Request Parameters ... 21

Request Body ... 21

Response Syntax ... 23

Response Elements ... 23

Errors ... 23

See Also ... 24

CreateGraphqlApi ... 25

Request Syntax ... 25

URI Request Parameters ... 26

Request Body ... 26

(4)

Response Syntax ... 27

Response Elements ... 28

Errors ... 28

See Also ... 29

CreateResolver ... 30

Request Syntax ... 30

URI Request Parameters ... 30

Request Body ... 30

Response Syntax ... 32

Response Elements ... 33

Errors ... 33

See Also ... 33

CreateType ... 35

Request Syntax ... 35

URI Request Parameters ... 35

Request Body ... 35

Response Syntax ... 35

Response Elements ... 36

Errors ... 36

See Also ... 36

DeleteApiCache ... 38

Request Syntax ... 38

URI Request Parameters ... 38

Request Body ... 38

Response Syntax ... 38

Response Elements ... 38

Errors ... 38

See Also ... 39

DeleteApiKey ... 40

Request Syntax ... 40

URI Request Parameters ... 40

Request Body ... 40

Response Syntax ... 40

Response Elements ... 40

Errors ... 40

See Also ... 41

DeleteDataSource ... 42

Request Syntax ... 42

URI Request Parameters ... 42

Request Body ... 42

Response Syntax ... 42

Response Elements ... 42

Errors ... 42

See Also ... 43

DeleteDomainName ... 44

Request Syntax ... 44

URI Request Parameters ... 44

Request Body ... 44

Response Syntax ... 44

Response Elements ... 44

Errors ... 44

See Also ... 45

DeleteFunction ... 46

Request Syntax ... 46

URI Request Parameters ... 46

Request Body ... 46

Response Syntax ... 46

API Version 2017-07-25 iv

(5)

Response Elements ... 46

Errors ... 46

See Also ... 47

DeleteGraphqlApi ... 48

Request Syntax ... 48

URI Request Parameters ... 48

Request Body ... 48

Response Syntax ... 48

Response Elements ... 48

Errors ... 48

See Also ... 49

DeleteResolver ... 50

Request Syntax ... 50

URI Request Parameters ... 50

Request Body ... 50

Response Syntax ... 50

Response Elements ... 50

Errors ... 50

See Also ... 51

DeleteType ... 52

Request Syntax ... 52

URI Request Parameters ... 52

Request Body ... 52

Response Syntax ... 52

Response Elements ... 52

Errors ... 52

See Also ... 53

DisassociateApi ... 54

Request Syntax ... 54

URI Request Parameters ... 54

Request Body ... 54

Response Syntax ... 54

Response Elements ... 54

Errors ... 54

See Also ... 55

FlushApiCache ... 56

Request Syntax ... 56

URI Request Parameters ... 56

Request Body ... 56

Response Syntax ... 56

Response Elements ... 56

Errors ... 56

See Also ... 57

GetApiAssociation ... 58

Request Syntax ... 58

URI Request Parameters ... 58

Request Body ... 58

Response Syntax ... 58

Response Elements ... 58

Errors ... 59

See Also ... 59

GetApiCache ... 60

Request Syntax ... 60

URI Request Parameters ... 60

Request Body ... 60

Response Syntax ... 60

Response Elements ... 60

(6)

Errors ... 60

See Also ... 61

GetDataSource ... 62

Request Syntax ... 62

URI Request Parameters ... 62

Request Body ... 62

Response Syntax ... 62

Response Elements ... 63

Errors ... 63

See Also ... 64

GetDomainName ... 65

Request Syntax ... 65

URI Request Parameters ... 65

Request Body ... 65

Response Syntax ... 65

Response Elements ... 65

Errors ... 66

See Also ... 66

GetFunction ... 67

Request Syntax ... 67

URI Request Parameters ... 67

Request Body ... 67

Response Syntax ... 67

Response Elements ... 68

Errors ... 68

See Also ... 68

GetGraphqlApi ... 69

Request Syntax ... 69

URI Request Parameters ... 69

Request Body ... 69

Response Syntax ... 69

Response Elements ... 70

Errors ... 70

See Also ... 71

GetIntrospectionSchema ... 72

Request Syntax ... 72

URI Request Parameters ... 72

Request Body ... 72

Response Syntax ... 72

Response Elements ... 72

Errors ... 72

See Also ... 73

GetResolver ... 74

Request Syntax ... 74

URI Request Parameters ... 74

Request Body ... 74

Response Syntax ... 74

Response Elements ... 75

Errors ... 75

See Also ... 75

GetSchemaCreationStatus ... 77

Request Syntax ... 77

URI Request Parameters ... 77

Request Body ... 77

Response Syntax ... 77

Response Elements ... 77

Errors ... 78

API Version 2017-07-25 vi

(7)

See Also ... 78

GetType ... 79

Request Syntax ... 79

URI Request Parameters ... 79

Request Body ... 79

Response Syntax ... 79

Response Elements ... 80

Errors ... 80

See Also ... 80

ListApiKeys ... 82

Request Syntax ... 82

URI Request Parameters ... 82

Request Body ... 82

Response Syntax ... 82

Response Elements ... 83

Errors ... 83

See Also ... 83

ListDataSources ... 85

Request Syntax ... 85

URI Request Parameters ... 85

Request Body ... 85

Response Syntax ... 85

Response Elements ... 86

Errors ... 87

See Also ... 87

ListDomainNames ... 88

Request Syntax ... 88

URI Request Parameters ... 88

Request Body ... 88

Response Syntax ... 88

Response Elements ... 88

Errors ... 89

See Also ... 89

ListFunctions ... 90

Request Syntax ... 90

URI Request Parameters ... 90

Request Body ... 90

Response Syntax ... 90

Response Elements ... 91

Errors ... 91

See Also ... 92

ListGraphqlApis ... 93

Request Syntax ... 93

URI Request Parameters ... 93

Request Body ... 93

Response Syntax ... 93

Response Elements ... 94

Errors ... 95

See Also ... 95

ListResolvers ... 96

Request Syntax ... 96

URI Request Parameters ... 96

Request Body ... 96

Response Syntax ... 96

Response Elements ... 97

Errors ... 97

See Also ... 98

(8)

ListResolversByFunction ... 99

Request Syntax ... 99

URI Request Parameters ... 99

Request Body ... 99

Response Syntax ... 99

Response Elements ... 100

Errors ... 100

See Also ... 101

ListTagsForResource ... 102

Request Syntax ... 102

URI Request Parameters ... 102

Request Body ... 102

Response Syntax ... 102

Response Elements ... 102

Errors ... 103

See Also ... 103

ListTypes ... 105

Request Syntax ... 105

URI Request Parameters ... 105

Request Body ... 105

Response Syntax ... 105

Response Elements ... 106

Errors ... 106

See Also ... 107

StartSchemaCreation ... 108

Request Syntax ... 108

URI Request Parameters ... 108

Request Body ... 108

Response Syntax ... 108

Response Elements ... 108

Errors ... 109

See Also ... 109

TagResource ... 111

Request Syntax ... 111

URI Request Parameters ... 111

Request Body ... 111

Response Syntax ... 111

Response Elements ... 112

Errors ... 112

See Also ... 112

UntagResource ... 114

Request Syntax ... 114

URI Request Parameters ... 114

Request Body ... 114

Response Syntax ... 114

Response Elements ... 114

Errors ... 114

See Also ... 115

UpdateApiCache ... 116

Request Syntax ... 116

URI Request Parameters ... 116

Request Body ... 116

Response Syntax ... 117

Response Elements ... 117

Errors ... 118

See Also ... 118

UpdateApiKey ... 119

API Version 2017-07-25 viii

(9)

Request Syntax ... 119

URI Request Parameters ... 119

Request Body ... 119

Response Syntax ... 119

Response Elements ... 120

Errors ... 120

See Also ... 121

UpdateDataSource ... 122

Request Syntax ... 122

URI Request Parameters ... 122

Request Body ... 123

Response Syntax ... 124

Response Elements ... 125

Errors ... 125

See Also ... 126

UpdateDomainName ... 127

Request Syntax ... 127

URI Request Parameters ... 127

Request Body ... 127

Response Syntax ... 127

Response Elements ... 128

Errors ... 128

See Also ... 128

UpdateFunction ... 130

Request Syntax ... 130

URI Request Parameters ... 130

Request Body ... 130

Response Syntax ... 132

Response Elements ... 132

Errors ... 132

See Also ... 133

UpdateGraphqlApi ... 134

Request Syntax ... 134

URI Request Parameters ... 134

Request Body ... 135

Response Syntax ... 136

Response Elements ... 137

Errors ... 137

See Also ... 138

UpdateResolver ... 139

Request Syntax ... 139

URI Request Parameters ... 139

Request Body ... 140

Response Syntax ... 141

Response Elements ... 142

Errors ... 142

See Also ... 142

UpdateType ... 143

Request Syntax ... 143

URI Request Parameters ... 143

Request Body ... 143

Response Syntax ... 144

Response Elements ... 144

Errors ... 144

See Also ... 145

Data Types ... 146

AdditionalAuthenticationProvider ... 147

(10)

Contents ... 147

See Also ... 147

ApiAssociation ... 148

Contents ... 148

See Also ... 148

ApiCache ... 149

Contents ... 149

See Also ... 150

ApiKey ... 151

Contents ... 151

See Also ... 152

AuthorizationConfig ... 153

Contents ... 153

See Also ... 153

AwsIamConfig ... 154

Contents ... 154

See Also ... 154

CachingConfig ... 155

Contents ... 155

See Also ... 155

CognitoUserPoolConfig ... 156

Contents ... 156

See Also ... 156

DataSource ... 157

Contents ... 157

See Also ... 158

DeltaSyncConfig ... 159

Contents ... 159

See Also ... 159

DomainNameConfig ... 160

Contents ... 160

See Also ... 160

DynamodbDataSourceConfig ... 162

Contents ... 162

See Also ... 162

ElasticsearchDataSourceConfig ... 163

Contents ... 163

See Also ... 163

FunctionConfiguration ... 164

Contents ... 164

See Also ... 165

GraphqlApi ... 166

Contents ... 166

See Also ... 167

HttpDataSourceConfig ... 169

Contents ... 169

See Also ... 169

LambdaAuthorizerConfig ... 170

Contents ... 170

See Also ... 170

LambdaConflictHandlerConfig ... 171

Contents ... 171

See Also ... 171

LambdaDataSourceConfig ... 172

Contents ... 172

See Also ... 172

LogConfig ... 173

API Version 2017-07-25 x

(11)

Contents ... 173

See Also ... 173

OpenIDConnectConfig ... 174

Contents ... 174

See Also ... 174

OpenSearchServiceDataSourceConfig ... 175

Contents ... 175

See Also ... 175

PipelineConfig ... 176

Contents ... 176

See Also ... 176

RdsHttpEndpointConfig ... 177

Contents ... 177

See Also ... 177

RelationalDatabaseDataSourceConfig ... 178

Contents ... 178

See Also ... 178

Resolver ... 179

Contents ... 179

See Also ... 180

SyncConfig ... 182

Contents ... 182

See Also ... 182

Type ... 183

Contents ... 183

See Also ... 183

UserPoolConfig ... 185

Contents ... 185

See Also ... 185

Common Parameters ... 186

Common Errors ... 188

(12)

Welcome

AWS AppSync provides API actions for creating and interacting with data sources using GraphQL from your application.

This document was last published on March 6, 2022.

API Version 2017-07-25 1

(13)

Actions

The following actions are supported:

• AssociateApi (p. 4)

• CreateApiCache (p. 6)

• CreateApiKey (p. 10)

• CreateDataSource (p. 13)

• CreateDomainName (p. 18)

• CreateFunction (p. 21)

• CreateGraphqlApi (p. 25)

• CreateResolver (p. 30)

• CreateType (p. 35)

• DeleteApiCache (p. 38)

• DeleteApiKey (p. 40)

• DeleteDataSource (p. 42)

• DeleteDomainName (p. 44)

• DeleteFunction (p. 46)

• DeleteGraphqlApi (p. 48)

• DeleteResolver (p. 50)

• DeleteType (p. 52)

• DisassociateApi (p. 54)

• FlushApiCache (p. 56)

• GetApiAssociation (p. 58)

• GetApiCache (p. 60)

• GetDataSource (p. 62)

• GetDomainName (p. 65)

• GetFunction (p. 67)

• GetGraphqlApi (p. 69)

• GetIntrospectionSchema (p. 72)

• GetResolver (p. 74)

• GetSchemaCreationStatus (p. 77)

• GetType (p. 79)

• ListApiKeys (p. 82)

• ListDataSources (p. 85)

• ListDomainNames (p. 88)

• ListFunctions (p. 90)

• ListGraphqlApis (p. 93)

• ListResolvers (p. 96)

• ListResolversByFunction (p. 99)

• ListTagsForResource (p. 102)

• ListTypes (p. 105)

• StartSchemaCreation (p. 108)

• TagResource (p. 111)

(14)

• UntagResource (p. 114)

• UpdateApiCache (p. 116)

• UpdateApiKey (p. 119)

• UpdateDataSource (p. 122)

• UpdateDomainName (p. 127)

• UpdateFunction (p. 130)

• UpdateGraphqlApi (p. 134)

• UpdateResolver (p. 139)

• UpdateType (p. 143)

API Version 2017-07-25 3

(15)

AssociateApi

AssociateApi

Maps an endpoint to your custom domain.

Request Syntax

POST /v1/domainnames/domainName/apiassociation HTTP/1.1 Content-type: application/json

{

"apiId": "string"

}

URI Request Parameters

The request uses the following URI parameters.

domainName (p. 4) The domain name.

Length Constraints: Minimum length of 1. Maximum length of 253.

Pattern: ^(\*[\w\d-]*\.)?([\w\d-]+\.)+[\w\d-]+$

Required: Yes

Request Body

The request accepts the following data in JSON format.

apiId (p. 4)

The API ID.

Type: String Required: Yes

Response Syntax

HTTP/1.1 200

Content-type: application/json { "apiAssociation": {

"apiId": "string",

"associationStatus": "string", "deploymentDetail": "string", "domainName": "string"

}}

(16)

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

apiAssociation (p. 4)

The ApiAssociation object.

Type: ApiAssociation (p. 148) object

Errors

For information about the errors that are common to all actions, see Common Errors (p. 188).

AccessDeniedException

You don't have access to perform this operation on this resource.

HTTP Status Code: 403 BadRequestException

The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again.

HTTP Status Code: 400 InternalFailureException

An internal AWS AppSync error occurred. Try your request again.

HTTP Status Code: 500 NotFoundException

The resource specified in the request was not found. Check the resource, and then try again.

HTTP Status Code: 404

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

API Version 2017-07-25 5

(17)

CreateApiCache

CreateApiCache

Creates a cache for the GraphQL API.

Request Syntax

POST /v1/apis/apiId/ApiCaches HTTP/1.1 Content-type: application/json

{ "apiCachingBehavior": "string", "atRestEncryptionEnabled": boolean, "transitEncryptionEnabled": boolean, "ttl": number,

"type": "string"

}

URI Request Parameters

The request uses the following URI parameters.

apiId (p. 6)

The GraphQL API ID.

Required: Yes

Request Body

The request accepts the following data in JSON format.

apiCachingBehavior (p. 6) Caching behavior.

FULL_REQUEST_CACHING: All requests are fully cached.

PER_RESOLVER_CACHING: Individual resolvers that you specify are cached.

Type: String

Valid Values: FULL_REQUEST_CACHING | PER_RESOLVER_CACHING Required: Yes

atRestEncryptionEnabled (p. 6)

At-rest encryption flag for cache. You cannot update this setting after creation.

Type: Boolean Required: No

transitEncryptionEnabled (p. 6)

Transit encryption flag when connecting to cache. You cannot update this setting after creation.

Type: Boolean

(18)

Required: No ttl (p. 6)

TTL in seconds for cache entries.

Valid values are 1–3,600 seconds.

Type: Long Required: Yes type (p. 6)

The cache instance type. Valid values are

• SMALL

• MEDIUM

• LARGE

• XLARGE

• LARGE_2X

• LARGE_4X

• LARGE_8X (not available in all regions)

• LARGE_12X

Historically, instance types were identified by an EC2-style value. As of July 2020, this is deprecated, and the generic identifiers above should be used.

The following legacy instance types are available, but their use is discouraged:

T2_SMALL: A t2.small instance type.

T2_MEDIUM: A t2.medium instance type.

R4_LARGE: A r4.large instance type.

R4_XLARGE: A r4.xlarge instance type.

R4_2XLARGE: A r4.2xlarge instance type.

R4_4XLARGE: A r4.4xlarge instance type.

R4_8XLARGE: A r4.8xlarge instance type.

Type: String

Valid Values: T2_SMALL | T2_MEDIUM | R4_LARGE | R4_XLARGE | R4_2XLARGE | R4_4XLARGE | R4_8XLARGE | SMALL | MEDIUM | LARGE | XLARGE | LARGE_2X | LARGE_4X | LARGE_8X | LARGE_12X

Required: Yes

Response Syntax

HTTP/1.1 200

Content-type: application/json { "apiCache": {

"apiCachingBehavior": "string", "atRestEncryptionEnabled": boolean, "status": "string",

"transitEncryptionEnabled": boolean, "ttl": number,

API Version 2017-07-25 7

(19)

Response Elements

"type": "string"

}}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

apiCache (p. 7)

The ApiCache object.

Type: ApiCache (p. 149) object

Errors

For information about the errors that are common to all actions, see Common Errors (p. 188).

BadRequestException

The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again.

HTTP Status Code: 400 ConcurrentModificationException

Another modification is in progress at this time and it must complete before you can make your change.

HTTP Status Code: 409 InternalFailureException

An internal AWS AppSync error occurred. Try your request again.

HTTP Status Code: 500 NotFoundException

The resource specified in the request was not found. Check the resource, and then try again.

HTTP Status Code: 404 UnauthorizedException

You aren't authorized to perform this operation.

HTTP Status Code: 401

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

(20)

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

API Version 2017-07-25 9

(21)

CreateApiKey

CreateApiKey

Creates a unique key that you can distribute to clients who invoke your API.

Request Syntax

POST /v1/apis/apiId/apikeys HTTP/1.1 Content-type: application/json { "description": "string", "expires": number }

URI Request Parameters

The request uses the following URI parameters.

apiId (p. 10)

The ID for your GraphQL API.

Required: Yes

Request Body

The request accepts the following data in JSON format.

description (p. 10)

A description of the purpose of the API key.

Type: String Required: No expires (p. 10)

From the creation time, the time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the nearest hour. The default value for this parameter is 7 days from creation time. For more information, see ApiKey (p. 151).

Type: Long Required: No

Response Syntax

HTTP/1.1 200

Content-type: application/json { "apiKey": {

"deletes": number, "description": "string",

(22)

"expires": number, "id": "string"

}}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

apiKey (p. 10) The API key.

Type: ApiKey (p. 151) object

Errors

For information about the errors that are common to all actions, see Common Errors (p. 188).

ApiKeyLimitExceededException

The API key exceeded a limit. Try your request again.

HTTP Status Code: 400

ApiKeyValidityOutOfBoundsException

The API key expiration must be set to a value between 1 and 365 days from creation (for CreateApiKey) or from update (for UpdateApiKey).

HTTP Status Code: 400 BadRequestException

The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again.

HTTP Status Code: 400 InternalFailureException

An internal AWS AppSync error occurred. Try your request again.

HTTP Status Code: 500 LimitExceededException

The request exceeded a limit. Try your request again.

HTTP Status Code: 429 LimitExceededException

The request exceeded a limit. Try your request again.

HTTP Status Code: 429 NotFoundException

The resource specified in the request was not found. Check the resource, and then try again.

API Version 2017-07-25 11

(23)

See Also

HTTP Status Code: 404 UnauthorizedException

You aren't authorized to perform this operation.

HTTP Status Code: 401

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(24)

CreateDataSource

Creates a DataSource object.

Request Syntax

POST /v1/apis/apiId/datasources HTTP/1.1 Content-type: application/json

{ "description": "string", "dynamodbConfig": { "awsRegion": "string", "deltaSyncConfig": { "baseTableTTL": number,

"deltaSyncTableName": "string", "deltaSyncTableTTL": number },

"tableName": "string",

"useCallerCredentials": boolean, "versioned": boolean

},

"elasticsearchConfig": { "awsRegion": "string", "endpoint": "string"

},

"httpConfig": {

"authorizationConfig": {

"authorizationType": "string", "awsIamConfig": {

"signingRegion": "string", "signingServiceName": "string"

} },

"endpoint": "string"

},

"lambdaConfig": {

"lambdaFunctionArn": "string"

},

"name": "string",

"openSearchServiceConfig": { "awsRegion": "string", "endpoint": "string"

},

"relationalDatabaseConfig": { "rdsHttpEndpointConfig": { "awsRegion": "string",

"awsSecretStoreArn": "string", "databaseName": "string", "dbClusterIdentifier": "string", "schema": "string"

},

"relationalDatabaseSourceType": "string"

},

"serviceRoleArn": "string", "type": "string"

}

URI Request Parameters

The request uses the following URI parameters.

API Version 2017-07-25 13

(25)

Request Body

apiId (p. 13)

The API ID for the GraphQL API for the DataSource.

Required: Yes

Request Body

The request accepts the following data in JSON format.

description (p. 13)

A description of the DataSource.

Type: String Required: No dynamodbConfig (p. 13)

Amazon DynamoDB settings.

Type: DynamodbDataSourceConfig (p. 162) object Required: No

elasticsearchConfig (p. 13)

Amazon OpenSearch Service settings.

As of September 2021, Amazon Elasticsearch service is Amazon OpenSearch Service. This configuration is deprecated. For new data sources, use

CreateDataSource:openSearchServiceConfig (p. 15) to create an OpenSearch data source.

Type: ElasticsearchDataSourceConfig (p. 163) object Required: No

httpConfig (p. 13)

HTTP endpoint settings.

Type: HttpDataSourceConfig (p. 169) object Required: No

lambdaConfig (p. 13) AWS Lambda settings.

Type: LambdaDataSourceConfig (p. 172) object Required: No

name (p. 13)

A user-supplied name for the DataSource.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 65536.

Pattern: [_A-Za-z][_0-9A-Za-z]*

(26)

Required: Yes

openSearchServiceConfig (p. 13)

Amazon OpenSearch Service settings.

Type: OpenSearchServiceDataSourceConfig (p. 175) object Required: No

relationalDatabaseConfig (p. 13) Relational database settings.

Type: RelationalDatabaseDataSourceConfig (p. 178) object Required: No

serviceRoleArn (p. 13)

The AWS Identity and Access Management (IAM) service role Amazon Resource Name (ARN) for the data source. The system assumes this role when accessing the data source.

Type: String Required: No type (p. 13)

The type of the DataSource.

Type: String

Valid Values: AWS_LAMBDA | AMAZON_DYNAMODB | AMAZON_ELASTICSEARCH | NONE | HTTP

| RELATIONAL_DATABASE | AMAZON_OPENSEARCH_SERVICE Required: Yes

Response Syntax

HTTP/1.1 200

Content-type: application/json { "dataSource": {

"dataSourceArn": "string", "description": "string", "dynamodbConfig": { "awsRegion": "string", "deltaSyncConfig": { "baseTableTTL": number,

"deltaSyncTableName": "string", "deltaSyncTableTTL": number },

"tableName": "string",

"useCallerCredentials": boolean, "versioned": boolean

},

"elasticsearchConfig": { "awsRegion": "string", "endpoint": "string"

},

"httpConfig": {

API Version 2017-07-25 15

(27)

Response Elements

"authorizationConfig": {

"authorizationType": "string", "awsIamConfig": {

"signingRegion": "string", "signingServiceName": "string"

} },

"endpoint": "string"

},

"lambdaConfig": {

"lambdaFunctionArn": "string"

},

"name": "string",

"openSearchServiceConfig": { "awsRegion": "string", "endpoint": "string"

},

"relationalDatabaseConfig": { "rdsHttpEndpointConfig": { "awsRegion": "string",

"awsSecretStoreArn": "string", "databaseName": "string", "dbClusterIdentifier": "string", "schema": "string"

},

"relationalDatabaseSourceType": "string"

},

"serviceRoleArn": "string", "type": "string"

}}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

dataSource (p. 15)

The DataSource object.

Type: DataSource (p. 157) object

Errors

For information about the errors that are common to all actions, see Common Errors (p. 188).

BadRequestException

The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again.

HTTP Status Code: 400 ConcurrentModificationException

Another modification is in progress at this time and it must complete before you can make your change.

HTTP Status Code: 409

(28)

InternalFailureException

An internal AWS AppSync error occurred. Try your request again.

HTTP Status Code: 500 NotFoundException

The resource specified in the request was not found. Check the resource, and then try again.

HTTP Status Code: 404 UnauthorizedException

You aren't authorized to perform this operation.

HTTP Status Code: 401

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

API Version 2017-07-25 17

(29)

CreateDomainName

CreateDomainName

Creates a custom DomainName object.

Request Syntax

POST /v1/domainnames HTTP/1.1 Content-type: application/json {

"certificateArn": "string", "description": "string", "domainName": "string"

}

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

certificateArn (p. 18)

The Amazon Resource Name (ARN) of the certificate. This can be an AWS Certificate Manager (ACM) certificate or an AWS Identity and Access Management (IAM) server certificate.

Type: String

Length Constraints: Minimum length of 20. Maximum length of 2048.

Pattern: ^arn:[a-z-]*:(acm|iam):[a-z0-9-]*:\d{12}:(certificate|server- certificate)/[0-9A-Za-z_/-]*$

Required: Yes description (p. 18)

A description of the DomainName.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 255.

Pattern: ^.*$

Required: No domainName (p. 18)

The domain name.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 253.

Pattern: ^(\*[\w\d-]*\.)?([\w\d-]+\.)+[\w\d-]+$

(30)

Required: Yes

Response Syntax

HTTP/1.1 200

Content-type: application/json { "domainNameConfig": {

"appsyncDomainName": "string", "certificateArn": "string", "description": "string", "domainName": "string", "hostedZoneId": "string"

}}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

domainNameConfig (p. 19)

The configuration for the DomainName.

Type: DomainNameConfig (p. 160) object

Errors

For information about the errors that are common to all actions, see Common Errors (p. 188).

AccessDeniedException

You don't have access to perform this operation on this resource.

HTTP Status Code: 403 BadRequestException

The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again.

HTTP Status Code: 400 InternalFailureException

An internal AWS AppSync error occurred. Try your request again.

HTTP Status Code: 500

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

API Version 2017-07-25 19

(31)

See Also

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(32)

CreateFunction

Creates a Function object.

A function is a reusable entity. You can use multiple functions to compose the resolver logic.

Request Syntax

POST /v1/apis/apiId/functions HTTP/1.1 Content-type: application/json

{

"dataSourceName": "string", "description": "string", "functionVersion": "string", "maxBatchSize": number, "name": "string",

"requestMappingTemplate": "string", "responseMappingTemplate": "string", "syncConfig": {

"conflictDetection": "string", "conflictHandler": "string", "lambdaConflictHandlerConfig": { "lambdaConflictHandlerArn": "string"

} }}

URI Request Parameters

The request uses the following URI parameters.

apiId (p. 21)

The GraphQL API ID.

Required: Yes

Request Body

The request accepts the following data in JSON format.

dataSourceName (p. 21)

The Function DataSource name.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 65536.

Pattern: [_A-Za-z][_0-9A-Za-z]*

Required: Yes description (p. 21)

The Function description.

API Version 2017-07-25 21

(33)

Request Body

Type: String Required: No functionVersion (p. 21)

The version of the request mapping template. Currently, the supported value is 2018-05-29.

Type: String Required: Yes maxBatchSize (p. 21)

The maximum batching size for a resolver.

Type: Integer

Valid Range: Minimum value of 0. Maximum value of 2000.

Required: No name (p. 21)

The Function name. The function name does not have to be unique.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 65536.

Pattern: [_A-Za-z][_0-9A-Za-z]*

Required: Yes

requestMappingTemplate (p. 21)

The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 65536.

Pattern: ^.*$

Required: No

responseMappingTemplate (p. 21)

The Function response mapping template.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 65536.

Pattern: ^.*$

Required: No syncConfig (p. 21)

Describes a Sync configuration for a resolver.

Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.

(34)

Type: SyncConfig (p. 182) object Required: No

Response Syntax

HTTP/1.1 200

Content-type: application/json { "functionConfiguration": { "dataSourceName": "string", "description": "string", "functionArn": "string", "functionId": "string", "functionVersion": "string", "maxBatchSize": number, "name": "string",

"requestMappingTemplate": "string", "responseMappingTemplate": "string", "syncConfig": {

"conflictDetection": "string", "conflictHandler": "string", "lambdaConflictHandlerConfig": { "lambdaConflictHandlerArn": "string"

} } }}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

functionConfiguration (p. 23) The Function object.

Type: FunctionConfiguration (p. 164) object

Errors

For information about the errors that are common to all actions, see Common Errors (p. 188).

ConcurrentModificationException

Another modification is in progress at this time and it must complete before you can make your change.

HTTP Status Code: 409 InternalFailureException

An internal AWS AppSync error occurred. Try your request again.

HTTP Status Code: 500

API Version 2017-07-25 23

(35)

See Also

NotFoundException

The resource specified in the request was not found. Check the resource, and then try again.

HTTP Status Code: 404 UnauthorizedException

You aren't authorized to perform this operation.

HTTP Status Code: 401

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(36)

CreateGraphqlApi

Creates a GraphqlApi object.

Request Syntax

POST /v1/apis HTTP/1.1

Content-type: application/json {

"additionalAuthenticationProviders": [ {

"authenticationType": "string", "lambdaAuthorizerConfig": {

"authorizerResultTtlInSeconds": number, "authorizerUri": "string",

"identityValidationExpression": "string"

},

"openIDConnectConfig": { "authTTL": number, "clientId": "string", "iatTTL": number, "issuer": "string"

},

"userPoolConfig": {

"appIdClientRegex": "string", "awsRegion": "string", "userPoolId": "string"

} } ],

"authenticationType": "string", "lambdaAuthorizerConfig": {

"authorizerResultTtlInSeconds": number, "authorizerUri": "string",

"identityValidationExpression": "string"

},

"logConfig": {

"cloudWatchLogsRoleArn": "string", "excludeVerboseContent": boolean, "fieldLogLevel": "string"

},

"name": "string",

"openIDConnectConfig": { "authTTL": number, "clientId": "string", "iatTTL": number, "issuer": "string"

},

"tags": {

"string" : "string"

},

"userPoolConfig": {

"appIdClientRegex": "string", "awsRegion": "string", "defaultAction": "string", "userPoolId": "string"

},

"xrayEnabled": boolean }

API Version 2017-07-25 25

(37)

URI Request Parameters

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

additionalAuthenticationProviders (p. 25)

A list of additional authentication providers for the GraphqlApi API.

Type: Array of AdditionalAuthenticationProvider (p. 147) objects Required: No

authenticationType (p. 25)

The authentication type: API key, AWS Identity and Access Management (IAM), OpenID Connect (OIDC), Amazon Cognito user pools, or AWS Lambda.

Type: String

Valid Values: API_KEY | AWS_IAM | AMAZON_COGNITO_USER_POOLS | OPENID_CONNECT | AWS_LAMBDA

Required: Yes

lambdaAuthorizerConfig (p. 25)

Configuration for AWS Lambda function authorization.

Type: LambdaAuthorizerConfig (p. 170) object Required: No

logConfig (p. 25)

The Amazon CloudWatch Logs configuration.

Type: LogConfig (p. 173) object Required: No

name (p. 25)

A user-supplied name for the GraphqlApi.

Type: String Required: Yes

openIDConnectConfig (p. 25) The OIDC configuration.

Type: OpenIDConnectConfig (p. 174) object Required: No

tags (p. 25)

A TagMap object.

(38)

Type: String to string map

Map Entries: Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: ^(?!aws:)[ a-zA-Z+-=._:/]+$

Value Length Constraints: Maximum length of 256.

Value Pattern: ^[\s\w+-=\.:/@]*$

Required: No userPoolConfig (p. 25)

The Amazon Cognito user pool configuration.

Type: UserPoolConfig (p. 185) object Required: No

xrayEnabled (p. 25)

A flag indicating whether to use AWS X-Ray tracing for the GraphqlApi.

Type: Boolean Required: No

Response Syntax

HTTP/1.1 200

Content-type: application/json { "graphqlApi": {

"additionalAuthenticationProviders": [ {

"authenticationType": "string", "lambdaAuthorizerConfig": {

"authorizerResultTtlInSeconds": number, "authorizerUri": "string",

"identityValidationExpression": "string"

},

"openIDConnectConfig": { "authTTL": number, "clientId": "string", "iatTTL": number, "issuer": "string"

},

"userPoolConfig": {

"appIdClientRegex": "string", "awsRegion": "string", "userPoolId": "string"

} } ],

"apiId": "string", "arn": "string",

"authenticationType": "string", "lambdaAuthorizerConfig": {

API Version 2017-07-25 27

(39)

Response Elements

"authorizerResultTtlInSeconds": number, "authorizerUri": "string",

"identityValidationExpression": "string"

},

"logConfig": {

"cloudWatchLogsRoleArn": "string", "excludeVerboseContent": boolean, "fieldLogLevel": "string"

},

"name": "string",

"openIDConnectConfig": { "authTTL": number, "clientId": "string", "iatTTL": number, "issuer": "string"

},

"tags": {

"string" : "string"

},

"uris": {

"string" : "string"

},

"userPoolConfig": {

"appIdClientRegex": "string", "awsRegion": "string", "defaultAction": "string", "userPoolId": "string"

},

"wafWebAclArn": "string", "xrayEnabled": boolean }

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

graphqlApi (p. 27) The GraphqlApi.

Type: GraphqlApi (p. 166) object

Errors

For information about the errors that are common to all actions, see Common Errors (p. 188).

ApiLimitExceededException

The GraphQL API exceeded a limit. Try your request again.

HTTP Status Code: 400 BadRequestException

The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again.

HTTP Status Code: 400

(40)

ConcurrentModificationException

Another modification is in progress at this time and it must complete before you can make your change.

HTTP Status Code: 409 InternalFailureException

An internal AWS AppSync error occurred. Try your request again.

HTTP Status Code: 500 LimitExceededException

The request exceeded a limit. Try your request again.

HTTP Status Code: 429 UnauthorizedException

You aren't authorized to perform this operation.

HTTP Status Code: 401

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

API Version 2017-07-25 29

(41)

CreateResolver

CreateResolver

Creates a Resolver object.

A resolver converts incoming requests into a format that a data source can understand, and converts the data source's responses into GraphQL.

Request Syntax

POST /v1/apis/apiId/types/typeName/resolvers HTTP/1.1 Content-type: application/json

{ "cachingConfig": {

"cachingKeys": [ "string" ], "ttl": number

},

"dataSourceName": "string", "fieldName": "string", "kind": "string", "maxBatchSize": number, "pipelineConfig": {

"functions": [ "string" ] },

"requestMappingTemplate": "string", "responseMappingTemplate": "string", "syncConfig": {

"conflictDetection": "string", "conflictHandler": "string", "lambdaConflictHandlerConfig": { "lambdaConflictHandlerArn": "string"

} }}

URI Request Parameters

The request uses the following URI parameters.

apiId (p. 30)

The ID for the GraphQL API for which the resolver is being created.

Required: Yes typeName (p. 30)

The name of the Type.

Length Constraints: Minimum length of 1. Maximum length of 65536.

Pattern: [_A-Za-z][_0-9A-Za-z]*

Required: Yes

Request Body

The request accepts the following data in JSON format.

(42)

cachingConfig (p. 30)

The caching configuration for the resolver.

Type: CachingConfig (p. 155) object Required: No

dataSourceName (p. 30)

The name of the data source for which the resolver is being created.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 65536.

Pattern: [_A-Za-z][_0-9A-Za-z]*

Required: No fieldName (p. 30)

The name of the field to attach the resolver to.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 65536.

Pattern: [_A-Za-z][_0-9A-Za-z]*

Required: Yes kind (p. 30)

The resolver type.

UNIT: A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.

PIPELINE: A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of Function objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.

Type: String

Valid Values: UNIT | PIPELINE Required: No

maxBatchSize (p. 30)

The maximum batching size for a resolver.

Type: Integer

Valid Range: Minimum value of 0. Maximum value of 2000.

Required: No pipelineConfig (p. 30)

The PipelineConfig.

Type: PipelineConfig (p. 176) object Required: No

API Version 2017-07-25 31

(43)

Response Syntax

requestMappingTemplate (p. 30)

The mapping template to use for requests.

A resolver uses a request mapping template to convert a GraphQL expression into a format that a data source can understand. Mapping templates are written in Apache Velocity Template Language (VTL).

VTL request mapping templates are optional when using an AWS Lambda data source. For all other data sources, VTL request and response mapping templates are required.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 65536.

Pattern: ^.*$

Required: No

responseMappingTemplate (p. 30)

The mapping template to use for responses from the data source.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 65536.

Pattern: ^.*$

Required: No syncConfig (p. 30)

The SyncConfig for a resolver attached to a versioned data source.

Type: SyncConfig (p. 182) object Required: No

Response Syntax

HTTP/1.1 200

Content-type: application/json {

"resolver": {

"cachingConfig": {

"cachingKeys": [ "string" ], "ttl": number

},

"dataSourceName": "string", "fieldName": "string", "kind": "string", "maxBatchSize": number, "pipelineConfig": {

"functions": [ "string" ] },

"requestMappingTemplate": "string", "resolverArn": "string",

"responseMappingTemplate": "string", "syncConfig": {

"conflictDetection": "string",

(44)

"conflictHandler": "string", "lambdaConflictHandlerConfig": { "lambdaConflictHandlerArn": "string"

} },

"typeName": "string"

}}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

resolver (p. 32)

The Resolver object.

Type: Resolver (p. 179) object

Errors

For information about the errors that are common to all actions, see Common Errors (p. 188).

ConcurrentModificationException

Another modification is in progress at this time and it must complete before you can make your change.

HTTP Status Code: 409 InternalFailureException

An internal AWS AppSync error occurred. Try your request again.

HTTP Status Code: 500 NotFoundException

The resource specified in the request was not found. Check the resource, and then try again.

HTTP Status Code: 404 UnauthorizedException

You aren't authorized to perform this operation.

HTTP Status Code: 401

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

API Version 2017-07-25 33

(45)

See Also

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(46)

CreateType

Creates a Type object.

Request Syntax

POST /v1/apis/apiId/types HTTP/1.1 Content-type: application/json {

"definition": "string", "format": "string"

}

URI Request Parameters

The request uses the following URI parameters.

apiId (p. 35) The API ID.

Required: Yes

Request Body

The request accepts the following data in JSON format.

definition (p. 35)

The type definition, in GraphQL Schema Definition Language (SDL) format.

For more information, see the GraphQL SDL documentation.

Type: String Required: Yes format (p. 35)

The type format: SDL or JSON.

Type: String

Valid Values: SDL | JSON Required: Yes

Response Syntax

HTTP/1.1 200

Content-type: application/json { "type": {

API Version 2017-07-25 35

(47)

Response Elements

"arn": "string", "definition": "string", "description": "string", "format": "string", "name": "string"

} }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

type (p. 35)

The Type object.

Type: Type (p. 183) object

Errors

For information about the errors that are common to all actions, see Common Errors (p. 188).

BadRequestException

The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again.

HTTP Status Code: 400 ConcurrentModificationException

Another modification is in progress at this time and it must complete before you can make your change.

HTTP Status Code: 409 InternalFailureException

An internal AWS AppSync error occurred. Try your request again.

HTTP Status Code: 500 NotFoundException

The resource specified in the request was not found. Check the resource, and then try again.

HTTP Status Code: 404 UnauthorizedException

You aren't authorized to perform this operation.

HTTP Status Code: 401

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

(48)

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

API Version 2017-07-25 37

(49)

DeleteApiCache

DeleteApiCache

Deletes an ApiCache object.

Request Syntax

DELETE /v1/apis/apiId/ApiCaches HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

apiId (p. 38) The API ID.

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 188).

BadRequestException

The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again.

HTTP Status Code: 400 ConcurrentModificationException

Another modification is in progress at this time and it must complete before you can make your change.

HTTP Status Code: 409 InternalFailureException

An internal AWS AppSync error occurred. Try your request again.

HTTP Status Code: 500

(50)

NotFoundException

The resource specified in the request was not found. Check the resource, and then try again.

HTTP Status Code: 404 UnauthorizedException

You aren't authorized to perform this operation.

HTTP Status Code: 401

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

API Version 2017-07-25 39

(51)

DeleteApiKey

DeleteApiKey

Deletes an API key.

Request Syntax

DELETE /v1/apis/apiId/apikeys/id HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

apiId (p. 40) The API ID.

Required: Yes id (p. 40)

The ID for the API key.

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 188).

BadRequestException

The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again.

HTTP Status Code: 400 InternalFailureException

An internal AWS AppSync error occurred. Try your request again.

HTTP Status Code: 500

(52)

NotFoundException

The resource specified in the request was not found. Check the resource, and then try again.

HTTP Status Code: 404 UnauthorizedException

You aren't authorized to perform this operation.

HTTP Status Code: 401

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

API Version 2017-07-25 41

(53)

DeleteDataSource

DeleteDataSource

Deletes a DataSource object.

Request Syntax

DELETE /v1/apis/apiId/datasources/name HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

apiId (p. 42) The API ID.

Required: Yes name (p. 42)

The name of the data source.

Length Constraints: Minimum length of 1. Maximum length of 65536.

Pattern: [_A-Za-z][_0-9A-Za-z]*

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 188).

BadRequestException

The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again.

HTTP Status Code: 400 ConcurrentModificationException

Another modification is in progress at this time and it must complete before you can make your change.

(54)

HTTP Status Code: 409 InternalFailureException

An internal AWS AppSync error occurred. Try your request again.

HTTP Status Code: 500 NotFoundException

The resource specified in the request was not found. Check the resource, and then try again.

HTTP Status Code: 404 UnauthorizedException

You aren't authorized to perform this operation.

HTTP Status Code: 401

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

API Version 2017-07-25 43

(55)

DeleteDomainName

DeleteDomainName

Deletes a custom DomainName object.

Request Syntax

DELETE /v1/domainnames/domainName HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

domainName (p. 44) The domain name.

Length Constraints: Minimum length of 1. Maximum length of 253.

Pattern: ^(\*[\w\d-]*\.)?([\w\d-]+\.)+[\w\d-]+$

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 188).

AccessDeniedException

You don't have access to perform this operation on this resource.

HTTP Status Code: 403 BadRequestException

The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again.

HTTP Status Code: 400 ConcurrentModificationException

Another modification is in progress at this time and it must complete before you can make your change.

(56)

HTTP Status Code: 409 InternalFailureException

An internal AWS AppSync error occurred. Try your request again.

HTTP Status Code: 500 NotFoundException

The resource specified in the request was not found. Check the resource, and then try again.

HTTP Status Code: 404

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

API Version 2017-07-25 45

(57)

DeleteFunction

DeleteFunction

Deletes a Function.

Request Syntax

DELETE /v1/apis/apiId/functions/functionId HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

apiId (p. 46)

The GraphQL API ID.

Required: Yes functionId (p. 46)

The Function ID.

Length Constraints: Minimum length of 1. Maximum length of 65536.

Pattern: [_A-Za-z][_0-9A-Za-z]*

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 188).

ConcurrentModificationException

Another modification is in progress at this time and it must complete before you can make your change.

HTTP Status Code: 409 InternalFailureException

An internal AWS AppSync error occurred. Try your request again.

(58)

HTTP Status Code: 500 NotFoundException

The resource specified in the request was not found. Check the resource, and then try again.

HTTP Status Code: 404 UnauthorizedException

You aren't authorized to perform this operation.

HTTP Status Code: 401

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

API Version 2017-07-25 47

參考文獻

相關文件

•The PROC directive declares a procedure with an optional list of named parameters. an optional list of

Search the portion of List preceding TestEntry for TargetValue, and report the result of that search if (TargetValue > TestEntry):. Search the portion of List following

You need to configure DC1 to resolve any DNS requests that are not for the contoso.com zone by querying the DNS server of your Internet Service Provider (ISP). What should

We are not aware of any existing methods for identifying constant parameters or covariates in the parametric component of a semiparametric model, although there exists an

Some of the most common closed Newton-Cotes formulas with their error terms are listed in the following table... The following theorem summarizes the open Newton-Cotes

• Content demands – Awareness that in different countries the weather is different and we need to wear different clothes / also culture. impacts on the clothing

• Examples of items NOT recognised for fee calculation*: staff gathering/ welfare/ meal allowances, expenses related to event celebrations without student participation,

The research proposes a data oriented approach for choosing the type of clustering algorithms and a new cluster validity index for choosing their input parameters.. The