Amazon AWS SDK Installationsanleitung Seite 86

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 151
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 85
'region' => '<region name>',
'version' => '2011-12-05'
));
You can provide your access keys like in the preceding example, or you can choose to omit them if you are using
AWS Identity and Access Management (IAM) roles for EC2 instances or credentials sourced from the
AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables.
Service builder
A more robust way to connect to Amazon DynamoDB is through the service builder. This allows you to specify
credentials and other configuration settings in a configuration file. These settings can then be shared across all
clients so that you only have to specify your settings once.
use Aws\Common\Aws;
// Create a service builder using a configuration file
$aws = Aws::factory('/path/to/my_config.json');
// Get the client from the builder by namespace
$client = $aws->get('DynamoDb');
Creating tables
You must first create a table that can be used to store items. Even though Amazon DynamoDB tables do not use a
fixed schema, you do need to create a schema for the table's keys. This is explained in greater detail in Amazon
DynamoDB's Data Model documentation. You will also need to specify the amount of provisioned throughput that
should be made available to the table.
// Create an "errors" table
$client->createTable(array(
'TableName' => 'errors',
'KeySchema' => array(
'HashKeyElement' => array(
'AttributeName' => 'id',
'AttributeType' => 'N'
),
'RangeKeyElement' => array(
'AttributeName' => 'time',
'AttributeType' => 'N'
)
),
'ProvisionedThroughput' => array(
'ReadCapacityUnits' => 10,
'WriteCapacityUnits' => 20
)
));
The table will now have a status of CREATING while the table is being provisioned. You can use a waiter to poll the
table until it becomes ACTIVE.
// Wait until the table is created and active
$client->waitUntilTableExists(array(
'TableName' => 'errors'
));
A full list of the parameters available to the createTable() operation can be found in the API documentation.
Updating a table
You can also update the table after it's been created using the updateTable() method. This allows you to do things
like increase or decrease your provisioned throughput capacity.
Amazon DynamoDB (2011-12-05)
74
Seitenansicht 85
1 2 ... 81 82 83 84 85 86 87 88 89 90 91 ... 150 151

Kommentare zu diesen Handbüchern

Keine Kommentare

Electrolux GK56P PL.3 CN manuals

Owner’s manuals and user’s guides for Unknown Electrolux GK56P PL.3 CN.
We providing 2 pdf manuals Electrolux GK56P PL.3 CN for download free by document types: User Manual






More products and manuals for Unknown Electrolux

Models Document Type
EBSL6GTC.4CN User Manual   Electrolux EBSL6TC.4SW Manuale utente, 40 pages
GK56PCN User Manual   Electrolux GK56PCN Manuel utilisateur [fr] , 16 pages
EVE677SA Recipe Book   Electrolux EVE676BA Recipe Book, 16 pages
FR63X User Manual   Electrolux FR63X User Manual [de] [en] [fr] [it] , 24 pages
GK78CRO User Manual Electrolux GK78CRO Brugermanual, 20 pages
EBL40SW User Manual   Electrolux EBL40WE Manuale utente [fr] , 36 pages
EOC6697X User Manual   Electrolux EOC6697X Ohjekirja, 60 pages
ZB 250 User Manual     Electrolux SPIRIT3000 Brugermanual [en] , 15 pages
ESF4510LOX User Manual Electrolux ESF4510LOX User Manual, 20 pages
EWF1297HDW User Manual    Electrolux EWF1297HDW Használati utasítás, 56 pages
EWF10679W User Manual     Electrolux EWF10679W Korisnički priručnik, 88 pages
EBGL7GSP User Manual   Electrolux EBGL7GWE Manuale utente, 32 pages
GK78TSIPCN User Manual   Electrolux GK78TSIPCN Manuale utente [fr] , 28 pages
EBGL70CN User Manual   Electrolux EBGL70WE Manuel utilisateur [da] [sv] , 32 pages
ESF4600ROX User Manual   Electrolux ESF4600ROX Manuali i perdoruesit [en] , 20 pages
EEC5750AOX User Manual   Electrolux EEC5750AOX Manuali i perdoruesit [de] [en] , 40 pages
EOB3637WELUXSPAIN User Manual    Electrolux EOB3637XELUXSPAIN Manual de usuario, 48 pages
EBSL7WE User Manual   Electrolux EBSL7WE Manuel utilisateur, 40 pages
GK80VarioPlusCN User Manual   Electrolux GK80VarioPlusCN Manuel utilisateur [it] , 19 pages
EFT604X User Manual   Electrolux EFT604X Benutzerhandbuch [de] , 11 pages