PinpointSMSVoiceV2 / Client / create_registration_attachment
create_registration_attachment#
- PinpointSMSVoiceV2.Client.create_registration_attachment(**kwargs)#
Create a new registration attachment to use for uploading a file or a URL to a file. The maximum file size is 500KB and valid file extensions are PDF, JPEG and PNG. For example, many sender ID registrations require a signed “letter of authorization” (LOA) to be submitted.
Use either
AttachmentUrl
orAttachmentBody
to upload your attachment. If both are specified then an exception is returned.See also: AWS API Documentation
Request Syntax
response = client.create_registration_attachment( AttachmentBody=b'bytes', AttachmentUrl='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ], ClientToken='string' )
- Parameters:
AttachmentBody (bytes) – The registration file to upload. The maximum file size is 500KB and valid file extensions are PDF, JPEG and PNG.
AttachmentUrl (string) – Registration files have to be stored in an Amazon S3 bucket. The URI to use when sending is in the format
s3://BucketName/FileName
.Tags (list) –
An array of tags (key and value pairs) to associate with the registration attachment.
(dict) –
The list of tags to be added to the specified topic.
Key (string) – [REQUIRED]
The key identifier, or name, of the tag.
Value (string) – [REQUIRED]
The string value associated with the key of the tag.
ClientToken (string) –
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.
This field is autopopulated if not provided.
- Return type:
dict
- Returns:
Response Syntax
{ 'RegistrationAttachmentArn': 'string', 'RegistrationAttachmentId': 'string', 'AttachmentStatus': 'UPLOAD_IN_PROGRESS'|'UPLOAD_COMPLETE'|'UPLOAD_FAILED'|'DELETED', 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ], 'CreatedTimestamp': datetime(2015, 1, 1) }
Response Structure
(dict) –
RegistrationAttachmentArn (string) –
The Amazon Resource Name (ARN) for the registration attachment.
RegistrationAttachmentId (string) –
The unique identifier for the registration attachment.
AttachmentStatus (string) –
The status of the registration attachment.
UPLOAD_IN_PROGRESS
The attachment is being uploaded.UPLOAD_COMPLETE
The attachment has been uploaded.UPLOAD_FAILED
The attachment failed to uploaded.DELETED
The attachment has been deleted..
Tags (list) –
An array of tags (key and value pairs) to associate with the registration attachment.
(dict) –
The list of tags to be added to the specified topic.
Key (string) –
The key identifier, or name, of the tag.
Value (string) –
The string value associated with the key of the tag.
CreatedTimestamp (datetime) –
The time when the registration attachment was created, in UNIX epoch time format.
Exceptions