Skip to content

Commit

Permalink
feat(cloudbilling): update the API
Browse files Browse the repository at this point in the history
#### cloudbilling:v1beta

The following keys were changed:
- resources.billingAccounts.resources.skus.resources.price.methods.get.description
- resources.billingAccounts.resources.skus.resources.price.methods.get.parameters.currencyCode.description
- resources.billingAccounts.resources.skus.resources.price.methods.get.parameters.name.description
- schemas.GoogleCloudBillingBillingaccountpricesV1betaBillingAccountPrice.description
- schemas.GoogleCloudBillingBillingaccountpricesV1betaBillingAccountPrice.properties.valueType.description
- schemas.GoogleCloudBillingPricesV1betaPrice.description

#### cloudbilling:v1

The following keys were added:
- resources.billingAccounts.methods.create.parameters.parent.description
- resources.billingAccounts.methods.create.parameters.parent.location
- resources.billingAccounts.methods.create.parameters.parent.type
- resources.billingAccounts.methods.list.parameters.parent.description
- resources.billingAccounts.methods.list.parameters.parent.location
- resources.billingAccounts.methods.list.parameters.parent.type
- resources.billingAccounts.methods.move.description
- resources.billingAccounts.methods.move.flatPath
- resources.billingAccounts.methods.move.httpMethod
- resources.billingAccounts.methods.move.id
- resources.billingAccounts.methods.move.parameterOrder
- resources.billingAccounts.methods.move.parameters.name.description
- resources.billingAccounts.methods.move.parameters.name.location
- resources.billingAccounts.methods.move.parameters.name.pattern
- resources.billingAccounts.methods.move.parameters.name.required
- resources.billingAccounts.methods.move.parameters.name.type
- resources.billingAccounts.methods.move.path
- resources.billingAccounts.methods.move.request.$ref
- resources.billingAccounts.methods.move.response.$ref
- resources.billingAccounts.methods.move.scopes
- resources.billingAccounts.resources.subAccounts.methods.create.description
- resources.billingAccounts.resources.subAccounts.methods.create.flatPath
- resources.billingAccounts.resources.subAccounts.methods.create.httpMethod
- resources.billingAccounts.resources.subAccounts.methods.create.id
- resources.billingAccounts.resources.subAccounts.methods.create.parameterOrder
- resources.billingAccounts.resources.subAccounts.methods.create.parameters.parent.description
- resources.billingAccounts.resources.subAccounts.methods.create.parameters.parent.location
- resources.billingAccounts.resources.subAccounts.methods.create.parameters.parent.pattern
- resources.billingAccounts.resources.subAccounts.methods.create.parameters.parent.required
- resources.billingAccounts.resources.subAccounts.methods.create.parameters.parent.type
- resources.billingAccounts.resources.subAccounts.methods.create.path
- resources.billingAccounts.resources.subAccounts.methods.create.request.$ref
- resources.billingAccounts.resources.subAccounts.methods.create.response.$ref
- resources.billingAccounts.resources.subAccounts.methods.create.scopes
- resources.billingAccounts.resources.subAccounts.methods.list.description
- resources.billingAccounts.resources.subAccounts.methods.list.flatPath
- resources.billingAccounts.resources.subAccounts.methods.list.httpMethod
- resources.billingAccounts.resources.subAccounts.methods.list.id
- resources.billingAccounts.resources.subAccounts.methods.list.parameterOrder
- resources.billingAccounts.resources.subAccounts.methods.list.parameters.filter.description
- resources.billingAccounts.resources.subAccounts.methods.list.parameters.filter.location
- resources.billingAccounts.resources.subAccounts.methods.list.parameters.filter.type
- resources.billingAccounts.resources.subAccounts.methods.list.parameters.pageSize.description
- resources.billingAccounts.resources.subAccounts.methods.list.parameters.pageSize.format
- resources.billingAccounts.resources.subAccounts.methods.list.parameters.pageSize.location
- resources.billingAccounts.resources.subAccounts.methods.list.parameters.pageSize.type
- resources.billingAccounts.resources.subAccounts.methods.list.parameters.pageToken.description
- resources.billingAccounts.resources.subAccounts.methods.list.parameters.pageToken.location
- resources.billingAccounts.resources.subAccounts.methods.list.parameters.pageToken.type
- resources.billingAccounts.resources.subAccounts.methods.list.parameters.parent.description
- resources.billingAccounts.resources.subAccounts.methods.list.parameters.parent.location
- resources.billingAccounts.resources.subAccounts.methods.list.parameters.parent.pattern
- resources.billingAccounts.resources.subAccounts.methods.list.parameters.parent.required
- resources.billingAccounts.resources.subAccounts.methods.list.parameters.parent.type
- resources.billingAccounts.resources.subAccounts.methods.list.path
- resources.billingAccounts.resources.subAccounts.methods.list.response.$ref
- resources.billingAccounts.resources.subAccounts.methods.list.scopes
- resources.organizations.resources.billingAccounts.methods.create.description
- resources.organizations.resources.billingAccounts.methods.create.flatPath
- resources.organizations.resources.billingAccounts.methods.create.httpMethod
- resources.organizations.resources.billingAccounts.methods.create.id
- resources.organizations.resources.billingAccounts.methods.create.parameterOrder
- resources.organizations.resources.billingAccounts.methods.create.parameters.parent.description
- resources.organizations.resources.billingAccounts.methods.create.parameters.parent.location
- resources.organizations.resources.billingAccounts.methods.create.parameters.parent.pattern
- resources.organizations.resources.billingAccounts.methods.create.parameters.parent.required
- resources.organizations.resources.billingAccounts.methods.create.parameters.parent.type
- resources.organizations.resources.billingAccounts.methods.create.path
- resources.organizations.resources.billingAccounts.methods.create.request.$ref
- resources.organizations.resources.billingAccounts.methods.create.response.$ref
- resources.organizations.resources.billingAccounts.methods.create.scopes
- resources.organizations.resources.billingAccounts.methods.list.description
- resources.organizations.resources.billingAccounts.methods.list.flatPath
- resources.organizations.resources.billingAccounts.methods.list.httpMethod
- resources.organizations.resources.billingAccounts.methods.list.id
- resources.organizations.resources.billingAccounts.methods.list.parameterOrder
- resources.organizations.resources.billingAccounts.methods.list.parameters.filter.description
- resources.organizations.resources.billingAccounts.methods.list.parameters.filter.location
- resources.organizations.resources.billingAccounts.methods.list.parameters.filter.type
- resources.organizations.resources.billingAccounts.methods.list.parameters.pageSize.description
- resources.organizations.resources.billingAccounts.methods.list.parameters.pageSize.format
- resources.organizations.resources.billingAccounts.methods.list.parameters.pageSize.location
- resources.organizations.resources.billingAccounts.methods.list.parameters.pageSize.type
- resources.organizations.resources.billingAccounts.methods.list.parameters.pageToken.description
- resources.organizations.resources.billingAccounts.methods.list.parameters.pageToken.location
- resources.organizations.resources.billingAccounts.methods.list.parameters.pageToken.type
- resources.organizations.resources.billingAccounts.methods.list.parameters.parent.description
- resources.organizations.resources.billingAccounts.methods.list.parameters.parent.location
- resources.organizations.resources.billingAccounts.methods.list.parameters.parent.pattern
- resources.organizations.resources.billingAccounts.methods.list.parameters.parent.required
- resources.organizations.resources.billingAccounts.methods.list.parameters.parent.type
- resources.organizations.resources.billingAccounts.methods.list.path
- resources.organizations.resources.billingAccounts.methods.list.response.$ref
- resources.organizations.resources.billingAccounts.methods.list.scopes
- resources.organizations.resources.billingAccounts.methods.move.description
- resources.organizations.resources.billingAccounts.methods.move.flatPath
- resources.organizations.resources.billingAccounts.methods.move.httpMethod
- resources.organizations.resources.billingAccounts.methods.move.id
- resources.organizations.resources.billingAccounts.methods.move.parameterOrder
- resources.organizations.resources.billingAccounts.methods.move.parameters.destinationParent.description
- resources.organizations.resources.billingAccounts.methods.move.parameters.destinationParent.location
- resources.organizations.resources.billingAccounts.methods.move.parameters.destinationParent.pattern
- resources.organizations.resources.billingAccounts.methods.move.parameters.destinationParent.required
- resources.organizations.resources.billingAccounts.methods.move.parameters.destinationParent.type
- resources.organizations.resources.billingAccounts.methods.move.parameters.name.description
- resources.organizations.resources.billingAccounts.methods.move.parameters.name.location
- resources.organizations.resources.billingAccounts.methods.move.parameters.name.pattern
- resources.organizations.resources.billingAccounts.methods.move.parameters.name.required
- resources.organizations.resources.billingAccounts.methods.move.parameters.name.type
- resources.organizations.resources.billingAccounts.methods.move.path
- resources.organizations.resources.billingAccounts.methods.move.response.$ref
- resources.organizations.resources.billingAccounts.methods.move.scopes
- schemas.BillingAccount.properties.parent.description
- schemas.BillingAccount.properties.parent.readOnly
- schemas.BillingAccount.properties.parent.type
- schemas.MoveBillingAccountRequest.description
- schemas.MoveBillingAccountRequest.id
- schemas.MoveBillingAccountRequest.properties.destinationParent.description
- schemas.MoveBillingAccountRequest.properties.destinationParent.type
- schemas.MoveBillingAccountRequest.type
  • Loading branch information
yoshi-automation authored and sofisl committed Nov 27, 2023
1 parent 286e6c7 commit f90c297
Show file tree
Hide file tree
Showing 4 changed files with 932 additions and 15 deletions.
250 changes: 248 additions & 2 deletions discovery/cloudbilling-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,13 @@
"httpMethod": "POST",
"id": "cloudbilling.billingAccounts.create",
"parameterOrder": [],
"parameters": {},
"parameters": {
"parent": {
"description": "Optional. The parent to create a billing account from. Format: - organizations/{organization_id} eg organizations/12345678 - billingAccounts/{billing_account_id} eg `billingAccounts/012345-567890-ABCDEF`",
"location": "query",
"type": "string"
}
},
"path": "v1/billingAccounts",
"request": {
"$ref": "BillingAccount"
Expand Down Expand Up @@ -214,6 +220,11 @@
"description": "A token identifying a page of results to return. This should be a `next_page_token` value returned from a previous `ListBillingAccounts` call. If unspecified, the first page of results is returned.",
"location": "query",
"type": "string"
},
"parent": {
"description": "Optional. The parent resource to list billing accounts from. Format: - organizations/{organization_id} eg organizations/12345678 - billingAccounts/{billing_account_id} eg `billingAccounts/012345-567890-ABCDEF`",
"location": "query",
"type": "string"
}
},
"path": "v1/billingAccounts",
Expand All @@ -226,6 +237,35 @@
"https://www.googleapis.com/auth/cloud-platform"
]
},
"move": {
"description": "Changes which parent organization a billing account belongs to.",
"flatPath": "v1/billingAccounts/{billingAccountsId}:move",
"httpMethod": "POST",
"id": "cloudbilling.billingAccounts.move",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. The resource name of the billing account to move. Must be of the form `billingAccounts/{billing_account_id}`. The specified billing account cannot be a subaccount, since a subaccount always belongs to the same organization as its parent account.",
"location": "path",
"pattern": "^billingAccounts/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}:move",
"request": {
"$ref": "MoveBillingAccountRequest"
},
"response": {
"$ref": "BillingAccount"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-billing",
"https://www.googleapis.com/auth/cloud-platform"
]
},
"patch": {
"description": "Updates a billing account's fields. Currently the only field that can be edited is `display_name`. The current authenticated user must have the `billing.accounts.update` IAM permission, which is typically given to the [administrator](https://cloud.google.com/billing/docs/how-to/billing-access) of the billing account.",
"flatPath": "v1/billingAccounts/{billingAccountsId}",
Expand Down Expand Up @@ -363,6 +403,196 @@
]
}
}
},
"subAccounts": {
"methods": {
"create": {
"description": "This method creates [billing subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts). Google Cloud resellers should use the Channel Services APIs, [accounts.customers.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create) and [accounts.customers.entitlements.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create). When creating a subaccount, the current authenticated user must have the `billing.accounts.update` IAM permission on the parent account, which is typically given to billing account [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). This method will return an error if the parent account has not been provisioned for subaccounts.",
"flatPath": "v1/billingAccounts/{billingAccountsId}/subAccounts",
"httpMethod": "POST",
"id": "cloudbilling.billingAccounts.subAccounts.create",
"parameterOrder": [
"parent"
],
"parameters": {
"parent": {
"description": "Optional. The parent to create a billing account from. Format: - organizations/{organization_id} eg organizations/12345678 - billingAccounts/{billing_account_id} eg `billingAccounts/012345-567890-ABCDEF`",
"location": "path",
"pattern": "^billingAccounts/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/subAccounts",
"request": {
"$ref": "BillingAccount"
},
"response": {
"$ref": "BillingAccount"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-billing",
"https://www.googleapis.com/auth/cloud-platform"
]
},
"list": {
"description": "Lists the billing accounts that the current authenticated user has permission to [view](https://cloud.google.com/billing/docs/how-to/billing-access).",
"flatPath": "v1/billingAccounts/{billingAccountsId}/subAccounts",
"httpMethod": "GET",
"id": "cloudbilling.billingAccounts.subAccounts.list",
"parameterOrder": [
"parent"
],
"parameters": {
"filter": {
"description": "Options for how to filter the returned billing accounts. This only supports filtering for [subaccounts](https://cloud.google.com/billing/docs/concepts) under a single provided parent billing account. (e.g. \"master_billing_account=billingAccounts/012345-678901-ABCDEF\"). Boolean algebra and other fields are not currently supported.",
"location": "query",
"type": "string"
},
"pageSize": {
"description": "Requested page size. The maximum page size is 100; this is also the default.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "A token identifying a page of results to return. This should be a `next_page_token` value returned from a previous `ListBillingAccounts` call. If unspecified, the first page of results is returned.",
"location": "query",
"type": "string"
},
"parent": {
"description": "Optional. The parent resource to list billing accounts from. Format: - organizations/{organization_id} eg organizations/12345678 - billingAccounts/{billing_account_id} eg `billingAccounts/012345-567890-ABCDEF`",
"location": "path",
"pattern": "^billingAccounts/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/subAccounts",
"response": {
"$ref": "ListBillingAccountsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-billing",
"https://www.googleapis.com/auth/cloud-billing.readonly",
"https://www.googleapis.com/auth/cloud-platform"
]
}
}
}
}
},
"organizations": {
"resources": {
"billingAccounts": {
"methods": {
"create": {
"description": "This method creates [billing subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts). Google Cloud resellers should use the Channel Services APIs, [accounts.customers.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create) and [accounts.customers.entitlements.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create). When creating a subaccount, the current authenticated user must have the `billing.accounts.update` IAM permission on the parent account, which is typically given to billing account [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). This method will return an error if the parent account has not been provisioned for subaccounts.",
"flatPath": "v1/organizations/{organizationsId}/billingAccounts",
"httpMethod": "POST",
"id": "cloudbilling.organizations.billingAccounts.create",
"parameterOrder": [
"parent"
],
"parameters": {
"parent": {
"description": "Optional. The parent to create a billing account from. Format: - organizations/{organization_id} eg organizations/12345678 - billingAccounts/{billing_account_id} eg `billingAccounts/012345-567890-ABCDEF`",
"location": "path",
"pattern": "^organizations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/billingAccounts",
"request": {
"$ref": "BillingAccount"
},
"response": {
"$ref": "BillingAccount"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-billing",
"https://www.googleapis.com/auth/cloud-platform"
]
},
"list": {
"description": "Lists the billing accounts that the current authenticated user has permission to [view](https://cloud.google.com/billing/docs/how-to/billing-access).",
"flatPath": "v1/organizations/{organizationsId}/billingAccounts",
"httpMethod": "GET",
"id": "cloudbilling.organizations.billingAccounts.list",
"parameterOrder": [
"parent"
],
"parameters": {
"filter": {
"description": "Options for how to filter the returned billing accounts. This only supports filtering for [subaccounts](https://cloud.google.com/billing/docs/concepts) under a single provided parent billing account. (e.g. \"master_billing_account=billingAccounts/012345-678901-ABCDEF\"). Boolean algebra and other fields are not currently supported.",
"location": "query",
"type": "string"
},
"pageSize": {
"description": "Requested page size. The maximum page size is 100; this is also the default.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "A token identifying a page of results to return. This should be a `next_page_token` value returned from a previous `ListBillingAccounts` call. If unspecified, the first page of results is returned.",
"location": "query",
"type": "string"
},
"parent": {
"description": "Optional. The parent resource to list billing accounts from. Format: - organizations/{organization_id} eg organizations/12345678 - billingAccounts/{billing_account_id} eg `billingAccounts/012345-567890-ABCDEF`",
"location": "path",
"pattern": "^organizations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/billingAccounts",
"response": {
"$ref": "ListBillingAccountsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-billing",
"https://www.googleapis.com/auth/cloud-billing.readonly",
"https://www.googleapis.com/auth/cloud-platform"
]
},
"move": {
"description": "Changes which parent organization a billing account belongs to.",
"flatPath": "v1/organizations/{organizationsId}/billingAccounts/{billingAccountsId}:move",
"httpMethod": "GET",
"id": "cloudbilling.organizations.billingAccounts.move",
"parameterOrder": [
"destinationParent",
"name"
],
"parameters": {
"destinationParent": {
"description": "Required. The resource name of the Organization to reparent the billing account under. Must be of the form `organizations/{organization_id}`.",
"location": "path",
"pattern": "^organizations/[^/]+$",
"required": true,
"type": "string"
},
"name": {
"description": "Required. The resource name of the billing account to move. Must be of the form `billingAccounts/{billing_account_id}`. The specified billing account cannot be a subaccount, since a subaccount always belongs to the same organization as its parent account.",
"location": "path",
"pattern": "^billingAccounts/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+destinationParent}/{+name}:move",
"response": {
"$ref": "BillingAccount"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-billing",
"https://www.googleapis.com/auth/cloud-platform"
]
}
}
}
}
},
Expand Down Expand Up @@ -521,7 +751,7 @@
}
}
},
"revision": "20230811",
"revision": "20231120",
"rootUrl": "https://cloudbilling.googleapis.com/",
"schemas": {
"AggregationInfo": {
Expand Down Expand Up @@ -631,6 +861,11 @@
"description": "Output only. True if the billing account is open, and will therefore be charged for any usage on associated projects. False if the billing account is closed, and therefore projects associated with it will be unable to use paid services.",
"readOnly": true,
"type": "boolean"
},
"parent": {
"description": "Output only. The billing account's parent resource identifier. Use the `MoveBillingAccount` method to update the account's parent resource if it is a organization. Format: - organizations/{organization_id}, for example: organizations/12345678 - billingAccounts/{billing_account_id}, for example: `billingAccounts/012345-567890-ABCDEF`",
"readOnly": true,
"type": "string"
}
},
"type": "object"
Expand Down Expand Up @@ -826,6 +1061,17 @@
},
"type": "object"
},
"MoveBillingAccountRequest": {
"description": "Request message for `MoveBillingAccount` RPC.",
"id": "MoveBillingAccountRequest",
"properties": {
"destinationParent": {
"description": "Required. The resource name of the Organization to reparent the billing account under. Must be of the form `organizations/{organization_id}`.",
"type": "string"
}
},
"type": "object"
},
"Policy": {
"description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time < timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).",
"id": "Policy",
Expand Down

0 comments on commit f90c297

Please sign in to comment.