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



153
154
155
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 153

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

Returns:

See Also:



196
197
198
199
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 196

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, HTTP
  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
  },
  http_config: {
    endpoint: "String",
  },
})

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", "HTTP"
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
resp.data_source.http_config.endpoint #=> 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.

  • :http_config (Types::HttpDataSourceConfig)

    Http endpoint settings.

Returns:

See Also:



279
280
281
282
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 279

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
  log_config: {
    field_log_level: "NONE", # required, accepts NONE, ERROR, ALL
    cloud_watch_logs_role_arn: "String", # required
  },
  authentication_type: "API_KEY", # required, accepts API_KEY, AWS_IAM, AMAZON_COGNITO_USER_POOLS, OPENID_CONNECT
  user_pool_config: {
    user_pool_id: "String", # required
    aws_region: "String", # required
    default_action: "ALLOW", # required, accepts ALLOW, DENY
    app_id_client_regex: "String",
  },
  open_id_connect_config: {
    issuer: "String", # required
    client_id: "String",
    iat_ttl: 1,
    auth_ttl: 1,
  },
})

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", "OPENID_CONNECT"
resp.graphql_api.log_config.field_log_level #=> String, one of "NONE", "ERROR", "ALL"
resp.graphql_api.log_config.cloud_watch_logs_role_arn #=> String
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.open_id_connect_config.issuer #=> String
resp.graphql_api.open_id_connect_config.client_id #=> String
resp.graphql_api.open_id_connect_config.iat_ttl #=> Integer
resp.graphql_api.open_id_connect_config.auth_ttl #=> Integer
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.

  • :log_config (Types::LogConfig)

    The Amazon CloudWatch logs configuration.

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

  • :open_id_connect_config (Types::OpenIDConnectConfig)

    The Open Id Connect configuration configuration.

Returns:

See Also:



351
352
353
354
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 351

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:



411
412
413
414
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 411

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:



458
459
460
461
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 458

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:



484
485
486
487
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 484

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:



510
511
512
513
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 510

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:



532
533
534
535
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 532

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:



562
563
564
565
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 562

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:



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

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", "HTTP"
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
resp.data_source.http_config.endpoint #=> 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:



631
632
633
634
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 631

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", "OPENID_CONNECT"
resp.graphql_api.log_config.field_log_level #=> String, one of "NONE", "ERROR", "ALL"
resp.graphql_api.log_config.cloud_watch_logs_role_arn #=> String
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.open_id_connect_config.issuer #=> String
resp.graphql_api.open_id_connect_config.client_id #=> String
resp.graphql_api.open_id_connect_config.iat_ttl #=> Integer
resp.graphql_api.open_id_connect_config.auth_ttl #=> Integer
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:



674
675
676
677
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 674

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:



706
707
708
709
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 706

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:



747
748
749
750
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 747

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:



777
778
779
780
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 777

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:



817
818
819
820
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 817

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.

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.

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:



867
868
869
870
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 867

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", "HTTP"
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.data_sources[0].http_config.endpoint #=> 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:



919
920
921
922
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 919

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", "OPENID_CONNECT"
resp.graphql_apis[0].log_config.field_log_level #=> String, one of "NONE", "ERROR", "ALL"
resp.graphql_apis[0].log_config.cloud_watch_logs_role_arn #=> String
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].open_id_connect_config.issuer #=> String
resp.graphql_apis[0].open_id_connect_config.client_id #=> String
resp.graphql_apis[0].open_id_connect_config.iat_ttl #=> Integer
resp.graphql_apis[0].open_id_connect_config.auth_ttl #=> Integer
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:



971
972
973
974
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 971

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:



1021
1022
1023
1024
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1021

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:



1070
1071
1072
1073
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1070

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:



1105
1106
1107
1108
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1105

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 from update time after which the API key expires. The date is represented as seconds since the epoch. For more information, see .

Returns:

See Also:



1148
1149
1150
1151
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1148

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, HTTP
  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
  },
  http_config: {
    endpoint: "String",
  },
})

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", "HTTP"
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
resp.data_source.http_config.endpoint #=> 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.

  • :http_config (Types::HttpDataSourceConfig)

    The new http endpoint configuration

Returns:

See Also:



1230
1231
1232
1233
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1230

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
  log_config: {
    field_log_level: "NONE", # required, accepts NONE, ERROR, ALL
    cloud_watch_logs_role_arn: "String", # required
  },
  authentication_type: "API_KEY", # accepts API_KEY, AWS_IAM, AMAZON_COGNITO_USER_POOLS, OPENID_CONNECT
  user_pool_config: {
    user_pool_id: "String", # required
    aws_region: "String", # required
    default_action: "ALLOW", # required, accepts ALLOW, DENY
    app_id_client_regex: "String",
  },
  open_id_connect_config: {
    issuer: "String", # required
    client_id: "String",
    iat_ttl: 1,
    auth_ttl: 1,
  },
})

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", "OPENID_CONNECT"
resp.graphql_api.log_config.field_log_level #=> String, one of "NONE", "ERROR", "ALL"
resp.graphql_api.log_config.cloud_watch_logs_role_arn #=> String
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.open_id_connect_config.issuer #=> String
resp.graphql_api.open_id_connect_config.client_id #=> String
resp.graphql_api.open_id_connect_config.iat_ttl #=> Integer
resp.graphql_api.open_id_connect_config.auth_ttl #=> Integer
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.

  • :log_config (Types::LogConfig)

    The Amazon CloudWatch logs configuration 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.

  • :open_id_connect_config (Types::OpenIDConnectConfig)

    The Open Id Connect configuration configuration for the GraphqlApi object.

Returns:

See Also:



1308
1309
1310
1311
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1308

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:



1361
1362
1363
1364
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1361

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:



1405
1406
1407
1408
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1405

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