aws.simpledb
Module aws.simpledb

ballerinax/aws.simpledb
Overview
The Ballerina AWS SimpleDB provides the capability to manage domains in AWS SimpleDB.
This module supports Amazon SimpleDB REST API 2009-04-15
version.
Prerequisites
Before using this connector in your Ballerina application, complete the following:
- Create an AWS account
- Obtain tokens
Quickstart
To use the AWS SimpleDB connector in your Ballerina application, update the .bal file as follows:
Step 1: Import connector
Import the ballerinax/aws.simpledb
module into the Ballerina project.
Step 2: Create a new connector instance
You can now enter the credentials in the SimpleDB client configuration and create the SimpleDB client by passing the configuration as follows.
Step 3: Invoke connector operation
-
You can create a domain in Amazon SimpleDB as follows with
createDomain
method for a preferred domain name. -
Use
bal run
command to compile and run the Ballerina program.
Clients
aws.simpledb: Client
Ballerina Amazon SimpleDB API connector provides the capability to access Amazon SimpleDB Service. This connector lets you to create and manage the SimpleDB domains.
Constructor
Initializes the connector.
init (ConnectionConfig config)
- config ConnectionConfig - Configuration for the connector
createDomain
function createDomain(string domainName) returns CreateDomainResponse|xml|error
Create a domain.
Parameters
- domainName string - Name of domain
Return Type
- CreateDomainResponse|xml|error -
CreateDomainResponse
on success else anerror
getDomainMetaData
function getDomainMetaData(string domainName) returns DomainMetaDataResponse|xml|error
Get information about the domain, including when the domain was created, the number of items and attributes, and the size of attribute names and values.
Parameters
- domainName string - Name of domain
Return Type
- DomainMetaDataResponse|xml|error -
DomainMetaDataResponse
on success else anerror
'select
function 'select(string selectExpression, boolean consistentRead) returns SelectResponse|xml|error
Select set of attributes that match the select expression.
Parameters
- selectExpression string - Select expression to get attributes
- consistentRead boolean - True if consistent reads are to be accepted
Return Type
- SelectResponse|xml|error -
SelectResponse
on success else anerror
listDomains
function listDomains() returns ListDomainsResponse|xml|error
list available domains.
Return Type
- ListDomainsResponse|xml|error -
ListDomainsResponse
on success else anerror
deleteDomain
function deleteDomain(string domainName) returns DeleteDomainResponse|xml|error
Delete a domain.
Parameters
- domainName string - Name of domain
Return Type
- DeleteDomainResponse|xml|error -
DeleteDomainResponse
on success else anerror
getAttributes
function getAttributes(string domainName, string itemName, boolean consistentRead) returns GetAttributesResponse|xml|error
Get all of the attributes associated with the item.
Parameters
- domainName string - Name of domain
- itemName string - Name of item
- consistentRead boolean - True if consistent reads are to be accepted
Return Type
- GetAttributesResponse|xml|error -
GetAttributesResponse
on success else anerror
putAttributes
function putAttributes(string domainName, string itemName, Attribute attributes) returns PutAttributesResponse|xml|error
Creates or replaces attributes in an item.
Parameters
- domainName string - Name of domain
- itemName string - Name of item
- attributes Attribute - Attributes to create or replace values
Return Type
- PutAttributesResponse|xml|error -
PutAttributesResponse
on success else anerror
deleteAttributes
function deleteAttributes(string domainName, string itemName, Attribute attributes) returns DeleteAttributesResponse|xml|error
Delete attributes in an item.
Parameters
- domainName string - Name of domain
- itemName string - Name of item
- attributes Attribute - Attributes to create or replace values
Return Type
- DeleteAttributesResponse|xml|error -
DeleteAttributesResponse
on success else anerror
Records
aws.simpledb: Attribute
An attribute for the item
Fields
- name string - Name of the attribute
- value string - Value of the attribute
aws.simpledb: AwsCredentials
Represents AWS credentials.
Fields
- accessKeyId string - AWS access key
- secretAccessKey string - AWS secret key
aws.simpledb: AwsTemporaryCredentials
Represents AWS temporary credentials.
Fields
- accessKeyId string - AWS access key
- secretAccessKey string - AWS secret key
- securityToken string - AWS secret token
aws.simpledb: ConnectionConfig
Represents the AWS SimpleDB Connector configurations.
Fields
- Fields Included from * ConnectionConfig
- auth AuthConfig
- httpVersion HttpVersion
- http1Settings ClientHttp1Settings
- http2Settings ClientHttp2Settings
- timeout decimal
- forwarded string
- poolConfig PoolConfiguration
- cache CacheConfig
- compression Compression
- circuitBreaker CircuitBreakerConfig
- retryConfig RetryConfig
- responseLimits ResponseLimitConfigs
- secureSocket ClientSecureSocket
- proxy ProxyConfig
- validation boolean
- anydata...
- auth never? -
- awsCredentials AwsCredentials|AwsTemporaryCredentials - AWS credentials
- region string(default DEFAULT_REGION) - AWS Region
aws.simpledb: CreateDomainResponse
Create domain response
Fields
- responseMetadata ResponseMetadata - Response metadata
aws.simpledb: DeleteAttributesResponse
Delete attributes response
Fields
- responseMetadata ResponseMetadata - Response metadata
aws.simpledb: DeleteDomainResponse
Delete domain response
Fields
- responseMetadata ResponseMetadata - Response metadata
aws.simpledb: DomainMetaDataResponse
Domain metadata response
Fields
- domainMetadataResult DomainMetadataResult - Result of domain metadata
- responseMetadata ResponseMetadata - Response metadata
aws.simpledb: DomainMetadataResult
Domain metadata result
Fields
- itemCount string - Number of items available
- itemNamesSizeBytes string - Items names size in bytes
- attributeNameCount string - Number of attributes available
- attributeNamesSizeBytes string - Attributes names size in bytes
- attributeValueCount string - Value of attributes available
- attributeValuesSizeBytes string - Attributes values size in bytes
- timestamp string - Timestamp
aws.simpledb: GetAttributesResponse
Get attributes response
Fields
- getAttributesResult GetAttributesResult - Result of get attributes
- responseMetadata ResponseMetadata - Response metadata
aws.simpledb: GetAttributesResult
Result of get attributes
Fields
- attributes string - Attribute names
aws.simpledb: ListDomainsResponse
List domains response
Fields
- listDomainsResult ListDomainsResult - Result of domain list
- responseMetadata ResponseMetadata - Response metadata
aws.simpledb: ListDomainsResult
Result of domain list
Fields
- domainNames string - Domain names
- nextToken string - Next token of returned list items more than page size
aws.simpledb: PutAttributesResponse
Put attributes response
Fields
- responseMetadata ResponseMetadata - Response metadata
aws.simpledb: ResponseMetadata
Denote response metadata
Fields
- requestId string - A unique ID for tracking the request
- boxUsage string - The measure of machine utilization for this request
aws.simpledb: SelectResponse
Select response
Fields
- selectResult SelectResult - Result of selectn
- responseMetadata ResponseMetadata - Response metadata
aws.simpledb: SelectResult
Result of select
Fields
- items string - items available