我正在尝试使用默认提供的组织架构在 AWS CloudDirectory 中输入一个新对象。
import boto3
#
client = boto3.client('clouddirectory')
#
AWS_CLOUD_DIR_ARN = 'arn:aws:clouddirectory:us-east-1:000000000000:directory/AUaGFp4A7Ea_lY5QwPxSQTw'
AWS_CLOUD_DIR_SCHEMA_ARN = 'arn:aws:clouddirectory:us-east-1:000000000000:schema/published/customer-org.json/v0.0'
#
schemaFacets = [
{
"SchemaArn" : AWS_CLOUD_DIR_SCHEMA_ARN,
"FacetName" : "Organization"
},
{
"SchemaArn" : AWS_CLOUD_DIR_SCHEMA_ARN,
"FacetName" : "Legal_Entity"
}
]
objectAttributeList = [
{
"Key" : {
"SchemaArn" : AWS_CLOUD_DIR_SCHEMA_ARN,
"FacetName" : "Organization",
"Name" : "account_id"
},
"Value" : {
"StringValue" : "W000"
}
},
该schemaFacets
列表具有构成架构的许多其他字段。最后,
response = client.create_object(
DirectoryArn = AWS_CLOUD_DIR_ARN,
SchemaFacets = schemaFacets,
ObjectAttributeList = objectAttributeList
)
print response
我得到的回应是:
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
然而,目录和架构 ARN 实际上都存在。我错过了什么?