create_domain
¶
create_domain(
domain_name: DomainName,
*,
config_overrides: Optional[OpenSearchClientConfig] = None,
engine_version: Optional[VersionString] = None,
cluster_config: Optional[ClusterConfig] = None,
ebs_options: Optional[EBSOptions] = None,
access_policies: Optional[PolicyDocument] = None,
ip_address_type: Optional[IPAddressType] = None,
snapshot_options: Optional[SnapshotOptions] = None,
vpc_options: Optional[VPCOptions] = None,
cognito_options: Optional[CognitoOptions] = None,
encryption_at_rest_options: Optional[EncryptionAtRestOptions] = None,
node_to_node_encryption_options: Optional[NodeToNodeEncryptionOptions] = None,
advanced_options: Optional[AdvancedOptions] = None,
log_publishing_options: Optional[LogPublishingOptions] = None,
catalog_options: Optional[CatalogOptions] = None,
domain_endpoint_options: Optional[DomainEndpointOptions] = None,
advanced_security_options: Optional[AdvancedSecurityOptionsInput] = None,
identity_center_options: Optional[IdentityCenterOptionsInput] = None,
tag_list: Optional[TagList] = None,
auto_tune_options: Optional[AutoTuneOptionsInput] = None,
off_peak_window_options: Optional[OffPeakWindowOptions] = None,
software_update_options: Optional[SoftwareUpdateOptions] = None,
aiml_options: Optional[AIMLOptionsInput] = None,
deployment_strategy_options: Optional[DeploymentStrategyOptions] = None,
automated_snapshot_pause_options: Optional[
AutomatedSnapshotPauseRequestOptions
] = None,
use_case: Optional[DomainUseCase] = None,
engine_mode: Optional[EngineMode] = None,
) -> CreateDomainResponse
Creates an Amazon OpenSearch Service domain. For more information, see Creating and managing Amazon OpenSearch Service domains.
Parameters:
-
domain_name(DomainName) –Name of the OpenSearch Service domain to create. Domain names are unique across the domains owned by an account within an Amazon Web Services Region.
-
engine_version(Optional[VersionString], default:None) –String of format Elasticsearch_X.Y or OpenSearch_X.Y to specify the engine version for the OpenSearch Service domain. For example,
OpenSearch_1.0orElasticsearch_7.9. For more information, see Creating and managing Amazon OpenSearch Service domains. -
cluster_config(Optional[ClusterConfig], default:None) –Container for the cluster configuration of a domain.
-
ebs_options(Optional[EBSOptions], default:None) –Container for the parameters required to enable EBS-based storage for an OpenSearch Service domain.
-
access_policies(Optional[PolicyDocument], default:None) –Identity and Access Management (IAM) policy document specifying the access policies for the new domain.
-
ip_address_type(Optional[IPAddressType], default:None) –Specify either dual stack or IPv4 as your IP address type. Dual stack allows you to share domain resources across IPv4 and IPv6 address types, and is the recommended option. If you set your IP address type to dual stack, you can't change your address type later.
-
snapshot_options(Optional[SnapshotOptions], default:None) –DEPRECATED. Container for the parameters required to configure automated snapshots of domain indexes.
-
vpc_options(Optional[VPCOptions], default:None) –Container for the values required to configure VPC access domains. If you don't specify these values, OpenSearch Service creates the domain with a public endpoint. For more information, see Launching your Amazon OpenSearch Service domains using a VPC.
-
cognito_options(Optional[CognitoOptions], default:None) –Key-value pairs to configure Amazon Cognito authentication. For more information, see Configuring Amazon Cognito authentication for OpenSearch Dashboards.
-
encryption_at_rest_options(Optional[EncryptionAtRestOptions], default:None) –Key-value pairs to enable encryption at rest.
-
node_to_node_encryption_options(Optional[NodeToNodeEncryptionOptions], default:None) –Enables node-to-node encryption.
-
advanced_options(Optional[AdvancedOptions], default:None) –Key-value pairs to specify advanced configuration options. The following key-value pairs are supported:
-
"rest.action.multi.allow_explicit_index": "true" | "false"- Note the use of a string rather than a boolean. Specifies whether explicit references to indexes are allowed inside the body of HTTP requests. If you want to configure access policies for domain sub-resources, such as specific indexes and domain APIs, you must disable this property. Default is true. -
"indices.fielddata.cache.size": "80"- Note the use of a string rather than a boolean. Specifies the percentage of heap space allocated to field data. Default is unbounded. -
"indices.query.bool.max_clause_count": "1024"- Note the use of a string rather than a boolean. Specifies the maximum number of clauses allowed in a Lucene boolean query. Default is 1,024. Queries with more than the permitted number of clauses result in aTooManyClauseserror. -
"override_main_response_version": "true" | "false"- Note the use of a string rather than a boolean. Specifies whether the domain reports its version as 7.10 to allow Elasticsearch OSS clients and plugins to continue working with it. Default is false when creating a domain and true when upgrading a domain.
For more information, see Advanced cluster parameters.
-
-
log_publishing_options(Optional[LogPublishingOptions], default:None) –Key-value pairs to configure log publishing.
-
catalog_options(Optional[CatalogOptions], default:None) –Options for publishing the domain's data to a data catalog, such as a service-managed Amazon S3 Tables catalog.
-
domain_endpoint_options(Optional[DomainEndpointOptions], default:None) –Additional options for the domain endpoint, such as whether to require HTTPS for all traffic.
-
advanced_security_options(Optional[AdvancedSecurityOptionsInput], default:None) –Options for fine-grained access control.
-
identity_center_options(Optional[IdentityCenterOptionsInput], default:None) –Configuration options for enabling and managing IAM Identity Center integration within a domain.
-
tag_list(Optional[TagList], default:None) –List of tags to add to the domain upon creation.
-
auto_tune_options(Optional[AutoTuneOptionsInput], default:None) –Options for Auto-Tune.
-
off_peak_window_options(Optional[OffPeakWindowOptions], default:None) –Specifies a daily 10-hour time block during which OpenSearch Service can perform configuration changes on the domain, including service software updates and Auto-Tune enhancements that require a blue/green deployment. If no options are specified, the default start time of 10:00 P.M. local time (for the Region that the domain is created in) is used.
-
software_update_options(Optional[SoftwareUpdateOptions], default:None) –Software update options for the domain.
-
aiml_options(Optional[AIMLOptionsInput], default:None) –Options for all machine learning features for the specified domain.
-
deployment_strategy_options(Optional[DeploymentStrategyOptions], default:None) –Specifies the deployment strategy options for the domain.
-
automated_snapshot_pause_options(Optional[AutomatedSnapshotPauseRequestOptions], default:None) –Specifies the automated snapshot pause options for the domain.
Suspending snapshots reduces data protection. You cannot restore your domain to points in time when snapshots are suspended. Use this feature only for short-term operational needs such as migrations or maintenance windows.
Maximum suspension duration: 3 days.
-
use_case(Optional[DomainUseCase], default:None) –The primary use case for the domain. For valid values, see
DomainUseCase. -
engine_mode(Optional[EngineMode], default:None) –The engine mode for the domain. For valid values and requirements, see
EngineMode.
Raises:
-
BaseException–An error occurred while processing the request.
-
DisabledOperationException–An error occured because the client wanted to access an unsupported operation.
-
InternalException–Request processing failed because of an unknown error, exception, or internal failure.
-
InvalidTypeException–An exception for trying to create or access a sub-resource that's either invalid or not supported.
-
LimitExceededException–An exception for trying to create more than the allowed number of resources or sub-resources.
-
ResourceAlreadyExistsException–An exception for creating a resource that already exists.
-
ValidationException–An exception for accessing or deleting a resource that doesn't exist.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_opensearch/_services/open_search.py
1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 | |