Types for Google Cloud Service Usage v1 API¶
- class google.cloud.service_usage_v1.types.BatchEnableServicesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for the
BatchEnableServices
method.- parent¶
Parent to enable services on.
An example name would be:
projects/123
where123
is the project number.The
BatchEnableServices
method currently only supports projects.- Type
- service_ids¶
The identifiers of the services to enable on the project. A valid identifier would be:
serviceusage.googleapis.com
Enabling services requires that each service is public or is shared with the user enabling the service.
A single request can enable a maximum of 20 services at a time. If more than 20 services are specified, the request will fail, and no state changes will occur.
- Type
MutableSequence[str]
- class google.cloud.service_usage_v1.types.BatchEnableServicesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Response message for the
BatchEnableServices
method. This response message is assigned to theresponse
field of the returned Operation when that operation is done.- services¶
The new state of the services after enabling.
- Type
MutableSequence[google.cloud.service_usage_v1.types.Service]
- failures¶
If allow_partial_success is true, and one or more services could not be enabled, this field contains the details about each failure.
- Type
MutableSequence[google.cloud.service_usage_v1.types.BatchEnableServicesResponse.EnableFailure]
- class EnableFailure(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Provides error messages for the failing services.
- class google.cloud.service_usage_v1.types.BatchGetServicesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for the
BatchGetServices
method.- parent¶
Parent to retrieve services from. If this is set, the parent of all of the services specified in
names
must match this field. An example name would be:projects/123
where123
is the project number. TheBatchGetServices
method currently only supports projects.- Type
- class google.cloud.service_usage_v1.types.BatchGetServicesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Response message for the
BatchGetServices
method.- services¶
The requested Service states.
- Type
MutableSequence[google.cloud.service_usage_v1.types.Service]
- class google.cloud.service_usage_v1.types.DisableServiceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for the
DisableService
method.- name¶
Name of the consumer and service to disable the service on.
The enable and disable methods currently only support projects.
An example name would be:
projects/123/services/serviceusage.googleapis.com
where123
is the project number.- Type
- disable_dependent_services¶
Indicates if services that are enabled and which depend on this service should also be disabled. If not set, an error will be generated if any enabled services depend on the service to be disabled. When set, the service, and any enabled services that depend on it, will be disabled together.
- Type
- check_if_service_has_usage¶
Defines the behavior for checking service usage when disabling a service.
- class CheckIfServiceHasUsage(value)[source]¶
Bases:
proto.enums.Enum
Enum to determine if service usage should be checked when disabling a service.
- Values:
- CHECK_IF_SERVICE_HAS_USAGE_UNSPECIFIED (0):
When unset, the default behavior is used, which is SKIP.
- SKIP (1):
If set, skip checking service usage when disabling a service.
- CHECK (2):
If set, service usage is checked when disabling the service. If a service, or its dependents, has usage in the last 30 days, the request returns a FAILED_PRECONDITION error.
- class google.cloud.service_usage_v1.types.DisableServiceResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Response message for the
DisableService
method. This response message is assigned to theresponse
field of the returned Operation when that operation is done.- service¶
The new state of the service after disabling.
- class google.cloud.service_usage_v1.types.EnableServiceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for the
EnableService
method.- name¶
Name of the consumer and service to enable the service on.
The
EnableService
andDisableService
methods currently only support projects.Enabling a service requires that the service is public or is shared with the user enabling the service.
An example name would be:
projects/123/services/serviceusage.googleapis.com
where123
is the project number.- Type
- class google.cloud.service_usage_v1.types.EnableServiceResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Response message for the
EnableService
method. This response message is assigned to theresponse
field of the returned Operation when that operation is done.- service¶
The new state of the service after enabling.
- class google.cloud.service_usage_v1.types.GetServiceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for the
GetService
method.
- class google.cloud.service_usage_v1.types.ListServicesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for the
ListServices
method.- parent¶
Parent to search for services on.
An example name would be:
projects/123
where123
is the project number.- Type
- page_size¶
Requested size of the next page of data. Requested page size cannot exceed 200. If not set, the default page size is 50.
- Type
- page_token¶
Token identifying which result to start with, which is returned by a previous list call.
- Type
- class google.cloud.service_usage_v1.types.ListServicesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Response message for the
ListServices
method.- services¶
The available services for the requested project.
- Type
MutableSequence[google.cloud.service_usage_v1.types.Service]
- class google.cloud.service_usage_v1.types.OperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The operation metadata returned for the batchend services operation.
- class google.cloud.service_usage_v1.types.Service(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A service that is available for use by the consumer.
- name¶
The resource name of the consumer and service. A valid name would be:
projects/123/services/serviceusage.googleapis.com
- Type
- config¶
The service configuration of the available service. Some fields may be filtered out of the configuration in responses to the
ListServices
method. These fields are present only in responses to theGetService
method.
- state¶
Whether or not the service has been enabled for use by the consumer.
- class google.cloud.service_usage_v1.types.ServiceConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The configuration of the service.
- name¶
The DNS address at which this service is available.
An example DNS address would be:
calendar.googleapis.com
.- Type
- apis¶
A list of API interfaces exported by this service. Contains only the names, versions, and method names of the interfaces.
- Type
MutableSequence[google.protobuf.api_pb2.Api]
- documentation¶
Additional API documentation. Contains only the summary and the documentation URL.
- Type
google.api.documentation_pb2.Documentation
- quota¶
Quota configuration.
- Type
google.api.quota_pb2.Quota
- authentication¶
Auth configuration. Contains only the OAuth rules.
- Type
google.api.auth_pb2.Authentication
- usage¶
Configuration controlling usage of this service.
- Type
google.api.usage_pb2.Usage
- endpoints¶
Configuration for network endpoints. Contains only the names and aliases of the endpoints.
- Type
MutableSequence[google.api.endpoint_pb2.Endpoint]
- monitored_resources¶
Defines the monitored resources used by this service. This is required by the [Service.monitoring][google.api.Service.monitoring] and [Service.logging][google.api.Service.logging] configurations.
- Type
MutableSequence[google.api.monitored_resource_pb2.MonitoredResourceDescriptor]
- monitoring¶
Monitoring configuration. This should not include the ‘producer_destinations’ field.
- Type
google.api.monitoring_pb2.Monitoring
- class google.cloud.service_usage_v1.types.State(value)[source]¶
Bases:
proto.enums.Enum
Whether or not a service has been enabled for use by a consumer.
- Values:
- STATE_UNSPECIFIED (0):
The default value, which indicates that the enabled state of the service is unspecified or not meaningful. Currently, all consumers other than projects (such as folders and organizations) are always in this state.
- DISABLED (1):
The service cannot be used by this consumer. It has either been explicitly disabled, or has never been enabled.
- ENABLED (2):
The service has been explicitly enabled for use by this consumer.