mirror of
https://dev.azure.com/effectory/Survey%20Software/_git/Cloud%20Engineering
synced 2026-02-27 18:52:18 +01:00
Added Creatondate consoleapp and tagging policy
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
using AzureRestApi.Models.Resources;
|
||||
|
||||
namespace AzureRestApi.Models.Api
|
||||
{
|
||||
public class ResourcesResponse
|
||||
{
|
||||
public List<Resource>? value { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using AzureRestApi.Models.Resources;
|
||||
|
||||
namespace AzureRestApi.Models.Api
|
||||
{
|
||||
public class SubscriptionResponse
|
||||
{
|
||||
public List<Subscription>? value { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using AzureRestApi.Models.Resources;
|
||||
|
||||
namespace AzureRestApi.Models.Api
|
||||
{
|
||||
public class TagProperties
|
||||
{
|
||||
public TagTags properties { get; set; } = new TagTags();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
namespace AzureRestApi.Models.Resources
|
||||
{
|
||||
public class Resource
|
||||
{
|
||||
public string? id { get; set; }
|
||||
public string? name { get; set; }
|
||||
public string? type { get; set; }
|
||||
public string? location { get; set; }
|
||||
public string? createdTime { get; set; }
|
||||
public string? changedTime { get; set; }
|
||||
public Dictionary<string, string> tags { get; set; } = new Dictionary<string, string>();
|
||||
|
||||
public string? CreatedOn
|
||||
{
|
||||
get
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(createdTime))
|
||||
{
|
||||
return changedTime;
|
||||
}
|
||||
else
|
||||
{
|
||||
return createdTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
namespace AzureRestApi.Models.Resources
|
||||
{
|
||||
public class Subscription
|
||||
{
|
||||
public string? id { get; set; }
|
||||
public string? authorizationSource { get; set; }
|
||||
public string? subscriptionId { get; set; }
|
||||
public string? tenantId { get; set; }
|
||||
public string? displayName { get; set; }
|
||||
public string? state { get; set; }
|
||||
|
||||
public bool Enabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return state == "Enabled";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace AzureRestApi.Models.Resources
|
||||
{
|
||||
public class TagTags
|
||||
{
|
||||
public Dictionary<string, string> tags { get; set; } = new Dictionary<string, string>();
|
||||
}
|
||||
}
|
||||
8
ConsoleApps/AzureRestApi/AzureRestApi/Models/Settings.cs
Normal file
8
ConsoleApps/AzureRestApi/AzureRestApi/Models/Settings.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace AzureRestApi.Models
|
||||
{
|
||||
public class Settings
|
||||
{
|
||||
public string KeyVaultName { get; set; }
|
||||
public string AzureTenantId { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user