OpenSearchServerless class

Use the Amazon OpenSearch Serverless API to create, configure, and manage OpenSearch Serverless collections and security policies.

OpenSearch Serverless is an on-demand, pre-provisioned serverless configuration for Amazon OpenSearch Service. OpenSearch Serverless removes the operational complexities of provisioning, configuring, and tuning your OpenSearch clusters. It enables you to easily search and analyze petabytes of data without having to worry about the underlying infrastructure and data management.

To learn more about OpenSearch Serverless, see What is Amazon OpenSearch Serverless?

Constructors

OpenSearchServerless({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

batchGetCollection({List<String>? ids, List<String>? names}) Future<BatchGetCollectionResponse>
Returns attributes for one or more collections, including the collection endpoint, the OpenSearch Dashboards endpoint, and FIPS-compliant endpoints. For more information, see Creating and managing Amazon OpenSearch Serverless collections.
batchGetCollectionGroup({List<String>? ids, List<String>? names}) Future<BatchGetCollectionGroupResponse>
Returns attributes for one or more collection groups, including capacity limits and the number of collections in each group. For more information, see Creating and managing Amazon OpenSearch Serverless collections.
batchGetEffectiveLifecyclePolicy({required List<LifecyclePolicyResourceIdentifier> resourceIdentifiers}) Future<BatchGetEffectiveLifecyclePolicyResponse>
Returns a list of successful and failed retrievals for the OpenSearch Serverless indexes. For more information, see Viewing data lifecycle policies.
batchGetLifecyclePolicy({required List<LifecyclePolicyIdentifier> identifiers}) Future<BatchGetLifecyclePolicyResponse>
Returns one or more configured OpenSearch Serverless lifecycle policies. For more information, see Viewing data lifecycle policies.
batchGetVpcEndpoint({required List<String> ids}) Future<BatchGetVpcEndpointResponse>
Returns attributes for one or more VPC endpoints associated with the current account. For more information, see Access Amazon OpenSearch Serverless using an interface endpoint.
close() → void
Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
createAccessPolicy({required String name, required String policy, required AccessPolicyType type, String? clientToken, String? description}) Future<CreateAccessPolicyResponse>
Creates a data access policy for OpenSearch Serverless. Access policies limit access to collections and the resources within them, and allow a user to access that data irrespective of the access mechanism or network source. For more information, see Data access control for Amazon OpenSearch Serverless.
createCollection({required String name, String? clientToken, String? collectionGroupName, DeletionProtection? deletionProtection, String? description, EncryptionConfig? encryptionConfig, StandbyReplicas? standbyReplicas, List<Tag>? tags, CollectionType? type, VectorOptions? vectorOptions}) Future<CreateCollectionResponse>
Creates a new OpenSearch Serverless collection. For more information, see Creating and managing Amazon OpenSearch Serverless collections.
createCollectionGroup({required String name, required StandbyReplicas standbyReplicas, CollectionGroupCapacityLimits? capacityLimits, String? clientToken, String? description, ServerlessGeneration? generation, List<Tag>? tags}) Future<CreateCollectionGroupResponse>
Creates a collection group within OpenSearch Serverless. Collection groups let you manage OpenSearch Compute Units (OCUs) at a group level, with multiple collections sharing the group's capacity limits.
createIndex({required String id, required String indexName, Object? indexSchema}) Future<void>
Creates an index within an OpenSearch Serverless collection. Unlike other OpenSearch indexes, indexes created by this API are automatically configured to conduct automatic semantic enrichment ingestion and search. For more information, see About automatic semantic enrichment in the OpenSearch User Guide.
createLifecyclePolicy({required String name, required String policy, required LifecyclePolicyType type, String? clientToken, String? description}) Future<CreateLifecyclePolicyResponse>
Creates a lifecyle policy to be applied to OpenSearch Serverless indexes. Lifecycle policies define the number of days or hours to retain the data on an OpenSearch Serverless index. For more information, see Creating data lifecycle policies.
createSecurityConfig({required String name, required SecurityConfigType type, String? clientToken, String? description, IamFederationConfigOptions? iamFederationOptions, CreateIamIdentityCenterConfigOptions? iamIdentityCenterOptions, SamlConfigOptions? samlOptions}) Future<CreateSecurityConfigResponse>
Specifies a security configuration for OpenSearch Serverless. For more information, see SAML authentication for Amazon OpenSearch Serverless.
createSecurityPolicy({required String name, required String policy, required SecurityPolicyType type, String? clientToken, String? description}) Future<CreateSecurityPolicyResponse>
Creates a security policy to be used by one or more OpenSearch Serverless collections. Security policies provide access to a collection and its OpenSearch Dashboards endpoint from public networks or specific VPC endpoints. They also allow you to secure a collection with a KMS encryption key. For more information, see Network access for Amazon OpenSearch Serverless and Encryption at rest for Amazon OpenSearch Serverless.
createVpcEndpoint({required String name, required List<String> subnetIds, required String vpcId, String? clientToken, List<String>? securityGroupIds}) Future<CreateVpcEndpointResponse>
Creates an OpenSearch Serverless-managed interface VPC endpoint. For more information, see Access Amazon OpenSearch Serverless using an interface endpoint.
deleteAccessPolicy({required String name, required AccessPolicyType type, String? clientToken}) Future<void>
Deletes an OpenSearch Serverless access policy. For more information, see Data access control for Amazon OpenSearch Serverless.
deleteCollection({required String id, String? clientToken}) Future<DeleteCollectionResponse>
Deletes an OpenSearch Serverless collection. For more information, see Creating and managing Amazon OpenSearch Serverless collections.
deleteCollectionGroup({required String id, String? clientToken}) Future<void>
Deletes a collection group. You can only delete empty collection groups that contain no collections. For more information, see Creating and managing Amazon OpenSearch Serverless collections.
deleteIndex({required String id, required String indexName}) Future<void>
Deletes an index from an OpenSearch Serverless collection. Be aware that the index might be configured to conduct automatic semantic enrichment ingestion and search. For more information, see About automatic semantic enrichment.
deleteLifecyclePolicy({required String name, required LifecyclePolicyType type, String? clientToken}) Future<void>
Deletes an OpenSearch Serverless lifecycle policy. For more information, see Deleting data lifecycle policies.
deleteSecurityConfig({required String id, String? clientToken}) Future<void>
Deletes a security configuration for OpenSearch Serverless. For more information, see SAML authentication for Amazon OpenSearch Serverless.
deleteSecurityPolicy({required String name, required SecurityPolicyType type, String? clientToken}) Future<void>
Deletes an OpenSearch Serverless security policy.
deleteVpcEndpoint({required String id, String? clientToken}) Future<DeleteVpcEndpointResponse>
Deletes an OpenSearch Serverless-managed interface endpoint. For more information, see Access Amazon OpenSearch Serverless using an interface endpoint.
getAccessPolicy({required String name, required AccessPolicyType type}) Future<GetAccessPolicyResponse>
Returns an OpenSearch Serverless access policy. For more information, see Data access control for Amazon OpenSearch Serverless.
getAccountSettings() Future<GetAccountSettingsResponse>
Returns account-level settings related to OpenSearch Serverless.
getIndex({required String id, required String indexName}) Future<GetIndexResponse>
Retrieves information about an index in an OpenSearch Serverless collection, including its schema definition. The index might be configured to conduct automatic semantic enrichment ingestion and search. For more information, see About automatic semantic enrichment.
getPoliciesStats() Future<GetPoliciesStatsResponse>
Returns statistical information about your OpenSearch Serverless access policies, security configurations, and security policies.
getSecurityConfig({required String id}) Future<GetSecurityConfigResponse>
Returns information about an OpenSearch Serverless security configuration. For more information, see SAML authentication for Amazon OpenSearch Serverless.
getSecurityPolicy({required String name, required SecurityPolicyType type}) Future<GetSecurityPolicyResponse>
Returns information about a configured OpenSearch Serverless security policy. For more information, see Network access for Amazon OpenSearch Serverless and Encryption at rest for Amazon OpenSearch Serverless.
listAccessPolicies({required AccessPolicyType type, int? maxResults, String? nextToken, List<String>? resource}) Future<ListAccessPoliciesResponse>
Returns information about a list of OpenSearch Serverless access policies.
listCollectionGroups({int? maxResults, String? nextToken}) Future<ListCollectionGroupsResponse>
Returns a list of collection groups. For more information, see Creating and managing Amazon OpenSearch Serverless collections.
listCollections({CollectionFilters? collectionFilters, int? maxResults, String? nextToken}) Future<ListCollectionsResponse>
Lists all OpenSearch Serverless collections. For more information, see Creating and managing Amazon OpenSearch Serverless collections.
listLifecyclePolicies({required LifecyclePolicyType type, int? maxResults, String? nextToken, List<String>? resources}) Future<ListLifecyclePoliciesResponse>
Returns a list of OpenSearch Serverless lifecycle policies. For more information, see Viewing data lifecycle policies.
listSecurityConfigs({required SecurityConfigType type, int? maxResults, String? nextToken}) Future<ListSecurityConfigsResponse>
Returns information about configured OpenSearch Serverless security configurations. For more information, see SAML authentication for Amazon OpenSearch Serverless.
listSecurityPolicies({required SecurityPolicyType type, int? maxResults, String? nextToken, List<String>? resource}) Future<ListSecurityPoliciesResponse>
Returns information about configured OpenSearch Serverless security policies.
listTagsForResource({required String resourceArn}) Future<ListTagsForResourceResponse>
Returns the tags for an OpenSearch Serverless resource. For more information, see Tagging Amazon OpenSearch Serverless collections.
listVpcEndpoints({int? maxResults, String? nextToken, VpcEndpointFilters? vpcEndpointFilters}) Future<ListVpcEndpointsResponse>
Returns the OpenSearch Serverless-managed interface VPC endpoints associated with the current account. For more information, see Access Amazon OpenSearch Serverless using an interface endpoint.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
tagResource({required String resourceArn, required List<Tag> tags}) Future<void>
Associates tags with an OpenSearch Serverless resource. For more information, see Tagging Amazon OpenSearch Serverless collections.
toString() String
A string representation of this object.
inherited
untagResource({required String resourceArn, required List<String> tagKeys}) Future<void>
Removes a tag or set of tags from an OpenSearch Serverless resource. For more information, see Tagging Amazon OpenSearch Serverless collections.
updateAccessPolicy({required String name, required String policyVersion, required AccessPolicyType type, String? clientToken, String? description, String? policy}) Future<UpdateAccessPolicyResponse>
Updates an OpenSearch Serverless access policy. For more information, see Data access control for Amazon OpenSearch Serverless.
updateAccountSettings({CapacityLimits? capacityLimits}) Future<UpdateAccountSettingsResponse>
Update the OpenSearch Serverless settings for the current Amazon Web Services account. For more information, see Managing capacity limits for Amazon OpenSearch Serverless.
updateCollection({required String id, String? clientToken, DeletionProtection? deletionProtection, String? description, VectorOptions? vectorOptions}) Future<UpdateCollectionResponse>
Updates an OpenSearch Serverless collection.
updateCollectionGroup({required String id, CollectionGroupCapacityLimits? capacityLimits, String? clientToken, String? description}) Future<UpdateCollectionGroupResponse>
Updates the description and capacity limits of a collection group.
updateIndex({required String id, required String indexName, Object? indexSchema}) Future<void>
Updates an existing index in an OpenSearch Serverless collection. This operation allows you to modify the index schema, including adding new fields or changing field mappings. You can also enable automatic semantic enrichment ingestion and search. For more information, see About automatic semantic enrichment.
updateLifecyclePolicy({required String name, required String policyVersion, required LifecyclePolicyType type, String? clientToken, String? description, String? policy}) Future<UpdateLifecyclePolicyResponse>
Updates an OpenSearch Serverless access policy. For more information, see Updating data lifecycle policies.
updateSecurityConfig({required String configVersion, required String id, String? clientToken, String? description, IamFederationConfigOptions? iamFederationOptions, UpdateIamIdentityCenterConfigOptions? iamIdentityCenterOptionsUpdates, SamlConfigOptions? samlOptions}) Future<UpdateSecurityConfigResponse>
Updates a security configuration for OpenSearch Serverless. For more information, see SAML authentication for Amazon OpenSearch Serverless.
updateSecurityPolicy({required String name, required String policyVersion, required SecurityPolicyType type, String? clientToken, String? description, String? policy}) Future<UpdateSecurityPolicyResponse>
Updates an OpenSearch Serverless security policy. For more information, see Network access for Amazon OpenSearch Serverless and Encryption at rest for Amazon OpenSearch Serverless.
updateVpcEndpoint({required String id, List<String>? addSecurityGroupIds, List<String>? addSubnetIds, String? clientToken, List<String>? removeSecurityGroupIds, List<String>? removeSubnetIds}) Future<UpdateVpcEndpointResponse>
Updates an OpenSearch Serverless-managed interface endpoint. For more information, see Access Amazon OpenSearch Serverless using an interface endpoint.

Operators

operator ==(Object other) bool
The equality operator.
inherited