in functions/source/c1cconnectorapi.py [0:0]
def add_account(self, role_arn):
body = {
"data": {
"type": "account",
"attributes": {
"name": role_arn.split(":")[4], # AWS account ID
"environment": "ControlTower",
"access": {
"keys": {"roleArn": role_arn, "externalId": self.external_id}
},
"costPackage": False,
"hasRealTimeMonitoring": True,
},
}
}
return self.request(POST, "/accounts", body)