ansible.builtin.elasticache_snapshot (v2.4.0.0-1) — module

Manage cache snapshots in Amazon Elasticache.

| "added in version" 2.3 of ansible.builtin"

Authors: Sloane Hertel (@s-hertel)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.4.0.0.post1

Description

Manage cache snapshots in Amazon Elasticache.

Returns information about the specified snapshot.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Note: None of these examples set aws_access_key, aws_secret_key, or region.
# It is assumed that their matching environment variables are set.
---
- hosts: localhost
  connection: local
  tasks:
    - name: 'Create a snapshot'
      elasticache_snapshot:
        name: 'test-snapshot'
        state: 'present'
        cluster_id: '{{ cluster }}'
        replication_id: '{{ replication }}'

Inputs

    
name:
    description:
    - The name of the snapshot we want to create, copy, delete
    required: true

state:
    choices:
    - present
    - absent
    - copy
    description:
    - Actions that will create, destroy, or copy a snapshot.

bucket:
    default: null
    description:
    - The s3 bucket to which the snapshot is exported
    required: false

target:
    default: null
    description:
    - The name of a snapshot copy
    required: false

cluster_id:
    default: null
    description:
    - The name of an existing cache cluster in the replication group to make the snapshot.
    required: false

replication_id:
    default: null
    description:
    - The name of the existing replication group to make the snapshot.
    required: false

Outputs

changed:
  description: if a snapshot has been created, deleted, or copied
  returned: always
  sample:
    changed: true
  type: bool
response_metadata:
  description: response metadata about the snapshot
  returned: always
  sample:
    http_headers:
      content-length: 1490
      content-type: text/xml
      date: Tue, 07 Feb 2017 16:43:04 GMT
      x-amzn-requestid: 7f436dea-ed54-11e6-a04c-ab2372a1f14d
    http_status_code: 200
    request_id: 7f436dea-ed54-11e6-a04c-ab2372a1f14d
    retry_attempts: 0
  type: dict
snapshot:
  description: snapshot data
  returned: always
  sample:
    auto_minor_version_upgrade: true
    cache_cluster_create_time: '2017-02-01T17:43:58.261000+00:00'
    cache_cluster_id: test-please-delete
    cache_node_type: cache.m1.small
    cache_parameter_group_name: default.redis3.2
    cache_subnet_group_name: default
    engine: redis
    engine_version: 3.2.4
    node_snapshots:
      cache_node_create_time: '2017-02-01T17:43:58.261000+00:00'
      cache_node_id: 1
      cache_size: null
    num_cache_nodes: 1
    port: 11211
    preferred_availability_zone: us-east-1d
    preferred_maintenance_window: wed:03:00-wed:04:00
    snapshot_name: deletesnapshot
    snapshot_retention_limit: 0
    snapshot_source: manual
    snapshot_status: creating
    snapshot_window: 10:00-11:00
    vpc_id: vpc-c248fda4
  type: dict