Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apigateway package does not support private custom domain names #2995

Closed
2 of 3 tasks
apgrucza opened this issue Jan 31, 2025 · 2 comments
Closed
2 of 3 tasks

apigateway package does not support private custom domain names #2995

apgrucza opened this issue Jan 31, 2025 · 2 comments
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@apgrucza
Copy link

Acknowledgements

Describe the bug

The Go SDK for API Gateway does not include the DomainNameID field, so operations on private custom domain names fail. For such operations, DomainNameID is a required input (in addition to DomainName).

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

Expecting:

  • DomainNameID is an available field in the output for GetDomainNames.
  • DomainNameID is an available field in the input for GetDomainName, UpdateDomainName and DeleteDomainName.
  • All of the above can be executed successfully on a private custom domain name.

Current Behavior

As an example, a call to GetDomainName only allows domain name to be specified (not domain name ID). Providing just the DomainName gives the below error.

operation error API Gateway: GetDomainName, https response error StatusCode: 404, RequestID: 390c5331-bd3d-4c74-a8ac-68cc6e87120b, NotFoundException: Invalid domain name identifier specified

Reproduction Steps

The below code calls GetDomainName on each domain name. Any that are private will result in the error mentioned above.

package main

import (
    "context"
    "fmt"

    "github.com/aws/aws-sdk-go-v2/config"
    "github.com/aws/aws-sdk-go-v2/service/apigateway"
)

func main() {
    cfg, _ := config.LoadDefaultConfig(context.TODO(), config.WithRegion("ap-southeast-2"))
    client := apigateway.NewFromConfig(cfg)
    domainNamesOutput, _ := client.GetDomainNames(context.TODO(), &apigateway.GetDomainNamesInput{})

    for _, domainName := range domainNamesOutput.Items {
        domainNameDetails, err := client.GetDomainName(context.TODO(), &apigateway.GetDomainNameInput{
            DomainName: domainName.DomainName,
        })
        if err != nil {
            fmt.Printf("%s: %v\n", *domainName.DomainName, err)
        } else {
            fmt.Printf("%s: success\n", *domainNameDetails.DomainName)
        }
    }
}

Possible Solution

No response

Additional Information/Context

DomainNameID is an output for these APIs:

DomainNameID is an input for these APIs:

AWS Go SDK V2 Module Versions Used

go.mod

module mymodule

go 1.23.5

require (
	github.com/aws/aws-sdk-go-v2 v1.35.0 // indirect
	github.com/aws/aws-sdk-go-v2/config v1.29.3 // indirect
	github.com/aws/aws-sdk-go-v2/credentials v1.17.56 // indirect
	github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.26 // indirect
	github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.30 // indirect
	github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.30 // indirect
	github.com/aws/aws-sdk-go-v2/internal/ini v1.8.2 // indirect
	github.com/aws/aws-sdk-go-v2/service/apigateway v1.28.9 // indirect
	github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.2 // indirect
	github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.11 // indirect
	github.com/aws/aws-sdk-go-v2/service/sso v1.24.13 // indirect
	github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.12 // indirect
	github.com/aws/aws-sdk-go-v2/service/sts v1.33.11 // indirect
	github.com/aws/smithy-go v1.22.2 // indirect
)

Compiler and Version used

go version go1.23.5 linux/amd64

Operating System and version

Linux 5.15.167.4-microsoft-standard-WSL2

@apgrucza apgrucza added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 31, 2025
@apgrucza apgrucza changed the title apigatewayv2 package does not support private custom domain names apigateway package does not support private custom domain names Jan 31, 2025
@apgrucza apgrucza closed this as not planned Won't fix, can't repro, duplicate, stale Feb 2, 2025
Copy link

github-actions bot commented Feb 2, 2025

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

@apgrucza
Copy link
Author

apgrucza commented Feb 2, 2025

The DomainNameID field does actually exist in v2 of the SDK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant