blob: 601b31bd33d163fe276ce850ed230effd26a1da9 [file]
{
"auth": {
"oauth2": {
"scopes": {
"https://www.googleapis.com/auth/cloud-platform": {
"description": "View and manage your data across Google Cloud Platform services"
}
}
}
},
"basePath": "",
"baseUrl": "https://cloudbilling.googleapis.com/",
"batchPath": "batch",
"canonicalName": "Cloudbilling",
"description": "Allows developers to manage billing for their Google Cloud Platform projects\n programmatically.",
"discoveryVersion": "v1",
"documentationLink": "https://cloud.google.com/billing/",
"fullyEncodeReservedExpansion": true,
"icons": {
"x16": "http://www.google.com/images/icons/product/search-16.gif",
"x32": "http://www.google.com/images/icons/product/search-32.gif"
},
"id": "cloudbilling:v1",
"kind": "discovery#restDescription",
"name": "cloudbilling",
"ownerDomain": "google.com",
"ownerName": "Google",
"parameters": {
"$.xgafv": {
"description": "V1 error format.",
"enum": [
"1",
"2"
],
"enumDescriptions": [
"v1 error format",
"v2 error format"
],
"location": "query",
"type": "string"
},
"access_token": {
"description": "OAuth access token.",
"location": "query",
"type": "string"
},
"alt": {
"default": "json",
"description": "Data format for response.",
"enum": [
"json",
"media",
"proto"
],
"enumDescriptions": [
"Responses with Content-Type of application/json",
"Media download with context-dependent Content-Type",
"Responses with Content-Type of application/x-protobuf"
],
"location": "query",
"type": "string"
},
"bearer_token": {
"description": "OAuth bearer token.",
"location": "query",
"type": "string"
},
"callback": {
"description": "JSONP",
"location": "query",
"type": "string"
},
"fields": {
"description": "Selector specifying which fields to include in a partial response.",
"location": "query",
"type": "string"
},
"key": {
"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
"location": "query",
"type": "string"
},
"oauth_token": {
"description": "OAuth 2.0 token for the current user.",
"location": "query",
"type": "string"
},
"pp": {
"default": "true",
"description": "Pretty-print response.",
"location": "query",
"type": "boolean"
},
"prettyPrint": {
"default": "true",
"description": "Returns response with indentations and line breaks.",
"location": "query",
"type": "boolean"
},
"quotaUser": {
"description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
"location": "query",
"type": "string"
},
"uploadType": {
"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
"location": "query",
"type": "string"
},
"upload_protocol": {
"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
"location": "query",
"type": "string"
}
},
"protocol": "rest",
"resources": {
"billingAccounts": {
"methods": {
"get": {
"description": "Gets information about a billing account. The current authenticated user\nmust be an [owner of the billing\naccount](https://support.google.com/cloud/answer/4430947).",
"flatPath": "v1/billingAccounts/{billingAccountsId}",
"httpMethod": "GET",
"id": "cloudbilling.billingAccounts.get",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "The resource name of the billing account to retrieve. For example,\n`billingAccounts/012345-567890-ABCDEF`.",
"location": "path",
"pattern": "^billingAccounts/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "BillingAccount"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"list": {
"description": "Lists the billing accounts that the current authenticated user\n[owns](https://support.google.com/cloud/answer/4430947).",
"flatPath": "v1/billingAccounts",
"httpMethod": "GET",
"id": "cloudbilling.billingAccounts.list",
"parameterOrder": [],
"parameters": {
"pageSize": {
"description": "Requested page size. The maximum page size is 100; this is also the\ndefault.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "A token identifying a page of results to return. This should be a\n`next_page_token` value returned from a previous `ListBillingAccounts`\ncall. If unspecified, the first page of results is returned.",
"location": "query",
"type": "string"
}
},
"path": "v1/billingAccounts",
"response": {
"$ref": "ListBillingAccountsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
}
},
"resources": {
"projects": {
"methods": {
"list": {
"description": "Lists the projects associated with a billing account. The current\nauthenticated user must have the \"billing.resourceAssociations.list\" IAM\npermission, which is often given to billing account\n[viewers](https://support.google.com/cloud/answer/4430947).",
"flatPath": "v1/billingAccounts/{billingAccountsId}/projects",
"httpMethod": "GET",
"id": "cloudbilling.billingAccounts.projects.list",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "The resource name of the billing account associated with the projects that\nyou want to list. For example, `billingAccounts/012345-567890-ABCDEF`.",
"location": "path",
"pattern": "^billingAccounts/[^/]+$",
"required": true,
"type": "string"
},
"pageSize": {
"description": "Requested page size. The maximum page size is 100; this is also the\ndefault.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "A token identifying a page of results to be returned. This should be a\n`next_page_token` value returned from a previous `ListProjectBillingInfo`\ncall. If unspecified, the first page of results is returned.",
"location": "query",
"type": "string"
}
},
"path": "v1/{+name}/projects",
"response": {
"$ref": "ListProjectBillingInfoResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
}
}
}
}
},
"projects": {
"methods": {
"getBillingInfo": {
"description": "Gets the billing information for a project. The current authenticated user\nmust have [permission to view the\nproject](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo\n).",
"flatPath": "v1/projects/{projectsId}/billingInfo",
"httpMethod": "GET",
"id": "cloudbilling.projects.getBillingInfo",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "The resource name of the project for which billing information is\nretrieved. For example, `projects/tokyo-rain-123`.",
"location": "path",
"pattern": "^projects/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}/billingInfo",
"response": {
"$ref": "ProjectBillingInfo"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"updateBillingInfo": {
"description": "Sets or updates the billing account associated with a project. You specify\nthe new billing account by setting the `billing_account_name` in the\n`ProjectBillingInfo` resource to the resource name of a billing account.\nAssociating a project with an open billing account enables billing on the\nproject and allows charges for resource usage. If the project already had a\nbilling account, this method changes the billing account used for resource\nusage charges.\n\n*Note:* Incurred charges that have not yet been reported in the transaction\nhistory of the Google Cloud Console may be billed to the new billing\naccount, even if the charge occurred before the new billing account was\nassigned to the project.\n\nThe current authenticated user must have ownership privileges for both the\n[project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo\n) and the [billing\naccount](https://support.google.com/cloud/answer/4430947).\n\nYou can disable billing on the project by setting the\n`billing_account_name` field to empty. This action disassociates the\ncurrent billing account from the project. Any billable activity of your\nin-use services will stop, and your application could stop functioning as\nexpected. Any unbilled charges to date will be billed to the previously\nassociated account. The current authenticated user must be either an owner\nof the project or an owner of the billing account for the project.\n\nNote that associating a project with a *closed* billing account will have\nmuch the same effect as disabling billing on the project: any paid\nresources used by the project will be shut down. Thus, unless you wish to\ndisable billing, you should always call this method with the name of an\n*open* billing account.",
"flatPath": "v1/projects/{projectsId}/billingInfo",
"httpMethod": "PUT",
"id": "cloudbilling.projects.updateBillingInfo",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "The resource name of the project associated with the billing information\nthat you want to update. For example, `projects/tokyo-rain-123`.",
"location": "path",
"pattern": "^projects/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}/billingInfo",
"request": {
"$ref": "ProjectBillingInfo"
},
"response": {
"$ref": "ProjectBillingInfo"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
}
}
},
"services": {
"methods": {
"list": {
"description": "Lists all public cloud services.",
"flatPath": "v1/services",
"httpMethod": "GET",
"id": "cloudbilling.services.list",
"parameterOrder": [],
"parameters": {
"pageSize": {
"description": "Requested page size. Defaults to 5000.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "A token identifying a page of results to return. This should be a\n`next_page_token` value returned from a previous `ListServices`\ncall. If unspecified, the first page of results is returned.",
"location": "query",
"type": "string"
}
},
"path": "v1/services",
"response": {
"$ref": "ListServicesResponse"
}
}
},
"resources": {
"skus": {
"methods": {
"list": {
"description": "Lists all publicly available SKUs for a given cloud service.",
"flatPath": "v1/services/{servicesId}/skus",
"httpMethod": "GET",
"id": "cloudbilling.services.skus.list",
"parameterOrder": [
"parent"
],
"parameters": {
"currencyCode": {
"description": "The ISO 4217 currency code for the pricing info in the response proto.\nWill use the conversion rate as of start_time.\nOptional. If not specified USD will be used.",
"location": "query",
"type": "string"
},
"endTime": {
"description": "Optional exclusive end time of the time range for which the pricing\nversions will be returned. Timestamps in the future are not allowed.\nThe time range has to be within a single calendar month in\nAmerica/Los_Angeles timezone. Time range as a whole is optional. If not\nspecified, the latest pricing will be returned (up to 12 hours old at\nmost).",
"format": "google-datetime",
"location": "query",
"type": "string"
},
"pageSize": {
"description": "Requested page size. Defaults to 5000.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "A token identifying a page of results to return. This should be a\n`next_page_token` value returned from a previous `ListSkus`\ncall. If unspecified, the first page of results is returned.",
"location": "query",
"type": "string"
},
"parent": {
"description": "The name of the service.\nExample: \"services/DA34-426B-A397\"",
"location": "path",
"pattern": "^services/[^/]+$",
"required": true,
"type": "string"
},
"startTime": {
"description": "Optional inclusive start time of the time range for which the pricing\nversions will be returned. Timestamps in the future are not allowed.\nThe time range has to be within a single calendar month in\nAmerica/Los_Angeles timezone. Time range as a whole is optional. If not\nspecified, the latest pricing will be returned (up to 12 hours old at\nmost).",
"format": "google-datetime",
"location": "query",
"type": "string"
}
},
"path": "v1/{+parent}/skus",
"response": {
"$ref": "ListSkusResponse"
}
}
}
}
}
}
},
"revision": "20180122",
"rootUrl": "https://cloudbilling.googleapis.com/",
"schemas": {
"AggregationInfo": {
"description": "Represents the aggregation level and interval for pricing of a single SKU.",
"id": "AggregationInfo",
"properties": {
"aggregationCount": {
"description": "The number of intervals to aggregate over.\nExample: If aggregation_level is \"DAILY\" and aggregation_count is 14,\naggregation will be over 14 days.",
"format": "int32",
"type": "integer"
},
"aggregationInterval": {
"enum": [
"AGGREGATION_INTERVAL_UNSPECIFIED",
"DAILY",
"MONTHLY"
],
"enumDescriptions": [
"",
"",
""
],
"type": "string"
},
"aggregationLevel": {
"enum": [
"AGGREGATION_LEVEL_UNSPECIFIED",
"ACCOUNT",
"PROJECT"
],
"enumDescriptions": [
"",
"",
""
],
"type": "string"
}
},
"type": "object"
},
"BillingAccount": {
"description": "A billing account in [Google Cloud\nConsole](https://console.cloud.google.com/). You can assign a billing account\nto one or more projects.",
"id": "BillingAccount",
"properties": {
"displayName": {
"description": "The display name given to the billing account, such as `My Billing\nAccount`. This name is displayed in the Google Cloud Console.",
"type": "string"
},
"name": {
"description": "The resource name of the billing account. The resource name has the form\n`billingAccounts/{billing_account_id}`. For example,\n`billingAccounts/012345-567890-ABCDEF` would be the resource name for\nbilling account `012345-567890-ABCDEF`.",
"type": "string"
},
"open": {
"description": "True if the billing account is open, and will therefore be charged for any\nusage on associated projects. False if the billing account is closed, and\ntherefore projects associated with it will be unable to use paid services.",
"type": "boolean"
}
},
"type": "object"
},
"Category": {
"description": "Represents the category hierarchy of a SKU.",
"id": "Category",
"properties": {
"resourceFamily": {
"description": "The type of product the SKU refers to.\nExample: \"Compute\", \"Storage\", \"Network\", \"ApplicationServices\" etc.",
"type": "string"
},
"resourceGroup": {
"description": "A group classification for related SKUs.\nExample: \"RAM\", \"GPU\", \"Prediction\", \"Ops\", \"GoogleEgress\" etc.",
"type": "string"
},
"serviceDisplayName": {
"description": "The display name of the service this SKU belongs to.",
"type": "string"
},
"usageType": {
"description": "Represents how the SKU is consumed.\nExample: \"OnDemand\", \"Preemptible\", \"Commit1Mo\", \"Commit1Yr\" etc.",
"type": "string"
}
},
"type": "object"
},
"ListBillingAccountsResponse": {
"description": "Response message for `ListBillingAccounts`.",
"id": "ListBillingAccountsResponse",
"properties": {
"billingAccounts": {
"description": "A list of billing accounts.",
"items": {
"$ref": "BillingAccount"
},
"type": "array"
},
"nextPageToken": {
"description": "A token to retrieve the next page of results. To retrieve the next page,\ncall `ListBillingAccounts` again with the `page_token` field set to this\nvalue. This field is empty if there are no more results to retrieve.",
"type": "string"
}
},
"type": "object"
},
"ListProjectBillingInfoResponse": {
"description": "Request message for `ListProjectBillingInfoResponse`.",
"id": "ListProjectBillingInfoResponse",
"properties": {
"nextPageToken": {
"description": "A token to retrieve the next page of results. To retrieve the next page,\ncall `ListProjectBillingInfo` again with the `page_token` field set to this\nvalue. This field is empty if there are no more results to retrieve.",
"type": "string"
},
"projectBillingInfo": {
"description": "A list of `ProjectBillingInfo` resources representing the projects\nassociated with the billing account.",
"items": {
"$ref": "ProjectBillingInfo"
},
"type": "array"
}
},
"type": "object"
},
"ListServicesResponse": {
"description": "Response message for `ListServices`.",
"id": "ListServicesResponse",
"properties": {
"nextPageToken": {
"description": "A token to retrieve the next page of results. To retrieve the next page,\ncall `ListServices` again with the `page_token` field set to this\nvalue. This field is empty if there are no more results to retrieve.",
"type": "string"
},
"services": {
"description": "A list of services.",
"items": {
"$ref": "Service"
},
"type": "array"
}
},
"type": "object"
},
"ListSkusResponse": {
"description": "Response message for `ListSkus`.",
"id": "ListSkusResponse",
"properties": {
"nextPageToken": {
"description": "A token to retrieve the next page of results. To retrieve the next page,\ncall `ListSkus` again with the `page_token` field set to this\nvalue. This field is empty if there are no more results to retrieve.",
"type": "string"
},
"skus": {
"description": "The list of public SKUs of the given service.",
"items": {
"$ref": "Sku"
},
"type": "array"
}
},
"type": "object"
},
"Money": {
"description": "Represents an amount of money with its currency type.",
"id": "Money",
"properties": {
"currencyCode": {
"description": "The 3-letter currency code defined in ISO 4217.",
"type": "string"
},
"nanos": {
"description": "Number of nano (10^-9) units of the amount.\nThe value must be between -999,999,999 and +999,999,999 inclusive.\nIf `units` is positive, `nanos` must be positive or zero.\nIf `units` is zero, `nanos` can be positive, zero, or negative.\nIf `units` is negative, `nanos` must be negative or zero.\nFor example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.",
"format": "int32",
"type": "integer"
},
"units": {
"description": "The whole units of the amount.\nFor example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.",
"format": "int64",
"type": "string"
}
},
"type": "object"
},
"PricingExpression": {
"description": "Expresses a mathematical pricing formula. For Example:-\n\n`usage_unit: GBy`\n`tiered_rates:`\n `[start_usage_amount: 20, unit_price: $10]`\n `[start_usage_amount: 100, unit_price: $5]`\n\nThe above expresses a pricing formula where the first 20GB is free, the\nnext 80GB is priced at $10 per GB followed by $5 per GB for additional\nusage.",
"id": "PricingExpression",
"properties": {
"baseUnit": {
"description": "The base unit for the SKU which is the unit used in usage exports.\nExample: \"By\"",
"type": "string"
},
"baseUnitConversionFactor": {
"description": "Conversion factor for converting from price per usage_unit to price per\nbase_unit, and start_usage_amount to start_usage_amount in base_unit.\nunit_price / base_unit_conversion_factor = price per base_unit.\nstart_usage_amount * base_unit_conversion_factor = start_usage_amount in\nbase_unit.",
"format": "double",
"type": "number"
},
"baseUnitDescription": {
"description": "The base unit in human readable form.\nExample: \"byte\".",
"type": "string"
},
"displayQuantity": {
"description": "The recommended quantity of units for displaying pricing info. When\ndisplaying pricing info it is recommended to display:\n(unit_price * display_quantity) per display_quantity usage_unit.\nThis field does not affect the pricing formula and is for display purposes\nonly.\nExample: If the unit_price is \"0.0001 USD\", the usage_unit is \"GB\" and\nthe display_quantity is \"1000\" then the recommended way of displaying the\npricing info is \"0.10 USD per 1000 GB\"",
"format": "double",
"type": "number"
},
"tieredRates": {
"description": "The list of tiered rates for this pricing. The total cost is computed by\napplying each of the tiered rates on usage. This repeated list is sorted\nby ascending order of start_usage_amount.",
"items": {
"$ref": "TierRate"
},
"type": "array"
},
"usageUnit": {
"description": "The short hand for unit of usage this pricing is specified in.\nExample: usage_unit of \"GiBy\" means that usage is specified in \"Gibi Byte\".",
"type": "string"
},
"usageUnitDescription": {
"description": "The unit of usage in human readable form.\nExample: \"gibi byte\".",
"type": "string"
}
},
"type": "object"
},
"PricingInfo": {
"description": "Represents the pricing information for a SKU at a single point of time.",
"id": "PricingInfo",
"properties": {
"aggregationInfo": {
"$ref": "AggregationInfo",
"description": "Aggregation Info. This can be left unspecified if the pricing expression\ndoesn't require aggregation."
},
"currencyConversionRate": {
"description": "Conversion rate used for currency conversion, from USD to the currency\nspecified in the request. This includes any surcharge collected for billing\nin non USD currency. If a currency is not specified in the request this\ndefaults to 1.0.\nExample: USD * currency_conversion_rate = JPY",
"format": "double",
"type": "number"
},
"effectiveTime": {
"description": "The timestamp from which this pricing was effective within the requested\ntime range. This is guaranteed to be greater than or equal to the\nstart_time field in the request and less than the end_time field in the\nrequest. If a time range was not specified in the request this field will\nbe equivalent to a time within the last 12 hours, indicating the latest\npricing info.",
"format": "google-datetime",
"type": "string"
},
"pricingExpression": {
"$ref": "PricingExpression",
"description": "Expresses the pricing formula. See `PricingExpression` for an example."
},
"summary": {
"description": "An optional human readable summary of the pricing information, has a\nmaximum length of 256 characters.",
"type": "string"
}
},
"type": "object"
},
"ProjectBillingInfo": {
"description": "Encapsulation of billing information for a Cloud Console project. A project\nhas at most one associated billing account at a time (but a billing account\ncan be assigned to multiple projects).",
"id": "ProjectBillingInfo",
"properties": {
"billingAccountName": {
"description": "The resource name of the billing account associated with the project, if\nany. For example, `billingAccounts/012345-567890-ABCDEF`.",
"type": "string"
},
"billingEnabled": {
"description": "True if the project is associated with an open billing account, to which\nusage on the project is charged. False if the project is associated with a\nclosed billing account, or no billing account at all, and therefore cannot\nuse paid services. This field is read-only.",
"type": "boolean"
},
"name": {
"description": "The resource name for the `ProjectBillingInfo`; has the form\n`projects/{project_id}/billingInfo`. For example, the resource name for the\nbilling information for project `tokyo-rain-123` would be\n`projects/tokyo-rain-123/billingInfo`. This field is read-only.",
"type": "string"
},
"projectId": {
"description": "The ID of the project that this `ProjectBillingInfo` represents, such as\n`tokyo-rain-123`. This is a convenience field so that you don't need to\nparse the `name` field to obtain a project ID. This field is read-only.",
"type": "string"
}
},
"type": "object"
},
"Service": {
"description": "Encapsulates a single service in Google Cloud Platform.",
"id": "Service",
"properties": {
"displayName": {
"description": "A human readable display name for this service.",
"type": "string"
},
"name": {
"description": "The resource name for the service.\nExample: \"services/DA34-426B-A397\"",
"type": "string"
},
"serviceId": {
"description": "The identifier for the service.\nExample: \"DA34-426B-A397\"",
"type": "string"
}
},
"type": "object"
},
"Sku": {
"description": "Encapsulates a single SKU in Google Cloud Platform",
"id": "Sku",
"properties": {
"category": {
"$ref": "Category",
"description": "The category hierarchy of this SKU, purely for organizational purpose."
},
"description": {
"description": "A human readable description of the SKU, has a maximum length of 256\ncharacters.",
"type": "string"
},
"name": {
"description": "The resource name for the SKU.\nExample: \"services/DA34-426B-A397/skus/AA95-CD31-42FE\"",
"type": "string"
},
"pricingInfo": {
"description": "A timeline of pricing info for this SKU in chronological order.",
"items": {
"$ref": "PricingInfo"
},
"type": "array"
},
"serviceProviderName": {
"description": "Identifies the service provider.\nThis is 'Google' for first party services in Google Cloud Platform.",
"type": "string"
},
"serviceRegions": {
"description": "List of service regions this SKU is offered at.\nExample: \"asia-east1\"\nService regions can be found at https://cloud.google.com/about/locations/",
"items": {
"type": "string"
},
"type": "array"
},
"skuId": {
"description": "The identifier for the SKU.\nExample: \"AA95-CD31-42FE\"",
"type": "string"
}
},
"type": "object"
},
"TierRate": {
"description": "The price rate indicating starting usage and its corresponding price.",
"id": "TierRate",
"properties": {
"startUsageAmount": {
"description": "Usage is priced at this rate only after this amount.\nExample: start_usage_amount of 10 indicates that the usage will be priced\nat the unit_price after the first 10 usage_units.",
"format": "double",
"type": "number"
},
"unitPrice": {
"$ref": "Money",
"description": "The price per unit of usage.\nExample: unit_price of amount $10 indicates that each unit will cost $10."
}
},
"type": "object"
}
},
"servicePath": "",
"title": "Google Cloud Billing API",
"version": "v1"
}