aws

package
v0.0.41 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddChildNode added in v0.0.21

func AddChildNode(nodeInfo *command.OrgNode, parent *command.TreeNode) (node *command.TreeNode, isRoot bool)

AddChildNode creates and add a child node given a parent

func PrintTree added in v0.0.21

func PrintTree(root *command.TreeNode)

PrintTree given the root node prints the entire tree

Types

type AssumeRoleCredentialsProvider added in v0.0.21

type AssumeRoleCredentialsProvider struct {
	AssumeRoleCredentials *sts.Credentials
}

AssumeRoleCredentialsProvider ...

func NewAssumeRoleCredentialsProvider added in v0.0.21

func NewAssumeRoleCredentialsProvider(credentials *sts.Credentials) *AssumeRoleCredentialsProvider

NewAssumeRoleCredentialsProvider returns a new AssumeRoleCredentialsProvider

func (AssumeRoleCredentialsProvider) IsExpired added in v0.0.21

func (c AssumeRoleCredentialsProvider) IsExpired() bool

IsExpired check whether the credentials are expired

func (AssumeRoleCredentialsProvider) Retrieve added in v0.0.21

Retrieve ...

type NewServiceInput added in v0.0.21

type NewServiceInput struct {
	AwsProfile          string
	AwsProfilePath      string
	RoleArn             string
	Policy              string
	RoleSessionName     string
	ExternalID          string
	Duration            int64
	IgnoreMissingTrails bool
}

NewServiceInput contains the info for creating a new Service

type OrgService added in v0.0.21

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

OrgService which connects to AWS organizations

func NewOrgService added in v0.0.21

func NewOrgService(input *NewServiceInput) (awsService *OrgService)

NewOrgService contains info needed for org setup

func (*OrgService) DescribeAccount added in v0.0.21

func (svc *OrgService) DescribeAccount(id string) (response *command.OrgNode, err error)

DescribeAccount given an id for an account provides additional information for that account

func (*OrgService) DescribeGroup added in v0.0.21

func (svc *OrgService) DescribeGroup(id string) (response *command.OrgNode, err error)

DescribeGroup given an id for an ou provides additional information about that ou

func (*OrgService) DescribeOrganization added in v0.0.21

func (svc *OrgService) DescribeOrganization() (response *command.Organization, err error)

DescribeOrganization provides the details of an organization

func (*OrgService) GetChildren added in v0.0.21

func (svc *OrgService) GetChildren(id string) (response []*command.OrgNode, err error)

GetChildren provides all the children for a particular account or OU

func (*OrgService) GetOrganizationTree added in v0.0.21

func (svc *OrgService) GetOrganizationTree() ([]*command.TreeNode, error)

GetOrganizationTree returns an array of treenode roots

func (*OrgService) GetRoots added in v0.0.21

func (svc *OrgService) GetRoots() (response []*command.OrgNode, err error)

GetRoots provides a list of all the root accounts in a particular organization

type RemoveService added in v0.0.23

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

RemoveService contains info needed for AWS event stream removal

func NewRemoveService added in v0.0.23

func NewRemoveService(input *NewServiceInput) *RemoveService

NewRemoveService returns an instance of RemoveService

func (*RemoveService) RemoveEventStream added in v0.0.23

func (a *RemoveService) RemoveEventStream(input *client.EventRemoveConfig) error

RemoveEventStream perform the same function as event stream removal script

type RoleService added in v0.0.21

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

RoleService interacts with aws role

func NewRoleService added in v0.0.21

func NewRoleService(input *NewServiceInput) *RoleService

NewRoleService returns a new RoleService

func (*RoleService) CreateNewRole added in v0.0.21

func (c *RoleService) CreateNewRole(input *client.RoleCreationInfo) (arn string, externalID string, err error)

CreateNewRole created a role with specified policy attached

func (*RoleService) DeleteRole added in v0.0.21

func (c *RoleService) DeleteRole(roleName string) error

DeleteRole will remove the role created before if the cloud account add fails

func (*RoleService) DetachPolicy added in v0.0.23

func (c *RoleService) DetachPolicy(roleName, policyArn string) error

DetachPolicy removes all policy for the role

type Service added in v0.0.21

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

Service contains three aws service groups

func NewService added in v0.0.21

func NewService(input *NewServiceInput) *Service

NewService returns a new aws service group

func (*Service) CreateNewRole added in v0.0.21

func (s *Service) CreateNewRole(input *client.RoleCreationInfo) (arn string, externalID string, err error)

CreateNewRole calls the CreateNewRole function in RoleService

func (*Service) DeleteRole added in v0.0.21

func (s *Service) DeleteRole(roleName string)

DeleteRole calls the DeleteRole function in RoleService

func (*Service) GetOrgTree added in v0.0.21

func (s *Service) GetOrgTree() ([]*command.TreeNode, error)

GetOrgTree calls the GetOrganizationTree function in OrgService

func (*Service) RemoveEventStream added in v0.0.23

func (s *Service) RemoveEventStream(input *client.EventRemoveConfig) error

RemoveEventStream perform the same function as event stream removal script

func (*Service) SetupEventStream added in v0.0.21

func (s *Service) SetupEventStream(input *client.EventStreamConfig) error

SetupEventStream calls the SetupEventStream function in SetupService

type SetupService added in v0.0.21

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

SetupService is the struct implements CloudProvider interface for aws

func NewSetupService added in v0.0.21

func NewSetupService(input *NewServiceInput) *SetupService

NewSetupService returns a pointer to a setup struct object

func (*SetupService) SetupEventStream added in v0.0.21

func (a *SetupService) SetupEventStream(input *client.EventStreamConfig) error

SetupEventStream sets up event stream for aws account

Jump to

Keyboard shortcuts

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