You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::AppSync::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(*args) ⇒ Client

Returns a new instance of Client

Parameters:

  • options (Hash)

    a customizable set of options



142
143
144
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 142

def initialize(*args)
  super
end

Instance Method Details

#create_api_key(params = {}) ⇒ Types::CreateApiKeyResponse

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

Examples:

Request syntax with placeholder values


resp = client.create_api_key({
  api_id: "String", # required
  description: "String",
  expires: 1,
})

Response structure


resp.api_key.id #=> String
resp.api_key.description #=> String
resp.api_key.expires #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :api_id (required, String)

    The ID for your GraphQL API.

  • :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. The default value for this parameter is 7 days from creation time.

Returns:

See Also:



184
185
186
187
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 184

def create_api_key(params = {}, options = {})
  req = build_request(:create_api_key, params)
  req.send_request(options)
end

#create_data_source(params = {}) ⇒ Types::CreateDataSourceResponse

Creates a DataSource object.

Examples:

Request syntax with placeholder values


resp = client.create_data_source({
  api_id: "String", # required
  name: "ResourceName", # required
  description: "String",
  type: "AWS_LAMBDA", # required, accepts AWS_LAMBDA, AMAZON_DYNAMODB, AMAZON_ELASTICSEARCH, NONE
  service_role_arn: "String",
  dynamodb_config: {
    table_name: "String", # required
    aws_region: "String", # required
    use_caller_credentials: false,
  },
  lambda_config: {
    lambda_function_arn: "String", # required
  },
  elasticsearch_config: {
    endpoint: "String", # required
    aws_region: "String", # required
  },
})

Response structure


resp.data_source.data_source_arn #=> String
resp.data_source.name #=> String
resp.data_source.description #=> String
resp.data_source.type #=> String, one of "AWS_LAMBDA", "AMAZON_DYNAMODB", "AMAZON_ELASTICSEARCH", "NONE"
resp.data_source.service_role_arn #=> String
resp.data_source.dynamodb_config.table_name #=> String
resp.data_source.dynamodb_config.aws_region #=> String
resp.data_source.dynamodb_config.use_caller_credentials #=> Boolean
resp.data_source.lambda_config.lambda_function_arn #=> String
resp.data_source.elasticsearch_config.endpoint #=> String
resp.data_source.elasticsearch_config.aws_region #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :api_id (required, String)

    The API ID for the GraphQL API for the DataSource.

  • :name (required, String)

    A user-supplied name for the DataSource.

  • :description (String)

    A description of the DataSource.

  • :type (required, String)

    The type of the DataSource.

  • :service_role_arn (String)

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

  • :dynamodb_config (Types::DynamodbDataSourceConfig)

    DynamoDB settings.

  • :lambda_config (Types::LambdaDataSourceConfig)

    AWS Lambda settings.

  • :elasticsearch_config (Types::ElasticsearchDataSourceConfig)

    Amazon Elasticsearch settings.

Returns:

See Also:



260
261
262
263
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 260

def create_data_source(params = {}, options = {})
  req = build_request(:create_data_source, params)
  req.send_request(options)
end

#create_graphql_api(params = {}) ⇒ Types::CreateGraphqlApiResponse

Creates a GraphqlApi object.

Examples:

Request syntax with placeholder values


resp = client.create_graphql_api({
  name: "String", # required
  authentication_type: "API_KEY", # required, accepts API_KEY, AWS_IAM, AMAZON_COGNITO_USER_POOLS
  user_pool_config: {
    user_pool_id: "String", # required
    aws_region: "String", # required
    default_action: "ALLOW", # required, accepts ALLOW, DENY
    app_id_client_regex: "String",
  },
})

Response structure


resp.graphql_api.name #=> String
resp.graphql_api.api_id #=> String
resp.graphql_api.authentication_type #=> String, one of "API_KEY", "AWS_IAM", "AMAZON_COGNITO_USER_POOLS"
resp.graphql_api.user_pool_config.user_pool_id #=> String
resp.graphql_api.user_pool_config.aws_region #=> String
resp.graphql_api.user_pool_config.default_action #=> String, one of "ALLOW", "DENY"
resp.graphql_api.user_pool_config.app_id_client_regex #=> String
resp.graphql_api.arn #=> String
resp.graphql_api.uris #=> Hash
resp.graphql_api.uris["String"] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :name (required, String)

    A user-supplied name for the GraphqlApi.

  • :authentication_type (required, String)

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

  • :user_pool_config (Types::UserPoolConfig)

    The Amazon Cognito User Pool configuration.

Returns:

See Also:



310
311
312
313
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 310

def create_graphql_api(params = {}, options = {})
  req = build_request(:create_graphql_api, params)
  req.send_request(options)
end

#create_resolver(params = {}) ⇒ Types::CreateResolverResponse

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.

Examples:

Request syntax with placeholder values


resp = client.create_resolver({
  api_id: "String", # required
  type_name: "ResourceName", # required
  field_name: "ResourceName", # required
  data_source_name: "ResourceName", # required
  request_mapping_template: "MappingTemplate", # required
  response_mapping_template: "MappingTemplate",
})

Response structure


resp.resolver.type_name #=> String
resp.resolver.field_name #=> String
resp.resolver.data_source_name #=> String
resp.resolver.resolver_arn #=> String
resp.resolver.request_mapping_template #=> String
resp.resolver.response_mapping_template #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :api_id (required, String)

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

  • :type_name (required, String)

    The name of the Type.

  • :field_name (required, String)

    The name of the field to attach the resolver to.

  • :data_source_name (required, String)

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

  • :request_mapping_template (required, String)

    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).

  • :response_mapping_template (String)

    The mapping template to be used for responses from the data source.

Returns:

See Also:



370
371
372
373
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 370

def create_resolver(params = {}, options = {})
  req = build_request(:create_resolver, params)
  req.send_request(options)
end

#create_type(params = {}) ⇒ Types::CreateTypeResponse

Creates a Type object.

Examples:

Request syntax with placeholder values


resp = client.create_type({
  api_id: "String", # required
  definition: "String", # required
  format: "SDL", # required, accepts SDL, JSON
})

Response structure


resp.type.name #=> String
resp.type.description #=> String
resp.type.arn #=> String
resp.type.definition #=> String
resp.type.format #=> String, one of "SDL", "JSON"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :api_id (required, String)

    The API ID.

  • :definition (required, String)

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

    For more information, see the GraphQL SDL documentation.

  • :format (required, String)

    The type format: SDL or JSON.

Returns:

See Also:



417
418
419
420
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 417

def create_type(params = {}, options = {})
  req = build_request(:create_type, params)
  req.send_request(options)
end

#delete_api_key(params = {}) ⇒ Struct

Deletes an API key.

Examples:

Request syntax with placeholder values


resp = client.delete_api_key({
  api_id: "String", # required
  id: "String", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :api_id (required, String)

    The API ID.

  • :id (required, String)

    The ID for the API key.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



443
444
445
446
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 443

def delete_api_key(params = {}, options = {})
  req = build_request(:delete_api_key, params)
  req.send_request(options)
end

#delete_data_source(params = {}) ⇒ Struct

Deletes a DataSource object.

Examples:

Request syntax with placeholder values


resp = client.delete_data_source({
  api_id: "String", # required
  name: "ResourceName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :api_id (required, String)

    The API ID.

  • :name (required, String)

    The name of the data source.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



469
470
471
472
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 469

def delete_data_source(params = {}, options = {})
  req = build_request(:delete_data_source, params)
  req.send_request(options)
end

#delete_graphql_api(params = {}) ⇒ Struct

Deletes a GraphqlApi object.

Examples:

Request syntax with placeholder values


resp = client.delete_graphql_api({
  api_id: "String", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :api_id (required, String)

    The API ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



491
492
493
494
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 491

def delete_graphql_api(params = {}, options = {})
  req = build_request(:delete_graphql_api, params)
  req.send_request(options)
end

#delete_resolver(params = {}) ⇒ Struct

Deletes a Resolver object.

Examples:

Request syntax with placeholder values


resp = client.delete_resolver({
  api_id: "String", # required
  type_name: "ResourceName", # required
  field_name: "ResourceName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :api_id (required, String)

    The API ID.

  • :type_name (required, String)

    The name of the resolver type.

  • :field_name (required, String)

    The resolver field name.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



521
522
523
524
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 521

def delete_resolver(params = {}, options = {})
  req = build_request(:delete_resolver, params)
  req.send_request(options)
end

#delete_type(params = {}) ⇒ Struct

Deletes a Type object.

Examples:

Request syntax with placeholder values


resp = client.delete_type({
  api_id: "String", # required
  type_name: "ResourceName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :api_id (required, String)

    The API ID.

  • :type_name (required, String)

    The type name.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



547
548
549
550
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 547

def delete_type(params = {}, options = {})
  req = build_request(:delete_type, params)
  req.send_request(options)
end

#get_data_source(params = {}) ⇒ Types::GetDataSourceResponse

Retrieves a DataSource object.

Examples:

Request syntax with placeholder values


resp = client.get_data_source({
  api_id: "String", # required
  name: "ResourceName", # required
})

Response structure


resp.data_source.data_source_arn #=> String
resp.data_source.name #=> String
resp.data_source.description #=> String
resp.data_source.type #=> String, one of "AWS_LAMBDA", "AMAZON_DYNAMODB", "AMAZON_ELASTICSEARCH", "NONE"
resp.data_source.service_role_arn #=> String
resp.data_source.dynamodb_config.table_name #=> String
resp.data_source.dynamodb_config.aws_region #=> String
resp.data_source.dynamodb_config.use_caller_credentials #=> Boolean
resp.data_source.lambda_config.lambda_function_arn #=> String
resp.data_source.elasticsearch_config.endpoint #=> String
resp.data_source.elasticsearch_config.aws_region #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :api_id (required, String)

    The API ID.

  • :name (required, String)

    The name of the data source.

Returns:

See Also:



589
590
591
592
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 589

def get_data_source(params = {}, options = {})
  req = build_request(:get_data_source, params)
  req.send_request(options)
end

#get_graphql_api(params = {}) ⇒ Types::GetGraphqlApiResponse

Retrieves a GraphqlApi object.

Examples:

Request syntax with placeholder values


resp = client.get_graphql_api({
  api_id: "String", # required
})

Response structure


resp.graphql_api.name #=> String
resp.graphql_api.api_id #=> String
resp.graphql_api.authentication_type #=> String, one of "API_KEY", "AWS_IAM", "AMAZON_COGNITO_USER_POOLS"
resp.graphql_api.user_pool_config.user_pool_id #=> String
resp.graphql_api.user_pool_config.aws_region #=> String
resp.graphql_api.user_pool_config.default_action #=> String, one of "ALLOW", "DENY"
resp.graphql_api.user_pool_config.app_id_client_regex #=> String
resp.graphql_api.arn #=> String
resp.graphql_api.uris #=> Hash
resp.graphql_api.uris["String"] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :api_id (required, String)

    The API ID for the GraphQL API.

Returns:

See Also:



626
627
628
629
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 626

def get_graphql_api(params = {}, options = {})
  req = build_request(:get_graphql_api, params)
  req.send_request(options)
end

#get_introspection_schema(params = {}) ⇒ Types::GetIntrospectionSchemaResponse

Retrieves the introspection schema for a GraphQL API.

Examples:

Request syntax with placeholder values


resp = client.get_introspection_schema({
  api_id: "String", # required
  format: "SDL", # required, accepts SDL, JSON
})

Response structure


resp.schema #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :api_id (required, String)

    The API ID.

  • :format (required, String)

    The schema format: SDL or JSON.

Returns:

See Also:



658
659
660
661
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 658

def get_introspection_schema(params = {}, options = {})
  req = build_request(:get_introspection_schema, params)
  req.send_request(options)
end

#get_resolver(params = {}) ⇒ Types::GetResolverResponse

Retrieves a Resolver object.

Examples:

Request syntax with placeholder values


resp = client.get_resolver({
  api_id: "String", # required
  type_name: "ResourceName", # required
  field_name: "ResourceName", # required
})

Response structure


resp.resolver.type_name #=> String
resp.resolver.field_name #=> String
resp.resolver.data_source_name #=> String
resp.resolver.resolver_arn #=> String
resp.resolver.request_mapping_template #=> String
resp.resolver.response_mapping_template #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :api_id (required, String)

    The API ID.

  • :type_name (required, String)

    The resolver type name.

  • :field_name (required, String)

    The resolver field name.

Returns:

See Also:



699
700
701
702
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 699

def get_resolver(params = {}, options = {})
  req = build_request(:get_resolver, params)
  req.send_request(options)
end

#get_schema_creation_status(params = {}) ⇒ Types::GetSchemaCreationStatusResponse

Retrieves the current status of a schema creation operation.

Examples:

Request syntax with placeholder values


resp = client.get_schema_creation_status({
  api_id: "String", # required
})

Response structure


resp.status #=> String, one of "PROCESSING", "ACTIVE", "DELETING"
resp.details #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :api_id (required, String)

    The API ID.

Returns:

See Also:



729
730
731
732
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 729

def get_schema_creation_status(params = {}, options = {})
  req = build_request(:get_schema_creation_status, params)
  req.send_request(options)
end

#get_type(params = {}) ⇒ Types::GetTypeResponse

Retrieves a Type object.

Examples:

Request syntax with placeholder values


resp = client.get_type({
  api_id: "String", # required
  type_name: "ResourceName", # required
  format: "SDL", # required, accepts SDL, JSON
})

Response structure


resp.type.name #=> String
resp.type.description #=> String
resp.type.arn #=> String
resp.type.definition #=> String
resp.type.format #=> String, one of "SDL", "JSON"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :api_id (required, String)

    The API ID.

  • :type_name (required, String)

    The type name.

  • :format (required, String)

    The type format: SDL or JSON.

Returns:

See Also:



769
770
771
772
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 769

def get_type(params = {}, options = {})
  req = build_request(:get_type, params)
  req.send_request(options)
end

#list_api_keys(params = {}) ⇒ Types::ListApiKeysResponse

Lists the API keys for a given API.

Examples:

Request syntax with placeholder values


resp = client.list_api_keys({
  api_id: "String", # required
  next_token: "PaginationToken",
  max_results: 1,
})

Response structure


resp.api_keys #=> Array
resp.api_keys[0].id #=> String
resp.api_keys[0].description #=> String
resp.api_keys[0].expires #=> Integer
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :api_id (required, String)

    The API ID.

  • :next_token (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.

  • :max_results (Integer)

    The maximum number of results you want the request to return.

Returns:

See Also:



812
813
814
815
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 812

def list_api_keys(params = {}, options = {})
  req = build_request(:list_api_keys, params)
  req.send_request(options)
end

#list_data_sources(params = {}) ⇒ Types::ListDataSourcesResponse

Lists the data sources for a given API.

Examples:

Request syntax with placeholder values


resp = client.list_data_sources({
  api_id: "String", # required
  next_token: "PaginationToken",
  max_results: 1,
})

Response structure


resp.data_sources #=> Array
resp.data_sources[0].data_source_arn #=> String
resp.data_sources[0].name #=> String
resp.data_sources[0].description #=> String
resp.data_sources[0].type #=> String, one of "AWS_LAMBDA", "AMAZON_DYNAMODB", "AMAZON_ELASTICSEARCH", "NONE"
resp.data_sources[0].service_role_arn #=> String
resp.data_sources[0].dynamodb_config.table_name #=> String
resp.data_sources[0].dynamodb_config.aws_region #=> String
resp.data_sources[0].dynamodb_config.use_caller_credentials #=> Boolean
resp.data_sources[0].lambda_config.lambda_function_arn #=> String
resp.data_sources[0].elasticsearch_config.endpoint #=> String
resp.data_sources[0].elasticsearch_config.aws_region #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :api_id (required, String)

    The API ID.

  • :next_token (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.

  • :max_results (Integer)

    The maximum number of results you want the request to return.

Returns:

See Also:



863
864
865
866
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 863

def list_data_sources(params = {}, options = {})
  req = build_request(:list_data_sources, params)
  req.send_request(options)
end

#list_graphql_apis(params = {}) ⇒ Types::ListGraphqlApisResponse

Lists your GraphQL APIs.

Examples:

Request syntax with placeholder values


resp = client.list_graphql_apis({
  next_token: "PaginationToken",
  max_results: 1,
})

Response structure


resp.graphql_apis #=> Array
resp.graphql_apis[0].name #=> String
resp.graphql_apis[0].api_id #=> String
resp.graphql_apis[0].authentication_type #=> String, one of "API_KEY", "AWS_IAM", "AMAZON_COGNITO_USER_POOLS"
resp.graphql_apis[0].user_pool_config.user_pool_id #=> String
resp.graphql_apis[0].user_pool_config.aws_region #=> String
resp.graphql_apis[0].user_pool_config.default_action #=> String, one of "ALLOW", "DENY"
resp.graphql_apis[0].user_pool_config.app_id_client_regex #=> String
resp.graphql_apis[0].arn #=> String
resp.graphql_apis[0].uris #=> Hash
resp.graphql_apis[0].uris["String"] #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :next_token (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.

  • :max_results (Integer)

    The maximum number of results you want the request to return.

Returns:

See Also:



909
910
911
912
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 909

def list_graphql_apis(params = {}, options = {})
  req = build_request(:list_graphql_apis, params)
  req.send_request(options)
end

#list_resolvers(params = {}) ⇒ Types::ListResolversResponse

Lists the resolvers for a given API and type.

Examples:

Request syntax with placeholder values


resp = client.list_resolvers({
  api_id: "String", # required
  type_name: "String", # required
  next_token: "PaginationToken",
  max_results: 1,
})

Response structure


resp.resolvers #=> Array
resp.resolvers[0].type_name #=> String
resp.resolvers[0].field_name #=> String
resp.resolvers[0].data_source_name #=> String
resp.resolvers[0].resolver_arn #=> String
resp.resolvers[0].request_mapping_template #=> String
resp.resolvers[0].response_mapping_template #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :api_id (required, String)

    The API ID.

  • :type_name (required, String)

    The type name.

  • :next_token (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.

  • :max_results (Integer)

    The maximum number of results you want the request to return.

Returns:

See Also:



959
960
961
962
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 959

def list_resolvers(params = {}, options = {})
  req = build_request(:list_resolvers, params)
  req.send_request(options)
end

#list_types(params = {}) ⇒ Types::ListTypesResponse

Lists the types for a given API.

Examples:

Request syntax with placeholder values


resp = client.list_types({
  api_id: "String", # required
  format: "SDL", # required, accepts SDL, JSON
  next_token: "PaginationToken",
  max_results: 1,
})

Response structure


resp.types #=> Array
resp.types[0].name #=> String
resp.types[0].description #=> String
resp.types[0].arn #=> String
resp.types[0].definition #=> String
resp.types[0].format #=> String, one of "SDL", "JSON"
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :api_id (required, String)

    The API ID.

  • :format (required, String)

    The type format: SDL or JSON.

  • :next_token (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.

  • :max_results (Integer)

    The maximum number of results you want the request to return.

Returns:

See Also:



1008
1009
1010
1011
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1008

def list_types(params = {}, options = {})
  req = build_request(:list_types, params)
  req.send_request(options)
end

#start_schema_creation(params = {}) ⇒ Types::StartSchemaCreationResponse

Adds a new schema to your GraphQL API.

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

Examples:

Request syntax with placeholder values


resp = client.start_schema_creation({
  api_id: "String", # required
  definition: "data", # required
})

Response structure


resp.status #=> String, one of "PROCESSING", "ACTIVE", "DELETING"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :api_id (required, String)

    The API ID.

  • :definition (required, String, IO)

    The schema definition, in GraphQL schema language format.

Returns:

See Also:



1043
1044
1045
1046
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1043

def start_schema_creation(params = {}, options = {})
  req = build_request(:start_schema_creation, params)
  req.send_request(options)
end

#update_api_key(params = {}) ⇒ Types::UpdateApiKeyResponse

Updates an API key.

Examples:

Request syntax with placeholder values


resp = client.update_api_key({
  api_id: "String", # required
  id: "String", # required
  description: "String",
  expires: 1,
})

Response structure


resp.api_key.id #=> String
resp.api_key.description #=> String
resp.api_key.expires #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :api_id (required, String)

    The ID for the GraphQL API

  • :id (required, 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.

Returns:

See Also:



1086
1087
1088
1089
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1086

def update_api_key(params = {}, options = {})
  req = build_request(:update_api_key, params)
  req.send_request(options)
end

#update_data_source(params = {}) ⇒ Types::UpdateDataSourceResponse

Updates a DataSource object.

Examples:

Request syntax with placeholder values


resp = client.update_data_source({
  api_id: "String", # required
  name: "ResourceName", # required
  description: "String",
  type: "AWS_LAMBDA", # required, accepts AWS_LAMBDA, AMAZON_DYNAMODB, AMAZON_ELASTICSEARCH, NONE
  service_role_arn: "String",
  dynamodb_config: {
    table_name: "String", # required
    aws_region: "String", # required
    use_caller_credentials: false,
  },
  lambda_config: {
    lambda_function_arn: "String", # required
  },
  elasticsearch_config: {
    endpoint: "String", # required
    aws_region: "String", # required
  },
})

Response structure


resp.data_source.data_source_arn #=> String
resp.data_source.name #=> String
resp.data_source.description #=> String
resp.data_source.type #=> String, one of "AWS_LAMBDA", "AMAZON_DYNAMODB", "AMAZON_ELASTICSEARCH", "NONE"
resp.data_source.service_role_arn #=> String
resp.data_source.dynamodb_config.table_name #=> String
resp.data_source.dynamodb_config.aws_region #=> String
resp.data_source.dynamodb_config.use_caller_credentials #=> Boolean
resp.data_source.lambda_config.lambda_function_arn #=> String
resp.data_source.elasticsearch_config.endpoint #=> String
resp.data_source.elasticsearch_config.aws_region #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :api_id (required, String)

    The API ID.

  • :name (required, String)

    The new name for the data source.

  • :description (String)

    The new description for the data source.

  • :type (required, String)

    The new data source type.

  • :service_role_arn (String)

    The new service role ARN for the data source.

  • :dynamodb_config (Types::DynamodbDataSourceConfig)

    The new DynamoDB configuration.

  • :lambda_config (Types::LambdaDataSourceConfig)

    The new Lambda configuration.

  • :elasticsearch_config (Types::ElasticsearchDataSourceConfig)

    The new Elasticsearch configuration.

Returns:

See Also:



1161
1162
1163
1164
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1161

def update_data_source(params = {}, options = {})
  req = build_request(:update_data_source, params)
  req.send_request(options)
end

#update_graphql_api(params = {}) ⇒ Types::UpdateGraphqlApiResponse

Updates a GraphqlApi object.

Examples:

Request syntax with placeholder values


resp = client.update_graphql_api({
  api_id: "String", # required
  name: "String", # required
  authentication_type: "API_KEY", # accepts API_KEY, AWS_IAM, AMAZON_COGNITO_USER_POOLS
  user_pool_config: {
    user_pool_id: "String", # required
    aws_region: "String", # required
    default_action: "ALLOW", # required, accepts ALLOW, DENY
    app_id_client_regex: "String",
  },
})

Response structure


resp.graphql_api.name #=> String
resp.graphql_api.api_id #=> String
resp.graphql_api.authentication_type #=> String, one of "API_KEY", "AWS_IAM", "AMAZON_COGNITO_USER_POOLS"
resp.graphql_api.user_pool_config.user_pool_id #=> String
resp.graphql_api.user_pool_config.aws_region #=> String
resp.graphql_api.user_pool_config.default_action #=> String, one of "ALLOW", "DENY"
resp.graphql_api.user_pool_config.app_id_client_regex #=> String
resp.graphql_api.arn #=> String
resp.graphql_api.uris #=> Hash
resp.graphql_api.uris["String"] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :api_id (required, String)

    The API ID.

  • :name (required, String)

    The new name for the GraphqlApi object.

  • :authentication_type (String)

    The new authentication type for the GraphqlApi object.

  • :user_pool_config (Types::UserPoolConfig)

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

Returns:

See Also:



1216
1217
1218
1219
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1216

def update_graphql_api(params = {}, options = {})
  req = build_request(:update_graphql_api, params)
  req.send_request(options)
end

#update_resolver(params = {}) ⇒ Types::UpdateResolverResponse

Updates a Resolver object.

Examples:

Request syntax with placeholder values


resp = client.update_resolver({
  api_id: "String", # required
  type_name: "ResourceName", # required
  field_name: "ResourceName", # required
  data_source_name: "ResourceName", # required
  request_mapping_template: "MappingTemplate", # required
  response_mapping_template: "MappingTemplate",
})

Response structure


resp.resolver.type_name #=> String
resp.resolver.field_name #=> String
resp.resolver.data_source_name #=> String
resp.resolver.resolver_arn #=> String
resp.resolver.request_mapping_template #=> String
resp.resolver.response_mapping_template #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :api_id (required, String)

    The API ID.

  • :type_name (required, String)

    The new type name.

  • :field_name (required, String)

    The new field name.

  • :data_source_name (required, String)

    The new data source name.

  • :request_mapping_template (required, String)

    The new request mapping template.

  • :response_mapping_template (String)

    The new response mapping template.

Returns:

See Also:



1269
1270
1271
1272
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1269

def update_resolver(params = {}, options = {})
  req = build_request(:update_resolver, params)
  req.send_request(options)
end

#update_type(params = {}) ⇒ Types::UpdateTypeResponse

Updates a Type object.

Examples:

Request syntax with placeholder values


resp = client.update_type({
  api_id: "String", # required
  type_name: "ResourceName", # required
  definition: "String",
  format: "SDL", # required, accepts SDL, JSON
})

Response structure


resp.type.name #=> String
resp.type.description #=> String
resp.type.arn #=> String
resp.type.definition #=> String
resp.type.format #=> String, one of "SDL", "JSON"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :api_id (required, String)

    The API ID.

  • :type_name (required, String)

    The new type name.

  • :definition (String)

    The new definition.

  • :format (required, String)

    The new type format: SDL or JSON.

Returns:

See Also:



1313
1314
1315
1316
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1313

def update_type(params = {}, options = {})
  req = build_request(:update_type, params)
  req.send_request(options)
end