- Added deployments

- Cleanup up code to generic responses and http methods
- Added ansiconsole
This commit is contained in:
Jurjen Ladenius
2022-04-21 11:30:11 +02:00
parent 20a2f78757
commit 0a422b3c98
18 changed files with 292 additions and 103 deletions

View File

@@ -0,0 +1,7 @@
namespace AzureRestApi.Models.Api
{
public class ApiResponse<T>
{
public List<T>? value { get; set; }
}
}

View File

@@ -1,9 +0,0 @@
using AzureRestApi.Models.Resources;
namespace AzureRestApi.Models.Api
{
public class ResourcesResponse
{
public List<Resource>? value { get; set; }
}
}

View File

@@ -1,9 +0,0 @@
using AzureRestApi.Models.Resources;
namespace AzureRestApi.Models.Api
{
public class SubscriptionResponse
{
public List<Subscription>? value { get; set; }
}
}

View File

@@ -0,0 +1,11 @@
namespace AzureRestApi.Models.Resources
{
public class Deployment
{
public string? id { get; set; }
public string? name { get; set; }
public string? type { get; set; }
public string? location { get; set; }
public DeploymentProperties? properties { get; set; }
}
}

View File

@@ -0,0 +1,17 @@
namespace AzureRestApi.Models.Resources
{
public class DeploymentProperties
{
public string? templateHash { get; set; }
public string? mode { get; set; }
//public string? parameters { get; set; }
public string? provisioningState { get; set; }
public DateTimeOffset? timestamp { get; set; }
public string? duration { get; set; }
public string? correlationId { get; set; }
// public string? providers { get; set; }
//public string? dependencies { get; set; }
//public string? outputs { get; set; }
public List<Resource>? outputResources { get; set; }
}
}

View File

@@ -0,0 +1,12 @@
namespace AzureRestApi.Models.Resources
{
public class ResourceGroup
{
public string? id { get; set; }
public string? name { get; set; }
public string? managedBy { get; set; }
public string? location { get; set; }
public Dictionary<string, string> tags { get; set; } = new Dictionary<string, string>();
public DeploymentProperties? properties { get; set; }
}
}

View File

@@ -0,0 +1,7 @@
namespace AzureRestApi.Models.Resources
{
public class ResourceGroupProperties
{
public string? provisioningState { get; set; }
}
}

View File

@@ -2,7 +2,7 @@
{
public class Settings
{
public string KeyVaultName { get; set; }
public string AzureTenantId { get; set; }
public string KeyVaultName { get; set; } = string.Empty;
public string AzureTenantId { get; set; } = string.Empty;
}
}