-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1 parent
9cd7f38
commit 65cacf7
Showing
21 changed files
with
2,853 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!; | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
// snippet-start:[CloudWatch.dotnetv4.HelloCloudWatch] | ||
using Amazon.CloudWatch; | ||
using Amazon.CloudWatch.Model; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Microsoft.Extensions.Hosting; | ||
|
||
namespace CloudWatchActions; | ||
|
||
public static class HelloCloudWatch | ||
{ | ||
static async Task Main(string[] args) | ||
{ | ||
// Use the AWS .NET Core Setup package to set up dependency injection for the Amazon CloudWatch service. | ||
// Use your AWS profile name, or leave it blank to use the default profile. | ||
using var host = Host.CreateDefaultBuilder(args) | ||
.ConfigureServices((_, services) => | ||
services.AddAWSService<IAmazonCloudWatch>() | ||
).Build(); | ||
|
||
// Now the client is available for injection. | ||
var cloudWatchClient = host.Services.GetRequiredService<IAmazonCloudWatch>(); | ||
|
||
// You can use await and any of the async methods to get a response. | ||
var metricNamespace = "AWS/Billing"; | ||
var response = await cloudWatchClient.ListMetricsAsync(new ListMetricsRequest | ||
{ | ||
Namespace = metricNamespace | ||
}); | ||
Console.WriteLine($"Hello Amazon CloudWatch! Following are some metrics available in the {metricNamespace} namespace:"); | ||
Console.WriteLine(); | ||
if (response.Metrics != null) | ||
{ | ||
foreach (var metric in response.Metrics.Take(5)) | ||
{ | ||
Console.WriteLine($"\tMetric: {metric.MetricName}"); | ||
Console.WriteLine($"\tNamespace: {metric.Namespace}"); | ||
Console.WriteLine( | ||
$"\tDimensions: {string.Join(", ", metric.Dimensions.Select(m => $"{m.Name}:{m.Value}"))}"); | ||
Console.WriteLine(); | ||
} | ||
} | ||
} | ||
} | ||
// snippet-end:[CloudWatch.dotnetv4.HelloCloudWatch] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.2.32630.192 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Actions", "Actions", "{7907FB6A-1353-4735-95DC-EEC5DF8C0649}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scenarios", "Scenarios", "{B987097B-189C-4D0B-99BC-E67CD705BCA0}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{5455D423-2AFC-4BC6-B79D-9DC4270D8F7D}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CloudWatchActions", "Actions\CloudWatchActions.csproj", "{F019ADD9-E2BA-4670-963C-EF778E97E8CF}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CloudWatchScenario", "Scenarios\CloudWatchScenario.csproj", "{B2CDED30-54AF-4AE6-8AC1-5FB15A4F1264}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CloudWatchTests", "Tests\CloudWatchTests.csproj", "{F7DF95C8-F0D7-483C-9653-BEF71ACE61B5}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{F019ADD9-E2BA-4670-963C-EF778E97E8CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{F019ADD9-E2BA-4670-963C-EF778E97E8CF}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{F019ADD9-E2BA-4670-963C-EF778E97E8CF}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{F019ADD9-E2BA-4670-963C-EF778E97E8CF}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{B2CDED30-54AF-4AE6-8AC1-5FB15A4F1264}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{B2CDED30-54AF-4AE6-8AC1-5FB15A4F1264}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{B2CDED30-54AF-4AE6-8AC1-5FB15A4F1264}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{B2CDED30-54AF-4AE6-8AC1-5FB15A4F1264}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{F7DF95C8-F0D7-483C-9653-BEF71ACE61B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{F7DF95C8-F0D7-483C-9653-BEF71ACE61B5}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{F7DF95C8-F0D7-483C-9653-BEF71ACE61B5}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{F7DF95C8-F0D7-483C-9653-BEF71ACE61B5}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(NestedProjects) = preSolution | ||
{F019ADD9-E2BA-4670-963C-EF778E97E8CF} = {7907FB6A-1353-4735-95DC-EEC5DF8C0649} | ||
{B2CDED30-54AF-4AE6-8AC1-5FB15A4F1264} = {B987097B-189C-4D0B-99BC-E67CD705BCA0} | ||
{F7DF95C8-F0D7-483C-9653-BEF71ACE61B5} = {5455D423-2AFC-4BC6-B79D-9DC4270D8F7D} | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {870D888D-5C8B-4057-8722-F73ECF38E513} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
# CloudWatch code examples for the SDK for .NET | ||
|
||
## Overview | ||
|
||
Shows how to use the AWS SDK for .NET to work with Amazon CloudWatch. | ||
|
||
<!--custom.overview.start--> | ||
<!--custom.overview.end--> | ||
|
||
_CloudWatch provides a reliable, scalable, and flexible monitoring solution that you can start using within minutes._ | ||
|
||
## ⚠ Important | ||
|
||
* Running this code might result in charges to your AWS account. For more details, see [AWS Pricing](https://aws.amazon.com/pricing/) and [Free Tier](https://aws.amazon.com/free/). | ||
* Running the tests might result in charges to your AWS account. | ||
* We recommend that you grant your code least privilege. At most, grant only the minimum permissions required to perform the task. For more information, see [Grant least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege). | ||
* This code is not tested in every AWS Region. For more information, see [AWS Regional Services](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services). | ||
|
||
<!--custom.important.start--> | ||
<!--custom.important.end--> | ||
|
||
## Code examples | ||
|
||
### Prerequisites | ||
|
||
For prerequisites, see the [README](../README.md#Prerequisites) in the `dotnetv4` folder. | ||
|
||
|
||
<!--custom.prerequisites.start--> | ||
To enable billing metrics and statistics for these examples, make sure to | ||
[enable billing alerts](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html#turning_on_billing_metrics) for your account. | ||
<!--custom.prerequisites.end--> | ||
|
||
### Get started | ||
|
||
- [Hello CloudWatch](Actions/HelloCloudWatch.cs#L4) (`ListMetrics`) | ||
|
||
|
||
### Basics | ||
|
||
Code examples that show you how to perform the essential operations within a service. | ||
|
||
- [Learn the basics](Scenarios/CloudWatchScenario.cs) | ||
|
||
|
||
### Single actions | ||
|
||
Code excerpts that show you how to call individual service functions. | ||
|
||
- [DeleteAlarms](Actions/CloudWatchWrapper.cs#L396) | ||
- [DeleteAnomalyDetector](Actions/CloudWatchWrapper.cs#L494) | ||
- [DeleteDashboards](Actions/CloudWatchWrapper.cs#L512) | ||
- [DescribeAlarmHistory](Actions/CloudWatchWrapper.cs#L369) | ||
- [DescribeAlarms](Actions/CloudWatchWrapper.cs#L326) | ||
- [DescribeAlarmsForMetric](Actions/CloudWatchWrapper.cs#L349) | ||
- [DescribeAnomalyDetectors](Actions/CloudWatchWrapper.cs#L468) | ||
- [DisableAlarmActions](Actions/CloudWatchWrapper.cs#L414) | ||
- [EnableAlarmActions](Actions/CloudWatchWrapper.cs#L432) | ||
- [GetDashboard](Actions/CloudWatchWrapper.cs#L115) | ||
- [GetMetricData](Actions/CloudWatchWrapper.cs#L226) | ||
- [GetMetricStatistics](Actions/CloudWatchWrapper.cs#L61) | ||
- [GetMetricWidgetImage](Actions/CloudWatchWrapper.cs#L175) | ||
- [ListDashboards](Actions/CloudWatchWrapper.cs#L134) | ||
- [ListMetrics](Actions/CloudWatchWrapper.cs#L33) | ||
- [PutAnomalyDetector](Actions/CloudWatchWrapper.cs#L450) | ||
- [PutDashboard](Actions/CloudWatchWrapper.cs#L91) | ||
- [PutMetricAlarm](Actions/CloudWatchWrapper.cs#L265) | ||
- [PutMetricData](Actions/CloudWatchWrapper.cs#L154) | ||
|
||
|
||
<!--custom.examples.start--> | ||
<!--custom.examples.end--> | ||
|
||
## Run the examples | ||
|
||
### Instructions | ||
|
||
For general instructions to run the examples, see the | ||
[README](../README.md#building-and-running-the-code-examples) in the `dotnetv4` folder. | ||
|
||
Some projects might include a settings.json file. Before compiling the project, | ||
you can change these values to match your own account and resources. Alternatively, | ||
add a settings.local.json file with your local settings, which will be loaded automatically | ||
when the application runs. | ||
|
||
After the example compiles, you can run it from the command line. To do so, navigate to | ||
the folder that contains the .csproj file and run the following command: | ||
|
||
``` | ||
dotnet run | ||
``` | ||
|
||
Alternatively, you can run the example from within your IDE. | ||
|
||
|
||
<!--custom.instructions.start--> | ||
<!--custom.instructions.end--> | ||
|
||
#### Hello CloudWatch | ||
|
||
This example shows you how to get started using CloudWatch. | ||
|
||
|
||
#### Learn the basics | ||
|
||
This example shows you how to do the following: | ||
|
||
- List CloudWatch namespaces and metrics. | ||
- Get statistics for a metric and for estimated billing. | ||
- Create and update a dashboard. | ||
- Create and add data to a metric. | ||
- Create and trigger an alarm, then view alarm history. | ||
- Add an anomaly detector. | ||
- Get a metric image, then clean up resources. | ||
|
||
<!--custom.basic_prereqs.cloudwatch_GetStartedMetricsDashboardsAlarms.start--> | ||
<!--custom.basic_prereqs.cloudwatch_GetStartedMetricsDashboardsAlarms.end--> | ||
|
||
|
||
<!--custom.basics.cloudwatch_GetStartedMetricsDashboardsAlarms.start--> | ||
<!--custom.basics.cloudwatch_GetStartedMetricsDashboardsAlarms.end--> | ||
|
||
|
||
### Tests | ||
|
||
⚠ Running tests might result in charges to your AWS account. | ||
|
||
|
||
To find instructions for running these tests, see the [README](../README.md#Tests) | ||
in the `dotnetv3` folder. | ||
|
||
|
||
|
||
<!--custom.tests.start--> | ||
<!--custom.tests.end--> | ||
|
||
## Additional resources | ||
|
||
- [CloudWatch User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html) | ||
- [CloudWatch API Reference](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/Welcome.html) | ||
- [SDK for .NET CloudWatch reference](https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/CloudWatch/NCloudWatch.html) | ||
|
||
<!--custom.resources.start--> | ||
<!--custom.resources.end--> | ||
|
||
--- | ||
|
||
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
|
||
SPDX-License-Identifier: Apache-2.0 |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<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> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Actions\CloudWatchActions.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Content Include="settings.json"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</Content> | ||
<Content Include="settings.*.json"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
<DependentUpon>settings.json</DependentUpon> | ||
</Content> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
{ | ||
"dashboardName": "example-new-dashboard", | ||
"exampleAlarmName": "example-metric-alarm", | ||
"accountId": "1234567890", | ||
"region": "us-east-1", | ||
"emailTopic": "Default_CloudWatch_Alarms_Topic", | ||
"customMetricNamespace": "example-namespace", | ||
"customMetricName": "example-custom-metric", | ||
"dashboardExampleBody": { | ||
"widgets": [ | ||
{ | ||
"height": 6, | ||
"width": 6, | ||
"y": 0, | ||
"x": 0, | ||
"type": "text", | ||
"properties": { | ||
"markdown": "# Code Example Dashboard \nThis dashboard was created by example code.\n" | ||
} | ||
}, | ||
{ | ||
"height": 8, | ||
"width": 8, | ||
"y": 0, | ||
"x": 6, | ||
"type": "metric", | ||
"properties": { | ||
"metrics": [ | ||
[ | ||
"AWS/Billing", | ||
"EstimatedCharges", | ||
"Currency", | ||
"USD", | ||
{ "region": "us-east-1" } | ||
] | ||
], | ||
"view": "timeSeries", | ||
"region": "us-east-1", | ||
"stat": "Maximum", | ||
"period": 86400, | ||
"yAxis": { | ||
"left": { | ||
"min": 0, | ||
"max": 100 | ||
} | ||
}, | ||
"stacked": false, | ||
"title": "Estimated Billing", | ||
"setPeriodToTimeRange": false, | ||
"liveData": true, | ||
"sparkline": true, | ||
"trend": true | ||
} | ||
}, | ||
{ | ||
"height": 8, | ||
"width": 8, | ||
"y": 0, | ||
"x": 14, | ||
"type": "metric", | ||
"properties": { | ||
"metrics": [ | ||
[ "AWS/Usage", "CallCount", "Type", "API", "Resource", "ListMetrics", "Service", "CloudWatch", "Class", "None" ], | ||
[ "...", "GetMetricStatistics", ".", ".", ".", "." ], | ||
[ "...", "GetMetricData", ".", ".", ".", "." ], | ||
[ "...", "PutDashboard", ".", ".", ".", "." ], | ||
[ "...", "PutMetricData", ".", ".", ".", "." ] | ||
], | ||
"view": "timeSeries", | ||
"yAxis": { | ||
"left": { | ||
"min": 0, | ||
"max": 200 | ||
} | ||
}, | ||
"stacked": false, | ||
"region": "us-east-1", | ||
"stat": "Sum", | ||
"period": 300, | ||
"title": "CloudWatch Usage", | ||
"setPeriodToTimeRange": false, | ||
"liveData": true, | ||
"sparkline": true, | ||
"trend": true | ||
} | ||
} | ||
] | ||
} | ||
} | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
|
||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Dangl.Xunit.Extensions.Ordering" Version="2.1.0" /> | ||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0" /> | ||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.0" /> | ||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" /> | ||
<PackageReference Include="System.Text.Json" Version="9.0.0" /> | ||
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" /> | ||
<PackageReference Include="xunit" Version="2.9.2" /> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2"> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
<PackageReference Include="coverlet.collector" Version="6.0.2"> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Content Include="testsettings.json"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</Content> | ||
<Content Include="testsettings.*.json"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
<DependentUpon>testsettings.json</DependentUpon> | ||
</Content> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Actions\CloudWatchActions.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
global using Xunit; | ||
global using Xunit.Extensions.Ordering; | ||
|
||
// Optional. | ||
[assembly: CollectionBehavior(DisableTestParallelization = true)] | ||
// Optional. | ||
[assembly: TestCaseOrderer("Xunit.Extensions.Ordering.TestCaseOrderer", "Xunit.Extensions.Ordering")] | ||
// Optional. | ||
[assembly: TestCollectionOrderer("Xunit.Extensions.Ordering.CollectionOrderer", "Xunit.Extensions.Ordering")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
{ | ||
"dashboardName": "example-test-dashboard", | ||
"exampleAlarmName": "example-test-metric-alarm", | ||
"accountId": "1234567890", | ||
"region": "us-east-1", | ||
"emailTopic": "Default_CloudWatch_Alarms_Topic", | ||
"customMetricNamespace": "example-test-namespace", | ||
"customMetricName": "example-test-custom-metric", | ||
"dashboardExampleBody": { | ||
"widgets": [ | ||
{ | ||
"height": 6, | ||
"width": 6, | ||
"y": 0, | ||
"x": 0, | ||
"type": "text", | ||
"properties": { | ||
"markdown": "# Code Example Dashboard \nThis dashboard was created by example code.\n" | ||
} | ||
}, | ||
{ | ||
"height": 8, | ||
"width": 8, | ||
"y": 0, | ||
"x": 6, | ||
"type": "metric", | ||
"properties": { | ||
"metrics": [ | ||
[ | ||
"AWS/Billing", | ||
"EstimatedCharges", | ||
"Currency", | ||
"USD", | ||
{ "region": "us-east-1" } | ||
] | ||
], | ||
"view": "timeSeries", | ||
"region": "us-east-1", | ||
"stat": "Maximum", | ||
"period": 86400, | ||
"yAxis": { | ||
"left": { | ||
"min": 0, | ||
"max": 100 | ||
} | ||
}, | ||
"stacked": false, | ||
"title": "Estimated Billing", | ||
"setPeriodToTimeRange": false, | ||
"liveData": true, | ||
"sparkline": true, | ||
"trend": true | ||
} | ||
}, | ||
{ | ||
"height": 8, | ||
"width": 8, | ||
"y": 0, | ||
"x": 14, | ||
"type": "metric", | ||
"properties": { | ||
"metrics": [ | ||
[ "AWS/Usage", "CallCount", "Type", "API", "Resource", "ListMetrics", "Service", "CloudWatch", "Class", "None" ], | ||
[ "...", "GetMetricStatistics", ".", ".", ".", "." ], | ||
[ "...", "GetMetricData", ".", ".", ".", "." ], | ||
[ "...", "PutDashboard", ".", ".", ".", "." ], | ||
[ "...", "PutMetricData", ".", ".", ".", "." ] | ||
], | ||
"view": "timeSeries", | ||
"yAxis": { | ||
"left": { | ||
"min": 0, | ||
"max": 200 | ||
} | ||
}, | ||
"stacked": false, | ||
"region": "us-east-1", | ||
"stat": "Sum", | ||
"period": 300, | ||
"title": "CloudWatch Usage", | ||
"setPeriodToTimeRange": false, | ||
"liveData": true, | ||
"sparkline": true, | ||
"trend": true | ||
} | ||
} | ||
] | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
dotnetv4/Cloudformation/Actions/CloudFormationActions.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="AWSSDK.CloudFormation" Version="4.0.0-preview.4" /> | ||
<PackageReference Include="AWSSDK.Extensions.NETCore.Setup" Version="4.0.0-preview.4" /> | ||
<PackageReference Include="AWSSDK.SSO" Version="4.0.0-preview.4" /> | ||
<PackageReference Include="AWSSDK.SSOOIDC" 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
// snippet-start:[CloudFormation.dotnetv4.CloudFormationActions.HelloCloudFormation] | ||
using Amazon.CloudFormation; | ||
using Amazon.CloudFormation.Model; | ||
using Amazon.Runtime; | ||
|
||
namespace CloudFormationActions; | ||
|
||
public static class HelloCloudFormation | ||
{ | ||
public static IAmazonCloudFormation _amazonCloudFormation = null!; | ||
|
||
static async Task Main(string[] args) | ||
{ | ||
// Create the CloudFormation client | ||
_amazonCloudFormation = new AmazonCloudFormationClient(); | ||
Console.WriteLine($"\nIn Region: {_amazonCloudFormation.Config.RegionEndpoint}"); | ||
|
||
// List the resources for each stack | ||
await ListResources(); | ||
} | ||
|
||
/// <summary> | ||
/// Method to list stack resources and other information. | ||
/// </summary> | ||
/// <returns>True if successful.</returns> | ||
public static async Task<bool> ListResources() | ||
{ | ||
try | ||
{ | ||
Console.WriteLine("Getting CloudFormation stack information..."); | ||
|
||
// Get all stacks using the stack paginator. | ||
var paginatorForDescribeStacks = | ||
_amazonCloudFormation.Paginators.DescribeStacks( | ||
new DescribeStacksRequest()); | ||
if (paginatorForDescribeStacks.Stacks != null) | ||
{ | ||
await foreach (Stack stack in paginatorForDescribeStacks.Stacks) | ||
{ | ||
// Basic information for each stack | ||
Console.WriteLine( | ||
"\n------------------------------------------------"); | ||
Console.WriteLine($"\nStack: {stack.StackName}"); | ||
Console.WriteLine($" Status: {stack.StackStatus.Value}"); | ||
Console.WriteLine($" Created: {stack.CreationTime}"); | ||
|
||
// The tags of each stack (etc.) | ||
if (stack.Tags != null && stack.Tags.Count > 0) | ||
{ | ||
Console.WriteLine(" Tags:"); | ||
foreach (Tag tag in stack.Tags) | ||
Console.WriteLine($" {tag.Key}, {tag.Value}"); | ||
} | ||
|
||
// The resources of each stack | ||
DescribeStackResourcesResponse responseDescribeResources = | ||
await _amazonCloudFormation.DescribeStackResourcesAsync( | ||
new DescribeStackResourcesRequest | ||
{ | ||
StackName = stack.StackName | ||
}); | ||
if (responseDescribeResources.StackResources != null && responseDescribeResources.StackResources.Count > 0) | ||
{ | ||
Console.WriteLine(" Resources:"); | ||
foreach (StackResource resource in responseDescribeResources | ||
.StackResources) | ||
Console.WriteLine( | ||
$" {resource.LogicalResourceId}: {resource.ResourceStatus}"); | ||
} | ||
} | ||
} | ||
|
||
Console.WriteLine("\n------------------------------------------------"); | ||
return true; | ||
} | ||
catch (AmazonCloudFormationException ex) | ||
{ | ||
Console.WriteLine("Unable to get stack information:\n" + ex.Message); | ||
return false; | ||
} | ||
catch (AmazonServiceException ex) | ||
{ | ||
if (ex.Message.Contains("Unable to get IAM security credentials")) | ||
{ | ||
Console.WriteLine(ex.Message); | ||
Console.WriteLine("If you are usnig SSO, be sure to install" + | ||
" the AWSSDK.SSO and AWSSDK.SSOOIDC packages."); | ||
} | ||
else | ||
{ | ||
Console.WriteLine(ex.Message); | ||
Console.WriteLine(ex.StackTrace); | ||
} | ||
|
||
return false; | ||
} | ||
catch (ArgumentNullException ex) | ||
{ | ||
if (ex.Message.Contains("Options property cannot be empty: ClientName")) | ||
{ | ||
Console.WriteLine(ex.Message); | ||
Console.WriteLine("If you are using SSO, have you logged in?"); | ||
} | ||
else | ||
{ | ||
Console.WriteLine(ex.Message); | ||
Console.WriteLine(ex.StackTrace); | ||
} | ||
|
||
return false; | ||
} | ||
} | ||
}// snippet-end:[CloudFormation.dotnetv4.CloudFormationActions.HelloCloudFormation] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.2.32630.192 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Actions", "Actions", "{7907FB6A-1353-4735-95DC-EEC5DF8C0649}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{5455D423-2AFC-4BC6-B79D-9DC4270D8F7D}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CloudFormationActions", "Actions\CloudFormationActions.csproj", "{796910FA-6E94-460B-8CB4-97DF01B9ADC8}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CloudFormationTests", "Tests\CloudFormationTests.csproj", "{6046A2FC-6A39-4C2D-8DD9-AA3740B17B88}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{796910FA-6E94-460B-8CB4-97DF01B9ADC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{796910FA-6E94-460B-8CB4-97DF01B9ADC8}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{796910FA-6E94-460B-8CB4-97DF01B9ADC8}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{796910FA-6E94-460B-8CB4-97DF01B9ADC8}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{6046A2FC-6A39-4C2D-8DD9-AA3740B17B88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{6046A2FC-6A39-4C2D-8DD9-AA3740B17B88}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{6046A2FC-6A39-4C2D-8DD9-AA3740B17B88}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{6046A2FC-6A39-4C2D-8DD9-AA3740B17B88}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(NestedProjects) = preSolution | ||
{796910FA-6E94-460B-8CB4-97DF01B9ADC8} = {7907FB6A-1353-4735-95DC-EEC5DF8C0649} | ||
{6046A2FC-6A39-4C2D-8DD9-AA3740B17B88} = {5455D423-2AFC-4BC6-B79D-9DC4270D8F7D} | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {870D888D-5C8B-4057-8722-F73ECF38E513} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# CloudFormation code examples for the SDK for .NET | ||
|
||
## Overview | ||
|
||
Shows how to use the AWS SDK for .NET to work with AWS CloudFormation. | ||
|
||
<!--custom.overview.start--> | ||
<!--custom.overview.end--> | ||
|
||
_CloudFormation enables you to create and provision AWS infrastructure deployments predictably and repeatedly._ | ||
|
||
## ⚠ Important | ||
|
||
* Running this code might result in charges to your AWS account. For more details, see [AWS Pricing](https://aws.amazon.com/pricing/) and [Free Tier](https://aws.amazon.com/free/). | ||
* Running the tests might result in charges to your AWS account. | ||
* We recommend that you grant your code least privilege. At most, grant only the minimum permissions required to perform the task. For more information, see [Grant least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege). | ||
* This code is not tested in every AWS Region. For more information, see [AWS Regional Services](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services). | ||
|
||
<!--custom.important.start--> | ||
<!--custom.important.end--> | ||
|
||
## Code examples | ||
|
||
### Prerequisites | ||
|
||
For prerequisites, see the [README](../README.md#Prerequisites) in the `dotnetv4` folder. | ||
|
||
|
||
<!--custom.prerequisites.start--> | ||
<!--custom.prerequisites.end--> | ||
|
||
### Get started | ||
|
||
- [Hello CloudFormation](Actions/HelloCloudFormation.cs#L4) (`DescribeStackResources`) | ||
|
||
|
||
<!--custom.examples.start--> | ||
<!--custom.examples.end--> | ||
|
||
## Run the examples | ||
|
||
### Instructions | ||
|
||
For general instructions to run the examples, see the | ||
[README](../README.md#building-and-running-the-code-examples) in the `dotnetv4` folder. | ||
|
||
Some projects might include a settings.json file. Before compiling the project, | ||
you can change these values to match your own account and resources. Alternatively, | ||
add a settings.local.json file with your local settings, which will be loaded automatically | ||
when the application runs. | ||
|
||
After the example compiles, you can run it from the command line. To do so, navigate to | ||
the folder that contains the .csproj file and run the following command: | ||
|
||
``` | ||
dotnet run | ||
``` | ||
|
||
Alternatively, you can run the example from within your IDE. | ||
|
||
|
||
<!--custom.instructions.start--> | ||
<!--custom.instructions.end--> | ||
|
||
#### Hello CloudFormation | ||
|
||
This example shows you how to get started using CloudFormation. | ||
|
||
|
||
|
||
### Tests | ||
|
||
⚠ Running tests might result in charges to your AWS account. | ||
|
||
|
||
To find instructions for running these tests, see the [README](../README.md#Tests) | ||
in the `dotnetv4` folder. | ||
|
||
|
||
|
||
<!--custom.tests.start--> | ||
<!--custom.tests.end--> | ||
|
||
## Additional resources | ||
|
||
- [CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html) | ||
- [CloudFormation API Reference](https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/Welcome.html) | ||
- [SDK for .NET CloudFormation reference](https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/CloudFormation/NCloudFormation.html) | ||
|
||
<!--custom.resources.start--> | ||
<!--custom.resources.end--> | ||
|
||
--- | ||
|
||
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
|
||
SPDX-License-Identifier: Apache-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
using Amazon.CloudFormation; | ||
using CloudFormationActions; | ||
|
||
namespace CloudFormationTests; | ||
|
||
public class CloudFormationTests | ||
{ | ||
/// <summary> | ||
/// Run the list resources action. Should return true. | ||
/// </summary> | ||
/// <returns></returns> | ||
[Fact] | ||
[Trait("Category", "Integration")] | ||
public async Task TestListResources() | ||
{ | ||
// Arrange. | ||
HelloCloudFormation._amazonCloudFormation = new AmazonCloudFormationClient(); | ||
|
||
// Act. | ||
var success = await HelloCloudFormation.ListResources(); | ||
|
||
// Assert. | ||
Assert.True(success); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
|
||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="AWSSDK.CloudFormation" Version="4.0.0-preview.4" /> | ||
<PackageReference Include="AWSSDK.SSO" Version="4.0.0-preview.4" /> | ||
<PackageReference Include="AWSSDK.SSOOIDC" 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.Configuration.Json" Version="9.0.0" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" /> | ||
<PackageReference Include="System.Text.Json" Version="9.0.0" /> | ||
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" /> | ||
<PackageReference Include="xunit" Version="2.9.2" /> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2"> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
<PackageReference Include="coverlet.collector" Version="6.0.2"> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Content Include="testsettings.*.json"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
<DependentUpon>testsettings.json</DependentUpon> | ||
</Content> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Actions\CloudFormationActions.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
global using Xunit; | ||
|
||
// Optional. | ||
[assembly: CollectionBehavior(DisableTestParallelization = true)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters