Skip to content

Commit 16f5c30

Browse files
[codegen] 7.x synchronization (#5561)
Co-authored-by: stevejgordon <stevejgordon@users.noreply.github.com>
1 parent 737372f commit 16f5c30

File tree

7 files changed

+410
-0
lines changed

7 files changed

+410
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"security.clear_cached_service_tokens":{
3+
"documentation":{
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-service-token-caches.html",
5+
"description":"Evicts tokens from the service account token caches."
6+
},
7+
"stability":"beta",
8+
"visibility":"public",
9+
"headers":{
10+
"accept": [ "application/json"]
11+
},
12+
"url":{
13+
"paths":[
14+
{
15+
"path":"/_security/service/{namespace}/{service}/credential/token/{name}/_clear_cache",
16+
"methods":[
17+
"POST"
18+
],
19+
"parts":{
20+
"namespace":{
21+
"type":"string",
22+
"description":"An identifier for the namespace"
23+
},
24+
"service":{
25+
"type":"string",
26+
"description":"An identifier for the service name"
27+
},
28+
"name":{
29+
"type":"list",
30+
"description":"A comma-separated list of service token names"
31+
}
32+
}
33+
}
34+
]
35+
},
36+
"params":{}
37+
}
38+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"security.create_service_token":{
3+
"documentation":{
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html",
5+
"description":"Creates a service account token for access without requiring basic authentication."
6+
},
7+
"stability":"beta",
8+
"visibility":"public",
9+
"headers":{
10+
"accept": [ "application/json"]
11+
},
12+
"url":{
13+
"paths":[
14+
{
15+
"path":"/_security/service/{namespace}/{service}/credential/token/{name}",
16+
"methods":[
17+
"PUT",
18+
"POST"
19+
],
20+
"parts":{
21+
"namespace":{
22+
"type":"string",
23+
"description":"An identifier for the namespace"
24+
},
25+
"service":{
26+
"type":"string",
27+
"description":"An identifier for the service name"
28+
},
29+
"name":{
30+
"type":"string",
31+
"description":"An identifier for the token name"
32+
}
33+
}
34+
},
35+
{
36+
"path":"/_security/service/{namespace}/{service}/credential/token",
37+
"methods":[
38+
"POST"
39+
],
40+
"parts":{
41+
"namespace":{
42+
"type":"string",
43+
"description":"An identifier for the namespace"
44+
},
45+
"service":{
46+
"type":"string",
47+
"description":"An identifier for the service name"
48+
}
49+
}
50+
}
51+
]
52+
},
53+
"params":{
54+
"refresh":{
55+
"type":"enum",
56+
"options":[
57+
"true",
58+
"false",
59+
"wait_for"
60+
],
61+
"description":"If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes."
62+
}
63+
}
64+
}
65+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"security.delete_service_token":{
3+
"documentation":{
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-service-token.html",
5+
"description":"Deletes a service account token."
6+
},
7+
"stability":"beta",
8+
"visibility":"public",
9+
"headers":{
10+
"accept": [ "application/json"]
11+
},
12+
"url":{
13+
"paths":[
14+
{
15+
"path":"/_security/service/{namespace}/{service}/credential/token/{name}",
16+
"methods":[
17+
"DELETE"
18+
],
19+
"parts":{
20+
"namespace":{
21+
"type":"string",
22+
"description":"An identifier for the namespace"
23+
},
24+
"service":{
25+
"type":"string",
26+
"description":"An identifier for the service name"
27+
},
28+
"name":{
29+
"type":"string",
30+
"description":"An identifier for the token name"
31+
}
32+
}
33+
}
34+
]
35+
},
36+
"params":{
37+
"refresh":{
38+
"type":"enum",
39+
"options":[
40+
"true",
41+
"false",
42+
"wait_for"
43+
],
44+
"description":"If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes."
45+
}
46+
}
47+
}
48+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"security.get_service_accounts":{
3+
"documentation":{
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-accounts.html",
5+
"description":"Retrieves information about service accounts."
6+
},
7+
"stability":"beta",
8+
"visibility":"public",
9+
"headers":{
10+
"accept": [ "application/json"]
11+
},
12+
"url":{
13+
"paths":[
14+
{
15+
"path":"/_security/service/{namespace}/{service}",
16+
"methods":[
17+
"GET"
18+
],
19+
"parts":{
20+
"namespace":{
21+
"type":"string",
22+
"description":"An identifier for the namespace"
23+
},
24+
"service":{
25+
"type":"string",
26+
"description":"An identifier for the service name"
27+
}
28+
}
29+
},
30+
{
31+
"path":"/_security/service/{namespace}",
32+
"methods":[
33+
"GET"
34+
],
35+
"parts":{
36+
"namespace":{
37+
"type":"string",
38+
"description":"An identifier for the namespace"
39+
}
40+
}
41+
},
42+
{
43+
"path":"/_security/service",
44+
"methods":[
45+
"GET"
46+
]
47+
}
48+
]
49+
},
50+
"params":{}
51+
}
52+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"security.get_service_credentials":{
3+
"documentation":{
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-credentials.html",
5+
"description":"Retrieves information of all service credentials for a service account."
6+
},
7+
"stability":"beta",
8+
"visibility":"public",
9+
"headers":{
10+
"accept": [ "application/json"]
11+
},
12+
"url":{
13+
"paths":[
14+
{
15+
"path":"/_security/service/{namespace}/{service}/credential",
16+
"methods":[
17+
"GET"
18+
],
19+
"parts":{
20+
"namespace":{
21+
"type":"string",
22+
"description":"An identifier for the namespace"
23+
},
24+
"service":{
25+
"type":"string",
26+
"description":"An identifier for the service name"
27+
}
28+
}
29+
}
30+
]
31+
},
32+
"params":{}
33+
}
34+
}

src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Security.cs

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,13 @@ public class ClearCachedRolesRequestParameters : RequestParameters<ClearCachedRo
8181
public override bool SupportsBody => false;
8282
}
8383

84+
///<summary>Request options for ClearCachedServiceTokens <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-service-token-caches.html</para></summary>
85+
public class ClearCachedServiceTokensRequestParameters : RequestParameters<ClearCachedServiceTokensRequestParameters>
86+
{
87+
public override HttpMethod DefaultHttpMethod => HttpMethod.POST;
88+
public override bool SupportsBody => false;
89+
}
90+
8491
///<summary>Request options for CreateApiKey <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html</para></summary>
8592
public class CreateApiKeyRequestParameters : RequestParameters<CreateApiKeyRequestParameters>
8693
{
@@ -97,6 +104,22 @@ public Refresh? Refresh
97104
}
98105
}
99106

107+
///<summary>Request options for CreateServiceToken <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html</para></summary>
108+
public class CreateServiceTokenRequestParameters : RequestParameters<CreateServiceTokenRequestParameters>
109+
{
110+
public override HttpMethod DefaultHttpMethod => HttpMethod.PUT;
111+
public override bool SupportsBody => false;
112+
///<summary>
113+
/// If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh
114+
/// to make this operation visible to search, if `false` then do nothing with refreshes.
115+
///</summary>
116+
public Refresh? Refresh
117+
{
118+
get => Q<Refresh? >("refresh");
119+
set => Q("refresh", value);
120+
}
121+
}
122+
100123
///<summary>Request options for DeletePrivileges <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-privilege.html</para></summary>
101124
public class DeletePrivilegesRequestParameters : RequestParameters<DeletePrivilegesRequestParameters>
102125
{
@@ -145,6 +168,22 @@ public Refresh? Refresh
145168
}
146169
}
147170

171+
///<summary>Request options for DeleteServiceToken <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-service-token.html</para></summary>
172+
public class DeleteServiceTokenRequestParameters : RequestParameters<DeleteServiceTokenRequestParameters>
173+
{
174+
public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE;
175+
public override bool SupportsBody => false;
176+
///<summary>
177+
/// If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh
178+
/// to make this operation visible to search, if `false` then do nothing with refreshes.
179+
///</summary>
180+
public Refresh? Refresh
181+
{
182+
get => Q<Refresh? >("refresh");
183+
set => Q("refresh", value);
184+
}
185+
}
186+
148187
///<summary>Request options for DeleteUser <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html</para></summary>
149188
public class DeleteUserRequestParameters : RequestParameters<DeleteUserRequestParameters>
150189
{
@@ -262,6 +301,20 @@ public class GetRoleMappingRequestParameters : RequestParameters<GetRoleMappingR
262301
public override bool SupportsBody => false;
263302
}
264303

304+
///<summary>Request options for GetServiceAccounts <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-accounts.html</para></summary>
305+
public class GetServiceAccountsRequestParameters : RequestParameters<GetServiceAccountsRequestParameters>
306+
{
307+
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
308+
public override bool SupportsBody => false;
309+
}
310+
311+
///<summary>Request options for GetServiceCredentials <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-credentials.html</para></summary>
312+
public class GetServiceCredentialsRequestParameters : RequestParameters<GetServiceCredentialsRequestParameters>
313+
{
314+
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
315+
public override bool SupportsBody => false;
316+
}
317+
265318
///<summary>Request options for GetUserAccessToken <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html</para></summary>
266319
public class GetUserAccessTokenRequestParameters : RequestParameters<GetUserAccessTokenRequestParameters>
267320
{

0 commit comments

Comments
 (0)