awscli

package
v0.0.0-...-57c84ca Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClusterTagValueShared = "shared"
	ClusterTagValueOwned  = "owned"
)
View Source
const (
	ClusterPrefixKey = "kubernetes.io/cluster"
	SubnetRoleELBKey = "kubernetes.io/role/elb"
)

Variables

This section is empty.

Functions

func GetCloudProviderRC

func GetCloudProviderRC(s *mcclient.ClientSession, id string) (*jsonutils.JSONDict, error)

Types

type AwsCliRC

type AwsCliRC struct {
	AccessKey string
	SecretKey string
	Region    string
}

func GetAwsCliRCByProvider

func GetAwsCliRCByProvider(s *mcclient.ClientSession, managerId string, regionExId string) (*AwsCliRC, error)

func (*AwsCliRC) EC2AssociateIAMInstanceProfile

func (cli *AwsCliRC) EC2AssociateIAMInstanceProfile(instanceId string, profileName string) error

func (*AwsCliRC) EC2CreateTags

func (cli *AwsCliRC) EC2CreateTags(resource string, tag *Tag) error

func (*AwsCliRC) IAMAddRoleToInstanceProfile

func (cli *AwsCliRC) IAMAddRoleToInstanceProfile(profileName string, roleName string) error

func (*AwsCliRC) IAMAttachRolePolicy

func (cli *AwsCliRC) IAMAttachRolePolicy(roleName string, policyArn string) error

func (*AwsCliRC) IAMCreateInstanceProfile

func (cli *AwsCliRC) IAMCreateInstanceProfile(profileName string) error

func (*AwsCliRC) IAMCreatePolicy

func (cli *AwsCliRC) IAMCreatePolicy(policyName string, policyContent string, pathName string) (*Policy, error)

func (*AwsCliRC) IAMCreateRole

func (cli *AwsCliRC) IAMCreateRole(roleName string, policyContent string) error

func (*AwsCliRC) IAMEnsurePolicy

func (cli *AwsCliRC) IAMEnsurePolicy(policyName string, policyContent string, pathName string) (*Policy, error)

func (*AwsCliRC) IAMListPolicies

func (cli *AwsCliRC) IAMListPolicies(policyName string, pathPrefix string) ([]Policy, error)

func (*AwsCliRC) IAMPutRolePolicy

func (cli *AwsCliRC) IAMPutRolePolicy(roleName string, policyName string, policyContent string) error

func (AwsCliRC) ToEnv

func (ac AwsCliRC) ToEnv() []string

type ClusterTagValue

type ClusterTagValue string

type Policy

type Policy struct {
	PolicyName                    string    `json:"PolicyName"`
	PolicyId                      string    `json:"PolicyId"`
	Arn                           string    `json:"Arn"`
	Path                          string    `json:"Path"`
	DefaultVersionId              string    `json:"DefaultVersionId"`
	AttachmentCount               int       `json:"AttachmentCount"`
	PermissionsBoundaryUsageCount int       `json:"PermissionsBoundaryUsageCount"`
	IsAttachable                  bool      `json:"IsAttachable"`
	CreateDate                    time.Time `json:"CreateDate"`
	UpdateDate                    time.Time `json:"UpdateDate"`
}

type Tag

type Tag struct {
	Key   string
	Value string
}

func NewClusterTag

func NewClusterTag(clusterName string, cv ClusterTagValue) *Tag

func NewTag

func NewTag(key string, value string) *Tag

func (Tag) ToArgs

func (t Tag) ToArgs() string

Jump to

Keyboard shortcuts

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