in create_managed_endpoint.py [0:0]
def get_writer_endpoint(cluname):
# returns the writer ednpoint value for cluster
try:
responsewe=gdbclient.describe_db_cluster_endpoints(DBClusterIdentifier = cluname) #Get endpoints for the cluster
# Only process writer endpoint that is currently active
for j in responsewe ['DBClusterEndpoints']:
if (j['EndpointType']=="WRITER" and j['Status']=='available'):
#print("Current writer endpoint: ",j['Endpoint'])
recordvalue=j['Endpoint']
return recordvalue
except ClientError as e:
print(e)
raise