Documentation ¶
Index ¶
- func AddChildNode(nodeInfo *command.OrgNode, parent *command.TreeNode) (node *command.TreeNode, isRoot bool)
- func PrintTree(root *command.TreeNode)
- type AssumeRoleCredentialsProvider
- type NewServiceInput
- type OrgService
- func (svc *OrgService) DescribeAccount(id string) (response *command.OrgNode, err error)
- func (svc *OrgService) DescribeGroup(id string) (response *command.OrgNode, err error)
- func (svc *OrgService) DescribeOrganization() (response *command.Organization, err error)
- func (svc *OrgService) GetChildren(id string) (response []*command.OrgNode, err error)
- func (svc *OrgService) GetOrganizationTree() ([]*command.TreeNode, error)
- func (svc *OrgService) GetRoots() (response []*command.OrgNode, err error)
- type RemoveService
- type RoleService
- type Service
- func (s *Service) CreateNewRole(input *client.RoleCreationInfo) (arn string, externalID string, err error)
- func (s *Service) DeleteRole(roleName string)
- func (s *Service) GetOrgTree() ([]*command.TreeNode, error)
- func (s *Service) RemoveEventStream(input *client.EventRemoveConfig) error
- func (s *Service) SetupEventStream(input *client.EventStreamConfig) error
- type SetupService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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
func (c AssumeRoleCredentialsProvider) Retrieve() (credentials.Value, error)
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)
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
type RemoveService ¶ added in v0.0.23
type RemoveService struct {
// contains filtered or unexported fields
}
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
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
DeleteRole calls the DeleteRole function in RoleService
func (*Service) GetOrgTree ¶ added in v0.0.21
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