Advertisement
Guest User

Untitled

a guest
Jan 18th, 2018
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.54 KB | None | 0 0
  1. dynamo create-table --table-name CampaignType --attribute-definitions AttributeName=id,AttributeType=S --key-schema AttributeName=id,KeyType=HASH --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5
  2. dynamo create-table --table-name Campaign --attribute-definitions AttributeName=id,AttributeType=S --key-schema AttributeName=id,KeyType=HASH --provisioned-throughput ReadCapacityUnits=10,WriteCapacityUnits=10
  3. dynamo create-table --table-name Redirect --attribute-definitions AttributeName=token,AttributeType=S --key-schema AttributeName=token,KeyType=HASH --provisioned-throughput ReadCapacityUnits=20,WriteCapacityUnits=20
  4.  
  5. dynamo update-table --table-name Campaign --attribute-definitions AttributeName=ctid,AttributeType=S AttributeName=created,AttributeType=S --global-secondary-index-updates '[{"Create":{"IndexName":"CampaignTypeCreated","KeySchema":[{"AttributeName":"ctid","KeyType":"HASH"},{"AttributeName":"created","KeyType":"RANGE"}],"Projection":{"ProjectionType":"ALL"},"ProvisionedThroughput":{"ReadCapacityUnits":5,"WriteCapacityUnits":5}}}]'
  6. dynamo update-table --table-name Campaign --attribute-definitions AttributeName=uid,AttributeType=N AttributeName=created,AttributeType=S --global-secondary-index-updates '[{"Create":{"IndexName":"CampaignUser","KeySchema":[{"AttributeName":"uid","KeyType":"HASH"},{"AttributeName":"created","KeyType":"RANGE"}],"Projection":{"ProjectionType":"ALL"},"ProvisionedThroughput":{"ReadCapacityUnits":5,"WriteCapacityUnits":5}}}]'
  7. dynamo update-table --table-name Campaign --attribute-definitions AttributeName=ctid,AttributeType=S AttributeName=name,AttributeType=S --global-secondary-index-updates '[{"Create":{"IndexName":"CampaignName","KeySchema":[{"AttributeName":"ctid","KeyType":"HASH"},{"AttributeName":"name","KeyType":"RANGE"}],"Projection":{"ProjectionType":"ALL"},"ProvisionedThroughput":{"ReadCapacityUnits":5,"WriteCapacityUnits":5}}}]'
  8.  
  9. dynamoquery Campaign --index-name CampaignTypeCreated --key-condition-expression "#t = :t" --expression-attribute-names '{"#t":"type"}' --expression-attribute-values '{":t":{"S":"adj"}}'
  10.  
  11. dynamoscan Campaign
  12.  
  13. aws dynamodb put-item --table-name CampaignType --item '{"id": {"S":"adj"}, "name":{"S":"Adjust Campaigns"}}'
  14.  
  15. dynamo delete-table --table-name CampaignType
  16.  
  17. dynamo put-item --table-name Campaign --item '{"id": {"S":"7hVCs1"}, "ctid":{"S":"adj"}, "name":{"S":"Facebook_October_Campaign"}, "uid":{"N":"4"}, "created":{"S":"2017-09-11-13:51:01"}}'
  18.  
  19. dynamoquery Campaign --index-name CampaignTypeCreated --key-condition-expression "#t = :t" --expression-attribute-names '{"#t":"type"}' --expression-attribute-values '{":t":{"S":"adj"}}' --no-scan-index-forward
  20. dynamoquery Campaign --index-name CampaignUser --key-condition-expression "#u = :u" --expression-attribute-names '{"#u":"user"}' --expression-attribute-values '{":u":{"S":"igorv@viber.com"}}' --no-scan-index-forward
  21. dynamoquery Campaign --index-name CampaignTypeCreated --key-condition-expression "#t = :t and begins_with(#c,:s)" --expression-attribute-names '{"#t":"type","#c":"created"}' --expression-attribute-values '{":t":{"S":"adj"},":s":{"S":"2017"}}' --no-scan-index-forward
  22. dynamoquery Campaign --index-name CampaignTypeCreated --key-condition-expression "#t = :t and begins_with(#c,:s)" --expression-attribute-names '{"#t":"type","#c":"created"}' --expression-attribute-values '{":t":{"S":"adj"},":s":{"S":"2017"}}' --filter-expression "contains(user,vi)" --no-scan-index-forward
  23. dynamoquery Campaign --index-name CampaignName --key-condition-expression "#t = :t AND #n = :n" --expression-attribute-names '{"#t":"ctid","#n":"name"}' --expression-attribute-values '{":t":{"S":"def"},":n":{"S":"Default Campaign"}}'
  24. dynamoquery Campaign --index-name CampaignName --key-condition-expression "#t = :t" --expression-attribute-names '{"#t":"ctid"}' --expression-attribute-values '{":t":{"S":"def"}}'
  25.  
  26. dynamo create-table --table-name Link --attribute-definitions AttributeName=token,AttributeType=S --key-schema AttributeName=token,KeyType=HASH --provisioned-throughput ReadCapacityUnits=20,WriteCapacityUnits=20
  27.  
  28. dynamo put-item --table-name Link --item '{"token": {"S":"oBcxA14"}, "desti":{"S":"https://3p3x.adj.st/?adjust_t=3qxv7a_hdua2d&adjust_fallback=http%3A%2F%2Fchats.viber.com%2Ffcbarcelona%3Futm_source%3DWebsite%26utm_Medium%3DPartner%26utm_campaign%3DFCB&adjust_campaign=fcb&adjust_adgroup=website&adjust_creative=1adjust_deeplink=viber://public?id=fcbarcelona"}, "cid":{"S":"7hVCs1"}, "user":{"S":"tamarb@viber.com"}, "created":{"S":"2017-09-11-20:06:11"}, "status":{"N":"0"}}'
  29. dynamo put-item --table-name Link --item '{"token": {"S":"v99x32o"}, "desti":{"S":"https://zsaw.adj.st/?adjust_t=0999dd_dfjfu1&adjust_fallback=http%3A%2F%2Fchats.viber.com%2Ffcbarcelona%3Futm_source%3DWebsite%26utm_Medium%3DPartner%26utm_campaign%3DFCB&adjust_campaign=fcb&adjust_adgroup=website&adjust_creative=1adjust_deeplink=viber://public?id=fcbarcelona"}, "cid":{"S":"2fr4A"}, "user":{"S":"tamarb@viber.com"}, "created":{"S":"2017-09-22-09:55:41"}, "status":{"N":"1"}}'
  30. dynamo put-item --table-name Link --item '{"token": {"S":"erT18ml"}, "desti":{"S":"https://zsaw.adj.st/?adjust_t=0999dd_dfjfu1&adjust_fallback=http%3A%2F%2Fchats.viber.com%2Ffcbarcelona%3Futm_source%3DWebsite%26utm_Medium%3DPartner%26utm_campaign%3DFCB&adjust_campaign=fcb&adjust_adgroup=website&adjust_creative=1adjust_deeplink=viber://public?id=fcbarcelona"}, "cid":{"S":"2fr4A"}, "user":{"S":"tamarb@viber.com"}, "created":{"S":"2017-09-23-11:27:39"}, "status":{"N":"1"}}'
  31. dynamo put-item --table-name Link --item '{"token": {"S":"8vg1HPz"}, "desti":{"S":"http://www.sabi.com"}, "cid":{"S":"753bc976"}, "user":{"N":"22"}, "created":{"S":"2017-10-18 10:34:54"}}'
  32.  
  33. dynamo update-table --table-name Link --attribute-definitions AttributeName=cid,AttributeType=S AttributeName=created,AttributeType=S --global-secondary-index-updates '[{"Create":{"IndexName":"LinkCampaign","KeySchema":[{"AttributeName":"cid","KeyType":"HASH"},{"AttributeName":"created","KeyType":"RANGE"}],"Projection":{"ProjectionType":"ALL"},"ProvisionedThroughput":{"ReadCapacityUnits":5,"WriteCapacityUnits":5}}}]'
  34. dynamo update-table --table-name Link --attribute-definitions AttributeName=desti,AttributeType=S AttributeName=created,AttributeType=S --global-secondary-index-updates '[{"Create":{"IndexName":"LinkDestination","KeySchema":[{"AttributeName":"desti","KeyType":"HASH"},{"AttributeName":"created","KeyType":"RANGE"}],"Projection":{"ProjectionType":"ALL"},"ProvisionedThroughput":{"ReadCapacityUnits":5,"WriteCapacityUnits":5}}}]'
  35. dynamo update-table --table-name Link --attribute-definitions AttributeName=uid,AttributeType=N AttributeName=created,AttributeType=S --global-secondary-index-updates '[{"Create":{"IndexName":"LinkUser","KeySchema":[{"AttributeName":"uid","KeyType":"HASH"},{"AttributeName":"created","KeyType":"RANGE"}],"Projection":{"ProjectionType":"ALL"},"ProvisionedThroughput":{"ReadCapacityUnits":5,"WriteCapacityUnits":5}}}]'
  36. dynamo update-table --table-name Link --attribute-definitions AttributeName=ctid,AttributeType=S AttributeName=created,AttributeType=S --global-secondary-index-updates '[{"Create":{"IndexName":"LinkType","KeySchema":[{"AttributeName":"ctid","KeyType":"HASH"},{"AttributeName":"created","KeyType":"RANGE"}],"Projection":{"ProjectionType":"ALL"},"ProvisionedThroughput":{"ReadCapacityUnits":5,"WriteCapacityUnits":5}}}]'
  37.  
  38. dynamoquery Link --index-name LinkCampaign --key-condition-expression "#c = :c" --expression-attribute-names '{"#c":"cid"}' --expression-attribute-values '{":c":{"S":"2fr4A"}}' --no-scan-index-forward
  39. dynamoquery Link --index-name LinkDestination --key-condition-expression "#d = :d" --expression-attribute-names '{"#d":"desti"}' --expression-attribute-values '{":d":{"S":"http://www.sabi.com"}}' --no-scan-index-forward
  40.  
  41. dynamo create-table --table-name LatestFIFO --attribute-definitions AttributeName=year,AttributeType=S AttributeName=month,AttributeType=S --key-schema AttributeName=year,KeyType=HASH AttributeName=month,KeyType=RANGE --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5
  42. dynamo update-table --table-name LatestFIFO --attribute-definitions AttributeName=table,AttributeType=S AttributeName=created,AttributeType=S --global-secondary-index-updates '[{"Create":{"IndexName":"LatestFifoTable","KeySchema":[{"AttributeName":"table","KeyType":"HASH"},{"AttributeName":"created","KeyType":"RANGE"}],"Projection":{"ProjectionType":"ALL"},"ProvisionedThroughput":{"ReadCapacityUnits":5,"WriteCapacityUnits":5}}}]'
  43.  
  44. dynamo delete-item --table-name Redirect --key '{"token": {"S":"9vjf611"}}'
  45. dynamo delete-item --table-name Link --key '{"token": {"S":"bibi4"}}'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement