Documentation ¶
Index ¶
- func IsUnauthorizedError(err error) bool
- func PrintProfiles(profiles []*api.FargateProfile, writer io.Writer, printerType printers.Type) error
- type Client
- func (c *Client) CreateProfile(ctx context.Context, profile *api.FargateProfile, waitForCreation bool) error
- func (c *Client) DeleteProfile(ctx context.Context, name string, waitForDeletion bool) error
- func (c *Client) ListProfiles(ctx context.Context) ([]string, error)
- func (c *Client) ReadProfile(ctx context.Context, name string) (*api.FargateProfile, error)
- func (c *Client) ReadProfiles(ctx context.Context) ([]*api.FargateProfile, error)
- type CreateOptions
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsUnauthorizedError ¶
IsUnauthorizedError reports whether the error is an authorization error Unauthorized errors are of the form:
AccessDeniedException: Account <account> is not authorized to use this service
func PrintProfiles ¶
func PrintProfiles(profiles []*api.FargateProfile, writer io.Writer, printerType printers.Type) error
PrintProfiles formats the provided profiles in the provided printer type ("table", "json", "yaml") and prints them to the provided writer.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps around an EKS API client to expose high-level methods.
func NewFromProvider ¶
func NewFromProvider(clusterName string, provider api.ClusterProvider, stackManager manager.StackManager) Client
func NewWithRetryPolicy ¶
func NewWithRetryPolicy(clusterName string, api awsapi.EKS, retryPolicy retry.Policy, stackManager manager.StackManager) Client
NewWithRetryPolicy returns a new Fargate client configured with the provided retry policy for blocking/waiting operations.
func (*Client) CreateProfile ¶
func (c *Client) CreateProfile(ctx context.Context, profile *api.FargateProfile, waitForCreation bool) error
CreateProfile creates the provided Fargate profile.
func (*Client) DeleteProfile ¶
DeleteProfile drains and delete the Fargate profile with the provided name.
func (*Client) ListProfiles ¶
ListProfiles lists all existing Fargate profiles.
func (*Client) ReadProfile ¶
ReadProfile reads the Fargate profile corresponding to the provided name if it exists.
func (*Client) ReadProfiles ¶
ReadProfiles reads all existing Fargate profiles.
type CreateOptions ¶
type CreateOptions struct { ProfileName string ProfileSelectorNamespace string // +optional ProfileSelectorLabels map[string]string // +optional Tags map[string]string }
CreateOptions groups the parameters required to create a Fargate profile.
func (CreateOptions) ToFargateProfile ¶
func (o CreateOptions) ToFargateProfile() *api.FargateProfile
ToFargateProfile creates a FargateProfile object from this Options object.
func (*CreateOptions) Validate ¶
func (o *CreateOptions) Validate() error
Validate validates this Options object's fields.