resourcegroups

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	GroupArn      string
	Name          string
	Description   string
	ResourceQuery *ResourceQuery
	Tags          map[string]string
	Resources     []string // resource ARNs
	CreatedAt     time.Time
}

Group represents a Resource Groups group.

type ResourceGroupsService

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

ResourceGroupsService is the cloudmock implementation of the AWS Resource Groups API.

func New

func New(accountID, region string) *ResourceGroupsService

New returns a new ResourceGroupsService for the given AWS account ID and region.

func (*ResourceGroupsService) Actions

func (s *ResourceGroupsService) Actions() []service.Action

Actions returns the list of Resource Groups API actions supported by this service.

func (*ResourceGroupsService) HandleRequest

HandleRequest routes an incoming Resource Groups request to the appropriate handler. Resource Groups uses REST-JSON protocol.

func (*ResourceGroupsService) HealthCheck

func (s *ResourceGroupsService) HealthCheck() error

HealthCheck always returns nil.

func (*ResourceGroupsService) Name

func (s *ResourceGroupsService) Name() string

Name returns the AWS service name used for routing.

type ResourceQuery

type ResourceQuery struct {
	Type  string // TAG_FILTERS_1_0, CLOUDFORMATION_STACK_1_0
	Query string // JSON query string
}

ResourceQuery describes how to find group members.

type Store

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

Store manages Resource Groups resources in memory.

func NewStore

func NewStore(accountID, region string) *Store

NewStore returns a new empty Resource Groups Store.

func (*Store) CreateGroup

func (s *Store) CreateGroup(name, description string, query *ResourceQuery, tags map[string]string) (*Group, error)

CreateGroup creates a new resource group.

func (*Store) DeleteGroup

func (s *Store) DeleteGroup(name string) (*Group, bool)

DeleteGroup removes a group.

func (*Store) GetGroup

func (s *Store) GetGroup(name string) (*Group, bool)

GetGroup retrieves a group by name.

func (*Store) GetGroupQuery

func (s *Store) GetGroupQuery(name string) (*Group, bool)

GetGroupQuery returns the resource query for a group.

func (*Store) GetTags

func (s *Store) GetTags(arn string) (map[string]string, bool)

GetTags returns tags for a group.

func (*Store) GroupResources

func (s *Store) GroupResources(name string, arns []string) ([]string, []string)

GroupResources adds resources to a group.

func (*Store) ListGroupResources

func (s *Store) ListGroupResources(name string) ([]string, bool)

ListGroupResources returns resources in a group.

func (*Store) ListGroups

func (s *Store) ListGroups() []*Group

ListGroups returns all groups.

func (*Store) TagResource

func (s *Store) TagResource(arn string, tags map[string]string) bool

TagResource adds tags to a group.

func (*Store) UngroupResources

func (s *Store) UngroupResources(name string, arns []string) ([]string, []string)

UngroupResources removes resources from a group.

func (*Store) UntagResource

func (s *Store) UntagResource(arn string, keys []string) bool

UntagResource removes tags from a group.

func (*Store) UpdateGroup

func (s *Store) UpdateGroup(name, description string) (*Group, error)

UpdateGroup updates a group's description.

func (*Store) UpdateGroupQuery

func (s *Store) UpdateGroupQuery(name string, query *ResourceQuery) (*Group, bool)

UpdateGroupQuery updates the resource query for a group.

Jump to

Keyboard shortcuts

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