const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
roleId: '<string>',
principalType: 'user',
principalId: '<string>',
scope: {type: 'organization', id: '<string>'}
})
};
fetch('https://api.example.com/v1/regions/global/iam/policies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));