iam

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsErrorNotFound

func IsErrorNotFound(err error) bool

IsErrorNotFound returns true if the error code indicates that the item was not found

Types

type Client

type Client interface {
	CreateUser(username string) (*iam.AccessKey, error)
	DeleteUser(username string) error
	CreatePolicyAndAttach(username string, policyName string, policyDocument string) (string, error)
	GetPolicyVersion(policyName string) (string, error)
	UpdatePolicy(policyName string, policyDocument string) (string, error)
	DeletePolicyAndDetach(username string, policyName string) error
}

Client defines IAM Client operations mockery -case snake -name Client -output fake -outpkg fake

func NewClient

func NewClient(config *aws.Config) Client

NewClient creates new AWS Client with provided AWS Configurations/Credentials

type PolicyDocument

type PolicyDocument struct {
	Version   string
	Statement []StatementEntry
}

PolicyDocument is the structure of IAM policy document

type RoleClient

type RoleClient interface {
	GetRoleRequest(*iam.GetRoleInput) iam.GetRoleRequest
	CreateRoleRequest(*iam.CreateRoleInput) iam.CreateRoleRequest
	DeleteRoleRequest(*iam.DeleteRoleInput) iam.DeleteRoleRequest
}

RoleClient is the external client used for IAMRole Custom Resource

func NewRoleClient

func NewRoleClient(conf *aws.Config) (RoleClient, error)

NewRoleClient returns a new client using AWS credentials as JSON encoded data.

type RolePolicyAttachmentClient

type RolePolicyAttachmentClient interface {
	AttachRolePolicyRequest(*iam.AttachRolePolicyInput) iam.AttachRolePolicyRequest
	ListAttachedRolePoliciesRequest(*iam.ListAttachedRolePoliciesInput) iam.ListAttachedRolePoliciesRequest
	DetachRolePolicyRequest(*iam.DetachRolePolicyInput) iam.DetachRolePolicyRequest
}

RolePolicyAttachmentClient is the external client used for IAMRolePolicyAttachment Custom Resource

func NewRolePolicyAttachmentClient

func NewRolePolicyAttachmentClient(conf *aws.Config) (RolePolicyAttachmentClient, error)

NewRolePolicyAttachmentClient returns a new client given an aws config

type StatementEntry

type StatementEntry struct {
	Sid      string
	Effect   string
	Action   []string
	Resource []string
}

StatementEntry is used to define permission statements in a PolicyDocument

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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