Documentation

Google_Service_ServiceUsage_Resource_Services extends Google_Service_Resource
in package

The "services" collection of methods.

Typical usage is: $serviceusageService = new Google_Service_ServiceUsage(...); $services = $serviceusageService->services;

Table of Contents

$client  : Google_Client
$methods  : array<string|int, mixed>
$resourceName  : string
$rootUrl  : string
$serviceName  : string
$servicePath  : string
$stackParameters  : mixed
__construct()  : mixed
batchEnable()  : Google_Service_ServiceUsage_Operation
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.
batchGet()  : Google_Service_ServiceUsage_BatchGetServicesResponse
Returns the service configurations and enabled states for a given list of services. (services.batchGet)
call()  : Google_Http_Request|expectedClass
TODO: This function needs simplifying.
createRequestUri()  : string
Parse/expand request parameters and create a fully qualified request uri.
disable()  : Google_Service_ServiceUsage_Operation
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. (services.disable)
enable()  : Google_Service_ServiceUsage_Operation
Enable a service so that it can be used with a project. (services.enable)
get()  : Google_Service_ServiceUsage_GoogleApiServiceusageV1Service
Returns the service configuration and enabled state for a given service.
listServices()  : Google_Service_ServiceUsage_ListServicesResponse
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. (services.listServices)
convertToArrayAndStripNulls()  : mixed

Properties

$methods

private array<string|int, mixed> $methods

$resourceName

private string $resourceName

$serviceName

private string $serviceName

$servicePath

private string $servicePath

$stackParameters

private mixed $stackParameters = array('alt' => array('type' => 'string', 'location' => 'query'), 'fields' => array('type' => 'string', 'location' => 'query'), 'trace' => array('type' => 'string', 'location' => 'query'), 'userIp' => array('type' => 'string', 'location' => 'query'), 'quotaUser' => array('type' => 'string', 'location' => 'query'), 'data' => array('type' => 'string', 'location' => 'body'), 'mimeType' => array('type' => 'string', 'location' => 'header'), 'uploadType' => array('type' => 'string', 'location' => 'query'), 'mediaUpload' => array('type' => 'complex', 'location' => 'query'), 'prettyPrint' => array('type' => 'string', 'location' => 'query'))

Methods

__construct()

public __construct(mixed $service, mixed $serviceName, mixed $resourceName, mixed $resource) : mixed
Parameters
$service : mixed
$serviceName : mixed
$resourceName : mixed
$resource : mixed
Return values
mixed

batchEnable()

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.

public batchEnable(string $parent, Google_Service_ServiceUsage_BatchEnableServicesRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ServiceUsage_Operation

To enable a single service, use the EnableService method instead. (services.batchEnable)

Parameters
$parent : string

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.

$postBody : Google_Service_ServiceUsage_BatchEnableServicesRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_ServiceUsage_Operation

batchGet()

Returns the service configurations and enabled states for a given list of services. (services.batchGet)

public batchGet(string $parent[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ServiceUsage_BatchGetServicesResponse
Parameters
$parent : string

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.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string names Names of the services to retrieve. An example name would be: projects/123/services/serviceusage.googleapis.com where 123 is the project number. A single request can get a maximum of 30 services at a time.

Return values
Google_Service_ServiceUsage_BatchGetServicesResponse

call()

TODO: This function needs simplifying.

public call( $name,  $arguments[,  $expectedClass = null ]) : Google_Http_Request|expectedClass
Parameters
$name :
$arguments :
$expectedClass : = null
  • optional, the expected class name
Tags
throws
Google_Exception
Return values
Google_Http_Request|expectedClass

createRequestUri()

Parse/expand request parameters and create a fully qualified request uri.

public createRequestUri(string $restPath, array<string|int, mixed> $params) : string
Parameters
$restPath : string
$params : array<string|int, mixed>
Tags
static
Return values
string

$requestUrl

disable()

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. (services.disable)

public disable(string $name, Google_Service_ServiceUsage_DisableServiceRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ServiceUsage_Operation
Parameters
$name : string

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.

$postBody : Google_Service_ServiceUsage_DisableServiceRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_ServiceUsage_Operation

enable()

Enable a service so that it can be used with a project. (services.enable)

public enable(string $name, Google_Service_ServiceUsage_EnableServiceRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ServiceUsage_Operation
Parameters
$name : string

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.

$postBody : Google_Service_ServiceUsage_EnableServiceRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_ServiceUsage_Operation

get()

Returns the service configuration and enabled state for a given service.

public get(string $name[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ServiceUsage_GoogleApiServiceusageV1Service

(services.get)

Parameters
$name : string

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.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_ServiceUsage_GoogleApiServiceusageV1Service

listServices()

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. (services.listServices)

public listServices(string $parent[, array<string|int, mixed> $optParams = array() ]) : Google_Service_ServiceUsage_ListServicesResponse
Parameters
$parent : string

Parent to search for services on. An example name would be: projects/123 where 123 is the project number.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

int pageSize Requested size of the next page of data. Requested page size cannot exceed 200. If not set, the default page size is 50.

opt_param

string pageToken Token identifying which result to start with, which is returned by a previous list call.

opt_param

string filter Only list services that conform to the given filter. The allowed filter strings are state:ENABLED and state:DISABLED.

Return values
Google_Service_ServiceUsage_ListServicesResponse

convertToArrayAndStripNulls()

protected convertToArrayAndStripNulls(mixed $o) : mixed
Parameters
$o : mixed
Return values
mixed

Search results