target.apidocs.com.google.api.services.serviceusage.v1.ServiceUsage.Services.html Maven / Gradle / Ivy
The newest version!
ServiceUsage.Services (Service Usage API v1-rev20241205-2.0.0)
com.google.api.services.serviceusage.v1
Class ServiceUsage.Services
- java.lang.Object
-
- com.google.api.services.serviceusage.v1.ServiceUsage.Services
-
- Enclosing class:
- ServiceUsage
public class ServiceUsage.Services
extends Object
The "services" collection of methods.
-
-
Nested Class Summary
Nested Classes
Modifier and Type
Class and Description
class
ServiceUsage.Services.BatchEnable
class
ServiceUsage.Services.BatchGet
class
ServiceUsage.Services.Disable
class
ServiceUsage.Services.Enable
class
ServiceUsage.Services.Get
class
ServiceUsage.Services.List
-
Constructor Summary
Constructors
Constructor and Description
Services()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
ServiceUsage.Services.BatchEnable
batchEnable(String parent,
BatchEnableServicesRequest content)
Enable multiple services on a project.
ServiceUsage.Services.BatchGet
batchGet(String parent)
Returns the service configurations and enabled states for a given list of services.
ServiceUsage.Services.Disable
disable(String name,
DisableServiceRequest content)
Disable a service so that it can no longer be used with a project.
ServiceUsage.Services.Enable
enable(String name,
EnableServiceRequest content)
Enable a service so that it can be used with a project.
ServiceUsage.Services.Get
get(String name)
Returns the service configuration and enabled state for a given service.
ServiceUsage.Services.List
list(String parent)
List all services available to the specified project, and the current state of those services
with respect to the project.
-
-
Method Detail
-
batchEnable
public ServiceUsage.Services.BatchEnable batchEnable(String parent,
BatchEnableServicesRequest content)
throws IOException
Enable multiple services on a project. The operation is atomic: if enabling any service fails,
then the entire batch fails, and no state changes occur. To enable a single service, use the
`EnableService` method instead.
Create a request for the method "services.batchEnable".
This request holds the parameters needed by the serviceusage server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
parent
- Parent to enable services on. An example name would be: `projects/123` where `123` is the project
number. The `BatchEnableServices` method currently only supports projects.
content
- the BatchEnableServicesRequest
- Returns:
- the request
- Throws:
IOException
-
batchGet
public ServiceUsage.Services.BatchGet batchGet(String parent)
throws IOException
Returns the service configurations and enabled states for a given list of services.
Create a request for the method "services.batchGet".
This request holds the parameters needed by the serviceusage server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
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` where `123` is the
project number. The `BatchGetServices` method currently only supports projects.
- Returns:
- the request
- Throws:
IOException
-
disable
public ServiceUsage.Services.Disable disable(String name,
DisableServiceRequest content)
throws IOException
Disable a service so that it can no longer be used with a project. This prevents unintended usage
that may cause unexpected billing charges or security leaks. It is not valid to call the disable
method on a service that is not currently enabled. Callers will receive a `FAILED_PRECONDITION`
status if the target service is not currently enabled.
Create a request for the method "services.disable".
This request holds the parameters needed by the serviceusage server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
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` where `123` is the project number.
content
- the DisableServiceRequest
- Returns:
- the request
- Throws:
IOException
-
enable
public ServiceUsage.Services.Enable enable(String name,
EnableServiceRequest content)
throws IOException
Enable a service so that it can be used with a project.
Create a request for the method "services.enable".
This request holds the parameters needed by the serviceusage server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
name
- Name of the consumer and service to enable the service on. The `EnableService` and `DisableService`
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` where `123` is the project number.
content
- the EnableServiceRequest
- Returns:
- the request
- Throws:
IOException
-
get
public ServiceUsage.Services.Get get(String name)
throws IOException
Returns the service configuration and enabled state for a given service.
Create a request for the method "services.get".
This request holds the parameters needed by the serviceusage server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
name
- Name of the consumer and service to get the `ConsumerState` for. An example name would be:
`projects/123/services/serviceusage.googleapis.com` where `123` is the project number.
- Returns:
- the request
- Throws:
IOException
-
list
public ServiceUsage.Services.List list(String parent)
throws IOException
List all services available to the specified project, and the current state of those services
with respect to the project. The list includes all public services, all services for which the
calling user has the `servicemanagement.services.bind` permission, and all services that have
already been enabled on the project. The list can be filtered to only include services in a
specific state, for example to only include services enabled on the project. WARNING: If you need
to query enabled services frequently or across an organization, you should use [Cloud Asset
Inventory API](https://cloud.google.com/asset-inventory/docs/apis), which provides higher
throughput and richer filtering capability.
Create a request for the method "services.list".
This request holds the parameters needed by the serviceusage server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
parent
- Parent to search for services on. An example name would be: `projects/123` where `123` is the
project number.
- Returns:
- the request
- Throws:
IOException
Copyright © 2011–2024 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy