Documentation ¶
Index ¶
- type Client
- func (c *Client) CreateBucketIfNotExists(ctx context.Context, bucket, region string) error
- func (c *Client) DeleteBucketIfExists(ctx context.Context, bucket string) error
- func (c *Client) DeleteELB(ctx context.Context, name string) error
- func (c *Client) DeleteObjectsWithPrefix(ctx context.Context, bucket, prefix string) error
- func (c *Client) DeleteSecurityGroup(ctx context.Context, id string) error
- func (c *Client) GetAccountID(ctx context.Context) (string, error)
- func (c *Client) GetInternetGateway(ctx context.Context, vpcID string) (string, error)
- func (c *Client) ListKubernetesELBs(ctx context.Context, vpcID, clusterName string) ([]string, error)
- func (c *Client) ListKubernetesSecurityGroups(ctx context.Context, vpcID, clusterName string) ([]string, error)
- type Interface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is a struct containing several clients for the different AWS services it needs to interact with. * EC2 is the standard client for the EC2 service. * ELB is the standard client for the ELB service. * STS is the standard client for the STS service. * S3 is the standard client for the S3 service.
func (*Client) CreateBucketIfNotExists ¶
CreateBucketIfNotExists creates the s3 bucket with name <bucket> in <region>. If it already exist, no error is returned.
func (*Client) DeleteBucketIfExists ¶
DeleteBucketIfExists deletes the s3 bucket with name <bucket>. If it does not exist, no error is returned.
func (*Client) DeleteELB ¶
DeleteELB deletes the load balancer with the specific <name>. If it does not exist, no error is returned.
func (*Client) DeleteObjectsWithPrefix ¶
DeleteObjectsWithPrefix deletes the s3 objects with the specific <prefix> from <bucket>. If it does not exist, no error is returned.
func (*Client) DeleteSecurityGroup ¶
DeleteSecurityGroup deletes the security group with the specific <id>. If it does not exist, no error is returned.
func (*Client) GetAccountID ¶
GetAccountID returns the ID of the AWS account the Client is interacting with.
func (*Client) GetInternetGateway ¶
GetInternetGateway returns the ID of the internet gateway attached to the given VPC <vpcID>. If there is no internet gateway attached, the returned string will be empty.
type Interface ¶
type Interface interface { GetAccountID(ctx context.Context) (string, error) GetInternetGateway(ctx context.Context, vpcID string) (string, error) // S3 wrappers DeleteObjectsWithPrefix(ctx context.Context, bucket, prefix string) error CreateBucketIfNotExists(ctx context.Context, bucket, region string) error DeleteBucketIfExists(ctx context.Context, bucket string) error // The following functions are only temporary needed due to https://github.com/gardener/gardener/issues/129. ListKubernetesELBs(ctx context.Context, vpcID, clusterName string) ([]string, error) ListKubernetesSecurityGroups(ctx context.Context, vpcID, clusterName string) ([]string, error) DeleteELB(ctx context.Context, name string) error DeleteSecurityGroup(ctx context.Context, id string) error }
Interface is an interface which must be implemented by AWS clients.