basePath: /v1beta1/partners
definitions:
  billing_errors.BaseError:
    properties:
      code:
        type: string
      error: {}
      msgPrefix:
        type: string
      status:
        type: integer
    type: object
  forms.BillingProfileForOpenAPI:
    properties:
      billingEmail:
        description: The email address where invoices will be sent. This is only applicable
          for credit card payments.
        example: example@tidbcloud.com
        type: string
      city:
        description: The full name of the city in the billing address.
        type: string
      companyName:
        description: The name of the company to be displayed on the invoice. This
          is only applicable for credit card payments.
        example: PingCAP Inc.
        type: string
      countryCode:
        description: A two-letter country code following the [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
          standard. For example, use "US" for the United States.
        example: US
        type: string
      line1:
        description: The first line of the detailed billing address.
        type: string
      line2:
        description: The second line of the detailed billing address.
        type: string
      postalCode:
        description: The postal code of the billing address.
        example: "000000"
        type: string
      state:
        description: The state or region code following the [ISO 3166-2 subdivision](https://en.wikipedia.org/wiki/ISO_3166-2)
          standard, without the country prefix. For example, use "CA" for California
          in the United States, not "US-CA".
        example: CA
        type: string
      taxId:
        description: The tax ID of the billing entity. For more information, see [Supported
          Tax ID types](https://docs.stripe.com/billing/customer/tax-ids#supported-tax-id).
        type: string
      taxIdType:
        allOf:
        - $ref: '#/definitions/forms.TaxIDType'
        description: The type of tax ID provided. For more information, see [Supported
          Tax ID types](https://docs.stripe.com/billing/customer/tax-ids#supported-tax-id).
    type: object
  forms.BillsOtherName:
    properties:
      chargeName:
        example: Support Plan
        type: string
      credits:
        description: The total credits held by the organization in this bill. The
          value of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      discounts:
        description: The total amount of discounts applied to this bill. The value
          of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      runningTotal:
        description: The sum of services that the specified organization has consumed
          during this bill period. The value of this field is expressed in cents (100ths
          of one US Dollar).
        example: "0.00"
        type: string
      totalCost:
        description: |-
          The total amount that the specified organization should pay for this bill. The value of this field is expressed in cents (100ths of one US Dollar).
          `total_cost` = `running_total` - `discounts` - `credits`.
        example: "0.00"
        type: string
    type: object
  forms.BillsOverview:
    properties:
      billedMonth:
        description: The month in which this bill is generated for the specified organization.
        example: 2023-09
        type: string
      credits:
        description: The total credits held by the organization in this bill. The
          value of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      discounts:
        description: The total amount of discounts applied to this bill. The value
          of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      runningTotal:
        description: The sum of services that the specified organization has consumed
          during this bill period. The value of this field is expressed in cents (100ths
          of one US Dollar).
        example: "0.00"
        type: string
      totalCost:
        description: |-
          The total amount that the specified organization should pay for this bill. The value of this field is expressed in cents (100ths of one US Dollar).
          `total_cost` = `running_total` - `discounts` - `credits`.
        example: "0.00"
        type: string
    type: object
  forms.BillsProjects:
    properties:
      credits:
        description: The total credits held by the organization in this bill. The
          value of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      discounts:
        description: The total amount of discounts applied to this bill. The value
          of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      projectName:
        description: The name of a project in the specified organization.
        example: prod-project
        type: string
      runningTotal:
        description: The sum of services that the specified organization has consumed
          during this bill period. The value of this field is expressed in cents (100ths
          of one US Dollar).
        example: "0.00"
        type: string
      totalCost:
        description: |-
          The total amount that the specified organization should pay for this bill. The value of this field is expressed in cents (100ths of one US Dollar).
          `total_cost` = `running_total` - `discounts` - `credits`.
        example: "0.00"
        type: string
    type: object
  forms.BillsServiceCosts:
    properties:
      credits:
        description: The total credits held by the organization in this bill. The
          value of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      discounts:
        description: The total amount of discounts applied to this bill. The value
          of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      runningTotal:
        description: The sum of services that the specified organization has consumed
          during this bill period. The value of this field is expressed in cents (100ths
          of one US Dollar).
        example: "0.00"
        type: string
      serviceCosts:
        items:
          $ref: '#/definitions/forms.BillsServiceCosts'
        type: array
      serviceName:
        description: The name of services provided by TiDB Cloud.
        example: TiDB Dedicated
        type: string
      totalCost:
        description: |-
          The total amount that the specified organization should pay for this bill. The value of this field is expressed in cents (100ths of one US Dollar).
          `total_cost` = `running_total` - `discounts` - `credits`.
        example: "0.00"
        type: string
    type: object
  forms.BudgetCostType:
    enum:
    - total
    - invoice
    type: string
    x-enum-varnames:
    - BudgetCostType_Total
    - BudgetCostType_Invoice
  forms.BudgetForOpenAPI:
    properties:
      applyCredits:
        description: Indicates whether to deduct credits when calculating cost. Only
          applicable when `costType` is set to `"total"`.
        type: boolean
      applyDiscounts:
        description: Indicates whether to deduct discounts when calculating cost.
          Only applicable when `costType` is set to `"total"`.
        type: boolean
      bizType:
        description: 'The business type of the budget. Note: You can only create `"budget_alert"`
          type budgets using the API.'
        type: string
      budgetId:
        description: A unique identifier for the budget.
        example: "0"
        type: string
      budgetInterval:
        allOf:
        - $ref: '#/definitions/forms.BudgetInterval'
        description: The interval for which the budget applies.
      cost:
        description: The current cost accrued against this budget.
        type: string
      costType:
        allOf:
        - $ref: '#/definitions/forms.BudgetCostType'
        description: |-
          The type of the budget cost.
          - `"total"`: the total cost
          - `"invoice"`: the bills you need pay
      enableEmailNotification:
        description: Indicates whether email notifications are enabled when the budget
          threshold is reached.
        type: boolean
      limit:
        description: The maximum amount set for this budget.
        type: string
      name:
        description: The name of the budget.
        type: string
      rangId:
        description: The ID of the entity to which this budget applies.
        example: "0"
        type: string
      rangeType:
        allOf:
        - $ref: '#/definitions/forms.BudgetRangeType'
        description: The type of entity to which this budget applies. You can specify
          an organization (tenant), a project, or a customer (only for partners).
          You cannot specify a cluster.
      thresholds:
        description: An array of threshold values for this budget. Must contain at
          least one and up to five thresholds.
        items:
          $ref: '#/definitions/forms.BudgetThreshold'
        type: array
    type: object
  forms.BudgetInterval:
    enum:
    - monthly
    type: string
    x-enum-varnames:
    - BudgetInterval_Monthly
  forms.BudgetRangeType:
    enum:
    - tenant
    - project
    - cluster
    - customer
    type: string
    x-enum-varnames:
    - BudgetRangeType_Tenant
    - BudgetRangeType_Project
    - BudgetRangeType_Cluster
    - BudgetRangeType_Customer
  forms.BudgetThreshold:
    properties:
      proportion:
        description: The budget threshold as a decimal value. For example, `"0.3"`
          means that when the cost reaches 30% of the limit, the specified action
          (such as email notification) will be triggered.
        example: "0.3"
        type: string
    type: object
  forms.ClusterOpenAPI:
    properties:
      ProjectID:
        example: "0"
        type: string
      id:
        example: "0"
        type: string
      name:
        type: string
      regionName:
        type: string
      status:
        type: string
    type: object
  forms.CostExplorerProvider:
    properties:
      name:
        description: The name of the cloud provider to include in the query.
        type: string
      regions:
        description: A list of region names to include in the query.
        items:
          type: string
        type: array
    type: object
  forms.CostExplorerService:
    properties:
      category:
        description: The service category name (second level).
        type: string
      component:
        description: The service component name (third level).
        type: string
      product:
        description: The service product name (first level).
        type: string
      service:
        description: The full service name, typically combining all levels.
        type: string
    type: object
  forms.CostExplorerTrendsBreakdownKey:
    enum:
    - service
    - product
    - project
    - cluster
    - provider
    - region
    - customer
    type: string
    x-enum-varnames:
    - CostExploreTrendsBreakdownKeyService
    - CostExploreTrendsBreakdownKeyProduct
    - CostExploreTrendsBreakdownKeyProject
    - CostExploreTrendsBreakdownKeyCluster
    - CostExploreTrendsBreakdownKeyProvider
    - CostExploreTrendsBreakdownKeyRegion
    - CostExploreTrendsBreakdownKeyCustomer
  forms.CostExplorerTrendsTimeGroup:
    enum:
    - day
    - month
    - total
    type: string
    x-enum-varnames:
    - CostExploreTrendsTimeGroupDay
    - CostExploreTrendsTimeGroupMonth
    - CostExploreTrendsTimeGroupTotal
  forms.CreditsForOpenAPI:
    properties:
      credit:
        description: The total amount of credit.
        example: "1000.00"
        type: string
      creditCode:
        description: A unique identifier for the credit.
        example: 498c7f44-656f-4944-b455-0695faa5d4f9
        type: string
      customers:
        description: The credits can only apply on the costs from the specific customers,
          `empty` means no restrictions
        items:
          type: string
        type: array
      expiryDate:
        description: 'The expiration date of the credit. The time format follows the
          [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard. For example:
          `"2023-11-01T00:00:00Z"`.'
        example: "2023-12-01T00:00:00Z"
        type: string
      provider:
        allOf:
        - $ref: '#/definitions/forms.ProviderEnum'
        description: The credits can only apply on the costs from the specific provider,
          `all` means no restrictions
        example: all
      remainingCredit:
        description: The remaining amount of the credit.
        example: "1000.00"
        type: string
      services:
        description: The service to which the credit is applicable.
        example: General Product
        type: string
      startDate:
        description: 'The effective start date of the credit. The time format follows
          the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard. For example:
          `"2023-11-01T00:00:00Z"`.'
        example: "2023-11-01T00:00:00Z"
        type: string
      status:
        allOf:
        - $ref: '#/definitions/forms.CreditsState'
        description: The current status of the credit.
        example: active
    type: object
  forms.CreditsState:
    enum:
    - active
    - inactive
    - before_active
    type: string
    x-enum-varnames:
    - CreditsState_Active
    - CreditsState_Inactive
    - CreditsState_BeforeActive
  forms.Customer:
    properties:
      id:
        description: The unique identifier for the customer.
        type: string
      name:
        description: The name of the customer.
        example: PingCAP
        type: string
    type: object
  forms.CustomerBills:
    properties:
      credits:
        description: The total credits held by the organization in this bill. The
          value of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      customerName:
        description: The name of the customer.
        example: PingCAP
        type: string
      discounts:
        description: The total amount of discounts applied to this bill. The value
          of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      runningTotal:
        description: The sum of services that the specified organization has consumed
          during this bill period. The value of this field is expressed in cents (100ths
          of one US Dollar).
        example: "0.00"
        type: string
      totalCost:
        description: |-
          The total amount that the specified organization should pay for this bill. The value of this field is expressed in cents (100ths of one US Dollar).
          `total_cost` = `running_total` - `discounts` - `credits`.
        example: "0.00"
        type: string
    type: object
  forms.DiscountForOpenAPI:
    properties:
      customers:
        description: The discount can only apply on the costs from the specific customers,
          `empty` means no restrictions
        items:
          type: string
        type: array
      description:
        description: The description of the discount.
        type: string
      discountCode:
        description: The unique code for the discount.
        example: 498c7f44-656f-4944-b455-0695faa5d4f9
        type: string
      expiryDate:
        description: 'The expiration date of the discount. The time format follows
          the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard. For example:
          `"2023-12-01T00:00:00Z".'
        example: "2023-12-01T00:00:00Z"
        type: string
      percentageDiscount:
        description: The percentage deducted from the original price. For example,
          a 20% discount on a $100 item would result in a discounted price of $80.
        example: 20%
        type: string
      provider:
        allOf:
        - $ref: '#/definitions/forms.ProviderEnum'
        description: The discount can only apply on the costs from the specific provider,
          `all` means no restrictions
        example: all
      services:
        description: The services to which the discount is applicable.
        example: Node Compute, Changefeed,
        type: string
      startDate:
        description: 'The effective start date of the discount. The time format follows
          the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard. For example:
          `"2023-12-01T00:00:00Z"`.'
        example: "2023-11-01T00:00:00Z"
        type: string
      status:
        allOf:
        - $ref: '#/definitions/forms.DiscountState'
        description: The current status of the discount.
        example: valid
    type: object
  forms.DiscountState:
    enum:
    - valid
    - expired
    - reclaimed
    - invalid
    type: string
    x-enum-varnames:
    - DiscountState_Valid
    - DiscountState_Expired
    - DiscountState_Reclaimed
    - DiscountState_Invalid
  forms.Groups:
    properties:
      groupBy:
        description: |-
          Specifies categories for grouping query results. Value options are:
          - "service": Group query results by service type
          - "product": Group query results by product type (TiDB Dedicated, TiDB Serverless, or Support Plan)
          - "project": Group query results by project IDs
          - "cluster": Group query results by cluster IDs
          - "provider": Group query results by cloud provider
          - "region": Group query results by cloud provider region
        items:
          $ref: '#/definitions/forms.CostExplorerTrendsBreakdownKey'
        type: array
      timeGranularity:
        allOf:
        - $ref: '#/definitions/forms.CostExplorerTrendsTimeGroup'
        description: |-
          Determines the time-based organization of query results. Value options are:
          - "day": Query results are organized daily
          - "month": Query results are organized monthly
          - "total": Query results are organized as a single total
    type: object
  forms.OKType:
    properties:
      status:
        example: ok
        type: string
    type: object
  forms.OrgSupportPlanForOpenAPI:
    properties:
      activeDate:
        description: 'The effective date of the support plan for the organization.
          The time format follows the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
          standard. For example: `"2023-12-01T00:00:00Z"`.'
        example: "2023-12-01T00:00:00Z"
        type: string
      expiredDate:
        description: 'The expiration date of the support plan for the organization.
          The time format follows the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
          standard. For example: `"2023-12-01T00:00:00Z"`.'
        example: "2023-12-01T00:00:00Z"
        type: string
      fixedChargePrice:
        description: The fixed fee for the support plan. If the plan is charged on
          a pro rata basis (`"percentage_price"`), this represents the minimum fee.
        type: string
      level:
        allOf:
        - $ref: '#/definitions/forms.SupportPlanLevel'
        description: The level of the support plan. By default, the Basic plan is
          selected.
      public:
        description: Indicates whether the support plan is public. A non-public support
          plan might be subject to special contract terms and cannot be upgraded or
          downgraded.
        type: boolean
      supportPricePercentage:
        description: The prorated fee ratio for the support plan.
        type: string
      type:
        allOf:
        - $ref: '#/definitions/forms.SupportPlanType'
        description: Indicates whether the support plan is charged on a pro rata basis
          (`"percentage_price"`) or a fixed fee (`"fixed_price"`).
    type: object
  forms.PartnerBillsCostExplorer:
    properties:
      credits:
        description: The total credits held by the organization in this bill. The
          value of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      discounts:
        description: The total amount of discounts applied to this bill. The value
          of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      elements:
        items:
          $ref: '#/definitions/forms.PartnerBillsCostExplorerElements'
        type: array
      runningTotal:
        description: The sum of services that the specified organization has consumed
          during this bill period. The value of this field is expressed in cents (100ths
          of one US Dollar).
        example: "0.00"
        type: string
      totalCost:
        description: |-
          The total amount that the specified organization should pay for this bill. The value of this field is expressed in cents (100ths of one US Dollar).
          `total_cost` = `running_total` - `discounts` - `credits`.
        example: "0.00"
        type: string
    type: object
  forms.PartnerBillsCostExplorerBreakdown:
    properties:
      billedDate:
        example: "2023-01-01"
        type: string
      credits:
        description: The total credits held by the organization in this bill. The
          value of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      detailKey:
        example: "122"
        type: string
      detailName:
        example: customer01
        type: string
      discounts:
        description: The total amount of discounts applied to this bill. The value
          of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      runningTotal:
        description: The sum of services that the specified organization has consumed
          during this bill period. The value of this field is expressed in cents (100ths
          of one US Dollar).
        example: "0.00"
        type: string
      totalCost:
        description: |-
          The total amount that the specified organization should pay for this bill. The value of this field is expressed in cents (100ths of one US Dollar).
          `total_cost` = `running_total` - `discounts` - `credits`.
        example: "0.00"
        type: string
    type: object
  forms.PartnerBillsCostExplorerElements:
    properties:
      billedDate:
        example: "2023-01-01"
        type: string
      breakdown:
        items:
          $ref: '#/definitions/forms.PartnerBillsCostExplorerBreakdown'
        type: array
      credits:
        description: The total credits held by the organization in this bill. The
          value of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      discounts:
        description: The total amount of discounts applied to this bill. The value
          of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      runningTotal:
        description: The sum of services that the specified organization has consumed
          during this bill period. The value of this field is expressed in cents (100ths
          of one US Dollar).
        example: "0.00"
        type: string
      totalCost:
        description: |-
          The total amount that the specified organization should pay for this bill. The value of this field is expressed in cents (100ths of one US Dollar).
          `total_cost` = `running_total` - `discounts` - `credits`.
        example: "0.00"
        type: string
    type: object
  forms.PartnerBillsDetail:
    properties:
      billedDate:
        description: The date when this bill happens.
        type: string
      clusterName:
        description: Name of the cluster.
        type: string
      credits:
        description: The total credits held by the organization in this bill. The
          value of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      customerName:
        example: PingCAP
        type: string
      discounts:
        description: The total amount of discounts applied to this bill. The value
          of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      projectName:
        description: Name of the project.
        type: string
      runningTotal:
        description: The sum of services that the specified organization has consumed
          during this bill period. The value of this field is expressed in cents (100ths
          of one US Dollar).
        example: "0.00"
        type: string
      servicePathName:
        description: Name of the service.
        type: string
      totalCost:
        description: |-
          The total amount that the specified organization should pay for this bill. The value of this field is expressed in cents (100ths of one US Dollar).
          `total_cost` = `running_total` - `discounts` - `credits`.
        example: "0.00"
        type: string
    type: object
  forms.PartnerBillsDetails:
    properties:
      details:
        items:
          $ref: '#/definitions/forms.PartnerBillsDetail'
        type: array
    type: object
  forms.PartnerBillsExplorer:
    properties:
      overview:
        allOf:
        - $ref: '#/definitions/forms.BillsOverview'
        description: The overall information for a bill in the specified organization.
      summaryByCustomer:
        allOf:
        - $ref: '#/definitions/forms.SummaryBillsByCustomer'
        description: A breakdown of the bill by customers.
      summaryByProject:
        allOf:
        - $ref: '#/definitions/forms.SummaryByProject'
        description: A breakdown of the bill by project.
      summaryByService:
        description: A breakdown of the bill by services.
        items:
          $ref: '#/definitions/forms.PartnerBillsServiceCosts'
        type: array
    type: object
  forms.PartnerBillsServiceCosts:
    properties:
      credits:
        description: The total credits held by the organization in this bill. The
          value of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      discounts:
        description: The total amount of discounts applied to this bill. The value
          of this field is expressed in cents (100ths of one US Dollar).
        example: "0.00"
        type: string
      runningTotal:
        description: The sum of services that the specified organization has consumed
          during this bill period. The value of this field is expressed in cents (100ths
          of one US Dollar).
        example: "0.00"
        type: string
      serviceCosts:
        description: A breakdown of the bill by service.
        items:
          $ref: '#/definitions/forms.PartnerBillsServiceCosts'
        type: array
      serviceName:
        description: The name of services provided by TiDB Cloud.
        example: TiDB Dedicated
        type: string
      totalCost:
        description: |-
          The total amount that the specified organization should pay for this bill. The value of this field is expressed in cents (100ths of one US Dollar).
          `total_cost` = `running_total` - `discounts` - `credits`.
        example: "0.00"
        type: string
    type: object
  forms.PartnerConfigs:
    properties:
      enableBillsView:
        description: Determines whether customers can view their bills with list prices
          in the TiDB Cloud console.
        example: true
        type: boolean
    type: object
  forms.PartnerTrendsArgs:
    properties:
      clusters:
        items:
          $ref: '#/definitions/forms.ClusterOpenAPI'
        type: array
      customers:
        items:
          $ref: '#/definitions/forms.Customer'
        type: array
      projects:
        items:
          $ref: '#/definitions/forms.ProjectOpenAPI'
        type: array
      providers:
        items:
          $ref: '#/definitions/forms.Provider'
        type: array
      services:
        description: 'The Identifier of TiDB Cloud services consists of 3 levels.
          For example, "service": "TiDB Dedicated - Node Compute - TiFlash" consists
          of the following 3 levels.'
        items:
          $ref: '#/definitions/forms.CostExplorerService'
        type: array
    type: object
  forms.PartnerTrendsFilter:
    properties:
      clusters:
        description: A list of cluster IDs to include in the query.
        items:
          type: string
        type: array
      customers:
        items:
          type: string
        type: array
      projects:
        description: A list of project IDs to include in the query.
        items:
          type: string
        type: array
      providers:
        description: A list of providers to include in the query.
        items:
          $ref: '#/definitions/forms.CostExplorerProvider'
        type: array
      services:
        description: A list of TiDB Cloud services to include in the query.
        items:
          $ref: '#/definitions/forms.CostExplorerService'
        type: array
      timeRange:
        allOf:
        - $ref: '#/definitions/forms.TimeRange'
        description: The time period for the query.
    type: object
  forms.PartnerTrendsInput:
    properties:
      filter:
        $ref: '#/definitions/forms.PartnerTrendsFilter'
      groups:
        $ref: '#/definitions/forms.Groups'
    type: object
  forms.PaymentForOpenAPI:
    properties:
      payable:
        description: Indicates whether the account is in a payable state.
        type: boolean
      type:
        allOf:
        - $ref: '#/definitions/forms.PaymentType'
        description: The type of payment method currently active.
    type: object
  forms.PaymentType:
    enum:
    - none
    - aws
    - aws_cppo
    - gcp
    - credit_card
    - wire_transfer
    type: string
    x-enum-varnames:
    - PaymentType_None
    - PaymentType_AWS
    - PaymentType_AWSCPPO
    - PaymentType_GCP
    - PaymentType_CreditCard
    - PaymentType_WireTransfer
  forms.ProjectOpenAPI:
    properties:
      id:
        example: "0"
        type: string
      name:
        type: string
      status:
        type: string
    type: object
  forms.Provider:
    properties:
      name:
        description: Name of the cloud provider
        type: string
      regions:
        description: Name of the region
        items:
          type: string
        type: array
    type: object
  forms.ProviderEnum:
    enum:
    - all
    - AWS
    - GCP
    - AZURE
    - Alicloud
    - PINGCAP
    type: string
    x-enum-varnames:
    - Provider_All
    - Provider_AWS
    - Provider_GCP
    - Provider_Azure
    - Provider_AliCloud
    - Provider_PINGCAP
  forms.SummaryBillsByCustomer:
    properties:
      customers:
        description: The breakdown of bills by customers of a partner.
        items:
          $ref: '#/definitions/forms.CustomerBills'
        type: array
      otherCharges:
        description: Costs not incurred by the customer but by the partner, such as
          support plan for a MSP.
        items:
          $ref: '#/definitions/forms.BillsOtherName'
        type: array
    type: object
  forms.SummaryByProject:
    properties:
      otherCharges:
        description: These charges occur not only within a project but also across
          the entire organization.
        items:
          $ref: '#/definitions/forms.BillsOtherName'
        type: array
      projects:
        description: The projects in the specified organization.
        items:
          $ref: '#/definitions/forms.BillsProjects'
        type: array
    type: object
  forms.SupportPlanForOpenAPI:
    properties:
      fixedChargePrice:
        description: The fixed fee for the support plan. If the plan is charged on
          a pro rata basis (`"percentage_price"`), this represents the minimum fee.
        type: string
      level:
        allOf:
        - $ref: '#/definitions/forms.SupportPlanLevel'
        description: The level of the support plan. By default, the Basic plan is
          selected.
      public:
        description: Indicates whether the support plan is public. A non-public support
          plan might be subject to special contract terms and cannot be upgraded or
          downgraded.
        type: boolean
      supportPricePercentage:
        description: The prorated fee ratio for the support plan.
        type: string
      type:
        allOf:
        - $ref: '#/definitions/forms.SupportPlanType'
        description: Indicates whether the support plan is charged on a pro rata basis
          (`"percentage_price"`) or a fixed fee (`"fixed_price"`).
    type: object
  forms.SupportPlanLevel:
    enum:
    - Basic
    - Standard
    - Developer
    - Enterprise
    - Premium
    type: string
    x-enum-varnames:
    - SupportPlanLevel_Basic
    - SupportPlanLevel_Standard
    - SupportPlanLevel_Developer
    - SupportPlanLevel_Enterprise
    - SupportPlanLevel_Premium
  forms.SupportPlanType:
    enum:
    - fixed_price
    - percentage_price
    type: string
    x-enum-varnames:
    - SupportPlanType_FixedPrice
    - SupportPlanType_PercentagePrice
  forms.TaxIDType:
    enum:
    - ad_nrt
    - ae_trn
    - ar_cuit
    - au_abn
    - au_arn
    - bg_uic
    - bo_tin
    - br_cnpj
    - br_cpf
    - ca_bn
    - ca_gst_hst
    - ca_pst_bc
    - ca_pst_mb
    - ca_pst_sk
    - ca_qst
    - ch_vat
    - cl_tin
    - cn_tin
    - co_nit
    - cr_tin
    - do_rcn
    - ec_ruc
    - eg_tin
    - es_cif
    - eu_oss_vat
    - eu_vat
    - gb_vat
    - ge_vat
    - hk_br
    - hu_tin
    - id_npwp
    - il_vat
    - in_gst
    - is_vat
    - jp_cn
    - jp_rn
    - jp_trn
    - ke_pin
    - kr_brn
    - li_uid
    - mx_rfc
    - my_frp
    - my_itn
    - my_sst
    - no_vat
    - nz_gst
    - pe_ruc
    - ph_tin
    - ro_tin
    - rs_pib
    - ru_inn
    - ru_kpp
    - sa_vat
    - sg_gst
    - sg_uen
    - si_tin
    - sv_nit
    - th_vat
    - tr_tin
    - tw_vat
    - ua_vat
    - us_ein
    - uy_ruc
    - ve_rif
    - vn_tin
    - za_vat
    type: string
    x-enum-varnames:
    - TaxIdType_AdNrt
    - TaxIdType_AeTrn
    - TaxIdType_ArCuit
    - TaxIdType_AuAbn
    - TaxIdType_AuArn
    - TaxIdType_BgUic
    - TaxIdType_BoTin
    - TaxIdType_BrCnpj
    - TaxIdType_BrCpf
    - TaxIdType_CaBn
    - TaxIdType_CaGstHst
    - TaxIdType_CaPstBc
    - TaxIdType_CaPstMb
    - TaxIdType_CaPstSk
    - TaxIdType_CaQst
    - TaxIdType_ChVat
    - TaxIdType_ClTin
    - TaxIdType_CnTin
    - TaxIdType_CoNit
    - TaxIdType_CrTin
    - TaxIdType_DoRcn
    - TaxIdType_EcRuc
    - TaxIdType_EgTin
    - TaxIdType_EsCif
    - TaxIdType_EuOssVat
    - TaxIdType_EuVat
    - TaxIdType_GbVat
    - TaxIdType_GeVat
    - TaxIdType_HkBr
    - TaxIdType_HuTin
    - TaxIdType_IdNpwp
    - TaxIdType_IlVat
    - TaxIdType_InGst
    - TaxIdType_IsVat
    - TaxIdType_JpCn
    - TaxIdType_JpRn
    - TaxIdType_JpTrn
    - TaxIdType_KePin
    - TaxIdType_KrBrn
    - TaxIdType_LiUid
    - TaxIdType_MxRfc
    - TaxIdType_MyFrp
    - TaxIdType_MyItn
    - TaxIdType_MySst
    - TaxIdType_NoVat
    - TaxIdType_NzGst
    - TaxIdType_PeRuc
    - TaxIdType_PhTin
    - TaxIdType_RoTin
    - TaxIdType_RsPib
    - TaxIdType_RuInn
    - TaxIdType_RuKpp
    - TaxIdType_SaVat
    - TaxIdType_SgGst
    - TaxIdType_SgUen
    - TaxIdType_SiTin
    - TaxIdType_SvNit
    - TaxIdType_ThVat
    - TaxIdType_TrTin
    - TaxIdType_TwVat
    - TaxIdType_UaVat
    - TaxIdType_UsEin
    - TaxIdType_UyRuc
    - TaxIdType_VeRif
    - TaxIdType_VnTin
    - TaxIdType_ZaVat
  forms.TimeRange:
    properties:
      endDate:
        description: 'The end date of the time range. The time format follows the
          [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard. For example:
          `"2023-12-01T00:00:00Z"`.'
        type: string
      startDate:
        description: 'The start date of the time range. The time format follows the
          [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard. For example:
          `"2023-12-01T00:00:00Z"`.'
        type: string
    type: object
host: tcpn.tidbapi.com
info:
  contact: {}
  description: This is a billing system server for TiDB Cloud Partners.
  title: Partner OPENAPI
  version: v1beta1
paths:
  /billingProfile:
    get:
      description: This endpoint retrieves the billing profile for an organization.
      operationId: Billing_GetOrgBillingProfile
      parameters:
      - description: org_id
        in: query
        name: accessOrgId
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.BillingProfileForOpenAPI'
      summary: Get organization billing profile
      tags:
      - Partner
      - PartnerBilling
    patch:
      description: This endpoint updates the billing profile for an organization.
      operationId: Billing_UpdateOrgBillingProfile
      parameters:
      - description: org_id
        in: query
        name: accessOrgId
        required: true
        type: string
      - description: billing profile
        in: body
        name: billingProfile
        required: true
        schema:
          $ref: '#/definitions/forms.BillingProfileForOpenAPI'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.BillingProfileForOpenAPI'
      summary: Update organization billing profile
      tags:
      - Partner
      - PartnerBilling
  /bills/{billedMonth}:
    get:
      consumes:
      - application/json
      description: This endpoint retrieves the bill for the given month of a specific
        organization. You can query a bill up to 6 months prior to the current month.
        The bill is returned in JSON format.To use this resource, the requesting API
        Key must have the Organization Billing Admin or Organization Owner role.
      operationId: Billing_GetPartnerBills
      parameters:
      - description: org_id
        in: query
        name: accessOrgId
        required: true
        type: string
      - description: The month for which to retrieve the bill, in the format of `YYYY-MM`.
          For example, `2024-08`.
        in: path
        name: billedMonth
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.PartnerBillsExplorer'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/billing_errors.BaseError'
      summary: Get organization monthly bills
      tags:
      - Partner
      - PartnerBilling
  /billsCostExplorer:
    post:
      consumes:
      - application/json
      description: |-
        This endpoint executes a cost explorer query and returns the usage details. Cost explorer query:
        1. Allow users to group costs by category
        2. Allow users to focus on a specific cost item by filter
        3. Allow users to query cost in the specific time range
      operationId: Billing_PartnerTrendsOpenAPI
      parameters:
      - description: org_id
        in: query
        name: accessOrgId
        required: true
        type: string
      - description: Query arguments
        in: body
        name: args
        required: true
        schema:
          $ref: '#/definitions/forms.PartnerTrendsInput'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.PartnerBillsCostExplorer'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/billing_errors.BaseError'
      summary: Get the usage details according to a cost explorer query
      tags:
      - Partner
      - PartnerBilling
  /billsCostExplorerArgs:
    get:
      consumes:
      - application/json
      description: This endpoint retrieves the basic information for a specific organization,
        including service details, cloud provider information, project information,
        and cluster information.
      operationId: Billing_GetPartnerTrendsArgs
      parameters:
      - description: org_id
        in: query
        name: accessOrgId
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.PartnerTrendsArgs'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/billing_errors.BaseError'
      summary: Get basic information of a specific organization, which contains the
        key information to execute a cost explorer query
      tags:
      - Partner
      - PartnerBilling
  /billsDetails/{billedMonth}:
    get:
      consumes:
      - application/json
      description: This endpoint retrieves the bill for the given month of a specific
        organization with daily usage details. You can query a bill up to 6 months
        prior to the current month. The bill is returned in JSON format. To use this
        resource, the requesting API Key must have the Organization Billing Admin
        or Organization Owner role.
      operationId: Billing_GetPartnerBillsDetails
      parameters:
      - description: org_id
        in: query
        name: accessOrgId
        required: true
        type: string
      - description: The month of this bill happens for the specified organization,
          in the format of `YYYY-MM`. For example `2024-08`.
        in: path
        name: billedMonth
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.PartnerBillsDetails'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/billing_errors.BaseError'
      summary: Get the monthly bill of the organization with daily usage details
      tags:
      - Partner
      - PartnerBilling
  /boundSupportPlans:
    get:
      consumes:
      - application/json
      description: This endpoint retrieves the active support plan for an organization.
      operationId: Billing_GetOrgActiveSupportPlanForOpenAPI
      parameters:
      - description: org_id
        in: query
        name: accessOrgId
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.OrgSupportPlanForOpenAPI'
      summary: Get organization active support plan
      tags:
      - Partner
      - PartnerSupportPlan
  /budgets:
    get:
      consumes:
      - application/json
      description: This endpoint retrieves a list of budgets for an organization.
      operationId: Billing_ListOrgBudgets
      parameters:
      - description: org_id
        in: query
        name: accessOrgId
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/forms.BudgetForOpenAPI'
            type: array
      summary: List organization budgets
      tags:
      - Partner
      - PartnerBilling
    post:
      consumes:
      - application/json
      description: This endpoint creates a new budget for an organization.
      operationId: Billing_CreateBudget
      parameters:
      - description: org_id
        in: query
        name: accessOrgId
        required: true
        type: string
      - description: budget
        in: body
        name: budget
        required: true
        schema:
          $ref: '#/definitions/forms.BudgetForOpenAPI'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.BudgetForOpenAPI'
      summary: Create a budget for an organization
      tags:
      - Partner
      - PartnerBilling
  /budgets/{budgetId}:
    delete:
      consumes:
      - application/json
      description: This endpoint deletes a specific budget for an organization.
      operationId: Billing_DeleteBudget
      parameters:
      - description: org_id
        in: query
        name: accessOrgId
        required: true
        type: string
      - description: The ID of the budget to delete. You can get the budget ID from
          the response of [List organization budgets](#tag/PartnerBilling/operation/Billing_ListOrgBudgets).
        in: path
        name: budgetId
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.OKType'
      summary: Delete a budget for an organization
      tags:
      - Partner
      - PartnerBilling
    get:
      consumes:
      - application/json
      operationId: Billing_GetBudget
      parameters:
      - description: org_id
        in: query
        name: accessOrgId
        required: true
        type: string
      - description: The ID of the budget.
        in: path
        name: budgetId
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.BudgetForOpenAPI'
      summary: Get a budget
      tags:
      - Partner
      - PartnerBilling
    patch:
      consumes:
      - application/json
      operationId: Billing_UpdateBudget
      parameters:
      - description: org_id
        in: query
        name: accessOrgId
        required: true
        type: string
      - description: The ID of the budget to delete. You can get the budget ID from
          the response of [List organization budgets](#tag/PartnerBilling/operation/Billing_ListOrgBudgets).
        in: path
        name: budgetId
        required: true
        type: string
      - description: budget
        in: body
        name: budget
        required: true
        schema:
          $ref: '#/definitions/forms.BudgetForOpenAPI'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.BudgetForOpenAPI'
      summary: Update a budget for an organization
      tags:
      - Partner
      - PartnerBilling
  /credits:
    get:
      consumes:
      - application/json
      description: This endpoint retrieves a list of credits for an organization.
      operationId: Billing_ListCredits
      parameters:
      - description: org_id
        in: query
        name: accessOrgId
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/forms.CreditsForOpenAPI'
            type: array
      summary: List credits for an organization
      tags:
      - Partner
      - PartnerBilling
  /discounts:
    get:
      description: This endpoint retrieves a list of discounts available for an organization.
      operationId: Billing_ListDiscounts
      parameters:
      - description: org_id
        in: query
        name: accessOrgId
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/forms.DiscountForOpenAPI'
            type: array
      summary: List discounts for an organization
      tags:
      - Partner
      - PartnerBilling
  /partnerConfigs:
    get:
      consumes:
      - application/json
      description: This endpoint retrieves the partner configuration for a specific
        Partner.
      operationId: Billing_GetPartnerConfigs
      parameters:
      - description: org_id
        in: query
        name: accessOrgId
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.PartnerConfigs'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/billing_errors.BaseError'
      summary: Get partner configurations
      tags:
      - Partner
    patch:
      consumes:
      - application/json
      description: This endpoint retrieves the partner configuration for a specific
        Partner.
      operationId: Billing_UpdatePartnerConfigs
      parameters:
      - description: org_id
        in: query
        name: accessOrgId
        required: true
        type: string
      - description: partner_configs
        in: body
        name: partnerConfigs
        required: true
        schema:
          $ref: '#/definitions/forms.PartnerConfigs'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.PartnerConfigs'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/billing_errors.BaseError'
      summary: Update the Partner configurations for a Partner
      tags:
      - Partner
      - PartnerBilling
  /payments:
    get:
      consumes:
      - application/json
      operationId: Billing_GetPartnerPayment
      parameters:
      - description: org_id
        in: query
        name: accessOrgId
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/forms.PaymentForOpenAPI'
      summary: Get active payment method
      tags:
      - Partner
      - PartnerBilling
  /publicSupportPlans:
    get:
      consumes:
      - application/json
      operationId: Billing_ListPublicSupportPlans
      parameters:
      - description: org_id
        in: query
        name: accessOrgId
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/forms.SupportPlanForOpenAPI'
            type: array
      summary: List public support plans
      tags:
      - Partner
      - PartnerSupportPlan
swagger: "2.0"
