> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vantage.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Create virtual tag config value

> Create a VirtualTagConfigValue.



## OpenAPI

````yaml https://api.vantage.sh/v2/oas_v3.json post /virtual_tag_configs/{virtual_tag_config_token}/values
openapi: 3.0.1
info:
  title: Vantage
  description: Vantage API
  termsOfService: https://www.vantage.sh/terms-of-use
  contact:
    name: Vantage Support
    url: https://www.vantage.sh
    email: support@vantage.sh
  version: 2.0.0
servers:
  - url: https://api.vantage.sh/v2
security:
  - oauth2:
      - read
tags:
  - name: AccessGrants
    description: Operations about AccessGrants
  - name: AnomalyAlerts
    description: Operations about AnomalyAlerts
  - name: AnomalyNotifications
    description: Operations about AnomalyNotifications
  - name: AuditLogs
    description: Operations about AuditLogs
  - name: BillingProfiles
    description: Operations about BillingProfiles
  - name: BillingRules
    description: Operations about BillingRules
  - name: BudgetAlerts
    description: Operations about BudgetAlerts
  - name: Budgets
    description: Operations about Budgets
  - name: BusinessMetrics
    description: Operations about BusinessMetrics
  - name: Canvases
    description: Operations about Canvases
  - name: CostAlertEvents
    description: Operations about CostAlertEvents
  - name: CostAlerts
    description: Operations about CostAlerts
  - name: CostProvider
    description: Operations about CostProviders
  - name: CostProviderAccounts
    description: Operations about CostProviderAccounts
  - name: Costs
    description: Operations about Costs
  - name: CostService
    description: Operations about CostServices
  - name: Dashboards
    description: Operations about Dashboards
  - name: DataExports
    description: Operations about DataExports
  - name: ExchangeRates
    description: Operations about ExchangeRates
  - name: FinancialCommitmentReports
    description: Operations about FinancialCommitmentReports
  - name: FinancialCommitments
    description: Operations about FinancialCommitments
  - name: Folders
    description: Operations about Folders
  - name: Integrations
    description: Operations about Integrations
  - name: Invoices
    description: Operations about Invoices
  - name: KubernetesEfficiencyReports
    description: Operations about KubernetesEfficiencyReports
  - name: ManagedAccounts
    description: Operations about ManagedAccounts
  - name: Me
    description: Operations about Mes
  - name: NetworkFlowLogs
    description: Operations about NetworkFlowLogs
  - name: NetworkFlowReports
    description: Operations about NetworkFlowReports
  - name: OpenAPISpecification
    description: Operations about OpenAPISpecifications
  - name: Ping
    description: Operations about Pings
  - name: Prices
    description: Operations about Prices
  - name: Recommendations
    description: Operations about Recommendations
  - name: RecommendationViews
    description: Operations about RecommendationViews
  - name: ReportForecasts
    description: Operations about ReportForecasts
  - name: ReportNotifications
    description: Operations about ReportNotifications
  - name: ResourceReports
    description: Operations about ResourceReports
  - name: Resources
    description: Operations about Resources
  - name: SavedFilters
    description: Operations about SavedFilters
  - name: ScenarioModels
    description: Operations about ScenarioModels
  - name: Segments
    description: Operations about Segments
  - name: Tags
    description: Operations about Tags
  - name: Teams
    description: Operations about Teams
  - name: UnitCosts
    description: Operations about UnitCosts
  - name: UserFeedback
    description: Operations about UserFeedbacks
  - name: Users
    description: Operations about Users
  - name: VirtualTags
    description: Operations about VirtualTags
  - name: Workspaces
    description: Operations about Workspaces
paths:
  /virtual_tag_configs/{virtual_tag_config_token}/values:
    post:
      tags:
        - VirtualTags
      summary: Create virtual tag config value
      description: Create a VirtualTagConfigValue.
      operationId: createVirtualTagConfigValue
      parameters:
        - name: virtual_tag_config_token
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/createVirtualTagConfigValue'
        required: true
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualTagConfigValue'
              example:
                token: vtag_val_d104b11fc34ef7f3
                filter: costs.provider = 'aws'
                name: First
                label_transforms: []
                percentages: []
                date_ranges: []
        '400':
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
        '404':
          description: NotFound
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
        '422':
          description: UnprocessableEntity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      security:
        - oauth2:
            - write
components:
  schemas:
    createVirtualTagConfigValue:
      required:
        - filter
      type: object
      properties:
        filter:
          type: string
          description: >-
            The filter query language to apply to the value. Additional
            documentation available at https://docs.vantage.sh/vql.
        name:
          type: string
          description: The name of the value.
        business_metric_token:
          type: string
          description: The token of an associated business metric.
        label_key:
          type: string
          description: The business metric label key used for this virtual tag value.
        label_values:
          type: array
          description: >-
            Business metric label values. An empty array includes every value
            for the label key.
          items:
            type: string
          x-omitempty: true
        display_name:
          type: string
          description: The display name for a cost metric or percentage allocation value.
          nullable: true
        label_transforms:
          type: array
          items:
            required:
              - type
            type: object
            properties:
              type:
                type: string
                enum:
                  - split
                  - format
              delimiter:
                type: string
                nullable: true
              index:
                type: integer
                format: int32
                nullable: true
              template:
                type: string
                nullable: true
          x-omitempty: true
        cost_metric:
          required:
            - aggregation
            - filter
          type: object
          properties:
            filter:
              type: string
            aggregation:
              required:
                - tag
              type: object
              properties:
                tag:
                  type: string
        percentages:
          type: array
          items:
            required:
              - pct
              - value
            type: object
            properties:
              value:
                type: string
              pct:
                type: number
                format: float
          x-omitempty: true
        date_ranges:
          type: array
          description: Date ranges restricting when this value applies.
          items:
            type: object
            properties:
              start_date:
                type: string
                nullable: true
              end_date:
                type: string
                nullable: true
          x-omitempty: true
      description: Create a VirtualTagConfigValue.
    VirtualTagConfigValue:
      required:
        - date_ranges
        - filter
        - label_transforms
        - percentages
        - token
      type: object
      properties:
        token:
          type: string
          description: The token of the Value.
          nullable: false
          example: vtag_val_1234
        filter:
          type: string
          description: The filter VQL for the Value.
          nullable: true
          example: >-
            costs.provider = 'aws' AND costs.service = 'Amazon Simple Storage
            Service'
        name:
          type: string
          description: The name of the Value.
          nullable: true
          example: Informatics
        business_metric_token:
          type: string
          description: The token of the associated BusinessMetric.
          nullable: true
          example: bsnss_mtrc_abc123
        label_key:
          type: string
          description: The business metric label key used for this virtual tag value.
          nullable: true
        label_values:
          type: array
          description: >-
            Optional business metric label values. An empty array includes every
            value for the label key.
          nullable: true
          items:
            type: string
        cost_metric:
          $ref: '#/components/schemas/VirtualTagConfigValueCostMetric'
        display_name:
          type: string
          description: The display name for this allocation value.
          nullable: true
        label_transforms:
          type: array
          description: Label transforms applied to business metric labels.
          items:
            $ref: '#/components/schemas/VirtualTagConfigValueLabelTransform'
        percentages:
          type: array
          description: Labeled percentage allocations for matching costs.
          items:
            $ref: '#/components/schemas/VirtualTagConfigValuePercentage'
        date_ranges:
          type: array
          description: Date ranges restricting when this value applies.
          items:
            $ref: '#/components/schemas/VirtualTagConfigValueDateRange'
      description: VirtualTagConfigValue model
    Errors:
      required:
        - errors
      type: object
      properties:
        links:
          $ref: '#/components/schemas/Links'
        errors:
          type: array
          nullable: false
          items:
            type: string
      description: Errors model
    VirtualTagConfigValueCostMetric:
      required:
        - aggregation
        - filter
      type: object
      properties:
        filter:
          type: string
          description: The filter VQL for the cost metric.
          nullable: true
        aggregation:
          $ref: '#/components/schemas/VirtualTagConfigValueCostMetricAggregation'
    VirtualTagConfigValueLabelTransform:
      required:
        - type
      type: object
      properties:
        type:
          type: string
          description: The label transform type.
          nullable: false
          enum:
            - split
            - format
        delimiter:
          type: string
          description: Delimiter used by split transforms.
          nullable: true
        index:
          type: integer
          description: Zero-based index used by split transforms.
          format: int32
          nullable: true
        template:
          type: string
          description: Template used by format transforms.
          nullable: true
    VirtualTagConfigValuePercentage:
      required:
        - pct
        - value
      type: object
      properties:
        value:
          type: string
          description: The tag value associated with a percentage of matched costs.
          nullable: false
          example: cost-center-a
        pct:
          type: number
          description: The percentage of matched costs associated with the value.
          nullable: false
          example: 50
    VirtualTagConfigValueDateRange:
      required:
        - end_date
        - start_date
      type: object
      properties:
        start_date:
          type: string
          description: The start date of the range (inclusive), or null for unbounded.
          nullable: true
        end_date:
          type: string
          description: The end date of the range (inclusive), or null for unbounded.
          nullable: true
    Links:
      type: object
      properties:
        self:
          type: string
          description: The URL of the current page of results.
          nullable: true
        first:
          type: string
          description: The URL of the first page of results.
          nullable: true
        next:
          type: string
          description: The URL of the next page of results, if one exists.
          nullable: true
        last:
          type: string
          description: The URL of the last page of results, if one exists.
          nullable: true
        prev:
          type: string
          description: The URL of the previous page of results, if one exists.
          nullable: true
    VirtualTagConfigValueCostMetricAggregation:
      type: object
      properties:
        tag:
          type: string
          description: The tag to aggregate on.
          nullable: true
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://console.vantage.sh/account/profile
          scopes:
            read: Grants read access
            write: Grants write access

````