-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Expand file tree
/
Copy pathNginxConfigurationResponse.tsp
More file actions
85 lines (77 loc) · 2.22 KB
/
Copy pathNginxConfigurationResponse.tsp
File metadata and controls
85 lines (77 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "@typespec/rest";
import "./models.tsp";
import "./NginxDeployment.tsp";
using TypeSpec.Rest;
using Azure.ResourceManager;
using TypeSpec.Http;
using TypeSpec.OpenAPI;
namespace Nginx.NginxPlus;
/**
* Nginx Configuration Response
*/
@parentResource(NginxDeployment)
model NginxConfigurationResponse
is Azure.ResourceManager.ProxyResource<NginxConfigurationResponseProperties> {
...ResourceNameParameter<
Resource = NginxConfigurationResponse,
KeyName = "configurationName",
SegmentName = "configurations",
NamePattern = "^[a-z][a-z0-9]*$"
>;
}
@armResourceOperations
interface NginxConfigurationResponses {
/**
* Get the NGINX configuration of given NGINX deployment
*/
get is ArmResourceRead<NginxConfigurationResponse>;
/**
* Create or update the NGINX configuration for given NGINX deployment
*/
createOrUpdate is Azure.ResourceManager.Legacy.Extension.CreateOrUpdateAsync<
Extension.ResourceGroup,
NginxConfigurationResponse,
NginxConfigurationRequest,
OptionalRequestBody = true
>;
/**
* Reset the NGINX configuration of given NGINX deployment to default
*/
delete is ArmResourceDeleteWithoutOkAsync<NginxConfigurationResponse>;
/**
* List the NGINX configuration of given NGINX deployment.
*/
list is ArmResourceListByParent<
NginxConfigurationResponse,
Response = ArmResponse<NginxConfigurationListResponse>
>;
/**
* Analyze an NGINX configuration without applying it to the NGINXaaS deployment
*/
@action("analyze")
analysis is ArmResourceActionSync<
NginxConfigurationResponse,
AnalysisCreate,
ArmResponse<AnalysisResult>,
OptionalRequestBody = true
>;
}
@@doc(
NginxConfigurationResponse.name,
"The name of configuration, only 'default' is supported value due to the singleton of NGINX conf"
);
@@doc(
NginxConfigurationResponse.properties,
"Nginx Configuration Response Properties"
);
@@doc(
NginxConfigurationResponses.createOrUpdate::parameters.resource,
"The NGINX configuration"
);
@@doc(
NginxConfigurationResponses.analysis::parameters.body,
"The NGINX configuration to analyze"
);