target.apidocs.com.google.api.services.serviceusage.v1.ServiceUsage.Services.html Maven / Gradle / Ivy
ServiceUsage.Services (Service Usage API v1-rev20190305-1.26.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.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.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.
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 (not project ID).
The `BatchEnableServices` method currently only supports
projects.
content
- the BatchEnableServicesRequest
- 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 (not
project ID).
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 (not
project ID).
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 (not
project ID).
- 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.
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 (not project ID).
- Returns:
- the request
- Throws:
IOException
Copyright © 2011–2019 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy