ssoadmin

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 AccountAssignment

type AccountAssignment struct {
	InstanceArn      string
	PermissionSetArn string
	TargetId         string
	TargetType       string
	PrincipalId      string
	PrincipalType    string
}

AccountAssignment holds an account assignment.

type Instance

type Instance struct {
	InstanceArn     string
	IdentityStoreId string
	Name            string
	CreatedDate     time.Time
	Status          string
}

Instance represents an SSO instance.

type ManagedPolicy

type ManagedPolicy struct {
	Arn  string
	Name string
}

ManagedPolicy represents an attached managed policy.

type PermissionSet

type PermissionSet struct {
	PermissionSetArn string
	Name             string
	Description      string
	SessionDuration  string
	RelayState       string
	CreatedDate      time.Time
	InstanceArn      string
	Tags             []Tag
	ManagedPolicies  []ManagedPolicy
	InlinePolicy     string
}

PermissionSet holds a permission set definition.

type SSOAdminService

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

SSOAdminService is the cloudmock implementation of the AWS SSO Admin API.

func New

func New(accountID, region string) *SSOAdminService

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

func (*SSOAdminService) Actions

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

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

func (*SSOAdminService) HandleRequest

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

HandleRequest routes an incoming SSO Admin request to the appropriate handler.

func (*SSOAdminService) HealthCheck

func (s *SSOAdminService) HealthCheck() error

HealthCheck always returns nil.

func (*SSOAdminService) Name

func (s *SSOAdminService) Name() string

Name returns the AWS service name used for routing.

type Store

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

Store is the in-memory store for SSO Admin resources.

func NewStore

func NewStore(accountID, region string) *Store

NewStore creates an empty SSO Admin Store.

func (*Store) AttachManagedPolicy

func (s *Store) AttachManagedPolicy(instanceArn, permissionSetArn, policyArn string) *service.AWSError

AttachManagedPolicy attaches a managed policy to a permission set.

func (*Store) CreateAccountAssignment

func (s *Store) CreateAccountAssignment(instanceArn, permissionSetArn, targetId, targetType, principalId, principalType string) *service.AWSError

CreateAccountAssignment creates an account assignment.

func (*Store) CreateInstance

func (s *Store) CreateInstance(name string) (*Instance, *service.AWSError)

CreateInstance creates a new SSO instance.

func (*Store) CreatePermissionSet

func (s *Store) CreatePermissionSet(instanceArn, name, description, sessionDuration string, tags []Tag) (*PermissionSet, *service.AWSError)

CreatePermissionSet creates a new permission set.

func (*Store) DeleteAccountAssignment

func (s *Store) DeleteAccountAssignment(instanceArn, permissionSetArn, targetId, targetType, principalId, principalType string) *service.AWSError

DeleteAccountAssignment removes an account assignment.

func (*Store) DeleteInlinePolicy

func (s *Store) DeleteInlinePolicy(instanceArn, permissionSetArn string) *service.AWSError

DeleteInlinePolicy removes the inline policy from a permission set.

func (*Store) DeletePermissionSet

func (s *Store) DeletePermissionSet(instanceArn, permissionSetArn string) *service.AWSError

DeletePermissionSet removes a permission set.

func (*Store) DescribeInstance

func (s *Store) DescribeInstance(arn string) (*Instance, *service.AWSError)

DescribeInstance returns an SSO instance by ARN.

func (*Store) DescribePermissionSet

func (s *Store) DescribePermissionSet(instanceArn, permissionSetArn string) (*PermissionSet, *service.AWSError)

DescribePermissionSet returns a permission set.

func (*Store) DetachManagedPolicy

func (s *Store) DetachManagedPolicy(instanceArn, permissionSetArn, policyArn string) *service.AWSError

DetachManagedPolicy detaches a managed policy from a permission set.

func (*Store) GetInlinePolicy

func (s *Store) GetInlinePolicy(instanceArn, permissionSetArn string) (string, *service.AWSError)

GetInlinePolicy returns the inline policy for a permission set.

func (*Store) ListAccountAssignments

func (s *Store) ListAccountAssignments(instanceArn, accountId, permissionSetArn string) []AccountAssignment

ListAccountAssignments returns assignments for an instance and permission set.

func (*Store) ListInstances

func (s *Store) ListInstances() []*Instance

ListInstances returns all SSO instances.

func (*Store) ListManagedPolicies

func (s *Store) ListManagedPolicies(instanceArn, permissionSetArn string) ([]ManagedPolicy, *service.AWSError)

ListManagedPolicies returns managed policies for a permission set.

func (*Store) ListPermissionSets

func (s *Store) ListPermissionSets(instanceArn string) []*PermissionSet

ListPermissionSets returns all permission sets for an instance.

func (*Store) ListTagsForResource

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

ListTagsForResource returns tags for a resource.

func (*Store) ProvisionPermissionSet

func (s *Store) ProvisionPermissionSet(instanceArn, permissionSetArn, targetType, targetID string) (map[string]any, *service.AWSError)

ProvisionPermissionSet triggers provisioning (no-op in mock; returns a status object).

func (*Store) PutInlinePolicy

func (s *Store) PutInlinePolicy(instanceArn, permissionSetArn, policy string) *service.AWSError

PutInlinePolicy sets the inline policy for a permission set.

func (*Store) TagResource

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

TagResource adds tags to a permission set.

func (*Store) UntagResource

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

UntagResource removes tags from a permission set.

func (*Store) UpdatePermissionSet

func (s *Store) UpdatePermissionSet(instanceArn, permissionSetArn, description, sessionDuration, relayState string) *service.AWSError

UpdatePermissionSet updates a permission set.

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