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

Accelerator: FromAcceleratorAttributes method gives CS0426 error #28076

Open
werebear73-tritelph opened this issue Nov 20, 2023 · 1 comment
Open
Labels
@aws-cdk/aws-globalaccelerator Related to AWS Global Accelerator bug This issue is a bug. effort/medium Medium work item – several days of effort language/dotnet Related to .NET bindings p3

Comments

@werebear73-tritelph
Copy link

Describe the bug

When I try to use the FromAcceleratorAttributes method to get an existing Global Accelerator I get a CS0426 error.

Accelerator globalAccelerator = new Accelerator.FromAcceleratorAttributes(this, $"TestGlobalAccelerator", new AcceleratorAttributes()
        {
            AcceleratorArn = System.Environment.GetEnvironmentVariable("AcceleratorArn"),
            DnsName = System.Environment.GetEnvironmentVariable("DnsName"),
        });

Severity Code Description
Error CS0426 The type name 'FromAcceleratorAttributes' does not exist in the type 'Accelerator'

Expected Behavior

That I can reference an existing Global Accelerator in my stack.

Current Behavior

Error Message in VS2022

Reproduction Steps

Use this code

Accelerator globalAccelerator = new Accelerator.FromAcceleratorAttributes(this, $"TestGlobalAccelerator", new AcceleratorAttributes()
        {
            AcceleratorArn = System.Environment.GetEnvironmentVariable("AcceleratorArn"),
            DnsName = System.Environment.GetEnvironmentVariable("DnsName"),
        });

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.106.0

Framework Version

No response

Node.js Version

v18.16.0

OS

Windows 11

Language

.NET

Language Version

6.0

Other information

No response

@werebear73-tritelph werebear73-tritelph added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 20, 2023
@github-actions github-actions bot added the @aws-cdk/aws-globalaccelerator Related to AWS Global Accelerator label Nov 20, 2023
@pahud
Copy link
Contributor

pahud commented Nov 21, 2023

Looks like it's an compile error but FromAcceleratorAttributes should be supported.

@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Nov 21, 2023
@pahud pahud added the language/dotnet Related to .NET bindings label Nov 22, 2023
@pahud pahud added p3 and removed p2 labels Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-globalaccelerator Related to AWS Global Accelerator bug This issue is a bug. effort/medium Medium work item – several days of effort language/dotnet Related to .NET bindings p3
Projects
None yet
Development

No branches or pull requests

2 participants