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

#api_requests, #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(options) ⇒ Client

Returns a new instance of Client

Parameters:

  • options (Hash)

Options Hash (options):

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an instance of any one of the following classes:

    • Aws::Credentials - Used for configuring static, non-refreshing credentials.

    • Aws::InstanceProfileCredentials - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • Aws::SharedCredentials - Used for loading credentials from a shared file, such as ~/.aws/config.

    • Aws::AssumeRoleCredentials - Used when you need to assume a role.

    When :credentials are not configured directly, the following locations will be searched for credentials:

    • Aws.config[:credentials]
    • The :access_key_id, :secret_access_key, and :session_token options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • ~/.aws/credentials
    • ~/.aws/config
    • EC2 IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentails to enable retries and extended timeouts.
  • :region (required, String)

    The AWS region to connect to. The configured :region is used to determine the service :endpoint. When not passed, a default :region is search for in the following locations:

    • Aws.config[:region]
    • ENV['AWS_REGION']
    • ENV['AMAZON_REGION']
    • ENV['AWS_DEFAULT_REGION']
    • ~/.aws/credentials
    • ~/.aws/config
  • :access_key_id (String)
  • :active_endpoint_cache (Boolean) — default: false

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false.

  • :client_side_monitoring (Boolean) — default: false

    When true, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :endpoint (String)

    The client endpoint is normally constructed from the :region option. You should only configure an :endpoint when connecting to test endpoints. This should be avalid HTTP(S) URI.

  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.

  • :endpoint_discovery (Boolean) — default: false

    When set to true, endpoint discovery will be enabled for operations when available. Defaults to false.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the :logger at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number.

    @see https://www.awsarchitectureblog.com/2015/03/backoff.html

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors and auth errors from expired credentials.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function.

  • :secret_access_key (String)
  • :session_token (String)
  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request.

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like 'http://proxy.com:123'.

  • :http_open_timeout (Float) — default: 15

    The number of seconds to wait when opening a HTTP session before rasing a Timeout::Error.

  • :http_read_timeout (Integer) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session yeidled by #session_for.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idble before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to nil which disables this behaviour. This value can safely be set per request on the session yeidled by #session_for.

  • :http_wire_trace (Boolean) — default: false

    When true, HTTP debug output will be sent to the :logger.

  • :ssl_verify_peer (Boolean) — default: true

    When true, SSL peer certificates are verified when establishing a connection.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.



251
252
253
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 251

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:



294
295
296
297
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 294

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, RELATIONAL_DATABASE
  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",
    authorization_config: {
      authorization_type: "AWS_IAM", # required, accepts AWS_IAM
      aws_iam_config: {
        signing_region: "String",
        signing_service_name: "String",
      },
    },
  },
  relational_database_config: {
    relational_database_source_type: "RDS_HTTP_ENDPOINT", # accepts RDS_HTTP_ENDPOINT
    rds_http_endpoint_config: {
      aws_region: "String",
      db_cluster_identifier: "String",
      database_name: "String",
      schema: "String",
      aws_secret_store_arn: "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", "RELATIONAL_DATABASE"
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
resp.data_source.http_config.authorization_config.authorization_type #=> String, one of "AWS_IAM"
resp.data_source.http_config.authorization_config.aws_iam_config.signing_region #=> String
resp.data_source.http_config.authorization_config.aws_iam_config.signing_service_name #=> String
resp.data_source.relational_database_config.relational_database_source_type #=> String, one of "RDS_HTTP_ENDPOINT"
resp.data_source.relational_database_config.rds_http_endpoint_config.aws_region #=> String
resp.data_source.relational_database_config.rds_http_endpoint_config.db_cluster_identifier #=> String
resp.data_source.relational_database_config.rds_http_endpoint_config.database_name #=> String
resp.data_source.relational_database_config.rds_http_endpoint_config.schema #=> String
resp.data_source.relational_database_config.rds_http_endpoint_config.aws_secret_store_arn #=> 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 AWS IAM service role ARN for the data source. The system assumes this role when accessing the data source.

  • :dynamodb_config (Types::DynamodbDataSourceConfig)

    Amazon DynamoDB settings.

  • :lambda_config (Types::LambdaDataSourceConfig)

    AWS Lambda settings.

  • :elasticsearch_config (Types::ElasticsearchDataSourceConfig)

    Amazon Elasticsearch Service settings.

  • :http_config (Types::HttpDataSourceConfig)

    HTTP endpoint settings.

  • :relational_database_config (Types::RelationalDatabaseDataSourceConfig)

    Relational database settings.

Returns:

See Also:



406
407
408
409
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 406

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

#create_function(params = {}) ⇒ Types::CreateFunctionResponse

Creates a Function object.

A function is a reusable entity. Multiple functions can be used to compose the resolver logic.

Examples:

Request syntax with placeholder values


resp = client.create_function({
  api_id: "String", # required
  name: "ResourceName", # required
  description: "String",
  data_source_name: "ResourceName", # required
  request_mapping_template: "MappingTemplate", # required
  response_mapping_template: "MappingTemplate",
  function_version: "String", # required
})

Response structure


resp.function_configuration.function_id #=> String
resp.function_configuration.function_arn #=> String
resp.function_configuration.name #=> String
resp.function_configuration.description #=> String
resp.function_configuration.data_source_name #=> String
resp.function_configuration.request_mapping_template #=> String
resp.function_configuration.response_mapping_template #=> String
resp.function_configuration.function_version #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :api_id (required, String)

    The GraphQL API ID.

  • :name (required, String)

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

  • :description (String)

    The Function description.

  • :data_source_name (required, String)

    The Function DataSource name.

  • :request_mapping_template (required, String)

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

  • :response_mapping_template (String)

    The Function response mapping template.

  • :function_version (required, String)

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

Returns:

See Also:



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

def create_function(params = {}, options = {})
  req = build_request(:create_function, 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
    exclude_verbose_content: false,
  },
  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,
  },
  tags: {
    "TagKey" => "TagValue",
  },
  additional_authentication_providers: [
    {
      authentication_type: "API_KEY", # accepts API_KEY, AWS_IAM, AMAZON_COGNITO_USER_POOLS, OPENID_CONNECT
      open_id_connect_config: {
        issuer: "String", # required
        client_id: "String",
        iat_ttl: 1,
        auth_ttl: 1,
      },
      user_pool_config: {
        user_pool_id: "String", # required
        aws_region: "String", # required
        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", "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.log_config.exclude_verbose_content #=> Boolean
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
resp.graphql_api.tags #=> Hash
resp.graphql_api.tags["TagKey"] #=> String
resp.graphql_api.additional_authentication_providers #=> Array
resp.graphql_api.additional_authentication_providers[0].authentication_type #=> String, one of "API_KEY", "AWS_IAM", "AMAZON_COGNITO_USER_POOLS", "OPENID_CONNECT"
resp.graphql_api.additional_authentication_providers[0].open_id_connect_config.issuer #=> String
resp.graphql_api.additional_authentication_providers[0].open_id_connect_config.client_id #=> String
resp.graphql_api.additional_authentication_providers[0].open_id_connect_config.iat_ttl #=> Integer
resp.graphql_api.additional_authentication_providers[0].open_id_connect_config.auth_ttl #=> Integer
resp.graphql_api.additional_authentication_providers[0].user_pool_config.user_pool_id #=> String
resp.graphql_api.additional_authentication_providers[0].user_pool_config.aws_region #=> String
resp.graphql_api.additional_authentication_providers[0].user_pool_config.app_id_client_regex #=> 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, AWS IAM, OIDC, or Amazon Cognito user pools.

  • :user_pool_config (Types::UserPoolConfig)

    The Amazon Cognito user pool configuration.

  • :open_id_connect_config (Types::OpenIDConnectConfig)

    The OpenID Connect configuration.

  • :tags (Hash<String,String>)

    A TagMap object.

  • :additional_authentication_providers (Array<Types::AdditionalAuthenticationProvider>)

    A list of additional authentication providers for the GraphqlApi API.

Returns:

See Also:



582
583
584
585
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 582

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",
  request_mapping_template: "MappingTemplate", # required
  response_mapping_template: "MappingTemplate",
  kind: "UNIT", # accepts UNIT, PIPELINE
  pipeline_config: {
    functions: ["String"],
  },
})

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
resp.resolver.kind #=> String, one of "UNIT", "PIPELINE"
resp.resolver.pipeline_config.functions #=> Array
resp.resolver.pipeline_config.functions[0] #=> 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 (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.

  • :kind (String)

    The resolver type.

    • UNIT: A UNIT resolver type. A UNIT resolver is the default resolver type. A UNIT resolver enables you to execute a GraphQL query against a single data source.

    • PIPELINE: A PIPELINE resolver type. A PIPELINE resolver enables you to execute a series of Function in a serial manner. You can use a pipeline resolver to execute a GraphQL query against multiple data sources.

  • :pipeline_config (Types::PipelineConfig)

    The PipelineConfig.

Returns:

See Also:



664
665
666
667
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 664

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:



711
712
713
714
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 711

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:



737
738
739
740
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 737

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:



763
764
765
766
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 763

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

#delete_function(params = {}) ⇒ Struct

Deletes a Function.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :api_id (required, String)

    The GraphQL API ID.

  • :function_id (required, String)

    The Function ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



789
790
791
792
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 789

def delete_function(params = {}, options = {})
  req = build_request(:delete_function, 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:



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

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:



841
842
843
844
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 841

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:



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

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", "RELATIONAL_DATABASE"
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
resp.data_source.http_config.authorization_config.authorization_type #=> String, one of "AWS_IAM"
resp.data_source.http_config.authorization_config.aws_iam_config.signing_region #=> String
resp.data_source.http_config.authorization_config.aws_iam_config.signing_service_name #=> String
resp.data_source.relational_database_config.relational_database_source_type #=> String, one of "RDS_HTTP_ENDPOINT"
resp.data_source.relational_database_config.rds_http_endpoint_config.aws_region #=> String
resp.data_source.relational_database_config.rds_http_endpoint_config.db_cluster_identifier #=> String
resp.data_source.relational_database_config.rds_http_endpoint_config.database_name #=> String
resp.data_source.relational_database_config.rds_http_endpoint_config.schema #=> String
resp.data_source.relational_database_config.rds_http_endpoint_config.aws_secret_store_arn #=> 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:



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

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

#get_function(params = {}) ⇒ Types::GetFunctionResponse

Get a Function.

Examples:

Request syntax with placeholder values


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

Response structure


resp.function_configuration.function_id #=> String
resp.function_configuration.function_arn #=> String
resp.function_configuration.name #=> String
resp.function_configuration.description #=> String
resp.function_configuration.data_source_name #=> String
resp.function_configuration.request_mapping_template #=> String
resp.function_configuration.response_mapping_template #=> String
resp.function_configuration.function_version #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :api_id (required, String)

    The GraphQL API ID.

  • :function_id (required, String)

    The Function ID.

Returns:

See Also:



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

def get_function(params = {}, options = {})
  req = build_request(:get_function, 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.log_config.exclude_verbose_content #=> Boolean
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
resp.graphql_api.tags #=> Hash
resp.graphql_api.tags["TagKey"] #=> String
resp.graphql_api.additional_authentication_providers #=> Array
resp.graphql_api.additional_authentication_providers[0].authentication_type #=> String, one of "API_KEY", "AWS_IAM", "AMAZON_COGNITO_USER_POOLS", "OPENID_CONNECT"
resp.graphql_api.additional_authentication_providers[0].open_id_connect_config.issuer #=> String
resp.graphql_api.additional_authentication_providers[0].open_id_connect_config.client_id #=> String
resp.graphql_api.additional_authentication_providers[0].open_id_connect_config.iat_ttl #=> Integer
resp.graphql_api.additional_authentication_providers[0].open_id_connect_config.auth_ttl #=> Integer
resp.graphql_api.additional_authentication_providers[0].user_pool_config.user_pool_id #=> String
resp.graphql_api.additional_authentication_providers[0].user_pool_config.aws_region #=> String
resp.graphql_api.additional_authentication_providers[0].user_pool_config.app_id_client_regex #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :api_id (required, String)

    The API ID for the GraphQL API.

Returns:

See Also:



1013
1014
1015
1016
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1013

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
  include_directives: false,
})

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.

  • :include_directives (Boolean)

    A flag that specifies whether the schema introspection should contain directives.

Returns:

See Also:



1050
1051
1052
1053
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1050

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
resp.resolver.kind #=> String, one of "UNIT", "PIPELINE"
resp.resolver.pipeline_config.functions #=> Array
resp.resolver.pipeline_config.functions[0] #=> 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:



1094
1095
1096
1097
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1094

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", "FAILED", "SUCCESS", "NOT_APPLICABLE"
resp.details #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :api_id (required, String)

    The API ID.

Returns:

See Also:



1124
1125
1126
1127
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1124

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:



1164
1165
1166
1167
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1164

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:



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

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", "RELATIONAL_DATABASE"
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.data_sources[0].http_config.authorization_config.authorization_type #=> String, one of "AWS_IAM"
resp.data_sources[0].http_config.authorization_config.aws_iam_config.signing_region #=> String
resp.data_sources[0].http_config.authorization_config.aws_iam_config.signing_service_name #=> String
resp.data_sources[0].relational_database_config.relational_database_source_type #=> String, one of "RDS_HTTP_ENDPOINT"
resp.data_sources[0].relational_database_config.rds_http_endpoint_config.aws_region #=> String
resp.data_sources[0].relational_database_config.rds_http_endpoint_config.db_cluster_identifier #=> String
resp.data_sources[0].relational_database_config.rds_http_endpoint_config.database_name #=> String
resp.data_sources[0].relational_database_config.rds_http_endpoint_config.schema #=> String
resp.data_sources[0].relational_database_config.rds_http_endpoint_config.aws_secret_store_arn #=> 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:



1275
1276
1277
1278
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1275

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

#list_functions(params = {}) ⇒ Types::ListFunctionsResponse

List multiple functions.

Examples:

Request syntax with placeholder values


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

Response structure


resp.functions #=> Array
resp.functions[0].function_id #=> String
resp.functions[0].function_arn #=> String
resp.functions[0].name #=> String
resp.functions[0].description #=> String
resp.functions[0].data_source_name #=> String
resp.functions[0].request_mapping_template #=> String
resp.functions[0].response_mapping_template #=> String
resp.functions[0].function_version #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :api_id (required, String)

    The GraphQL 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:



1323
1324
1325
1326
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1323

def list_functions(params = {}, options = {})
  req = build_request(:list_functions, 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].log_config.exclude_verbose_content #=> Boolean
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.graphql_apis[0].tags #=> Hash
resp.graphql_apis[0].tags["TagKey"] #=> String
resp.graphql_apis[0].additional_authentication_providers #=> Array
resp.graphql_apis[0].additional_authentication_providers[0].authentication_type #=> String, one of "API_KEY", "AWS_IAM", "AMAZON_COGNITO_USER_POOLS", "OPENID_CONNECT"
resp.graphql_apis[0].additional_authentication_providers[0].open_id_connect_config.issuer #=> String
resp.graphql_apis[0].additional_authentication_providers[0].open_id_connect_config.client_id #=> String
resp.graphql_apis[0].additional_authentication_providers[0].open_id_connect_config.iat_ttl #=> Integer
resp.graphql_apis[0].additional_authentication_providers[0].open_id_connect_config.auth_ttl #=> Integer
resp.graphql_apis[0].additional_authentication_providers[0].user_pool_config.user_pool_id #=> String
resp.graphql_apis[0].additional_authentication_providers[0].user_pool_config.aws_region #=> String
resp.graphql_apis[0].additional_authentication_providers[0].user_pool_config.app_id_client_regex #=> 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:



1387
1388
1389
1390
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1387

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.resolvers[0].kind #=> String, one of "UNIT", "PIPELINE"
resp.resolvers[0].pipeline_config.functions #=> Array
resp.resolvers[0].pipeline_config.functions[0] #=> 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:



1440
1441
1442
1443
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1440

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

#list_resolvers_by_function(params = {}) ⇒ Types::ListResolversByFunctionResponse

List the resolvers that are associated with a specific function.

Examples:

Request syntax with placeholder values


resp = client.list_resolvers_by_function({
  api_id: "String", # required
  function_id: "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.resolvers[0].kind #=> String, one of "UNIT", "PIPELINE"
resp.resolvers[0].pipeline_config.functions #=> Array
resp.resolvers[0].pipeline_config.functions[0] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :api_id (required, String)

    The API ID.

  • :function_id (required, String)

    The Function ID.

  • :next_token (String)

    An identifier that was returned from the previous call to this operation, which you can use 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:



1493
1494
1495
1496
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1493

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

#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse

Lists the tags for a resource.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_arn: "ResourceArn", # required
})

Response structure


resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The GraphqlApi ARN.

Returns:

See Also:



1522
1523
1524
1525
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1522

def list_tags_for_resource(params = {}, options = {})
  req = build_request(:list_tags_for_resource, 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:



1571
1572
1573
1574
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1571

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", "FAILED", "SUCCESS", "NOT_APPLICABLE"

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:



1606
1607
1608
1609
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1606

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

#tag_resource(params = {}) ⇒ Struct

Tags a resource with user-supplied tags.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "ResourceArn", # required
  tags: { # required
    "TagKey" => "TagValue",
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The GraphqlApi ARN.

  • :tags (required, Hash<String,String>)

    A TagMap object.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1634
1635
1636
1637
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1634

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

#untag_resource(params = {}) ⇒ Struct

Untags a resource.

Examples:

Request syntax with placeholder values


resp = client.untag_resource({
  resource_arn: "ResourceArn", # required
  tag_keys: ["TagKey"], # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The GraphqlApi ARN.

  • :tag_keys (required, Array<String>)

    A list of TagKey objects.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1660
1661
1662
1663
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1660

def untag_resource(params = {}, options = {})
  req = build_request(:untag_resource, 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:



1703
1704
1705
1706
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1703

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, RELATIONAL_DATABASE
  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",
    authorization_config: {
      authorization_type: "AWS_IAM", # required, accepts AWS_IAM
      aws_iam_config: {
        signing_region: "String",
        signing_service_name: "String",
      },
    },
  },
  relational_database_config: {
    relational_database_source_type: "RDS_HTTP_ENDPOINT", # accepts RDS_HTTP_ENDPOINT
    rds_http_endpoint_config: {
      aws_region: "String",
      db_cluster_identifier: "String",
      database_name: "String",
      schema: "String",
      aws_secret_store_arn: "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", "RELATIONAL_DATABASE"
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
resp.data_source.http_config.authorization_config.authorization_type #=> String, one of "AWS_IAM"
resp.data_source.http_config.authorization_config.aws_iam_config.signing_region #=> String
resp.data_source.http_config.authorization_config.aws_iam_config.signing_service_name #=> String
resp.data_source.relational_database_config.relational_database_source_type #=> String, one of "RDS_HTTP_ENDPOINT"
resp.data_source.relational_database_config.rds_http_endpoint_config.aws_region #=> String
resp.data_source.relational_database_config.rds_http_endpoint_config.db_cluster_identifier #=> String
resp.data_source.relational_database_config.rds_http_endpoint_config.database_name #=> String
resp.data_source.relational_database_config.rds_http_endpoint_config.schema #=> String
resp.data_source.relational_database_config.rds_http_endpoint_config.aws_secret_store_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

Returns:

See Also:



1814
1815
1816
1817
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1814

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

#update_function(params = {}) ⇒ Types::UpdateFunctionResponse

Updates a Function object.

Examples:

Request syntax with placeholder values


resp = client.update_function({
  api_id: "String", # required
  name: "ResourceName", # required
  description: "String",
  function_id: "ResourceName", # required
  data_source_name: "ResourceName", # required
  request_mapping_template: "MappingTemplate", # required
  response_mapping_template: "MappingTemplate",
  function_version: "String", # required
})

Response structure


resp.function_configuration.function_id #=> String
resp.function_configuration.function_arn #=> String
resp.function_configuration.name #=> String
resp.function_configuration.description #=> String
resp.function_configuration.data_source_name #=> String
resp.function_configuration.request_mapping_template #=> String
resp.function_configuration.response_mapping_template #=> String
resp.function_configuration.function_version #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :api_id (required, String)

    The GraphQL API ID.

  • :name (required, String)

    The Function name.

  • :description (String)

    The Function description.

  • :function_id (required, String)

    The function ID.

  • :data_source_name (required, String)

    The Function DataSource name.

  • :request_mapping_template (required, String)

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

  • :response_mapping_template (String)

    The Function request mapping template.

  • :function_version (required, String)

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

Returns:

See Also:



1879
1880
1881
1882
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1879

def update_function(params = {}, options = {})
  req = build_request(:update_function, 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
    exclude_verbose_content: false,
  },
  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,
  },
  additional_authentication_providers: [
    {
      authentication_type: "API_KEY", # accepts API_KEY, AWS_IAM, AMAZON_COGNITO_USER_POOLS, OPENID_CONNECT
      open_id_connect_config: {
        issuer: "String", # required
        client_id: "String",
        iat_ttl: 1,
        auth_ttl: 1,
      },
      user_pool_config: {
        user_pool_id: "String", # required
        aws_region: "String", # required
        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", "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.log_config.exclude_verbose_content #=> Boolean
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
resp.graphql_api.tags #=> Hash
resp.graphql_api.tags["TagKey"] #=> String
resp.graphql_api.additional_authentication_providers #=> Array
resp.graphql_api.additional_authentication_providers[0].authentication_type #=> String, one of "API_KEY", "AWS_IAM", "AMAZON_COGNITO_USER_POOLS", "OPENID_CONNECT"
resp.graphql_api.additional_authentication_providers[0].open_id_connect_config.issuer #=> String
resp.graphql_api.additional_authentication_providers[0].open_id_connect_config.client_id #=> String
resp.graphql_api.additional_authentication_providers[0].open_id_connect_config.iat_ttl #=> Integer
resp.graphql_api.additional_authentication_providers[0].open_id_connect_config.auth_ttl #=> Integer
resp.graphql_api.additional_authentication_providers[0].user_pool_config.user_pool_id #=> String
resp.graphql_api.additional_authentication_providers[0].user_pool_config.aws_region #=> String
resp.graphql_api.additional_authentication_providers[0].user_pool_config.app_id_client_regex #=> 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 OpenID Connect configuration for the GraphqlApi object.

  • :additional_authentication_providers (Array<Types::AdditionalAuthenticationProvider>)

    A list of additional authentication providers for the GraphqlApi API.

Returns:

See Also:



1989
1990
1991
1992
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 1989

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",
  request_mapping_template: "MappingTemplate", # required
  response_mapping_template: "MappingTemplate",
  kind: "UNIT", # accepts UNIT, PIPELINE
  pipeline_config: {
    functions: ["String"],
  },
})

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
resp.resolver.kind #=> String, one of "UNIT", "PIPELINE"
resp.resolver.pipeline_config.functions #=> Array
resp.resolver.pipeline_config.functions[0] #=> 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 (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.

  • :kind (String)

    The resolver type.

    • UNIT: A UNIT resolver type. A UNIT resolver is the default resolver type. A UNIT resolver enables you to execute a GraphQL query against a single data source.

    • PIPELINE: A PIPELINE resolver type. A PIPELINE resolver enables you to execute a series of Function in a serial manner. You can use a pipeline resolver to execute a GraphQL query against multiple data sources.

  • :pipeline_config (Types::PipelineConfig)

    The PipelineConfig.

Returns:

See Also:



2064
2065
2066
2067
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 2064

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:



2108
2109
2110
2111
# File 'gems/aws-sdk-appsync/lib/aws-sdk-appsync/client.rb', line 2108

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