Class ArnIndex
- All Implemented Interfaces:
KnowledgeIndex
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetEffectiveOperationArn
(ToShapeId service, ToShapeId operation) Gets the effective ARN of an operation based on the identifier bindings of the operation bound to a resource contained within a service.getFullResourceArnTemplate
(ToShapeId service, ToShapeId resource) Expands the relative ARN of a resource with the service name to form a full ARN template.getServiceArnNamespace
(ToShapeId serviceId) Gets the ARN service namespace of a service shape.getServiceResourceArns
(ToShapeId service) Gets all of the mappings of resources within a service to its arnTemplate trait.static ArnIndex
-
Constructor Details
-
ArnIndex
-
-
Method Details
-
of
-
getServiceArnNamespace
Gets the ARN service namespace of a service shape.- Parameters:
serviceId
- Service shape to get ARN namespace of.- Returns:
- Returns the resolved ARN service namespace, defaulting to the lowercase shape name if not known.
-
getServiceResourceArns
Gets all of the mappings of resources within a service to its arnTemplate trait.- Parameters:
service
- Service to retrieve.- Returns:
- Returns the mapping of resource ID to arnTemplate traits.
-
getEffectiveOperationArn
Gets the effective ARN of an operation based on the identifier bindings of the operation bound to a resource contained within a service.An operation bound to a resource using a collection binding has an effective ARN of the parent of the resource. An operation bound to a resource using an instance binding uses the ARN of the resource as its effective ARN.
- Parameters:
service
- Service the operation is bound within.operation
- Operation shape for which to find the effective ARN.- Returns:
- Returns the optionally found effective ARN.
-
getFullResourceArnTemplate
Expands the relative ARN of a resource with the service name to form a full ARN template.For relative ARNs, the returned template string is in the format of
arn:{AWS::Partition}:service:{AWS::Region}:{AWS::AccountId}:resource
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" value is not set to true. "{AWS::AccountId}" is added to the template if the arnTemplate "noAccount" value is not set to true.For example, if both "noAccount" and "noRegion" are set to true, the resolved ARN template might look like "arn:{AWS::Partition}:service:::resource".
Absolute ARN templates are returned as-is.
- Parameters:
service
- Service shape ID.resource
- Resource shape ID.- Returns:
- Returns the optionally found ARN template for a resource.
-