Skip to content

Provide constants #3236

Closed as not planned
Closed as not planned

Description

@robinschneider

Problem description

When for example creating an image, there is an architecture, when no architecture is provided, the API defaults to x86.
The available options for architecture should be provided by the SDK.

This issue appears all across the SDK, it is not clear, what values are allowed, API docs also don't provide a list of allowed values

Proposed solution

Provide some constants for the allowed values.

type Architecture string

const (
	ArchitectureX86 Architecture = "x86"
	ArchitectureARM64 Architecture = "arm64"
)

Alternative solutions (optional)

Additional information

Not sure where I could contribute such constants in this auto generated SDK.

Activity

  1. ftl commented on Jul 23, 2025

    @ftl

    Would be great to have also the following constants and predefined values:

    const (
    	SecurityGroupRuleDirectionIngress = "ingress"
    	SecurityGroupRuleDirectionEgress  = "egress"
    
    	SecurityGroupRuleEtherTypeIPv4 = "IPv4"
    	SecurityGroupRuleEtherTypeIPv6 = "IPv6"
    )
    
    var (
    	SecurityGroupRuleProtocolTCP = iaas.Protocol{
    		Name:   ptr.To("tcp"),
    		Number: nil,
    	}
    	SecurityGroupRuleProtocolUDP = iaas.Protocol{
    		Name:   ptr.To("udp"),
    		Number: nil,
    	}
    )
  2. SerseusWasTaken commented on Sep 3, 2026

    @SerseusWasTaken
    Contributor

    Hey @robinschneider i'm going through older issues of our repositories and stumbled upon this one. Please excuse that we have not responded to this issue until now.

    In any case, as you might know, the SDK provides constants for enum values. See here for an example: albwaf crg type. API's that are not specifically declared as enums from the service API will not have any constants by default. This may be intended by the service team or an oversight, we would have to take a look at each endpoint to judge that. Sometimes endpoints are deliberately not declared as enums for compatibility reasons with planned features, other times it's just an oversight.

    Since this issue is fairly old and has been stale for a year, i'm going to close it for now. Should this still be a pain point for you, please feel free to repoen the issue with another example service where you feel like constants are missing. We can then look at the API and see if we can introduce constants or an enum type for that.

    Best regards,
    Jonas from the STACKIT Developer Tools team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions