NAME

OpenSearch::Client::Core::3_0::Direct::Snapshot

VERSION

version 3.007009

SYNOPSIS

use OpenSearch::Client;

my $client = OpenSearch::Client->new( ... );

my $response = $client->snapshot-><methodname>(
  valone => $value1,
  valtwo => $value2
);

DESCRIPTION

Snapshot APIs

The snapshot APIs allow you to manage snapshots and snapshot repositories.

See OpenSearch documentation for snapshot.

METHODS

cleanup_repository

Removes any stale data from a snapshot repository.

Paths served by this method:

POST /_snapshot/{repository}/_cleanup

Method added in OpenSearch version 1.0

$resp = $client->snapshot->cleanup_repository(
    
     # path parameters
    
    'repository'               =>  $repository,  # required
    
     # Endpoint specific query string parameters
    
    'cluster_manager_timeout'  =>  $qval1,     # string
    'master_timeout'           =>  $qval2,     # string
    'timeout'                  =>  $qval3,     # string
    
     # Common API query string parameters
    
    'error_trace'              =>  $qval4,     # boolean
    'filter_path'              =>  $qval5,     # list
    'human'                    =>  $qval6,     # boolean
    'pretty'                   =>  $qval7,     # boolean
    'source'                   =>  $qval8,     # string
);

OpenSearch documentation for snapshot->cleanup_repository

clone

Creates a clone of all or part of a snapshot in the same repository as the original snapshot.

Paths served by this method:

PUT /_snapshot/{repository}/{snapshot}/_clone/{target_snapshot}

Method added in OpenSearch version 1.0

$resp = $client->snapshot->clone(
    
    'body'                     =>  $body,      # optional
    
     # path parameters
    
    'repository'               =>  $repository,  # required
    'snapshot'                 =>  $snapshot,  # required
    'target_snapshot'          =>  $target_snapshot,  # required
    
     # Endpoint specific query string parameters
    
    'cluster_manager_timeout'  =>  $qval1,     # string
    'master_timeout'           =>  $qval2,     # string
    
     # Common API query string parameters
    
    'error_trace'              =>  $qval3,     # boolean
    'filter_path'              =>  $qval4,     # list
    'human'                    =>  $qval5,     # boolean
    'pretty'                   =>  $qval6,     # boolean
    'source'                   =>  $qval7,     # string
);

OpenSearch documentation for snapshot->clone

create

Creates a snapshot within an existing repository.

Paths served by this method:

POST /_snapshot/{repository}/{snapshot}
PUT /_snapshot/{repository}/{snapshot}

Method added in OpenSearch version 1.0

$resp = $client->snapshot->create(
    
    'body'                     =>  $body,      # optional
    
     # path parameters
    
    'repository'               =>  $repository,  # required
    'snapshot'                 =>  $snapshot,  # required
    
     # Endpoint specific query string parameters
    
    'cluster_manager_timeout'  =>  $qval1,     # string
    'master_timeout'           =>  $qval2,     # string
    'wait_for_completion'      =>  $qval3,     # boolean
    
     # Common API query string parameters
    
    'error_trace'              =>  $qval4,     # boolean
    'filter_path'              =>  $qval5,     # list
    'human'                    =>  $qval6,     # boolean
    'pretty'                   =>  $qval7,     # boolean
    'source'                   =>  $qval8,     # string
);

OpenSearch documentation for snapshot->create

create_repository

Creates a snapshot repository.

Paths served by this method:

POST /_snapshot/{repository}
PUT /_snapshot/{repository}

Method added in OpenSearch version 1.0

$resp = $client->snapshot->create_repository(
    
    'body'                     =>  $body,      # required
    
     # path parameters
    
    'repository'               =>  $repository,  # required
    
     # Endpoint specific query string parameters
    
    'cluster_manager_timeout'  =>  $qval1,     # string
    'master_timeout'           =>  $qval2,     # string
    'timeout'                  =>  $qval3,     # string
    'verify'                   =>  $qval4,     # boolean
    
     # Common API query string parameters
    
    'error_trace'              =>  $qval5,     # boolean
    'filter_path'              =>  $qval6,     # list
    'human'                    =>  $qval7,     # boolean
    'pretty'                   =>  $qval8,     # boolean
    'source'                   =>  $qval9,     # string
);

OpenSearch documentation for snapshot->create_repository

delete

Deletes a snapshot.

Paths served by this method:

DELETE /_snapshot/{repository}/{snapshot}

Method added in OpenSearch version 1.0

$resp = $client->snapshot->delete(
    
     # path parameters
    
    'repository'               =>  $repository,  # required
    'snapshot'                 =>  $snapshot,  # required
    
     # Endpoint specific query string parameters
    
    'cluster_manager_timeout'  =>  $qval1,     # string
    'master_timeout'           =>  $qval2,     # string
    
     # Common API query string parameters
    
    'error_trace'              =>  $qval3,     # boolean
    'filter_path'              =>  $qval4,     # list
    'human'                    =>  $qval5,     # boolean
    'pretty'                   =>  $qval6,     # boolean
    'source'                   =>  $qval7,     # string
);

OpenSearch documentation for snapshot->delete

delete_repository

Deletes a snapshot repository.

Paths served by this method:

DELETE /_snapshot/{repository}

Method added in OpenSearch version 1.0

$resp = $client->snapshot->delete_repository(
    
     # path parameters
    
    'repository'               =>  $repository,  # required
    
     # Endpoint specific query string parameters
    
    'cluster_manager_timeout'  =>  $qval1,     # string
    'master_timeout'           =>  $qval2,     # string
    'timeout'                  =>  $qval3,     # string
    
     # Common API query string parameters
    
    'error_trace'              =>  $qval4,     # boolean
    'filter_path'              =>  $qval5,     # list
    'human'                    =>  $qval6,     # boolean
    'pretty'                   =>  $qval7,     # boolean
    'source'                   =>  $qval8,     # string
);

OpenSearch documentation for snapshot->delete_repository

get

Returns information about a snapshot.

Paths served by this method:

GET /_snapshot/{repository}/{snapshot}

Method added in OpenSearch version 1.0

$resp = $client->snapshot->get(
    
     # path parameters
    
    'repository'               =>  $repository,  # required
    'snapshot'                 =>  $snapshot,  # required
    
     # Endpoint specific query string parameters
    
    'cluster_manager_timeout'  =>  $qval1,     # string
    'ignore_unavailable'       =>  $qval2,     # boolean
    'master_timeout'           =>  $qval3,     # string
    'verbose'                  =>  $qval4,     # boolean
    
     # Common API query string parameters
    
    'error_trace'              =>  $qval5,     # boolean
    'filter_path'              =>  $qval6,     # list
    'human'                    =>  $qval7,     # boolean
    'pretty'                   =>  $qval8,     # boolean
    'source'                   =>  $qval9,     # string
);

OpenSearch documentation for snapshot->get

get_repository

Returns information about a snapshot repository.

Paths served by this method:

GET /_snapshot
GET /_snapshot/{repository}

Method added in OpenSearch version 1.0

$resp = $client->snapshot->get_repository(
    
     # path parameters
    
    'repository'               =>  $repository,  # optional
    
     # Endpoint specific query string parameters
    
    'cluster_manager_timeout'  =>  $qval1,     # string
    'local'                    =>  $qval2,     # boolean
    'master_timeout'           =>  $qval3,     # string
    
     # Common API query string parameters
    
    'error_trace'              =>  $qval4,     # boolean
    'filter_path'              =>  $qval5,     # list
    'human'                    =>  $qval6,     # boolean
    'pretty'                   =>  $qval7,     # boolean
    'source'                   =>  $qval8,     # string
);

OpenSearch documentation for snapshot->get_repository

restore

Restores a snapshot.

Paths served by this method:

POST /_snapshot/{repository}/{snapshot}/_restore

Method added in OpenSearch version 1.0

$resp = $client->snapshot->restore(
    
    'body'                     =>  $body,      # optional
    
     # path parameters
    
    'repository'               =>  $repository,  # required
    'snapshot'                 =>  $snapshot,  # required
    
     # Endpoint specific query string parameters
    
    'cluster_manager_timeout'  =>  $qval1,     # string
    'master_timeout'           =>  $qval2,     # string
    'wait_for_completion'      =>  $qval3,     # boolean
    
     # Common API query string parameters
    
    'error_trace'              =>  $qval4,     # boolean
    'filter_path'              =>  $qval5,     # list
    'human'                    =>  $qval6,     # boolean
    'pretty'                   =>  $qval7,     # boolean
    'source'                   =>  $qval8,     # string
);

OpenSearch documentation for snapshot->restore

status

Returns information about the status of a snapshot.

Paths served by this method:

GET /_snapshot/_status
GET /_snapshot/{repository}/_status
GET /_snapshot/{repository}/{snapshot}/_status

Method added in OpenSearch version 1.0

$resp = $client->snapshot->status(
    
     # path parameters
    
    'repository'               =>  $repository,  # optional
    'snapshot'                 =>  $snapshot,  # optional
    
     # Endpoint specific query string parameters
    
    'cluster_manager_timeout'  =>  $qval1,     # string
    'ignore_unavailable'       =>  $qval2,     # boolean
    'master_timeout'           =>  $qval3,     # string
    
     # Common API query string parameters
    
    'error_trace'              =>  $qval4,     # boolean
    'filter_path'              =>  $qval5,     # list
    'human'                    =>  $qval6,     # boolean
    'pretty'                   =>  $qval7,     # boolean
    'source'                   =>  $qval8,     # string
);

OpenSearch documentation for snapshot->status

verify_repository

Verifies a repository.

Paths served by this method:

POST /_snapshot/{repository}/_verify

Method added in OpenSearch version 1.0

$resp = $client->snapshot->verify_repository(
    
     # path parameters
    
    'repository'               =>  $repository,  # required
    
     # Endpoint specific query string parameters
    
    'cluster_manager_timeout'  =>  $qval1,     # string
    'master_timeout'           =>  $qval2,     # string
    'timeout'                  =>  $qval3,     # string
    
     # Common API query string parameters
    
    'error_trace'              =>  $qval4,     # boolean
    'filter_path'              =>  $qval5,     # list
    'human'                    =>  $qval6,     # boolean
    'pretty'                   =>  $qval7,     # boolean
    'source'                   =>  $qval8,     # string
);

OpenSearch documentation for snapshot->verify_repository

method_supported_in_version

Return whether a method in this module namespace is supported for an OpenSearch server version

my $boolean = $os->snapshot->method_supported_in_version(
    method  => 'cleanup_repository',
    version => '2.4.0'
);

Both method and version are required.

See also global_method_supported_in_version

MANUAL

Documentation index OpenSearch::Client::Manual

HISTORY

This distribution is derived from Search::Elasticsearch version 7.714. All subsequent changes are unique to this distribution.

AUTHOR

Mark Dootson <mdootson@cpan.org> ( current maintainer )

CREDITS

OpenSearch::Client is based on Search::Elasticsearch version 7.714 by Enrico Zimuel <enrico.zimuel@elastic.co>.

COPYRIGHT AND LICENSE

Copyright (C) 2026 by Mark Dootson ( this distribution )

Copyright (C) 2021 by Elasticsearch BV ( original distribution )

This is free software, licensed under:

The Apache License, Version 2.0, January 2004