Skip to content

create_dedicated_ip_pool

create_dedicated_ip_pool(
    pool_name: PoolName,
    *,
    config_overrides: Optional[SESv2ClientConfig] = None,
    tags: Optional[TagList] = None,
    scaling_mode: Optional[ScalingMode] = None,
) -> CreateDedicatedIpPoolResponse

Create a new pool of dedicated IP addresses. A pool can include one or more dedicated IP addresses that are associated with your Amazon Web Services account. You can associate a pool with a configuration set. When you send an email that uses that configuration set, the message is sent from one of the 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.

  • scaling_mode (Optional[ScalingMode], default: None ) –

    The type of scaling mode.

Raises:

Source code in docs_src/capo_sesv2/_services/se_sv2.py
def create_dedicated_ip_pool(
    self,
    pool_name: "capo_sesv2.types.pool_name.PoolName",
    *,
    config_overrides: Optional[SESv2ClientConfig] = None,
    tags: Optional["capo_sesv2.types.tag_list.TagList"] = None,
    scaling_mode: Optional["capo_sesv2.types.scaling_mode.ScalingMode"] = None,
) -> "capo_sesv2.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 Web Services account. You can associate a pool with a configuration set. When you send an email that uses that configuration set, the message is sent from one of the 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>
        scaling_mode: <p>The type of scaling mode.</p>

    Raises:
        capo_sesv2.errors.already_exists_exception.AlreadyExistsException: <p>The resource specified in your request already exists.</p>
        capo_sesv2.errors.bad_request_exception.BadRequestException: <p>The input you provided is invalid.</p>
        capo_sesv2.errors.concurrent_modification_exception.ConcurrentModificationException: <p>The resource is being modified by another operation or thread.</p>
        capo_sesv2.errors.limit_exceeded_exception.LimitExceededException: <p>There are too many instances of the specified resource type.</p>
        capo_sesv2.errors.too_many_requests_exception.TooManyRequestsException: <p>Too many requests have been made to the operation.</p>
        capo_sesv2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sesv2.types.create_dedicated_ip_pool_request.CreateDedicatedIpPoolRequest]",
    ) -> OperationResponse[
        "capo_sesv2.types.create_dedicated_ip_pool_response.CreateDedicatedIpPoolResponse"
    ]:
        import capo_sesv2._operations.simple_email_service_v2.create_dedicated_ip_pool

        output, http_response = (
            capo_sesv2._operations.simple_email_service_v2.create_dedicated_ip_pool.create_dedicated_ip_pool(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateDedicatedIpPool")
    )
    input_: capo_sesv2.types.create_dedicated_ip_pool_request.CreateDedicatedIpPoolRequest = {
        "pool_name": pool_name
    }
    if tags is not None:
        input_["tags"] = tags
    if scaling_mode is not None:
        input_["scaling_mode"] = scaling_mode

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