Class ApiTlsPolicyTrait

java.lang.Object
software.amazon.smithy.model.traits.AbstractTrait
software.amazon.smithy.aws.apigateway.traits.ApiTlsPolicyTrait
All Implemented Interfaces:
FromSourceLocation, ToNode, ToShapeId, Trait, ToSmithyBuilder<ApiTlsPolicyTrait>

public final class ApiTlsPolicyTrait extends AbstractTrait implements ToSmithyBuilder<ApiTlsPolicyTrait>
Defines the TLS policy and endpoint access mode for an API Gateway REST API.

This trait maps to the x-amazon-apigateway-security-policy and x-amazon-apigateway-endpoint-access-mode OpenAPI extensions.

  • Field Details

    • ID

      public static final ShapeId ID
  • Method Details

    • builder

      public static ApiTlsPolicyTrait.Builder builder()
      Creates a builder for the trait.
      Returns:
      Returns the created builder.
    • getSecurityPolicy

      public String getSecurityPolicy()
      Gets the security policy for the API.
      Returns:
      Returns the security policy string.
    • getEndpointAccessMode

      public Optional<String> getEndpointAccessMode()
      Gets the endpoint access mode for the API.
      Returns:
      Returns the optional endpoint access mode.
    • createNode

      protected ObjectNode createNode()
      Description copied from class: AbstractTrait
      The result of toNode is used for hashCodes and equality. Subclasses must implement createNode to turn the trait into a Node. This is then cached for subsequent retrievals.
      Specified by:
      createNode in class AbstractTrait
      Returns:
      Returns the trait as a node.
    • toBuilder

      public ApiTlsPolicyTrait.Builder toBuilder()
      Description copied from interface: ToSmithyBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToSmithyBuilder<ApiTlsPolicyTrait>
      Returns:
      a builder for type T