-
Notifications
You must be signed in to change notification settings - Fork 0
/
UserConnectionInfo.cs
51 lines (47 loc) · 1.72 KB
/
UserConnectionInfo.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
namespace AutomatedAWSModelCreator
{
public class UserConnectionInfo
{
private static UserConnectionInfo _instance;
public static string UserName { get; set; }
public static string AccountId { get; set; }
public static string AccessKey { get; set; }
public static string SecretKey { get; set; }
public static string Region { get; set; }
public static string RoleArn { get; set; }
public static string EcrUri { get; set; }
public static string SagemakerBucket { get; set; }
public static string DefaultDatasetURI { get; set; }
public static string CustomUploadsURI { get; set; }
public static string DestinationURI { get; set; }
private UserConnectionInfo() { }
public static UserConnectionInfo Instance
{
get
{
if (_instance == null)
{
_instance = new UserConnectionInfo();
}
return _instance;
}
}
public void Reset()
{
AccountId = null;
AccessKey = null;
SecretKey = null;
Region = null;
RoleArn = null;
EcrUri = null;
}
public static void SetBucketAndURIs()
{
EcrUri = Properties.Settings.Default.CITU_DevTeam_ECR_URI;
SagemakerBucket = $"sagemaker-{Region}-{AccountId}";
DefaultDatasetURI = $"s3://{SagemakerBucket}/default-datasets/MMX059XA_COVERED5B/";
CustomUploadsURI = $"s3://{SagemakerBucket}/users/{UserName}/custom-uploads/";
DestinationURI = $"s3://{SagemakerBucket}/users/{UserName}/training-jobs/";
}
}
}