instanceprofile

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: Apache-2.0 Imports: 14 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProfileCacheKey added in v1.8.0

func GetProfileCacheKey(profileName string) string

func IsRoleNotFoundError added in v1.7.0

func IsRoleNotFoundError(err error) bool

IsRoleNotFoundError converts a smithy.APIError returned by AddRoleToInstanceProfile to a RoleNotFoundError.

Types

type DefaultProvider added in v0.36.0

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

func NewDefaultProvider added in v0.37.0

func NewDefaultProvider(
	iamapi sdk.IAMAPI,
	instanceProfileCache *cache.Cache,
	roleCache *cache.Cache,
	protectedProfileCache *cache.Cache,
	region string,
) *DefaultProvider

func (*DefaultProvider) Create added in v0.36.0

func (p *DefaultProvider) Create(
	ctx context.Context,
	instanceProfileName string,
	roleName string,
	tags map[string]string,
	nodeClassUID string,
	usePath bool,
) error

func (*DefaultProvider) Delete added in v0.36.0

func (p *DefaultProvider) Delete(ctx context.Context, instanceProfileName string) error

func (*DefaultProvider) Get added in v1.4.0

func (p *DefaultProvider) Get(ctx context.Context, instanceProfileName string) (*iamtypes.InstanceProfile, error)

func (*DefaultProvider) IsProtected added in v1.7.0

func (p *DefaultProvider) IsProtected(profileName string) bool

func (*DefaultProvider) ListClusterProfiles added in v1.7.0

func (p *DefaultProvider) ListClusterProfiles(ctx context.Context) ([]*iamtypes.InstanceProfile, error)

func (*DefaultProvider) ListNodeClassProfiles added in v1.7.0

func (p *DefaultProvider) ListNodeClassProfiles(ctx context.Context, nodeClass *v1.EC2NodeClass) ([]*iamtypes.InstanceProfile, error)

func (*DefaultProvider) SetProtectedState added in v1.7.0

func (p *DefaultProvider) SetProtectedState(profileName string, protected bool)

type Provider

type Provider interface {
	Get(context.Context, string) (*iamtypes.InstanceProfile, error)
	Create(context.Context, string, string, map[string]string, string, bool) error
	Delete(context.Context, string) error
	ListClusterProfiles(context.Context) ([]*iamtypes.InstanceProfile, error)
	ListNodeClassProfiles(context.Context, *v1.EC2NodeClass) ([]*iamtypes.InstanceProfile, error)
	IsProtected(string) bool
	SetProtectedState(string, bool)
}

type RoleNotFoundErrorCache added in v1.7.0

type RoleNotFoundErrorCache struct {
	*cache.Cache
}

RoleNotFoundErrorCache is a wrapper around a go-cache for handling role not found errors returned by AddRoleToInstanceProfile.

func (RoleNotFoundErrorCache) HasError added in v1.7.0

func (rc RoleNotFoundErrorCache) HasError(roleName string) (error, bool)

HasError returns the last RoleNotFoundError encountered when attempting to add the given role to an instance profile.

func (RoleNotFoundErrorCache) SetError added in v1.7.0

func (rc RoleNotFoundErrorCache) SetError(roleName string, err error)

Jump to

Keyboard shortcuts

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