diff --git a/src/ApiGenerator/RestSpecification/Core/security.clear_cached_service_tokens.json b/src/ApiGenerator/RestSpecification/Core/security.clear_cached_service_tokens.json new file mode 100644 index 00000000000..3692461f740 --- /dev/null +++ b/src/ApiGenerator/RestSpecification/Core/security.clear_cached_service_tokens.json @@ -0,0 +1,38 @@ +{ + "security.clear_cached_service_tokens":{ + "documentation":{ + "url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-service-token-caches.html", + "description":"Evicts tokens from the service account token caches." + }, + "stability":"beta", + "visibility":"public", + "headers":{ + "accept": [ "application/json"] + }, + "url":{ + "paths":[ + { + "path":"/_security/service/{namespace}/{service}/credential/token/{name}/_clear_cache", + "methods":[ + "POST" + ], + "parts":{ + "namespace":{ + "type":"string", + "description":"An identifier for the namespace" + }, + "service":{ + "type":"string", + "description":"An identifier for the service name" + }, + "name":{ + "type":"list", + "description":"A comma-separated list of service token names" + } + } + } + ] + }, + "params":{} + } +} diff --git a/src/ApiGenerator/RestSpecification/Core/security.create_service_token.json b/src/ApiGenerator/RestSpecification/Core/security.create_service_token.json new file mode 100644 index 00000000000..e9d18b5d955 --- /dev/null +++ b/src/ApiGenerator/RestSpecification/Core/security.create_service_token.json @@ -0,0 +1,65 @@ +{ + "security.create_service_token":{ + "documentation":{ + "url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html", + "description":"Creates a service account token for access without requiring basic authentication." + }, + "stability":"beta", + "visibility":"public", + "headers":{ + "accept": [ "application/json"] + }, + "url":{ + "paths":[ + { + "path":"/_security/service/{namespace}/{service}/credential/token/{name}", + "methods":[ + "PUT", + "POST" + ], + "parts":{ + "namespace":{ + "type":"string", + "description":"An identifier for the namespace" + }, + "service":{ + "type":"string", + "description":"An identifier for the service name" + }, + "name":{ + "type":"string", + "description":"An identifier for the token name" + } + } + }, + { + "path":"/_security/service/{namespace}/{service}/credential/token", + "methods":[ + "POST" + ], + "parts":{ + "namespace":{ + "type":"string", + "description":"An identifier for the namespace" + }, + "service":{ + "type":"string", + "description":"An identifier for the service name" + } + } + } + ] + }, + "params":{ + "refresh":{ + "type":"enum", + "options":[ + "true", + "false", + "wait_for" + ], + "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." + } + } + } +} diff --git a/src/ApiGenerator/RestSpecification/Core/security.delete_service_token.json b/src/ApiGenerator/RestSpecification/Core/security.delete_service_token.json new file mode 100644 index 00000000000..5d865a3c231 --- /dev/null +++ b/src/ApiGenerator/RestSpecification/Core/security.delete_service_token.json @@ -0,0 +1,48 @@ +{ + "security.delete_service_token":{ + "documentation":{ + "url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-service-token.html", + "description":"Deletes a service account token." + }, + "stability":"beta", + "visibility":"public", + "headers":{ + "accept": [ "application/json"] + }, + "url":{ + "paths":[ + { + "path":"/_security/service/{namespace}/{service}/credential/token/{name}", + "methods":[ + "DELETE" + ], + "parts":{ + "namespace":{ + "type":"string", + "description":"An identifier for the namespace" + }, + "service":{ + "type":"string", + "description":"An identifier for the service name" + }, + "name":{ + "type":"string", + "description":"An identifier for the token name" + } + } + } + ] + }, + "params":{ + "refresh":{ + "type":"enum", + "options":[ + "true", + "false", + "wait_for" + ], + "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." + } + } + } +} diff --git a/src/ApiGenerator/RestSpecification/Core/security.get_service_accounts.json b/src/ApiGenerator/RestSpecification/Core/security.get_service_accounts.json new file mode 100644 index 00000000000..1a7ebb7e3cf --- /dev/null +++ b/src/ApiGenerator/RestSpecification/Core/security.get_service_accounts.json @@ -0,0 +1,52 @@ +{ + "security.get_service_accounts":{ + "documentation":{ + "url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-accounts.html", + "description":"Retrieves information about service accounts." + }, + "stability":"beta", + "visibility":"public", + "headers":{ + "accept": [ "application/json"] + }, + "url":{ + "paths":[ + { + "path":"/_security/service/{namespace}/{service}", + "methods":[ + "GET" + ], + "parts":{ + "namespace":{ + "type":"string", + "description":"An identifier for the namespace" + }, + "service":{ + "type":"string", + "description":"An identifier for the service name" + } + } + }, + { + "path":"/_security/service/{namespace}", + "methods":[ + "GET" + ], + "parts":{ + "namespace":{ + "type":"string", + "description":"An identifier for the namespace" + } + } + }, + { + "path":"/_security/service", + "methods":[ + "GET" + ] + } + ] + }, + "params":{} + } +} diff --git a/src/ApiGenerator/RestSpecification/Core/security.get_service_credentials.json b/src/ApiGenerator/RestSpecification/Core/security.get_service_credentials.json new file mode 100644 index 00000000000..6753425be06 --- /dev/null +++ b/src/ApiGenerator/RestSpecification/Core/security.get_service_credentials.json @@ -0,0 +1,34 @@ +{ + "security.get_service_credentials":{ + "documentation":{ + "url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-credentials.html", + "description":"Retrieves information of all service credentials for a service account." + }, + "stability":"beta", + "visibility":"public", + "headers":{ + "accept": [ "application/json"] + }, + "url":{ + "paths":[ + { + "path":"/_security/service/{namespace}/{service}/credential", + "methods":[ + "GET" + ], + "parts":{ + "namespace":{ + "type":"string", + "description":"An identifier for the namespace" + }, + "service":{ + "type":"string", + "description":"An identifier for the service name" + } + } + } + ] + }, + "params":{} + } +} diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Security.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Security.cs index f419bb6c048..99a75786b28 100644 --- a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Security.cs +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Security.cs @@ -81,6 +81,13 @@ public class ClearCachedRolesRequestParameters : RequestParameters false; } + ///Request options for ClearCachedServiceTokens https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-service-token-caches.html + public class ClearCachedServiceTokensRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => false; + } + ///Request options for CreateApiKey https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html public class CreateApiKeyRequestParameters : RequestParameters { @@ -97,6 +104,22 @@ public Refresh? Refresh } } + ///Request options for CreateServiceToken https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html + public class CreateServiceTokenRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; + public override bool SupportsBody => false; + /// + /// 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. + /// + public Refresh? Refresh + { + get => Q("refresh"); + set => Q("refresh", value); + } + } + ///Request options for DeletePrivileges https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-privilege.html public class DeletePrivilegesRequestParameters : RequestParameters { @@ -145,6 +168,22 @@ public Refresh? Refresh } } + ///Request options for DeleteServiceToken https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-service-token.html + public class DeleteServiceTokenRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; + public override bool SupportsBody => false; + /// + /// 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. + /// + public Refresh? Refresh + { + get => Q("refresh"); + set => Q("refresh", value); + } + } + ///Request options for DeleteUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html public class DeleteUserRequestParameters : RequestParameters { @@ -262,6 +301,20 @@ public class GetRoleMappingRequestParameters : RequestParameters false; } + ///Request options for GetServiceAccounts https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-accounts.html + public class GetServiceAccountsRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + + ///Request options for GetServiceCredentials https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-credentials.html + public class GetServiceCredentialsRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.GET; + public override bool SupportsBody => false; + } + ///Request options for GetUserAccessToken https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html public class GetUserAccessTokenRequestParameters : RequestParameters { diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Security.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Security.cs index fa094597934..d874eb1382a 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.Security.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Security.cs @@ -129,6 +129,23 @@ public TResponse ClearCachedRoles(string name, ClearCachedRolesReques [MapsApi("security.clear_cached_roles", "name")] public Task ClearCachedRolesAsync(string name, ClearCachedRolesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_security/role/{name:name}/_clear_cache"), ctx, null, RequestParams(requestParameters)); + ///POST on /_security/service/{namespace}/{service}/credential/token/{name}/_clear_cache https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-service-token-caches.html + ///An identifier for the namespace + ///An identifier for the service name + ///A comma-separated list of service token names + ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Beta within the Elasticsearch server, this functionality is in Beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. + public TResponse ClearCachedServiceTokens(string @namespace, string service, string name, ClearCachedServiceTokensRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"_security/service/{@namespace:namespace}/{service:service}/credential/token/{name:name}/_clear_cache"), null, RequestParams(requestParameters)); + ///POST on /_security/service/{namespace}/{service}/credential/token/{name}/_clear_cache https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-service-token-caches.html + ///An identifier for the namespace + ///An identifier for the service name + ///A comma-separated list of service token names + ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Beta within the Elasticsearch server, this functionality is in Beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. + [MapsApi("security.clear_cached_service_tokens", "namespace, service, name")] + public Task ClearCachedServiceTokensAsync(string @namespace, string service, string name, ClearCachedServiceTokensRequestParameters requestParameters = null, CancellationToken ctx = default) + where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_security/service/{@namespace:namespace}/{service:service}/credential/token/{name:name}/_clear_cache"), ctx, null, RequestParams(requestParameters)); ///PUT on /_security/api_key https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html ///The api key request to create an API key ///Request specific configuration such as querystring parameters & request specific connection settings. @@ -140,6 +157,38 @@ public TResponse CreateApiKey(PostData body, CreateApiKeyRequestParam [MapsApi("security.create_api_key", "body")] public Task CreateApiKeyAsync(PostData body, CreateApiKeyRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, "_security/api_key", ctx, body, RequestParams(requestParameters)); + ///PUT on /_security/service/{namespace}/{service}/credential/token/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html + ///An identifier for the namespace + ///An identifier for the service name + ///An identifier for the token name + ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Beta within the Elasticsearch server, this functionality is in Beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. + public TResponse CreateServiceToken(string @namespace, string service, string name, CreateServiceTokenRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => DoRequest(PUT, Url($"_security/service/{@namespace:namespace}/{service:service}/credential/token/{name:name}"), null, RequestParams(requestParameters)); + ///PUT on /_security/service/{namespace}/{service}/credential/token/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html + ///An identifier for the namespace + ///An identifier for the service name + ///An identifier for the token name + ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Beta within the Elasticsearch server, this functionality is in Beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. + [MapsApi("security.create_service_token", "namespace, service, name")] + public Task CreateServiceTokenAsync(string @namespace, string service, string name, CreateServiceTokenRequestParameters requestParameters = null, CancellationToken ctx = default) + where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_security/service/{@namespace:namespace}/{service:service}/credential/token/{name:name}"), ctx, null, RequestParams(requestParameters)); + ///PUT on /_security/service/{namespace}/{service}/credential/token https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html + ///An identifier for the namespace + ///An identifier for the service name + ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Beta within the Elasticsearch server, this functionality is in Beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. + public TResponse CreateServiceToken(string @namespace, string service, CreateServiceTokenRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => DoRequest(PUT, Url($"_security/service/{@namespace:namespace}/{service:service}/credential/token"), null, RequestParams(requestParameters)); + ///PUT on /_security/service/{namespace}/{service}/credential/token https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html + ///An identifier for the namespace + ///An identifier for the service name + ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Beta within the Elasticsearch server, this functionality is in Beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. + [MapsApi("security.create_service_token", "namespace, service")] + public Task CreateServiceTokenAsync(string @namespace, string service, CreateServiceTokenRequestParameters requestParameters = null, CancellationToken ctx = default) + where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_security/service/{@namespace:namespace}/{service:service}/credential/token"), ctx, null, RequestParams(requestParameters)); ///DELETE on /_security/privilege/{application}/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-privilege.html ///Application name ///Privilege name @@ -175,6 +224,23 @@ public TResponse DeleteRoleMapping(string name, DeleteRoleMappingRequ [MapsApi("security.delete_role_mapping", "name")] public Task DeleteRoleMappingAsync(string name, DeleteRoleMappingRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_security/role_mapping/{name:name}"), ctx, null, RequestParams(requestParameters)); + ///DELETE on /_security/service/{namespace}/{service}/credential/token/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-service-token.html + ///An identifier for the namespace + ///An identifier for the service name + ///An identifier for the token name + ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Beta within the Elasticsearch server, this functionality is in Beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. + public TResponse DeleteServiceToken(string @namespace, string service, string name, DeleteServiceTokenRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => DoRequest(DELETE, Url($"_security/service/{@namespace:namespace}/{service:service}/credential/token/{name:name}"), null, RequestParams(requestParameters)); + ///DELETE on /_security/service/{namespace}/{service}/credential/token/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-service-token.html + ///An identifier for the namespace + ///An identifier for the service name + ///An identifier for the token name + ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Beta within the Elasticsearch server, this functionality is in Beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. + [MapsApi("security.delete_service_token", "namespace, service, name")] + public Task DeleteServiceTokenAsync(string @namespace, string service, string name, DeleteServiceTokenRequestParameters requestParameters = null, CancellationToken ctx = default) + where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_security/service/{@namespace:namespace}/{service:service}/credential/token/{name:name}"), ctx, null, RequestParams(requestParameters)); ///DELETE on /_security/user/{username} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html ///username ///Request specific configuration such as querystring parameters & request specific connection settings. @@ -299,6 +365,60 @@ public TResponse GetRoleMapping(GetRoleMappingRequestParameters reque [MapsApi("security.get_role_mapping", "")] public Task GetRoleMappingAsync(GetRoleMappingRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_security/role_mapping", ctx, null, RequestParams(requestParameters)); + ///GET on /_security/service/{namespace}/{service} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-accounts.html + ///An identifier for the namespace + ///An identifier for the service name + ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Beta within the Elasticsearch server, this functionality is in Beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. + public TResponse GetServiceAccounts(string @namespace, string service, GetServiceAccountsRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, Url($"_security/service/{@namespace:namespace}/{service:service}"), null, RequestParams(requestParameters)); + ///GET on /_security/service/{namespace}/{service} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-accounts.html + ///An identifier for the namespace + ///An identifier for the service name + ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Beta within the Elasticsearch server, this functionality is in Beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. + [MapsApi("security.get_service_accounts", "namespace, service")] + public Task GetServiceAccountsAsync(string @namespace, string service, GetServiceAccountsRequestParameters requestParameters = null, CancellationToken ctx = default) + where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_security/service/{@namespace:namespace}/{service:service}"), ctx, null, RequestParams(requestParameters)); + ///GET on /_security/service/{namespace} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-accounts.html + ///An identifier for the namespace + ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Beta within the Elasticsearch server, this functionality is in Beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. + public TResponse GetServiceAccounts(string @namespace, GetServiceAccountsRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, Url($"_security/service/{@namespace:namespace}"), null, RequestParams(requestParameters)); + ///GET on /_security/service/{namespace} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-accounts.html + ///An identifier for the namespace + ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Beta within the Elasticsearch server, this functionality is in Beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. + [MapsApi("security.get_service_accounts", "namespace")] + public Task GetServiceAccountsAsync(string @namespace, GetServiceAccountsRequestParameters requestParameters = null, CancellationToken ctx = default) + where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_security/service/{@namespace:namespace}"), ctx, null, RequestParams(requestParameters)); + ///GET on /_security/service https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-accounts.html + ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Beta within the Elasticsearch server, this functionality is in Beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. + public TResponse GetServiceAccounts(GetServiceAccountsRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_security/service", null, RequestParams(requestParameters)); + ///GET on /_security/service https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-accounts.html + ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Beta within the Elasticsearch server, this functionality is in Beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. + [MapsApi("security.get_service_accounts", "")] + public Task GetServiceAccountsAsync(GetServiceAccountsRequestParameters requestParameters = null, CancellationToken ctx = default) + where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_security/service", ctx, null, RequestParams(requestParameters)); + ///GET on /_security/service/{namespace}/{service}/credential https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-credentials.html + ///An identifier for the namespace + ///An identifier for the service name + ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Beta within the Elasticsearch server, this functionality is in Beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. + public TResponse GetServiceCredentials(string @namespace, string service, GetServiceCredentialsRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, Url($"_security/service/{@namespace:namespace}/{service:service}/credential"), null, RequestParams(requestParameters)); + ///GET on /_security/service/{namespace}/{service}/credential https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-credentials.html + ///An identifier for the namespace + ///An identifier for the service name + ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Beta within the Elasticsearch server, this functionality is in Beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. + [MapsApi("security.get_service_credentials", "namespace, service")] + public Task GetServiceCredentialsAsync(string @namespace, string service, GetServiceCredentialsRequestParameters requestParameters = null, CancellationToken ctx = default) + where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_security/service/{@namespace:namespace}/{service:service}/credential"), ctx, null, RequestParams(requestParameters)); ///POST on /_security/oauth2/token https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html ///The token request to get ///Request specific configuration such as querystring parameters & request specific connection settings.