| Required role: | TenantReader |
| PATCH | /api/deployments/generation/name | Generate deployment name with the user defined part | |
|---|---|---|---|
| PATCH | /deployments/generation/name | Generate deployment name with the user defined part |
namespace CoreService.ServiceModel.Dtos.Deployments.Crud
open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
type Environments =
| Lab = 0
| Poc = 1
| Dev = 2
| Test = 3
| Int = 4
| Uat = 5
| Prod = 6
///<summary>
///Generate deployment name with the user defined part
///</summary>
[<Api(Description="Generate deployment name with the user defined part")>]
[<ApiResponse(Description="Success", IsDefaultResponse=true, ResponseType=typeof<String>, StatusCode=200)>]
[<AllowNullLiteral>]
type GenerateDeploymentName() =
interface IPatch
[<ApiMember(DataType="string", IsRequired=true, ParameterType="header")>]
[<Validate(Validator="NotEmpty")>]
member val TenantName:String = null with get,set
///<summary>
///User defined/custom part of the name
///</summary>
[<ApiMember(DataType="string", Description="User defined/custom part of the name", IsRequired=true, ParameterType="body")>]
[<Validate(Validator="NotEmpty")>]
[<Validate(Validator="MaximumLength(100)")>]
[<Validate(Validator="RegularExpression(′^[0-9a-z]+[0-9a-z-]*[0-9a-z]+$′)")>]
member val UserDefinedPart:String = null with get,set
///<summary>
///What kind of environment is this deployment
///</summary>
[<ApiMember(Description="What kind of environment is this deployment", IsRequired=true, ParameterType="body")>]
member val Environment:Environments = new Environments() with get,set
F# GenerateDeploymentName DTOs
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.
PATCH /api/deployments/generation/name HTTP/1.1
Host: core.starburst.svc
Accept: application/json
Content-Type: application/json
Content-Length: length
{"tenantName":"String","userDefinedPart":"String","environment":"Lab","txId":"00000000-0000-0000-0000-000000000000"}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length (string)