const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
managementAddress: '<string>',
model: '<string>',
portCount: 123
})
};
fetch('https://api.example.com/v1/regions/{region}/infrastructure/switches', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));