SimpleDB - Put Attribute(s)

Declaration

<AMAWSSIMPLEDB ACTIVITY="put_attributes" DOMAIN="text" ITEM="text" ATTRNAME="text" ATTRVALUE="text"><ATTRIBUTE NAME="text" VALUE="14520" REPLACE="yes/no" /><ATTRIBUTE NAME="text" VALUE="text" REPLACE="yes/no" /><ATTRIBUTE NAME="text" VALUE="text" REPLACE="yes/no" /></AMAWSSIMPLEDB>

See Also

SimpleDB - Main, SimpleDB - Create Domain, SimpleDB - Create Session, SimpleDB - Delete Attribute(s), SimpleDB - Delete Domain, SimpleDB - End Session, SimpleDB - Get Attribute(s), SimpleDB - Get Domain Metadata, SimpleDB - Query

Description

Creates or replaces attributes in an item. You specify new attributes using a combination of the Attribute Name and Attribute Value parameters. Optionally, you can enable the Replace parameter for each individual attribute which causes the new attribute value to replace the existing attribute value.

Attributes are uniquely identified in an item by their name/value combination. For example, a single item can have the attributes {"first_name", "first_value"} and {"first_name", second_value"}. However, it cannot have two attribute instances where both the Attribute Name and Attribute Value are the same.

IMPORTANT: The SimpleDB activities in AutoMate use Amazon's SimpleDB engine to perform their work. Therefore, yYou must have a valid Amazon SimpleDB service account to use these activities.

Practical Usage

Useful for conducting conditional updates to ensure multiple processes do not overwrite each other. To prevent this from occurring, you can specify the expected attribute name and value. If they match, SimpleDB performs the update. Otherwise, the update does not occur.

Parameters

Data Properties

Property

Type

Required

Default

Markup

Description

Domain Name

Text

Yes

(Empty)

DOMAIN="myDomain"

The name of the domain in which to perform the operation.

Item Name

Text

Yes

(Empty)

ITEM="myItemName"

The name of the item in which to perform the operation.

Name (Attributes)

Text

Yes

(Empty)

NAME="attributeName"

The name of the attribute. This can be any postive integer or 0. Multiple attribute name/value items can be entered.

To add a new attribute name/value, select Click here to add a new item. To delete an attribute name/value item, click "X".

Value (Attributes)

Text

Yes

(Empty)

VALUE="attribValue"

The value of the attribute. This can be any postive integer or 0. Multiple attribute name/value items can be entered.

To add a new attribute name/value, select Click here to add a new item. To delete an attribute name/value item, click "X".

Replace (Attributes)

Yes/No

No

No

REPLACE="YES"

If set to YES, specifies that the selected Attribute/Value will be replaced. If set to NO, a new Attribute/Value will be created. The default value is NO.

Update Condition

If enabled, allows conditional updates to take place depending on whether the specified attribute name (or attribute name/value combination) entered in the Attribute Name/Attribute Value fields currently exists/does not exist. Other parameters become available if this parameter is enabled. This is a design time parameter, therefore contains no markup.

Attribute Exist/Attribute Does Not Exist

Yes/No

No

Yes

ATTREXISTS="no"

If set to YES, the specified attribute name (or attribute name/value combination) entered in the Attribute Name/Attribute Value fields  must exist with the specified value in order for this update condition to be satisfied. If set to NO, the specified attribute name (or attribute name/value combination) should not exist in order for this update condition to be satisfied.

Attribute Name

Text

No

(Empty)

ATTRNAME="NametoCheck"

The name of the conditional attribute that should be checked.

Attribute Value

Text

No

(Empty)

ATTRVALUE="ValuetoCheck"

The value of the conditional attribute that should be checked.

 

 

Credentials Properties

The Credentials properties allows you to set or link specific parameters for this particular SimpleDB activity such as Access Key, Secret Access Key, Service URL, etc.

Property
Type
Required
Default
Markup
Description

Provide Credentials

 

 

 

 

Indicates where this activity's credentials should originate from. Different properties apply depending on the option selected.

The available options are:

  • Custom (Default) - Specifies that a custom set of credentials will be entered for this SimpleDB activity. Select this option if performing a single SimpleDB activity.

  • Session Based - Specifies that credentials should derive from a session created in a previous step with the use of the Create Session activity. This allows several SimpleDB activities to be linked to a specific session, eliminating redundancy.

Access Key

Text

Yes

(Empty)

ACCESSKEY="MyAccessKey"

A 20-character, alphanumeric string that uniquely identifies a user who owns a SimpleDB account (i.e. 022QF06E7MXBSH9DHM02). This along with a Secret Access Key forms a secure information set that SimpleDB uses to confirm a valid user's identity.

This property is active only if Custom is selected under the Provide Credentials property.

Secret Access Key

Text

Yes

(Empty)

SECRETKEY="SecretKey"

A 40-character string that serves the role as Password to access SimpleDB (i.e. kWcrlUX5JEDGM/LtmEENI/aVmYvHNif5zB+d9+ct). This along with an associated Access Key forms a secure information set that SimpleDB uses to confirm a valid user's identity.

This property is active only if Custom is selected under the Provide Credentials property.

User Agent

Text

No

AutoMate

USERAGENT="AutoMate"

The User-Agent header name. The User-Agent request-header field contains information about the user agent originating the request such as timeouts, proxies, name, etc. The default User Agent name is AutoMate.

This property is active only if Custom is selected under the Provide Credentials property.

Service URL

Text

No

(Empty)

SERVICEURL=

"https://eu-west-1.ec2.amazonaws.com"

The Service URL used to make requests to the SimpleDB service. The Service URL provides the service endpoint. For example, To make the service call to a different region, you can pass the region-specific endpoint, such as 'https://sdb.eu-west-1.amazonaws.com'.

This property is active only if Custom is selected under the Provide Credentials property.

Maximum retry on error

Number

No

(Empty)

MAXERRORRETRY="4"

Signifies how many times the Amazon SimpleDB engine should retry the request before returning an error.

This property is active only if Custom is selected under the Provide Credentials property.

Proxy Host

Text

No

(Empty)

PROXYHOST="proxy.host.com"

The host name (server.domain.com) or IP address (xxx.xxx.xxx.xxx) of the proxy server.

This property is active only if Custom is selected under the Provide Credentials property.

Proxy Port

Number

No

(Empty)

PROXYPORT="1028"

The port that should be used to connect to the proxy server.

This property is active only if Custom is selected under the Provide Credentials property.

Session Name

Text

Yes

Session name created in a previous step

SESSION="SessionName"

The session name that this activity should originate from. This allows several SimpleDB activities to be linked to a specific session. Numerous sessions can be used within a single task.

This property is active only if Session Based is selected under the Provide Credentials property.

NOTE: Use the Create Session activity to create and name a SimpleDB session.

Description Properties

The Description tab allows you to customize the text description of any step as it appears in the Task Builder's Steps Pane.

More on setting custom step description

Error Causes Properties

The Error Causes tab properties allows you to instruct a task step to react only to specific errors or ignore certain errors that should cause it to fail.

More on Error Causes properties

On Error Properties

The On Error tab properties lets you determine what the task should do if a particular step encounters an error as defined in the Error Causes properties.

More about On Error properties

Additional Notes

Expressions, Variables and Functions

All text fields allow the use of expressions such as variables, functions or AutoMate extended functions, which can be entered by surrounding the expression in percentage signs (example: %FileDateTime(myVar)% or %myVar%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by clicking the Insert Expression (%) button or by pressing F2.

More on expressions

More on variables

More on function

More on extended functions
More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

 

Description: Put attribute(s) in item "Records". Domain name is "theDomain". Execute this activity only when attribute "April" whose value is "14241" exist in current item. Use default SimpleDB session.

 

<AMAWSSIMPLEDB ACTIVITY="put_attributes" DOMAIN="theDomain" ITEM="Records" ATTRNAME="April" ATTRVALUE="14241"><ATTRIBUTE NAME="January" VALUE="14520" REPLACE="no" /><ATTRIBUTE NAME="February" VALUE="16522" REPLACE="no" /><ATTRIBUTE NAME="March" VALUE="14521" REPLACE="yes" /></AMAWSSIMPLEDB>

 

↑ Top