Change status of shield information barrier with the specified ID.
"1910967"
The ID of the shield information barrier.
"pending"
The desired status for the shield information barrier.
Value is one of pending
,disabled
Returns the updated shield information barrier object.
Returns a not_found
error if the
shield information barrier was not found.
Returns an error if there exists Conflicts with existing information barriers.
An unexpected client error.
await client.shieldInformationBarriers.updateShieldInformationBarrierStatus({
id: barrierId,
status:
'disabled' as UpdateShieldInformationBarrierStatusRequestBodyStatusField,
} satisfies UpdateShieldInformationBarrierStatusRequestBody);
client.shield_information_barriers.update_shield_information_barrier_status(
barrier_id, UpdateShieldInformationBarrierStatusStatus.DISABLED.value
)
await client.ShieldInformationBarriers.UpdateShieldInformationBarrierStatusAsync(requestBody: new UpdateShieldInformationBarrierStatusRequestBody(id: barrierId, status: UpdateShieldInformationBarrierStatusRequestBodyStatusField.Disabled));
try await client.shieldInformationBarriers.updateShieldInformationBarrierStatus(requestBody: UpdateShieldInformationBarrierStatusRequestBody(id: barrierId, status: UpdateShieldInformationBarrierStatusRequestBodyStatusField.disabled))
const barrier = await client.shieldInformationBarriers.changeStatusById({
id: 12345,
status: 'pending',
});
console.log(
`Shield information barrier id ${barrier.id} status is ${barrier.status}`
);
{
"id": "11446498",
"type": "shield_information_barrier",
"created_at": "2020-06-26T18:44:45.869Z",
"created_by": {
"id": "11446498",
"type": "user"
},
"enabled_at": "2020-07-26T18:44:45.869Z",
"enabled_by": {
"id": "11446498",
"type": "user"
},
"enterprise": {
"id": "1910967",
"type": "enterprise"
},
"status": "draft",
"updated_at": "2020-07-26T18:44:45.869Z",
"updated_by": {
"id": "11446498",
"type": "user"
}
}