Skip to content

create_configuration_set async

create_configuration_set(
    *,
    config_overrides: Optional[AsyncPinpointSMSVoiceClientConfig] = None,
    configuration_set_name: Optional[WordCharactersWithDelimiters] = None,
) -> CreateConfigurationSetResponse

Create a new configuration set. After you create the configuration set, you can add one or more event destinations to it.

Parameters:

Raises:

Source code in docs_src/capo_pinpoint_sms_voice/_services/async_pinpoint_sms_voice.py
async def create_configuration_set(
    self,
    *,
    config_overrides: Optional[AsyncPinpointSMSVoiceClientConfig] = None,
    configuration_set_name: Optional[
        "capo_pinpoint_sms_voice.types.word_characters_with_delimiters.WordCharactersWithDelimiters"
    ] = None,
) -> "capo_pinpoint_sms_voice.types.create_configuration_set_response.CreateConfigurationSetResponse":
    """Create a new configuration set. After you create the configuration set, you can add one or more event destinations to it.

    Args:
        configuration_set_name: The name that you want to give the configuration set.

    Raises:
        capo_pinpoint_sms_voice.errors.already_exists_exception.AlreadyExistsException: The resource specified in your request already exists.
        capo_pinpoint_sms_voice.errors.bad_request_exception.BadRequestException: The input you provided is invalid.
        capo_pinpoint_sms_voice.errors.internal_service_error_exception.InternalServiceErrorException: The API encountered an unexpected error and couldn't complete the request. You might be able to successfully issue the request again in the future.
        capo_pinpoint_sms_voice.errors.limit_exceeded_exception.LimitExceededException: There are too many instances of the specified resource type.
        capo_pinpoint_sms_voice.errors.too_many_requests_exception.TooManyRequestsException: You've issued too many requests to the resource. Wait a few minutes, and then try again.
        capo_pinpoint_sms_voice.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        (
            output,
            http_response,
        ) = await capo_pinpoint_sms_voice._operations.pinpoint_sms_voice.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_sms_voice.types.create_configuration_set_request.CreateConfigurationSetRequest = {}
    if configuration_set_name is not None:
        input_["configuration_set_name"] = configuration_set_name

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