Skip to content

create_addon_subscription

create_addon_subscription(
    addon_name: AddonName,
    *,
    config_overrides: Optional[MailManagerClientConfig] = None,
    client_token: Optional[IdempotencyToken] = None,
    tags: Optional[TagList] = None,
) -> CreateAddonSubscriptionResponse

Creates a subscription for an Add On representing the acceptance of its terms of use and additional pricing. The subscription can then be used to create an instance for use in rule sets or traffic policies.

Parameters:

  • client_token (Optional[IdempotencyToken], default: None ) –

    A unique token that Amazon SES uses to recognize subsequent retries of the same request.

  • addon_name (AddonName) –

    The name of the Add On to subscribe to. You can only have one subscription for each Add On name.

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

    The tags used to organize, track, or control access for the resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.

Raises:

  • ConflictException –

    The request configuration has conflicts. For details, see the accompanying error message.

  • ServiceQuotaExceededException –

    Occurs when an operation exceeds a predefined service quota or limit.

  • ThrottlingException –

    Occurs when a service's request rate limit is exceeded, resulting in throttling of further requests.

  • ValidationException –

    The request validation has failed. For details, see the accompanying error message.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_mailmanager/_services/mail_manager.py
def create_addon_subscription(
    self,
    addon_name: "capo_mailmanager.types.addon_name.AddonName",
    *,
    config_overrides: Optional[MailManagerClientConfig] = None,
    client_token: Optional[
        "capo_mailmanager.types.idempotency_token.IdempotencyToken"
    ] = None,
    tags: Optional["capo_mailmanager.types.tag_list.TagList"] = None,
) -> "capo_mailmanager.types.create_addon_subscription_response.CreateAddonSubscriptionResponse":
    """<p>Creates a subscription for an Add On representing the acceptance of its terms of use and additional pricing. The subscription can then be used to create an instance for use in rule sets or traffic policies.</p>

    Args:
        client_token: <p>A unique token that Amazon SES uses to recognize subsequent retries of the same request.</p>
        addon_name: <p>The name of the Add On to subscribe to. You can only have one subscription for each Add On name.</p>
        tags: <p>The tags used to organize, track, or control access for the resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.</p>

    Raises:
        capo_mailmanager.errors.conflict_exception.ConflictException: <p>The request configuration has conflicts. For details, see the accompanying error message.</p>
        capo_mailmanager.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>Occurs when an operation exceeds a predefined service quota or limit.</p>
        capo_mailmanager.errors.throttling_exception.ThrottlingException: <p>Occurs when a service's request rate limit is exceeded, resulting in throttling of further requests.</p>
        capo_mailmanager.errors.validation_exception.ValidationException: <p>The request validation has failed. For details, see the accompanying error message.</p>
        capo_mailmanager.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_mailmanager.types.create_addon_subscription_request.CreateAddonSubscriptionRequest]",
    ) -> OperationResponse[
        "capo_mailmanager.types.create_addon_subscription_response.CreateAddonSubscriptionResponse"
    ]:
        import capo_mailmanager._operations.mail_manager_svc.create_addon_subscription

        output, http_response = (
            capo_mailmanager._operations.mail_manager_svc.create_addon_subscription.create_addon_subscription(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateAddonSubscription")
    )
    input_: capo_mailmanager.types.create_addon_subscription_request.CreateAddonSubscriptionRequest = {
        "addon_name": addon_name
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if tags is not None:
        input_["tags"] = tags

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