Dissociates a package from the Amazon ES domain.
Parameters:
-
package_id
(PackageID)
–
Internal ID of the package that you want to associate with a domain. Use DescribePackages to find this value.
-
domain_name
(DomainName)
–
Name of the domain that you want to associate the package with.
Raises:
-
AccessDeniedException
–
An error occurred because user does not have permissions to access the resource. Returns HTTP status code 403.
-
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. Returns HTTP status code 409.
-
InternalException
–
The request processing has failed because of an unknown error, exception or failure (the failure is internal to the service) . Gives http status code of 500.
-
ResourceNotFoundException
–
An exception for accessing or deleting a resource that does not exist. Gives http status code of 400.
-
ValidationException
–
An exception for missing / invalid input fields. Gives http status code of 400.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_elasticsearch_service/_services/async_elasticsearch_service.py
| async def dissociate_package(
self,
package_id: "capo_elasticsearch_service.types.package_id.PackageID",
domain_name: "capo_elasticsearch_service.types.domain_name.DomainName",
*,
config_overrides: Optional[AsyncElasticsearchServiceClientConfig] = None,
) -> "capo_elasticsearch_service.types.dissociate_package_response.DissociatePackageResponse":
"""<p>Dissociates a package from the Amazon ES domain.</p>
Args:
package_id: <p>Internal ID of the package that you want to associate with a domain. Use <code>DescribePackages</code> to find this value.</p>
domain_name: <p>Name of the domain that you want to associate the package with.</p>
Raises:
capo_elasticsearch_service.errors.access_denied_exception.AccessDeniedException: <p>An error occurred because user does not have permissions to access the resource. Returns HTTP status code 403.</p>
capo_elasticsearch_service.errors.base_exception.BaseException: <p>An error occurred while processing the request.</p>
capo_elasticsearch_service.errors.conflict_exception.ConflictException: <p>An error occurred because the client attempts to remove a resource that is currently in use. Returns HTTP status code 409.</p>
capo_elasticsearch_service.errors.internal_exception.InternalException: <p>The request processing has failed because of an unknown error, exception or failure (the failure is internal to the service) . Gives http status code of 500.</p>
capo_elasticsearch_service.errors.resource_not_found_exception.ResourceNotFoundException: <p>An exception for accessing or deleting a resource that does not exist. Gives http status code of 400.</p>
capo_elasticsearch_service.errors.validation_exception.ValidationException: <p>An exception for missing / invalid input fields. Gives http status code of 400.</p>
capo_elasticsearch_service.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_elasticsearch_service.types.dissociate_package_request.DissociatePackageRequest]",
) -> AsyncOperationResponse[
"capo_elasticsearch_service.types.dissociate_package_response.DissociatePackageResponse"
]:
import capo_elasticsearch_service._operations.amazon_elasticsearch_service2015.dissociate_package
(
output,
http_response,
) = await capo_elasticsearch_service._operations.amazon_elasticsearch_service2015.dissociate_package.async_dissociate_package(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DissociatePackage")
)
input_: capo_elasticsearch_service.types.dissociate_package_request.DissociatePackageRequest = {
"package_id": package_id,
"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
|