tags

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package tags centralizes the tag-synchronization logic shared by the resource packages whose SSM resources are tagged via the AddTagsToResource / RemoveTagsFromResource API pair (currently Document and PatchBaseline).

Each pkg/resource/<name> package defines its own concrete resource and resourceManager types, so a shared helper cannot take those types or be a method on the resource manager. SyncTags therefore accepts only shared and primitive types: the SDK client, the metrics object, the ResourceType enum, the ResourceId string, and the desired/latest Spec.Tags slices. The ACK-tag conversion and diff are performed here using the importable apis/v1alpha1 Tag type and the runtime compare package, so callers remain thin wrappers and this package depends on no per-package generated function.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SyncTags

func SyncTags(
	ctx context.Context,
	sdkapi *svcsdk.Client,
	metrics *ackmetrics.Metrics,
	resourceType svcsdktypes.ResourceTypeForTagging,
	resourceID string,
	desiredTags []*svcapitypes.Tag,
	latestTags []*svcapitypes.Tag,
) (err error)

SyncTags keeps the tags on an SSM resource in sync by calling RemoveTagsFromResource and AddTagsToResource for the tag keys that were removed from / added to the desired Spec.Tags relative to the latest observed Spec.Tags.

resourceType selects the SSM tagging resource type (e.g. ResourceTypeForTaggingDocument). resourceID is the resource's tagging identifier (the Document name, the PatchBaseline ID, ...). desiredTags and latestTags are the Spec.Tags slices from the desired and latest resource state respectively.

Types

This section is empty.

Jump to

Keyboard shortcuts

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