File

src/cost/dto/update-cost-endpoint.dto.ts

Description

Data Transfer Object to update Cost Endpoints in Turo

Index

Properties

Properties

Optional config
Type : KubecostConfig | AWSConfig | AzureConfig
Decorators :
@ApiProperty()
@ValidateNested({each: true})
@IsOptional()
Optional endpointType
Type : string
Decorators :
@ApiProperty()
@IsString()
@IsOptional()

Endpoint type eg: kubecost

Optional label
Type : string
Decorators :
@ApiProperty()
@IsString()
@IsOptional()

Label to be used by endpoint's internal query API to fetch raw data eg: app:traefik

Optional name
Type : string
Decorators :
@ApiProperty()
@IsString()
@IsOptional()
Optional projectID
Type : number
Decorators :
@ApiProperty()
@IsNumber()
@IsOptional()

Project ID

Optional syncState
Type : string
Decorators :
@ApiProperty()
@IsString()
@IsOptional()

Sync state of the endpoint

import { AWSConfig } from "../../providers/aws/aws.types";
import { KubecostConfig } from "../../providers/kubecost/kubecost.types";
import { ApiProperty } from "@nestjs/swagger";
import {
  IsNumber,
  IsOptional,
  IsString,
  ValidateNested,
} from "class-validator";
import { AzureConfig } from "../../providers/azure/azure.types";

/**
 * Data Transfer Object to update Cost Endpoints in Turo
 */
export class UpdateCostEndpointDto {
  @ApiProperty()
  @IsString()
  @IsOptional()
  name?: string;

  /**
   * Project ID
   */
  @ApiProperty()
  @IsNumber()
  @IsOptional()
  projectID?: number;

  @ApiProperty()
  @ValidateNested({ each: true })
  @IsOptional()
  config?: KubecostConfig | AWSConfig | AzureConfig;

  /**
   * Endpoint type eg: kubecost
   */
  @ApiProperty()
  @IsString()
  @IsOptional()
  endpointType?: string;

  /**
   * Label to be used by endpoint's
   * internal query API to fetch raw data
   * eg: app:traefik
   */
  @ApiProperty()
  @IsString()
  @IsOptional()
  label?: string;

  /**
   * Sync state of the endpoint
   */
  @ApiProperty()
  @IsString()
  @IsOptional()
  syncState?: string;
}

results matching ""

    No results matching ""