tagging

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package tagging provides unified tag management for SSM Parameter Store and Secrets Manager.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyParam

func ApplyParam(ctx context.Context, client ParamClient, resourceID string, change *Change) error

ApplyParam applies tag changes to an SSM Parameter Store parameter. The resourceID should be the parameter name (e.g., "/my/param").

func ApplySecret

func ApplySecret(ctx context.Context, client SecretClient, secretID string, change *Change) error

ApplySecret applies tag changes to a Secrets Manager secret. The secretID should be the secret name or ARN.

Types

type Change

type Change struct {
	Add    map[string]string   // Tags to add or update
	Remove maputil.Set[string] // Tag keys to remove
}

Change represents tag modifications to apply.

func (*Change) IsEmpty

func (c *Change) IsEmpty() bool

IsEmpty returns true if no changes are specified.

type ParamClient

type ParamClient interface {
	AddTagsToResource(ctx context.Context, params *paramapi.AddTagsToResourceInput, optFns ...func(*paramapi.Options)) (*paramapi.AddTagsToResourceOutput, error)
	RemoveTagsFromResource(ctx context.Context, params *paramapi.RemoveTagsFromResourceInput, optFns ...func(*paramapi.Options)) (*paramapi.RemoveTagsFromResourceOutput, error)
}

ParamClient is the interface for SSM Parameter Store tag operations.

type SecretClient

type SecretClient interface {
	TagResource(ctx context.Context, params *secretapi.TagResourceInput, optFns ...func(*secretapi.Options)) (*secretapi.TagResourceOutput, error)
	UntagResource(ctx context.Context, params *secretapi.UntagResourceInput, optFns ...func(*secretapi.Options)) (*secretapi.UntagResourceOutput, error)
}

SecretClient is the interface for Secrets Manager tag operations.

Jump to

Keyboard shortcuts

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