blob: 53bc49234d79ba188938a70b1e7a15b961b1db38 [file] [log] [blame]
{
"clientLibrary": {
"name": "cloud.google.com/go/serviceusage/apiv1",
"version": "1.5.0",
"language": "GO",
"apis": [
{
"id": "google.api.serviceusage.v1",
"version": "v1"
}
]
},
"snippets": [
{
"regionTag": "serviceusage_v1_generated_ServiceUsage_BatchEnableServices_sync",
"title": "serviceusage BatchEnableServices Sample",
"description": "BatchEnableServices enable multiple services on a project. The operation is atomic: if enabling\nany service fails, then the entire batch fails, and no state changes occur.\nTo enable a single service, use the EnableService method instead.",
"file": "Client/BatchEnableServices/main.go",
"language": "GO",
"clientMethod": {
"shortName": "BatchEnableServices",
"fullName": "google.api.serviceusage.v1.Client.BatchEnableServices",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "serviceusagepb.BatchEnableServicesRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "BatchEnableServicesOperation",
"client": {
"shortName": "Client",
"fullName": "google.api.serviceusage.v1.Client"
},
"method": {
"shortName": "BatchEnableServices",
"fullName": "google.api.serviceusage.v1.ServiceUsage.BatchEnableServices",
"service": {
"shortName": "ServiceUsage",
"fullName": "google.api.serviceusage.v1.ServiceUsage"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 58,
"type": "FULL"
}
]
},
{
"regionTag": "serviceusage_v1_generated_ServiceUsage_BatchGetServices_sync",
"title": "serviceusage BatchGetServices Sample",
"description": "BatchGetServices returns the service configurations and enabled states for a given list of\nservices.",
"file": "Client/BatchGetServices/main.go",
"language": "GO",
"clientMethod": {
"shortName": "BatchGetServices",
"fullName": "google.api.serviceusage.v1.Client.BatchGetServices",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "serviceusagepb.BatchGetServicesRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "serviceusagepb.BatchGetServicesResponse",
"client": {
"shortName": "Client",
"fullName": "google.api.serviceusage.v1.Client"
},
"method": {
"shortName": "BatchGetServices",
"fullName": "google.api.serviceusage.v1.ServiceUsage.BatchGetServices",
"service": {
"shortName": "ServiceUsage",
"fullName": "google.api.serviceusage.v1.ServiceUsage"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "serviceusage_v1_generated_ServiceUsage_DisableService_sync",
"title": "serviceusage DisableService Sample",
"description": "DisableService disable a service so that it can no longer be used with a project.\nThis prevents unintended usage that may cause unexpected billing\ncharges or security leaks.\n\nIt is not valid to call the disable method on a service that is not\ncurrently enabled. Callers will receive a FAILED_PRECONDITION status if\nthe target service is not currently enabled.",
"file": "Client/DisableService/main.go",
"language": "GO",
"clientMethod": {
"shortName": "DisableService",
"fullName": "google.api.serviceusage.v1.Client.DisableService",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "serviceusagepb.DisableServiceRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "DisableServiceOperation",
"client": {
"shortName": "Client",
"fullName": "google.api.serviceusage.v1.Client"
},
"method": {
"shortName": "DisableService",
"fullName": "google.api.serviceusage.v1.ServiceUsage.DisableService",
"service": {
"shortName": "ServiceUsage",
"fullName": "google.api.serviceusage.v1.ServiceUsage"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 58,
"type": "FULL"
}
]
},
{
"regionTag": "serviceusage_v1_generated_ServiceUsage_EnableService_sync",
"title": "serviceusage EnableService Sample",
"description": "EnableService enable a service so that it can be used with a project.",
"file": "Client/EnableService/main.go",
"language": "GO",
"clientMethod": {
"shortName": "EnableService",
"fullName": "google.api.serviceusage.v1.Client.EnableService",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "serviceusagepb.EnableServiceRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "EnableServiceOperation",
"client": {
"shortName": "Client",
"fullName": "google.api.serviceusage.v1.Client"
},
"method": {
"shortName": "EnableService",
"fullName": "google.api.serviceusage.v1.ServiceUsage.EnableService",
"service": {
"shortName": "ServiceUsage",
"fullName": "google.api.serviceusage.v1.ServiceUsage"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 58,
"type": "FULL"
}
]
},
{
"regionTag": "serviceusage_v1_generated_ServiceUsage_GetService_sync",
"title": "serviceusage GetService Sample",
"description": "GetService returns the service configuration and enabled state for a given service.",
"file": "Client/GetService/main.go",
"language": "GO",
"clientMethod": {
"shortName": "GetService",
"fullName": "google.api.serviceusage.v1.Client.GetService",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "serviceusagepb.GetServiceRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "serviceusagepb.Service",
"client": {
"shortName": "Client",
"fullName": "google.api.serviceusage.v1.Client"
},
"method": {
"shortName": "GetService",
"fullName": "google.api.serviceusage.v1.ServiceUsage.GetService",
"service": {
"shortName": "ServiceUsage",
"fullName": "google.api.serviceusage.v1.ServiceUsage"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "serviceusage_v1_generated_ServiceUsage_ListServices_sync",
"title": "serviceusage ListServices Sample",
"description": "ListServices list all services available to the specified project, and the current\nstate of those services with respect to the project. The list includes\nall public services, all services for which the calling user has the\nservicemanagement.services.bind permission, and all services that have\nalready been enabled on the project. The list can be filtered to\nonly include services in a specific state, for example to only include\nservices enabled on the project.\n\nWARNING: If you need to query enabled services frequently or across\nan organization, you should use\nCloud Asset Inventory\nAPI (at https: //cloud.google.com/asset-inventory/docs/apis), which provides\nhigher throughput and richer filtering capability.",
"file": "Client/ListServices/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ListServices",
"fullName": "google.api.serviceusage.v1.Client.ListServices",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "serviceusagepb.ListServicesRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "ServiceIterator",
"client": {
"shortName": "Client",
"fullName": "google.api.serviceusage.v1.Client"
},
"method": {
"shortName": "ListServices",
"fullName": "google.api.serviceusage.v1.ServiceUsage.ListServices",
"service": {
"shortName": "ServiceUsage",
"fullName": "google.api.serviceusage.v1.ServiceUsage"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 60,
"type": "FULL"
}
]
}
]
}