ram

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RAMService

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

RAMService is the cloudmock implementation of the AWS Resource Access Manager API.

func New

func New(accountID, region string) *RAMService

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

func (*RAMService) Actions

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

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

func (*RAMService) HandleRequest

func (s *RAMService) HandleRequest(ctx *service.RequestContext) (*service.Response, error)

HandleRequest routes an incoming RAM request to the appropriate handler.

func (*RAMService) HealthCheck

func (s *RAMService) HealthCheck() error

HealthCheck always returns nil.

func (*RAMService) Name

func (s *RAMService) Name() string

Name returns the AWS service name used for routing.

type ResourceShare

type ResourceShare struct {
	ResourceShareArn        string
	Name                    string
	OwningAccountId         string
	Status                  string // ACTIVE, PENDING, FAILED, DELETING, DELETED
	AllowExternalPrincipals bool
	CreationTime            time.Time
	LastUpdatedTime         time.Time
	StatusMessage           string
	FeatureSet              string
	Tags                    []Tag
}

ResourceShare holds a RAM resource share.

type ResourceShareAssociation

type ResourceShareAssociation struct {
	ResourceShareArn string
	AssociatedEntity string // Principal ARN or resource ARN
	AssociationType  string // PRINCIPAL or RESOURCE
	Status           string
	CreationTime     time.Time
	LastUpdatedTime  time.Time
	External         bool
	StatusMessage    string
}

ResourceShareAssociation tracks principals and resources in a share.

type ResourceShareInvitation

type ResourceShareInvitation struct {
	ResourceShareInvitationArn string
	ResourceShareArn           string
	ResourceShareName          string
	SenderAccountId            string
	ReceiverAccountId          string
	Status                     string // PENDING, ACCEPTED, REJECTED, EXPIRED
	InvitationTimestamp        time.Time
}

ResourceShareInvitation holds a pending invitation.

type Store

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

Store is the in-memory store for RAM resources.

func NewStore

func NewStore(accountID, region string) *Store

NewStore creates an empty RAM Store.

func (*Store) AcceptResourceShareInvitation

func (s *Store) AcceptResourceShareInvitation(invitationArn string) (*ResourceShareInvitation, *service.AWSError)

AcceptResourceShareInvitation accepts an invitation.

func (*Store) AssociateResourceShare

func (s *Store) AssociateResourceShare(arn string, principals, resourceArns []string) ([]ResourceShareAssociation, *service.AWSError)

AssociateResourceShare associates principals or resources with a share.

func (*Store) CreateResourceShare

func (s *Store) CreateResourceShare(name string, allowExternal bool, principals, resourceArns []string, tags []Tag) (*ResourceShare, *service.AWSError)

CreateResourceShare creates a new resource share.

func (*Store) DeleteResourceShare

func (s *Store) DeleteResourceShare(arn string) *service.AWSError

DeleteResourceShare marks a resource share as deleted.

func (*Store) DisassociateResourceShare

func (s *Store) DisassociateResourceShare(arn string, principals, resourceArns []string) ([]ResourceShareAssociation, *service.AWSError)

DisassociateResourceShare removes associations.

func (*Store) GetResourceShareAssociations

func (s *Store) GetResourceShareAssociations(associationType string, shareArns []string) []ResourceShareAssociation

GetResourceShareAssociations returns associations for a share or by type.

func (*Store) GetResourceShareInvitations

func (s *Store) GetResourceShareInvitations() []*ResourceShareInvitation

GetResourceShareInvitations returns all invitations.

func (*Store) GetResourceShares

func (s *Store) GetResourceShares(resourceOwner string) []*ResourceShare

GetResourceShares returns resource shares matching criteria.

func (*Store) ListPrincipals

func (s *Store) ListPrincipals(resourceOwner string, resourceShareArns []string) []ResourceShareAssociation

ListPrincipals returns principals associated with shares owned by this account.

func (*Store) ListResources

func (s *Store) ListResources(resourceOwner string, resourceShareArns []string) []ResourceShareAssociation

ListResources returns resources associated with shares owned by this account.

func (*Store) ListTagsForResource

func (s *Store) ListTagsForResource(arn string) ([]Tag, *service.AWSError)

ListTagsForResource returns tags for a resource share.

func (*Store) RejectResourceShareInvitation

func (s *Store) RejectResourceShareInvitation(invitationArn string) (*ResourceShareInvitation, *service.AWSError)

RejectResourceShareInvitation rejects an invitation.

func (*Store) TagResource

func (s *Store) TagResource(arn string, tags []Tag) *service.AWSError

TagResource adds tags to a resource share.

func (*Store) UntagResource

func (s *Store) UntagResource(arn string, tagKeys []string) *service.AWSError

UntagResource removes tags from a resource share.

func (*Store) UpdateResourceShare

func (s *Store) UpdateResourceShare(arn, name string, allowExternal *bool) (*ResourceShare, *service.AWSError)

UpdateResourceShare updates a resource share.

type Tag

type Tag struct {
	Key   string
	Value string
}

Tag represents a key-value tag.

Jump to

Keyboard shortcuts

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