Skip to content

create_configuration_set async

create_configuration_set(
    configuration_set_name: ConfigurationSetName,
    *,
    config_overrides: Optional[AsyncSESv2ClientConfig] = 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,
    suppression_options: Optional[SuppressionOptions] = None,
    vdm_options: Optional[VdmOptions] = None,
    archiving_options: Optional[ArchivingOptions] = None,
    message_security_options: Optional[MessageSecurityOptions] = None,
) -> CreateConfigurationSetResponse

Create a configuration set. Configuration sets are groups of rules that you can apply to the emails that you send. You apply a configuration set to an email by specifying the name of the configuration set when you call the Amazon SES API v2. 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. The name can contain up to 64 alphanumeric characters, including letters, numbers, hyphens (-) and underscores (_) only.

  • 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 SES 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 SES 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) to associate with the configuration set.

  • suppression_options (Optional[SuppressionOptions], default: None ) –

    An object that contains information about the suppression list preferences for the configuration set. You can optionally include a SuppressionScope to override the tenant or account suppression scope for emails sent using this configuration set.

  • vdm_options (Optional[VdmOptions], default: None ) –

    An object that defines the VDM options for emails that you send using the configuration set.

  • archiving_options (Optional[ArchivingOptions], default: None ) –

    An object that defines the MailManager archiving options for emails that you send using the configuration set.

  • message_security_options (Optional[MessageSecurityOptions], default: None ) –

    The message security options to apply to the configuration set, such as the signing scheme used for messages that you send with the configuration set.

Raises:

Source code in docs_src/capo_sesv2/_services/async_se_sv2.py
async def create_configuration_set(
    self,
    configuration_set_name: "capo_sesv2.types.configuration_set_name.ConfigurationSetName",
    *,
    config_overrides: Optional[AsyncSESv2ClientConfig] = None,
    tracking_options: Optional[
        "capo_sesv2.types.tracking_options.TrackingOptions"
    ] = None,
    delivery_options: Optional[
        "capo_sesv2.types.delivery_options.DeliveryOptions"
    ] = None,
    reputation_options: Optional[
        "capo_sesv2.types.reputation_options.ReputationOptions"
    ] = None,
    sending_options: Optional[
        "capo_sesv2.types.sending_options.SendingOptions"
    ] = None,
    tags: Optional["capo_sesv2.types.tag_list.TagList"] = None,
    suppression_options: Optional[
        "capo_sesv2.types.suppression_options.SuppressionOptions"
    ] = None,
    vdm_options: Optional["capo_sesv2.types.vdm_options.VdmOptions"] = None,
    archiving_options: Optional[
        "capo_sesv2.types.archiving_options.ArchivingOptions"
    ] = None,
    message_security_options: Optional[
        "capo_sesv2.types.message_security_options.MessageSecurityOptions"
    ] = None,
) -> "capo_sesv2.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 that you send. You apply a configuration set to an email by specifying the name of the configuration set when you call the Amazon SES API v2. 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. The name can contain up to 64 alphanumeric characters, including letters, numbers, hyphens (-) and underscores (_) only.</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 SES 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 SES can send email that you send using the configuration set.</p>
        tags: <p>An array of objects that define the tags (keys and values) to associate with the configuration set.</p>
        suppression_options: <p>An object that contains information about the suppression list preferences for the configuration set. You can optionally include a <code>SuppressionScope</code> to override the tenant or account suppression scope for emails sent using this configuration set.</p>
        vdm_options: <p>An object that defines the VDM options for emails that you send using the configuration set.</p>
        archiving_options: <p>An object that defines the MailManager archiving options for emails that you send using the configuration set.</p>
        message_security_options: <p>The message security options to apply to the configuration set, such as the signing scheme used for messages that you send with the configuration set.</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.not_found_exception.NotFoundException: <p>The resource you attempted to access doesn't exist.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sesv2.types.create_configuration_set_request.CreateConfigurationSetRequest]",
    ) -> AsyncOperationResponse[
        "capo_sesv2.types.create_configuration_set_response.CreateConfigurationSetResponse"
    ]:
        import capo_sesv2._operations.simple_email_service_v2.create_configuration_set

        (
            output,
            http_response,
        ) = await capo_sesv2._operations.simple_email_service_v2.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_sesv2.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
    if suppression_options is not None:
        input_["suppression_options"] = suppression_options
    if vdm_options is not None:
        input_["vdm_options"] = vdm_options
    if archiving_options is not None:
        input_["archiving_options"] = archiving_options
    if message_security_options is not None:
        input_["message_security_options"] = message_security_options

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output