Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET v4 folders: adding CloudFormation and CloudWatch #7197

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions dotnetv4/CloudWatch/Actions/CloudWatchActions.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AWSSDK.CloudWatch" Version="4.0.0-preview.4" />
<PackageReference Include="AWSSDK.Extensions.NETCore.Setup" Version="4.0.0-preview.4" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0" />
<PackageReference Include="System.Text.Json" Version="9.0.0" />
</ItemGroup>

</Project>
93 changes: 93 additions & 0 deletions dotnetv4/CloudWatch/Actions/CloudWatchClasses.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

using System.Text.Json.Serialization;

namespace CloudWatchActions;

public class Left
{
[JsonPropertyName("min")]
public int Min { get; set; }

[JsonPropertyName("max")]
public int Max { get; set; }
}

public class Properties
{
[JsonPropertyName("markdown")]
public string Markdown { get; set; } = null!;

[JsonPropertyName("metrics")]
public List<List<object>> Metrics { get; set; } = null!;

[JsonPropertyName("view")]
public string View { get; set; } = null!;

[JsonPropertyName("region")]
public string Region { get; set; } = null!;

[JsonPropertyName("stat")]
public string Stat { get; set; } = null!;

[JsonPropertyName("period")]
public int? Period { get; set; } = null!;

[JsonPropertyName("yAxis")]
public YAxis YAxis { get; set; } = null!;

[JsonPropertyName("stacked")]
public bool? Stacked { get; set; } = null!;

[JsonPropertyName("title")]
public string Title { get; set; } = null!;

[JsonPropertyName("setPeriodToTimeRange")]
public bool? SetPeriodToTimeRange { get; set; } = null!;

[JsonPropertyName("liveData")]
public bool? LiveData { get; set; } = null!;

[JsonPropertyName("sparkline")]
public bool? Sparkline { get; set; } = null!;

[JsonPropertyName("trend")]
public bool? Trend { get; set; } = null!;

[JsonPropertyName("alarms")]
public List<string> Alarms { get; set; } = null!;
}

public class DashboardModel
{
[JsonPropertyName("widgets")]
public List<Widget> Widgets { get; set; } = null!;
}

public class Widget
{
[JsonPropertyName("type")]
public string Type { get; set; } = null!;

[JsonPropertyName("x")]
public int X { get; set; }

[JsonPropertyName("y")]
public int Y { get; set; }

[JsonPropertyName("width")]
public int Width { get; set; }

[JsonPropertyName("height")]
public int Height { get; set; }

[JsonPropertyName("properties")]
public Properties Properties { get; set; } = null!;
}

public class YAxis
{
[JsonPropertyName("left")]
public Left Left { get; set; } = null!;
}
Loading
Loading