|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.dynamodb.model.PutItemRequest
public class PutItemRequest
Container for the parameters to the PutItem operation
.
Creates a new item, or replaces an old item with a new item (including all the attributes).
If an item already exists in the specified table with the same primary key, the new item completely replaces the existing item. You can perform a conditional put (insert a new item if one with the specified primary key doesn't exist), or replace an existing item if it has certain attribute values.
AmazonDynamoDB.putItem(PutItemRequest)
Constructor Summary | |
---|---|
PutItemRequest()
Default constructor for a new PutItemRequest object. |
|
PutItemRequest(String tableName,
Map<String,AttributeValue> item)
Constructs a new PutItemRequest object. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
Map<String,ExpectedAttributeValue> |
getExpected()
Designates an attribute for a conditional modification. |
Map<String,AttributeValue> |
getItem()
A map of the attributes for the item, and must include the primary key values that define the item. |
String |
getReturnValues()
Use this parameter if you want to get the attribute name-value pairs before or after they are modified. |
String |
getTableName()
The name of the table in which you want to put an item. |
int |
hashCode()
|
void |
setExpected(Map<String,ExpectedAttributeValue> expected)
Designates an attribute for a conditional modification. |
void |
setItem(Map<String,AttributeValue> item)
A map of the attributes for the item, and must include the primary key values that define the item. |
void |
setReturnValues(ReturnValue returnValues)
Use this parameter if you want to get the attribute name-value pairs before or after they are modified. |
void |
setReturnValues(String returnValues)
Use this parameter if you want to get the attribute name-value pairs before or after they are modified. |
void |
setTableName(String tableName)
The name of the table in which you want to put an item. |
String |
toString()
Returns a string representation of this object; useful for testing and debugging. |
PutItemRequest |
withExpected(Map<String,ExpectedAttributeValue> expected)
Designates an attribute for a conditional modification. |
PutItemRequest |
withItem(Map<String,AttributeValue> item)
A map of the attributes for the item, and must include the primary key values that define the item. |
PutItemRequest |
withReturnValues(ReturnValue returnValues)
Use this parameter if you want to get the attribute name-value pairs before or after they are modified. |
PutItemRequest |
withReturnValues(String returnValues)
Use this parameter if you want to get the attribute name-value pairs before or after they are modified. |
PutItemRequest |
withTableName(String tableName)
The name of the table in which you want to put an item. |
Methods inherited from class com.amazonaws.AmazonWebServiceRequest |
---|
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, setDelegationToken, setRequestCredentials |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PutItemRequest()
public PutItemRequest(String tableName, Map<String,AttributeValue> item)
tableName
- The name of the table in which you want to put an
item. Allowed characters are a-z
, A-Z
,
0-9
, _
(underscore), -
(hyphen)
and .
(period).item
- A map of the attributes for the item, and must include the
primary key values that define the item. Other attribute name-value
pairs can be provided for the item.Method Detail |
---|
public String getTableName()
a-z
, A-Z
, 0-9
,
_
(underscore), -
(hyphen) and
.
(period).
Constraints:
Length: 3 - 255
Pattern: [a-zA-Z0-9_.-]+
a-z
, A-Z
, 0-9
,
_
(underscore), -
(hyphen) and
.
(period).public void setTableName(String tableName)
a-z
, A-Z
, 0-9
,
_
(underscore), -
(hyphen) and
.
(period).
Constraints:
Length: 3 - 255
Pattern: [a-zA-Z0-9_.-]+
tableName
- The name of the table in which you want to put an item. Allowed
characters are a-z
, A-Z
, 0-9
,
_
(underscore), -
(hyphen) and
.
(period).public PutItemRequest withTableName(String tableName)
a-z
, A-Z
, 0-9
,
_
(underscore), -
(hyphen) and
.
(period).
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 3 - 255
Pattern: [a-zA-Z0-9_.-]+
tableName
- The name of the table in which you want to put an item. Allowed
characters are a-z
, A-Z
, 0-9
,
_
(underscore), -
(hyphen) and
.
(period).
public Map<String,AttributeValue> getItem()
public void setItem(Map<String,AttributeValue> item)
item
- A map of the attributes for the item, and must include the primary key
values that define the item. Other attribute name-value pairs can be
provided for the item.public PutItemRequest withItem(Map<String,AttributeValue> item)
Returns a reference to this object so that method calls can be chained together.
item
- A map of the attributes for the item, and must include the primary key
values that define the item. Other attribute name-value pairs can be
provided for the item.
public Map<String,ExpectedAttributeValue> getExpected()
Expected
parameter allows you to provide an attribute
name, and whether or not Amazon DynamoDB should check to see if the
attribute has a particular value before modifying it.
Expected
parameter allows you to provide an attribute
name, and whether or not Amazon DynamoDB should check to see if the
attribute has a particular value before modifying it.public void setExpected(Map<String,ExpectedAttributeValue> expected)
Expected
parameter allows you to provide an attribute
name, and whether or not Amazon DynamoDB should check to see if the
attribute has a particular value before modifying it.
expected
- Designates an attribute for a conditional modification. The
Expected
parameter allows you to provide an attribute
name, and whether or not Amazon DynamoDB should check to see if the
attribute has a particular value before modifying it.public PutItemRequest withExpected(Map<String,ExpectedAttributeValue> expected)
Expected
parameter allows you to provide an attribute
name, and whether or not Amazon DynamoDB should check to see if the
attribute has a particular value before modifying it.
Returns a reference to this object so that method calls can be chained together.
expected
- Designates an attribute for a conditional modification. The
Expected
parameter allows you to provide an attribute
name, and whether or not Amazon DynamoDB should check to see if the
attribute has a particular value before modifying it.
public String getReturnValues()
PUT
operations,
the possible parameter values are NONE
(default) or
ALL_OLD
. For update operations, the possible parameter
values are NONE
(default) or ALL_OLD
,
UPDATED_OLD
, ALL_NEW
or
UPDATED_NEW
. NONE
: Nothing is
returned.ALL_OLD
: Returns the attributes of the
item as they were before the operation.UPDATED_OLD
: Returns the values of the updated
attributes, only, as they were before the operation.ALL_NEW
: Returns all the attributes and their new
values after the operation.UPDATED_NEW
: Returns
the values of the updated attributes, only, as they are after the
operation.
Constraints:
Allowed Values: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW
PUT
operations,
the possible parameter values are NONE
(default) or
ALL_OLD
. For update operations, the possible parameter
values are NONE
(default) or ALL_OLD
,
UPDATED_OLD
, ALL_NEW
or
UPDATED_NEW
. NONE
: Nothing is
returned.ALL_OLD
: Returns the attributes of the
item as they were before the operation.UPDATED_OLD
: Returns the values of the updated
attributes, only, as they were before the operation.ALL_NEW
: Returns all the attributes and their new
values after the operation.UPDATED_NEW
: Returns
the values of the updated attributes, only, as they are after the
operation.ReturnValue
public void setReturnValues(String returnValues)
PUT
operations,
the possible parameter values are NONE
(default) or
ALL_OLD
. For update operations, the possible parameter
values are NONE
(default) or ALL_OLD
,
UPDATED_OLD
, ALL_NEW
or
UPDATED_NEW
. NONE
: Nothing is
returned.ALL_OLD
: Returns the attributes of the
item as they were before the operation.UPDATED_OLD
: Returns the values of the updated
attributes, only, as they were before the operation.ALL_NEW
: Returns all the attributes and their new
values after the operation.UPDATED_NEW
: Returns
the values of the updated attributes, only, as they are after the
operation.
Constraints:
Allowed Values: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW
returnValues
- Use this parameter if you want to get the attribute name-value pairs
before or after they are modified. For PUT
operations,
the possible parameter values are NONE
(default) or
ALL_OLD
. For update operations, the possible parameter
values are NONE
(default) or ALL_OLD
,
UPDATED_OLD
, ALL_NEW
or
UPDATED_NEW
. NONE
: Nothing is
returned.ALL_OLD
: Returns the attributes of the
item as they were before the operation.UPDATED_OLD
: Returns the values of the updated
attributes, only, as they were before the operation.ALL_NEW
: Returns all the attributes and their new
values after the operation.UPDATED_NEW
: Returns
the values of the updated attributes, only, as they are after the
operation.ReturnValue
public PutItemRequest withReturnValues(String returnValues)
PUT
operations,
the possible parameter values are NONE
(default) or
ALL_OLD
. For update operations, the possible parameter
values are NONE
(default) or ALL_OLD
,
UPDATED_OLD
, ALL_NEW
or
UPDATED_NEW
. NONE
: Nothing is
returned.ALL_OLD
: Returns the attributes of the
item as they were before the operation.UPDATED_OLD
: Returns the values of the updated
attributes, only, as they were before the operation.ALL_NEW
: Returns all the attributes and their new
values after the operation.UPDATED_NEW
: Returns
the values of the updated attributes, only, as they are after the
operation.Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW
returnValues
- Use this parameter if you want to get the attribute name-value pairs
before or after they are modified. For PUT
operations,
the possible parameter values are NONE
(default) or
ALL_OLD
. For update operations, the possible parameter
values are NONE
(default) or ALL_OLD
,
UPDATED_OLD
, ALL_NEW
or
UPDATED_NEW
. NONE
: Nothing is
returned.ALL_OLD
: Returns the attributes of the
item as they were before the operation.UPDATED_OLD
: Returns the values of the updated
attributes, only, as they were before the operation.ALL_NEW
: Returns all the attributes and their new
values after the operation.UPDATED_NEW
: Returns
the values of the updated attributes, only, as they are after the
operation.ReturnValue
public void setReturnValues(ReturnValue returnValues)
PUT
operations,
the possible parameter values are NONE
(default) or
ALL_OLD
. For update operations, the possible parameter
values are NONE
(default) or ALL_OLD
,
UPDATED_OLD
, ALL_NEW
or
UPDATED_NEW
. NONE
: Nothing is
returned.ALL_OLD
: Returns the attributes of the
item as they were before the operation.UPDATED_OLD
: Returns the values of the updated
attributes, only, as they were before the operation.ALL_NEW
: Returns all the attributes and their new
values after the operation.UPDATED_NEW
: Returns
the values of the updated attributes, only, as they are after the
operation.
Constraints:
Allowed Values: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW
returnValues
- Use this parameter if you want to get the attribute name-value pairs
before or after they are modified. For PUT
operations,
the possible parameter values are NONE
(default) or
ALL_OLD
. For update operations, the possible parameter
values are NONE
(default) or ALL_OLD
,
UPDATED_OLD
, ALL_NEW
or
UPDATED_NEW
. NONE
: Nothing is
returned.ALL_OLD
: Returns the attributes of the
item as they were before the operation.UPDATED_OLD
: Returns the values of the updated
attributes, only, as they were before the operation.ALL_NEW
: Returns all the attributes and their new
values after the operation.UPDATED_NEW
: Returns
the values of the updated attributes, only, as they are after the
operation.ReturnValue
public PutItemRequest withReturnValues(ReturnValue returnValues)
PUT
operations,
the possible parameter values are NONE
(default) or
ALL_OLD
. For update operations, the possible parameter
values are NONE
(default) or ALL_OLD
,
UPDATED_OLD
, ALL_NEW
or
UPDATED_NEW
. NONE
: Nothing is
returned.ALL_OLD
: Returns the attributes of the
item as they were before the operation.UPDATED_OLD
: Returns the values of the updated
attributes, only, as they were before the operation.ALL_NEW
: Returns all the attributes and their new
values after the operation.UPDATED_NEW
: Returns
the values of the updated attributes, only, as they are after the
operation.Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW
returnValues
- Use this parameter if you want to get the attribute name-value pairs
before or after they are modified. For PUT
operations,
the possible parameter values are NONE
(default) or
ALL_OLD
. For update operations, the possible parameter
values are NONE
(default) or ALL_OLD
,
UPDATED_OLD
, ALL_NEW
or
UPDATED_NEW
. NONE
: Nothing is
returned.ALL_OLD
: Returns the attributes of the
item as they were before the operation.UPDATED_OLD
: Returns the values of the updated
attributes, only, as they were before the operation.ALL_NEW
: Returns all the attributes and their new
values after the operation.UPDATED_NEW
: Returns
the values of the updated attributes, only, as they are after the
operation.ReturnValue
public String toString()
toString
in class Object
Object.toString()
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |