Documentation ¶
Index ¶
- Constants
- func FetchSupportedBillingModels(userQuotas *accountmgmtutil.OrgQuotas) []string
- func FetchValidKafkaSizes(f *factory.Factory, providerID string, regionId string, ...) ([]kafkamgmtclient.SupportedKafkaSize, error)
- func FetchValidKafkaSizesLabels(f *factory.Factory, providerID string, regionId string, ...) ([]string, error)
- func FetchValidMarketplaceAccounts(amsTypes []accountmgmtutil.QuotaSpec, marketplace string) []string
- func FetchValidMarketplaces(amsTypes []accountmgmtutil.QuotaSpec) []string
- func GetBillingModelCompletionValues(f *factory.Factory) (availableBillingModels []string, directive cobra.ShellCompDirective)
- 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) (validSizes []string, directive cobra.ShellCompDirective)
- func GetMarketplaceAccountCompletionValues(f *factory.Factory, marketplace string) (validMarketplaceAcctIDs []string, directive cobra.ShellCompDirective)
- func GetMarketplaceCompletionValues(f *factory.Factory) (validSizes []string, directive cobra.ShellCompDirective)
- func GetValidKafkaSizesLabels(sizes []kafkamgmtclient.SupportedKafkaSize) []string
- func IsRegionAllowed(region *kafkamgmtclient.CloudRegion, ...) bool
- func NewCreateCommand(f *factory.Factory) *cobra.Command
- func ValidateBillingModel(billingModel string) error
- 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" // FlagMarketPlace is a flag representing billing model of the instance FlagBillingModel = "billing-model" )
Variables ¶
This section is empty.
Functions ¶
func FetchSupportedBillingModels ¶ added in v0.46.0
func FetchSupportedBillingModels(userQuotas *accountmgmtutil.OrgQuotas) []string
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 FetchValidMarketplaceAccounts ¶ added in v0.46.0
func FetchValidMarketplaceAccounts(amsTypes []accountmgmtutil.QuotaSpec, marketplace string) []string
func FetchValidMarketplaces ¶ added in v0.46.0
func FetchValidMarketplaces(amsTypes []accountmgmtutil.QuotaSpec) []string
func GetBillingModelCompletionValues ¶ added in v0.46.0
func GetBillingModelCompletionValues(f *factory.Factory) (availableBillingModels []string, directive cobra.ShellCompDirective)
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) (validSizes []string, directive cobra.ShellCompDirective)
GetKafkaSizeCompletionValues returns a list of valid kafka sizes for the specified region and ams instance types
func GetMarketplaceAccountCompletionValues ¶ added in v0.46.0
func GetMarketplaceCompletionValues ¶ added in v0.44.0
func GetMarketplaceCompletionValues(f *factory.Factory) (validSizes []string, directive cobra.ShellCompDirective)
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
func NewCreateCommand ¶
NewCreateCommand creates a new command for creating kafkas. nolint: funlen
func ValidateBillingModel ¶ added in v0.46.0
ValidateBillingModel validates if user provided a supported billing model
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