endpointUsageRestrictionViolated constant
ErrorReason
const endpointUsageRestrictionViolated
The request is denied because the API endpoint is restricted by administrators according to the organization policy constraint. For more information see https://cloud.google.com/assured-workloads/docs/restrict-endpoint-usage.
Example of an ErrorInfo when access to Google Cloud Storage service is restricted by Restrict Endpoint Usage policy:
{
"reason": "ENDPOINT_USAGE_RESTRICTION_VIOLATED",
"domain": "googleapis.com/policies/endpointUsageRestriction",
"metadata": {
"policy_name": "constraints/gcp.restrictEndpointUsage",
"checked_value": "storage.googleapis.com"
"consumer": "organization/123"
"service": "storage.googleapis.com"
}
}
Implementation
static const endpointUsageRestrictionViolated = ErrorReason(
'ENDPOINT_USAGE_RESTRICTION_VIOLATED',
);