Documentation
¶
Overview ¶
Package elasticache talks to ElastiCache (Redis and Valkey) over the signed Query API (version 2015-02-02). Reads are open; changes need the managed tag.
Index ¶
- Constants
- Variables
- type Client
- func (c *Client) CreateSnapshot(ctx context.Context, region, groupID, name string, m Meta) error
- func (c *Client) DeleteCluster(ctx context.Context, in DeleteInput) error
- func (c *Client) DeleteReplicationGroup(ctx context.Context, in DeleteInput) error
- func (c *Client) DescribeCacheClusters(ctx context.Context, region string, id ...string) ([]Cluster, error)
- func (c *Client) DescribeReplicationGroups(ctx context.Context, region string, id ...string) ([]ReplicationGroup, error)
- func (c *Client) DescribeSnapshots(ctx context.Context, region, groupID string) ([]Snapshot, error)
- func (c *Client) ListTags(ctx context.Context, region, arn string) (map[string]string, error)
- func (c *Client) RebootCluster(ctx context.Context, region, id string) error
- type Cluster
- type DeleteInput
- type Guard
- type Meta
- type ReplicationGroup
- type Snapshot
Constants ¶
const ServiceName = "elasticache"
ServiceName is the key used in the guard ServicesEnabled map.
Variables ¶
var ( ErrNotManaged = errors.New("elasticache: resource is not managed by this control plane") ErrNeedsConfirm = errors.New("elasticache: delete needs the resource id typed as confirmation") )
Errors the API layer maps to HTTP statuses.
var ManagedTag = tagPrefix + "managed"
ManagedTag marks resources this control plane owns.
var Service = awsx.Service{Name: "elasticache", Prefix: "elasticache", SigningName: "elasticache"}
Service is the ElastiCache Query API.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the lazy ElastiCache module; it makes no call until a method runs.
func (*Client) CreateSnapshot ¶
CreateSnapshot snapshots a managed replication group and tags the snapshot as managed.
func (*Client) DeleteCluster ¶
func (c *Client) DeleteCluster(ctx context.Context, in DeleteInput) error
DeleteCluster deletes a managed standalone cache cluster, with an optional final snapshot.
func (*Client) DeleteReplicationGroup ¶
func (c *Client) DeleteReplicationGroup(ctx context.Context, in DeleteInput) error
DeleteReplicationGroup deletes a managed replication group, with an optional final snapshot.
func (*Client) DescribeCacheClusters ¶
func (c *Client) DescribeCacheClusters(ctx context.Context, region string, id ...string) ([]Cluster, error)
DescribeCacheClusters lists cache clusters (all pages), or the one named.
func (*Client) DescribeReplicationGroups ¶
func (c *Client) DescribeReplicationGroups(ctx context.Context, region string, id ...string) ([]ReplicationGroup, error)
DescribeReplicationGroups lists replication groups (all pages), or the one named. Ownership is read from tags with one extra call per group.
func (*Client) DescribeSnapshots ¶
DescribeSnapshots lists snapshots (all pages), optionally for one replication group.
type Cluster ¶
type Cluster struct {
ID, ARN, Engine, EngineVersion, Status, NodeType string
Endpoint string
Port, Nodes int
GroupID string
NodeIDs []string
Managed bool
}
Cluster is the read view of one cache cluster (a node or a standalone cluster).
type DeleteInput ¶
type DeleteInput struct {
Region, ID, Confirm, FinalSnapshotID string
}
DeleteInput is a delete request. Confirm must repeat the resource id.
type Guard ¶
type Guard interface {
Tags(m cloudguard.TagMeta) map[string]string
}
Guard supplies the mandatory tags.
type ReplicationGroup ¶
type ReplicationGroup struct {
ID, ARN, Description, Status, NodeType string
PrimaryEndpoint, ReaderEndpoint string
Port int
MultiAZ, ClusterMode bool
AtRestEncrypted, TransitEncrypted bool
Members []string
Managed bool
}
ReplicationGroup is the read view of one replication group.