@aws-sdk/client-cloudsearch-domain 3.35.0 → 3.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/dist-cjs/CloudSearchDomain.js +0 -7
  3. package/dist-cjs/CloudSearchDomainClient.js +0 -12
  4. package/dist-cjs/commands/SearchCommand.js +0 -33
  5. package/dist-cjs/commands/SuggestCommand.js +0 -28
  6. package/dist-cjs/commands/UploadDocumentsCommand.js +0 -28
  7. package/dist-cjs/commands/index.js +6 -0
  8. package/dist-cjs/endpoints.js +1 -2
  9. package/dist-cjs/index.js +3 -6
  10. package/dist-cjs/models/index.js +0 -1
  11. package/dist-cjs/models/models_0.js +0 -55
  12. package/dist-cjs/protocols/Aws_restJson1.js +0 -6
  13. package/dist-cjs/runtimeConfig.browser.js +1 -6
  14. package/dist-cjs/runtimeConfig.js +2 -7
  15. package/dist-cjs/runtimeConfig.native.js +0 -4
  16. package/dist-cjs/runtimeConfig.shared.js +0 -4
  17. package/dist-es/CloudSearchDomain.js +0 -1
  18. package/dist-es/CloudSearchDomainClient.js +0 -1
  19. package/dist-es/commands/SearchCommand.js +0 -1
  20. package/dist-es/commands/SuggestCommand.js +0 -1
  21. package/dist-es/commands/UploadDocumentsCommand.js +0 -1
  22. package/dist-es/commands/index.js +3 -0
  23. package/dist-es/endpoints.js +1 -2
  24. package/dist-es/index.js +3 -6
  25. package/dist-es/models/index.js +0 -1
  26. package/dist-es/models/models_0.js +0 -1
  27. package/dist-es/protocols/Aws_restJson1.js +0 -1
  28. package/dist-es/runtimeConfig.browser.js +1 -2
  29. package/dist-es/runtimeConfig.js +2 -3
  30. package/dist-es/runtimeConfig.native.js +0 -1
  31. package/dist-es/runtimeConfig.shared.js +0 -1
  32. package/dist-types/commands/index.d.ts +3 -0
  33. package/dist-types/index.d.ts +3 -5
  34. package/dist-types/ts3.4/CloudSearchDomain.d.ts +4 -29
  35. package/dist-types/ts3.4/CloudSearchDomainClient.d.ts +24 -92
  36. package/dist-types/ts3.4/commands/SearchCommand.d.ts +2 -28
  37. package/dist-types/ts3.4/commands/SuggestCommand.d.ts +2 -23
  38. package/dist-types/ts3.4/commands/UploadDocumentsCommand.d.ts +5 -30
  39. package/dist-types/ts3.4/commands/index.d.ts +3 -0
  40. package/dist-types/ts3.4/index.d.ts +3 -5
  41. package/dist-types/ts3.4/models/models_0.d.ts +99 -513
  42. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -3
  43. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
  44. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
  45. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
  46. package/package.json +33 -30
  47. package/dist-cjs/CloudSearchDomain.js.map +0 -1
  48. package/dist-cjs/CloudSearchDomainClient.js.map +0 -1
  49. package/dist-cjs/commands/SearchCommand.js.map +0 -1
  50. package/dist-cjs/commands/SuggestCommand.js.map +0 -1
  51. package/dist-cjs/commands/UploadDocumentsCommand.js.map +0 -1
  52. package/dist-cjs/endpoints.js.map +0 -1
  53. package/dist-cjs/index.js.map +0 -1
  54. package/dist-cjs/models/index.js.map +0 -1
  55. package/dist-cjs/models/models_0.js.map +0 -1
  56. package/dist-cjs/protocols/Aws_restJson1.js.map +0 -1
  57. package/dist-cjs/runtimeConfig.browser.js.map +0 -1
  58. package/dist-cjs/runtimeConfig.js.map +0 -1
  59. package/dist-cjs/runtimeConfig.native.js.map +0 -1
  60. package/dist-cjs/runtimeConfig.shared.js.map +0 -1
  61. package/dist-es/CloudSearchDomain.js.map +0 -1
  62. package/dist-es/CloudSearchDomainClient.js.map +0 -1
  63. package/dist-es/commands/SearchCommand.js.map +0 -1
  64. package/dist-es/commands/SuggestCommand.js.map +0 -1
  65. package/dist-es/commands/UploadDocumentsCommand.js.map +0 -1
  66. package/dist-es/endpoints.js.map +0 -1
  67. package/dist-es/index.js.map +0 -1
  68. package/dist-es/models/index.js.map +0 -1
  69. package/dist-es/models/models_0.js.map +0 -1
  70. package/dist-es/protocols/Aws_restJson1.js.map +0 -1
  71. package/dist-es/runtimeConfig.browser.js.map +0 -1
  72. package/dist-es/runtimeConfig.js.map +0 -1
  73. package/dist-es/runtimeConfig.native.js.map +0 -1
  74. package/dist-es/runtimeConfig.shared.js.map +0 -1
  75. package/jest.config.js +0 -4
  76. package/src/CloudSearchDomain.ts +0 -116
  77. package/src/CloudSearchDomainClient.ts +0 -242
  78. package/src/commands/SearchCommand.ts +0 -104
  79. package/src/commands/SuggestCommand.ts +0 -102
  80. package/src/commands/UploadDocumentsCommand.ts +0 -111
  81. package/src/endpoints.ts +0 -57
  82. package/src/index.ts +0 -6
  83. package/src/models/index.ts +0 -1
  84. package/src/models/models_0.ts +0 -790
  85. package/src/protocols/Aws_restJson1.ts +0 -646
  86. package/src/runtimeConfig.browser.ts +0 -41
  87. package/src/runtimeConfig.native.ts +0 -17
  88. package/src/runtimeConfig.shared.ts +0 -17
  89. package/src/runtimeConfig.ts +0 -46
  90. package/tsconfig.es.json +0 -10
  91. package/tsconfig.json +0 -33
  92. package/tsconfig.types.json +0 -9
@@ -1,242 +0,0 @@
1
- import {
2
- EndpointsInputConfig,
3
- EndpointsResolvedConfig,
4
- RegionInputConfig,
5
- RegionResolvedConfig,
6
- resolveEndpointsConfig,
7
- resolveRegionConfig,
8
- } from "@aws-sdk/config-resolver";
9
- import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
10
- import {
11
- getHostHeaderPlugin,
12
- HostHeaderInputConfig,
13
- HostHeaderResolvedConfig,
14
- resolveHostHeaderConfig,
15
- } from "@aws-sdk/middleware-host-header";
16
- import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
17
- import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry";
18
- import {
19
- AwsAuthInputConfig,
20
- AwsAuthResolvedConfig,
21
- getAwsAuthPlugin,
22
- resolveAwsAuthConfig,
23
- } from "@aws-sdk/middleware-signing";
24
- import {
25
- getUserAgentPlugin,
26
- resolveUserAgentConfig,
27
- UserAgentInputConfig,
28
- UserAgentResolvedConfig,
29
- } from "@aws-sdk/middleware-user-agent";
30
- import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
31
- import {
32
- Client as __Client,
33
- SmithyConfiguration as __SmithyConfiguration,
34
- SmithyResolvedConfiguration as __SmithyResolvedConfiguration,
35
- } from "@aws-sdk/smithy-client";
36
- import {
37
- Credentials as __Credentials,
38
- Decoder as __Decoder,
39
- Encoder as __Encoder,
40
- Hash as __Hash,
41
- HashConstructor as __HashConstructor,
42
- HttpHandlerOptions as __HttpHandlerOptions,
43
- Logger as __Logger,
44
- Provider as __Provider,
45
- Provider,
46
- RegionInfoProvider,
47
- StreamCollector as __StreamCollector,
48
- UrlParser as __UrlParser,
49
- UserAgent as __UserAgent,
50
- } from "@aws-sdk/types";
51
-
52
- import { SearchCommandInput, SearchCommandOutput } from "./commands/SearchCommand";
53
- import { SuggestCommandInput, SuggestCommandOutput } from "./commands/SuggestCommand";
54
- import { UploadDocumentsCommandInput, UploadDocumentsCommandOutput } from "./commands/UploadDocumentsCommand";
55
- import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
56
-
57
- export type ServiceInputTypes = SearchCommandInput | SuggestCommandInput | UploadDocumentsCommandInput;
58
-
59
- export type ServiceOutputTypes = SearchCommandOutput | SuggestCommandOutput | UploadDocumentsCommandOutput;
60
-
61
- export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
62
- /**
63
- * The HTTP handler to use. Fetch in browser and Https in Nodejs.
64
- */
65
- requestHandler?: __HttpHandler;
66
-
67
- /**
68
- * A constructor for a class implementing the {@link __Hash} interface
69
- * that computes the SHA-256 HMAC or checksum of a string or binary buffer.
70
- * @internal
71
- */
72
- sha256?: __HashConstructor;
73
-
74
- /**
75
- * The function that will be used to convert strings into HTTP endpoints.
76
- * @internal
77
- */
78
- urlParser?: __UrlParser;
79
-
80
- /**
81
- * A function that can calculate the length of a request body.
82
- * @internal
83
- */
84
- bodyLengthChecker?: (body: any) => number | undefined;
85
-
86
- /**
87
- * A function that converts a stream into an array of bytes.
88
- * @internal
89
- */
90
- streamCollector?: __StreamCollector;
91
-
92
- /**
93
- * The function that will be used to convert a base64-encoded string to a byte array.
94
- * @internal
95
- */
96
- base64Decoder?: __Decoder;
97
-
98
- /**
99
- * The function that will be used to convert binary data to a base64-encoded string.
100
- * @internal
101
- */
102
- base64Encoder?: __Encoder;
103
-
104
- /**
105
- * The function that will be used to convert a UTF8-encoded string to a byte array.
106
- * @internal
107
- */
108
- utf8Decoder?: __Decoder;
109
-
110
- /**
111
- * The function that will be used to convert binary data to a UTF-8 encoded string.
112
- * @internal
113
- */
114
- utf8Encoder?: __Encoder;
115
-
116
- /**
117
- * The runtime environment.
118
- * @internal
119
- */
120
- runtime?: string;
121
-
122
- /**
123
- * Disable dyanamically changing the endpoint of the client based on the hostPrefix
124
- * trait of an operation.
125
- */
126
- disableHostPrefix?: boolean;
127
-
128
- /**
129
- * Value for how many times a request will be made at most in case of retry.
130
- */
131
- maxAttempts?: number | __Provider<number>;
132
-
133
- /**
134
- * Specifies which retry algorithm to use.
135
- */
136
- retryMode?: string | __Provider<string>;
137
-
138
- /**
139
- * Optional logger for logging debug/info/warn/error.
140
- */
141
- logger?: __Logger;
142
-
143
- /**
144
- * Unique service identifier.
145
- * @internal
146
- */
147
- serviceId?: string;
148
-
149
- /**
150
- * The AWS region to which this client will send requests
151
- */
152
- region?: string | __Provider<string>;
153
-
154
- /**
155
- * Default credentials provider; Not available in browser runtime.
156
- * @internal
157
- */
158
- credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
159
-
160
- /**
161
- * Fetch related hostname, signing name or signing region with given region.
162
- * @internal
163
- */
164
- regionInfoProvider?: RegionInfoProvider;
165
-
166
- /**
167
- * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
168
- * @internal
169
- */
170
- defaultUserAgentProvider?: Provider<__UserAgent>;
171
- }
172
-
173
- type CloudSearchDomainClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> &
174
- ClientDefaults &
175
- RegionInputConfig &
176
- EndpointsInputConfig &
177
- RetryInputConfig &
178
- HostHeaderInputConfig &
179
- AwsAuthInputConfig &
180
- UserAgentInputConfig;
181
- /**
182
- * The configuration interface of CloudSearchDomainClient class constructor that set the region, credentials and other options.
183
- */
184
- export interface CloudSearchDomainClientConfig extends CloudSearchDomainClientConfigType {}
185
-
186
- type CloudSearchDomainClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
187
- Required<ClientDefaults> &
188
- RegionResolvedConfig &
189
- EndpointsResolvedConfig &
190
- RetryResolvedConfig &
191
- HostHeaderResolvedConfig &
192
- AwsAuthResolvedConfig &
193
- UserAgentResolvedConfig;
194
- /**
195
- * The resolved configuration interface of CloudSearchDomainClient class. This is resolved and normalized from the {@link CloudSearchDomainClientConfig | constructor configuration interface}.
196
- */
197
- export interface CloudSearchDomainClientResolvedConfig extends CloudSearchDomainClientResolvedConfigType {}
198
-
199
- /**
200
- * <p>You use the AmazonCloudSearch2013 API to upload documents to a search domain and search those documents. </p>
201
- *
202
- * <p>The endpoints for submitting <code>UploadDocuments</code>, <code>Search</code>, and <code>Suggest</code> requests are domain-specific. To get the endpoints for your domain, use the Amazon CloudSearch configuration service <code>DescribeDomains</code> action. The domain endpoints are also displayed on the domain dashboard in the Amazon CloudSearch console. You submit suggest requests to the search endpoint. </p>
203
- * <p>For more information, see the <a href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide">Amazon CloudSearch Developer Guide</a>.</p>
204
- */
205
- export class CloudSearchDomainClient extends __Client<
206
- __HttpHandlerOptions,
207
- ServiceInputTypes,
208
- ServiceOutputTypes,
209
- CloudSearchDomainClientResolvedConfig
210
- > {
211
- /**
212
- * The resolved configuration of CloudSearchDomainClient class. This is resolved and normalized from the {@link CloudSearchDomainClientConfig | constructor configuration interface}.
213
- */
214
- readonly config: CloudSearchDomainClientResolvedConfig;
215
-
216
- constructor(configuration: CloudSearchDomainClientConfig) {
217
- const _config_0 = __getRuntimeConfig(configuration);
218
- const _config_1 = resolveRegionConfig(_config_0);
219
- const _config_2 = resolveEndpointsConfig(_config_1);
220
- const _config_3 = resolveRetryConfig(_config_2);
221
- const _config_4 = resolveHostHeaderConfig(_config_3);
222
- const _config_5 = resolveAwsAuthConfig(_config_4);
223
- const _config_6 = resolveUserAgentConfig(_config_5);
224
- super(_config_6);
225
- this.config = _config_6;
226
- this.middlewareStack.use(getRetryPlugin(this.config));
227
- this.middlewareStack.use(getContentLengthPlugin(this.config));
228
- this.middlewareStack.use(getHostHeaderPlugin(this.config));
229
- this.middlewareStack.use(getLoggerPlugin(this.config));
230
- this.middlewareStack.use(getAwsAuthPlugin(this.config));
231
- this.middlewareStack.use(getUserAgentPlugin(this.config));
232
- }
233
-
234
- /**
235
- * Destroy underlying resources, like sockets. It's usually not necessary to do this.
236
- * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
237
- * Otherwise, sockets might stay open for quite a long time before the server terminates them.
238
- */
239
- destroy(): void {
240
- super.destroy();
241
- }
242
- }
@@ -1,104 +0,0 @@
1
- import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
3
- import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import {
5
- FinalizeHandlerArguments,
6
- Handler,
7
- HandlerExecutionContext,
8
- HttpHandlerOptions as __HttpHandlerOptions,
9
- MetadataBearer as __MetadataBearer,
10
- MiddlewareStack,
11
- SerdeContext as __SerdeContext,
12
- } from "@aws-sdk/types";
13
-
14
- import {
15
- CloudSearchDomainClientResolvedConfig,
16
- ServiceInputTypes,
17
- ServiceOutputTypes,
18
- } from "../CloudSearchDomainClient";
19
- import { SearchRequest, SearchResponse } from "../models/models_0";
20
- import { deserializeAws_restJson1SearchCommand, serializeAws_restJson1SearchCommand } from "../protocols/Aws_restJson1";
21
-
22
- export interface SearchCommandInput extends SearchRequest {}
23
- export interface SearchCommandOutput extends SearchResponse, __MetadataBearer {}
24
-
25
- /**
26
- * <p>Retrieves a list of documents that match the specified search criteria. How you specify the search criteria depends on which query parser you use. Amazon CloudSearch supports four query parsers:</p>
27
- * <ul>
28
- * <li><code>simple</code>: search all <code>text</code> and <code>text-array</code> fields for the specified string. Search for phrases, individual terms, and prefixes. </li>
29
- * <li><code>structured</code>: search specific fields, construct compound queries using Boolean operators, and use advanced features such as term boosting and proximity searching.</li>
30
- * <li><code>lucene</code>: specify search criteria using the Apache Lucene query parser syntax.</li>
31
- * <li><code>dismax</code>: specify search criteria using the simplified subset of the Apache Lucene query parser syntax defined by the DisMax query parser.</li>
32
- * </ul>
33
- * <p>For more information, see <a href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching.html">Searching Your Data</a> in the <i>Amazon CloudSearch Developer Guide</i>.</p>
34
- * <p>The endpoint for submitting <code>Search</code> requests is domain-specific. You submit search requests to a domain's search endpoint. To get the search endpoint for your domain, use the Amazon CloudSearch configuration service <code>DescribeDomains</code> action. A domain's endpoints are also displayed on the domain dashboard in the Amazon CloudSearch console. </p>
35
- * @example
36
- * Use a bare-bones client and the command you need to make an API call.
37
- * ```javascript
38
- * import { CloudSearchDomainClient, SearchCommand } from "@aws-sdk/client-cloudsearch-domain"; // ES Modules import
39
- * // const { CloudSearchDomainClient, SearchCommand } = require("@aws-sdk/client-cloudsearch-domain"); // CommonJS import
40
- * const client = new CloudSearchDomainClient(config);
41
- * const command = new SearchCommand(input);
42
- * const response = await client.send(command);
43
- * ```
44
- *
45
- * @see {@link SearchCommandInput} for command's `input` shape.
46
- * @see {@link SearchCommandOutput} for command's `response` shape.
47
- * @see {@link CloudSearchDomainClientResolvedConfig | config} for command's `input` shape.
48
- *
49
- */
50
- export class SearchCommand extends $Command<
51
- SearchCommandInput,
52
- SearchCommandOutput,
53
- CloudSearchDomainClientResolvedConfig
54
- > {
55
- // Start section: command_properties
56
- // End section: command_properties
57
-
58
- constructor(readonly input: SearchCommandInput) {
59
- // Start section: command_constructor
60
- super();
61
- // End section: command_constructor
62
- }
63
-
64
- /**
65
- * @internal
66
- */
67
- resolveMiddleware(
68
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
69
- configuration: CloudSearchDomainClientResolvedConfig,
70
- options?: __HttpHandlerOptions
71
- ): Handler<SearchCommandInput, SearchCommandOutput> {
72
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
73
-
74
- const stack = clientStack.concat(this.middlewareStack);
75
-
76
- const { logger } = configuration;
77
- const clientName = "CloudSearchDomainClient";
78
- const commandName = "SearchCommand";
79
- const handlerExecutionContext: HandlerExecutionContext = {
80
- logger,
81
- clientName,
82
- commandName,
83
- inputFilterSensitiveLog: SearchRequest.filterSensitiveLog,
84
- outputFilterSensitiveLog: SearchResponse.filterSensitiveLog,
85
- };
86
- const { requestHandler } = configuration;
87
- return stack.resolve(
88
- (request: FinalizeHandlerArguments<any>) =>
89
- requestHandler.handle(request.request as __HttpRequest, options || {}),
90
- handlerExecutionContext
91
- );
92
- }
93
-
94
- private serialize(input: SearchCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
95
- return serializeAws_restJson1SearchCommand(input, context);
96
- }
97
-
98
- private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<SearchCommandOutput> {
99
- return deserializeAws_restJson1SearchCommand(output, context);
100
- }
101
-
102
- // Start section: command_body_extra
103
- // End section: command_body_extra
104
- }
@@ -1,102 +0,0 @@
1
- import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
3
- import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import {
5
- FinalizeHandlerArguments,
6
- Handler,
7
- HandlerExecutionContext,
8
- HttpHandlerOptions as __HttpHandlerOptions,
9
- MetadataBearer as __MetadataBearer,
10
- MiddlewareStack,
11
- SerdeContext as __SerdeContext,
12
- } from "@aws-sdk/types";
13
-
14
- import {
15
- CloudSearchDomainClientResolvedConfig,
16
- ServiceInputTypes,
17
- ServiceOutputTypes,
18
- } from "../CloudSearchDomainClient";
19
- import { SuggestRequest, SuggestResponse } from "../models/models_0";
20
- import {
21
- deserializeAws_restJson1SuggestCommand,
22
- serializeAws_restJson1SuggestCommand,
23
- } from "../protocols/Aws_restJson1";
24
-
25
- export interface SuggestCommandInput extends SuggestRequest {}
26
- export interface SuggestCommandOutput extends SuggestResponse, __MetadataBearer {}
27
-
28
- /**
29
- * <p>Retrieves autocomplete suggestions for a partial query string. You can use suggestions enable you to display likely matches before users finish typing. In Amazon CloudSearch, suggestions are based on the contents of a particular text field. When you request suggestions, Amazon CloudSearch finds all of the documents whose values in the suggester field start with the specified query string. The beginning of the field must match the query string to be considered a match. </p>
30
- * <p>For more information about configuring suggesters and retrieving suggestions, see <a href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-suggestions.html">Getting Suggestions</a> in the <i>Amazon CloudSearch Developer Guide</i>. </p>
31
- *
32
- * <p>The endpoint for submitting <code>Suggest</code> requests is domain-specific. You submit suggest requests to a domain's search endpoint. To get the search endpoint for your domain, use the Amazon CloudSearch configuration service <code>DescribeDomains</code> action. A domain's endpoints are also displayed on the domain dashboard in the Amazon CloudSearch console. </p>
33
- * @example
34
- * Use a bare-bones client and the command you need to make an API call.
35
- * ```javascript
36
- * import { CloudSearchDomainClient, SuggestCommand } from "@aws-sdk/client-cloudsearch-domain"; // ES Modules import
37
- * // const { CloudSearchDomainClient, SuggestCommand } = require("@aws-sdk/client-cloudsearch-domain"); // CommonJS import
38
- * const client = new CloudSearchDomainClient(config);
39
- * const command = new SuggestCommand(input);
40
- * const response = await client.send(command);
41
- * ```
42
- *
43
- * @see {@link SuggestCommandInput} for command's `input` shape.
44
- * @see {@link SuggestCommandOutput} for command's `response` shape.
45
- * @see {@link CloudSearchDomainClientResolvedConfig | config} for command's `input` shape.
46
- *
47
- */
48
- export class SuggestCommand extends $Command<
49
- SuggestCommandInput,
50
- SuggestCommandOutput,
51
- CloudSearchDomainClientResolvedConfig
52
- > {
53
- // Start section: command_properties
54
- // End section: command_properties
55
-
56
- constructor(readonly input: SuggestCommandInput) {
57
- // Start section: command_constructor
58
- super();
59
- // End section: command_constructor
60
- }
61
-
62
- /**
63
- * @internal
64
- */
65
- resolveMiddleware(
66
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
67
- configuration: CloudSearchDomainClientResolvedConfig,
68
- options?: __HttpHandlerOptions
69
- ): Handler<SuggestCommandInput, SuggestCommandOutput> {
70
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
71
-
72
- const stack = clientStack.concat(this.middlewareStack);
73
-
74
- const { logger } = configuration;
75
- const clientName = "CloudSearchDomainClient";
76
- const commandName = "SuggestCommand";
77
- const handlerExecutionContext: HandlerExecutionContext = {
78
- logger,
79
- clientName,
80
- commandName,
81
- inputFilterSensitiveLog: SuggestRequest.filterSensitiveLog,
82
- outputFilterSensitiveLog: SuggestResponse.filterSensitiveLog,
83
- };
84
- const { requestHandler } = configuration;
85
- return stack.resolve(
86
- (request: FinalizeHandlerArguments<any>) =>
87
- requestHandler.handle(request.request as __HttpRequest, options || {}),
88
- handlerExecutionContext
89
- );
90
- }
91
-
92
- private serialize(input: SuggestCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
93
- return serializeAws_restJson1SuggestCommand(input, context);
94
- }
95
-
96
- private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<SuggestCommandOutput> {
97
- return deserializeAws_restJson1SuggestCommand(output, context);
98
- }
99
-
100
- // Start section: command_body_extra
101
- // End section: command_body_extra
102
- }
@@ -1,111 +0,0 @@
1
- import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
3
- import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import {
5
- FinalizeHandlerArguments,
6
- Handler,
7
- HandlerExecutionContext,
8
- HttpHandlerOptions as __HttpHandlerOptions,
9
- MetadataBearer as __MetadataBearer,
10
- MiddlewareStack,
11
- SerdeContext as __SerdeContext,
12
- } from "@aws-sdk/types";
13
-
14
- import {
15
- CloudSearchDomainClientResolvedConfig,
16
- ServiceInputTypes,
17
- ServiceOutputTypes,
18
- } from "../CloudSearchDomainClient";
19
- import { UploadDocumentsRequest, UploadDocumentsResponse } from "../models/models_0";
20
- import {
21
- deserializeAws_restJson1UploadDocumentsCommand,
22
- serializeAws_restJson1UploadDocumentsCommand,
23
- } from "../protocols/Aws_restJson1";
24
-
25
- type UploadDocumentsCommandInputType = Omit<UploadDocumentsRequest, "documents"> & {
26
- /**
27
- * For *`UploadDocumentsRequest["documents"]`*, see {@link UploadDocumentsRequest.documents}.
28
- */
29
- documents: UploadDocumentsRequest["documents"] | string | Uint8Array | Buffer;
30
- };
31
- /**
32
- * This interface extends from `UploadDocumentsRequest` interface. There are more parameters than `documents` defined in {@link UploadDocumentsRequest}
33
- */
34
- export interface UploadDocumentsCommandInput extends UploadDocumentsCommandInputType {}
35
- export interface UploadDocumentsCommandOutput extends UploadDocumentsResponse, __MetadataBearer {}
36
-
37
- /**
38
- * <p>Posts a batch of documents to a search domain for indexing. A document batch is a collection of add and delete operations that represent the documents you want to add, update, or delete from your domain. Batches can be described in either JSON or XML. Each item that you want Amazon CloudSearch to return as a search result (such as a product) is represented as a document. Every document has a unique ID and one or more fields that contain the data that you want to search and return in results. Individual documents cannot contain more than 1 MB of data. The entire batch cannot exceed 5 MB. To get the best possible upload performance, group add and delete operations in batches that are close the 5 MB limit. Submitting a large volume of single-document batches can overload a domain's document service. </p>
39
- * <p>The endpoint for submitting <code>UploadDocuments</code> requests is domain-specific. To get the document endpoint for your domain, use the Amazon CloudSearch configuration service <code>DescribeDomains</code> action. A domain's endpoints are also displayed on the domain dashboard in the Amazon CloudSearch console. </p>
40
- * <p>For more information about formatting your data for Amazon CloudSearch, see <a href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/preparing-data.html">Preparing Your Data</a> in the <i>Amazon CloudSearch Developer Guide</i>.
41
- * For more information about uploading data for indexing, see <a href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/uploading-data.html">Uploading Data</a> in the <i>Amazon CloudSearch Developer Guide</i>. </p>
42
- * @example
43
- * Use a bare-bones client and the command you need to make an API call.
44
- * ```javascript
45
- * import { CloudSearchDomainClient, UploadDocumentsCommand } from "@aws-sdk/client-cloudsearch-domain"; // ES Modules import
46
- * // const { CloudSearchDomainClient, UploadDocumentsCommand } = require("@aws-sdk/client-cloudsearch-domain"); // CommonJS import
47
- * const client = new CloudSearchDomainClient(config);
48
- * const command = new UploadDocumentsCommand(input);
49
- * const response = await client.send(command);
50
- * ```
51
- *
52
- * @see {@link UploadDocumentsCommandInput} for command's `input` shape.
53
- * @see {@link UploadDocumentsCommandOutput} for command's `response` shape.
54
- * @see {@link CloudSearchDomainClientResolvedConfig | config} for command's `input` shape.
55
- *
56
- */
57
- export class UploadDocumentsCommand extends $Command<
58
- UploadDocumentsCommandInput,
59
- UploadDocumentsCommandOutput,
60
- CloudSearchDomainClientResolvedConfig
61
- > {
62
- // Start section: command_properties
63
- // End section: command_properties
64
-
65
- constructor(readonly input: UploadDocumentsCommandInput) {
66
- // Start section: command_constructor
67
- super();
68
- // End section: command_constructor
69
- }
70
-
71
- /**
72
- * @internal
73
- */
74
- resolveMiddleware(
75
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
76
- configuration: CloudSearchDomainClientResolvedConfig,
77
- options?: __HttpHandlerOptions
78
- ): Handler<UploadDocumentsCommandInput, UploadDocumentsCommandOutput> {
79
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
80
-
81
- const stack = clientStack.concat(this.middlewareStack);
82
-
83
- const { logger } = configuration;
84
- const clientName = "CloudSearchDomainClient";
85
- const commandName = "UploadDocumentsCommand";
86
- const handlerExecutionContext: HandlerExecutionContext = {
87
- logger,
88
- clientName,
89
- commandName,
90
- inputFilterSensitiveLog: UploadDocumentsRequest.filterSensitiveLog,
91
- outputFilterSensitiveLog: UploadDocumentsResponse.filterSensitiveLog,
92
- };
93
- const { requestHandler } = configuration;
94
- return stack.resolve(
95
- (request: FinalizeHandlerArguments<any>) =>
96
- requestHandler.handle(request.request as __HttpRequest, options || {}),
97
- handlerExecutionContext
98
- );
99
- }
100
-
101
- private serialize(input: UploadDocumentsCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
102
- return serializeAws_restJson1UploadDocumentsCommand(input, context);
103
- }
104
-
105
- private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<UploadDocumentsCommandOutput> {
106
- return deserializeAws_restJson1UploadDocumentsCommand(output, context);
107
- }
108
-
109
- // Start section: command_body_extra
110
- // End section: command_body_extra
111
- }
package/src/endpoints.ts DELETED
@@ -1,57 +0,0 @@
1
- import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver";
2
- import { RegionInfoProvider } from "@aws-sdk/types";
3
-
4
- const regionHash: RegionHash = {};
5
-
6
- const partitionHash: PartitionHash = {
7
- aws: {
8
- regions: [
9
- "af-south-1",
10
- "ap-east-1",
11
- "ap-northeast-1",
12
- "ap-northeast-2",
13
- "ap-northeast-3",
14
- "ap-south-1",
15
- "ap-southeast-1",
16
- "ap-southeast-2",
17
- "ca-central-1",
18
- "eu-central-1",
19
- "eu-north-1",
20
- "eu-south-1",
21
- "eu-west-1",
22
- "eu-west-2",
23
- "eu-west-3",
24
- "me-south-1",
25
- "sa-east-1",
26
- "us-east-1",
27
- "us-east-2",
28
- "us-west-1",
29
- "us-west-2",
30
- ],
31
- hostname: "cloudsearchdomain.{region}.amazonaws.com",
32
- },
33
- "aws-cn": {
34
- regions: ["cn-north-1", "cn-northwest-1"],
35
- hostname: "cloudsearchdomain.{region}.amazonaws.com.cn",
36
- },
37
- "aws-iso": {
38
- regions: ["us-iso-east-1"],
39
- hostname: "cloudsearchdomain.{region}.c2s.ic.gov",
40
- },
41
- "aws-iso-b": {
42
- regions: ["us-isob-east-1"],
43
- hostname: "cloudsearchdomain.{region}.sc2s.sgov.gov",
44
- },
45
- "aws-us-gov": {
46
- regions: ["us-gov-east-1", "us-gov-west-1"],
47
- hostname: "cloudsearchdomain.{region}.amazonaws.com",
48
- },
49
- };
50
-
51
- export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) =>
52
- getRegionInfo(region, {
53
- ...options,
54
- signingService: "cloudsearch",
55
- regionHash,
56
- partitionHash,
57
- });
package/src/index.ts DELETED
@@ -1,6 +0,0 @@
1
- export * from "./CloudSearchDomainClient";
2
- export * from "./CloudSearchDomain";
3
- export * from "./commands/SearchCommand";
4
- export * from "./commands/SuggestCommand";
5
- export * from "./commands/UploadDocumentsCommand";
6
- export * from "./models/index";
@@ -1 +0,0 @@
1
- export * from "./models_0";