Documentation
¶
Index ¶
- Constants
- func FetchValidKafkaSizes(f *factory.Factory, providerID string, regionId string, ...) ([]kafkamgmtclient.SupportedKafkaSize, error)
- func FetchValidKafkaSizesLabels(f *factory.Factory, providerID string, regionId string, ...) ([]string, error)
- func GetCloudProviderCompletionValues(f *factory.Factory) (validProviders []string, directive cobra.ShellCompDirective)
- func GetCloudProviderRegionCompletionValues(f *factory.Factory, providerID string) (validRegions []string, directive cobra.ShellCompDirective)
- func GetEnabledCloudProviderNames(f *factory.Factory) ([]string, error)
- func GetEnabledCloudRegionIDs(f *factory.Factory, providerID string, ...) ([]string, error)
- func GetKafkaSizeCompletionValues(f *factory.Factory, providerID string, regionId string) (validRegions []string, directive cobra.ShellCompDirective)
- func GetMarketplaceAcctIdCompletionValues(f *factory.Factory) (validMarketplaceAcctIDs []string, directive cobra.ShellCompDirective)
- func GetMarketplaceCompletionValues(f *factory.Factory) (validMarketplaces []string, directive cobra.ShellCompDirective)
- func GetValidKafkaSizesLabels(sizes []kafkamgmtclient.SupportedKafkaSize) []string
- func IsRegionAllowed(region *kafkamgmtclient.CloudRegion, ...) bool
- func NewCreateCommand(f *factory.Factory) *cobra.Command
- type CloudProviderId
- type ValidatorInput
Constants ¶
const ( // FlagProvider is a flag representing an provider ID FlagProvider = "provider" // FlagRegion is a flag representing an region ID FlagRegion = "region" // FlagSize is a flag representing an size ID FlagSize = "size" // FlagMarketPlaceAcctID is a flag representing a marketplace cloud account ID used to purchase the instance FlagMarketPlaceAcctID = "marketplace-account-id" // FlagMarketPlace is a flag representing marketplace where the instance is purchased on FlagMarketPlace = "marketplace" )
Variables ¶
This section is empty.
Functions ¶
func FetchValidKafkaSizes ¶ added in v0.43.0
func FetchValidKafkaSizes(f *factory.Factory, providerID string, regionId string, amsType accountmgmtutil.QuotaSpec) ([]kafkamgmtclient.SupportedKafkaSize, error)
return list of the valid instance sizes for the specified region and ams instance types
func FetchValidKafkaSizesLabels ¶ added in v0.43.0
func GetCloudProviderCompletionValues ¶ added in v0.42.0
func GetCloudProviderCompletionValues(f *factory.Factory) (validProviders []string, directive cobra.ShellCompDirective)
GetCloudProviderCompletionValues returns the list of supported cloud providers for creating a Kafka instance This is used in the cmd.RegisterFlagCompletionFunc for dynamic completion of --provider
func GetCloudProviderRegionCompletionValues ¶ added in v0.42.0
func GetCloudProviderRegionCompletionValues(f *factory.Factory, providerID string) (validRegions []string, directive cobra.ShellCompDirective)
GetCloudProviderRegionCompletionValues returns the list of region IDs for a particular cloud provider
func GetEnabledCloudProviderNames ¶ added in v0.42.0
GetEnabledCloudProviderNames returns a list of cloud provider names from the enabled cloud providers
func GetEnabledCloudRegionIDs ¶ added in v0.42.0
func GetEnabledCloudRegionIDs(f *factory.Factory, providerID string, userAllowedAMSInstanceType *accountmgmtutil.QuotaSpec) ([]string, error)
GetEnabledCloudRegionIDs extracts and returns a slice of the unique IDs of all enabled regions
func GetKafkaSizeCompletionValues ¶ added in v0.42.0
func GetKafkaSizeCompletionValues(f *factory.Factory, providerID string, regionId string) (validRegions []string, directive cobra.ShellCompDirective)
GetKafkaSizeCompletionValues returns a list of valid kafka sizes for the specified region and ams instance types
func GetMarketplaceAcctIdCompletionValues ¶ added in v0.44.0
func GetMarketplaceAcctIdCompletionValues(f *factory.Factory) (validMarketplaceAcctIDs []string, directive cobra.ShellCompDirective)
GetMarketplaceAcctIdCompletionValues returns a list of valid marketplace account IDs for the organization
func GetMarketplaceCompletionValues ¶ added in v0.44.0
func GetMarketplaceCompletionValues(f *factory.Factory) (validMarketplaces []string, directive cobra.ShellCompDirective)
GetMarketplaceCompletionValues returns a list of valid marketplaces for the organization
func GetValidKafkaSizesLabels ¶ added in v0.43.0
func GetValidKafkaSizesLabels(sizes []kafkamgmtclient.SupportedKafkaSize) []string
func IsRegionAllowed ¶ added in v0.42.0
func IsRegionAllowed(region *kafkamgmtclient.CloudRegion, userInstanceType *accountmgmtutil.QuotaSpec) bool
Types ¶
type CloudProviderId ¶ added in v0.42.0
type CloudProviderId = string
Types we use on backend to map AMS Quotas
const ( // Matches QuotaTrialType = trial DeveloperType CloudProviderId = "developer" // Matches QuotaStandardType = standard StandardType CloudProviderId = "standard" // Deprecated by DeveloperType TrialType CloudProviderId = "eval" )
Additional types that are used in backend to match AMS Quota instance types
type ValidatorInput ¶ added in v0.42.0
type ValidatorInput struct {
// contains filtered or unexported fields
}
func (*ValidatorInput) ValidateProviderAndRegion ¶ added in v0.42.0
func (input *ValidatorInput) ValidateProviderAndRegion() error
func (*ValidatorInput) ValidateSize ¶ added in v0.42.0
func (input *ValidatorInput) ValidateSize() error