Documentation
¶
Index ¶
- Constants
- Variables
- type AWSCluster
- type AWSClusterMetadata
- type AWSClusterNodeGroup
- type AWSELB
- type AWSELBDescription
- type AWSFlavor
- type AWSInstanceType
- type AWSQuotas
- type AWSQuotasList
- type AWSServiceQuota
- type AwsCredentialsType
- type AwsGenericPlatform
- func (a *AwsGenericPlatform) GatherCloudletInfo(ctx context.Context, flavorMatchPattern string, info *edgeproto.CloudletInfo) error
- func (a *AwsGenericPlatform) GetAWSELBs(ctx context.Context) (*AWSELB, error)
- func (a *AwsGenericPlatform) GetAwsAccessKeyId() string
- func (a *AwsGenericPlatform) GetAwsAccountAccessVars(ctx context.Context, accessApi platform.AccessApi) error
- func (a *AwsGenericPlatform) GetAwsAmiIamOwner() string
- func (a *AwsGenericPlatform) GetAwsFlavorMatchPattern() string
- func (a *AwsGenericPlatform) GetAwsOutpostFlavors() string
- func (a *AwsGenericPlatform) GetAwsOutpostVPC() string
- func (a *AwsGenericPlatform) GetAwsRegion() string
- func (a *AwsGenericPlatform) GetAwsSecretAccessKey() string
- func (a *AwsGenericPlatform) GetAwsSessionToken(ctx context.Context, accessApi platform.AccessApi) error
- func (a *AwsGenericPlatform) GetAwsSessionTokenWithCode(ctx context.Context, code string) error
- func (a *AwsGenericPlatform) GetAwsUserArn() string
- func (a *AwsGenericPlatform) GetFlavorList(ctx context.Context, flavorMatchPattern string) ([]*edgeproto.FlavorInfo, error)
- func (a *AwsGenericPlatform) GetServiceQuotas(ctx context.Context, svcCode string) ([]AWSServiceQuota, error)
- func (a *AwsGenericPlatform) GetUserAccountIdFromArn(ctx context.Context, arn string) (string, error)
- func (a *AwsGenericPlatform) IsAwsOutpost() bool
- func (a *AwsGenericPlatform) RefreshAwsSessionToken(pfconfig *pf.PlatformConfig)
- func (a *AwsGenericPlatform) TimedAwsCommand(ctx context.Context, credType AwsCredentialsType, name string, p ...string) ([]byte, error)
- type AwsSessionCredentials
- type AwsSessionData
- type ELBListener
Constants ¶
View Source
const ( AwsCredentialsAccount = "account" AwsCredentialsSession = "session" AWSServiceCodeEKS = "eks" AWSServiceCodeELB = "elasticloadbalancing" // Codes used to identify service quota for AWS resources AWSServiceQuotaClusters = "L-1194D53C" AWSServiceQuotaNodeGroupsPerCluster = "L-6D54EA21" AWSServiceQuotaNodesPerNodeGroup = "L-BD136A63" AWSServiceQuotaNetworkLBPerRegion = "L-69A177A2" )
View Source
const ( AWS_ACCESS_KEY_ID = "AWS_ACCESS_KEY_ID" AWS_SECRET_ACCESS_KEY = "AWS_SECRET_ACCESS_KEY" AWS_TOTP_SECRET_KEY = "aws_totp_secret_key" )
View Source
const ArnAccountIdIdx = 4
View Source
const AwsSessionTokenRefreshInterval = 12 * time.Hour
View Source
const SessionTokenDurationSecs = 60 * 60 * 24 // 24 hours
View Source
const TotpTokenName = "code"
Variables ¶
View Source
var AWSProps = map[string]*edgeproto.PropertyInfo{ "AWS_REGION": { Name: "AWS Region", Description: "AWS Region", Mandatory: true, }, "FLAVOR_MATCH_PATTERN": &edgeproto.PropertyInfo{ Name: "Flavor Match Pattern", Description: "Flavors matching this pattern will be used by Cloudlet to bringup VMs", Value: "^[acdhimrtz]\\d+", }, "MEX_ROUTER": { Name: "External Router Type", Description: "AWS Router must be " + vmlayer.NoConfigExternalRouter, Value: vmlayer.NoConfigExternalRouter, }, "AWS_OUTPOST_VPC": { Name: "AWS Outpost VPC", Description: "Pre-existing VPC for an outpost deployment", }, "AWS_AMI_IAM_OWNER": { Name: "AWS Outpost AMI Owner", Description: "IAM Account that owns the base image", }, "AWS_OUTPOST_FLAVORS": { Name: "AWS Outpost Flavors", Description: "AWS Outpost Flavors in format flavor1,vcpu,ram,disk;flavor2.. e.g. c5.large,2,4096,40;c5.xlarge,4,8192,40", }, "AWS_USER_ARN": { Name: "AWS User ARN (Amazon Resource Name)", Description: "AWS User ARN (Amazon Resource Name)", }, }
View Source
var AccessVarProps = map[string]*edgeproto.PropertyInfo{ AWS_ACCESS_KEY_ID: { Name: "AWS access key", Mandatory: true, }, AWS_SECRET_ACCESS_KEY: { Name: "AWS secret key associated with the access key", Mandatory: true, }, AWS_TOTP_SECRET_KEY: { Name: "AWS totp secret key", Description: "If MFA is enabled, this is the secret key that will be used to generate RFC 6238 TOTP codes. This is the text equivalent of the TOTP QR code for authentication apps.", TotpSecret: true, }, }
Functions ¶
This section is empty.
Types ¶
type AWSCluster ¶
type AWSCluster struct {
Metadata AWSClusterMetadata
}
type AWSClusterMetadata ¶
type AWSClusterNodeGroup ¶
type AWSELB ¶
type AWSELB struct {
LoadBalancerDescriptions []AWSELBDescription
}
type AWSELBDescription ¶
type AWSELBDescription struct {
LoadBalancerName string
DNSName string
Scheme string
ListenerDescriptions []ELBListener
}
type AWSInstanceType ¶
type AWSInstanceType []interface{}
type AWSQuotasList ¶
type AWSQuotasList struct {
Quotas AWSQuotas
}
type AWSServiceQuota ¶
type AwsCredentialsType ¶
type AwsCredentialsType string
type AwsGenericPlatform ¶
type AwsGenericPlatform struct {
Properties *infracommon.InfraProperties
// AccountAccessVars are fixed for the account credentials used to access the APIs
AccountAccessVars map[string]string
// SessionAccessVars must be renewed periodically via MFA
SessionAccessVars map[string]string
}
func (*AwsGenericPlatform) GatherCloudletInfo ¶
func (a *AwsGenericPlatform) GatherCloudletInfo(ctx context.Context, flavorMatchPattern string, info *edgeproto.CloudletInfo) error
GatherCloudletInfo gets flavor info from AWS
func (*AwsGenericPlatform) GetAWSELBs ¶
func (a *AwsGenericPlatform) GetAWSELBs(ctx context.Context) (*AWSELB, error)
func (*AwsGenericPlatform) GetAwsAccessKeyId ¶
func (a *AwsGenericPlatform) GetAwsAccessKeyId() string
func (*AwsGenericPlatform) GetAwsAccountAccessVars ¶
func (*AwsGenericPlatform) GetAwsAmiIamOwner ¶
func (a *AwsGenericPlatform) GetAwsAmiIamOwner() string
func (*AwsGenericPlatform) GetAwsFlavorMatchPattern ¶
func (a *AwsGenericPlatform) GetAwsFlavorMatchPattern() string
func (*AwsGenericPlatform) GetAwsOutpostFlavors ¶
func (a *AwsGenericPlatform) GetAwsOutpostFlavors() string
func (*AwsGenericPlatform) GetAwsOutpostVPC ¶
func (a *AwsGenericPlatform) GetAwsOutpostVPC() string
func (*AwsGenericPlatform) GetAwsRegion ¶
func (a *AwsGenericPlatform) GetAwsRegion() string
func (*AwsGenericPlatform) GetAwsSecretAccessKey ¶
func (a *AwsGenericPlatform) GetAwsSecretAccessKey() string
func (*AwsGenericPlatform) GetAwsSessionToken ¶
func (a *AwsGenericPlatform) GetAwsSessionToken(ctx context.Context, accessApi platform.AccessApi) error
GetAwsSessionToken gets a totp code from the vault and then gets an AWS session token
func (*AwsGenericPlatform) GetAwsSessionTokenWithCode ¶
func (a *AwsGenericPlatform) GetAwsSessionTokenWithCode(ctx context.Context, code string) error
GetAwsSessionTokenWithCode uses the provided code to get session token details from AWS
func (*AwsGenericPlatform) GetAwsUserArn ¶
func (a *AwsGenericPlatform) GetAwsUserArn() string
func (*AwsGenericPlatform) GetFlavorList ¶
func (a *AwsGenericPlatform) GetFlavorList(ctx context.Context, flavorMatchPattern string) ([]*edgeproto.FlavorInfo, error)
func (*AwsGenericPlatform) GetServiceQuotas ¶
func (a *AwsGenericPlatform) GetServiceQuotas(ctx context.Context, svcCode string) ([]AWSServiceQuota, error)
func (*AwsGenericPlatform) GetUserAccountIdFromArn ¶
func (*AwsGenericPlatform) IsAwsOutpost ¶
func (a *AwsGenericPlatform) IsAwsOutpost() bool
func (*AwsGenericPlatform) RefreshAwsSessionToken ¶
func (a *AwsGenericPlatform) RefreshAwsSessionToken(pfconfig *pf.PlatformConfig)
RefreshAwsSessionToken periodically gets a new session token
func (*AwsGenericPlatform) TimedAwsCommand ¶
func (a *AwsGenericPlatform) TimedAwsCommand(ctx context.Context, credType AwsCredentialsType, name string, p ...string) ([]byte, error)
type AwsSessionCredentials ¶
type AwsSessionData ¶
type AwsSessionData struct {
Credentials AwsSessionCredentials
}
Click to show internal directories.
Click to hide internal directories.