iam

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(cfg *config.Config) *Client

func (*Client) AttachRolePolicy

func (c *Client) AttachRolePolicy(roleName, policyName string, policyDoc *PolicyDocument) error

func (*Client) CreateExecutionRole

func (c *Client) CreateExecutionRole(roleName string) (string, error)

func (*Client) DeleteExecutionRole

func (c *Client) DeleteExecutionRole(roleName string) error

func (*Client) DetachRolePolicy

func (c *Client) DetachRolePolicy(roleName, policyARN string) error

type PolicyDocument

type PolicyDocument struct {
	Version   string            `json:"Version"`
	Statement []PolicyStatement `json:"Statement"`
}

PolicyDocument is our definition of our policies to be uploaded to IAM.

type PolicyStatement

type PolicyStatement struct {
	Effect    string    `json:"Effect"`
	Principal Principal `json:"Principal,omitempty"`
	Action    []string  `json:"Action"`
	Resource  []string  `json:"Resource,omitempty"`
}

PolicyStatement will dictate what this policy will allow or not allow.

type Principal

type Principal struct {
	Service string `json:"Service,omitempty"`
}

Jump to

Keyboard shortcuts

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