Skip to content

associate_packages

associate_packages(
    package_list: PackageDetailsForAssociationList,
    domain_name: DomainName,
    *,
    config_overrides: Optional[OpenSearchClientConfig] = None,
) -> AssociatePackagesResponse

Operation in the Amazon OpenSearch Service API for associating multiple packages with a domain simultaneously.

Parameters:

Raises:

  • BaseException –

    An error occurred while processing the request.

  • ConflictException –

    An error occurred because the client attempts to remove a resource that is currently in use.

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

  • 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/open_search.py
def associate_packages(
    self,
    package_list: "capo_opensearch.types.package_details_for_association_list.PackageDetailsForAssociationList",
    domain_name: "capo_opensearch.types.domain_name.DomainName",
    *,
    config_overrides: Optional[OpenSearchClientConfig] = None,
) -> "capo_opensearch.types.associate_packages_response.AssociatePackagesResponse":
    """<p>Operation in the Amazon OpenSearch Service API for associating multiple packages with a domain simultaneously.</p>

    Args:
        package_list: <p>A list of packages and their prerequisites to be associated with a domain.</p>

    Raises:
        capo_opensearch.errors.base_exception.BaseException: <p>An error occurred while processing the request.</p>
        capo_opensearch.errors.conflict_exception.ConflictException: <p>An error occurred because the client attempts to remove a resource that is currently in use.</p>
        capo_opensearch.errors.disabled_operation_exception.DisabledOperationException: <p>An error occured because the client wanted to access an unsupported operation.</p>
        capo_opensearch.errors.internal_exception.InternalException: <p>Request processing failed because of an unknown error, exception, or internal failure.</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.
    """

    def _handler(
        req: "OperationRequest[capo_opensearch.types.associate_packages_request.AssociatePackagesRequest]",
    ) -> OperationResponse[
        "capo_opensearch.types.associate_packages_response.AssociatePackagesResponse"
    ]:
        import capo_opensearch._operations.amazon_open_search_service.associate_packages

        output, http_response = (
            capo_opensearch._operations.amazon_open_search_service.associate_packages.associate_packages(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("AssociatePackages")
    )
    input_: capo_opensearch.types.associate_packages_request.AssociatePackagesRequest = {
        "package_list": package_list,
        "domain_name": domain_name,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output