diff --git a/amazon-eks-ami/CHANGELOG.md b/amazon-eks-ami/CHANGELOG.md index 60f733c6..7f304d92 100644 --- a/amazon-eks-ami/CHANGELOG.md +++ b/amazon-eks-ami/CHANGELOG.md @@ -5,12 +5,7 @@ # AMI Release v20240928 > **Note** -> AWS is aware of the disclosed issues in nvidia-container-toolkit assigned CVE identifier CVE-2024-0132 relating to EKS GPU AMI (both AL2 and AL2023). -> -> Updated Amazon EKS AMIs will be made available by October 2, 2024. As a general security best practice, we recommend that EKS customers update their configurations to launch new worker nodes from the latest AMI version. Customers using Managed node groups can upgrade their node groups by referring to the EKS documentation [1]. Please refer to the EKS documentation to replace your existing instances with your self-managing worker nodes with the new AMI version [2]. -> -> [1] https://docs.aws.amazon.com/eks/latest/userguide/update-managed-node-group.html -> [2] https://docs.aws.amazon.com/eks/latest/userguide/update-workers.html +> This release includes a security patch for the vulnerabilities CVE-2024-0132 and CVE-2024-0133 in the nvidia-container-toolkit package. The patch has been applied to the Amazon EKS Accelerated Amazon Machine Image (AMI) for both Amazon Linux 2 and Amazon Linux 2023 versions. ## What's Changed * Fix cn build by @Issacwww in https://github.com/awslabs/amazon-eks-ami/pull/1980 @@ -27382,4 +27377,4 @@ Note: CNI >= 1.2.1 is required for t3 and r5 instance support. * EKS Launch AMI - \ No newline at end of file + diff --git a/amazon-eks-ami/nodeadm/cmd/nodeadm/init/init.go b/amazon-eks-ami/nodeadm/cmd/nodeadm/init/init.go index febb1159..1d4e818e 100644 --- a/amazon-eks-ami/nodeadm/cmd/nodeadm/init/init.go +++ b/amazon-eks-ami/nodeadm/cmd/nodeadm/init/init.go @@ -5,7 +5,6 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/config" - "github.com/aws/aws-sdk-go-v2/feature/ec2/imds" "github.com/aws/aws-sdk-go-v2/service/ec2" "github.com/integrii/flaggy" "go.uber.org/zap" @@ -13,6 +12,7 @@ import ( "github.com/awslabs/amazon-eks-ami/nodeadm/internal/api" "github.com/awslabs/amazon-eks-ami/nodeadm/internal/aws/ecr" + "github.com/awslabs/amazon-eks-ami/nodeadm/internal/aws/imds" "github.com/awslabs/amazon-eks-ami/nodeadm/internal/cli" "github.com/awslabs/amazon-eks-ami/nodeadm/internal/configprovider" "github.com/awslabs/amazon-eks-ami/nodeadm/internal/containerd" @@ -146,14 +146,18 @@ func (c *initCmd) Run(log *zap.Logger, opts *cli.GlobalOptions) error { // perform in-place updates when allowed by the user func enrichConfig(log *zap.Logger, cfg *api.NodeConfig) error { log.Info("Fetching instance details..") - imdsClient := imds.New(imds.Options{}) - awsConfig, err := config.LoadDefaultConfig(context.TODO(), config.WithClientLogMode(aws.LogRetries), config.WithEC2IMDSRegion(func(o *config.UseEC2IMDSRegion) { - o.Client = imdsClient - })) + awsConfig, err := config.LoadDefaultConfig(context.TODO(), + config.WithClientLogMode(aws.LogRetries), + config.WithEC2IMDSRegion(func(o *config.UseEC2IMDSRegion) { + // Use our pre-configured IMDS client to avoid hitting common retry + // issues with the default config. + o.Client = imds.Client + }), + ) if err != nil { return err } - instanceDetails, err := api.GetInstanceDetails(context.TODO(), cfg.Spec.FeatureGates, imdsClient, ec2.NewFromConfig(awsConfig)) + instanceDetails, err := api.GetInstanceDetails(context.TODO(), cfg.Spec.FeatureGates, ec2.NewFromConfig(awsConfig)) if err != nil { return err } diff --git a/amazon-eks-ami/nodeadm/go.mod b/amazon-eks-ami/nodeadm/go.mod index b0d18deb..c56e7ef7 100644 --- a/amazon-eks-ami/nodeadm/go.mod +++ b/amazon-eks-ami/nodeadm/go.mod @@ -3,11 +3,11 @@ module github.com/awslabs/amazon-eks-ami/nodeadm go 1.22.5 require ( - github.com/aws/aws-sdk-go-v2/config v1.27.39 - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 - github.com/aws/aws-sdk-go-v2/service/ec2 v1.179.2 - github.com/aws/aws-sdk-go-v2/service/ecr v1.35.3 - github.com/aws/smithy-go v1.21.0 + github.com/aws/aws-sdk-go-v2/config v1.27.41 + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.15 + github.com/aws/aws-sdk-go-v2/service/ec2 v1.181.0 + github.com/aws/aws-sdk-go-v2/service/ecr v1.36.0 + github.com/aws/smithy-go v1.22.0 github.com/containerd/containerd v1.7.22 github.com/coreos/go-systemd/v22 v22.5.0 github.com/integrii/flaggy v1.5.2 @@ -36,16 +36,16 @@ require ( require dario.cat/mergo v1.0.1 // direct require ( - github.com/aws/aws-sdk-go-v2 v1.31.0 - github.com/aws/aws-sdk-go-v2/credentials v1.17.37 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 // indirect + github.com/aws/aws-sdk-go-v2 v1.32.0 + github.com/aws/aws-sdk-go-v2/credentials v1.17.39 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.19 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.19 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.23.3 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.31.3 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.24.0 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.32.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect diff --git a/amazon-eks-ami/nodeadm/go.sum b/amazon-eks-ami/nodeadm/go.sum index 912a375a..07b010e1 100644 --- a/amazon-eks-ami/nodeadm/go.sum +++ b/amazon-eks-ami/nodeadm/go.sum @@ -2,36 +2,36 @@ dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= -github.com/aws/aws-sdk-go-v2 v1.31.0 h1:3V05LbxTSItI5kUqNwhJrrrY1BAXxXt0sN0l72QmG5U= -github.com/aws/aws-sdk-go-v2 v1.31.0/go.mod h1:ztolYtaEUtdpf9Wftr31CJfLVjOnD/CVRkKOOYgF8hA= -github.com/aws/aws-sdk-go-v2/config v1.27.39 h1:FCylu78eTGzW1ynHcongXK9YHtoXD5AiiUqq3YfJYjU= -github.com/aws/aws-sdk-go-v2/config v1.27.39/go.mod h1:wczj2hbyskP4LjMKBEZwPRO1shXY+GsQleab+ZXT2ik= -github.com/aws/aws-sdk-go-v2/credentials v1.17.37 h1:G2aOH01yW8X373JK419THj5QVqu9vKEwxSEsGxihoW0= -github.com/aws/aws-sdk-go-v2/credentials v1.17.37/go.mod h1:0ecCjlb7htYCptRD45lXJ6aJDQac6D2NlKGpZqyTG6A= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 h1:C/d03NAmh8C4BZXhuRNboF/DqhBkBCeDiJDcaqIT5pA= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14/go.mod h1:7I0Ju7p9mCIdlrfS+JCgqcYD0VXz/N4yozsox+0o078= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 h1:kYQ3H1u0ANr9KEKlGs/jTLrBFPo8P8NaH/w7A01NeeM= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18/go.mod h1:r506HmK5JDUh9+Mw4CfGJGSSoqIiLCndAuqXuhbv67Y= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 h1:Z7IdFUONvTcvS7YuhtVxN99v2cCoHRXOS4mTr0B/pUc= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18/go.mod h1:DkKMmksZVVyat+Y+r1dEOgJEfUeA7UngIHWeKsi0yNc= +github.com/aws/aws-sdk-go-v2 v1.32.0 h1:GuHp7GvMN74PXD5C97KT5D87UhIy4bQPkflQKbfkndg= +github.com/aws/aws-sdk-go-v2 v1.32.0/go.mod h1:2SK5n0a2karNTv5tbP1SjsX0uhttou00v/HpXKM1ZUo= +github.com/aws/aws-sdk-go-v2/config v1.27.41 h1:esG3WpmEuNJ6F4kVFLumN8nCfA5VBav1KKb3JPx83O4= +github.com/aws/aws-sdk-go-v2/config v1.27.41/go.mod h1:haUg09ebP+ClvPjU3EB/xe0HF9PguO19PD2fdjM2X14= +github.com/aws/aws-sdk-go-v2/credentials v1.17.39 h1:tmVexAhoGqJxNE2oc4/SJqL+Jz1x1iCPt5ts9XcqZCU= +github.com/aws/aws-sdk-go-v2/credentials v1.17.39/go.mod h1:zgOdbDI9epE608PdboJ87CYvPIejAgFevazeJW6iauQ= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.15 h1:kGjlNc2IXXcxPDcfMyCshNCjVgxUhC/vTJv7NvC9wKk= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.15/go.mod h1:rk/HmqPo+dX0Uv0Q1+4w3QKFdICEGSsTYz1hRWvH8UI= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.19 h1:Q/k5wCeJkSWs+62kDfOillkNIJ5NqmE3iOfm48g/W8c= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.19/go.mod h1:Wns1C66VvtA2Bv/cUBuKZKQKdjo7EVMhp90aAa+8oTI= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.19 h1:AYLE0lUfKvN6icFTR/p+NmD1amYKTbqHQ1Nm+jwE6BM= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.19/go.mod h1:1giLakj64GjuH1NBzF/DXqly5DWHtMTaOzRZ53nFX0I= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.179.2 h1:rGBv2N0zWvNTKnxOfbBH4mNM8WMdDNkaxdqtz152G40= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.179.2/go.mod h1:W6sNzs5T4VpZn1Vy+FMKw8s24vt5k6zPJXcNOK0asBo= -github.com/aws/aws-sdk-go-v2/service/ecr v1.35.3 h1:8/vARxqd0Pn2Gqhp+8PxxTm3HttUMR1i1vBBj7MNFfc= -github.com/aws/aws-sdk-go-v2/service/ecr v1.35.3/go.mod h1:oRaGEExKI6Pqcow+Tt7wpJf73/Srcj/CUJv5Eb9QFhg= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 h1:QFASJGfT8wMXtuP3D5CRmMjARHv9ZmzFUMJznHDOY3w= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5/go.mod h1:QdZ3OmoIjSX+8D1OPAzPxDfjXASbBMDsz9qvtyIhtik= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 h1:Xbwbmk44URTiHNx6PNo0ujDE6ERlsCKJD3u1zfnzAPg= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20/go.mod h1:oAfOFzUB14ltPZj1rWwRc3d/6OgD76R8KlvU3EqM9Fg= -github.com/aws/aws-sdk-go-v2/service/sso v1.23.3 h1:rs4JCczF805+FDv2tRhZ1NU0RB2H6ryAvsWPanAr72Y= -github.com/aws/aws-sdk-go-v2/service/sso v1.23.3/go.mod h1:XRlMvmad0ZNL+75C5FYdMvbbLkd6qiqz6foR1nA1PXY= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3 h1:S7EPdMVZod8BGKQQPTBK+FcX9g7bKR7c4+HxWqHP7Vg= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3/go.mod h1:FnvDM4sfa+isJ3kDXIzAB9GAwVSzFzSy97uZ3IsHo4E= -github.com/aws/aws-sdk-go-v2/service/sts v1.31.3 h1:VzudTFrDCIDakXtemR7l6Qzt2+JYsVqo2MxBPt5k8T8= -github.com/aws/aws-sdk-go-v2/service/sts v1.31.3/go.mod h1:yMWe0F+XG0DkRZK5ODZhG7BEFYhLXi2dqGsv6tX0cgI= -github.com/aws/smithy-go v1.21.0 h1:H7L8dtDRk0P1Qm6y0ji7MCYMQObJ5R9CRpyPhRUkLYA= -github.com/aws/smithy-go v1.21.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.181.0 h1:YzSOMQYRZQKuLz/bD6illIGwJfa1WFfeFAZM5Zr5LB8= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.181.0/go.mod h1:CudaKF0Yu5+ZfKMiiPdtJ/kOOBty7CIEJUhESP52e9M= +github.com/aws/aws-sdk-go-v2/service/ecr v1.36.0 h1:OVg61nfvhkvneY2btZ50sdYHsvhJs46dqtuBiURZo2A= +github.com/aws/aws-sdk-go-v2/service/ecr v1.36.0/go.mod h1:kdKXMMVpJd/N59EYI8aneYNsQNqCd99iSg2bEmQHaUI= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 h1:TToQNkvGguu209puTojY/ozlqy2d/SFNcoLIqTFi42g= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0/go.mod h1:0jp+ltwkf+SwG2fm/PKo8t4y8pJSgOCO4D8Lz3k0aHQ= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.0 h1:AdbiDUgQZmM28rDIZbiSwFxz8+3B94aOXxzs6oH+EA0= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.0/go.mod h1:uV476Bd80tiDTX4X2redMtagQUg65aU/gzPojSJ4kSI= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.0 h1:71FvP6XFj53NK+YiAEGVzeiccLVeFnHOCvMig0zOHsE= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.0/go.mod h1:UVJqtKXSd9YppRKgdBIkyv7qgbSGv5DchM3yX0BN2mU= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.0 h1:Uco4o19bi3AmBapImNzuMk+rfzlui52BDyVK1UfJeRA= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.0/go.mod h1:+HLFhCpnG08hBee8bUdfd1mBK+rFKPt4O5igR9lXDfk= +github.com/aws/aws-sdk-go-v2/service/sts v1.32.0 h1:GiQUjZM2KUZX68o/LpZ1xqxYMuvoxpRrOwYARYog3vc= +github.com/aws/aws-sdk-go-v2/service/sts v1.32.0/go.mod h1:dKnu7M4MAS2SDlng1ytxd03H+y0LoUfEQ5E2VaaSw/4= +github.com/aws/smithy-go v1.22.0 h1:uunKnWlcoL3zO7q+gG2Pk53joueEOsnNB28QdMsmiMM= +github.com/aws/smithy-go v1.22.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= diff --git a/amazon-eks-ami/nodeadm/internal/api/status.go b/amazon-eks-ami/nodeadm/internal/api/status.go index b49a72a1..4490f2e3 100644 --- a/amazon-eks-ami/nodeadm/internal/api/status.go +++ b/amazon-eks-ami/nodeadm/internal/api/status.go @@ -3,34 +3,29 @@ package api import ( "context" "fmt" - "io" "time" "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/feature/ec2/imds" "github.com/aws/aws-sdk-go-v2/service/ec2" ec2extra "github.com/awslabs/amazon-eks-ami/nodeadm/internal/aws/ec2" + "github.com/awslabs/amazon-eks-ami/nodeadm/internal/aws/imds" ) // Fetch information about the ec2 instance using IMDS data. // This information is stored into the internal config to avoid redundant calls // to IMDS when looking for instance metadata -func GetInstanceDetails(ctx context.Context, featureGates map[Feature]bool, imdsClient *imds.Client, ec2Client *ec2.Client) (*InstanceDetails, error) { - instanceIdenitityDocument, err := imdsClient.GetInstanceIdentityDocument(ctx, &imds.GetInstanceIdentityDocumentInput{}) +func GetInstanceDetails(ctx context.Context, featureGates map[Feature]bool, ec2Client *ec2.Client) (*InstanceDetails, error) { + instanceIdenitityDocument, err := imds.GetInstanceIdentityDocument(ctx) if err != nil { return nil, err } - macResponse, err := imdsClient.GetMetadata(ctx, &imds.GetMetadataInput{Path: "mac"}) - if err != nil { - return nil, err - } - mac, err := io.ReadAll(macResponse.Content) + mac, err := imds.GetProperty(ctx, "mac") if err != nil { return nil, err } - privateDNSName := "" + var privateDNSName string if !IsFeatureEnabled(InstanceIdNodeName, featureGates) { privateDNSName, err = getPrivateDNSName(ec2Client, instanceIdenitityDocument.InstanceID) if err != nil { diff --git a/amazon-eks-ami/nodeadm/internal/aws/ecr/ecr.go b/amazon-eks-ami/nodeadm/internal/aws/ecr/ecr.go index 3e317c31..4616d64b 100644 --- a/amazon-eks-ami/nodeadm/internal/aws/ecr/ecr.go +++ b/amazon-eks-ami/nodeadm/internal/aws/ecr/ecr.go @@ -39,7 +39,7 @@ func (r *ECRRegistry) GetSandboxImage() string { func GetEKSRegistry(region string) (ECRRegistry, error) { account, region := getEKSRegistryCoordinates(region) - servicesDomain, err := imds.GetProperty(imds.ServicesDomain) + servicesDomain, err := imds.GetProperty(context.TODO(), imds.ServicesDomain) if err != nil { return "", err } diff --git a/amazon-eks-ami/nodeadm/internal/aws/imds/imds.go b/amazon-eks-ami/nodeadm/internal/aws/imds/imds.go index fd068456..46b4f686 100644 --- a/amazon-eks-ami/nodeadm/internal/aws/imds/imds.go +++ b/amazon-eks-ami/nodeadm/internal/aws/imds/imds.go @@ -9,14 +9,24 @@ import ( "github.com/aws/aws-sdk-go-v2/feature/ec2/imds" ) -var client *imds.Client +var Client *imds.Client func init() { - client = imds.New(imds.Options{ + Client = imds.New(imds.Options{ DisableDefaultTimeout: true, Retryer: retry.NewStandard(func(so *retry.StandardOptions) { so.MaxAttempts = 15 so.MaxBackoff = 1 * time.Second + so.Retryables = append(so.Retryables, + &retry.RetryableHTTPStatusCode{ + Codes: map[int]struct{}{ + // Retry 404s due to the rare occurrence that + // credentials take longer to propagate through IMDS and + // fail on the first call. + 404: {}, + }, + }, + ) }), }) } @@ -27,24 +37,28 @@ const ( ServicesDomain IMDSProperty = "services/domain" ) -func GetUserData() ([]byte, error) { - resp, err := client.GetUserData(context.TODO(), &imds.GetUserDataInput{}) +func GetInstanceIdentityDocument(ctx context.Context) (*imds.GetInstanceIdentityDocumentOutput, error) { + return Client.GetInstanceIdentityDocument(ctx, &imds.GetInstanceIdentityDocumentInput{}) +} + +func GetUserData(ctx context.Context) ([]byte, error) { + res, err := Client.GetUserData(ctx, &imds.GetUserDataInput{}) if err != nil { return nil, err } - return io.ReadAll(resp.Content) + return io.ReadAll(res.Content) } -func GetProperty(prop IMDSProperty) (string, error) { - bytes, err := GetPropertyBytes(prop) +func GetProperty(ctx context.Context, prop IMDSProperty) (string, error) { + bytes, err := GetPropertyBytes(ctx, prop) if err != nil { return "", err } return string(bytes), nil } -func GetPropertyBytes(prop IMDSProperty) ([]byte, error) { - res, err := client.GetMetadata(context.TODO(), &imds.GetMetadataInput{Path: string(prop)}) +func GetPropertyBytes(ctx context.Context, prop IMDSProperty) ([]byte, error) { + res, err := Client.GetMetadata(ctx, &imds.GetMetadataInput{Path: string(prop)}) if err != nil { return nil, err } diff --git a/amazon-eks-ami/nodeadm/internal/configprovider/userdata.go b/amazon-eks-ami/nodeadm/internal/configprovider/userdata.go index 55f1ebce..344c5d4e 100644 --- a/amazon-eks-ami/nodeadm/internal/configprovider/userdata.go +++ b/amazon-eks-ami/nodeadm/internal/configprovider/userdata.go @@ -1,6 +1,7 @@ package configprovider import ( + "context" "fmt" "github.com/awslabs/amazon-eks-ami/nodeadm/api" @@ -22,7 +23,7 @@ type userDataProvider interface { type imdsUserDataProvider struct{} func (p *imdsUserDataProvider) GetUserData() ([]byte, error) { - return imds.GetUserData() + return imds.GetUserData(context.TODO()) } type userDataConfigProvider struct { diff --git a/amazon-eks-ami/nodeadm/internal/kubelet/config.go b/amazon-eks-ami/nodeadm/internal/kubelet/config.go index cb607382..ae3d976a 100644 --- a/amazon-eks-ami/nodeadm/internal/kubelet/config.go +++ b/amazon-eks-ami/nodeadm/internal/kubelet/config.go @@ -5,7 +5,6 @@ import ( _ "embed" "encoding/json" "fmt" - "io" "net" "net/url" "os" @@ -20,10 +19,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8skubelet "k8s.io/kubelet/config/v1beta1" - "github.com/aws/aws-sdk-go-v2/feature/ec2/imds" "github.com/aws/smithy-go/ptr" "github.com/awslabs/amazon-eks-ami/nodeadm/internal/api" + "github.com/awslabs/amazon-eks-ami/nodeadm/internal/aws/imds" "github.com/awslabs/amazon-eks-ami/nodeadm/internal/containerd" "github.com/awslabs/amazon-eks-ami/nodeadm/internal/system" "github.com/awslabs/amazon-eks-ami/nodeadm/internal/util" @@ -203,7 +202,7 @@ func (ksc *kubeletConfig) withOutpostSetup(cfg *api.NodeConfig) error { } func (ksc *kubeletConfig) withNodeIp(cfg *api.NodeConfig, flags map[string]string) error { - nodeIp, err := getNodeIp(context.TODO(), imds.New(imds.Options{}), cfg) + nodeIp, err := getNodeIp(context.TODO(), cfg) if err != nil { return err } @@ -407,36 +406,24 @@ func getProviderId(availabilityZone, instanceId string) string { } // Get the IP of the node depending on the ipFamily configured for the cluster -func getNodeIp(ctx context.Context, imdsClient *imds.Client, cfg *api.NodeConfig) (string, error) { +func getNodeIp(ctx context.Context, cfg *api.NodeConfig) (string, error) { ipFamily, err := api.GetCIDRIpFamily(cfg.Spec.Cluster.CIDR) if err != nil { return "", err } switch ipFamily { case api.IPFamilyIPv4: - ipv4Response, err := imdsClient.GetMetadata(ctx, &imds.GetMetadataInput{ - Path: "local-ipv4", - }) + ipv4, err := imds.GetProperty(ctx, "local-ipv4") if err != nil { return "", err } - ip, err := io.ReadAll(ipv4Response.Content) - if err != nil { - return "", err - } - return string(ip), nil + return ipv4, nil case api.IPFamilyIPv6: - ipv6Response, err := imdsClient.GetMetadata(ctx, &imds.GetMetadataInput{ - Path: fmt.Sprintf("network/interfaces/macs/%s/ipv6s", cfg.Status.Instance.MAC), - }) - if err != nil { - return "", err - } - ip, err := io.ReadAll(ipv6Response.Content) + ipv6, err := imds.GetProperty(ctx, imds.IMDSProperty(fmt.Sprintf("network/interfaces/macs/%s/ipv6s", cfg.Status.Instance.MAC))) if err != nil { return "", err } - return string(ip), nil + return ipv6, nil default: return "", fmt.Errorf("invalid ip-family. %s is not one of %v", ipFamily, []api.IPFamily{api.IPFamilyIPv4, api.IPFamilyIPv6}) } diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go index 4321d2f8..1b257236 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go @@ -3,4 +3,4 @@ package aws // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.31.0" +const goModuleVersion = "1.32.0" diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md index d6653fc7..fb8a0386 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md @@ -1,3 +1,11 @@ +# v1.27.41 (2024-10-04) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.40 (2024-10-03) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.27.39 (2024-09-27) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go index eaa7298f..b4816e20 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go @@ -3,4 +3,4 @@ package config // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.27.39" +const goModuleVersion = "1.27.41" diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md index dfb2bd85..a3a2443f 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md @@ -1,3 +1,11 @@ +# v1.17.39 (2024-10-04) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.38 (2024-10-03) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.17.37 (2024-09-27) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go index 96dba57c..783946b9 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go @@ -3,4 +3,4 @@ package credentials // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.17.37" +const goModuleVersion = "1.17.39" diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md index 045ceee6..df3af8bb 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.16.15 (2024-10-04) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.16.14 (2024-09-20) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go index 3134fabd..191f48e9 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go @@ -3,4 +3,4 @@ package imds // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.16.14" +const goModuleVersion = "1.16.15" diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md index 4370f948..e4c40308 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.3.19 (2024-10-04) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.3.18 (2024-09-20) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go index 236805ed..73f9680b 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go @@ -3,4 +3,4 @@ package configsources // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.3.18" +const goModuleVersion = "1.3.19" diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md index 351e4f2d..037847a4 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md @@ -1,3 +1,7 @@ +# v2.6.19 (2024-10-04) + +* **Dependency Update**: Updated to the latest SDK module versions + # v2.6.18 (2024-09-20) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go index 7b257d35..da8e9af9 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go @@ -3,4 +3,4 @@ package endpoints // goModuleVersion is the tagged release for this module -const goModuleVersion = "2.6.18" +const goModuleVersion = "2.6.19" diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/CHANGELOG.md b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/CHANGELOG.md index b4ff4ae7..73adcdec 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/CHANGELOG.md +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/CHANGELOG.md @@ -1,3 +1,13 @@ +# v1.181.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Feature**: Documentation updates for Amazon EC2. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.180.0 (2024-10-03) + +* **Feature**: This release includes a new API for modifying instance cpu-options after launch. + # v1.179.2 (2024-09-27) * No change notes available for this release. diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_client.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_client.go index 02cd2943..657b3e01 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_client.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_client.go @@ -194,10 +194,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) - resolveMeterProvider(&options) - resolveTracerProvider(&options) + resolveMeterProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { @@ -282,7 +282,9 @@ func (c *Client) invokeOperation( defer endTimer() defer span.End() - handler := smithyhttp.NewClientHandler(options.HTTPClient) + handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) { + o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/ec2") + }) decorated := middleware.DecorateHandler(handler, stack) result, metadata, err = decorated.Handle(ctx, params) if err != nil { diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AllocateAddress.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AllocateAddress.go index 2a8473b2..a39af6a4 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AllocateAddress.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AllocateAddress.go @@ -69,7 +69,10 @@ type AllocateAddressInput struct { // UnauthorizedOperation . DryRun *bool - // The ID of an IPAM pool. + // The ID of an IPAM pool which has an Amazon-provided or BYOIP public IPv4 CIDR + // provisioned to it. For more information, see [Allocate sequential Elastic IP addresses from an IPAM pool]in the Amazon VPC IPAM User Guide. + // + // [Allocate sequential Elastic IP addresses from an IPAM pool]: https://docs.aws.amazon.com/vpc/latest/ipam/tutorials-eip-pool.html IpamPoolId *string // A unique set of Availability Zones, Local Zones, or Wavelength Zones from diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssignPrivateNatGatewayAddress.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssignPrivateNatGatewayAddress.go index 6d44478e..1c9a592e 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssignPrivateNatGatewayAddress.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssignPrivateNatGatewayAddress.go @@ -14,7 +14,7 @@ import ( // Assigns private IPv4 addresses to a private NAT gateway. For more information, // see [Work with NAT gateways]in the Amazon VPC User Guide. // -// [Work with NAT gateways]: https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html#nat-gateway-working-with +// [Work with NAT gateways]: https://docs.aws.amazon.com/vpc/latest/userguide/nat-gateway-working-with.html func (c *Client) AssignPrivateNatGatewayAddress(ctx context.Context, params *AssignPrivateNatGatewayAddressInput, optFns ...func(*Options)) (*AssignPrivateNatGatewayAddressOutput, error) { if params == nil { params = &AssignPrivateNatGatewayAddressInput{} diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateNatGatewayAddress.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateNatGatewayAddress.go index dd83e671..f7cbc2f8 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateNatGatewayAddress.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateNatGatewayAddress.go @@ -28,8 +28,8 @@ import ( // User Guide. // // [Elastic IP address quotas]: https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html#vpc-limits-eips -// [Work with NAT gateways]: https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html#nat-gateway-working-with -// [Allocate an Elastic IP address]: https://docs.aws.amazon.com/vpc/latest/userguide/vpc-eips.html#allocate-eip +// [Work with NAT gateways]: https://docs.aws.amazon.com/vpc/latest/userguide/nat-gateway-working-with.html +// [Allocate an Elastic IP address]: https://docs.aws.amazon.com/vpc/latest/userguide/WorkWithEIPs.html func (c *Client) AssociateNatGatewayAddress(ctx context.Context, params *AssociateNatGatewayAddressInput, optFns ...func(*Options)) (*AssociateNatGatewayAddressOutput, error) { if params == nil { params = &AssociateNatGatewayAddressInput{} diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachVpnGateway.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachVpnGateway.go index 85b6f99a..2a405e0b 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachVpnGateway.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachVpnGateway.go @@ -11,8 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Attaches a virtual private gateway to a VPC. You can attach one virtual private -// gateway to one VPC at a time. +// Attaches an available virtual private gateway to a VPC. You can attach one +// virtual private gateway to one VPC at a time. // // For more information, see [Amazon Web Services Site-to-Site VPN] in the Amazon Web Services Site-to-Site VPN User // Guide. diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ConfirmProductInstance.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ConfirmProductInstance.go index 0ab887b3..68dbe666 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ConfirmProductInstance.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ConfirmProductInstance.go @@ -40,7 +40,7 @@ type ConfirmProductInstanceInput struct { // This member is required. ProductCode *string - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateDefaultSubnet.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateDefaultSubnet.go index 1aad8462..9f0ccc49 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateDefaultSubnet.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateDefaultSubnet.go @@ -15,7 +15,7 @@ import ( // Availability Zone in your default VPC. You can have only one default subnet per // Availability Zone. For more information, see [Create a default subnet]in the Amazon VPC User Guide. // -// [Create a default subnet]: https://docs.aws.amazon.com/vpc/latest/userguide/default-vpc.html#create-default-subnet +// [Create a default subnet]: https://docs.aws.amazon.com/vpc/latest/userguide/work-with-default-vpc.html#create-default-subnet func (c *Client) CreateDefaultSubnet(ctx context.Context, params *CreateDefaultSubnetInput, optFns ...func(*Options)) (*CreateDefaultSubnetOutput, error) { if params == nil { params = &CreateDefaultSubnetInput{} diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateFlowLogs.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateFlowLogs.go index 48f26e6d..f2659ced 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateFlowLogs.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateFlowLogs.go @@ -26,7 +26,7 @@ import ( // // For more information, see [VPC Flow Logs] in the Amazon VPC User Guide. // -// [Flow log records]: https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html#flow-log-records +// [Flow log records]: https://docs.aws.amazon.com/vpc/latest/userguide/flow-log-records.html // [VPC Flow Logs]: https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html func (c *Client) CreateFlowLogs(ctx context.Context, params *CreateFlowLogsInput, optFns ...func(*Options)) (*CreateFlowLogsOutput, error) { if params == nil { @@ -121,7 +121,7 @@ type CreateFlowLogsInput struct { // // Specify the fields using the ${field-id} format, separated by spaces. // - // [Flow log records]: https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html#flow-log-records + // [Flow log records]: https://docs.aws.amazon.com/vpc/latest/userguide/flow-log-records.html // [Transit Gateway Flow Log records]: https://docs.aws.amazon.com/vpc/latest/tgw/tgw-flow-logs.html#flow-log-records LogFormat *string diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateIpamPool.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateIpamPool.go index 6c5a94eb..7e5586c2 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateIpamPool.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateIpamPool.go @@ -117,7 +117,7 @@ type CreateIpamPoolInput struct { // region cannot use CIDRs from this pool. // // Possible values: Any Amazon Web Services Region or supported Amazon Web - // Services Local Zone. + // Services Local Zone. Default is none and means any locale. // // [supported Local Zones]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html#byoip-zone-avail Locale *string diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNatGateway.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNatGateway.go index 4b16416a..1724226d 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNatGateway.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNatGateway.go @@ -38,7 +38,7 @@ import ( // VPC User Guide. // // [NAT gateways]: https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html -// [Allocate an Elastic IP address]: https://docs.aws.amazon.com/vpc/latest/userguide/vpc-eips.html#allocate-eip +// [Allocate an Elastic IP address]: https://docs.aws.amazon.com/vpc/latest/userguide/WorkWithEIPs.html func (c *Client) CreateNatGateway(ctx context.Context, params *CreateNatGatewayInput, optFns ...func(*Options)) (*CreateNatGatewayOutput, error) { if params == nil { params = &CreateNatGatewayInput{} @@ -92,20 +92,20 @@ type CreateNatGatewayInput struct { // Secondary EIP allocation IDs. For more information, see [Create a NAT gateway] in the Amazon VPC User // Guide. // - // [Create a NAT gateway]: https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html#nat-gateway-creating + // [Create a NAT gateway]: https://docs.aws.amazon.com/vpc/latest/userguide/nat-gateway-working-with.html SecondaryAllocationIds []string // [Private NAT gateway only] The number of secondary private IPv4 addresses you // want to assign to the NAT gateway. For more information about secondary // addresses, see [Create a NAT gateway]in the Amazon VPC User Guide. // - // [Create a NAT gateway]: https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html#nat-gateway-creating + // [Create a NAT gateway]: https://docs.aws.amazon.com/vpc/latest/userguide/nat-gateway-working-with.html SecondaryPrivateIpAddressCount *int32 // Secondary private IPv4 addresses. For more information about secondary // addresses, see [Create a NAT gateway]in the Amazon VPC User Guide. // - // [Create a NAT gateway]: https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html#nat-gateway-creating + // [Create a NAT gateway]: https://docs.aws.amazon.com/vpc/latest/userguide/nat-gateway-working-with.html SecondaryPrivateIpAddresses []string // The tags to assign to the NAT gateway. diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreatePlacementGroup.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreatePlacementGroup.go index ada87aa5..fad99996 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreatePlacementGroup.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreatePlacementGroup.go @@ -41,7 +41,7 @@ func (c *Client) CreatePlacementGroup(ctx context.Context, params *CreatePlaceme type CreatePlacementGroupInput struct { - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSpotDatafeedSubscription.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSpotDatafeedSubscription.go index d88fa310..c817e870 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSpotDatafeedSubscription.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSpotDatafeedSubscription.go @@ -35,9 +35,9 @@ func (c *Client) CreateSpotDatafeedSubscription(ctx context.Context, params *Cre type CreateSpotDatafeedSubscriptionInput struct { // The name of the Amazon S3 bucket in which to store the Spot Instance data feed. - // For more information about bucket names, see [Rules for bucket naming]in the Amazon S3 Developer Guide. + // For more information about bucket names, see [Bucket naming rules]in the Amazon S3 User Guide. // - // [Rules for bucket naming]: https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html#bucketnamingrules + // [Bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html // // This member is required. Bucket *string diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSubnetCidrReservation.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSubnetCidrReservation.go index 15f615b2..9fe2999a 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSubnetCidrReservation.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSubnetCidrReservation.go @@ -12,10 +12,10 @@ import ( ) // Creates a subnet CIDR reservation. For more information, see [Subnet CIDR reservations] in the Amazon VPC -// User Guide and [Assign prefixes to network interfaces]in the Amazon EC2 User Guide. +// User Guide and [Manage prefixes for your network interfaces]in the Amazon EC2 User Guide. // // [Subnet CIDR reservations]: https://docs.aws.amazon.com/vpc/latest/userguide/subnet-cidr-reservation.html -// [Assign prefixes to network interfaces]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html +// [Manage prefixes for your network interfaces]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/work-with-prefixes.html func (c *Client) CreateSubnetCidrReservation(ctx context.Context, params *CreateSubnetCidrReservationInput, optFns ...func(*Options)) (*CreateSubnetCidrReservationOutput, error) { if params == nil { params = &CreateSubnetCidrReservationInput{} diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeletePlacementGroup.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeletePlacementGroup.go index 83ee5bd8..fab461a9 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeletePlacementGroup.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeletePlacementGroup.go @@ -37,7 +37,7 @@ type DeletePlacementGroupInput struct { // This member is required. GroupName *string - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpc.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpc.go index 2e02c1ff..477257a7 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpc.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpc.go @@ -15,7 +15,11 @@ import ( // terminate all instances running in the VPC, delete all security groups // associated with the VPC (except the default one), delete all route tables // associated with the VPC (except the default one), and so on. When you delete the -// VPC, it deletes the VPC's default security group, network ACL, and route table. +// VPC, it deletes the default security group, network ACL, and route table for the +// VPC. +// +// If you created a flow log for the VPC that you are deleting, note that flow +// logs for deleted VPCs are eventually automatically removed. func (c *Client) DeleteVpc(ctx context.Context, params *DeleteVpcInput, optFns ...func(*Options)) (*DeleteVpcOutput, error) { if params == nil { params = &DeleteVpcInput{} diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceAttribute.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceAttribute.go index 4aa464ad..360f3f8a 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceAttribute.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceAttribute.go @@ -45,7 +45,7 @@ type DescribeInstanceAttributeInput struct { // This member is required. InstanceId *string - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceCreditSpecifications.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceCreditSpecifications.go index 3d4650c9..2f470663 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceCreditSpecifications.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceCreditSpecifications.go @@ -53,7 +53,7 @@ func (c *Client) DescribeInstanceCreditSpecifications(ctx context.Context, param type DescribeInstanceCreditSpecificationsInput struct { - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceStatus.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceStatus.go index 7b54ef28..b20c40e1 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceStatus.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceStatus.go @@ -59,7 +59,7 @@ func (c *Client) DescribeInstanceStatus(ctx context.Context, params *DescribeIns type DescribeInstanceStatusInput struct { - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceTopology.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceTopology.go index 7af7a47e..643ef986 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceTopology.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceTopology.go @@ -30,7 +30,7 @@ import ( // hpc7a.48xlarge | hpc7a.96xlarge | hpc7g.4xlarge | hpc7g.8xlarge | // hpc7g.16xlarge // -// - p3dn.24xlarge | p4d.24xlarge | p4de.24xlarge | p5.48xlarge +// - p3dn.24xlarge | p4d.24xlarge | p4de.24xlarge | p5.48xlarge | p5e.48xlarge // // - trn1.2xlarge | trn1.32xlarge | trn1n.32xlarge // @@ -54,7 +54,7 @@ func (c *Client) DescribeInstanceTopology(ctx context.Context, params *DescribeI type DescribeInstanceTopologyInput struct { - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstances.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstances.go index e0c5d532..adb269f8 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstances.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstances.go @@ -61,7 +61,7 @@ func (c *Client) DescribeInstances(ctx context.Context, params *DescribeInstance type DescribeInstancesInput struct { - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribePlacementGroups.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribePlacementGroups.go index 5beceb31..15f9e50e 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribePlacementGroups.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribePlacementGroups.go @@ -38,7 +38,7 @@ func (c *Client) DescribePlacementGroups(ctx context.Context, params *DescribePl type DescribePlacementGroupsInput struct { - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateNatGatewayAddress.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateNatGatewayAddress.go index cd13ead1..c8e74930 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateNatGatewayAddress.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateNatGatewayAddress.go @@ -25,7 +25,7 @@ import ( // EIPs). As the existing connections drain out, the EIPs (and the corresponding // private IP addresses mapped to them) are released. // -// [Edit secondary IP address associations]: https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html#nat-gateway-edit-secondary +// [Edit secondary IP address associations]: https://docs.aws.amazon.com/vpc/latest/userguide/nat-gateway-working-with.html#nat-gateway-edit-secondary func (c *Client) DisassociateNatGatewayAddress(ctx context.Context, params *DisassociateNatGatewayAddressInput, optFns ...func(*Options)) (*DisassociateNatGatewayAddressOutput, error) { if params == nil { params = &DisassociateNatGatewayAddressInput{} diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetConsoleOutput.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetConsoleOutput.go index caafd6eb..9cf47ba4 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetConsoleOutput.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetConsoleOutput.go @@ -41,7 +41,7 @@ type GetConsoleOutputInput struct { // This member is required. InstanceId *string - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetConsoleScreenshot.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetConsoleScreenshot.go index d1d1ae36..2a4f842f 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetConsoleScreenshot.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetConsoleScreenshot.go @@ -40,7 +40,7 @@ type GetConsoleScreenshotInput struct { // This member is required. InstanceId *string - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetDefaultCreditSpecification.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetDefaultCreditSpecification.go index 14e04b8c..be695ff7 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetDefaultCreditSpecification.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetDefaultCreditSpecification.go @@ -39,7 +39,7 @@ type GetDefaultCreditSpecificationInput struct { // This member is required. InstanceFamily types.UnlimitedSupportedInstanceFamily - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetInstanceMetadataDefaults.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetInstanceMetadataDefaults.go index bd85d31b..ce5552c8 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetInstanceMetadataDefaults.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetInstanceMetadataDefaults.go @@ -34,7 +34,7 @@ func (c *Client) GetInstanceMetadataDefaults(ctx context.Context, params *GetIns type GetInstanceMetadataDefaultsInput struct { - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetInstanceUefiData.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetInstanceUefiData.go index 7b4b4f35..2c21019f 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetInstanceUefiData.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetInstanceUefiData.go @@ -47,7 +47,7 @@ type GetInstanceUefiDataInput struct { // This member is required. InstanceId *string - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetPasswordData.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetPasswordData.go index bf0812ec..dad3f2ee 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetPasswordData.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetPasswordData.go @@ -56,7 +56,7 @@ type GetPasswordDataInput struct { // This member is required. InstanceId *string - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyDefaultCreditSpecification.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyDefaultCreditSpecification.go index 006e9b54..08f82378 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyDefaultCreditSpecification.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyDefaultCreditSpecification.go @@ -56,7 +56,7 @@ type ModifyDefaultCreditSpecificationInput struct { // This member is required. InstanceFamily types.UnlimitedSupportedInstanceFamily - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceAttribute.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceAttribute.go index 82721a3e..1dc7de3a 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceAttribute.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceAttribute.go @@ -78,7 +78,7 @@ type ModifyInstanceAttributeInput struct { // Instances. DisableApiTermination *types.AttributeBooleanValue - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceCpuOptions.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceCpuOptions.go new file mode 100644 index 00000000..af8bca2a --- /dev/null +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceCpuOptions.go @@ -0,0 +1,191 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ec2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// By default, all vCPUs for the instance type are active when you launch an +// instance. When you configure the number of active vCPUs for the instance, it can +// help you save on licensing costs and optimize performance. The base cost of the +// instance remains unchanged. +// +// The number of active vCPUs equals the number of threads per CPU core multiplied +// by the number of cores. +// +// Some instance type options do not support this capability. For more +// information, see [Supported CPU options]in the Amazon EC2 User Guide. +// +// [Supported CPU options]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/cpu-options-supported-instances-values.html +func (c *Client) ModifyInstanceCpuOptions(ctx context.Context, params *ModifyInstanceCpuOptionsInput, optFns ...func(*Options)) (*ModifyInstanceCpuOptionsOutput, error) { + if params == nil { + params = &ModifyInstanceCpuOptionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ModifyInstanceCpuOptions", params, optFns, c.addOperationModifyInstanceCpuOptionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ModifyInstanceCpuOptionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ModifyInstanceCpuOptionsInput struct { + + // The number of CPU cores to activate for the specified instance. + // + // This member is required. + CoreCount *int32 + + // The ID of the instance to update. + // + // This member is required. + InstanceId *string + + // The number of threads to run for each CPU core. + // + // This member is required. + ThreadsPerCore *int32 + + // Checks whether you have the required permissions for the operation, without + // actually making the request, and provides an error response. If you have the + // required permissions, the error response is DryRunOperation . Otherwise, it is + // UnauthorizedOperation . + DryRun *bool + + noSmithyDocumentSerde +} + +type ModifyInstanceCpuOptionsOutput struct { + + // The number of CPU cores that are running for the specified instance after the + // update. + CoreCount *int32 + + // The ID of the instance that was updated. + InstanceId *string + + // The number of threads that are running per CPU core for the specified instance + // after the update. + ThreadsPerCore *int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationModifyInstanceCpuOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsEc2query_serializeOpModifyInstanceCpuOptions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyInstanceCpuOptions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyInstanceCpuOptions"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpModifyInstanceCpuOptionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyInstanceCpuOptions(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opModifyInstanceCpuOptions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ModifyInstanceCpuOptions", + } +} diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceCreditSpecification.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceCreditSpecification.go index 66bec015..454fdbea 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceCreditSpecification.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceCreditSpecification.go @@ -45,7 +45,7 @@ type ModifyInstanceCreditSpecificationInput struct { // [Ensuring Idempotency]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html ClientToken *string - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceEventStartTime.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceEventStartTime.go index 7f052898..2ee34b23 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceEventStartTime.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceEventStartTime.go @@ -45,7 +45,7 @@ type ModifyInstanceEventStartTimeInput struct { // This member is required. NotBefore *time.Time - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceMetadataDefaults.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceMetadataDefaults.go index 4d971cb5..9ed51b50 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceMetadataDefaults.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceMetadataDefaults.go @@ -37,7 +37,7 @@ func (c *Client) ModifyInstanceMetadataDefaults(ctx context.Context, params *Mod type ModifyInstanceMetadataDefaultsInput struct { - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_MonitorInstances.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_MonitorInstances.go index e1e12fe5..3d8f1250 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_MonitorInstances.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_MonitorInstances.go @@ -40,7 +40,7 @@ type MonitorInstancesInput struct { // This member is required. InstanceIds []string - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RebootInstances.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RebootInstances.go index 258005f9..d18658f8 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RebootInstances.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RebootInstances.go @@ -43,7 +43,7 @@ type RebootInstancesInput struct { // This member is required. InstanceIds []string - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReportInstanceStatus.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReportInstanceStatus.go index e8216787..e6b5217e 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReportInstanceStatus.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReportInstanceStatus.go @@ -72,9 +72,11 @@ type ReportInstanceStatusInput struct { Status types.ReportStatusType // Descriptive text about the health state of your instance. + // + // Deprecated: This member has been deprecated Description *string - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetInstanceAttribute.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetInstanceAttribute.go index 670c6f40..e7cc4975 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetInstanceAttribute.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetInstanceAttribute.go @@ -50,7 +50,7 @@ type ResetInstanceAttributeInput struct { // This member is required. InstanceId *string - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RunInstances.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RunInstances.go index 03f4adba..c5b2289f 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RunInstances.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RunInstances.go @@ -167,7 +167,7 @@ type RunInstancesInput struct { // [ModifyInstanceAttribute]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceAttribute.html DisableApiTermination *bool - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_SendDiagnosticInterrupt.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_SendDiagnosticInterrupt.go index fd815e80..2e29fba8 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_SendDiagnosticInterrupt.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_SendDiagnosticInterrupt.go @@ -50,7 +50,7 @@ type SendDiagnosticInterruptInput struct { // This member is required. InstanceId *string - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StartInstances.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StartInstances.go index e6dc2354..7d142fd9 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StartInstances.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StartInstances.go @@ -60,7 +60,7 @@ type StartInstancesInput struct { // Reserved. AdditionalInfo *string - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StopInstances.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StopInstances.go index 0fdf00fa..ebb45289 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StopInstances.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StopInstances.go @@ -77,7 +77,7 @@ type StopInstancesInput struct { // This member is required. InstanceIds []string - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_TerminateInstances.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_TerminateInstances.go index bbc8e8bb..f0a4e0e1 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_TerminateInstances.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_TerminateInstances.go @@ -91,7 +91,7 @@ type TerminateInstancesInput struct { // This member is required. InstanceIds []string - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnassignPrivateNatGatewayAddress.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnassignPrivateNatGatewayAddress.go index 7b0dd0e0..7db7b085 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnassignPrivateNatGatewayAddress.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnassignPrivateNatGatewayAddress.go @@ -25,7 +25,7 @@ import ( // connections are distributed across the remaining assigned private IP address). // After the existing connections drain out, the private IP addresses are released. // -// [Edit secondary IP address associations]: https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html#nat-gateway-edit-secondary +// [Edit secondary IP address associations]: https://docs.aws.amazon.com/vpc/latest/userguide/nat-gateway-working-with.html#nat-gateway-edit-secondary func (c *Client) UnassignPrivateNatGatewayAddress(ctx context.Context, params *UnassignPrivateNatGatewayAddressInput, optFns ...func(*Options)) (*UnassignPrivateNatGatewayAddressOutput, error) { if params == nil { params = &UnassignPrivateNatGatewayAddressInput{} diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnmonitorInstances.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnmonitorInstances.go index 871bb551..33931227 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnmonitorInstances.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnmonitorInstances.go @@ -37,7 +37,7 @@ type UnmonitorInstancesInput struct { // This member is required. InstanceIds []string - // Checks whether you have the required permissions for the action, without + // Checks whether you have the required permissions for the operation, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is // UnauthorizedOperation . diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/deserializers.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/deserializers.go index 3e6a121c..3f56404f 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/deserializers.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/deserializers.go @@ -47207,6 +47207,101 @@ func awsEc2query_deserializeOpErrorModifyInstanceCapacityReservationAttributes(r } } +type awsEc2query_deserializeOpModifyInstanceCpuOptions struct { +} + +func (*awsEc2query_deserializeOpModifyInstanceCpuOptions) ID() string { + return "OperationDeserializer" +} + +func (m *awsEc2query_deserializeOpModifyInstanceCpuOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsEc2query_deserializeOpErrorModifyInstanceCpuOptions(response, &metadata) + } + output := &ModifyInstanceCpuOptionsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentModifyInstanceCpuOptionsOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsEc2query_deserializeOpErrorModifyInstanceCpuOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) + if err != nil { + return err + } + awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsEc2query_deserializeOpModifyInstanceCreditSpecification struct { } @@ -93117,6 +93212,19 @@ func awsEc2query_deserializeDocumentIpamDiscoveredResourceCidr(v **types.IpamDis sv.SampleTime = ptr.Time(t) } + case strings.EqualFold("subnetId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SubnetId = ptr.String(xtv) + } + case strings.EqualFold("vpcId", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -169190,6 +169298,89 @@ func awsEc2query_deserializeOpDocumentModifyInstanceCapacityReservationAttribute return nil } +func awsEc2query_deserializeOpDocumentModifyInstanceCpuOptionsOutput(v **ModifyInstanceCpuOptionsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ModifyInstanceCpuOptionsOutput + if *v == nil { + sv = &ModifyInstanceCpuOptionsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("coreCount", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.CoreCount = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("instanceId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.InstanceId = ptr.String(xtv) + } + + case strings.EqualFold("threadsPerCore", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.ThreadsPerCore = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsEc2query_deserializeOpDocumentModifyInstanceCreditSpecificationOutput(v **ModifyInstanceCreditSpecificationOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/generated.json b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/generated.json index a536c547..d7f472e7 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/generated.json +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/generated.json @@ -517,6 +517,7 @@ "api_op_ModifyImageAttribute.go", "api_op_ModifyInstanceAttribute.go", "api_op_ModifyInstanceCapacityReservationAttributes.go", + "api_op_ModifyInstanceCpuOptions.go", "api_op_ModifyInstanceCreditSpecification.go", "api_op_ModifyInstanceEventStartTime.go", "api_op_ModifyInstanceEventWindow.go", diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go_module_metadata.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go_module_metadata.go index e162742e..b1f42bf9 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go_module_metadata.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go_module_metadata.go @@ -3,4 +3,4 @@ package ec2 // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.179.2" +const goModuleVersion = "1.181.0" diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/serializers.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/serializers.go index ceb9e662..37fc33a4 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/serializers.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/serializers.go @@ -35438,6 +35438,76 @@ func (m *awsEc2query_serializeOpModifyInstanceCapacityReservationAttributes) Han return next.HandleSerialize(ctx, in) } +type awsEc2query_serializeOpModifyInstanceCpuOptions struct { +} + +func (*awsEc2query_serializeOpModifyInstanceCpuOptions) ID() string { + return "OperationSerializer" +} + +func (m *awsEc2query_serializeOpModifyInstanceCpuOptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ModifyInstanceCpuOptionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("ModifyInstanceCpuOptions") + body.Key("Version").String("2016-11-15") + + if err := awsEc2query_serializeOpDocumentModifyInstanceCpuOptionsInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsEc2query_serializeOpModifyInstanceCreditSpecification struct { } @@ -69649,6 +69719,33 @@ func awsEc2query_serializeOpDocumentModifyInstanceCapacityReservationAttributesI return nil } +func awsEc2query_serializeOpDocumentModifyInstanceCpuOptionsInput(v *ModifyInstanceCpuOptionsInput, value query.Value) error { + object := value.Object() + _ = object + + if v.CoreCount != nil { + objectKey := object.Key("CoreCount") + objectKey.Integer(*v.CoreCount) + } + + if v.DryRun != nil { + objectKey := object.Key("DryRun") + objectKey.Boolean(*v.DryRun) + } + + if v.InstanceId != nil { + objectKey := object.Key("InstanceId") + objectKey.String(*v.InstanceId) + } + + if v.ThreadsPerCore != nil { + objectKey := object.Key("ThreadsPerCore") + objectKey.Integer(*v.ThreadsPerCore) + } + + return nil +} + func awsEc2query_serializeOpDocumentModifyInstanceCreditSpecificationInput(v *ModifyInstanceCreditSpecificationInput, value query.Value) error { object := value.Object() _ = object diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/types.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/types.go index 973381e4..4fc9cc08 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/types.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/types.go @@ -2419,7 +2419,8 @@ type CreateFleetInstance struct { // Instance. Lifecycle InstanceLifecycle - // The value is Windows for Windows instances. Otherwise, the value is blank. + // The value is windows for Windows instances in an EC2 Fleet. Otherwise, the + // value is blank. Platform PlatformValues noSmithyDocumentSerde @@ -2481,11 +2482,8 @@ type CreateTransitGatewayVpcAttachmentRequestOptions struct { // Enables you to reference a security group across VPCs attached to a transit // gateway to simplify security group management. // - // This option is disabled by default. - // - // If you don't enable or disable SecurityGroupReferencingSupport in the request, - // the attachment will inherit the security group referencing support setting on - // the transit gateway. + // This option is enabled by default. However, security group referencing is + // disabled by default at the transit gateway level. // // For more information about security group referencing, see [Security group referencing] in the Amazon Web // Services Transit Gateways Guide. @@ -2958,7 +2956,8 @@ type DescribeFleetsInstances struct { // Instance. Lifecycle InstanceLifecycle - // The value is Windows for Windows instances. Otherwise, the value is blank. + // The value is windows for Windows instances in an EC2 Fleet. Otherwise, the + // value is blank. Platform PlatformValues noSmithyDocumentSerde @@ -8603,6 +8602,9 @@ type IpamDiscoveredResourceCidr struct { // The last successful resource discovery time. SampleTime *time.Time + // The subnet ID. + SubnetId *string + // The VPC ID. VpcId *string @@ -18084,12 +18086,7 @@ type TransitGatewayOptions struct { // Enables you to reference a security group across VPCs attached to a transit // gateway to simplify security group management. // - // This option is enabled by default. - // - // For more information about security group referencing, see [Security group referencing] in the Amazon Web - // Services Transit Gateways Guide. - // - // [Security group referencing]: https://docs.aws.amazon.com/vpc/latest/tgw/tgw-vpc-attachments.html#vpc-attachment-security + // This option is disabled by default. SecurityGroupReferencingSupport SecurityGroupReferencingSupportValue // The transit gateway CIDR blocks. @@ -18577,7 +18574,7 @@ type TransitGatewayVpcAttachmentOptions struct { // Enables you to reference a security group across VPCs attached to a transit // gateway to simplify security group management. // - // This option is disabled by default. + // This option is enabled by default. // // For more information about security group referencing, see [Security group referencing] in the Amazon Web // Services Transit Gateways Guide. diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/validators.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/validators.go index 70cf387e..ca5adf0c 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/validators.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/validators.go @@ -6570,6 +6570,26 @@ func (m *validateOpModifyInstanceCapacityReservationAttributes) HandleInitialize return next.HandleInitialize(ctx, in) } +type validateOpModifyInstanceCpuOptions struct { +} + +func (*validateOpModifyInstanceCpuOptions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpModifyInstanceCpuOptions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ModifyInstanceCpuOptionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpModifyInstanceCpuOptionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpModifyInstanceCreditSpecification struct { } @@ -10142,6 +10162,10 @@ func addOpModifyInstanceCapacityReservationAttributesValidationMiddleware(stack return stack.Initialize.Add(&validateOpModifyInstanceCapacityReservationAttributes{}, middleware.After) } +func addOpModifyInstanceCpuOptionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpModifyInstanceCpuOptions{}, middleware.After) +} + func addOpModifyInstanceCreditSpecificationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpModifyInstanceCreditSpecification{}, middleware.After) } @@ -10754,12 +10778,12 @@ func validateDiskImageDetail(v *types.DiskImageDetail) error { return nil } invalidParams := smithy.InvalidParamsError{Context: "DiskImageDetail"} - if v.Bytes == nil { - invalidParams.Add(smithy.NewErrParamRequired("Bytes")) - } if len(v.Format) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Format")) } + if v.Bytes == nil { + invalidParams.Add(smithy.NewErrParamRequired("Bytes")) + } if v.ImportManifestUrl == nil { invalidParams.Add(smithy.NewErrParamRequired("ImportManifestUrl")) } @@ -11961,15 +11985,15 @@ func validateOpAttachClassicLinkVpcInput(v *AttachClassicLinkVpcInput) error { return nil } invalidParams := smithy.InvalidParamsError{Context: "AttachClassicLinkVpcInput"} - if v.Groups == nil { - invalidParams.Add(smithy.NewErrParamRequired("Groups")) - } if v.InstanceId == nil { invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) } if v.VpcId == nil { invalidParams.Add(smithy.NewErrParamRequired("VpcId")) } + if v.Groups == nil { + invalidParams.Add(smithy.NewErrParamRequired("Groups")) + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -12000,14 +12024,14 @@ func validateOpAttachNetworkInterfaceInput(v *AttachNetworkInterfaceInput) error return nil } invalidParams := smithy.InvalidParamsError{Context: "AttachNetworkInterfaceInput"} - if v.DeviceIndex == nil { - invalidParams.Add(smithy.NewErrParamRequired("DeviceIndex")) + if v.NetworkInterfaceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("NetworkInterfaceId")) } if v.InstanceId == nil { invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) } - if v.NetworkInterfaceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetworkInterfaceId")) + if v.DeviceIndex == nil { + invalidParams.Add(smithy.NewErrParamRequired("DeviceIndex")) } if invalidParams.Len() > 0 { return invalidParams @@ -12644,15 +12668,15 @@ func validateOpCreateInstanceExportTaskInput(v *CreateInstanceExportTaskInput) e return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateInstanceExportTaskInput"} - if v.ExportToS3Task == nil { - invalidParams.Add(smithy.NewErrParamRequired("ExportToS3Task")) - } if v.InstanceId == nil { invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) } if len(v.TargetEnvironment) == 0 { invalidParams.Add(smithy.NewErrParamRequired("TargetEnvironment")) } + if v.ExportToS3Task == nil { + invalidParams.Add(smithy.NewErrParamRequired("ExportToS3Task")) + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -12876,20 +12900,20 @@ func validateOpCreateNetworkAclEntryInput(v *CreateNetworkAclEntryInput) error { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateNetworkAclEntryInput"} - if v.Egress == nil { - invalidParams.Add(smithy.NewErrParamRequired("Egress")) - } if v.NetworkAclId == nil { invalidParams.Add(smithy.NewErrParamRequired("NetworkAclId")) } + if v.RuleNumber == nil { + invalidParams.Add(smithy.NewErrParamRequired("RuleNumber")) + } if v.Protocol == nil { invalidParams.Add(smithy.NewErrParamRequired("Protocol")) } if len(v.RuleAction) == 0 { invalidParams.Add(smithy.NewErrParamRequired("RuleAction")) } - if v.RuleNumber == nil { - invalidParams.Add(smithy.NewErrParamRequired("RuleNumber")) + if v.Egress == nil { + invalidParams.Add(smithy.NewErrParamRequired("Egress")) } if invalidParams.Len() > 0 { return invalidParams @@ -13002,8 +13026,8 @@ func validateOpCreateReservedInstancesListingInput(v *CreateReservedInstancesLis return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateReservedInstancesListingInput"} - if v.ClientToken == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientToken")) + if v.ReservedInstancesId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ReservedInstancesId")) } if v.InstanceCount == nil { invalidParams.Add(smithy.NewErrParamRequired("InstanceCount")) @@ -13011,8 +13035,8 @@ func validateOpCreateReservedInstancesListingInput(v *CreateReservedInstancesLis if v.PriceSchedules == nil { invalidParams.Add(smithy.NewErrParamRequired("PriceSchedules")) } - if v.ReservedInstancesId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ReservedInstancesId")) + if v.ClientToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientToken")) } if invalidParams.Len() > 0 { return invalidParams @@ -14033,15 +14057,15 @@ func validateOpDeleteNetworkAclEntryInput(v *DeleteNetworkAclEntryInput) error { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteNetworkAclEntryInput"} - if v.Egress == nil { - invalidParams.Add(smithy.NewErrParamRequired("Egress")) - } if v.NetworkAclId == nil { invalidParams.Add(smithy.NewErrParamRequired("NetworkAclId")) } if v.RuleNumber == nil { invalidParams.Add(smithy.NewErrParamRequired("RuleNumber")) } + if v.Egress == nil { + invalidParams.Add(smithy.NewErrParamRequired("Egress")) + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -14993,12 +15017,12 @@ func validateOpDescribeInstanceAttributeInput(v *DescribeInstanceAttributeInput) return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeInstanceAttributeInput"} - if len(v.Attribute) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Attribute")) - } if v.InstanceId == nil { invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) } + if len(v.Attribute) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Attribute")) + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -16901,15 +16925,15 @@ func validateOpModifyIdentityIdFormatInput(v *ModifyIdentityIdFormatInput) error return nil } invalidParams := smithy.InvalidParamsError{Context: "ModifyIdentityIdFormatInput"} - if v.PrincipalArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("PrincipalArn")) - } if v.Resource == nil { invalidParams.Add(smithy.NewErrParamRequired("Resource")) } if v.UseLongIds == nil { invalidParams.Add(smithy.NewErrParamRequired("UseLongIds")) } + if v.PrincipalArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PrincipalArn")) + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -16983,6 +17007,27 @@ func validateOpModifyInstanceCapacityReservationAttributesInput(v *ModifyInstanc } } +func validateOpModifyInstanceCpuOptionsInput(v *ModifyInstanceCpuOptionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ModifyInstanceCpuOptionsInput"} + if v.InstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) + } + if v.CoreCount == nil { + invalidParams.Add(smithy.NewErrParamRequired("CoreCount")) + } + if v.ThreadsPerCore == nil { + invalidParams.Add(smithy.NewErrParamRequired("ThreadsPerCore")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpModifyInstanceCreditSpecificationInput(v *ModifyInstanceCreditSpecificationInput) error { if v == nil { return nil @@ -18217,20 +18262,20 @@ func validateOpReplaceNetworkAclEntryInput(v *ReplaceNetworkAclEntryInput) error return nil } invalidParams := smithy.InvalidParamsError{Context: "ReplaceNetworkAclEntryInput"} - if v.Egress == nil { - invalidParams.Add(smithy.NewErrParamRequired("Egress")) - } if v.NetworkAclId == nil { invalidParams.Add(smithy.NewErrParamRequired("NetworkAclId")) } + if v.RuleNumber == nil { + invalidParams.Add(smithy.NewErrParamRequired("RuleNumber")) + } if v.Protocol == nil { invalidParams.Add(smithy.NewErrParamRequired("Protocol")) } if len(v.RuleAction) == 0 { invalidParams.Add(smithy.NewErrParamRequired("RuleAction")) } - if v.RuleNumber == nil { - invalidParams.Add(smithy.NewErrParamRequired("RuleNumber")) + if v.Egress == nil { + invalidParams.Add(smithy.NewErrParamRequired("Egress")) } if invalidParams.Len() > 0 { return invalidParams @@ -18316,12 +18361,12 @@ func validateOpReportInstanceStatusInput(v *ReportInstanceStatusInput) error { if v.Instances == nil { invalidParams.Add(smithy.NewErrParamRequired("Instances")) } - if v.ReasonCodes == nil { - invalidParams.Add(smithy.NewErrParamRequired("ReasonCodes")) - } if len(v.Status) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Status")) } + if v.ReasonCodes == nil { + invalidParams.Add(smithy.NewErrParamRequired("ReasonCodes")) + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -18421,12 +18466,12 @@ func validateOpResetInstanceAttributeInput(v *ResetInstanceAttributeInput) error return nil } invalidParams := smithy.InvalidParamsError{Context: "ResetInstanceAttributeInput"} - if len(v.Attribute) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Attribute")) - } if v.InstanceId == nil { invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) } + if len(v.Attribute) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Attribute")) + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ecr/CHANGELOG.md b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ecr/CHANGELOG.md index df1b6ba4..b495d38c 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ecr/CHANGELOG.md +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ecr/CHANGELOG.md @@ -1,3 +1,12 @@ +# v1.36.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.35.4 (2024-10-03) + +* No change notes available for this release. + # v1.35.3 (2024-09-27) * No change notes available for this release. diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ecr/api_client.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ecr/api_client.go index 189109eb..933898d2 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ecr/api_client.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ecr/api_client.go @@ -187,10 +187,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) - resolveMeterProvider(&options) - resolveTracerProvider(&options) + resolveMeterProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { @@ -275,7 +275,9 @@ func (c *Client) invokeOperation( defer endTimer() defer span.End() - handler := smithyhttp.NewClientHandler(options.HTTPClient) + handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) { + o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/ecr") + }) decorated := middleware.DecorateHandler(handler, stack) result, metadata, err = decorated.Handle(ctx, params) if err != nil { diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ecr/go_module_metadata.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ecr/go_module_metadata.go index 3a3a1c35..70b9e1e7 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ecr/go_module_metadata.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ecr/go_module_metadata.go @@ -3,4 +3,4 @@ package ecr // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.35.3" +const goModuleVersion = "1.36.0" diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md index d4bc00fd..297618fc 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.12.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. + # v1.11.5 (2024-09-20) * No change notes available for this release. diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go index 823c5f15..4e50b257 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go @@ -3,4 +3,4 @@ package acceptencoding // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.11.5" +const goModuleVersion = "1.12.0" diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md index 8e859f5b..ab581474 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md @@ -1,3 +1,8 @@ +# v1.12.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.11.20 (2024-09-20) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go index fa0269d3..418c4d7c 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go @@ -3,4 +3,4 @@ package presignedurl // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.11.20" +const goModuleVersion = "1.12.0" diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md index 354e7da5..e8f23747 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md @@ -1,3 +1,12 @@ +# v1.24.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.4 (2024-10-03) + +* No change notes available for this release. + # v1.23.3 (2024-09-27) * No change notes available for this release. diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go index 274b1527..644ee1e0 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go @@ -186,10 +186,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) - resolveMeterProvider(&options) - resolveTracerProvider(&options) + resolveMeterProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { @@ -274,7 +274,9 @@ func (c *Client) invokeOperation( defer endTimer() defer span.End() - handler := smithyhttp.NewClientHandler(options.HTTPClient) + handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) { + o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/sso") + }) decorated := middleware.DecorateHandler(handler, stack) result, metadata, err = decorated.Handle(ctx, params) if err != nil { diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go index b1adc4d0..35a5a4c9 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go @@ -3,4 +3,4 @@ package sso // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.23.3" +const goModuleVersion = "1.24.0" diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md index f8e6d7b3..cf22cc93 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md @@ -1,3 +1,12 @@ +# v1.28.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.4 (2024-10-03) + +* No change notes available for this release. + # v1.27.3 (2024-09-27) * No change notes available for this release. diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go index 16c90821..0b05bf6c 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go @@ -186,10 +186,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) - resolveMeterProvider(&options) - resolveTracerProvider(&options) + resolveMeterProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { @@ -274,7 +274,9 @@ func (c *Client) invokeOperation( defer endTimer() defer span.End() - handler := smithyhttp.NewClientHandler(options.HTTPClient) + handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) { + o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/ssooidc") + }) decorated := middleware.DecorateHandler(handler, stack) result, metadata, err = decorated.Handle(ctx, params) if err != nil { diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go index e31a28ff..2be0920f 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go @@ -3,4 +3,4 @@ package ssooidc // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.27.3" +const goModuleVersion = "1.28.0" diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md index d7151090..c43ff93d 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md @@ -1,3 +1,12 @@ +# v1.32.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.31.4 (2024-10-03) + +* No change notes available for this release. + # v1.31.3 (2024-09-27) * No change notes available for this release. diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go index 4425ba95..4e678ce2 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go @@ -190,10 +190,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) - resolveMeterProvider(&options) - resolveTracerProvider(&options) + resolveMeterProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { @@ -278,7 +278,9 @@ func (c *Client) invokeOperation( defer endTimer() defer span.End() - handler := smithyhttp.NewClientHandler(options.HTTPClient) + handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) { + o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/sts") + }) decorated := middleware.DecorateHandler(handler, stack) result, metadata, err = decorated.Handle(ctx, params) if err != nil { diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go index 0f759930..c4eb441b 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go @@ -3,4 +3,4 @@ package sts // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.31.3" +const goModuleVersion = "1.32.0" diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/smithy-go/CHANGELOG.md b/amazon-eks-ami/nodeadm/vendor/github.com/aws/smithy-go/CHANGELOG.md index 28d3ccb9..c63f18f5 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/smithy-go/CHANGELOG.md +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/smithy-go/CHANGELOG.md @@ -1,3 +1,18 @@ +# Release (2024-10-03) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/smithy-go`: v1.22.0 + * **Feature**: Add HTTP client metrics. + +# Release (2024-09-25) + +## Module Highlights +* `github.com/aws/smithy-go/aws-http-auth`: [v1.0.0](aws-http-auth/CHANGELOG.md#v100-2024-09-25) + * **Release**: Initial release of module aws-http-auth, which implements generically consumable SigV4 and SigV4a request signing. + # Release (2024-09-19) ## General Highlights diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/smithy-go/go_module_metadata.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/smithy-go/go_module_metadata.go index 24162a6f..d7a7627b 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/smithy-go/go_module_metadata.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/smithy-go/go_module_metadata.go @@ -3,4 +3,4 @@ package smithy // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.21.0" +const goModuleVersion = "1.22.0" diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/smithy-go/transport/http/client.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/smithy-go/transport/http/client.go index c43c346b..0fceae81 100644 --- a/amazon-eks-ami/nodeadm/vendor/github.com/aws/smithy-go/transport/http/client.go +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/smithy-go/transport/http/client.go @@ -6,6 +6,7 @@ import ( "net/http" smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/tracing" ) @@ -28,13 +29,30 @@ func (fn ClientDoFunc) Do(r *http.Request) (*http.Response, error) { // implementation is http.Client. type ClientHandler struct { client ClientDo + + Meter metrics.Meter // For HTTP client metrics. } // NewClientHandler returns an initialized middleware handler for the client. +// +// Deprecated: Use [NewClientHandlerWithOptions]. func NewClientHandler(client ClientDo) ClientHandler { - return ClientHandler{ + return NewClientHandlerWithOptions(client) +} + +// NewClientHandlerWithOptions returns an initialized middleware handler for the client +// with applied options. +func NewClientHandlerWithOptions(client ClientDo, opts ...func(*ClientHandler)) ClientHandler { + h := ClientHandler{ client: client, } + for _, opt := range opts { + opt(&h) + } + if h.Meter == nil { + h.Meter = metrics.NopMeterProvider{}.Meter("") + } + return h } // Handle implements the middleware Handler interface, that will invoke the @@ -46,6 +64,11 @@ func (c ClientHandler) Handle(ctx context.Context, input interface{}) ( ctx, span := tracing.StartSpan(ctx, "DoHTTPRequest") defer span.End() + ctx, client, err := withMetrics(ctx, c.client, c.Meter) + if err != nil { + return nil, metadata, fmt.Errorf("instrument with HTTP metrics: %w", err) + } + req, ok := input.(*Request) if !ok { return nil, metadata, fmt.Errorf("expect Smithy http.Request value as input, got unsupported type %T", input) @@ -66,7 +89,7 @@ func (c ClientHandler) Handle(ctx context.Context, input interface{}) ( span.SetProperty("http.request_content_length", length) } - resp, err := c.client.Do(builtRequest) + resp, err := client.Do(builtRequest) if resp == nil { // Ensure a http response value is always present to prevent unexpected // panics. diff --git a/amazon-eks-ami/nodeadm/vendor/github.com/aws/smithy-go/transport/http/metrics.go b/amazon-eks-ami/nodeadm/vendor/github.com/aws/smithy-go/transport/http/metrics.go new file mode 100644 index 00000000..ab110139 --- /dev/null +++ b/amazon-eks-ami/nodeadm/vendor/github.com/aws/smithy-go/transport/http/metrics.go @@ -0,0 +1,184 @@ +package http + +import ( + "context" + "crypto/tls" + "net/http" + "net/http/httptrace" + "time" + + "github.com/aws/smithy-go/metrics" +) + +var now = time.Now + +// withMetrics instruments an HTTP client and context to collect HTTP metrics. +func withMetrics(parent context.Context, client ClientDo, meter metrics.Meter) ( + context.Context, ClientDo, error, +) { + hm, err := newHTTPMetrics(meter) + if err != nil { + return nil, nil, err + } + + ctx := httptrace.WithClientTrace(parent, &httptrace.ClientTrace{ + DNSStart: hm.DNSStart, + ConnectStart: hm.ConnectStart, + TLSHandshakeStart: hm.TLSHandshakeStart, + + GotConn: hm.GotConn(parent), + PutIdleConn: hm.PutIdleConn(parent), + ConnectDone: hm.ConnectDone(parent), + DNSDone: hm.DNSDone(parent), + TLSHandshakeDone: hm.TLSHandshakeDone(parent), + GotFirstResponseByte: hm.GotFirstResponseByte(parent), + }) + return ctx, &timedClientDo{client, hm}, nil +} + +type timedClientDo struct { + ClientDo + hm *httpMetrics +} + +func (c *timedClientDo) Do(r *http.Request) (*http.Response, error) { + c.hm.doStart = now() + resp, err := c.ClientDo.Do(r) + + c.hm.DoRequestDuration.Record(r.Context(), elapsed(c.hm.doStart)) + return resp, err +} + +type httpMetrics struct { + DNSLookupDuration metrics.Float64Histogram // client.http.connections.dns_lookup_duration + ConnectDuration metrics.Float64Histogram // client.http.connections.acquire_duration + TLSHandshakeDuration metrics.Float64Histogram // client.http.connections.tls_handshake_duration + ConnectionUsage metrics.Int64UpDownCounter // client.http.connections.usage + + DoRequestDuration metrics.Float64Histogram // client.http.do_request_duration + TimeToFirstByte metrics.Float64Histogram // client.http.time_to_first_byte + + doStart time.Time + dnsStart time.Time + connectStart time.Time + tlsStart time.Time +} + +func newHTTPMetrics(meter metrics.Meter) (*httpMetrics, error) { + hm := &httpMetrics{} + + var err error + hm.DNSLookupDuration, err = meter.Float64Histogram("client.http.connections.dns_lookup_duration", func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = "The time it takes a request to perform DNS lookup." + }) + if err != nil { + return nil, err + } + hm.ConnectDuration, err = meter.Float64Histogram("client.http.connections.acquire_duration", func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = "The time it takes a request to acquire a connection." + }) + if err != nil { + return nil, err + } + hm.TLSHandshakeDuration, err = meter.Float64Histogram("client.http.connections.tls_handshake_duration", func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = "The time it takes an HTTP request to perform the TLS handshake." + }) + if err != nil { + return nil, err + } + hm.ConnectionUsage, err = meter.Int64UpDownCounter("client.http.connections.usage", func(o *metrics.InstrumentOptions) { + o.UnitLabel = "{connection}" + o.Description = "Current state of connections pool." + }) + if err != nil { + return nil, err + } + hm.DoRequestDuration, err = meter.Float64Histogram("client.http.do_request_duration", func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = "Time spent performing an entire HTTP transaction." + }) + if err != nil { + return nil, err + } + hm.TimeToFirstByte, err = meter.Float64Histogram("client.http.time_to_first_byte", func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = "Time from start of transaction to when the first response byte is available." + }) + if err != nil { + return nil, err + } + + return hm, nil +} + +func (m *httpMetrics) DNSStart(httptrace.DNSStartInfo) { + m.dnsStart = now() +} + +func (m *httpMetrics) ConnectStart(string, string) { + m.connectStart = now() +} + +func (m *httpMetrics) TLSHandshakeStart() { + m.tlsStart = now() +} + +func (m *httpMetrics) GotConn(ctx context.Context) func(httptrace.GotConnInfo) { + return func(httptrace.GotConnInfo) { + m.addConnAcquired(ctx, 1) + } +} + +func (m *httpMetrics) PutIdleConn(ctx context.Context) func(error) { + return func(error) { + m.addConnAcquired(ctx, -1) + } +} + +func (m *httpMetrics) DNSDone(ctx context.Context) func(httptrace.DNSDoneInfo) { + return func(httptrace.DNSDoneInfo) { + m.DNSLookupDuration.Record(ctx, elapsed(m.dnsStart)) + } +} + +func (m *httpMetrics) ConnectDone(ctx context.Context) func(string, string, error) { + return func(string, string, error) { + m.ConnectDuration.Record(ctx, elapsed(m.connectStart)) + } +} + +func (m *httpMetrics) TLSHandshakeDone(ctx context.Context) func(tls.ConnectionState, error) { + return func(tls.ConnectionState, error) { + m.TLSHandshakeDuration.Record(ctx, elapsed(m.tlsStart)) + } +} + +func (m *httpMetrics) GotFirstResponseByte(ctx context.Context) func() { + return func() { + m.TimeToFirstByte.Record(ctx, elapsed(m.doStart)) + } +} + +func (m *httpMetrics) addConnAcquired(ctx context.Context, incr int64) { + m.ConnectionUsage.Add(ctx, incr, func(o *metrics.RecordMetricOptions) { + o.Properties.Set("state", "acquired") + }) +} + +// Not used: it is recommended to track acquired vs idle conn, but we can't +// determine when something is truly idle with the current HTTP client hooks +// available to us. +func (m *httpMetrics) addConnIdle(ctx context.Context, incr int64) { + m.ConnectionUsage.Add(ctx, incr, func(o *metrics.RecordMetricOptions) { + o.Properties.Set("state", "idle") + }) +} + +func elapsed(start time.Time) float64 { + end := now() + elapsed := end.Sub(start) + return float64(elapsed) / 1e9 +} diff --git a/amazon-eks-ami/nodeadm/vendor/modules.txt b/amazon-eks-ami/nodeadm/vendor/modules.txt index 940a2947..5a5477f6 100644 --- a/amazon-eks-ami/nodeadm/vendor/modules.txt +++ b/amazon-eks-ami/nodeadm/vendor/modules.txt @@ -8,7 +8,7 @@ github.com/Microsoft/go-winio/internal/fs github.com/Microsoft/go-winio/internal/socket github.com/Microsoft/go-winio/internal/stringbuffer github.com/Microsoft/go-winio/pkg/guid -# github.com/aws/aws-sdk-go-v2 v1.31.0 +# github.com/aws/aws-sdk-go-v2 v1.32.0 ## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/aws github.com/aws/aws-sdk-go-v2/aws/defaults @@ -36,10 +36,10 @@ github.com/aws/aws-sdk-go-v2/internal/shareddefaults github.com/aws/aws-sdk-go-v2/internal/strings github.com/aws/aws-sdk-go-v2/internal/sync/singleflight github.com/aws/aws-sdk-go-v2/internal/timeconv -# github.com/aws/aws-sdk-go-v2/config v1.27.39 +# github.com/aws/aws-sdk-go-v2/config v1.27.41 ## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/config -# github.com/aws/aws-sdk-go-v2/credentials v1.17.37 +# github.com/aws/aws-sdk-go-v2/credentials v1.17.39 ## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/credentials github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds @@ -48,51 +48,51 @@ github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client github.com/aws/aws-sdk-go-v2/credentials/processcreds github.com/aws/aws-sdk-go-v2/credentials/ssocreds github.com/aws/aws-sdk-go-v2/credentials/stscreds -# github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 +# github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.15 ## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/feature/ec2/imds github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config -# github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 +# github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.19 ## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/internal/configsources -# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 +# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.19 ## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 # github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 ## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/internal/ini -# github.com/aws/aws-sdk-go-v2/service/ec2 v1.179.2 +# github.com/aws/aws-sdk-go-v2/service/ec2 v1.181.0 ## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/ec2 github.com/aws/aws-sdk-go-v2/service/ec2/internal/endpoints github.com/aws/aws-sdk-go-v2/service/ec2/types -# github.com/aws/aws-sdk-go-v2/service/ecr v1.35.3 +# github.com/aws/aws-sdk-go-v2/service/ecr v1.36.0 ## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/ecr github.com/aws/aws-sdk-go-v2/service/ecr/internal/endpoints github.com/aws/aws-sdk-go-v2/service/ecr/types -# github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 +# github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 ## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding -# github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 +# github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.0 ## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/internal/presigned-url -# github.com/aws/aws-sdk-go-v2/service/sso v1.23.3 +# github.com/aws/aws-sdk-go-v2/service/sso v1.24.0 ## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/sso github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints github.com/aws/aws-sdk-go-v2/service/sso/types -# github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3 +# github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.0 ## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/ssooidc github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints github.com/aws/aws-sdk-go-v2/service/ssooidc/types -# github.com/aws/aws-sdk-go-v2/service/sts v1.31.3 +# github.com/aws/aws-sdk-go-v2/service/sts v1.32.0 ## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/sts github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints github.com/aws/aws-sdk-go-v2/service/sts/types -# github.com/aws/smithy-go v1.21.0 +# github.com/aws/smithy-go v1.22.0 ## explicit; go 1.21 github.com/aws/smithy-go github.com/aws/smithy-go/auth diff --git a/amazon-eks-ami/templates/al2/variables-default.json b/amazon-eks-ami/templates/al2/variables-default.json index d89fa441..0e6c96a7 100644 --- a/amazon-eks-ami/templates/al2/variables-default.json +++ b/amazon-eks-ami/templates/al2/variables-default.json @@ -13,7 +13,7 @@ "binary_bucket_region": "us-west-2", "cache_container_images": "false", "cni_plugin_version": "v1.2.0", - "containerd_version": "1.7.11-*", + "containerd_version": "1.7.*", "creator": "{{env `USER`}}", "docker_version": "none", "enable_fips": "false",