1# -*- coding: utf-8 -*- #
2# Copyright 2016 Google LLC. All Rights Reserved.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#    http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15"""Commands for managing billing accounts and associate them with projects."""
16
17from __future__ import absolute_import
18from __future__ import division
19from __future__ import unicode_literals
20
21from googlecloudsdk.calliope import base
22
23
24@base.ReleaseTracks(base.ReleaseTrack.ALPHA, base.ReleaseTrack.BETA,
25                    base.ReleaseTrack.GA)
26class Billing(base.Group):
27  """Manage billing accounts and associate them with projects.
28
29  Manage billing accounts and associate them with projects.
30
31  ## EXAMPLES
32
33  To list billing accounts associated with the current user, run:
34
35    $ {command} accounts list
36
37  To link one of the billing accounts `0X0X0X-0X0X0X-0X0X0X` with a project
38  `my-project`, run:
39
40    $ {command} projects link my-project --billing-account 0X0X0X-0X0X0X-0X0X0X
41  """
42
43  category = base.BILLING_CATEGORY
44
45  def Filter(self, context, args):
46    del context, args
47    base.DisableUserProjectQuota()
48