private void AddDataToDynamoDb(APIDataUserFlowDbEntity apiData) { Dictionary <string, AttributeValue> attributes = new Dictionary <string, AttributeValue>(); attributes["apiName"] = new AttributeValue { S = apiData.ApiName }; attributes["environment"] = new AttributeValue { S = apiData.Environment }; attributes["awsAccount"] = new AttributeValue { S = apiData.AwsAccount }; attributes["allowedGroups"] = new AttributeValue { SS = new List <string>(apiData.AllowedGroups) }; PutItemRequest request = new PutItemRequest { TableName = "APIAuthenticatorData", Item = attributes }; DynamoDBClient.PutItemAsync(request).GetAwaiter().GetResult(); }
public static APIDataUserFlow ToDomain(this APIDataUserFlowDbEntity data) { return(new APIDataUserFlow { ApiName = data.ApiName, Environment = data.Environment, AwsAccount = data.AwsAccount, AllowedGroups = data.AllowedGroups }); }