Skip to content

describe_instance_type_limits async

describe_instance_type_limits(
    instance_type: OpenSearchPartitionInstanceType,
    engine_version: VersionString,
    *,
    config_overrides: Optional[AsyncOpenSearchClientConfig] = None,
    domain_name: Optional[DomainName] = None,
) -> DescribeInstanceTypeLimitsResponse

Describes the instance count, storage, and master node limits for a given OpenSearch or Elasticsearch version and instance type.

Parameters:

  • domain_name (Optional[DomainName], default: None ) –

    The name of the domain. Only specify if you need the limits for an existing domain.

  • instance_type (OpenSearchPartitionInstanceType) –

    The OpenSearch Service instance type for which you need limit information.

  • engine_version (VersionString) –

    Version of OpenSearch or Elasticsearch, in the format Elasticsearch_X.Y or OpenSearch_X.Y. Defaults to the latest version of OpenSearch.

Raises:

  • BaseException –

    An error occurred while processing the request.

  • 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.

  • ResourceNotFoundException –

    An exception for accessing or deleting a resource that doesn't exist.

  • 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/async_open_search.py
async def describe_instance_type_limits(
    self,
    instance_type: "capo_opensearch.types.open_search_partition_instance_type.OpenSearchPartitionInstanceType",
    engine_version: "capo_opensearch.types.version_string.VersionString",
    *,
    config_overrides: Optional[AsyncOpenSearchClientConfig] = None,
    domain_name: Optional["capo_opensearch.types.domain_name.DomainName"] = None,
) -> "capo_opensearch.types.describe_instance_type_limits_response.DescribeInstanceTypeLimitsResponse":
    """<p>Describes the instance count, storage, and master node limits for a given OpenSearch or Elasticsearch version and instance type.</p>

    Args:
        domain_name: <p>The name of the domain. Only specify if you need the limits for an existing domain.</p>
        instance_type: <p>The OpenSearch Service instance type for which you need limit information.</p>
        engine_version: <p>Version of OpenSearch or Elasticsearch, in the format Elasticsearch_X.Y or OpenSearch_X.Y. Defaults to the latest version of OpenSearch.</p>

    Raises:
        capo_opensearch.errors.base_exception.BaseException: <p>An error occurred while processing the request.</p>
        capo_opensearch.errors.internal_exception.InternalException: <p>Request processing failed because of an unknown error, exception, or internal failure.</p>
        capo_opensearch.errors.invalid_type_exception.InvalidTypeException: <p>An exception for trying to create or access a sub-resource that's either invalid or not supported.</p>
        capo_opensearch.errors.limit_exceeded_exception.LimitExceededException: <p>An exception for trying to create more than the allowed number of resources or sub-resources.</p>
        capo_opensearch.errors.resource_not_found_exception.ResourceNotFoundException: <p>An exception for accessing or deleting a resource that doesn't exist.</p>
        capo_opensearch.errors.validation_exception.ValidationException: <p>An exception for accessing or deleting a resource that doesn't exist.</p>
        capo_opensearch.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_opensearch.types.describe_instance_type_limits_request.DescribeInstanceTypeLimitsRequest]",
    ) -> AsyncOperationResponse[
        "capo_opensearch.types.describe_instance_type_limits_response.DescribeInstanceTypeLimitsResponse"
    ]:
        import capo_opensearch._operations.amazon_open_search_service.describe_instance_type_limits

        (
            output,
            http_response,
        ) = await capo_opensearch._operations.amazon_open_search_service.describe_instance_type_limits.async_describe_instance_type_limits(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeInstanceTypeLimits")
    )
    input_: capo_opensearch.types.describe_instance_type_limits_request.DescribeInstanceTypeLimitsRequest = {
        "instance_type": instance_type,
        "engine_version": engine_version,
    }
    if domain_name is not None:
        input_["domain_name"] = domain_name

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output