Skip to content

[es/snapshot.get] Client does not support Azure Snapshot Repository. Missing required property 'GetSnapshotRequest.repository' #207

Open
@synox

Description

@synox

Java API client version

7.16.2

Java version

java 11.0.14 2022-01-18 LTS

Elasticsearch Version

7.16.2

Problem description

The client can not parse the following response, which is an azure blob store configuration.

{
  "found-snapshots": {
    "type": "azure",
    "uuid": "Ujhg4G83Sve5_cH76iUssg",
    "settings": {
      "container": "a1a8dd8256d81eae1a70549ea66e45a",
      "client": "elastic-internal-e757c8",
      "base_path": "snapshots/5f160fc1800c5a716d26b7fbb3c63e40",
      "container_name": "0f27d258ed85c6170bf9cea6bbffa1e",
      "use_for_peer_recovery": "true"
    }
  }
}

Error

MissingRequiredPropertyException: Missing required property 'GetSnapshotRequest.repository'

	at co.elastic.clients.util.ApiTypeHelper.requireNonNull(ApiTypeHelper.java:76)
	at co.elastic.clients.elasticsearch.snapshot.GetSnapshotRequest.<init>(GetSnapshotRequest.java:91)
	at co.elastic.clients.elasticsearch.snapshot.GetSnapshotRequest.<init>(GetSnapshotRequest.java:59)
	at co.elastic.clients.elasticsearch.snapshot.GetSnapshotRequest$Builder.build(GetSnapshotRequest.java:356)
	at co.elastic.clients.elasticsearch.snapshot.GetSnapshotRequest$Builder.build(GetSnapshotRequest.java:199)
	at co.elastic.clients.elasticsearch.snapshot.ElasticsearchSnapshotClient.get(ElasticsearchSnapshotClient.java:296)

Code:

            GetSnapshotResponse snapshotRepositories = client
                    .snapshot()
                    .get(b -> b);

in the spec the Field GetSnapshotRequest.repository is mandatory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: SpecificationRelated to the API spec used to generate client code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions