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

Class: Aws::CloudSearch::Client

Inherits:
Seahorse::Client::Base show all
Defined in:
(unknown)

Overview

An API client for Amazon CloudSearch. To construct a client, you need to configure a :region and :credentials.

cloudsearch = Aws::CloudSearch::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

See #initialize for a full list of supported configuration options.

Region

You can configure a default region in the following locations:

  • ENV['AWS_REGION']
  • Aws.config[:region]

Go here for a list of supported regions.

Credentials

Default credentials are loaded automatically from the following locations:

  • ENV['AWS_ACCESS_KEY_ID'] and ENV['AWS_SECRET_ACCESS_KEY']
  • Aws.config[:credentials]
  • The shared credentials ini file at ~/.aws/credentials (more information)
  • From an instance profile when running on EC2

You can also construct a credentials object from one of the following classes:

Alternatively, you configure credentials with :access_key_id and :secret_access_key:

# load credentials from disk
creds = YAML.load(File.read('/path/to/secrets'))

Aws::CloudSearch::Client.new(
  access_key_id: creds['access_key_id'],
  secret_access_key: creds['secret_access_key']
)

Always load your credentials from outside your application. Avoid configuring credentials statically and never commit them to source control.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

Constructor collapse

API Operations collapse

Instance Method Summary collapse

Methods inherited from Seahorse::Client::Base

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

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options = {}) ⇒ Aws::CloudSearch::Client

Constructs an API client.

Options Hash (options):

  • :access_key_id (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types. See Plugins::ParamConverter for more details.

  • :credentials (required, Credentials)

    Your AWS credentials. The following locations will be searched in order for credentials:

    • :access_key_id, :secret_access_key, and :session_token options
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • HOME/.aws/credentials shared credentials file
    • EC2 instance profile credentials See Plugins::RequestSigner for more details.
  • :endpoint (String)

    A default endpoint is constructed from the :region. See Plugins::RegionalEndpoint for more details.

  • :http_continue_timeout (Float) — default: 1

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_idle_timeout (Integer) — default: 5

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_open_timeout (Integer) — default: 15

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_proxy (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_read_timeout (Integer) — default: 60

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_wire_trace (Boolean) — default: false

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the logger at. See Plugins::Logging for more details.

  • :log_formatter (Logging::LogFormatter)

    The log formatter. Defaults to Seahorse::Client::Logging::Formatter.default. See Plugins::Logging for more details.

  • :logger (Logger) — default: nil

    The Logger instance to send log messages to. If this option is not set, logging will be disabled. See Plugins::Logging for more details.

  • :profile (String)

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used. See Plugins::RequestSigner for more details.

  • :raise_response_errors (Boolean) — default: true

    When true, response errors are raised. See Seahorse::Client::Plugins::RaiseResponseErrors for more details.

  • :region (required, String)

    The AWS region to connect to. The region is used to construct the client endpoint. Defaults to ENV['AWS_REGION']. Also checks AMAZON_REGION and AWS_DEFAULT_REGION. See Plugins::RegionalEndpoint for more details.

  • :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. See Plugins::RetryErrors for more details.

  • :secret_access_key (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :session_token (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :ssl_ca_bundle (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_directory (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_store (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_verify_peer (Boolean) — default: true

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :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 Aws::ClientStubs#stub_responses. See Aws::ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled. See Plugins::StubResponses for more details.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request. See Plugins::ParamValidator for more details.

Instance Method Details

#build_suggesters(options = {}) ⇒ Types::BuildSuggestersResponse

Indexes the search suggestions. For more information, see Configuring Suggesters in the Amazon CloudSearch Developer Guide.

Examples:

Request syntax with placeholder values


resp = client.build_suggesters({
  domain_name: "DomainName", # required
})

Response structure


resp.field_names #=> Array
resp.field_names[0] #=> String

Options Hash (options):

  • :domain_name (required, String)

    A string that represents the name of a domain. Domain names are unique across the domains owned by an account within an AWS region. Domain names start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen).

Returns:

#create_domain(options = {}) ⇒ Types::CreateDomainResponse

Creates a new search domain. For more information, see Creating a Search Domain in the Amazon CloudSearch Developer Guide.

Examples:

Request syntax with placeholder values


resp = client.create_domain({
  domain_name: "DomainName", # required
})

Response structure


resp.domain_status.domain_id #=> String
resp.domain_status.domain_name #=> String
resp.domain_status.arn #=> String
resp.domain_status.created #=> true/false
resp.domain_status.deleted #=> true/false
resp.domain_status.doc_service.endpoint #=> String
resp.domain_status.search_service.endpoint #=> String
resp.domain_status.requires_index_documents #=> true/false
resp.domain_status.processing #=> true/false
resp.domain_status.search_instance_type #=> String
resp.domain_status.search_partition_count #=> Integer
resp.domain_status.search_instance_count #=> Integer
resp.domain_status.limits.maximum_replication_count #=> Integer
resp.domain_status.limits.maximum_partition_count #=> Integer

Options Hash (options):

  • :domain_name (required, String)

    A name for the domain you are creating. Allowed characters are a-z (lower-case letters), 0-9, and hyphen (-). Domain names must start with a letter or number and be at least 3 and no more than 28 characters long.

Returns:

#define_analysis_scheme(options = {}) ⇒ Types::DefineAnalysisSchemeResponse

Configures an analysis scheme that can be applied to a text or text-array field to define language-specific text processing options. For more information, see Configuring Analysis Schemes in the Amazon CloudSearch Developer Guide.

Examples:

Request syntax with placeholder values


resp = client.define_analysis_scheme({
  domain_name: "DomainName", # required
  analysis_scheme: { # required
    analysis_scheme_name: "StandardName", # required
    analysis_scheme_language: "ar", # required, accepts ar, bg, ca, cs, da, de, el, en, es, eu, fa, fi, fr, ga, gl, he, hi, hu, hy, id, it, ja, ko, lv, mul, nl, no, pt, ro, ru, sv, th, tr, zh-Hans, zh-Hant
    analysis_options: {
      synonyms: "String",
      stopwords: "String",
      stemming_dictionary: "String",
      japanese_tokenization_dictionary: "String",
      algorithmic_stemming: "none", # accepts none, minimal, light, full
    },
  },
})

Response structure


resp.analysis_scheme.options.analysis_scheme_name #=> String
resp.analysis_scheme.options.analysis_scheme_language #=> String, one of "ar", "bg", "ca", "cs", "da", "de", "el", "en", "es", "eu", "fa", "fi", "fr", "ga", "gl", "he", "hi", "hu", "hy", "id", "it", "ja", "ko", "lv", "mul", "nl", "no", "pt", "ro", "ru", "sv", "th", "tr", "zh-Hans", "zh-Hant"
resp.analysis_scheme.options.analysis_options.synonyms #=> String
resp.analysis_scheme.options.analysis_options.stopwords #=> String
resp.analysis_scheme.options.analysis_options.stemming_dictionary #=> String
resp.analysis_scheme.options.analysis_options.japanese_tokenization_dictionary #=> String
resp.analysis_scheme.options.analysis_options.algorithmic_stemming #=> String, one of "none", "minimal", "light", "full"
resp.analysis_scheme.status.creation_date #=> Time
resp.analysis_scheme.status.update_date #=> Time
resp.analysis_scheme.status.update_version #=> Integer
resp.analysis_scheme.status.state #=> String, one of "RequiresIndexDocuments", "Processing", "Active", "FailedToValidate"
resp.analysis_scheme.status.pending_deletion #=> true/false

Options Hash (options):

  • :domain_name (required, String)

    A string that represents the name of a domain. Domain names are unique across the domains owned by an account within an AWS region. Domain names start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen).

  • :analysis_scheme (required, Types::AnalysisScheme)

    Configuration information for an analysis scheme. Each analysis scheme has a unique name and specifies the language of the text to be processed. The following options can be configured for an analysis scheme: Synonyms, Stopwords, StemmingDictionary, JapaneseTokenizationDictionary and AlgorithmicStemming.

Returns:

#define_expression(options = {}) ⇒ Types::DefineExpressionResponse

Configures an Expression for the search domain. Used to create new expressions and modify existing ones. If the expression exists, the new configuration replaces the old one. For more information, see Configuring Expressions in the Amazon CloudSearch Developer Guide.

Examples:

Request syntax with placeholder values


resp = client.define_expression({
  domain_name: "DomainName", # required
  expression: { # required
    expression_name: "StandardName", # required
    expression_value: "ExpressionValue", # required
  },
})

Response structure


resp.expression.options.expression_name #=> String
resp.expression.options.expression_value #=> String
resp.expression.status.creation_date #=> Time
resp.expression.status.update_date #=> Time
resp.expression.status.update_version #=> Integer
resp.expression.status.state #=> String, one of "RequiresIndexDocuments", "Processing", "Active", "FailedToValidate"
resp.expression.status.pending_deletion #=> true/false

Options Hash (options):

  • :domain_name (required, String)

    A string that represents the name of a domain. Domain names are unique across the domains owned by an account within an AWS region. Domain names start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen).

  • :expression (required, Types::Expression)

    A named expression that can be evaluated at search time. Can be used to sort the search results, define other expressions, or return computed information in the search results.

Returns:

#define_index_field(options = {}) ⇒ Types::DefineIndexFieldResponse

Configures an IndexField for the search domain. Used to create new fields and modify existing ones. You must specify the name of the domain you are configuring and an index field configuration. The index field configuration specifies a unique name, the index field type, and the options you want to configure for the field. The options you can specify depend on the IndexFieldType. If the field exists, the new configuration replaces the old one. For more information, see Configuring Index Fields in the Amazon CloudSearch Developer Guide.

Examples:

Request syntax with placeholder values


resp = client.define_index_field({
  domain_name: "DomainName", # required
  index_field: { # required
    index_field_name: "DynamicFieldName", # required
    index_field_type: "int", # required, accepts int, double, literal, text, date, latlon, int-array, double-array, literal-array, text-array, date-array
    int_options: {
      default_value: 1,
      source_field: "FieldName",
      facet_enabled: false,
      search_enabled: false,
      return_enabled: false,
      sort_enabled: false,
    },
    double_options: {
      default_value: 1.0,
      source_field: "FieldName",
      facet_enabled: false,
      search_enabled: false,
      return_enabled: false,
      sort_enabled: false,
    },
    literal_options: {
      default_value: "FieldValue",
      source_field: "FieldName",
      facet_enabled: false,
      search_enabled: false,
      return_enabled: false,
      sort_enabled: false,
    },
    text_options: {
      default_value: "FieldValue",
      source_field: "FieldName",
      return_enabled: false,
      sort_enabled: false,
      highlight_enabled: false,
      analysis_scheme: "Word",
    },
    date_options: {
      default_value: "FieldValue",
      source_field: "FieldName",
      facet_enabled: false,
      search_enabled: false,
      return_enabled: false,
      sort_enabled: false,
    },
    lat_lon_options: {
      default_value: "FieldValue",
      source_field: "FieldName",
      facet_enabled: false,
      search_enabled: false,
      return_enabled: false,
      sort_enabled: false,
    },
    int_array_options: {
      default_value: 1,
      source_fields: "FieldNameCommaList",
      facet_enabled: false,
      search_enabled: false,
      return_enabled: false,
    },
    double_array_options: {
      default_value: 1.0,
      source_fields: "FieldNameCommaList",
      facet_enabled: false,
      search_enabled: false,
      return_enabled: false,
    },
    literal_array_options: {
      default_value: "FieldValue",
      source_fields: "FieldNameCommaList",
      facet_enabled: false,
      search_enabled: false,
      return_enabled: false,
    },
    text_array_options: {
      default_value: "FieldValue",
      source_fields: "FieldNameCommaList",
      return_enabled: false,
      highlight_enabled: false,
      analysis_scheme: "Word",
    },
    date_array_options: {
      default_value: "FieldValue",
      source_fields: "FieldNameCommaList",
      facet_enabled: false,
      search_enabled: false,
      return_enabled: false,
    },
  },
})

Response structure


resp.index_field.options.index_field_name #=> String
resp.index_field.options.index_field_type #=> String, one of "int", "double", "literal", "text", "date", "latlon", "int-array", "double-array", "literal-array", "text-array", "date-array"
resp.index_field.options.int_options.default_value #=> Integer
resp.index_field.options.int_options.source_field #=> String
resp.index_field.options.int_options.facet_enabled #=> true/false
resp.index_field.options.int_options.search_enabled #=> true/false
resp.index_field.options.int_options.return_enabled #=> true/false
resp.index_field.options.int_options.sort_enabled #=> true/false
resp.index_field.options.double_options.default_value #=> Float
resp.index_field.options.double_options.source_field #=> String
resp.index_field.options.double_options.facet_enabled #=> true/false
resp.index_field.options.double_options.search_enabled #=> true/false
resp.index_field.options.double_options.return_enabled #=> true/false
resp.index_field.options.double_options.sort_enabled #=> true/false
resp.index_field.options.literal_options.default_value #=> String
resp.index_field.options.literal_options.source_field #=> String
resp.index_field.options.literal_options.facet_enabled #=> true/false
resp.index_field.options.literal_options.search_enabled #=> true/false
resp.index_field.options.literal_options.return_enabled #=> true/false
resp.index_field.options.literal_options.sort_enabled #=> true/false
resp.index_field.options.text_options.default_value #=> String
resp.index_field.options.text_options.source_field #=> String
resp.index_field.options.text_options.return_enabled #=> true/false
resp.index_field.options.text_options.sort_enabled #=> true/false
resp.index_field.options.text_options.highlight_enabled #=> true/false
resp.index_field.options.text_options.analysis_scheme #=> String
resp.index_field.options.date_options.default_value #=> String
resp.index_field.options.date_options.source_field #=> String
resp.index_field.options.date_options.facet_enabled #=> true/false
resp.index_field.options.date_options.search_enabled #=> true/false
resp.index_field.options.date_options.return_enabled #=> true/false
resp.index_field.options.date_options.sort_enabled #=> true/false
resp.index_field.options.lat_lon_options.default_value #=> String
resp.index_field.options.lat_lon_options.source_field #=> String
resp.index_field.options.lat_lon_options.facet_enabled #=> true/false
resp.index_field.options.lat_lon_options.search_enabled #=> true/false
resp.index_field.options.lat_lon_options.return_enabled #=> true/false
resp.index_field.options.lat_lon_options.sort_enabled #=> true/false
resp.index_field.options.int_array_options.default_value #=> Integer
resp.index_field.options.int_array_options.source_fields #=> String
resp.index_field.options.int_array_options.facet_enabled #=> true/false
resp.index_field.options.int_array_options.search_enabled #=> true/false
resp.index_field.options.int_array_options.return_enabled #=> true/false
resp.index_field.options.double_array_options.default_value #=> Float
resp.index_field.options.double_array_options.source_fields #=> String
resp.index_field.options.double_array_options.facet_enabled #=> true/false
resp.index_field.options.double_array_options.search_enabled #=> true/false
resp.index_field.options.double_array_options.return_enabled #=> true/false
resp.index_field.options.literal_array_options.default_value #=> String
resp.index_field.options.literal_array_options.source_fields #=> String
resp.index_field.options.literal_array_options.facet_enabled #=> true/false
resp.index_field.options.literal_array_options.search_enabled #=> true/false
resp.index_field.options.literal_array_options.return_enabled #=> true/false
resp.index_field.options.text_array_options.default_value #=> String
resp.index_field.options.text_array_options.source_fields #=> String
resp.index_field.options.text_array_options.return_enabled #=> true/false
resp.index_field.options.text_array_options.highlight_enabled #=> true/false
resp.index_field.options.text_array_options.analysis_scheme #=> String
resp.index_field.options.date_array_options.default_value #=> String
resp.index_field.options.date_array_options.source_fields #=> String
resp.index_field.options.date_array_options.facet_enabled #=> true/false
resp.index_field.options.date_array_options.search_enabled #=> true/false
resp.index_field.options.date_array_options.return_enabled #=> true/false
resp.index_field.status.creation_date #=> Time
resp.index_field.status.update_date #=> Time
resp.index_field.status.update_version #=> Integer
resp.index_field.status.state #=> String, one of "RequiresIndexDocuments", "Processing", "Active", "FailedToValidate"
resp.index_field.status.pending_deletion #=> true/false

Options Hash (options):

  • :domain_name (required, String)

    A string that represents the name of a domain. Domain names are unique across the domains owned by an account within an AWS region. Domain names start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen).

  • :index_field (required, Types::IndexField)

    The index field and field options you want to configure.

Returns:

#define_suggester(options = {}) ⇒ Types::DefineSuggesterResponse

Configures a suggester for a domain. A suggester enables you to display possible matches before users finish typing their queries. When you configure a suggester, you must specify the name of the text field you want to search for possible matches and a unique name for the suggester. For more information, see Getting Search Suggestions in the Amazon CloudSearch Developer Guide.

Examples:

Request syntax with placeholder values


resp = client.define_suggester({
  domain_name: "DomainName", # required
  suggester: { # required
    suggester_name: "StandardName", # required
    document_suggester_options: { # required
      source_field: "FieldName", # required
      fuzzy_matching: "none", # accepts none, low, high
      sort_expression: "String",
    },
  },
})

Response structure


resp.suggester.options.suggester_name #=> String
resp.suggester.options.document_suggester_options.source_field #=> String
resp.suggester.options.document_suggester_options.fuzzy_matching #=> String, one of "none", "low", "high"
resp.suggester.options.document_suggester_options.sort_expression #=> String
resp.suggester.status.creation_date #=> Time
resp.suggester.status.update_date #=> Time
resp.suggester.status.update_version #=> Integer
resp.suggester.status.state #=> String, one of "RequiresIndexDocuments", "Processing", "Active", "FailedToValidate"
resp.suggester.status.pending_deletion #=> true/false

Options Hash (options):

  • :domain_name (required, String)

    A string that represents the name of a domain. Domain names are unique across the domains owned by an account within an AWS region. Domain names start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen).

  • :suggester (required, Types::Suggester)

    Configuration information for a search suggester. Each suggester has a unique name and specifies the text field you want to use for suggestions. The following options can be configured for a suggester: FuzzyMatching, SortExpression.

Returns:

#delete_analysis_scheme(options = {}) ⇒ Types::DeleteAnalysisSchemeResponse

Deletes an analysis scheme. For more information, see Configuring Analysis Schemes in the Amazon CloudSearch Developer Guide.

Examples:

Request syntax with placeholder values


resp = client.delete_analysis_scheme({
  domain_name: "DomainName", # required
  analysis_scheme_name: "StandardName", # required
})

Response structure


resp.analysis_scheme.options.analysis_scheme_name #=> String
resp.analysis_scheme.options.analysis_scheme_language #=> String, one of "ar", "bg", "ca", "cs", "da", "de", "el", "en", "es", "eu", "fa", "fi", "fr", "ga", "gl", "he", "hi", "hu", "hy", "id", "it", "ja", "ko", "lv", "mul", "nl", "no", "pt", "ro", "ru", "sv", "th", "tr", "zh-Hans", "zh-Hant"
resp.analysis_scheme.options.analysis_options.synonyms #=> String
resp.analysis_scheme.options.analysis_options.stopwords #=> String
resp.analysis_scheme.options.analysis_options.stemming_dictionary #=> String
resp.analysis_scheme.options.analysis_options.japanese_tokenization_dictionary #=> String
resp.analysis_scheme.options.analysis_options.algorithmic_stemming #=> String, one of "none", "minimal", "light", "full"
resp.analysis_scheme.status.creation_date #=> Time
resp.analysis_scheme.status.update_date #=> Time
resp.analysis_scheme.status.update_version #=> Integer
resp.analysis_scheme.status.state #=> String, one of "RequiresIndexDocuments", "Processing", "Active", "FailedToValidate"
resp.analysis_scheme.status.pending_deletion #=> true/false

Options Hash (options):

  • :domain_name (required, String)

    A string that represents the name of a domain. Domain names are unique across the domains owned by an account within an AWS region. Domain names start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen).

  • :analysis_scheme_name (required, String)

    The name of the analysis scheme you want to delete.

Returns:

#delete_domain(options = {}) ⇒ Types::DeleteDomainResponse

Permanently deletes a search domain and all of its data. Once a domain has been deleted, it cannot be recovered. For more information, see Deleting a Search Domain in the Amazon CloudSearch Developer Guide.

Examples:

Request syntax with placeholder values


resp = client.delete_domain({
  domain_name: "DomainName", # required
})

Response structure


resp.domain_status.domain_id #=> String
resp.domain_status.domain_name #=> String
resp.domain_status.arn #=> String
resp.domain_status.created #=> true/false
resp.domain_status.deleted #=> true/false
resp.domain_status.doc_service.endpoint #=> String
resp.domain_status.search_service.endpoint #=> String
resp.domain_status.requires_index_documents #=> true/false
resp.domain_status.processing #=> true/false
resp.domain_status.search_instance_type #=> String
resp.domain_status.search_partition_count #=> Integer
resp.domain_status.search_instance_count #=> Integer
resp.domain_status.limits.maximum_replication_count #=> Integer
resp.domain_status.limits.maximum_partition_count #=> Integer

Options Hash (options):

  • :domain_name (required, String)

    The name of the domain you want to permanently delete.

Returns:

#delete_expression(options = {}) ⇒ Types::DeleteExpressionResponse

Removes an Expression from the search domain. For more information, see Configuring Expressions in the Amazon CloudSearch Developer Guide.

Examples:

Request syntax with placeholder values


resp = client.delete_expression({
  domain_name: "DomainName", # required
  expression_name: "StandardName", # required
})

Response structure


resp.expression.options.expression_name #=> String
resp.expression.options.expression_value #=> String
resp.expression.status.creation_date #=> Time
resp.expression.status.update_date #=> Time
resp.expression.status.update_version #=> Integer
resp.expression.status.state #=> String, one of "RequiresIndexDocuments", "Processing", "Active", "FailedToValidate"
resp.expression.status.pending_deletion #=> true/false

Options Hash (options):

  • :domain_name (required, String)

    A string that represents the name of a domain. Domain names are unique across the domains owned by an account within an AWS region. Domain names start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen).

  • :expression_name (required, String)

    The name of the Expression to delete.

Returns:

#delete_index_field(options = {}) ⇒ Types::DeleteIndexFieldResponse

Removes an IndexField from the search domain. For more information, see Configuring Index Fields in the Amazon CloudSearch Developer Guide.

Examples:

Request syntax with placeholder values


resp = client.delete_index_field({
  domain_name: "DomainName", # required
  index_field_name: "DynamicFieldName", # required
})

Response structure


resp.index_field.options.index_field_name #=> String
resp.index_field.options.index_field_type #=> String, one of "int", "double", "literal", "text", "date", "latlon", "int-array", "double-array", "literal-array", "text-array", "date-array"
resp.index_field.options.int_options.default_value #=> Integer
resp.index_field.options.int_options.source_field #=> String
resp.index_field.options.int_options.facet_enabled #=> true/false
resp.index_field.options.int_options.search_enabled #=> true/false
resp.index_field.options.int_options.return_enabled #=> true/false
resp.index_field.options.int_options.sort_enabled #=> true/false
resp.index_field.options.double_options.default_value #=> Float
resp.index_field.options.double_options.source_field #=> String
resp.index_field.options.double_options.facet_enabled #=> true/false
resp.index_field.options.double_options.search_enabled #=> true/false
resp.index_field.options.double_options.return_enabled #=> true/false
resp.index_field.options.double_options.sort_enabled #=> true/false
resp.index_field.options.literal_options.default_value #=> String
resp.index_field.options.literal_options.source_field #=> String
resp.index_field.options.literal_options.facet_enabled #=> true/false
resp.index_field.options.literal_options.search_enabled #=> true/false
resp.index_field.options.literal_options.return_enabled #=> true/false
resp.index_field.options.literal_options.sort_enabled #=> true/false
resp.index_field.options.text_options.default_value #=> String
resp.index_field.options.text_options.source_field #=> String
resp.index_field.options.text_options.return_enabled #=> true/false
resp.index_field.options.text_options.sort_enabled #=> true/false
resp.index_field.options.text_options.highlight_enabled #=> true/false
resp.index_field.options.text_options.analysis_scheme #=> String
resp.index_field.options.date_options.default_value #=> String
resp.index_field.options.date_options.source_field #=> String
resp.index_field.options.date_options.facet_enabled #=> true/false
resp.index_field.options.date_options.search_enabled #=> true/false
resp.index_field.options.date_options.return_enabled #=> true/false
resp.index_field.options.date_options.sort_enabled #=> true/false
resp.index_field.options.lat_lon_options.default_value #=> String
resp.index_field.options.lat_lon_options.source_field #=> String
resp.index_field.options.lat_lon_options.facet_enabled #=> true/false
resp.index_field.options.lat_lon_options.search_enabled #=> true/false
resp.index_field.options.lat_lon_options.return_enabled #=> true/false
resp.index_field.options.lat_lon_options.sort_enabled #=> true/false
resp.index_field.options.int_array_options.default_value #=> Integer
resp.index_field.options.int_array_options.source_fields #=> String
resp.index_field.options.int_array_options.facet_enabled #=> true/false
resp.index_field.options.int_array_options.search_enabled #=> true/false
resp.index_field.options.int_array_options.return_enabled #=> true/false
resp.index_field.options.double_array_options.default_value #=> Float
resp.index_field.options.double_array_options.source_fields #=> String
resp.index_field.options.double_array_options.facet_enabled #=> true/false
resp.index_field.options.double_array_options.search_enabled #=> true/false
resp.index_field.options.double_array_options.return_enabled #=> true/false
resp.index_field.options.literal_array_options.default_value #=> String
resp.index_field.options.literal_array_options.source_fields #=> String
resp.index_field.options.literal_array_options.facet_enabled #=> true/false
resp.index_field.options.literal_array_options.search_enabled #=> true/false
resp.index_field.options.literal_array_options.return_enabled #=> true/false
resp.index_field.options.text_array_options.default_value #=> String
resp.index_field.options.text_array_options.source_fields #=> String
resp.index_field.options.text_array_options.return_enabled #=> true/false
resp.index_field.options.text_array_options.highlight_enabled #=> true/false
resp.index_field.options.text_array_options.analysis_scheme #=> String
resp.index_field.options.date_array_options.default_value #=> String
resp.index_field.options.date_array_options.source_fields #=> String
resp.index_field.options.date_array_options.facet_enabled #=> true/false
resp.index_field.options.date_array_options.search_enabled #=> true/false
resp.index_field.options.date_array_options.return_enabled #=> true/false
resp.index_field.status.creation_date #=> Time
resp.index_field.status.update_date #=> Time
resp.index_field.status.update_version #=> Integer
resp.index_field.status.state #=> String, one of "RequiresIndexDocuments", "Processing", "Active", "FailedToValidate"
resp.index_field.status.pending_deletion #=> true/false

Options Hash (options):

  • :domain_name (required, String)

    A string that represents the name of a domain. Domain names are unique across the domains owned by an account within an AWS region. Domain names start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen).

  • :index_field_name (required, String)

    The name of the index field your want to remove from the domain\'s indexing options.

Returns:

#delete_suggester(options = {}) ⇒ Types::DeleteSuggesterResponse

Deletes a suggester. For more information, see Getting Search Suggestions in the Amazon CloudSearch Developer Guide.

Examples:

Request syntax with placeholder values


resp = client.delete_suggester({
  domain_name: "DomainName", # required
  suggester_name: "StandardName", # required
})

Response structure


resp.suggester.options.suggester_name #=> String
resp.suggester.options.document_suggester_options.source_field #=> String
resp.suggester.options.document_suggester_options.fuzzy_matching #=> String, one of "none", "low", "high"
resp.suggester.options.document_suggester_options.sort_expression #=> String
resp.suggester.status.creation_date #=> Time
resp.suggester.status.update_date #=> Time
resp.suggester.status.update_version #=> Integer
resp.suggester.status.state #=> String, one of "RequiresIndexDocuments", "Processing", "Active", "FailedToValidate"
resp.suggester.status.pending_deletion #=> true/false

Options Hash (options):

  • :domain_name (required, String)

    A string that represents the name of a domain. Domain names are unique across the domains owned by an account within an AWS region. Domain names start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen).

  • :suggester_name (required, String)

    Specifies the name of the suggester you want to delete.

Returns:

#describe_analysis_schemes(options = {}) ⇒ Types::DescribeAnalysisSchemesResponse

Gets the analysis schemes configured for a domain. An analysis scheme defines language-specific text processing options for a text field. Can be limited to specific analysis schemes by name. By default, shows all analysis schemes and includes any pending changes to the configuration. Set the Deployed option to true to show the active configuration and exclude pending changes. For more information, see Configuring Analysis Schemes in the Amazon CloudSearch Developer Guide.

Examples:

Request syntax with placeholder values


resp = client.describe_analysis_schemes({
  domain_name: "DomainName", # required
  analysis_scheme_names: ["StandardName"],
  deployed: false,
})

Response structure


resp.analysis_schemes #=> Array
resp.analysis_schemes[0].options.analysis_scheme_name #=> String
resp.analysis_schemes[0].options.analysis_scheme_language #=> String, one of "ar", "bg", "ca", "cs", "da", "de", "el", "en", "es", "eu", "fa", "fi", "fr", "ga", "gl", "he", "hi", "hu", "hy", "id", "it", "ja", "ko", "lv", "mul", "nl", "no", "pt", "ro", "ru", "sv", "th", "tr", "zh-Hans", "zh-Hant"
resp.analysis_schemes[0].options.analysis_options.synonyms #=> String
resp.analysis_schemes[0].options.analysis_options.stopwords #=> String
resp.analysis_schemes[0].options.analysis_options.stemming_dictionary #=> String
resp.analysis_schemes[0].options.analysis_options.japanese_tokenization_dictionary #=> String
resp.analysis_schemes[0].options.analysis_options.algorithmic_stemming #=> String, one of "none", "minimal", "light", "full"
resp.analysis_schemes[0].status.creation_date #=> Time
resp.analysis_schemes[0].status.update_date #=> Time
resp.analysis_schemes[0].status.update_version #=> Integer
resp.analysis_schemes[0].status.state #=> String, one of "RequiresIndexDocuments", "Processing", "Active", "FailedToValidate"
resp.analysis_schemes[0].status.pending_deletion #=> true/false

Options Hash (options):

  • :domain_name (required, String)

    The name of the domain you want to describe.

  • :analysis_scheme_names (Array<String>)

    The analysis schemes you want to describe.

  • :deployed (Boolean)

    Whether to display the deployed configuration (true) or include any pending changes (false). Defaults to false.

Returns:

#describe_availability_options(options = {}) ⇒ Types::DescribeAvailabilityOptionsResponse

Gets the availability options configured for a domain. By default, shows the configuration with any pending changes. Set the Deployed option to true to show the active configuration and exclude pending changes. For more information, see Configuring Availability Options in the Amazon CloudSearch Developer Guide.

Examples:

Request syntax with placeholder values


resp = client.describe_availability_options({
  domain_name: "DomainName", # required
  deployed: false,
})

Response structure


resp.availability_options.options #=> true/false
resp.availability_options.status.creation_date #=> Time
resp.availability_options.status.update_date #=> Time
resp.availability_options.status.update_version #=> Integer
resp.availability_options.status.state #=> String, one of "RequiresIndexDocuments", "Processing", "Active", "FailedToValidate"
resp.availability_options.status.pending_deletion #=> true/false

Options Hash (options):

  • :domain_name (required, String)

    The name of the domain you want to describe.

  • :deployed (Boolean)

    Whether to display the deployed configuration (true) or include any pending changes (false). Defaults to false.

Returns:

#describe_domains(options = {}) ⇒ Types::DescribeDomainsResponse

Gets information about the search domains owned by this account. Can be limited to specific domains. Shows all domains by default. To get the number of searchable documents in a domain, use the console or submit a matchall request to your domain's search endpoint: q=matchall&amp;q.parser=structured&amp;size=0. For more information, see Getting Information about a Search Domain in the Amazon CloudSearch Developer Guide.

Examples:

Request syntax with placeholder values


resp = client.describe_domains({
  domain_names: ["DomainName"],
})

Response structure


resp.domain_status_list #=> Array
resp.domain_status_list[0].domain_id #=> String
resp.domain_status_list[0].domain_name #=> String
resp.domain_status_list[0].arn #=> String
resp.domain_status_list[0].created #=> true/false
resp.domain_status_list[0].deleted #=> true/false
resp.domain_status_list[0].doc_service.endpoint #=> String
resp.domain_status_list[0].search_service.endpoint #=> String
resp.domain_status_list[0].requires_index_documents #=> true/false
resp.domain_status_list[0].processing #=> true/false
resp.domain_status_list[0].search_instance_type #=> String
resp.domain_status_list[0].search_partition_count #=> Integer
resp.domain_status_list[0].search_instance_count #=> Integer
resp.domain_status_list[0].limits.maximum_replication_count #=> Integer
resp.domain_status_list[0].limits.maximum_partition_count #=> Integer

Options Hash (options):

  • :domain_names (Array<String>)

    The names of the domains you want to include in the response.

Returns:

#describe_expressions(options = {}) ⇒ Types::DescribeExpressionsResponse

Gets the expressions configured for the search domain. Can be limited to specific expressions by name. By default, shows all expressions and includes any pending changes to the configuration. Set the Deployed option to true to show the active configuration and exclude pending changes. For more information, see Configuring Expressions in the Amazon CloudSearch Developer Guide.

Examples:

Request syntax with placeholder values


resp = client.describe_expressions({
  domain_name: "DomainName", # required
  expression_names: ["StandardName"],
  deployed: false,
})

Response structure


resp.expressions #=> Array
resp.expressions[0].options.expression_name #=> String
resp.expressions[0].options.expression_value #=> String
resp.expressions[0].status.creation_date #=> Time
resp.expressions[0].status.update_date #=> Time
resp.expressions[0].status.update_version #=> Integer
resp.expressions[0].status.state #=> String, one of "RequiresIndexDocuments", "Processing", "Active", "FailedToValidate"
resp.expressions[0].status.pending_deletion #=> true/false

Options Hash (options):

  • :domain_name (required, String)

    The name of the domain you want to describe.

  • :expression_names (Array<String>)

    Limits the DescribeExpressions response to the specified expressions. If not specified, all expressions are shown.

  • :deployed (Boolean)

    Whether to display the deployed configuration (true) or include any pending changes (false). Defaults to false.

Returns:

#describe_index_fields(options = {}) ⇒ Types::DescribeIndexFieldsResponse

Gets information about the index fields configured for the search domain. Can be limited to specific fields by name. By default, shows all fields and includes any pending changes to the configuration. Set the Deployed option to true to show the active configuration and exclude pending changes. For more information, see Getting Domain Information in the Amazon CloudSearch Developer Guide.

Examples:

Request syntax with placeholder values


resp = client.describe_index_fields({
  domain_name: "DomainName", # required
  field_names: ["DynamicFieldName"],
  deployed: false,
})

Response structure


resp.index_fields #=> Array
resp.index_fields[0].options.index_field_name #=> String
resp.index_fields[0].options.index_field_type #=> String, one of "int", "double", "literal", "text", "date", "latlon", "int-array", "double-array", "literal-array", "text-array", "date-array"
resp.index_fields[0].options.int_options.default_value #=> Integer
resp.index_fields[0].options.int_options.source_field #=> String
resp.index_fields[0].options.int_options.facet_enabled #=> true/false
resp.index_fields[0].options.int_options.search_enabled #=> true/false
resp.index_fields[0].options.int_options.return_enabled #=> true/false
resp.index_fields[0].options.int_options.sort_enabled #=> true/false
resp.index_fields[0].options.double_options.default_value #=> Float
resp.index_fields[0].options.double_options.source_field #=> String
resp.index_fields[0].options.double_options.facet_enabled #=> true/false
resp.index_fields[0].options.double_options.search_enabled #=> true/false
resp.index_fields[0].options.double_options.return_enabled #=> true/false
resp.index_fields[0].options.double_options.sort_enabled #=> true/false
resp.index_fields[0].options.literal_options.default_value #=> String
resp.index_fields[0].options.literal_options.source_field #=> String
resp.index_fields[0].options.literal_options.facet_enabled #=> true/false
resp.index_fields[0].options.literal_options.search_enabled #=> true/false
resp.index_fields[0].options.literal_options.return_enabled #=> true/false
resp.index_fields[0].options.literal_options.sort_enabled #=> true/false
resp.index_fields[0].options.text_options.default_value #=> String
resp.index_fields[0].options.text_options.source_field #=> String
resp.index_fields[0].options.text_options.return_enabled #=> true/false
resp.index_fields[0].options.text_options.sort_enabled #=> true/false
resp.index_fields[0].options.text_options.highlight_enabled #=> true/false
resp.index_fields[0].options.text_options.analysis_scheme #=> String
resp.index_fields[0].options.date_options.default_value #=> String
resp.index_fields[0].options.date_options.source_field #=> String
resp.index_fields[0].options.date_options.facet_enabled #=> true/false
resp.index_fields[0].options.date_options.search_enabled #=> true/false
resp.index_fields[0].options.date_options.return_enabled #=> true/false
resp.index_fields[0].options.date_options.sort_enabled #=> true/false
resp.index_fields[0].options.lat_lon_options.default_value #=> String
resp.index_fields[0].options.lat_lon_options.source_field #=> String
resp.index_fields[0].options.lat_lon_options.facet_enabled #=> true/false
resp.index_fields[0].options.lat_lon_options.search_enabled #=> true/false
resp.index_fields[0].options.lat_lon_options.return_enabled #=> true/false
resp.index_fields[0].options.lat_lon_options.sort_enabled #=> true/false
resp.index_fields[0].options.int_array_options.default_value #=> Integer
resp.index_fields[0].options.int_array_options.source_fields #=> String
resp.index_fields[0].options.int_array_options.facet_enabled #=> true/false
resp.index_fields[0].options.int_array_options.search_enabled #=> true/false
resp.index_fields[0].options.int_array_options.return_enabled #=> true/false
resp.index_fields[0].options.double_array_options.default_value #=> Float
resp.index_fields[0].options.double_array_options.source_fields #=> String
resp.index_fields[0].options.double_array_options.facet_enabled #=> true/false
resp.index_fields[0].options.double_array_options.search_enabled #=> true/false
resp.index_fields[0].options.double_array_options.return_enabled #=> true/false
resp.index_fields[0].options.literal_array_options.default_value #=> String
resp.index_fields[0].options.literal_array_options.source_fields #=> String
resp.index_fields[0].options.literal_array_options.facet_enabled #=> true/false
resp.index_fields[0].options.literal_array_options.search_enabled #=> true/false
resp.index_fields[0].options.literal_array_options.return_enabled #=> true/false
resp.index_fields[0].options.text_array_options.default_value #=> String
resp.index_fields[0].options.text_array_options.source_fields #=> String
resp.index_fields[0].options.text_array_options.return_enabled #=> true/false
resp.index_fields[0].options.text_array_options.highlight_enabled #=> true/false
resp.index_fields[0].options.text_array_options.analysis_scheme #=> String
resp.index_fields[0].options.date_array_options.default_value #=> String
resp.index_fields[0].options.date_array_options.source_fields #=> String
resp.index_fields[0].options.date_array_options.facet_enabled #=> true/false
resp.index_fields[0].options.date_array_options.search_enabled #=> true/false
resp.index_fields[0].options.date_array_options.return_enabled #=> true/false
resp.index_fields[0].status.creation_date #=> Time
resp.index_fields[0].status.update_date #=> Time
resp.index_fields[0].status.update_version #=> Integer
resp.index_fields[0].status.state #=> String, one of "RequiresIndexDocuments", "Processing", "Active", "FailedToValidate"
resp.index_fields[0].status.pending_deletion #=> true/false

Options Hash (options):

  • :domain_name (required, String)

    The name of the domain you want to describe.

  • :field_names (Array<String>)

    A list of the index fields you want to describe. If not specified, information is returned for all configured index fields.

  • :deployed (Boolean)

    Whether to display the deployed configuration (true) or include any pending changes (false). Defaults to false.

Returns:

#describe_scaling_parameters(options = {}) ⇒ Types::DescribeScalingParametersResponse

Gets the scaling parameters configured for a domain. A domain's scaling parameters specify the desired search instance type and replication count. For more information, see Configuring Scaling Options in the Amazon CloudSearch Developer Guide.

Examples:

Request syntax with placeholder values


resp = client.describe_scaling_parameters({
  domain_name: "DomainName", # required
})

Response structure


resp.scaling_parameters.options.desired_instance_type #=> String, one of "search.m1.small", "search.m1.large", "search.m2.xlarge", "search.m2.2xlarge", "search.m3.medium", "search.m3.large", "search.m3.xlarge", "search.m3.2xlarge"
resp.scaling_parameters.options.desired_replication_count #=> Integer
resp.scaling_parameters.options.desired_partition_count #=> Integer
resp.scaling_parameters.status.creation_date #=> Time
resp.scaling_parameters.status.update_date #=> Time
resp.scaling_parameters.status.update_version #=> Integer
resp.scaling_parameters.status.state #=> String, one of "RequiresIndexDocuments", "Processing", "Active", "FailedToValidate"
resp.scaling_parameters.status.pending_deletion #=> true/false

Options Hash (options):

  • :domain_name (required, String)

    A string that represents the name of a domain. Domain names are unique across the domains owned by an account within an AWS region. Domain names start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen).

Returns:

#describe_service_access_policies(options = {}) ⇒ Types::DescribeServiceAccessPoliciesResponse

Gets information about the access policies that control access to the domain's document and search endpoints. By default, shows the configuration with any pending changes. Set the Deployed option to true to show the active configuration and exclude pending changes. For more information, see Configuring Access for a Search Domain in the Amazon CloudSearch Developer Guide.

Examples:

Request syntax with placeholder values


resp = client.describe_service_access_policies({
  domain_name: "DomainName", # required
  deployed: false,
})

Response structure


resp.access_policies.options #=> String
resp.access_policies.status.creation_date #=> Time
resp.access_policies.status.update_date #=> Time
resp.access_policies.status.update_version #=> Integer
resp.access_policies.status.state #=> String, one of "RequiresIndexDocuments", "Processing", "Active", "FailedToValidate"
resp.access_policies.status.pending_deletion #=> true/false

Options Hash (options):

  • :domain_name (required, String)

    The name of the domain you want to describe.

  • :deployed (Boolean)

    Whether to display the deployed configuration (true) or include any pending changes (false). Defaults to false.

Returns:

#describe_suggesters(options = {}) ⇒ Types::DescribeSuggestersResponse

Gets the suggesters configured for a domain. A suggester enables you to display possible matches before users finish typing their queries. Can be limited to specific suggesters by name. By default, shows all suggesters and includes any pending changes to the configuration. Set the Deployed option to true to show the active configuration and exclude pending changes. For more information, see Getting Search Suggestions in the Amazon CloudSearch Developer Guide.

Examples:

Request syntax with placeholder values


resp = client.describe_suggesters({
  domain_name: "DomainName", # required
  suggester_names: ["StandardName"],
  deployed: false,
})

Response structure


resp.suggesters #=> Array
resp.suggesters[0].options.suggester_name #=> String
resp.suggesters[0].options.document_suggester_options.source_field #=> String
resp.suggesters[0].options.document_suggester_options.fuzzy_matching #=> String, one of "none", "low", "high"
resp.suggesters[0].options.document_suggester_options.sort_expression #=> String
resp.suggesters[0].status.creation_date #=> Time
resp.suggesters[0].status.update_date #=> Time
resp.suggesters[0].status.update_version #=> Integer
resp.suggesters[0].status.state #=> String, one of "RequiresIndexDocuments", "Processing", "Active", "FailedToValidate"
resp.suggesters[0].status.pending_deletion #=> true/false

Options Hash (options):

  • :domain_name (required, String)

    The name of the domain you want to describe.

  • :suggester_names (Array<String>)

    The suggesters you want to describe.

  • :deployed (Boolean)

    Whether to display the deployed configuration (true) or include any pending changes (false). Defaults to false.

Returns:

#index_documents(options = {}) ⇒ Types::IndexDocumentsResponse

Tells the search domain to start indexing its documents using the latest indexing options. This operation must be invoked to activate options whose OptionStatus is RequiresIndexDocuments.

Examples:

Request syntax with placeholder values


resp = client.index_documents({
  domain_name: "DomainName", # required
})

Response structure


resp.field_names #=> Array
resp.field_names[0] #=> String

Options Hash (options):

  • :domain_name (required, String)

    A string that represents the name of a domain. Domain names are unique across the domains owned by an account within an AWS region. Domain names start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen).

Returns:

#list_domain_names(options = {}) ⇒ Types::ListDomainNamesResponse

Lists all search domains owned by an account.

Examples:

Request syntax with placeholder values


resp = client.list_domain_names()

Response structure


resp.domain_names #=> Hash
resp.domain_names["DomainName"] #=> String

Returns:

#update_availability_options(options = {}) ⇒ Types::UpdateAvailabilityOptionsResponse

Configures the availability options for a domain. Enabling the Multi-AZ option expands an Amazon CloudSearch domain to an additional Availability Zone in the same Region to increase fault tolerance in the event of a service disruption. Changes to the Multi-AZ option can take about half an hour to become active. For more information, see Configuring Availability Options in the Amazon CloudSearch Developer Guide.

Examples:

Request syntax with placeholder values


resp = client.update_availability_options({
  domain_name: "DomainName", # required
  multi_az: false, # required
})

Response structure


resp.availability_options.options #=> true/false
resp.availability_options.status.creation_date #=> Time
resp.availability_options.status.update_date #=> Time
resp.availability_options.status.update_version #=> Integer
resp.availability_options.status.state #=> String, one of "RequiresIndexDocuments", "Processing", "Active", "FailedToValidate"
resp.availability_options.status.pending_deletion #=> true/false

Options Hash (options):

  • :domain_name (required, String)

    A string that represents the name of a domain. Domain names are unique across the domains owned by an account within an AWS region. Domain names start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen).

  • :multi_az (required, Boolean)

    You expand an existing search domain to a second Availability Zone by setting the Multi-AZ option to true. Similarly, you can turn off the Multi-AZ option to downgrade the domain to a single Availability Zone by setting the Multi-AZ option to false.

Returns:

#update_scaling_parameters(options = {}) ⇒ Types::UpdateScalingParametersResponse

Configures scaling parameters for a domain. A domain's scaling parameters specify the desired search instance type and replication count. Amazon CloudSearch will still automatically scale your domain based on the volume of data and traffic, but not below the desired instance type and replication count. If the Multi-AZ option is enabled, these values control the resources used per Availability Zone. For more information, see Configuring Scaling Options in the Amazon CloudSearch Developer Guide.

Examples:

Request syntax with placeholder values


resp = client.update_scaling_parameters({
  domain_name: "DomainName", # required
  scaling_parameters: { # required
    desired_instance_type: "search.m1.small", # accepts search.m1.small, search.m1.large, search.m2.xlarge, search.m2.2xlarge, search.m3.medium, search.m3.large, search.m3.xlarge, search.m3.2xlarge
    desired_replication_count: 1,
    desired_partition_count: 1,
  },
})

Response structure


resp.scaling_parameters.options.desired_instance_type #=> String, one of "search.m1.small", "search.m1.large", "search.m2.xlarge", "search.m2.2xlarge", "search.m3.medium", "search.m3.large", "search.m3.xlarge", "search.m3.2xlarge"
resp.scaling_parameters.options.desired_replication_count #=> Integer
resp.scaling_parameters.options.desired_partition_count #=> Integer
resp.scaling_parameters.status.creation_date #=> Time
resp.scaling_parameters.status.update_date #=> Time
resp.scaling_parameters.status.update_version #=> Integer
resp.scaling_parameters.status.state #=> String, one of "RequiresIndexDocuments", "Processing", "Active", "FailedToValidate"
resp.scaling_parameters.status.pending_deletion #=> true/false

Options Hash (options):

  • :domain_name (required, String)

    A string that represents the name of a domain. Domain names are unique across the domains owned by an account within an AWS region. Domain names start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen).

  • :scaling_parameters (required, Types::ScalingParameters)

    The desired instance type and desired number of replicas of each index partition.

Returns:

#update_service_access_policies(options = {}) ⇒ Types::UpdateServiceAccessPoliciesResponse

Configures the access rules that control access to the domain's document and search endpoints. For more information, see Configuring Access for an Amazon CloudSearch Domain.

Examples:

Request syntax with placeholder values


resp = client.update_service_access_policies({
  domain_name: "DomainName", # required
  access_policies: "PolicyDocument", # required
})

Response structure


resp.access_policies.options #=> String
resp.access_policies.status.creation_date #=> Time
resp.access_policies.status.update_date #=> Time
resp.access_policies.status.update_version #=> Integer
resp.access_policies.status.state #=> String, one of "RequiresIndexDocuments", "Processing", "Active", "FailedToValidate"
resp.access_policies.status.pending_deletion #=> true/false

Options Hash (options):

  • :domain_name (required, String)

    A string that represents the name of a domain. Domain names are unique across the domains owned by an account within an AWS region. Domain names start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen).

  • :access_policies (required, String)

    The access rules you want to configure. These rules replace any existing rules.

Returns:

#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ Boolean

Waiters polls an API operation until a resource enters a desired state.

Basic Usage

Waiters will poll until they are succesful, they fail by entering a terminal state, or until a maximum number of attempts are made.

# polls in a loop, sleeping between attempts client.waiter_until(waiter_name, params)

Configuration

You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You configure waiters by passing a block to #wait_until:

# poll for ~25 seconds
client.wait_until(...) do |w|
  w.max_attempts = 5
  w.delay = 5
end

Callbacks

You can be notified before each polling attempt and before each delay. If you throw :success or :failure from these callbacks, it will terminate the waiter.

started_at = Time.now
client.wait_until(...) do |w|

  # disable max attempts
  w.max_attempts = nil

  # poll for 1 hour, instead of a number of attempts
  w.before_wait do |attempts, response|
    throw :failure if Time.now - started_at > 3600
  end

end

Handling Errors

When a waiter is successful, it returns true. When a waiter fails, it raises an error. All errors raised extend from Waiters::Errors::WaiterFailed.

begin
  client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
  # resource did not enter the desired state in time
end

Parameters:

  • waiter_name (Symbol)

    The name of the waiter. See #waiter_names for a full list of supported waiters.

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

    Additional request parameters. See the #waiter_names for a list of supported waiters and what request they call. The called request determines the list of accepted parameters.

Yield Parameters:

Returns:

  • (Boolean)

    Returns true if the waiter was successful.

Raises:

  • (Errors::FailureStateError)

    Raised when the waiter terminates because the waiter has entered a state that it will not transition out of, preventing success.

  • (Errors::TooManyAttemptsError)

    Raised when the configured maximum number of attempts have been made, and the waiter is not yet successful.

  • (Errors::UnexpectedError)

    Raised when an error is encounted while polling for a resource that is not expected.

  • (Errors::NoSuchWaiterError)

    Raised when you request to wait for an unknown state.

#waiter_namesArray<Symbol>

Returns the list of supported waiters. The following table lists the supported waiters and the client method they call:

Waiter NameClient MethodDefault Delay:Default Max Attempts:

Returns:

  • (Array<Symbol>)

    the list of supported waiters.