create_pool
async
¶
create_pool(
origination_identity: PhoneOrSenderIdOrArn,
message_type: MessageType,
*,
config_overrides: Optional[AsyncPinpointSMSVoiceV2ClientConfig] = None,
iso_country_code: Optional[IsoCountryCode] = None,
deletion_protection_enabled: Optional[bool] = None,
tags: Optional[TagList] = None,
client_token: Optional[ClientToken] = None,
) -> CreatePoolResult
Creates a new pool and associates the specified origination identity to the pool. A pool can include one or more phone numbers and SenderIds that are associated with your Amazon Web Services account.
The new pool inherits its configuration from the specified origination identity. This includes keywords, message type, opt-out list, two-way configuration, and self-managed opt-out configuration. Deletion protection isn't inherited from the origination identity and defaults to false.
If the origination identity is a phone number and is already associated with another pool, an error is returned. A sender ID can be associated with multiple pools.
Parameters:
-
origination_identity(PhoneOrSenderIdOrArn) –The origination identity to use such as a PhoneNumberId, PhoneNumberArn, SenderId or SenderIdArn. You can use DescribePhoneNumbers to find the values for PhoneNumberId and PhoneNumberArn, and use DescribeSenderIds can be used to get the values for SenderId and SenderIdArn.
After the pool is created you can add more origination identities to the pool by using AssociateOriginationIdentity.
If you are using a shared End User Messaging SMS resource then you must use the full Amazon Resource Name(ARN).
-
iso_country_code(Optional[IsoCountryCode], default:None) –The new two-character code, in ISO 3166-1 alpha-2 format, for the country or region of the new pool. This field is optional and is not required for origination identity types that are not country-specific, such as RCS agents.
-
message_type(MessageType) –The type of message. Valid values are TRANSACTIONAL for messages that are critical or time-sensitive and PROMOTIONAL for messages that aren't critical or time-sensitive. After the pool is created the MessageType can't be changed.
-
deletion_protection_enabled(Optional[bool], default:None) –By default this is set to false. When set to true the pool can't be deleted. You can change this value using the UpdatePool action.
-
tags(Optional[TagList], default:None) –An array of tags (key and value pairs) associated with the pool.
-
client_token(Optional[ClientToken], default:None) –Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, a randomly generated token is used for the request to ensure idempotency.
Raises:
-
AccessDeniedException–The request was denied because you don't have sufficient permissions to access the resource.
-
ConflictException–Your request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time or it could be that the requested action isn't valid for the current state or configuration of the resource.
-
InternalServerException–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.
-
ResourceNotFoundException–A requested resource couldn't be found.
-
ServiceQuotaExceededException–The request would cause a service quota to be exceeded.
-
ThrottlingException–An error that occurred because too many requests were sent during a certain amount of time.
-
ValidationException–A validation exception for a field.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_pinpoint_sms_voice_v2/_services/async_pinpoint_sms_voice_v2.py
983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 | |