create_notify_code_configuration
async
¶
create_notify_code_configuration(
notify_code_configuration_name: NotifyCodeConfigurationName,
*,
config_overrides: Optional[AsyncEndUserMessagingClientConfig] = None,
code_configuration_parameters: Optional[CodeConfigurationParameters] = None,
channel_parameters: Optional[ChannelParameters] = None,
deletion_protection_enabled: Optional[bool] = None,
client_token: Optional[ClientToken] = None,
tags: Optional[TagList] = None,
) -> CreateNotifyCodeConfigurationOutput
Creates a notify code configuration. A notify code configuration is a reusable policy that defines how one-time passcodes are generated and rendered, including the code type, length, validity period, maximum number of attempts, and channel templates.
Parameters:
-
notify_code_configuration_name(NotifyCodeConfigurationName) –The name of the notify code configuration.
-
code_configuration_parameters(Optional[CodeConfigurationParameters], default:None) –The passcode policy parameters, including the code type, length, validity period, and maximum number of attempts. Each member is optional. When you omit a member, no value is applied at create time and the default is applied when a passcode is sent.
-
channel_parameters(Optional[ChannelParameters], default:None) –The channel-specific parameters used to render and deliver the one-time passcode. Provide parameters for any subset of channels. Each member configures one delivery route, and the route that is selected at send time uses the matching channel.
-
deletion_protection_enabled(Optional[bool], default:None) –Specifies whether deletion protection is enabled. When enabled, the resource cannot be deleted until deletion protection is turned off.
-
client_token(Optional[ClientToken], default:None) –A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you do not specify a client token, the AWS SDK automatically generates one.
-
tags(Optional[TagList], default:None) –An array of key and value pair tags that are associated with the resource.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
ConflictException–The request conflicts with the current state of the resource.
-
InternalServerException–An unexpected error occurred during the processing of the request.
-
ServiceQuotaExceededException–The request would exceed a service quota for your account.
-
ThrottlingException–The request was denied because it exceeded the allowed request rate.
-
ValidationException–A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Create a notify code configuration
>>> await client.create_notify_code_configuration(notify_code_configuration_name='SignupOtp', code_configuration_parameters={'codeType': 'NUMERIC', 'codeLength': 6, 'validityPeriodMinutes': 10, 'maxAttempts': 3}, channel_parameters={'text': {'inlineTemplateBody': 'Your verification code is {{code}}.'}})
Source code in docs_src/capo_endusermessaging/_services/async_end_user_messaging.py
491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 | |