Create a new pool of dedicated IP addresses. A pool can include one or more dedicated IP addresses that are associated with your Amazon Pinpoint account. You can associate a pool with a configuration set. When you send an email that uses that configuration set, Amazon Pinpoint sends it using only the IP addresses in the associated pool.
Parameters:
-
pool_name
(PoolName)
–
The name of the dedicated IP pool.
-
tags
(Optional[TagList], default:
None
)
–
An object that defines the tags (keys and values) that you want to associate with the pool.
Raises:
Source code in docs_src/capo_pinpoint_email/_services/async_pinpoint_email.py
| async def create_dedicated_ip_pool(
self,
pool_name: "capo_pinpoint_email.types.pool_name.PoolName",
*,
config_overrides: Optional[AsyncPinpointEmailClientConfig] = None,
tags: Optional["capo_pinpoint_email.types.tag_list.TagList"] = None,
) -> "capo_pinpoint_email.types.create_dedicated_ip_pool_response.CreateDedicatedIpPoolResponse":
"""<p>Create a new pool of dedicated IP addresses. A pool can include one or more dedicated IP addresses that are associated with your Amazon Pinpoint account. You can associate a pool with a configuration set. When you send an email that uses that configuration set, Amazon Pinpoint sends it using only the IP addresses in the associated pool.</p>
Args:
pool_name: <p>The name of the dedicated IP pool.</p>
tags: <p>An object that defines the tags (keys and values) that you want to associate with the pool.</p>
Raises:
capo_pinpoint_email.errors.already_exists_exception.AlreadyExistsException: <p>The resource specified in your request already exists.</p>
capo_pinpoint_email.errors.bad_request_exception.BadRequestException: <p>The input you provided is invalid.</p>
capo_pinpoint_email.errors.concurrent_modification_exception.ConcurrentModificationException: <p>The resource is being modified by another operation or thread.</p>
capo_pinpoint_email.errors.limit_exceeded_exception.LimitExceededException: <p>There are too many instances of the specified resource type.</p>
capo_pinpoint_email.errors.too_many_requests_exception.TooManyRequestsException: <p>Too many requests have been made to the operation.</p>
capo_pinpoint_email.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_pinpoint_email.types.create_dedicated_ip_pool_request.CreateDedicatedIpPoolRequest]",
) -> AsyncOperationResponse[
"capo_pinpoint_email.types.create_dedicated_ip_pool_response.CreateDedicatedIpPoolResponse"
]:
import capo_pinpoint_email._operations.amazon_pinpoint_email_service.create_dedicated_ip_pool
(
output,
http_response,
) = await capo_pinpoint_email._operations.amazon_pinpoint_email_service.create_dedicated_ip_pool.async_create_dedicated_ip_pool(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateDedicatedIpPool")
)
input_: capo_pinpoint_email.types.create_dedicated_ip_pool_request.CreateDedicatedIpPoolRequest = {
"pool_name": pool_name
}
if tags is not None:
input_["tags"] = tags
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|