package iamapi

import "github.com/oslokommune/okctl/pkg/iamapi"

Package iamapi provides some convenience functions for interacting with the AWS IAM API

Index

Functions

func RoleFriendlyName

func RoleFriendlyName(roleARN string) (string, error)

RoleFriendlyName returns the friendly name of the role by extracting it from the provided ARN

Types

type IAMAPI

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

IAMAPI contains the required state for interacting with the AWS IAM API

func New

func New(provider v1alpha1.CloudProvider) *IAMAPI

New returns an initialised client

func (*IAMAPI) AttachRolePolicy

func (i *IAMAPI) AttachRolePolicy(policyARN, roleARN string) error

AttachRolePolicy attaches the provided policy to the role

func (*IAMAPI) DetachRolePolicy

func (i *IAMAPI) DetachRolePolicy(policyARN, roleARN string) error

DetachRolePolicy detaches the provided policy from the role

Source Files

iamapi.go

Version
v0.0.106 (latest)
Published
Oct 21, 2022
Platform
linux/amd64
Imports
6 packages
Last checked
18 hours ago

Tools for package owners.