Skip to content

Commit

Permalink
Fix legacy arn trait name usage
Browse files Browse the repository at this point in the history
  • Loading branch information
kstich committed Aug 5, 2024
1 parent 3d76f98 commit 5f07427
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public ArnIndex(Model model) {
arnServices.put(service.getId(), service.expectTrait(ServiceTrait.class).getArnNamespace());
}

// Pre-compute all of the ArnTemplates in a service shape.
// Pre-compute all of the ARN templates in a service shape.
TopDownIndex topDownIndex = TopDownIndex.of(model);
List<ServiceShape> services = model.shapes(ServiceShape.class)
.filter(shape -> shape.hasTrait(ServiceTrait.class))
Expand Down Expand Up @@ -126,10 +126,10 @@ public String getServiceArnNamespace(ToShapeId serviceId) {

/**
* Gets all of the mappings of resources within a service to its
* arnTemplate trait.
* arn trait.
*
* @param service Service to retrieve.
* @return Returns the mapping of resource ID to arnTemplate traits.
* @return Returns the mapping of resource ID to arn traits.
*/
public Map<ShapeId, ArnTrait> getServiceResourceArns(ToShapeId service) {
return templates.getOrDefault(service.toShapeId(), Collections.emptyMap());
Expand Down Expand Up @@ -160,10 +160,10 @@ public Optional<ArnTrait> getEffectiveOperationArn(ToShapeId service, ToShapeId
* <p>For relative ARNs, the returned template string is in the format of
* <code>arn:{AWS::Partition}:service:{AWS::Region}:{AWS::AccountId}:resource</code>
* where "service" is the resolved ARN service name of the service and
* "resource" is the resource part of the arnTemplate template.
* "{AWS::Region}" is added to the template if the arnTemplate "noRegion"
* "resource" is the resource part of the arn template.
* "{AWS::Region}" is added to the template if the arn "noRegion"
* value is not set to true. "{AWS::AccountId}" is added to the template if
* the arnTemplate "noAccount" value is not set to true.
* the arn "noAccount" value is not set to true.
*
* <p>For example, if both "noAccount" and "noRegion" are set to true,
* the resolved ARN template might look like "arn:{AWS::Partition}:service:::resource".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public static Builder builder() {
* <p>If not set, this value defaults to the name of the service shape
* converted to lowercase. This value is combined with resources contained
* within the service to form ARNs for resources. Only resources that
* explicitly define the 'aws.api#arnTemplate' trait are assigned ARNs,
* explicitly define the 'aws.api#arn' trait are assigned ARNs,
* and their relative ARNs are combined with the service's arnNamespace to
* form an ARN.
*
Expand Down

0 comments on commit 5f07427

Please sign in to comment.