macro_rules! ref_struct_with_id_methods {
($name:ident) => { ... };
}Expand description
Generated a ref struct, which is used to reference a given resource when you need it as a dependency of some other resource. To allow the other resources to depend on this one, the ref struct has methods for retrieving the Ref, ARN, and other attributes.
This macro also generates a method to retrieve the id field of the original resource, which is sometimes needed when generating custom ids based on a pre-existing id.
For example, SNS subscriptions have Lambdas as a subscription destination. SNS generates an additional resource for the subscription, with an id based on the Lambda id.