public class ClaimPhoneNumberRequest
extends com.amazonaws.AmazonWebServiceRequest
implements java.io.Serializable
Claims an available phone number to your Amazon Connect instance or traffic distribution group. You can call this API only in the same Amazon Web Services Region where the Amazon Connect instance or traffic distribution group was created.
For more information about how to use this operation, see Claim a phone number in your country and Claim phone numbers to traffic distribution groups in the Amazon Connect Administrator Guide.
You can call the SearchAvailablePhoneNumbers API for available phone numbers that you can claim. Call the DescribePhoneNumber API to verify the status of a previous ClaimPhoneNumber operation.
If you plan to claim and release numbers frequently during a 30 day period, contact us for a service quota exception. Otherwise, it is possible you will be blocked from claiming and releasing any more numbers until 30 days past the oldest number released has expired.
By default you can claim and release up to 200% of your maximum number of active phone numbers during any 30 day period. If you claim and release phone numbers using the UI or API during a rolling 30 day cycle that exceeds 200% of your phone number service level quota, you will be blocked from claiming any more numbers until 30 days past the oldest number released has expired.
For example, if you already have 99 claimed numbers and a service level quota of 99 phone numbers, and in any 30 day period you release 99, claim 99, and then release 99, you will have exceeded the 200% limit. At that point you are blocked from claiming any more numbers until you open an Amazon Web Services support ticket.
| Constructor and Description |
|---|
ClaimPhoneNumberRequest() |
| Modifier and Type | Method and Description |
|---|---|
ClaimPhoneNumberRequest |
addTagsEntry(java.lang.String key,
java.lang.String value)
The tags used to organize, track, or control access for this resource.
|
ClaimPhoneNumberRequest |
clearTagsEntries()
Removes all the entries added into Tags.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getClientToken()
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request.
|
java.lang.String |
getPhoneNumber()
The phone number you want to claim.
|
java.lang.String |
getPhoneNumberDescription()
The description of the phone number.
|
java.util.Map<java.lang.String,java.lang.String> |
getTags()
The tags used to organize, track, or control access for this resource.
|
java.lang.String |
getTargetArn()
The Amazon Resource Name (ARN) for Amazon Connect instances or traffic
distribution groups that phone numbers are claimed to.
|
int |
hashCode() |
void |
setClientToken(java.lang.String clientToken)
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request.
|
void |
setPhoneNumber(java.lang.String phoneNumber)
The phone number you want to claim.
|
void |
setPhoneNumberDescription(java.lang.String phoneNumberDescription)
The description of the phone number.
|
void |
setTags(java.util.Map<java.lang.String,java.lang.String> tags)
The tags used to organize, track, or control access for this resource.
|
void |
setTargetArn(java.lang.String targetArn)
The Amazon Resource Name (ARN) for Amazon Connect instances or traffic
distribution groups that phone numbers are claimed to.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
ClaimPhoneNumberRequest |
withClientToken(java.lang.String clientToken)
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request.
|
ClaimPhoneNumberRequest |
withPhoneNumber(java.lang.String phoneNumber)
The phone number you want to claim.
|
ClaimPhoneNumberRequest |
withPhoneNumberDescription(java.lang.String phoneNumberDescription)
The description of the phone number.
|
ClaimPhoneNumberRequest |
withTags(java.util.Map<java.lang.String,java.lang.String> tags)
The tags used to organize, track, or control access for this resource.
|
ClaimPhoneNumberRequest |
withTargetArn(java.lang.String targetArn)
The Amazon Resource Name (ARN) for Amazon Connect instances or traffic
distribution groups that phone numbers are claimed to.
|
clone, copyBaseTo, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollectorpublic java.lang.String getTargetArn()
The Amazon Resource Name (ARN) for Amazon Connect instances or traffic distribution groups that phone numbers are claimed to.
The Amazon Resource Name (ARN) for Amazon Connect instances or traffic distribution groups that phone numbers are claimed to.
public void setTargetArn(java.lang.String targetArn)
The Amazon Resource Name (ARN) for Amazon Connect instances or traffic distribution groups that phone numbers are claimed to.
targetArn - The Amazon Resource Name (ARN) for Amazon Connect instances or traffic distribution groups that phone numbers are claimed to.
public ClaimPhoneNumberRequest withTargetArn(java.lang.String targetArn)
The Amazon Resource Name (ARN) for Amazon Connect instances or traffic distribution groups that phone numbers are claimed to.
Returns a reference to this object so that method calls can be chained together.
targetArn - The Amazon Resource Name (ARN) for Amazon Connect instances or traffic distribution groups that phone numbers are claimed to.
public java.lang.String getPhoneNumber()
The phone number you want to claim. Phone numbers are formatted
[+] [country code] [subscriber number including area code].
Constraints:
Pattern: \\+[1-9]\\d{1,14}$
The phone number you want to claim. Phone numbers are formatted
[+] [country code] [subscriber number including area code]
.
public void setPhoneNumber(java.lang.String phoneNumber)
The phone number you want to claim. Phone numbers are formatted
[+] [country code] [subscriber number including area code].
Constraints:
Pattern: \\+[1-9]\\d{1,14}$
phoneNumber -
The phone number you want to claim. Phone numbers are
formatted
[+] [country code] [subscriber number including area code]
.
public ClaimPhoneNumberRequest withPhoneNumber(java.lang.String phoneNumber)
The phone number you want to claim. Phone numbers are formatted
[+] [country code] [subscriber number including area code].
Returns a reference to this object so that method calls can be chained together.
Constraints:
Pattern: \\+[1-9]\\d{1,14}$
phoneNumber -
The phone number you want to claim. Phone numbers are
formatted
[+] [country code] [subscriber number including area code]
.
public java.lang.String getPhoneNumberDescription()
The description of the phone number.
Constraints:
Length: 0 - 500
Pattern: ^[\W\S_]*
The description of the phone number.
public void setPhoneNumberDescription(java.lang.String phoneNumberDescription)
The description of the phone number.
Constraints:
Length: 0 - 500
Pattern: ^[\W\S_]*
phoneNumberDescription - The description of the phone number.
public ClaimPhoneNumberRequest withPhoneNumberDescription(java.lang.String phoneNumberDescription)
The description of the phone number.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 500
Pattern: ^[\W\S_]*
phoneNumberDescription - The description of the phone number.
public java.util.Map<java.lang.String,java.lang.String> getTags()
The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
public void setTags(java.util.Map<java.lang.String,java.lang.String> tags)
The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
tags - The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
public ClaimPhoneNumberRequest withTags(java.util.Map<java.lang.String,java.lang.String> tags)
The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
Returns a reference to this object so that method calls can be chained together.
tags - The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
public ClaimPhoneNumberRequest addTagsEntry(java.lang.String key, java.lang.String value)
The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
The method adds a new key-value pair into Tags parameter, and returns a reference to this object so that method calls can be chained together.
key - The key of the entry to be added into Tags.value - The corresponding value of the entry to be added into Tags.public ClaimPhoneNumberRequest clearTagsEntries()
Returns a reference to this object so that method calls can be chained together.
public java.lang.String getClientToken()
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
Pattern:
^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$
Constraints:
Length: - 500
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
Pattern:
^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$
public void setClientToken(java.lang.String clientToken)
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
Pattern:
^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$
Constraints:
Length: - 500
clientToken - A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
Pattern:
^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$
public ClaimPhoneNumberRequest withClientToken(java.lang.String clientToken)
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
Pattern:
^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: - 500
clientToken - A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
Pattern:
^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object