tags

package
v0.0.0-...-5fccc6f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package tags wraps AWS Resource Groups Tagging API in a basic interface that provides calls specific to our needs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is our own parameter store client

func New

func New(opts ...ClientOptions) (*Client, error)

New returns a new Client instance

func (*Client) GetResources

func (c *Client) GetResources(filteropts ...GetResourcesFilterOpts) ([]*Resource, error)

GetResources returns all AWS resources given the specified filters

type ClientOptions

type ClientOptions func(*Client)

ClientOptions provides the ability to override client settings during initialization

func WithLogger

func WithLogger(l *log.Logger) ClientOptions

WithLogger allows setting the logger

func WithResourceGroupsTaggingAPIClient

func WithResourceGroupsTaggingAPIClient(resc resapiiface.ResourceGroupsTaggingAPIAPI) ClientOptions

WithResourceGroupsTaggingAPIClient allows providing the AWS Resource Groups Tagging API client instead of initializing one

type GetResourcesFilterOpts

type GetResourcesFilterOpts func(*resapi.GetResourcesInput)

GetResourcesFilterOpts allows chaining optional additions to the GetResources filter

func WithResourceTypes

func WithResourceTypes(resources []string) GetResourcesFilterOpts

WithResourceTypes modifies the request filter with the given resource type list. These are the resource types as appears in the AWS ARN - eg: ec2, s3, etc...

func WithTags

func WithTags(tags map[string]string) GetResourcesFilterOpts

WithTags modifies the request filter with the given list of tags (map[string]string - key value) NOTE: assumes only one value per key

type Resource

type Resource struct {
	ARN  string
	Tags map[string]string
}

Resource is a basic struct containing details on resources we're interested in

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL