in src/node.ts [219:240]
public fetchData(dataSdkCallPolicy: customresources.AwsCustomResourcePolicy) {
// This call doesn't really need all the permissions its using in the
// provided policy, but since the policy must be constructed all at once
// this is the only way to do it effectively
const nodeDataSdkCall = {
service: 'ManagedBlockchain',
action: 'getNode',
parameters: { NetworkId: this.networkId, MemberId: this.memberId, NodeId: this.nodeId },
physicalResourceId: customresources.PhysicalResourceId.of('Id'),
};
const nodeData = new customresources.AwsCustomResource(this, 'NodeDataResource', {
policy: dataSdkCallPolicy,
onCreate: nodeDataSdkCall,
onUpdate: nodeDataSdkCall,
});
// Grab items out of the above return values and stick them in output properties
this.endpoint = nodeData.getResponseField('Node.FrameworkAttributes.Fabric.PeerEndpoint');
this.eventEndpoint = nodeData.getResponseField('Node.FrameworkAttributes.Fabric.PeerEventEndpoint');
}