https://github.com/scblur869/oscli
aws opensearch cli plugin
https://github.com/scblur869/oscli
aws-opensearch elasticsearch
Last synced: about 2 months ago
JSON representation
aws opensearch cli plugin
- Host: GitHub
- URL: https://github.com/scblur869/oscli
- Owner: scblur869
- License: mit
- Created: 2023-02-12T14:53:49.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-12T15:13:11.000Z (over 2 years ago)
- Last Synced: 2025-02-06T20:39:36.438Z (3 months ago)
- Topics: aws-opensearch, elasticsearch
- Language: Go
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# oscli
## opensearch command-line tool### simple app in golang to give easy access to opensearch api calls from command line based on your iam role in AWS
### Requirements:
- must have aws cli installed and configured with permissions to opensearch in AWS
- opensearch endpoint URI exposed and known
- go build requires access to the internet to download packagesDeployment:
clone this repository
```console
git clone {.git url}
``````console
go build
``````console
./oscli
usage:admin
ls-role-mapping | ls-tenants | ls-security
configure
{ allows for aws profile and elastic host url }
role-mapping
new -name=role_name -user=opensearch_user -backend-role=kibana_user -host={nil or host match}
indice
delete -name=indexName
template
view -name=templateName
role
new -name=test_role -clusterperms=indices_monitor,cluster_ops -index="movies-*" -indexperm=read -tenant=sales,marketing -tenantperms=kibana_all_read
cat
cluster-info | stats | nodes | templates | indices | shards | health | disk | recovery | master | count | field_data | alias
help: { list this message :-) }
```
example
```console
some-user@ww2r32342de: ./oscli configure
AWS Cli Profile [default]:
opensearch Host [https://my-opensearch-host-url.us-east-1.es.amazonaws.com]:
config file written..
some-user@ww2r32342de:
``````console
some-user@ww2r32342de: ./oscli configure
AWS Cli Profile [default]: us-east-1-dev
opensearch Host [https://my-opensearch-host-url.us-east-1.es.amazonaws.com]: http://my-dev-cluster.us-east-1.es.amazonaws.com
config file written..
some-user@ww2r32342de:
``````console
./oscli admin ls-role-mapping
```