Skip to content

OpenSearchServiceServerlessClient

Index > OpenSearchServiceServerless > OpenSearchServiceServerlessClient

Auto-generated documentation for OpenSearchServiceServerless type annotations stubs module mypy-boto3-opensearchserverless.

OpenSearchServiceServerlessClient

Type annotations and code completion for boto3.client("opensearchserverless"). boto3 documentation

Usage example
from boto3.session import Session
from mypy_boto3_opensearchserverless.client import OpenSearchServiceServerlessClient

def get_opensearchserverless_client() -> OpenSearchServiceServerlessClient:
    return Session().client("opensearchserverless")

Exceptions

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("opensearchserverless").exceptions structure.

Usage example
client = boto3.client("opensearchserverless")

try:
    do_something(client)
except (
    client.ClientError,
    client.ConflictException,
    client.InternalServerException,
    client.ResourceNotFoundException,
    client.ValidationException,
) as e:
    print(e)
Type checking example
from mypy_boto3_opensearchserverless.client import Exceptions

def handle_error(exc: Exceptions.ClientError) -> None:
    ...

Methods

batch_get_collection

Returns attributes for one or more collections, including the collection endpoint and the OpenSearch Dashboards endpoint.

Type annotations and code completion for boto3.client("opensearchserverless").batch_get_collection method. boto3 documentation

Method definition
def batch_get_collection(
    self,
    *,
    ids: Sequence[str] = ...,
    names: Sequence[str] = ...,
) -> BatchGetCollectionResponseTypeDef:  # (1)
    ...
  1. See BatchGetCollectionResponseTypeDef
Usage example with kwargs
kwargs: BatchGetCollectionRequestRequestTypeDef = {  # (1)
    "ids": ...,
}

parent.batch_get_collection(**kwargs)
  1. See BatchGetCollectionRequestRequestTypeDef

batch_get_vpc_endpoint

Returns attributes for one or more VPC endpoints associated with the current account.

Type annotations and code completion for boto3.client("opensearchserverless").batch_get_vpc_endpoint method. boto3 documentation

Method definition
def batch_get_vpc_endpoint(
    self,
    *,
    ids: Sequence[str],
) -> BatchGetVpcEndpointResponseTypeDef:  # (1)
    ...
  1. See BatchGetVpcEndpointResponseTypeDef
Usage example with kwargs
kwargs: BatchGetVpcEndpointRequestRequestTypeDef = {  # (1)
    "ids": ...,
}

parent.batch_get_vpc_endpoint(**kwargs)
  1. See BatchGetVpcEndpointRequestRequestTypeDef

can_paginate

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("opensearchserverless").can_paginate method. boto3 documentation

Method definition
def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("opensearchserverless").close method. boto3 documentation

Method definition
def close(
    self,
) -> None:
    ...

create_access_policy

Creates a data access policy for OpenSearch Serverless.

Type annotations and code completion for boto3.client("opensearchserverless").create_access_policy method. boto3 documentation

Method definition
def create_access_policy(
    self,
    *,
    name: str,
    policy: str,
    type: AccessPolicyTypeType,  # (1)
    clientToken: str = ...,
    description: str = ...,
) -> CreateAccessPolicyResponseTypeDef:  # (2)
    ...
  1. See AccessPolicyTypeType
  2. See CreateAccessPolicyResponseTypeDef
Usage example with kwargs
kwargs: CreateAccessPolicyRequestRequestTypeDef = {  # (1)
    "name": ...,
    "policy": ...,
    "type": ...,
}

parent.create_access_policy(**kwargs)
  1. See CreateAccessPolicyRequestRequestTypeDef

create_collection

Creates a new OpenSearch Serverless collection.

Type annotations and code completion for boto3.client("opensearchserverless").create_collection method. boto3 documentation

Method definition
def create_collection(
    self,
    *,
    name: str,
    clientToken: str = ...,
    description: str = ...,
    tags: Sequence[TagTypeDef] = ...,  # (1)
    type: CollectionTypeType = ...,  # (2)
) -> CreateCollectionResponseTypeDef:  # (3)
    ...
  1. See TagTypeDef
  2. See CollectionTypeType
  3. See CreateCollectionResponseTypeDef
Usage example with kwargs
kwargs: CreateCollectionRequestRequestTypeDef = {  # (1)
    "name": ...,
}

parent.create_collection(**kwargs)
  1. See CreateCollectionRequestRequestTypeDef

create_security_config

Specifies a security configuration for OpenSearch Serverless.

Type annotations and code completion for boto3.client("opensearchserverless").create_security_config method. boto3 documentation

Method definition
def create_security_config(
    self,
    *,
    name: str,
    type: SecurityConfigTypeType,  # (1)
    clientToken: str = ...,
    description: str = ...,
    samlOptions: SamlConfigOptionsTypeDef = ...,  # (2)
) -> CreateSecurityConfigResponseTypeDef:  # (3)
    ...
  1. See SecurityConfigTypeType
  2. See SamlConfigOptionsTypeDef
  3. See CreateSecurityConfigResponseTypeDef
Usage example with kwargs
kwargs: CreateSecurityConfigRequestRequestTypeDef = {  # (1)
    "name": ...,
    "type": ...,
}

parent.create_security_config(**kwargs)
  1. See CreateSecurityConfigRequestRequestTypeDef

create_security_policy

Creates a security policy to be used by one or more OpenSearch Serverless collections.

Type annotations and code completion for boto3.client("opensearchserverless").create_security_policy method. boto3 documentation

Method definition
def create_security_policy(
    self,
    *,
    name: str,
    policy: str,
    type: SecurityPolicyTypeType,  # (1)
    clientToken: str = ...,
    description: str = ...,
) -> CreateSecurityPolicyResponseTypeDef:  # (2)
    ...
  1. See SecurityPolicyTypeType
  2. See CreateSecurityPolicyResponseTypeDef
Usage example with kwargs
kwargs: CreateSecurityPolicyRequestRequestTypeDef = {  # (1)
    "name": ...,
    "policy": ...,
    "type": ...,
}

parent.create_security_policy(**kwargs)
  1. See CreateSecurityPolicyRequestRequestTypeDef

create_vpc_endpoint

Creates an OpenSearch Serverless-managed interface VPC endpoint.

Type annotations and code completion for boto3.client("opensearchserverless").create_vpc_endpoint method. boto3 documentation

Method definition
def create_vpc_endpoint(
    self,
    *,
    name: str,
    subnetIds: Sequence[str],
    vpcId: str,
    clientToken: str = ...,
    securityGroupIds: Sequence[str] = ...,
) -> CreateVpcEndpointResponseTypeDef:  # (1)
    ...
  1. See CreateVpcEndpointResponseTypeDef
Usage example with kwargs
kwargs: CreateVpcEndpointRequestRequestTypeDef = {  # (1)
    "name": ...,
    "subnetIds": ...,
    "vpcId": ...,
}

parent.create_vpc_endpoint(**kwargs)
  1. See CreateVpcEndpointRequestRequestTypeDef

delete_access_policy

Deletes an OpenSearch Serverless access policy.

Type annotations and code completion for boto3.client("opensearchserverless").delete_access_policy method. boto3 documentation

Method definition
def delete_access_policy(
    self,
    *,
    name: str,
    type: AccessPolicyTypeType,  # (1)
    clientToken: str = ...,
) -> Dict[str, Any]:
    ...
  1. See AccessPolicyTypeType
Usage example with kwargs
kwargs: DeleteAccessPolicyRequestRequestTypeDef = {  # (1)
    "name": ...,
    "type": ...,
}

parent.delete_access_policy(**kwargs)
  1. See DeleteAccessPolicyRequestRequestTypeDef

delete_collection

Deletes an OpenSearch Serverless collection.

Type annotations and code completion for boto3.client("opensearchserverless").delete_collection method. boto3 documentation

Method definition
def delete_collection(
    self,
    *,
    id: str,
    clientToken: str = ...,
) -> DeleteCollectionResponseTypeDef:  # (1)
    ...
  1. See DeleteCollectionResponseTypeDef
Usage example with kwargs
kwargs: DeleteCollectionRequestRequestTypeDef = {  # (1)
    "id": ...,
}

parent.delete_collection(**kwargs)
  1. See DeleteCollectionRequestRequestTypeDef

delete_security_config

Deletes a security configuration for OpenSearch Serverless.

Type annotations and code completion for boto3.client("opensearchserverless").delete_security_config method. boto3 documentation

Method definition
def delete_security_config(
    self,
    *,
    id: str,
    clientToken: str = ...,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: DeleteSecurityConfigRequestRequestTypeDef = {  # (1)
    "id": ...,
}

parent.delete_security_config(**kwargs)
  1. See DeleteSecurityConfigRequestRequestTypeDef

delete_security_policy

Deletes an OpenSearch Serverless security policy.

Type annotations and code completion for boto3.client("opensearchserverless").delete_security_policy method. boto3 documentation

Method definition
def delete_security_policy(
    self,
    *,
    name: str,
    type: SecurityPolicyTypeType,  # (1)
    clientToken: str = ...,
) -> Dict[str, Any]:
    ...
  1. See SecurityPolicyTypeType
Usage example with kwargs
kwargs: DeleteSecurityPolicyRequestRequestTypeDef = {  # (1)
    "name": ...,
    "type": ...,
}

parent.delete_security_policy(**kwargs)
  1. See DeleteSecurityPolicyRequestRequestTypeDef

delete_vpc_endpoint

Deletes an OpenSearch Serverless-managed interface endpoint.

Type annotations and code completion for boto3.client("opensearchserverless").delete_vpc_endpoint method. boto3 documentation

Method definition
def delete_vpc_endpoint(
    self,
    *,
    id: str,
    clientToken: str = ...,
) -> DeleteVpcEndpointResponseTypeDef:  # (1)
    ...
  1. See DeleteVpcEndpointResponseTypeDef
Usage example with kwargs
kwargs: DeleteVpcEndpointRequestRequestTypeDef = {  # (1)
    "id": ...,
}

parent.delete_vpc_endpoint(**kwargs)
  1. See DeleteVpcEndpointRequestRequestTypeDef

generate_presigned_url

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for boto3.client("opensearchserverless").generate_presigned_url method. boto3 documentation

Method definition
def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

get_access_policy

Returns an OpenSearch Serverless access policy.

Type annotations and code completion for boto3.client("opensearchserverless").get_access_policy method. boto3 documentation

Method definition
def get_access_policy(
    self,
    *,
    name: str,
    type: AccessPolicyTypeType,  # (1)
) -> GetAccessPolicyResponseTypeDef:  # (2)
    ...
  1. See AccessPolicyTypeType
  2. See GetAccessPolicyResponseTypeDef
Usage example with kwargs
kwargs: GetAccessPolicyRequestRequestTypeDef = {  # (1)
    "name": ...,
    "type": ...,
}

parent.get_access_policy(**kwargs)
  1. See GetAccessPolicyRequestRequestTypeDef

get_account_settings

Returns account-level settings related to OpenSearch Serverless.

Type annotations and code completion for boto3.client("opensearchserverless").get_account_settings method. boto3 documentation

Method definition
def get_account_settings(
    self,
) -> GetAccountSettingsResponseTypeDef:  # (1)
    ...
  1. See GetAccountSettingsResponseTypeDef

get_policies_stats

Returns statistical information about your OpenSearch Serverless access policies, security configurations, and security policies.

Type annotations and code completion for boto3.client("opensearchserverless").get_policies_stats method. boto3 documentation

Method definition
def get_policies_stats(
    self,
) -> GetPoliciesStatsResponseTypeDef:  # (1)
    ...
  1. See GetPoliciesStatsResponseTypeDef

get_security_config

Returns information about an OpenSearch Serverless security configuration.

Type annotations and code completion for boto3.client("opensearchserverless").get_security_config method. boto3 documentation

Method definition
def get_security_config(
    self,
    *,
    id: str,
) -> GetSecurityConfigResponseTypeDef:  # (1)
    ...
  1. See GetSecurityConfigResponseTypeDef
Usage example with kwargs
kwargs: GetSecurityConfigRequestRequestTypeDef = {  # (1)
    "id": ...,
}

parent.get_security_config(**kwargs)
  1. See GetSecurityConfigRequestRequestTypeDef

get_security_policy

Returns information about a configured OpenSearch Serverless security policy.

Type annotations and code completion for boto3.client("opensearchserverless").get_security_policy method. boto3 documentation

Method definition
def get_security_policy(
    self,
    *,
    name: str,
    type: SecurityPolicyTypeType,  # (1)
) -> GetSecurityPolicyResponseTypeDef:  # (2)
    ...
  1. See SecurityPolicyTypeType
  2. See GetSecurityPolicyResponseTypeDef
Usage example with kwargs
kwargs: GetSecurityPolicyRequestRequestTypeDef = {  # (1)
    "name": ...,
    "type": ...,
}

parent.get_security_policy(**kwargs)
  1. See GetSecurityPolicyRequestRequestTypeDef

list_access_policies

Returns information about a list of OpenSearch Serverless access policies.

Type annotations and code completion for boto3.client("opensearchserverless").list_access_policies method. boto3 documentation

Method definition
def list_access_policies(
    self,
    *,
    type: AccessPolicyTypeType,  # (1)
    maxResults: int = ...,
    nextToken: str = ...,
    resource: Sequence[str] = ...,
) -> ListAccessPoliciesResponseTypeDef:  # (2)
    ...
  1. See AccessPolicyTypeType
  2. See ListAccessPoliciesResponseTypeDef
Usage example with kwargs
kwargs: ListAccessPoliciesRequestRequestTypeDef = {  # (1)
    "type": ...,
}

parent.list_access_policies(**kwargs)
  1. See ListAccessPoliciesRequestRequestTypeDef

list_collections

Lists all OpenSearch Serverless collections.

Type annotations and code completion for boto3.client("opensearchserverless").list_collections method. boto3 documentation

Method definition
def list_collections(
    self,
    *,
    collectionFilters: CollectionFiltersTypeDef = ...,  # (1)
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListCollectionsResponseTypeDef:  # (2)
    ...
  1. See CollectionFiltersTypeDef
  2. See ListCollectionsResponseTypeDef
Usage example with kwargs
kwargs: ListCollectionsRequestRequestTypeDef = {  # (1)
    "collectionFilters": ...,
}

parent.list_collections(**kwargs)
  1. See ListCollectionsRequestRequestTypeDef

list_security_configs

Returns information about configured OpenSearch Serverless security configurations.

Type annotations and code completion for boto3.client("opensearchserverless").list_security_configs method. boto3 documentation

Method definition
def list_security_configs(
    self,
    *,
    type: SecurityConfigTypeType,  # (1)
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListSecurityConfigsResponseTypeDef:  # (2)
    ...
  1. See SecurityConfigTypeType
  2. See ListSecurityConfigsResponseTypeDef
Usage example with kwargs
kwargs: ListSecurityConfigsRequestRequestTypeDef = {  # (1)
    "type": ...,
}

parent.list_security_configs(**kwargs)
  1. See ListSecurityConfigsRequestRequestTypeDef

list_security_policies

Returns information about configured OpenSearch Serverless security policies.

Type annotations and code completion for boto3.client("opensearchserverless").list_security_policies method. boto3 documentation

Method definition
def list_security_policies(
    self,
    *,
    type: SecurityPolicyTypeType,  # (1)
    maxResults: int = ...,
    nextToken: str = ...,
    resource: Sequence[str] = ...,
) -> ListSecurityPoliciesResponseTypeDef:  # (2)
    ...
  1. See SecurityPolicyTypeType
  2. See ListSecurityPoliciesResponseTypeDef
Usage example with kwargs
kwargs: ListSecurityPoliciesRequestRequestTypeDef = {  # (1)
    "type": ...,
}

parent.list_security_policies(**kwargs)
  1. See ListSecurityPoliciesRequestRequestTypeDef

list_tags_for_resource

Returns the tags for an OpenSearch Serverless resource.

Type annotations and code completion for boto3.client("opensearchserverless").list_tags_for_resource method. boto3 documentation

Method definition
def list_tags_for_resource(
    self,
    *,
    resourceArn: str,
) -> ListTagsForResourceResponseTypeDef:  # (1)
    ...
  1. See ListTagsForResourceResponseTypeDef
Usage example with kwargs
kwargs: ListTagsForResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
}

parent.list_tags_for_resource(**kwargs)
  1. See ListTagsForResourceRequestRequestTypeDef

list_vpc_endpoints

Returns the OpenSearch Serverless-managed interface VPC endpoints associated with the current account.

Type annotations and code completion for boto3.client("opensearchserverless").list_vpc_endpoints method. boto3 documentation

Method definition
def list_vpc_endpoints(
    self,
    *,
    maxResults: int = ...,
    nextToken: str = ...,
    vpcEndpointFilters: VpcEndpointFiltersTypeDef = ...,  # (1)
) -> ListVpcEndpointsResponseTypeDef:  # (2)
    ...
  1. See VpcEndpointFiltersTypeDef
  2. See ListVpcEndpointsResponseTypeDef
Usage example with kwargs
kwargs: ListVpcEndpointsRequestRequestTypeDef = {  # (1)
    "maxResults": ...,
}

parent.list_vpc_endpoints(**kwargs)
  1. See ListVpcEndpointsRequestRequestTypeDef

tag_resource

Associates tags with an OpenSearch Serverless resource.

Type annotations and code completion for boto3.client("opensearchserverless").tag_resource method. boto3 documentation

Method definition
def tag_resource(
    self,
    *,
    resourceArn: str,
    tags: Sequence[TagTypeDef],  # (1)
) -> Dict[str, Any]:
    ...
  1. See TagTypeDef
Usage example with kwargs
kwargs: TagResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "tags": ...,
}

parent.tag_resource(**kwargs)
  1. See TagResourceRequestRequestTypeDef

untag_resource

Removes a tag or set of tags from an OpenSearch Serverless resource.

Type annotations and code completion for boto3.client("opensearchserverless").untag_resource method. boto3 documentation

Method definition
def untag_resource(
    self,
    *,
    resourceArn: str,
    tagKeys: Sequence[str],
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: UntagResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "tagKeys": ...,
}

parent.untag_resource(**kwargs)
  1. See UntagResourceRequestRequestTypeDef

update_access_policy

Updates an OpenSearch Serverless access policy.

Type annotations and code completion for boto3.client("opensearchserverless").update_access_policy method. boto3 documentation

Method definition
def update_access_policy(
    self,
    *,
    name: str,
    policyVersion: str,
    type: AccessPolicyTypeType,  # (1)
    clientToken: str = ...,
    description: str = ...,
    policy: str = ...,
) -> UpdateAccessPolicyResponseTypeDef:  # (2)
    ...
  1. See AccessPolicyTypeType
  2. See UpdateAccessPolicyResponseTypeDef
Usage example with kwargs
kwargs: UpdateAccessPolicyRequestRequestTypeDef = {  # (1)
    "name": ...,
    "policyVersion": ...,
    "type": ...,
}

parent.update_access_policy(**kwargs)
  1. See UpdateAccessPolicyRequestRequestTypeDef

update_account_settings

Update the OpenSearch Serverless settings for the current Amazon Web Services account.

Type annotations and code completion for boto3.client("opensearchserverless").update_account_settings method. boto3 documentation

Method definition
def update_account_settings(
    self,
    *,
    capacityLimits: CapacityLimitsTypeDef = ...,  # (1)
) -> UpdateAccountSettingsResponseTypeDef:  # (2)
    ...
  1. See CapacityLimitsTypeDef
  2. See UpdateAccountSettingsResponseTypeDef
Usage example with kwargs
kwargs: UpdateAccountSettingsRequestRequestTypeDef = {  # (1)
    "capacityLimits": ...,
}

parent.update_account_settings(**kwargs)
  1. See UpdateAccountSettingsRequestRequestTypeDef

update_collection

Updates an OpenSearch Serverless collection.

Type annotations and code completion for boto3.client("opensearchserverless").update_collection method. boto3 documentation

Method definition
def update_collection(
    self,
    *,
    id: str,
    clientToken: str = ...,
    description: str = ...,
) -> UpdateCollectionResponseTypeDef:  # (1)
    ...
  1. See UpdateCollectionResponseTypeDef
Usage example with kwargs
kwargs: UpdateCollectionRequestRequestTypeDef = {  # (1)
    "id": ...,
}

parent.update_collection(**kwargs)
  1. See UpdateCollectionRequestRequestTypeDef

update_security_config

Updates a security configuration for OpenSearch Serverless.

Type annotations and code completion for boto3.client("opensearchserverless").update_security_config method. boto3 documentation

Method definition
def update_security_config(
    self,
    *,
    configVersion: str,
    id: str,
    clientToken: str = ...,
    description: str = ...,
    samlOptions: SamlConfigOptionsTypeDef = ...,  # (1)
) -> UpdateSecurityConfigResponseTypeDef:  # (2)
    ...
  1. See SamlConfigOptionsTypeDef
  2. See UpdateSecurityConfigResponseTypeDef
Usage example with kwargs
kwargs: UpdateSecurityConfigRequestRequestTypeDef = {  # (1)
    "configVersion": ...,
    "id": ...,
}

parent.update_security_config(**kwargs)
  1. See UpdateSecurityConfigRequestRequestTypeDef

update_security_policy

Updates an OpenSearch Serverless security policy.

Type annotations and code completion for boto3.client("opensearchserverless").update_security_policy method. boto3 documentation

Method definition
def update_security_policy(
    self,
    *,
    name: str,
    policyVersion: str,
    type: SecurityPolicyTypeType,  # (1)
    clientToken: str = ...,
    description: str = ...,
    policy: str = ...,
) -> UpdateSecurityPolicyResponseTypeDef:  # (2)
    ...
  1. See SecurityPolicyTypeType
  2. See UpdateSecurityPolicyResponseTypeDef
Usage example with kwargs
kwargs: UpdateSecurityPolicyRequestRequestTypeDef = {  # (1)
    "name": ...,
    "policyVersion": ...,
    "type": ...,
}

parent.update_security_policy(**kwargs)
  1. See UpdateSecurityPolicyRequestRequestTypeDef

update_vpc_endpoint

Updates an OpenSearch Serverless-managed interface endpoint.

Type annotations and code completion for boto3.client("opensearchserverless").update_vpc_endpoint method. boto3 documentation

Method definition
def update_vpc_endpoint(
    self,
    *,
    id: str,
    addSecurityGroupIds: Sequence[str] = ...,
    addSubnetIds: Sequence[str] = ...,
    clientToken: str = ...,
    removeSecurityGroupIds: Sequence[str] = ...,
    removeSubnetIds: Sequence[str] = ...,
) -> UpdateVpcEndpointResponseTypeDef:  # (1)
    ...
  1. See UpdateVpcEndpointResponseTypeDef
Usage example with kwargs
kwargs: UpdateVpcEndpointRequestRequestTypeDef = {  # (1)
    "id": ...,
}

parent.update_vpc_endpoint(**kwargs)
  1. See UpdateVpcEndpointRequestRequestTypeDef