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

Expand AWS endpoint trait documentation #2374

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/source-2.0/aws/aws-endpoints-region.rst
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,13 @@ in the given partition. A PartitionSpecialCase object contains the following pro
- Description
* - endpoint
- ``string``
- **Required**. The special-cased :ref:`endpoint pattern <aws.endpoints#endpoint-pattern>`
- **Required**. The special-cased :ref:`endpoint pattern <aws.endpoints#endpoint-pattern>`.
* - dualStack
- ``boolean``
- When ``true`` the special case will apply to dualstack endpoint variants.
- When ``true``, the special case will apply to dualstack endpoint variants.
* - fips
- ``boolean``
- When ``true`` the special case will apply to fips endpoint variants.
- When ``true``, the special case will apply to fips endpoint variants.


``RegionSpecialCase`` object
Expand All @@ -235,10 +235,10 @@ A ``RegionSpecialCase`` object contains the following properties:
- **Required**. The special-cased :ref:`endpoint pattern <aws.endpoints#endpoint-pattern>`.
* - dualStack
- ``boolean``
- When ``true`` the special case will apply to dualstack endpoint variants.
- When ``true``, the special case will apply to dualstack endpoint variants.
* - fips
- ``boolean``
- When ``true`` the special case will apply to fips endpoint variants.
- When ``true``, the special case will apply to fips endpoint variants.
* - signingRegion
- ``string``
- Overrides the signingRegion used for this region.
Expand Down Expand Up @@ -340,10 +340,10 @@ A ``PartitionEndpointSpecialCase`` object contains the following properties:
- Override the ``defaultGlobalRegion`` used in this partition.
* - dualStack
- ``boolean``
- When ``true`` the special case will apply to dualstack endpoint variants.
- When ``true``, the special case will apply to dualstack endpoint variants.
* - fips
- ``boolean``
- When ``true`` the special case will apply to fips endpoint variants.
- When ``true``, the special case will apply to fips endpoint variants.

.. smithy-trait:: aws.endpoints#dualStackOnlyEndpoints
.. _aws.endpoints#dualStackOnlyEndpoints-trait:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,33 @@ namespace aws.endpoints
/// The targeted trait must only be applied to service shapes,
/// must be a structure, and must have the `trait` trait.
@trait(
selector: "structure[trait|trait]",
selector: "structure[trait|trait]"
breakingChanges: [{change: "presence"}]
)
structure endpointsModifier { }

/// Marks that a services endpoints should be resolved using
/// standard regional endpoint patterns.
@trait(
selector: "service",
conflicts: [standardPartitionalEndpoints],
selector: "service"
conflicts: [standardPartitionalEndpoints]
breakingChanges: [{change: "remove"}]
)
@endpointsModifier
@unstable
structure standardRegionalEndpoints {
/// A list of partition special cases - endpoints for a partition that do not follow the standard patterns.
partitionSpecialCases: PartitionSpecialCaseMap,
/// A list of regional special cases - endpoints for a region that do not follow the standard patterns.
/// A map of partition to partition special cases -
/// endpoints for a partition that do not follow the standard patterns.
partitionSpecialCases: PartitionSpecialCaseMap

/// A map of region to regional special cases -
/// endpoints for a region that do not follow the standard patterns.
regionSpecialCases: RegionSpecialCaseMap
}

@private
map PartitionSpecialCaseMap {
key: String,
key: String
value: PartitionSpecialCaseList
}

Expand All @@ -39,18 +42,23 @@ list PartitionSpecialCaseList {
member: PartitionSpecialCase
}

/// Defines the endpoint pattern to apply for all regional endpoints in the given partition.
@private
structure PartitionSpecialCase {
/// The special-cased endpoint pattern.
@required
endpoint: String,
endpoint: String

/// When true, the special case will apply to dualstack endpoint variants.
dualStack: Boolean

dualStack: Boolean,
/// When true, the special case will apply to fips endpoint variants.
fips: Boolean
}

@private
map RegionSpecialCaseMap {
key: String,
key: String
value: RegionSpecialCaseList
}

Expand All @@ -59,33 +67,41 @@ list RegionSpecialCaseList {
member: RegionSpecialCase
}

/// Defines the endpoint pattern to apply for a region.
@private
structure RegionSpecialCase {
/// The special-cased endpoint pattern.
@required
endpoint: String,
endpoint: String

/// When true, the special case will apply to dualstack endpoint variants.
dualStack: Boolean

/// When true, the special case will apply to fips endpoint variants.
fips: Boolean

dualStack: Boolean,
fips: Boolean,
/// Overrides the signingRegion used for this region.
signingRegion: String
}

/// Marks that a services is non-regionalized and has
/// a single endpoint in each partition.
@trait(
selector: "service",
conflicts: [standardRegionalEndpoints],
selector: "service"
conflicts: [standardRegionalEndpoints]
breakingChanges: [{change: "any"}]
)
@endpointsModifier
@unstable
structure standardPartitionalEndpoints {
/// The pattern type to use for the partition endpoint.
@required
endpointPatternType: PartitionEndpointPattern,
endpointPatternType: PartitionEndpointPattern

/// A list of partition endpoint special cases - partitions that do not follow the services standard patterns
/// or are located in a region other than the partition's defaultGlobalRegion.
partitionEndpointSpecialCases: PartitionEndpointSpecialCaseMap,
/// A map of partition to a list of partition endpoint special cases -
/// partitions that do not follow the services standard patterns or are
/// located in a region other than the partition's defaultGlobalRegion.
partitionEndpointSpecialCases: PartitionEndpointSpecialCaseMap
}

@private
Expand All @@ -96,7 +112,7 @@ enum PartitionEndpointPattern {

@private
map PartitionEndpointSpecialCaseMap {
key: String,
key: String
value: PartitionEndpointSpecialCaseList
}

Expand All @@ -105,17 +121,25 @@ list PartitionEndpointSpecialCaseList {
member: PartitionEndpointSpecialCase
}

/// Defines the endpoint pattern to apply for a partitional endpoint.
@private
structure PartitionEndpointSpecialCase {
endpoint: String,
region: String,
dualStack: Boolean,
fips: Boolean,
/// The special-cased endpoint pattern.
endpoint: String

/// The region to override the defaultGlobalRegion used in this partition.
region: String

/// When true, the special case will apply to dualstack endpoint variants.
dualStack: Boolean

/// When true, the special case will apply to fips endpoint variants.
fips: Boolean
}

/// Marks that a services has only dualStack endpoints.
@trait(
selector: "service",
selector: "service"
breakingChanges: [{change: "any"}]
)
@endpointsModifier
Expand All @@ -124,7 +148,7 @@ structure dualStackOnlyEndpoints { }

/// Marks that a services has hand written endpoint rules.
@trait(
selector: "service",
selector: "service"
breakingChanges: [{change: "any"}]
)
@endpointsModifier
Expand Down
Loading