Enum gapi_grpc::google::api::ErrorReason [−][src]
Defines the supported values for google.rpc.ErrorInfo.reason
for the
googleapis.com
error domain. This error domain is reserved for Service
Infrastructure.
For each error info of this domain, the metadata key “service” refers to the
logical identifier of an API service, such as “pubsub.googleapis.com”. The
“consumer” refers to the entity that consumes an API Service. It typically is
a Google project that owns the client application or the server resource,
such as “projects/123”. Other metadata keys are specific to each error
reason. For more information, see the definition of the specific error
reason.
Variants
Do not use this default value.
The request is calling a disabled service for a consumer.
Example of an ErrorInfo when the consumer “projects/123” contacting “pubsub.googleapis.com” service which is disabled:
{ "reason": "SERVICE_DISABLED", "domain": "googleapis.com", "metadata": { "consumer": "projects/123", "service": "pubsub.googleapis.com" } }
This response indicates the “pubsub.googleapis.com” has been disabled in “projects/123”.
The request whose associated billing account is disabled.
Example of an ErrorInfo when the consumer “projects/123” fails to contact “pubsub.googleapis.com” service because the associated billing account is disabled:
{ "reason": "BILLING_DISABLED", "domain": "googleapis.com", "metadata": { "consumer": "projects/123", "service": "pubsub.googleapis.com" } }
This response indicates the billing account associated has been disabled.
The request is denied because the provided API key is invalid. It may be in a bad format, cannot be found, or has been expired).
Example of an ErrorInfo when the request is contacting “storage.googleapis.com” service with an invalid API key:
{ "reason": "API_KEY_INVALID", "domain": "googleapis.com", "metadata": { "service": "storage.googleapis.com", } }
The request is denied because it violates API key API restrictions.
Example of an ErrorInfo when the consumer “projects/123” fails to call the “storage.googleapis.com” service because this service is restricted in the API key:
{ "reason": "API_KEY_SERVICE_BLOCKED", "domain": "googleapis.com", "metadata": { "consumer": "projects/123", "service": "storage.googleapis.com" } }
The request is denied because it violates API key HTTP restrictions.
Example of an ErrorInfo when the consumer “projects/123” fails to call “storage.googleapis.com” service because the http referrer of the request violates API key HTTP restrictions:
{ "reason": "API_KEY_HTTP_REFERRER_BLOCKED", "domain": "googleapis.com", "metadata": { "consumer": "projects/123", "service": "storage.googleapis.com", } }
The request is denied because it violates API key IP address restrictions.
Example of an ErrorInfo when the consumer “projects/123” fails to call “storage.googleapis.com” service because the caller IP of the request violates API key IP address restrictions:
{ "reason": "API_KEY_IP_ADDRESS_BLOCKED", "domain": "googleapis.com", "metadata": { "consumer": "projects/123", "service": "storage.googleapis.com", } }
The request is denied because it violates API key Android application restrictions.
Example of an ErrorInfo when the consumer “projects/123” fails to call “storage.googleapis.com” service because the request from the Android apps violates the API key Android application restrictions:
{ "reason": "API_KEY_ANDROID_APP_BLOCKED", "domain": "googleapis.com", "metadata": { "consumer": "projects/123", "service": "storage.googleapis.com" } }
The request is denied because it violates API key iOS application restrictions.
Example of an ErrorInfo when the consumer “projects/123” fails to call “storage.googleapis.com” service because the request from the iOS apps violates the API key iOS application restrictions:
{ "reason": "API_KEY_IOS_APP_BLOCKED", "domain": "googleapis.com", "metadata": { "consumer": "projects/123", "service": "storage.googleapis.com" } }
The request is denied because there is not enough rate quota for the consumer.
Example of an ErrorInfo when the consumer “projects/123” fails to contact “pubsub.googleapis.com” service because consumer’s rate quota usage has reached the maximum value set for the quota limit “ReadsPerMinutePerProject” on the quota metric “pubsub.googleapis.com/read_requests”:
{ "reason": "RATE_LIMIT_EXCEEDED", "domain": "googleapis.com", "metadata": { "consumer": "projects/123", "service": "pubsub.googleapis.com", "quota_metric": "pubsub.googleapis.com/read_requests", "quota_limit": "ReadsPerMinutePerProject" } }
Example of an ErrorInfo when the consumer “projects/123” checks quota on the service “dataflow.googleapis.com” and hits the organization quota limit “DefaultRequestsPerMinutePerOrganization” on the metric “dataflow.googleapis.com/default_requests”.
{ "reason": "RATE_LIMIT_EXCEEDED", "domain": "googleapis.com", "metadata": { "consumer": "projects/123", "service": "dataflow.googleapis.com", "quota_metric": "dataflow.googleapis.com/default_requests", "quota_limit": "DefaultRequestsPerMinutePerOrganization" } }
The request is denied because there is not enough resource quota for the consumer.
Example of an ErrorInfo when the consumer “projects/123” fails to contact “compute.googleapis.com” service because consumer’s resource quota usage has reached the maximum value set for the quota limit “VMsPerProject” on the quota metric “compute.googleapis.com/vms”:
{ "reason": "RESOURCE_QUOTA_EXCEEDED", "domain": "googleapis.com", "metadata": { "consumer": "projects/123", "service": "compute.googleapis.com", "quota_metric": "compute.googleapis.com/vms", "quota_limit": "VMsPerProject" } }
Example of an ErrorInfo when the consumer “projects/123” checks resource quota on the service “dataflow.googleapis.com” and hits the organization quota limit “jobs-per-organization” on the metric “dataflow.googleapis.com/job_count”.
{ "reason": "RESOURCE_QUOTA_EXCEEDED", "domain": "googleapis.com", "metadata": { "consumer": "projects/123", "service": "dataflow.googleapis.com", "quota_metric": "dataflow.googleapis.com/job_count", "quota_limit": "jobs-per-organization" } }
The request whose associated billing account address is in a tax restricted location, violates the local tax restrictions when creating resources in the restricted region.
Example of an ErrorInfo when creating the Cloud Storage Bucket in the container “projects/123” under a tax restricted region “locations/asia-northeast3”:
{ "reason": "LOCATION_TAX_POLICY_VIOLATED", "domain": "googleapis.com", "metadata": { "consumer": "projects/123", "service": "storage.googleapis.com", "location": "locations/asia-northeast3" } }
This response indicates creating the Cloud Storage Bucket in “locations/asia-northeast3” violates the location tax restriction.
The request is denied because the caller does not have required permission on the user project “projects/123” or the user project is invalid. For more information, check the userProject System Parameters.
Example of an ErrorInfo when the caller is calling Cloud Storage service with insufficient permissions on the user project:
{ "reason": "USER_PROJECT_DENIED", "domain": "googleapis.com", "metadata": { "consumer": "projects/123", "service": "storage.googleapis.com" } }
The request is denied because the consumer “projects/123” is suspended due to Terms of Service(Tos) violations. Check Project suspension guidelines for more information.
Example of an ErrorInfo when calling Cloud Storage service with the suspended consumer “projects/123”:
{ "reason": "CONSUMER_SUSPENDED", "domain": "googleapis.com", "metadata": { "consumer": "projects/123", "service": "storage.googleapis.com" } }
The request is denied because the associated consumer is invalid. It may be in a bad format, cannot be found, or have been deleted.
Example of an ErrorInfo when calling Cloud Storage service with the invalid consumer “projects/123”:
{ "reason": "CONSUMER_INVALID", "domain": "googleapis.com", "metadata": { "consumer": "projects/123", "service": "storage.googleapis.com" } }
The request is denied because it violates VPC Service Controls. The ‘uid’ field is a random generated identifier that customer can use it to search the audit log for a request rejected by VPC Service Controls. For more information, please refer VPC Service Controls Troubleshooting
Example of an ErrorInfo when the consumer “projects/123” fails to call Cloud Storage service because the request is prohibited by the VPC Service Controls.
{ "reason": "SECURITY_POLICY_VIOLATED", "domain": "googleapis.com", "metadata": { "uid": "123456789abcde", "consumer": "projects/123", "service": "storage.googleapis.com" } }
The request is denied because the provided access token has expired.
Example of an ErrorInfo when the request is calling Cloud Storage service with an expired access token:
{ "reason": "ACCESS_TOKEN_EXPIRED", "domain": "googleapis.com", "metadata": { "service": "storage.googleapis.com", "method": "google.storage.v1.Storage.GetObject" } }
The request is denied because the provided access token doesn’t have at least one of the acceptable scopes required for the API. Please check OAuth 2.0 Scopes for Google APIs for the list of the OAuth 2.0 scopes that you might need to request to access the API.
Example of an ErrorInfo when the request is calling Cloud Storage service with an access token that is missing required scopes:
{ "reason": "ACCESS_TOKEN_SCOPE_INSUFFICIENT", "domain": "googleapis.com", "metadata": { "service": "storage.googleapis.com", "method": "google.storage.v1.Storage.GetObject" } }
The request is denied because the account associated with the provided access token is in an invalid state, such as disabled or deleted. For more information, see https://cloud.google.com/docs/authentication.
Warning: For privacy reasons, the server may not be able to disclose the
email address for some accounts. The client MUST NOT depend on the
availability of the email
attribute.
Example of an ErrorInfo when the request is to the Cloud Storage API with an access token that is associated with a disabled or deleted service account:
{ "reason": "ACCOUNT_STATE_INVALID", "domain": "googleapis.com", "metadata": { "service": "storage.googleapis.com", "method": "google.storage.v1.Storage.GetObject", "email": "user@123.iam.gserviceaccount.com" } }
The request is denied because the type of the provided access token is not supported by the API being called.
Example of an ErrorInfo when the request is to the Cloud Storage API with an unsupported token type.
{ "reason": "ACCESS_TOKEN_TYPE_UNSUPPORTED", "domain": "googleapis.com", "metadata": { "service": "storage.googleapis.com", "method": "google.storage.v1.Storage.GetObject" } }
Implementations
impl ErrorReason
[src]
pub fn is_valid(value: i32) -> bool
[src]
Returns true
if value
is a variant of ErrorReason
.
pub fn from_i32(value: i32) -> Option<ErrorReason>
[src]
Converts an i32
to a ErrorReason
, or None
if value
is not a valid variant.
Trait Implementations
impl Clone for ErrorReason
[src]
fn clone(&self) -> ErrorReason
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for ErrorReason
[src]
impl Debug for ErrorReason
[src]
impl Default for ErrorReason
[src]
fn default() -> ErrorReason
[src]
impl Eq for ErrorReason
[src]
impl From<ErrorReason> for i32
[src]
fn from(value: ErrorReason) -> i32
[src]
impl Hash for ErrorReason
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for ErrorReason
[src]
fn cmp(&self, other: &ErrorReason) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<ErrorReason> for ErrorReason
[src]
fn eq(&self, other: &ErrorReason) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<ErrorReason> for ErrorReason
[src]
fn partial_cmp(&self, other: &ErrorReason) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for ErrorReason
[src]
impl StructuralPartialEq for ErrorReason
[src]
Auto Trait Implementations
impl RefUnwindSafe for ErrorReason
impl Send for ErrorReason
impl Sync for ErrorReason
impl Unpin for ErrorReason
impl UnwindSafe for ErrorReason
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoRequest<T> for T
[src]
pub fn into_request(self) -> Request<T>
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,