Guest User

Untitled

a guest
Mar 20th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. import boto3
  2. #
  3. client = boto3.client('clouddirectory')
  4. #
  5. AWS_CLOUD_DIR_ARN = 'arn:aws:clouddirectory:us-east-1:000000000000:directory/AUaGFp4A7Ea_lY5QwPxSQTw'
  6. AWS_CLOUD_DIR_SCHEMA_ARN = 'arn:aws:clouddirectory:us-east-1:000000000000:schema/published/customer-org.json/v0.0'
  7. #
  8. schemaFacets = [
  9. {
  10. "SchemaArn" : AWS_CLOUD_DIR_SCHEMA_ARN,
  11. "FacetName" : "Organization"
  12. },
  13. {
  14. "SchemaArn" : AWS_CLOUD_DIR_SCHEMA_ARN,
  15. "FacetName" : "Legal_Entity"
  16. }
  17. ]
  18. objectAttributeList = [
  19. {
  20. "Key" : {
  21. "SchemaArn" : AWS_CLOUD_DIR_SCHEMA_ARN,
  22. "FacetName" : "Organization",
  23. "Name" : "account_id"
  24. },
  25. "Value" : {
  26. "StringValue" : "W000"
  27. }
  28. },
  29.  
  30. response = client.create_object(
  31. DirectoryArn = AWS_CLOUD_DIR_ARN,
  32. SchemaFacets = schemaFacets,
  33. ObjectAttributeList = objectAttributeList
  34. )
  35. print response
  36.  
  37. botocore.errorfactory.InvalidArnException: An error occurred (InvalidArnException) when calling the CreateObject operation: Provided ARN is invalid arn:aws:clouddirectory:us-east-1:000000000000:schema/published/customer-org.json/v0.0
Add Comment
Please, Sign In to add comment