AppSync

Table of Contents

Client

class AppSync.Client

A low-level client representing AWS AppSync:

import boto3

client = boto3.client('appsync')

These are the available methods:

can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
create_api_key(**kwargs)

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

See also: AWS API Documentation

Request Syntax

response = client.create_api_key(
    apiId='string',
    description='string',
    expires=123
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The ID for your GraphQL API.

  • description (string) -- A description of the purpose of the API key.
  • expires (integer) -- The time from creation 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 .
Return type

dict

Returns

Response Syntax

{
    'apiKey': {
        'id': 'string',
        'description': 'string',
        'expires': 123
    }
}

Response Structure

  • (dict) --

    • apiKey (dict) --

      The API key.

      • id (string) --

        The API key ID.

      • description (string) --

        A description of the purpose of the API key.

      • expires (integer) --

        The time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the nearest hour.

create_data_source(**kwargs)

Creates a DataSource object.

See also: AWS API Documentation

Request Syntax

response = client.create_data_source(
    apiId='string',
    name='string',
    description='string',
    type='AWS_LAMBDA'|'AMAZON_DYNAMODB'|'AMAZON_ELASTICSEARCH'|'NONE'|'HTTP',
    serviceRoleArn='string',
    dynamodbConfig={
        'tableName': 'string',
        'awsRegion': 'string',
        'useCallerCredentials': True|False
    },
    lambdaConfig={
        'lambdaFunctionArn': 'string'
    },
    elasticsearchConfig={
        'endpoint': 'string',
        'awsRegion': 'string'
    },
    httpConfig={
        'endpoint': 'string'
    }
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID for the GraphQL API for the DataSource .

  • name (string) --

    [REQUIRED]

    A user-supplied name for the DataSource .

  • description (string) -- A description of the DataSource .
  • type (string) --

    [REQUIRED]

    The type of the DataSource .

  • serviceRoleArn (string) -- The IAM service role ARN for the data source. The system assumes this role when accessing the data source.
  • dynamodbConfig (dict) --

    DynamoDB settings.

    • tableName (string) -- [REQUIRED]

      The table name.

    • awsRegion (string) -- [REQUIRED]

      The AWS region.

    • useCallerCredentials (boolean) --

      Set to TRUE to use Amazon Cognito credentials with this data source.

  • lambdaConfig (dict) --

    AWS Lambda settings.

    • lambdaFunctionArn (string) -- [REQUIRED]

      The ARN for the Lambda function.

  • elasticsearchConfig (dict) --

    Amazon Elasticsearch settings.

    • endpoint (string) -- [REQUIRED]

      The endpoint.

    • awsRegion (string) -- [REQUIRED]

      The AWS region.

  • httpConfig (dict) --

    Http endpoint settings.

    • endpoint (string) --

      The Http url endpoint. You can either specify the domain name or ip and port combination and the url scheme must be http(s). If the port is not specified, AWS AppSync will use the default port 80 for http endpoint and port 443 for https endpoints.

Return type

dict

Returns

Response Syntax

{
    'dataSource': {
        'dataSourceArn': 'string',
        'name': 'string',
        'description': 'string',
        'type': 'AWS_LAMBDA'|'AMAZON_DYNAMODB'|'AMAZON_ELASTICSEARCH'|'NONE'|'HTTP',
        'serviceRoleArn': 'string',
        'dynamodbConfig': {
            'tableName': 'string',
            'awsRegion': 'string',
            'useCallerCredentials': True|False
        },
        'lambdaConfig': {
            'lambdaFunctionArn': 'string'
        },
        'elasticsearchConfig': {
            'endpoint': 'string',
            'awsRegion': 'string'
        },
        'httpConfig': {
            'endpoint': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • dataSource (dict) --

      The DataSource object.

      • dataSourceArn (string) --

        The data source ARN.

      • name (string) --

        The name of the data source.

      • description (string) --

        The description of the data source.

      • type (string) --

        The type of the data source.

        • AMAZON_DYNAMODB : The data source is an Amazon DynamoDB table.
        • AMAZON_ELASTICSEARCH : The data source is an Amazon Elasticsearch Service domain.
        • AWS_LAMBDA : The data source is an AWS Lambda function.
        • NONE : There is no data source. This type is used when when you wish to invoke a GraphQL operation without connecting to a data source, such as performing data transformation with resolvers or triggering a subscription to be invoked from a mutation.
        • HTTP : The data source is an HTTP endpoint.
      • serviceRoleArn (string) --

        The IAM service role ARN for the data source. The system assumes this role when accessing the data source.

      • dynamodbConfig (dict) --

        DynamoDB settings.

        • tableName (string) --

          The table name.

        • awsRegion (string) --

          The AWS region.

        • useCallerCredentials (boolean) --

          Set to TRUE to use Amazon Cognito credentials with this data source.

      • lambdaConfig (dict) --

        Lambda settings.

        • lambdaFunctionArn (string) --

          The ARN for the Lambda function.

      • elasticsearchConfig (dict) --

        Amazon Elasticsearch settings.

        • endpoint (string) --

          The endpoint.

        • awsRegion (string) --

          The AWS region.

      • httpConfig (dict) --

        Http endpoint settings.

        • endpoint (string) --

          The Http url endpoint. You can either specify the domain name or ip and port combination and the url scheme must be http(s). If the port is not specified, AWS AppSync will use the default port 80 for http endpoint and port 443 for https endpoints.

create_graphql_api(**kwargs)

Creates a GraphqlApi object.

See also: AWS API Documentation

Request Syntax

response = client.create_graphql_api(
    name='string',
    logConfig={
        'fieldLogLevel': 'NONE'|'ERROR'|'ALL',
        'cloudWatchLogsRoleArn': 'string'
    },
    authenticationType='API_KEY'|'AWS_IAM'|'AMAZON_COGNITO_USER_POOLS'|'OPENID_CONNECT',
    userPoolConfig={
        'userPoolId': 'string',
        'awsRegion': 'string',
        'defaultAction': 'ALLOW'|'DENY',
        'appIdClientRegex': 'string'
    },
    openIDConnectConfig={
        'issuer': 'string',
        'clientId': 'string',
        'iatTTL': 123,
        'authTTL': 123
    }
)
Parameters
  • name (string) --

    [REQUIRED]

    A user-supplied name for the GraphqlApi .

  • logConfig (dict) --

    The Amazon CloudWatch logs configuration.

    • fieldLogLevel (string) -- [REQUIRED]

      The field logging level. Values can be NONE, ERROR, ALL.

      • NONE : No field-level logs are captured.
      • ERROR : Logs the following information only for the fields that are in error:
        • The error section in the server response.
        • Field-level errors.
        • The generated request/response functions that got resolved for error fields.
      • ALL : The following information is logged for all fields in the query:
        • Field-level tracing information.
        • The generated request/response functions that got resolved for each field.
    • cloudWatchLogsRoleArn (string) -- [REQUIRED]

      The service role that AWS AppSync will assume to publish to Amazon CloudWatch logs in your account.

  • authenticationType (string) --

    [REQUIRED]

    The authentication type: API key, IAM, or Amazon Cognito User Pools.

  • userPoolConfig (dict) --

    The Amazon Cognito User Pool configuration.

    • userPoolId (string) -- [REQUIRED]

      The user pool ID.

    • awsRegion (string) -- [REQUIRED]

      The AWS region in which the user pool was created.

    • defaultAction (string) -- [REQUIRED]

      The action that you want your GraphQL API to take when a request that uses Amazon Cognito User Pool authentication doesn't match the Amazon Cognito User Pool configuration.

    • appIdClientRegex (string) --

      A regular expression for validating the incoming Amazon Cognito User Pool app client ID.

  • openIDConnectConfig (dict) --

    The Open Id Connect configuration configuration.

    • issuer (string) -- [REQUIRED]

      The issuer for the open id connect configuration. The issuer returned by discovery MUST exactly match the value of iss in the ID Token.

    • clientId (string) --

      The client identifier of the Relying party at the OpenID Provider. This identifier is typically obtained when the Relying party is registered with the OpenID Provider. You can specify a regular expression so the AWS AppSync can validate against multiple client identifiers at a time

    • iatTTL (integer) --

      The number of milliseconds a token is valid after being issued to a user.

    • authTTL (integer) --

      The number of milliseconds a token is valid after being authenticated.

Return type

dict

Returns

Response Syntax

{
    'graphqlApi': {
        'name': 'string',
        'apiId': 'string',
        'authenticationType': 'API_KEY'|'AWS_IAM'|'AMAZON_COGNITO_USER_POOLS'|'OPENID_CONNECT',
        'logConfig': {
            'fieldLogLevel': 'NONE'|'ERROR'|'ALL',
            'cloudWatchLogsRoleArn': 'string'
        },
        'userPoolConfig': {
            'userPoolId': 'string',
            'awsRegion': 'string',
            'defaultAction': 'ALLOW'|'DENY',
            'appIdClientRegex': 'string'
        },
        'openIDConnectConfig': {
            'issuer': 'string',
            'clientId': 'string',
            'iatTTL': 123,
            'authTTL': 123
        },
        'arn': 'string',
        'uris': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • graphqlApi (dict) --

      The GraphqlApi .

      • name (string) --

        The API name.

      • apiId (string) --

        The API ID.

      • authenticationType (string) --

        The authentication type.

      • logConfig (dict) --

        The Amazon CloudWatch Logs configuration.

        • fieldLogLevel (string) --

          The field logging level. Values can be NONE, ERROR, ALL.

          • NONE : No field-level logs are captured.
          • ERROR : Logs the following information only for the fields that are in error:
            • The error section in the server response.
            • Field-level errors.
            • The generated request/response functions that got resolved for error fields.
          • ALL : The following information is logged for all fields in the query:
            • Field-level tracing information.
            • The generated request/response functions that got resolved for each field.
        • cloudWatchLogsRoleArn (string) --

          The service role that AWS AppSync will assume to publish to Amazon CloudWatch logs in your account.

      • userPoolConfig (dict) --

        The Amazon Cognito User Pool configuration.

        • userPoolId (string) --

          The user pool ID.

        • awsRegion (string) --

          The AWS region in which the user pool was created.

        • defaultAction (string) --

          The action that you want your GraphQL API to take when a request that uses Amazon Cognito User Pool authentication doesn't match the Amazon Cognito User Pool configuration.

        • appIdClientRegex (string) --

          A regular expression for validating the incoming Amazon Cognito User Pool app client ID.

      • openIDConnectConfig (dict) --

        The Open Id Connect configuration.

        • issuer (string) --

          The issuer for the open id connect configuration. The issuer returned by discovery MUST exactly match the value of iss in the ID Token.

        • clientId (string) --

          The client identifier of the Relying party at the OpenID Provider. This identifier is typically obtained when the Relying party is registered with the OpenID Provider. You can specify a regular expression so the AWS AppSync can validate against multiple client identifiers at a time

        • iatTTL (integer) --

          The number of milliseconds a token is valid after being issued to a user.

        • authTTL (integer) --

          The number of milliseconds a token is valid after being authenticated.

      • arn (string) --

        The ARN.

      • uris (dict) --

        The URIs.

        • (string) --
          • (string) --

create_resolver(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.create_resolver(
    apiId='string',
    typeName='string',
    fieldName='string',
    dataSourceName='string',
    requestMappingTemplate='string',
    responseMappingTemplate='string'
)
Parameters
  • apiId (string) --

    [REQUIRED]

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

  • typeName (string) --

    [REQUIRED]

    The name of the Type .

  • fieldName (string) --

    [REQUIRED]

    The name of the field to attach the resolver to.

  • dataSourceName (string) --

    [REQUIRED]

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

  • requestMappingTemplate (string) --

    [REQUIRED]

    The mapping template to be used 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).

  • responseMappingTemplate (string) -- The mapping template to be used for responses from the data source.
Return type

dict

Returns

Response Syntax

{
    'resolver': {
        'typeName': 'string',
        'fieldName': 'string',
        'dataSourceName': 'string',
        'resolverArn': 'string',
        'requestMappingTemplate': 'string',
        'responseMappingTemplate': 'string'
    }
}

Response Structure

  • (dict) --

    • resolver (dict) --

      The Resolver object.

      • typeName (string) --

        The resolver type name.

      • fieldName (string) --

        The resolver field name.

      • dataSourceName (string) --

        The resolver data source name.

      • resolverArn (string) --

        The resolver ARN.

      • requestMappingTemplate (string) --

        The request mapping template.

      • responseMappingTemplate (string) --

        The response mapping template.

create_type(**kwargs)

Creates a Type object.

See also: AWS API Documentation

Request Syntax

response = client.create_type(
    apiId='string',
    definition='string',
    format='SDL'|'JSON'
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • definition (string) --

    [REQUIRED]

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

    For more information, see the GraphQL SDL documentation .

  • format (string) --

    [REQUIRED]

    The type format: SDL or JSON.

Return type

dict

Returns

Response Syntax

{
    'type': {
        'name': 'string',
        'description': 'string',
        'arn': 'string',
        'definition': 'string',
        'format': 'SDL'|'JSON'
    }
}

Response Structure

  • (dict) --

    • type (dict) --

      The Type object.

      • name (string) --

        The type name.

      • description (string) --

        The type description.

      • arn (string) --

        The type ARN.

      • definition (string) --

        The type definition.

      • format (string) --

        The type format: SDL or JSON.

delete_api_key(**kwargs)

Deletes an API key.

See also: AWS API Documentation

Request Syntax

response = client.delete_api_key(
    apiId='string',
    id='string'
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • id (string) --

    [REQUIRED]

    The ID for the API key.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

delete_data_source(**kwargs)

Deletes a DataSource object.

See also: AWS API Documentation

Request Syntax

response = client.delete_data_source(
    apiId='string',
    name='string'
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • name (string) --

    [REQUIRED]

    The name of the data source.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

delete_graphql_api(**kwargs)

Deletes a GraphqlApi object.

See also: AWS API Documentation

Request Syntax

response = client.delete_graphql_api(
    apiId='string'
)
Parameters
apiId (string) --

[REQUIRED]

The API ID.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --
delete_resolver(**kwargs)

Deletes a Resolver object.

See also: AWS API Documentation

Request Syntax

response = client.delete_resolver(
    apiId='string',
    typeName='string',
    fieldName='string'
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • typeName (string) --

    [REQUIRED]

    The name of the resolver type.

  • fieldName (string) --

    [REQUIRED]

    The resolver field name.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

delete_type(**kwargs)

Deletes a Type object.

See also: AWS API Documentation

Request Syntax

response = client.delete_type(
    apiId='string',
    typeName='string'
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • typeName (string) --

    [REQUIRED]

    The type name.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)

Generate a presigned url given a client, its method, and arguments

Parameters
  • ClientMethod (string) -- The client method to presign for
  • Params (dict) -- The parameters normally passed to ClientMethod.
  • ExpiresIn (int) -- The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds)
  • HttpMethod (string) -- The http method to use on the generated url. By default, the http method is whatever is used in the method's model.
Returns

The presigned url

get_data_source(**kwargs)

Retrieves a DataSource object.

See also: AWS API Documentation

Request Syntax

response = client.get_data_source(
    apiId='string',
    name='string'
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • name (string) --

    [REQUIRED]

    The name of the data source.

Return type

dict

Returns

Response Syntax

{
    'dataSource': {
        'dataSourceArn': 'string',
        'name': 'string',
        'description': 'string',
        'type': 'AWS_LAMBDA'|'AMAZON_DYNAMODB'|'AMAZON_ELASTICSEARCH'|'NONE'|'HTTP',
        'serviceRoleArn': 'string',
        'dynamodbConfig': {
            'tableName': 'string',
            'awsRegion': 'string',
            'useCallerCredentials': True|False
        },
        'lambdaConfig': {
            'lambdaFunctionArn': 'string'
        },
        'elasticsearchConfig': {
            'endpoint': 'string',
            'awsRegion': 'string'
        },
        'httpConfig': {
            'endpoint': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • dataSource (dict) --

      The DataSource object.

      • dataSourceArn (string) --

        The data source ARN.

      • name (string) --

        The name of the data source.

      • description (string) --

        The description of the data source.

      • type (string) --

        The type of the data source.

        • AMAZON_DYNAMODB : The data source is an Amazon DynamoDB table.
        • AMAZON_ELASTICSEARCH : The data source is an Amazon Elasticsearch Service domain.
        • AWS_LAMBDA : The data source is an AWS Lambda function.
        • NONE : There is no data source. This type is used when when you wish to invoke a GraphQL operation without connecting to a data source, such as performing data transformation with resolvers or triggering a subscription to be invoked from a mutation.
        • HTTP : The data source is an HTTP endpoint.
      • serviceRoleArn (string) --

        The IAM service role ARN for the data source. The system assumes this role when accessing the data source.

      • dynamodbConfig (dict) --

        DynamoDB settings.

        • tableName (string) --

          The table name.

        • awsRegion (string) --

          The AWS region.

        • useCallerCredentials (boolean) --

          Set to TRUE to use Amazon Cognito credentials with this data source.

      • lambdaConfig (dict) --

        Lambda settings.

        • lambdaFunctionArn (string) --

          The ARN for the Lambda function.

      • elasticsearchConfig (dict) --

        Amazon Elasticsearch settings.

        • endpoint (string) --

          The endpoint.

        • awsRegion (string) --

          The AWS region.

      • httpConfig (dict) --

        Http endpoint settings.

        • endpoint (string) --

          The Http url endpoint. You can either specify the domain name or ip and port combination and the url scheme must be http(s). If the port is not specified, AWS AppSync will use the default port 80 for http endpoint and port 443 for https endpoints.

get_graphql_api(**kwargs)

Retrieves a GraphqlApi object.

See also: AWS API Documentation

Request Syntax

response = client.get_graphql_api(
    apiId='string'
)
Parameters
apiId (string) --

[REQUIRED]

The API ID for the GraphQL API.

Return type
dict
Returns
Response Syntax
{
    'graphqlApi': {
        'name': 'string',
        'apiId': 'string',
        'authenticationType': 'API_KEY'|'AWS_IAM'|'AMAZON_COGNITO_USER_POOLS'|'OPENID_CONNECT',
        'logConfig': {
            'fieldLogLevel': 'NONE'|'ERROR'|'ALL',
            'cloudWatchLogsRoleArn': 'string'
        },
        'userPoolConfig': {
            'userPoolId': 'string',
            'awsRegion': 'string',
            'defaultAction': 'ALLOW'|'DENY',
            'appIdClientRegex': 'string'
        },
        'openIDConnectConfig': {
            'issuer': 'string',
            'clientId': 'string',
            'iatTTL': 123,
            'authTTL': 123
        },
        'arn': 'string',
        'uris': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --
    • graphqlApi (dict) --

      The GraphqlApi object.

      • name (string) --

        The API name.

      • apiId (string) --

        The API ID.

      • authenticationType (string) --

        The authentication type.

      • logConfig (dict) --

        The Amazon CloudWatch Logs configuration.

        • fieldLogLevel (string) --

          The field logging level. Values can be NONE, ERROR, ALL.

          • NONE : No field-level logs are captured.
          • ERROR : Logs the following information only for the fields that are in error:
            • The error section in the server response.
            • Field-level errors.
            • The generated request/response functions that got resolved for error fields.
          • ALL : The following information is logged for all fields in the query:
            • Field-level tracing information.
            • The generated request/response functions that got resolved for each field.
        • cloudWatchLogsRoleArn (string) --

          The service role that AWS AppSync will assume to publish to Amazon CloudWatch logs in your account.

      • userPoolConfig (dict) --

        The Amazon Cognito User Pool configuration.

        • userPoolId (string) --

          The user pool ID.

        • awsRegion (string) --

          The AWS region in which the user pool was created.

        • defaultAction (string) --

          The action that you want your GraphQL API to take when a request that uses Amazon Cognito User Pool authentication doesn't match the Amazon Cognito User Pool configuration.

        • appIdClientRegex (string) --

          A regular expression for validating the incoming Amazon Cognito User Pool app client ID.

      • openIDConnectConfig (dict) --

        The Open Id Connect configuration.

        • issuer (string) --

          The issuer for the open id connect configuration. The issuer returned by discovery MUST exactly match the value of iss in the ID Token.

        • clientId (string) --

          The client identifier of the Relying party at the OpenID Provider. This identifier is typically obtained when the Relying party is registered with the OpenID Provider. You can specify a regular expression so the AWS AppSync can validate against multiple client identifiers at a time

        • iatTTL (integer) --

          The number of milliseconds a token is valid after being issued to a user.

        • authTTL (integer) --

          The number of milliseconds a token is valid after being authenticated.

      • arn (string) --

        The ARN.

      • uris (dict) --

        The URIs.

        • (string) --
          • (string) --
get_introspection_schema(**kwargs)

Retrieves the introspection schema for a GraphQL API.

See also: AWS API Documentation

Request Syntax

response = client.get_introspection_schema(
    apiId='string',
    format='SDL'|'JSON'
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • format (string) --

    [REQUIRED]

    The schema format: SDL or JSON.

Return type

dict

Returns

Response Syntax

{
    'schema': StreamingBody()
}

Response Structure

  • (dict) --

    • schema (StreamingBody) --

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

      For more information, see the GraphQL SDL documentation .

get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_resolver(**kwargs)

Retrieves a Resolver object.

See also: AWS API Documentation

Request Syntax

response = client.get_resolver(
    apiId='string',
    typeName='string',
    fieldName='string'
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • typeName (string) --

    [REQUIRED]

    The resolver type name.

  • fieldName (string) --

    [REQUIRED]

    The resolver field name.

Return type

dict

Returns

Response Syntax

{
    'resolver': {
        'typeName': 'string',
        'fieldName': 'string',
        'dataSourceName': 'string',
        'resolverArn': 'string',
        'requestMappingTemplate': 'string',
        'responseMappingTemplate': 'string'
    }
}

Response Structure

  • (dict) --

    • resolver (dict) --

      The Resolver object.

      • typeName (string) --

        The resolver type name.

      • fieldName (string) --

        The resolver field name.

      • dataSourceName (string) --

        The resolver data source name.

      • resolverArn (string) --

        The resolver ARN.

      • requestMappingTemplate (string) --

        The request mapping template.

      • responseMappingTemplate (string) --

        The response mapping template.

get_schema_creation_status(**kwargs)

Retrieves the current status of a schema creation operation.

See also: AWS API Documentation

Request Syntax

response = client.get_schema_creation_status(
    apiId='string'
)
Parameters
apiId (string) --

[REQUIRED]

The API ID.

Return type
dict
Returns
Response Syntax
{
    'status': 'PROCESSING'|'ACTIVE'|'DELETING',
    'details': 'string'
}

Response Structure

  • (dict) --
    • status (string) --

      The current state of the schema (PROCESSING, ACTIVE, or DELETING). Once the schema is in the ACTIVE state, you can add data.

    • details (string) --

      Detailed information about the status of the schema creation operation.

get_type(**kwargs)

Retrieves a Type object.

See also: AWS API Documentation

Request Syntax

response = client.get_type(
    apiId='string',
    typeName='string',
    format='SDL'|'JSON'
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • typeName (string) --

    [REQUIRED]

    The type name.

  • format (string) --

    [REQUIRED]

    The type format: SDL or JSON.

Return type

dict

Returns

Response Syntax

{
    'type': {
        'name': 'string',
        'description': 'string',
        'arn': 'string',
        'definition': 'string',
        'format': 'SDL'|'JSON'
    }
}

Response Structure

  • (dict) --

    • type (dict) --

      The Type object.

      • name (string) --

        The type name.

      • description (string) --

        The type description.

      • arn (string) --

        The type ARN.

      • definition (string) --

        The type definition.

      • format (string) --

        The type format: SDL or JSON.

get_waiter(waiter_name)

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
botocore.waiter.Waiter
list_api_keys(**kwargs)

Lists the API keys for a given API.

Note

API keys are deleted automatically sometime after they expire. However, they may still be included in the response until they have actually been deleted. You can safely call DeleteApiKey to manually delete a key before it's automatically deleted.

See also: AWS API Documentation

Request Syntax

response = client.list_api_keys(
    apiId='string',
    nextToken='string',
    maxResults=123
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • nextToken (string) -- An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.
  • maxResults (integer) -- The maximum number of results you want the request to return.
Return type

dict

Returns

Response Syntax

{
    'apiKeys': [
        {
            'id': 'string',
            'description': 'string',
            'expires': 123
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • apiKeys (list) --

      The ApiKey objects.

      • (dict) --

        Describes an API key.

        Customers invoke AWS AppSync GraphQL APIs with API keys as an identity mechanism. There are two key versions:

        da1 : This version was introduced at launch in November 2017. These keys always expire after 7 days. Key expiration is managed by DynamoDB TTL. The keys will cease to be valid after Feb 21, 2018 and should not be used after that date.

        • ListApiKeys returns the expiration time in milliseconds.
        • CreateApiKey returns the expiration time in milliseconds.
        • UpdateApiKey is not available for this key version.
        • DeleteApiKey deletes the item from the table.
        • Expiration is stored in DynamoDB as milliseconds. This results in a bug where keys are not automatically deleted because DynamoDB expects the TTL to be stored in seconds. As a one-time action, we will delete these keys from the table after Feb 21, 2018.

        da2 : This version was introduced in February 2018 when AppSync added support to extend key expiration.

        • ListApiKeys returns the expiration time in seconds.
        • CreateApiKey returns the expiration time in seconds and accepts a user-provided expiration time in seconds.
        • UpdateApiKey returns the expiration time in seconds and accepts a user-provided expiration time in seconds. Key expiration can only be updated while the key has not expired.
        • DeleteApiKey deletes the item from the table.
        • Expiration is stored in DynamoDB as seconds.
        • id (string) --

          The API key ID.

        • description (string) --

          A description of the purpose of the API key.

        • expires (integer) --

          The time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the nearest hour.

    • nextToken (string) --

      An identifier to be passed in the next request to this operation to return the next set of items in the list.

list_data_sources(**kwargs)

Lists the data sources for a given API.

See also: AWS API Documentation

Request Syntax

response = client.list_data_sources(
    apiId='string',
    nextToken='string',
    maxResults=123
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • nextToken (string) -- An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.
  • maxResults (integer) -- The maximum number of results you want the request to return.
Return type

dict

Returns

Response Syntax

{
    'dataSources': [
        {
            'dataSourceArn': 'string',
            'name': 'string',
            'description': 'string',
            'type': 'AWS_LAMBDA'|'AMAZON_DYNAMODB'|'AMAZON_ELASTICSEARCH'|'NONE'|'HTTP',
            'serviceRoleArn': 'string',
            'dynamodbConfig': {
                'tableName': 'string',
                'awsRegion': 'string',
                'useCallerCredentials': True|False
            },
            'lambdaConfig': {
                'lambdaFunctionArn': 'string'
            },
            'elasticsearchConfig': {
                'endpoint': 'string',
                'awsRegion': 'string'
            },
            'httpConfig': {
                'endpoint': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • dataSources (list) --

      The DataSource objects.

      • (dict) --

        Describes a data source.

        • dataSourceArn (string) --

          The data source ARN.

        • name (string) --

          The name of the data source.

        • description (string) --

          The description of the data source.

        • type (string) --

          The type of the data source.

          • AMAZON_DYNAMODB : The data source is an Amazon DynamoDB table.
          • AMAZON_ELASTICSEARCH : The data source is an Amazon Elasticsearch Service domain.
          • AWS_LAMBDA : The data source is an AWS Lambda function.
          • NONE : There is no data source. This type is used when when you wish to invoke a GraphQL operation without connecting to a data source, such as performing data transformation with resolvers or triggering a subscription to be invoked from a mutation.
          • HTTP : The data source is an HTTP endpoint.
        • serviceRoleArn (string) --

          The IAM service role ARN for the data source. The system assumes this role when accessing the data source.

        • dynamodbConfig (dict) --

          DynamoDB settings.

          • tableName (string) --

            The table name.

          • awsRegion (string) --

            The AWS region.

          • useCallerCredentials (boolean) --

            Set to TRUE to use Amazon Cognito credentials with this data source.

        • lambdaConfig (dict) --

          Lambda settings.

          • lambdaFunctionArn (string) --

            The ARN for the Lambda function.

        • elasticsearchConfig (dict) --

          Amazon Elasticsearch settings.

          • endpoint (string) --

            The endpoint.

          • awsRegion (string) --

            The AWS region.

        • httpConfig (dict) --

          Http endpoint settings.

          • endpoint (string) --

            The Http url endpoint. You can either specify the domain name or ip and port combination and the url scheme must be http(s). If the port is not specified, AWS AppSync will use the default port 80 for http endpoint and port 443 for https endpoints.

    • nextToken (string) --

      An identifier to be passed in the next request to this operation to return the next set of items in the list.

list_graphql_apis(**kwargs)

Lists your GraphQL APIs.

See also: AWS API Documentation

Request Syntax

response = client.list_graphql_apis(
    nextToken='string',
    maxResults=123
)
Parameters
  • nextToken (string) -- An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.
  • maxResults (integer) -- The maximum number of results you want the request to return.
Return type

dict

Returns

Response Syntax

{
    'graphqlApis': [
        {
            'name': 'string',
            'apiId': 'string',
            'authenticationType': 'API_KEY'|'AWS_IAM'|'AMAZON_COGNITO_USER_POOLS'|'OPENID_CONNECT',
            'logConfig': {
                'fieldLogLevel': 'NONE'|'ERROR'|'ALL',
                'cloudWatchLogsRoleArn': 'string'
            },
            'userPoolConfig': {
                'userPoolId': 'string',
                'awsRegion': 'string',
                'defaultAction': 'ALLOW'|'DENY',
                'appIdClientRegex': 'string'
            },
            'openIDConnectConfig': {
                'issuer': 'string',
                'clientId': 'string',
                'iatTTL': 123,
                'authTTL': 123
            },
            'arn': 'string',
            'uris': {
                'string': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • graphqlApis (list) --

      The GraphqlApi objects.

      • (dict) --

        Describes a GraphQL API.

        • name (string) --

          The API name.

        • apiId (string) --

          The API ID.

        • authenticationType (string) --

          The authentication type.

        • logConfig (dict) --

          The Amazon CloudWatch Logs configuration.

          • fieldLogLevel (string) --

            The field logging level. Values can be NONE, ERROR, ALL.

            • NONE : No field-level logs are captured.
            • ERROR : Logs the following information only for the fields that are in error:
              • The error section in the server response.
              • Field-level errors.
              • The generated request/response functions that got resolved for error fields.
            • ALL : The following information is logged for all fields in the query:
              • Field-level tracing information.
              • The generated request/response functions that got resolved for each field.
          • cloudWatchLogsRoleArn (string) --

            The service role that AWS AppSync will assume to publish to Amazon CloudWatch logs in your account.

        • userPoolConfig (dict) --

          The Amazon Cognito User Pool configuration.

          • userPoolId (string) --

            The user pool ID.

          • awsRegion (string) --

            The AWS region in which the user pool was created.

          • defaultAction (string) --

            The action that you want your GraphQL API to take when a request that uses Amazon Cognito User Pool authentication doesn't match the Amazon Cognito User Pool configuration.

          • appIdClientRegex (string) --

            A regular expression for validating the incoming Amazon Cognito User Pool app client ID.

        • openIDConnectConfig (dict) --

          The Open Id Connect configuration.

          • issuer (string) --

            The issuer for the open id connect configuration. The issuer returned by discovery MUST exactly match the value of iss in the ID Token.

          • clientId (string) --

            The client identifier of the Relying party at the OpenID Provider. This identifier is typically obtained when the Relying party is registered with the OpenID Provider. You can specify a regular expression so the AWS AppSync can validate against multiple client identifiers at a time

          • iatTTL (integer) --

            The number of milliseconds a token is valid after being issued to a user.

          • authTTL (integer) --

            The number of milliseconds a token is valid after being authenticated.

        • arn (string) --

          The ARN.

        • uris (dict) --

          The URIs.

          • (string) --
            • (string) --
    • nextToken (string) --

      An identifier to be passed in the next request to this operation to return the next set of items in the list.

list_resolvers(**kwargs)

Lists the resolvers for a given API and type.

See also: AWS API Documentation

Request Syntax

response = client.list_resolvers(
    apiId='string',
    typeName='string',
    nextToken='string',
    maxResults=123
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • typeName (string) --

    [REQUIRED]

    The type name.

  • nextToken (string) -- An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.
  • maxResults (integer) -- The maximum number of results you want the request to return.
Return type

dict

Returns

Response Syntax

{
    'resolvers': [
        {
            'typeName': 'string',
            'fieldName': 'string',
            'dataSourceName': 'string',
            'resolverArn': 'string',
            'requestMappingTemplate': 'string',
            'responseMappingTemplate': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • resolvers (list) --

      The Resolver objects.

      • (dict) --

        Describes a resolver.

        • typeName (string) --

          The resolver type name.

        • fieldName (string) --

          The resolver field name.

        • dataSourceName (string) --

          The resolver data source name.

        • resolverArn (string) --

          The resolver ARN.

        • requestMappingTemplate (string) --

          The request mapping template.

        • responseMappingTemplate (string) --

          The response mapping template.

    • nextToken (string) --

      An identifier to be passed in the next request to this operation to return the next set of items in the list.

list_types(**kwargs)

Lists the types for a given API.

See also: AWS API Documentation

Request Syntax

response = client.list_types(
    apiId='string',
    format='SDL'|'JSON',
    nextToken='string',
    maxResults=123
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • format (string) --

    [REQUIRED]

    The type format: SDL or JSON.

  • nextToken (string) -- An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.
  • maxResults (integer) -- The maximum number of results you want the request to return.
Return type

dict

Returns

Response Syntax

{
    'types': [
        {
            'name': 'string',
            'description': 'string',
            'arn': 'string',
            'definition': 'string',
            'format': 'SDL'|'JSON'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • types (list) --

      The Type objects.

      • (dict) --

        Describes a type.

        • name (string) --

          The type name.

        • description (string) --

          The type description.

        • arn (string) --

          The type ARN.

        • definition (string) --

          The type definition.

        • format (string) --

          The type format: SDL or JSON.

    • nextToken (string) --

      An identifier to be passed in the next request to this operation to return the next set of items in the list.

start_schema_creation(**kwargs)

Adds a new schema to your GraphQL API.

This operation is asynchronous. Use to determine when it has completed.

See also: AWS API Documentation

Request Syntax

response = client.start_schema_creation(
    apiId='string',
    definition=b'bytes'
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • definition (bytes) --

    [REQUIRED]

    The schema definition, in GraphQL schema language format.

Return type

dict

Returns

Response Syntax

{
    'status': 'PROCESSING'|'ACTIVE'|'DELETING'
}

Response Structure

  • (dict) --

    • status (string) --

      The current state of the schema (PROCESSING, ACTIVE, or DELETING). Once the schema is in the ACTIVE state, you can add data.

update_api_key(**kwargs)

Updates an API key.

See also: AWS API Documentation

Request Syntax

response = client.update_api_key(
    apiId='string',
    id='string',
    description='string',
    expires=123
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The ID for the GraphQL API

  • id (string) --

    [REQUIRED]

    The API key ID.

  • description (string) -- A description of the purpose of the API key.
  • expires (integer) -- The time from update time after which the API key expires. The date is represented as seconds since the epoch. For more information, see .
Return type

dict

Returns

Response Syntax

{
    'apiKey': {
        'id': 'string',
        'description': 'string',
        'expires': 123
    }
}

Response Structure

  • (dict) --

    • apiKey (dict) --

      The API key.

      • id (string) --

        The API key ID.

      • description (string) --

        A description of the purpose of the API key.

      • expires (integer) --

        The time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the nearest hour.

update_data_source(**kwargs)

Updates a DataSource object.

See also: AWS API Documentation

Request Syntax

response = client.update_data_source(
    apiId='string',
    name='string',
    description='string',
    type='AWS_LAMBDA'|'AMAZON_DYNAMODB'|'AMAZON_ELASTICSEARCH'|'NONE'|'HTTP',
    serviceRoleArn='string',
    dynamodbConfig={
        'tableName': 'string',
        'awsRegion': 'string',
        'useCallerCredentials': True|False
    },
    lambdaConfig={
        'lambdaFunctionArn': 'string'
    },
    elasticsearchConfig={
        'endpoint': 'string',
        'awsRegion': 'string'
    },
    httpConfig={
        'endpoint': 'string'
    }
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • name (string) --

    [REQUIRED]

    The new name for the data source.

  • description (string) -- The new description for the data source.
  • type (string) --

    [REQUIRED]

    The new data source type.

  • serviceRoleArn (string) -- The new service role ARN for the data source.
  • dynamodbConfig (dict) --

    The new DynamoDB configuration.

    • tableName (string) -- [REQUIRED]

      The table name.

    • awsRegion (string) -- [REQUIRED]

      The AWS region.

    • useCallerCredentials (boolean) --

      Set to TRUE to use Amazon Cognito credentials with this data source.

  • lambdaConfig (dict) --

    The new Lambda configuration.

    • lambdaFunctionArn (string) -- [REQUIRED]

      The ARN for the Lambda function.

  • elasticsearchConfig (dict) --

    The new Elasticsearch configuration.

    • endpoint (string) -- [REQUIRED]

      The endpoint.

    • awsRegion (string) -- [REQUIRED]

      The AWS region.

  • httpConfig (dict) --

    The new http endpoint configuration

    • endpoint (string) --

      The Http url endpoint. You can either specify the domain name or ip and port combination and the url scheme must be http(s). If the port is not specified, AWS AppSync will use the default port 80 for http endpoint and port 443 for https endpoints.

Return type

dict

Returns

Response Syntax

{
    'dataSource': {
        'dataSourceArn': 'string',
        'name': 'string',
        'description': 'string',
        'type': 'AWS_LAMBDA'|'AMAZON_DYNAMODB'|'AMAZON_ELASTICSEARCH'|'NONE'|'HTTP',
        'serviceRoleArn': 'string',
        'dynamodbConfig': {
            'tableName': 'string',
            'awsRegion': 'string',
            'useCallerCredentials': True|False
        },
        'lambdaConfig': {
            'lambdaFunctionArn': 'string'
        },
        'elasticsearchConfig': {
            'endpoint': 'string',
            'awsRegion': 'string'
        },
        'httpConfig': {
            'endpoint': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • dataSource (dict) --

      The updated DataSource object.

      • dataSourceArn (string) --

        The data source ARN.

      • name (string) --

        The name of the data source.

      • description (string) --

        The description of the data source.

      • type (string) --

        The type of the data source.

        • AMAZON_DYNAMODB : The data source is an Amazon DynamoDB table.
        • AMAZON_ELASTICSEARCH : The data source is an Amazon Elasticsearch Service domain.
        • AWS_LAMBDA : The data source is an AWS Lambda function.
        • NONE : There is no data source. This type is used when when you wish to invoke a GraphQL operation without connecting to a data source, such as performing data transformation with resolvers or triggering a subscription to be invoked from a mutation.
        • HTTP : The data source is an HTTP endpoint.
      • serviceRoleArn (string) --

        The IAM service role ARN for the data source. The system assumes this role when accessing the data source.

      • dynamodbConfig (dict) --

        DynamoDB settings.

        • tableName (string) --

          The table name.

        • awsRegion (string) --

          The AWS region.

        • useCallerCredentials (boolean) --

          Set to TRUE to use Amazon Cognito credentials with this data source.

      • lambdaConfig (dict) --

        Lambda settings.

        • lambdaFunctionArn (string) --

          The ARN for the Lambda function.

      • elasticsearchConfig (dict) --

        Amazon Elasticsearch settings.

        • endpoint (string) --

          The endpoint.

        • awsRegion (string) --

          The AWS region.

      • httpConfig (dict) --

        Http endpoint settings.

        • endpoint (string) --

          The Http url endpoint. You can either specify the domain name or ip and port combination and the url scheme must be http(s). If the port is not specified, AWS AppSync will use the default port 80 for http endpoint and port 443 for https endpoints.

update_graphql_api(**kwargs)

Updates a GraphqlApi object.

See also: AWS API Documentation

Request Syntax

response = client.update_graphql_api(
    apiId='string',
    name='string',
    logConfig={
        'fieldLogLevel': 'NONE'|'ERROR'|'ALL',
        'cloudWatchLogsRoleArn': 'string'
    },
    authenticationType='API_KEY'|'AWS_IAM'|'AMAZON_COGNITO_USER_POOLS'|'OPENID_CONNECT',
    userPoolConfig={
        'userPoolId': 'string',
        'awsRegion': 'string',
        'defaultAction': 'ALLOW'|'DENY',
        'appIdClientRegex': 'string'
    },
    openIDConnectConfig={
        'issuer': 'string',
        'clientId': 'string',
        'iatTTL': 123,
        'authTTL': 123
    }
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • name (string) --

    [REQUIRED]

    The new name for the GraphqlApi object.

  • logConfig (dict) --

    The Amazon CloudWatch logs configuration for the GraphqlApi object.

    • fieldLogLevel (string) -- [REQUIRED]

      The field logging level. Values can be NONE, ERROR, ALL.

      • NONE : No field-level logs are captured.
      • ERROR : Logs the following information only for the fields that are in error:
        • The error section in the server response.
        • Field-level errors.
        • The generated request/response functions that got resolved for error fields.
      • ALL : The following information is logged for all fields in the query:
        • Field-level tracing information.
        • The generated request/response functions that got resolved for each field.
    • cloudWatchLogsRoleArn (string) -- [REQUIRED]

      The service role that AWS AppSync will assume to publish to Amazon CloudWatch logs in your account.

  • authenticationType (string) -- The new authentication type for the GraphqlApi object.
  • userPoolConfig (dict) --

    The new Amazon Cognito User Pool configuration for the GraphqlApi object.

    • userPoolId (string) -- [REQUIRED]

      The user pool ID.

    • awsRegion (string) -- [REQUIRED]

      The AWS region in which the user pool was created.

    • defaultAction (string) -- [REQUIRED]

      The action that you want your GraphQL API to take when a request that uses Amazon Cognito User Pool authentication doesn't match the Amazon Cognito User Pool configuration.

    • appIdClientRegex (string) --

      A regular expression for validating the incoming Amazon Cognito User Pool app client ID.

  • openIDConnectConfig (dict) --

    The Open Id Connect configuration configuration for the GraphqlApi object.

    • issuer (string) -- [REQUIRED]

      The issuer for the open id connect configuration. The issuer returned by discovery MUST exactly match the value of iss in the ID Token.

    • clientId (string) --

      The client identifier of the Relying party at the OpenID Provider. This identifier is typically obtained when the Relying party is registered with the OpenID Provider. You can specify a regular expression so the AWS AppSync can validate against multiple client identifiers at a time

    • iatTTL (integer) --

      The number of milliseconds a token is valid after being issued to a user.

    • authTTL (integer) --

      The number of milliseconds a token is valid after being authenticated.

Return type

dict

Returns

Response Syntax

{
    'graphqlApi': {
        'name': 'string',
        'apiId': 'string',
        'authenticationType': 'API_KEY'|'AWS_IAM'|'AMAZON_COGNITO_USER_POOLS'|'OPENID_CONNECT',
        'logConfig': {
            'fieldLogLevel': 'NONE'|'ERROR'|'ALL',
            'cloudWatchLogsRoleArn': 'string'
        },
        'userPoolConfig': {
            'userPoolId': 'string',
            'awsRegion': 'string',
            'defaultAction': 'ALLOW'|'DENY',
            'appIdClientRegex': 'string'
        },
        'openIDConnectConfig': {
            'issuer': 'string',
            'clientId': 'string',
            'iatTTL': 123,
            'authTTL': 123
        },
        'arn': 'string',
        'uris': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • graphqlApi (dict) --

      The updated GraphqlApi object.

      • name (string) --

        The API name.

      • apiId (string) --

        The API ID.

      • authenticationType (string) --

        The authentication type.

      • logConfig (dict) --

        The Amazon CloudWatch Logs configuration.

        • fieldLogLevel (string) --

          The field logging level. Values can be NONE, ERROR, ALL.

          • NONE : No field-level logs are captured.
          • ERROR : Logs the following information only for the fields that are in error:
            • The error section in the server response.
            • Field-level errors.
            • The generated request/response functions that got resolved for error fields.
          • ALL : The following information is logged for all fields in the query:
            • Field-level tracing information.
            • The generated request/response functions that got resolved for each field.
        • cloudWatchLogsRoleArn (string) --

          The service role that AWS AppSync will assume to publish to Amazon CloudWatch logs in your account.

      • userPoolConfig (dict) --

        The Amazon Cognito User Pool configuration.

        • userPoolId (string) --

          The user pool ID.

        • awsRegion (string) --

          The AWS region in which the user pool was created.

        • defaultAction (string) --

          The action that you want your GraphQL API to take when a request that uses Amazon Cognito User Pool authentication doesn't match the Amazon Cognito User Pool configuration.

        • appIdClientRegex (string) --

          A regular expression for validating the incoming Amazon Cognito User Pool app client ID.

      • openIDConnectConfig (dict) --

        The Open Id Connect configuration.

        • issuer (string) --

          The issuer for the open id connect configuration. The issuer returned by discovery MUST exactly match the value of iss in the ID Token.

        • clientId (string) --

          The client identifier of the Relying party at the OpenID Provider. This identifier is typically obtained when the Relying party is registered with the OpenID Provider. You can specify a regular expression so the AWS AppSync can validate against multiple client identifiers at a time

        • iatTTL (integer) --

          The number of milliseconds a token is valid after being issued to a user.

        • authTTL (integer) --

          The number of milliseconds a token is valid after being authenticated.

      • arn (string) --

        The ARN.

      • uris (dict) --

        The URIs.

        • (string) --
          • (string) --

update_resolver(**kwargs)

Updates a Resolver object.

See also: AWS API Documentation

Request Syntax

response = client.update_resolver(
    apiId='string',
    typeName='string',
    fieldName='string',
    dataSourceName='string',
    requestMappingTemplate='string',
    responseMappingTemplate='string'
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • typeName (string) --

    [REQUIRED]

    The new type name.

  • fieldName (string) --

    [REQUIRED]

    The new field name.

  • dataSourceName (string) --

    [REQUIRED]

    The new data source name.

  • requestMappingTemplate (string) --

    [REQUIRED]

    The new request mapping template.

  • responseMappingTemplate (string) -- The new response mapping template.
Return type

dict

Returns

Response Syntax

{
    'resolver': {
        'typeName': 'string',
        'fieldName': 'string',
        'dataSourceName': 'string',
        'resolverArn': 'string',
        'requestMappingTemplate': 'string',
        'responseMappingTemplate': 'string'
    }
}

Response Structure

  • (dict) --

    • resolver (dict) --

      The updated Resolver object.

      • typeName (string) --

        The resolver type name.

      • fieldName (string) --

        The resolver field name.

      • dataSourceName (string) --

        The resolver data source name.

      • resolverArn (string) --

        The resolver ARN.

      • requestMappingTemplate (string) --

        The request mapping template.

      • responseMappingTemplate (string) --

        The response mapping template.

update_type(**kwargs)

Updates a Type object.

See also: AWS API Documentation

Request Syntax

response = client.update_type(
    apiId='string',
    typeName='string',
    definition='string',
    format='SDL'|'JSON'
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • typeName (string) --

    [REQUIRED]

    The new type name.

  • definition (string) -- The new definition.
  • format (string) --

    [REQUIRED]

    The new type format: SDL or JSON.

Return type

dict

Returns

Response Syntax

{
    'type': {
        'name': 'string',
        'description': 'string',
        'arn': 'string',
        'definition': 'string',
        'format': 'SDL'|'JSON'
    }
}

Response Structure

  • (dict) --

    • type (dict) --

      The updated Type object.

      • name (string) --

        The type name.

      • description (string) --

        The type description.

      • arn (string) --

        The type ARN.

      • definition (string) --

        The type definition.

      • format (string) --

        The type format: SDL or JSON.

Paginators

The available paginators are: