| Required role: | TenantReader |
| All Verbs | /api/deployments/{Id}/cost | ||
|---|---|---|---|
| All Verbs | /deployments/{Id}/cost |
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*
/**
* Get deployments costs
*/
@Api(Description="Get deployments costs")
@ApiResponse(Description="Success", IsDefaultResponse=true, ResponseType=UnitValueDto::class, StatusCode=200)
open class GetDeploymentCost : IBaseRequest, IGet, IHasId, IHasTenantName
{
/**
* The unique id of the deployment
*/
@ApiMember(DataType="string", Description="The unique id of the deployment", Format="guid", IsRequired=true, ParameterType="path")
override var id:UUID? = null
@ApiMember(DataType="string", IsRequired=true, ParameterType="header")
@Validate(Validator="NotEmpty")
override var tenantName:String? = null
/**
* By default only the current months cost are returned. Specify how many previous months should be included
*/
@ApiMember(DataType="int", Description="By default only the current months cost are returned. Specify how many previous months should be included", ParameterType="query")
@Validate(Validator="InclusiveBetween(0,14)")
open var includePreviousMonths:Int? = null
}
open class ItemsResponse<T>
{
open var items:IList<VariableDto>? = null
open var offset:Int? = null
open var total:Int? = null
open var isGrouped:Boolean? = null
open var responseStatus:ResponseStatus? = null
open var meta:HashMap<String,String>? = null
}
open class VariableDto
{
open var name:String? = null
/**
* Value in form of a json string (e.g. Number = 1234, String = "foo", Boolean = false, List = [1,2,3,4]). Note: string values need extra quotes
*/
open var value:String? = null
/**
* The data type of the value property
*/
@SerializedName("type") open var Type:ValueDataType? = null
open var description:String? = null
open var isInherited:Boolean? = null
open var environment:Environments? = null
}
enum class ValueDataType
{
String,
Number,
Boolean,
List,
}
enum class Environments
{
Lab,
Poc,
Dev,
Test,
Int,
Uat,
Prod,
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/deployments/{Id}/cost HTTP/1.1
Host: core.starburst.svc
Accept: application/json
Content-Type: application/json
Content-Length: length
{"id":"00000000-0000-0000-0000-000000000000","tenantName":"String","includePreviousMonths":0,"txId":"00000000-0000-0000-0000-000000000000"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"items":null,"offset":0,"total":0,"isGrouped":false,"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"meta":{"String":"String"}}