Skip to content

create_configuration_set async

create_configuration_set(
    configuration_set_name: ConfigurationSetName,
    *,
    config_overrides: Optional[AsyncPinpointEmailClientConfig] = None,
    tracking_options: Optional[TrackingOptions] = None,
    delivery_options: Optional[DeliveryOptions] = None,
    reputation_options: Optional[ReputationOptions] = None,
    sending_options: Optional[SendingOptions] = None,
    tags: Optional[TagList] = None,
) -> CreateConfigurationSetResponse

Create a configuration set. Configuration sets are groups of rules that you can apply to the emails you send using Amazon Pinpoint. You apply a configuration set to an email by including a reference to the configuration set in the headers of the email. When you apply a configuration set to an email, all of the rules in that configuration set are applied to the email.

Parameters:

  • configuration_set_name (ConfigurationSetName) –

    The name of the configuration set.

  • tracking_options (Optional[TrackingOptions], default: None ) –

    An object that defines the open and click tracking options for emails that you send using the configuration set.

  • delivery_options (Optional[DeliveryOptions], default: None ) –

    An object that defines the dedicated IP pool that is used to send emails that you send using the configuration set.

  • reputation_options (Optional[ReputationOptions], default: None ) –

    An object that defines whether or not Amazon Pinpoint collects reputation metrics for the emails that you send that use the configuration set.

  • sending_options (Optional[SendingOptions], default: None ) –

    An object that defines whether or not Amazon Pinpoint can send email that you send using the configuration set.

  • tags (Optional[TagList], default: None ) –

    An array of objects that define the tags (keys and values) that you want to associate with the configuration set.

Raises:

Source code in docs_src/capo_pinpoint_email/_services/async_pinpoint_email.py
async def create_configuration_set(
    self,
    configuration_set_name: "capo_pinpoint_email.types.configuration_set_name.ConfigurationSetName",
    *,
    config_overrides: Optional[AsyncPinpointEmailClientConfig] = None,
    tracking_options: Optional[
        "capo_pinpoint_email.types.tracking_options.TrackingOptions"
    ] = None,
    delivery_options: Optional[
        "capo_pinpoint_email.types.delivery_options.DeliveryOptions"
    ] = None,
    reputation_options: Optional[
        "capo_pinpoint_email.types.reputation_options.ReputationOptions"
    ] = None,
    sending_options: Optional[
        "capo_pinpoint_email.types.sending_options.SendingOptions"
    ] = None,
    tags: Optional["capo_pinpoint_email.types.tag_list.TagList"] = None,
) -> "capo_pinpoint_email.types.create_configuration_set_response.CreateConfigurationSetResponse":
    """<p>Create a configuration set. <i>Configuration sets</i> are groups of rules that you can apply to the emails you send using Amazon Pinpoint. You apply a configuration set to an email by including a reference to the configuration set in the headers of the email. When you apply a configuration set to an email, all of the rules in that configuration set are applied to the email. </p>

    Args:
        configuration_set_name: <p>The name of the configuration set.</p>
        tracking_options: <p>An object that defines the open and click tracking options for emails that you send using the configuration set.</p>
        delivery_options: <p>An object that defines the dedicated IP pool that is used to send emails that you send using the configuration set.</p>
        reputation_options: <p>An object that defines whether or not Amazon Pinpoint collects reputation metrics for the emails that you send that use the configuration set.</p>
        sending_options: <p>An object that defines whether or not Amazon Pinpoint can send email that you send using the configuration set.</p>
        tags: <p>An array of objects that define the tags (keys and values) that you want to associate with the configuration set.</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.not_found_exception.NotFoundException: <p>The resource you attempted to access doesn't exist.</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_configuration_set_request.CreateConfigurationSetRequest]",
    ) -> AsyncOperationResponse[
        "capo_pinpoint_email.types.create_configuration_set_response.CreateConfigurationSetResponse"
    ]:
        import capo_pinpoint_email._operations.amazon_pinpoint_email_service.create_configuration_set

        (
            output,
            http_response,
        ) = await capo_pinpoint_email._operations.amazon_pinpoint_email_service.create_configuration_set.async_create_configuration_set(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateConfigurationSet")
    )
    input_: capo_pinpoint_email.types.create_configuration_set_request.CreateConfigurationSetRequest = {
        "configuration_set_name": configuration_set_name
    }
    if tracking_options is not None:
        input_["tracking_options"] = tracking_options
    if delivery_options is not None:
        input_["delivery_options"] = delivery_options
    if reputation_options is not None:
        input_["reputation_options"] = reputation_options
    if sending_options is not None:
        input_["sending_options"] = sending_options
    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