content stringlengths 5 1.04M | avg_line_length float64 1.75 12.9k | max_line_length int64 2 244k | alphanum_fraction float64 0 0.98 | licenses list | repository_name stringlengths 7 92 | path stringlengths 3 249 | size int64 5 1.04M | lang stringclasses 2 values |
|---|---|---|---|---|---|---|---|---|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Platform.Unity
{
internal class UnityDeviceInfo : DeviceInfo
{
Size _pixelScreenSize = new Size();
Size _scaledScreenSize = new Size();
double _scalingFactor = 1.0;
internal UnityDeviceInfo()
{
UpdateProperties();
}
public override Size PixelScreenSize => _pixelScreenSize;
public override Size ScaledScreenSize => _scaledScreenSize;
public override double ScalingFactor => _scalingFactor;
void SetPixelScreenSize(Size value)
{
if (value != _pixelScreenSize)
{
_pixelScreenSize = value;
OnPropertyChanged(nameof(PixelScreenSize));
}
}
void SetScaledScreenSize(Size value)
{
if (value != _scaledScreenSize)
{
_scaledScreenSize = value;
OnPropertyChanged(nameof(ScaledScreenSize));
}
}
void SetScalingFactor(double value)
{
if (value != _scalingFactor)
{
_scalingFactor = value;
OnPropertyChanged(nameof(ScalingFactor));
}
}
void UpdateProperties()
{
var current = UnityEngine.Screen.currentResolution;
var dpi = UnityEngine.Screen.dpi;
SetPixelScreenSize(new Size(current.width, current.height));
SetScaledScreenSize(new Size(current.width * dpi, current.height * dpi));
SetScalingFactor(dpi);
}
}
}
| 21.461538 | 76 | 0.723297 | [
"MIT"
] | aosoft/Xamarin.Forms.Unity | Assets/Xamarin.Forms.Unity/Xamarin.Forms.Platform.Unity/Scripts/UnityDeviceInfo.cs | 1,397 | C# |
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Net;
using System.ServiceModel;
using System.ServiceModel.Security;
using System.Text;
using System.Xml;
using VideoOS.ConfigurationAPI;
using VideoOS.Platform.Util;
namespace ConfigAPIBatch
{
public class ConfigAPIClient
{
private IConfigurationService _client = null;
private Dictionary<String, MethodInfo> _allMethodInfos = new Dictionary<string, MethodInfo>();
private Dictionary<String, String> _translations = new Dictionary<String, String>();
private Dictionary<String, Bitmap> _allMethodBitmaps = new Dictionary<string, Bitmap>();
internal Dictionary<String, MethodInfo> AllMethodInfos { get { return _allMethodInfos; } }
internal Dictionary<String, Bitmap> AllMethodBitmaps { get { return _allMethodBitmaps; } }
internal bool TrimTreeToolStripMenuItem { get; set; }
public string ServerAddress { get; set; }
public int Serverport { get; set; }
public bool BasicUser { get; set; }
public String Username { get; set; }
public String Password { get; set; }
public bool Connected { get; set; }
#region Construction, Initialize and Close
internal void InitializeClientProxy()
{
try
{
string uriString;
string address = Serverport == 0 ? ServerAddress : ServerAddress + ":" + Serverport;
if (BasicUser)
{
if (Serverport == 80)
address = ServerAddress;
uriString = String.Format("https://{0}/ManagementServer/ConfigurationApiService.svc", address);
}
else
{
uriString = String.Format("http://{0}/ManagementServer/ConfigurationApiService.svc", address);
}
ChannelFactory<IConfigurationService> channel = null;
Uri uri = new UriBuilder(uriString).Uri;
var binding = GetBinding(BasicUser);
var spn = SpnFactory.GetSpn(uri);
var endpointAddress = new EndpointAddress(uri, EndpointIdentity.CreateSpnIdentity(spn));
channel = new ChannelFactory<IConfigurationService>(binding, endpointAddress);
if (BasicUser)
{
// Note the domain == [BASIC]
channel.Credentials.UserName.UserName = "[BASIC]\\" + Username;
channel.Credentials.UserName.Password = Password;
channel.Credentials.ServiceCertificate.SslCertificateAuthentication = new X509ServiceCertificateAuthentication()
{
CertificateValidationMode = X509CertificateValidationMode.None,
};
}
else
{
channel.Credentials.Windows.ClientCredential.UserName = Username;
channel.Credentials.Windows.ClientCredential.Password = Password;
}
_client = channel.CreateChannel();
Connected = false;
}
catch (EndpointNotFoundException)
{
}
}
public void Initialize()
{
try
{
InitializeClientProxy();
MethodInfo[] methods = _client.GetMethodInfos();
foreach (MethodInfo mi in methods)
{
_allMethodInfos.Add(mi.MethodId, mi);
_allMethodBitmaps.Add(mi.MethodId, MakeBitmap(mi.Bitmap));
}
_translations = _client.GetTranslations("en-US");
Connected = true;
}
catch (Exception ex)
{
Debug.WriteLine(ex.Message);
Connected = false;
throw;
}
}
internal void Close()
{
_allMethodInfos.Clear();
_allMethodBitmaps.Clear();
}
#endregion
#region utilities
internal List<ConfigurationItem> GetNextForItemType(ConfigurationItem item, String itemtype)
{
List<ConfigurationItem> result = new List<ConfigurationItem>();
ConfigurationItem[] children = _client.GetChildItems(item.Path);
if (children != null)
foreach (ConfigurationItem child in children)
{
if (child.ItemType.StartsWith(itemtype))
{
result.Add(child);
continue;
}
if (child.ItemType == ItemTypes.HardwareFolder || child.ItemType == ItemTypes.Hardware)
{
result.Add(child);
continue;
}
}
return result;
}
private static List<String> _topItemTypes = new List<string>()
{
ItemTypes.System,
ItemTypes.RecordingServer,
ItemTypes.RecordingServerFolder,
ItemTypes.HardwareDriverFolder,
ItemTypes.HardwareDriver,
ItemTypes.HardwareFolder,
ItemTypes.Hardware
};
public List<ConfigurationItem> GetTopForItemType(string itemtype)
{
try
{
ConfigurationItem item = _client.GetItem("/"); // Start from top
if (item == null)
return new List<ConfigurationItem>();
if (item.ItemType == itemtype)
return new List<ConfigurationItem>() { item };
List<ConfigurationItem> result = GetTopForItemTypeRecursive(item, itemtype); // Loop recursive in hierarchy until itemtype is found
return result;
}
catch (Exception ex)
{
Trace.WriteLine("GetTopForItemType exception:" + ex.Message);
return new List<ConfigurationItem>();
}
}
private List<ConfigurationItem> GetTopForItemTypeRecursive(ConfigurationItem item, String itemtype)
{
List<ConfigurationItem> result = new List<ConfigurationItem>();
ConfigurationItem[] children = _client.GetChildItems(item.Path);
if (children != null)
foreach (ConfigurationItem child in children)
{
try
{
if (child.ItemType != itemtype)
{
if (child.ItemType == ItemTypes.RecordingServer && itemtype != ItemTypes.HardwareDriver)
{
result.Add(child);
continue;
}
if (child.ItemType == itemtype || child.ItemType == itemtype + "Folder")
{
if (child.ItemType.EndsWith("Folder") && TrimTreeToolStripMenuItem && child.ItemType != ItemTypes.HardwareDriverFolder)
{
result.AddRange(GetTopForItemTypeRecursive(child, itemtype));
}
else
result.Add(child);
continue;
}
if (_topItemTypes.Contains(child.ItemType))
{
result.AddRange(GetTopForItemTypeRecursive(child, itemtype));
}
}
}
catch (Exception ex)
{
Trace.WriteLine("GetTopForItemTypeRecursive exception:" + ex.Message);
throw;
}
}
return result;
}
#endregion
#region Configuration API calls
internal ConfigurationItem[] GetChildItems(string path)
{
try
{
return _client.GetChildItems(path);
}
catch (Exception)
{
InitializeClientProxy();
try
{
return _client.GetChildItems(path);
}
catch (Exception)
{
return new ConfigurationItem[0];
}
}
}
internal MethodInfo[] GetMethodInfos()
{
try
{
return _client.GetMethodInfos();
}
catch (Exception)
{
InitializeClientProxy();
try
{
return _client.GetMethodInfos();
}
catch (Exception)
{
return new MethodInfo[0];
}
}
}
internal Dictionary<String, String> GetTranslations(string language)
{
try
{
return _client.GetTranslations(language);
}
catch (Exception)
{
InitializeClientProxy();
try
{
return _client.GetTranslations(language);
}
catch (Exception)
{
return new Dictionary<string, string>();
}
}
}
internal ConfigurationItem InvokeMethod(ConfigurationItem item, String methodId)
{
try
{
return _client.InvokeMethod(item, methodId);
}
catch (Exception)
{
InitializeClientProxy();
try
{
return _client.InvokeMethod(item, methodId);
}
catch (Exception ex)
{
Debug.WriteLine(ex.Message);
throw;
}
}
}
internal ValidateResult ValidateItem(ConfigurationItem item)
{
try
{
return _client.ValidateItem(item);
}
catch (Exception)
{
InitializeClientProxy();
try
{
return _client.ValidateItem(item);
}
catch (Exception ex)
{
Debug.WriteLine(ex.Message);
throw;
}
}
}
internal ConfigurationItem GetItem(string path)
{
try
{
return _client.GetItem(path);
}
catch (Exception)
{
InitializeClientProxy();
try
{
return _client.GetItem(path);
}
catch (Exception)
{
// Let caller handle it
throw;
}
}
}
internal ValidateResult SetItem(ConfigurationItem item)
{
try
{
return _client.SetItem(item);
}
catch (Exception)
{
InitializeClientProxy();
try
{
return _client.SetItem(item);
}
catch (Exception)
{
// Let caller handle it
throw;
}
}
}
#endregion
#region private methods
private Bitmap MakeBitmap(byte[] data)
{
try
{
if (data == null)
return null;
MemoryStream ms = new MemoryStream(data);
Bitmap b = new Bitmap(ms);
ms.Close();
return b;
}
catch (Exception)
{
return null;
}
}
internal static System.ServiceModel.Channels.Binding GetBinding(bool IsBasic)
{
if (!IsBasic)
{
WSHttpBinding binding = new WSHttpBinding();
var security = binding.Security;
security.Message.ClientCredentialType = MessageCredentialType.Windows;
binding.ReaderQuotas.MaxStringContentLength = 2147483647;
binding.MaxReceivedMessageSize = 2147483647;
binding.MaxBufferPoolSize = 2147483647;
binding.ReaderQuotas = XmlDictionaryReaderQuotas.Max;
return binding;
} else
{
BasicHttpBinding binding = new BasicHttpBinding();
binding.ReaderQuotas.MaxStringContentLength = 2147483647;
binding.MaxReceivedMessageSize = 2147483647;
binding.MaxBufferSize = 2147483647;
binding.MaxBufferPoolSize = 2147483647;
binding.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard;
binding.MessageEncoding = WSMessageEncoding.Text;
binding.TextEncoding = Encoding.UTF8;
binding.UseDefaultWebProxy = true;
binding.AllowCookies = false;
binding.Namespace = "VideoOS.ConfigurationAPI";
binding.Security.Mode = BasicHttpSecurityMode.Transport;
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Basic;
return binding;
}
}
#endregion
}
}
| 34.247619 | 151 | 0.463154 | [
"MIT"
] | Silex/mipsdk-samples-component | ConfigAPIBatch/ConfigAPIClient.cs | 14,386 | C# |
#nullable enable
using System.Collections.Generic;
using ProfanityChecker.Domain;
namespace ProfanityChecker.Logic.DTO
{
public sealed record ProfanityScanResultDto(bool HasProfanity, IEnumerable<ProfanityItem>? ProfanityItems);
} | 29.375 | 111 | 0.838298 | [
"MIT"
] | MrFishchev/profanity-checker | ProfanityChecker.Logic/DTO/ProfanityScanResultDto.cs | 235 | C# |
using UnityEngine;
using HutongGames.PlayMaker;
using DG.Tweening;
namespace HutongGames.PlayMaker.Actions
{
[ActionCategory("DOTween")]
[Tooltip("Shakes a Camera's localRotation")]
[HelpUrl("http://dotween.demigiant.com/documentation.php")]
public class DOTweenCameraShakeRotation : FsmStateAction
{
[RequiredField]
[CheckForComponent(typeof(Camera))]
public FsmOwnerDefault gameObject;
[RequiredField]
[UIHint(UIHint.FsmFloat)]
[Tooltip("The duration of the tween")]
public FsmFloat duration;
[UIHint(UIHint.FsmBool)]
[Tooltip("If isSpeedBased is TRUE sets the tween as speed based (the duration will represent the number of units/degrees the tween moves x second). NOTE: if you want your speed to be constant, also set the ease to Ease.Linear.")]
public FsmBool setSpeedBased;
[UIHint(UIHint.FsmFloat)]
[Tooltip("Set a delayed startup for the tween")]
public FsmFloat startDelay;
[UIHint(UIHint.FsmVector3)]
[Tooltip("The shake strength on each axis")]
public FsmVector3 strength;
[UIHint(UIHint.FsmInt)]
[Tooltip("How much will the shake vibrate")]
public FsmInt vibrato;
[UIHint(UIHint.FsmFloat)]
[Tooltip("Indicates how much the shake will be random (0 to 180 - values higher than 90 kind of suck, so beware). Setting it to 0 will shake along a single direction.")]
public FsmFloat randomness;
[ActionSection("Events")]
[UIHint(UIHint.FsmEvent)]
public FsmEvent startEvent;
[UIHint(UIHint.FsmEvent)]
public FsmEvent finishEvent;
[UIHint(UIHint.FsmBool)]
[Tooltip("If TRUE this action will finish immediately, if FALSE it will finish when the tween is complete.")]
public FsmBool finishImmediately;
[ActionSection("Tween ID")]
[UIHint(UIHint.Description)]
public string tweenIdDescription = "Set an ID for the tween, which can then be used as a filter with DOTween's Control Methods";
[Tooltip("Select the source for the tween ID")]
public DOTweenActionsEnums.TweenId tweenIdType;
[UIHint(UIHint.FsmString)]
[Tooltip("Use a String as the tween ID")]
public FsmString stringAsId;
[UIHint(UIHint.Tag)]
[Tooltip("Use a Tag as the tween ID")]
public FsmString tagAsId;
[ActionSection("Ease Settings")]
public DOTweenActionsEnums.SelectedEase selectedEase;
[Tooltip("Sets the ease of the tween. If applied to a Sequence instead of a Tweener, the ease will be applied to the whole Sequence as if it was a single animated timeline.Sequences always have Ease.Linear by default, independently of the global default ease settings.")]
public Ease easeType;
public FsmAnimationCurve animationCurve;
[ActionSection("Loop Settings")]
[UIHint(UIHint.Description)]
public string loopsDescriptionArea = "Setting loops to -1 will make the tween loop infinitely.";
[UIHint(UIHint.FsmInt)]
[Tooltip("Setting loops to -1 will make the tween loop infinitely.")]
public FsmInt loops;
[Tooltip("Sets the looping options (Restart, Yoyo, Incremental) for the tween. LoopType.Restart: When a loop ends it will restart from the beginning. LoopType.Yoyo: When a loop ends it will play backwards until it completes another loop, then forward again, then backwards again, and so on and on and on. LoopType.Incremental: Each time a loop ends the difference between its endValue and its startValue will be added to the endValue, thus creating tweens that increase their values with each loop cycle. Has no effect if the tween has already started.Also, infinite loops will not be applied if the tween is inside a Sequence.")]
public LoopType loopType = LoopType.Restart;
[ActionSection("Special Settings")]
[UIHint(UIHint.FsmBool)]
[Tooltip("If autoKillOnCompletion is set to TRUE the tween will be killed as soon as it completes, otherwise it will stay in memory and you'll be able to reuse it.")]
public FsmBool autoKillOnCompletion;
[UIHint(UIHint.FsmBool)]
[Tooltip("Sets the recycling behaviour for the tween. If you don't set it then the default value (set either via DOTween.Init or DOTween.defaultRecyclable) will be used.")]
public FsmBool recyclable;
[Tooltip("Sets the type of update (Normal, Late or Fixed) for the tween and eventually tells it to ignore Unity's timeScale. UpdateType.Normal: Updates every frame during Update calls. UpdateType.Late: Updates every frame during LateUpdate calls. UpdateType.Fixed: Updates using FixedUpdate calls. ")]
public UpdateType updateType = UpdateType.Normal;
[UIHint(UIHint.FsmBool)]
[Tooltip(" If TRUE the tween will ignore Unity's Time.timeScale. NOTE: independentUpdate works also with UpdateType.Fixed but is not recommended in that case (because at timeScale 0 FixedUpdate won't run).")]
public FsmBool isIndependentUpdate;
[ActionSection("Debug Options")]
[UIHint(UIHint.FsmBool)]
public FsmBool debugThis;
private Tweener tweener;
public override void Reset()
{
base.Reset();
gameObject = null;
duration = new FsmFloat { UseVariable = false };
setSpeedBased = new FsmBool { UseVariable = false, Value = false };
strength = new FsmVector3 { UseVariable = false, Value = Vector3.zero };
vibrato = new FsmInt { UseVariable = false, Value = 10 };
randomness = new FsmFloat { UseVariable = false, Value = 90 };
startEvent = null;
finishEvent = null;
finishImmediately = new FsmBool { UseVariable = false, Value = false };
stringAsId = new FsmString { UseVariable = false };
tagAsId = new FsmString { UseVariable = false };
startDelay = new FsmFloat { Value = 0 };
selectedEase = DOTweenActionsEnums.SelectedEase.EaseType;
easeType = Ease.Linear;
loops = new FsmInt { Value = 0 };
loopType = LoopType.Restart;
autoKillOnCompletion = new FsmBool { Value = true };
recyclable = new FsmBool { Value = false };
updateType = UpdateType.Normal;
isIndependentUpdate = new FsmBool { Value = false };
debugThis = new FsmBool { Value = false };
}
public override void OnEnter()
{
tweener = Fsm.GetOwnerDefaultTarget(gameObject).GetComponent<Camera>().DOShakeRotation(duration.Value, strength.Value, vibrato.Value, randomness.Value);
if (setSpeedBased.Value) tweener.SetSpeedBased();
switch (tweenIdType)
{
case DOTweenActionsEnums.TweenId.UseString: if (string.IsNullOrEmpty(stringAsId.Value) == false) tweener.SetId(stringAsId.Value); break;
case DOTweenActionsEnums.TweenId.UseTag: if (string.IsNullOrEmpty(tagAsId.Value) == false) tweener.SetId(tagAsId.Value); break;
case DOTweenActionsEnums.TweenId.UseGameObject: tweener.SetId(Fsm.GetOwnerDefaultTarget(gameObject)); break;
}
tweener.SetDelay(startDelay.Value);
switch (selectedEase)
{
case DOTweenActionsEnums.SelectedEase.EaseType: tweener.SetEase(easeType); break;
case DOTweenActionsEnums.SelectedEase.AnimationCurve: tweener.SetEase(animationCurve.curve); break;
}
tweener.SetLoops(loops.Value, loopType);
tweener.SetAutoKill(autoKillOnCompletion.Value);
tweener.SetRecyclable(recyclable.Value);
tweener.SetUpdate(updateType, isIndependentUpdate.Value);
if (startEvent != null) tweener.OnStart(() => { Fsm.Event(startEvent); });
if (finishImmediately.Value == false) // This allows Action Sequences of this action.
{
if (finishEvent != null)
{
tweener.OnComplete(() => { Fsm.Event(finishEvent); });
}
else
{
tweener.OnComplete(Finish);
}
}
tweener.Play();
if (debugThis.Value) Debug.Log("GameObject [" + State.Fsm.GameObjectName + "] FSM [" + State.Fsm.Name + "] State [" + State.Name + "] - DOTween Camera Shake Rotation - SUCCESS!");
if (finishImmediately.Value) Finish();
}
}
}
| 45.865285 | 639 | 0.638839 | [
"MIT"
] | pdyxs/UnityProjectStarter | Assets/Plugins/Externals/DOTweenPlaymakerActions/Actions/DOTween/DOTweenCameraShakeRotation.cs | 8,852 | C# |
using ChallengeUbistart.Api.Extensions;
using ChallengeUbistart.Business.Intefaces;
using ChallengeUbistart.Business.Notifications;
using ChallengeUbistart.Business.Services;
using ChallengeUbistart.Data.Context;
using ChallengeUbistart.Data.Repository;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Swashbuckle.AspNetCore.SwaggerGen;
namespace ChallengeUbistart.Api.Configuration
{
public static class DependencyInjectionConfig
{
public static IServiceCollection ResolveDependencies(this IServiceCollection services)
{
// Db
services.AddScoped<MyDbContext>();
// Repository
services.AddScoped<IItemRepository, ItemRepository>();
services.AddScoped<IClientRepository, ClientRepository>();
// Services
services.AddScoped<IItemService, ItemService>();
// Notification
services.AddScoped<INotify, Notify>();
services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
services.AddScoped<IUser, AspNetUser>();
services.AddTransient<IConfigureOptions<SwaggerGenOptions>, ConfigureSwaggerOptions>();
return services;
}
}
} | 33.358974 | 99 | 0.717141 | [
"MIT"
] | jadson-medeiros/challengeubistart | src/ChallengeUbistart.Api/Configuration/DependencyInjectionConfig.cs | 1,303 | C# |
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18444
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CharacterTool.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CharacterTool.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}
| 38.652778 | 179 | 0.603665 | [
"MIT"
] | NHNNEXT/2014-01-HUDIGAME-EunJaRim | YaMang/YaMangClient/Tool/CharacterTool/CharacterTool/Properties/Resources.Designer.cs | 2,785 | C# |
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Nett;
namespace PolyFeed
{
internal class Settings
{
public readonly string ProgramName = "PolyFeed";
public readonly string Description = "creates Atom feeds from websites that don't support it";
public string ConfigFilepath = null;
public string OutputFilepath = "feed.atom";
}
class Program
{
private static Settings settings = new Settings();
public static int Main(string[] args)
{
///// 1: Parse arguments /////
List<string> extras = new List<string>();
for (int i = 0; i < args.Length; i++)
{
if (!args[i].StartsWith("-"))
{
extras.Add(args[i]);
continue;
}
switch (args[i])
{
case "-h":
case "--help":
showHelp();
return 0;
case "-v":
case "--version":
Console.WriteLine($"{settings.ProgramName}\t{GetProgramVersion()}");
return 0;
case "-c":
case "--config":
settings.ConfigFilepath = args[++i];
break;
case "-o":
case "--output":
settings.OutputFilepath = args[++i];
break;
}
}
if (settings.ConfigFilepath == null) {
Console.Error.WriteLine("Error: No configuration filepath detected. Try " +
"using --help to show usage information.");
return 1;
}
///// 2: Acquire environment variables /////
///// 3: Run program /////
return run().Result;
}
private static void showHelp()
{
Console.WriteLine($"{settings.ProgramName}, {GetProgramVersion()}");
Console.WriteLine(" By Starbeamrainbowlabs");
Console.WriteLine();
Console.WriteLine($"This program {settings.Description}.");
Console.WriteLine();
Console.WriteLine("Usage:");
Console.WriteLine($" ./{Path.GetFileName(Assembly.GetExecutingAssembly().Location)} [arguments]");
Console.WriteLine();
Console.WriteLine("Options:");
Console.WriteLine(" -h --help Displays this message");
Console.WriteLine(" -v --version Outputs the version number of this program");
Console.WriteLine(" -c --config Specifies the location of the TOML feed configuration file to use to generate a feed");
Console.WriteLine(" -o --output Specifies the location to write the output feed to (default: feed.atom)");
}
private static async Task<int> run()
{
TomlSettings parseSettings = TomlSettings.Create(s =>
s.ConfigurePropertyMapping(m => m.UseTargetPropertySelector(new SnakeCasePropertySelector()))
);
FeedSource feedSource = Toml.ReadFile<FeedSource>(settings.ConfigFilepath, parseSettings);
if (feedSource == null) {
Console.Error.WriteLine("Error: Somethine went wrong when parsing your settings file :-(");
return 1;
}
if (!string.IsNullOrWhiteSpace(feedSource.Feed.Output))
settings.OutputFilepath = feedSource.Feed.Output;
FeedBuilder feedBuilder = new FeedBuilder();
try {
await feedBuilder.AddSource(feedSource);
} catch (ApplicationException error) {
Console.Error.WriteLine(error.Message);
return 2;
}
await Console.Error.WriteLineAsync($"[Output] Writing feed to {settings.OutputFilepath}");
File.WriteAllText(settings.OutputFilepath, await feedBuilder.Render());
return 0;
}
#region Helper Methods
public static string GetProgramVersion()
{
// BUG: This isn't returning 0.1.1 for some reason :-/
Version version = Assembly.GetExecutingAssembly().GetName().Version;
return $"{version.Major}.{version.Minor}";
}
#endregion
}
}
| 26.859259 | 130 | 0.66492 | [
"MPL-2.0",
"MPL-2.0-no-copyleft-exception"
] | sbrl/PolyFeed | PolyFeed/Program.cs | 3,628 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Group_24_Animated_Algorithms.Searching_Algorithms
{
class Fibonacci : Algorithm
{
public Fibonacci(ref OutputScreen OutputWin)
{
Output = OutputWin;
data = new Data() { time = "O(Logn)", space = "O(1)" };
Output.UpdateInfo(@"private string FSearch(decimal[] input, decimal target, int length, ref int count)
{
//get the fib numbers
int fib2 = 0;
int fib1 = 1;
int fib = fib2 + fib1;
//get the smallest fib1/2 >= fib
while (fib < length)
{
fib2 = fib1;
fib1 = fib;
fib = fib2 + fib1;
}
int offset = -1;
while (fib > 1)
{
//check if fib2 is valid
int i = Math.Min(offset + fib2, length - 1);
//if target is greater, split array before offset
if (input[i] < target)
{
fib = fib1;
fib1 = fib2;
fib2 = fib - fib1;
offset = i;
}
//if target is greater, split array after offset
else if (input[i] > target)
{
fib = fib2;
fib1 = fib1 - fib2;
fib2 = fib - fib1;
}
//found
else
{
return $""Location: {i + 1}"";
}
}
//if final element
if (fib1 == 1 && input[offset + 1] == target)
{
return $""Location: {offset + 2}"";
}
//doesnt exist
return ""Not Found"";
}");
}
public override string Search(decimal[] input, decimal target)
{
int count = 0;
return FSearch(input, target, input.Length, ref count);
}
private string FSearch(decimal[] input, decimal target, int length, ref int count)
{
Update(3,6);
//get the smallest fib1/2 >= fib
int fib2 = 0;
int fib1 = 1;
int fib = fib2 + fib1;
Update(8,10);
//get the smallest fib1/2 >= fib
while (fib < length)
{
Update(10,13);
fib2 = fib1;
fib1 = fib;
fib = fib2 + fib1;
}
Update(16,17);
int offset = -1;
Update(18,19);
while (fib > 1)
{
Update(20,21);
//check if fib2 is valid
int i = Math.Min(offset + fib2, length - 1);
Update(23,25);
count++;
Output.UpdateOperations(count);
//if target is greater, split array before offset
if (input[i] < target)
{
Update(26,29);
Highlight(i);
fib = fib1;
fib1 = fib2;
fib2 = fib - fib1;
offset = i;
}
//if target is greater, split array after offset
else if (input[i] > target)
{
Update(35,37);
Highlight(i);
fib = fib2;
fib1 = fib1 - fib2;
fib2 = fib - fib1;
}
//found
else
{
Update(43,44);
HighlightFound(i);
return $"Location: {i + 1}";
}
}
Update(47, 49);
//if final element
if (fib1 == 1 && input[offset + 1] == target)
{
Update(50,51);
HighlightFound(offset + 1);
return $"Location: {offset + 2}";
}
Update(53,54);
//doesnt exist
return "Not Found";
}
}
}
| 23.767742 | 114 | 0.444083 | [
"MIT"
] | group-24-animated-algorithms/Group-24-Animated-Algorithms | Group 24 Animated Algorithms/Searching Algorithms/Fibonacci.cs | 3,686 | C# |
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Vpc.V20170312.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class ModifySecurityGroupAttributeResponse : AbstractModel
{
/// <summary>
/// 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。
/// </summary>
[JsonProperty("RequestId")]
public string RequestId{ get; set; }
/// <summary>
/// 内部实现,用户禁止调用
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
}
}
}
| 29.909091 | 83 | 0.667933 | [
"Apache-2.0"
] | geffzhang/tencentcloud-sdk-dotnet | TencentCloud/Vpc/V20170312/Models/ModifySecurityGroupAttributeResponse.cs | 1,396 | C# |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的常规信息通过以下
// 特性集控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("ServiceMonitoringSystem.Repository")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ServiceMonitoringSystem.Repository")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 使此程序集中的类型
// 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
// 则将该类型上的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("412c6905-27ae-4645-8ebd-759157104c6b")]
// 程序集的版本信息由下面四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| 27.918919 | 66 | 0.697967 | [
"Apache-2.0"
] | Zeptol/ServiceMonitoringSystem | ServiceMonitoringSystem.Repository/Properties/AssemblyInfo.cs | 1,392 | C# |
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
// Ported from um/ntsecapi.h in the Windows SDK for Windows 10.0.20348.0
// Original source is Copyright © Microsoft. All rights reserved.
namespace TerraFX.Interop.Windows;
/// <include file='MSV1_0_SUBAUTH_REQUEST.xml' path='doc/member[@name="MSV1_0_SUBAUTH_REQUEST"]/*' />
public unsafe partial struct MSV1_0_SUBAUTH_REQUEST
{
/// <include file='MSV1_0_SUBAUTH_REQUEST.xml' path='doc/member[@name="MSV1_0_SUBAUTH_REQUEST.MessageType"]/*' />
public MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
/// <include file='MSV1_0_SUBAUTH_REQUEST.xml' path='doc/member[@name="MSV1_0_SUBAUTH_REQUEST.SubAuthPackageId"]/*' />
[NativeTypeName("ULONG")]
public uint SubAuthPackageId;
/// <include file='MSV1_0_SUBAUTH_REQUEST.xml' path='doc/member[@name="MSV1_0_SUBAUTH_REQUEST.SubAuthInfoLength"]/*' />
[NativeTypeName("ULONG")]
public uint SubAuthInfoLength;
/// <include file='MSV1_0_SUBAUTH_REQUEST.xml' path='doc/member[@name="MSV1_0_SUBAUTH_REQUEST.SubAuthSubmitBuffer"]/*' />
[NativeTypeName("PUCHAR")]
public byte* SubAuthSubmitBuffer;
}
| 47.153846 | 145 | 0.751223 | [
"MIT"
] | IngmarBitter/terrafx.interop.windows | sources/Interop/Windows/Windows/um/ntsecapi/MSV1_0_SUBAUTH_REQUEST.cs | 1,228 | C# |
using System;
using System.Collections.Generic;
using AutoMapper;
using FluentValidation;
using Host4Travel.BLL.Abstract;
using Host4Travel.BLL.Validators.DocumentService;
using Host4Travel.Core.DTO.DocumentDtos;
using Host4Travel.Core.ExceptionService.Abstract;
using Host4Travel.Core.ExceptionService.Exceptions;
using Host4Travel.DAL.Abstract;
using Host4Travel.Entities.Concrete;
namespace Host4Travel.BLL.Concrete
{
public class DocumentManager:IDocumentService
{
private IExceptionHandler _exceptionHandler;
private IDocumentDal _documentDal;
private IMapper _mapper;
public DocumentManager(IExceptionHandler exceptionHandler, IDocumentDal documentDal, IMapper mapper)
{
_exceptionHandler = exceptionHandler;
_documentDal = documentDal;
_mapper = mapper;
}
public List<DocumentListDto> GetAll()
{
var documents = _documentDal.GetList();
if (documents==null)
{
return null;
}
var mappedDocuments = _mapper.Map<List<DocumentListDto>>(documents);
return mappedDocuments;
}
public DocumentDetailDto GetById(Guid id)
{
var document = _documentDal.Get(x => x.DocumentId == id);
if (document==null)
{
return null;
}
var mappedDocument = _mapper.Map<DocumentDetailDto>(document);
return mappedDocument;
}
public void Add(DocumentAddDto model)
{
try
{
AddDocumentValidator validator=new AddDocumentValidator();
var validationResult = validator.Validate(model);
if (!validationResult.IsValid)
{
throw new ValidationFailureException(validationResult.ToString());
}
else
{
if (_documentDal.IsExists(x=>x.DocumentTypeId==model.DocumentTypeId && x.OwnerId==model.OwnerId))
{
throw new UniqueConstraintException("Kullanıcı için belirtilen türde döküman zaten var");
}
else
{
var mappedEntity = _mapper.Map<Document>(model);
_documentDal.Add(mappedEntity);
}
}
}
catch (Exception e)
{
throw _exceptionHandler.HandleServiceException(e);
}
}
public void Update(DocumentUpdateDto model)
{
try
{
UpdateDocumentValidator validator=new UpdateDocumentValidator();
var validationResult = validator.Validate(model);
if (!validationResult.IsValid)
{
throw new ValidationFailureException(validationResult.ToString());
}
else
{
if (!_documentDal.IsExists(x=>x.DocumentId==model.DocumentId))
{
throw new NullReferenceException();
}
else
{
var mappedEntity = _mapper.Map<Document>(model);
_documentDal.Update(mappedEntity);
}
}
}
catch (Exception e)
{
throw _exceptionHandler.HandleServiceException(e);
}
}
public void Delete(DocumentDeleteDto model)
{
try
{
DeleteDocumentValidator validator=new DeleteDocumentValidator();
var validationResult = validator.Validate(model);
if (!validationResult.IsValid)
{
throw new ValidationFailureException(validationResult.ToString());
}
else
{
if (!_documentDal.IsExists(x=>x.DocumentId==model.DocumentId))
{
throw new NullReferenceException();
}
else
{
var mappedEntity = _mapper.Map<Document>(model);
_documentDal.Delete(mappedEntity);
}
}
}
catch (Exception e)
{
throw _exceptionHandler.HandleServiceException(e);
}
}
}
} | 33.507246 | 117 | 0.511462 | [
"MIT"
] | SadettinKepenek/Host4Travel | Host4Travel.BLL/Concrete/DocumentManager.cs | 4,632 | C# |
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using NS12.VariableBase.Mathematics.Common.Models;
using NS12.VariableBase.Mathematics.Common.Interfaces;
using static NS12.VariableBase.Mathematics.Common.Models.NumberSegmentDictionary;
namespace NS12.VariableBase.Mathematics.Providers.Algorithms
{
/// <summary>
/// Prime Algorithm
/// By: Michael Kappel, MCPD
/// Date: 1/23/2019
/// </summary>
public class IterativePrimeAlgorithm : IPrimeAlgorithm<Number>
{
public readonly DateTime Started;
public NumberSegments MaxPrimeTested = new NumberSegments(new decimal[] { 1 });
public decimal[][] PrimeNumbers = default;
public IterativePrimeAlgorithm()
{
Started = DateTime.Now;
}
public bool SavePrimes { get; set; }
public bool IsPrime(Number number)
{
bool isPrime = true;
if (number.Size > 3)
{
throw new NotImplementedException();
}
else
{
decimal savedNumberNumber = number.Segments[0];
if (number.Segments.Length <= 3)
{
if (number.Segments.Length > 1)
{
savedNumberNumber = savedNumberNumber + number.Segments[1] * number.Environment.Base;
}
if (number.Segments.Length > 2)
{
savedNumberNumber = savedNumberNumber + number.Segments[2] * (number.Environment.Base * number.Environment.Base);
}
decimal squareRootOfPrime = (decimal)Math.Sqrt((double)savedNumberNumber);
for (int i = 2; i < squareRootOfPrime; i++)
{
if (savedNumberNumber % i == 0)
{
isPrime = false;
break;
}
}
if (isPrime)
{
Debug.WriteLine(string.Format("Verified prime: {0}", savedNumberNumber));
}
else
{
Debug.WriteLine(string.Format("Bad data in prime file: {0}", savedNumberNumber));
}
}
}
return isPrime;
}
public (Number Numerator, Number Denominator) GetComposite(Number a)
{
IMathEnvironment<Number> environment = a.Environment;
(Number Numerator, Number Denominator) result = default;
if (a <= environment.GetNumber(3))
{
}
else if (a.IsEven())
{
result = (a / environment.GetNumber(2), environment.GetNumber(2));
}
else
{
Number halfPrime = environment.GetNumber(Math.Ceiling(a.Segments[0] / 2));
Number testNumber = environment.GetNumber(1);
while (testNumber <= halfPrime)
{
Number currentNumber = a / testNumber;
if (currentNumber.Fragment == default)
{
result = (currentNumber, testNumber);
break;
}
testNumber = testNumber + environment.GetNumber(2);
}
}
#if DEBUG
if (a.Size == 1)
{
bool isPrime = true;
decimal squareRootOfPrime = (decimal)Math.Sqrt((double)a.Segments[0]);
int i = 2;
for (; i <= squareRootOfPrime; i++)
{
if (a.Segments[0] % i == 0)
{
isPrime = false;
break;
}
}
if (isPrime == false && result == default)
{
throw new Exception(string.Format("Math Error in GetComposite {0} should have had a Composite of {1}", a.Segments[0], i));
}
else if (isPrime == true && result != default)
{
throw new Exception(string.Format("Math Error in GetComposite {0} should NOT have a Composite of {1} x {2}", a.Segments[0], result.Numerator.Segments[0], result.Denominator.Segments[0]));
}
}
if (result != default)
{
foreach (decimal segment in result.Numerator.Segments)
{
if (segment > environment.Base)
{
throw new Exception("Bad GetComposite segment larger than base Item 1");
}
else if (segment < 0)
{
throw new Exception("Bad GetComposite segment less than zero Item 1");
}
}
foreach (decimal segment in result.Denominator.Segments)
{
if (segment > environment.Base)
{
throw new Exception("Bad GetComposite segment larger than base Item 2");
}
else if (segment < 0)
{
throw new Exception("Bad GetComposite segment less than zero Item 2");
}
}
}
#endif
return result;
}
}
}
| 34.286585 | 207 | 0.457763 | [
"MIT"
] | MichaelKappel/Variable-Base-Math | NS12.VariableBase.Mathematics.Providers/Algorithms/IterativePrimeAlgorithm.cs | 5,625 | C# |
using UnityEngine;
using FastCollections;
using System;
using Lockstep.Data;
using System.Collections.Generic;
namespace Lockstep
{
public static class ProjectileManager
{
public const int MaxProjectiles = 1 << 13;
private static string[] AllProjCodes;
private static readonly Dictionary<string, IProjectileData> CodeDataMap = new Dictionary<string, IProjectileData>();
public static void Setup()
{
IProjectileDataProvider prov;
if (LSDatabaseManager.TryGetDatabase<IProjectileDataProvider>(out prov))
{
IProjectileData[] projectileData = prov.ProjectileData;
for (int i = 0; i < projectileData.Length; i++)
{
IProjectileData item = projectileData[i];
CodeDataMap.Add(item.Name, item);
ProjectilePool.Add(item.Name, new FastStack<LSProjectile>());
}
}
}
public static void Initialize()
{
}
public static void Simulate()
{
for (int i = ProjectileBucket.PeakCount - 1; i >= 0; i--)
{
if (ProjectileBucket.arrayAllocation[i])
{
ProjectileBucket[i].Simulate();
}
}
for (int i = NDProjectileBucket.PeakCount - 1; i >= 0; i--)
{
if (NDProjectileBucket.arrayAllocation[i])
{
NDProjectileBucket[i].Simulate();
}
}
}
public static void Visualize()
{
for (int i = ProjectileBucket.PeakCount - 1; i >= 0; i--)
{
if (ProjectileBucket.arrayAllocation[i])
{
if (ProjectileBucket[i] != null)
{
ProjectileBucket[i].Visualize();
}
}
}
VisualizeBucket(NDProjectileBucket);
}
private static void VisualizeBucket(FastBucket<LSProjectile> bucket)
{
for (int i = bucket.PeakCount - 1; i >= 0; i--)
{
if (bucket.arrayAllocation[i])
{
bucket[i].Visualize();
}
}
}
public static void Deactivate()
{
for (int i = ProjectileBucket.PeakCount - 1; i >= 0; i--)
{
if (ProjectileBucket.arrayAllocation[i])
{
EndProjectile(ProjectileBucket[i]);
}
}
for (int i = NDProjectileBucket.PeakCount - 1; i >= 0; i--)
{
if (NDProjectileBucket.arrayAllocation[i])
{
EndProjectile(NDProjectileBucket[i]);
}
}
}
public static int GetStateHash()
{
int hash = 23;
for (int i = ProjectileBucket.PeakCount - 1; i >= 0; i--)
{
if (ProjectileBucket.arrayAllocation[i])
{
LSProjectile proj = ProjectileManager.ProjectileBucket[i];
hash ^= proj.GetStateHash();
}
}
return hash;
}
private static LSProjectile NewProjectile(string projCode)
{
IProjectileData projData = CodeDataMap[projCode];
if (projData.GetProjectile().gameObject != null)
{
var curProj = ((GameObject)GameObject.Instantiate<GameObject>(projData.GetProjectile().gameObject)).GetComponent<LSProjectile>();
if (curProj != null)
{
curProj.Setup(projData);
return curProj;
}
else return null;
}
else return null;
}
public static LSProjectile Create(string projCode, LSAgent source, Vector3d offset, AllegianceType targetAllegiance, Func<LSAgent, bool> agentConditional, Action<LSAgent> hitEffect)
{
Vector2d relativePos = offset.ToVector2d();
Vector2d worldPos = relativePos.Rotated(source.Body.Rotation) + source.Body.Position;
Vector3d pos = new Vector3d(worldPos.x, worldPos.y, offset.z + source.Body.HeightPos);
AgentController sourceController = source.Controller;
LSProjectile proj = Create(
projCode,
pos,
agentConditional,
(bite) =>
{
return ((sourceController.GetAllegiance(bite) & targetAllegiance) != 0);
}
,
hitEffect);
return proj;
}
public static LSProjectile Create(string projCode, Vector3d position, Func<LSAgent, bool> agentConditional, Func<byte, bool> bucketConditional, Action<LSAgent> onHit)
{
var curProj = RawCreate(projCode);
int id = ProjectileBucket.Add(curProj);
curProj.Prepare(id, position, agentConditional, bucketConditional, onHit, true);
return curProj;
}
private static LSProjectile RawCreate(string projCode)
{
if (ProjectilePool.ContainsKey(projCode) == false)
{
Debug.Log(projCode + " fired by " + Scan.LastFire + " Caused boom");
return null;
}
FastStack<LSProjectile> pool = ProjectilePool[projCode];
LSProjectile curProj = null;
if (pool.Count > 0)
{
curProj = pool.Pop();
}
else
{
curProj = NewProjectile(projCode);
}
return curProj;
}
public static void Fire(LSProjectile projectile)
{
if (projectile != null)
{
projectile.LateInit();
}
}
private static FastBucket<LSProjectile> NDProjectileBucket = new FastBucket<LSProjectile>();
/// <summary>
/// Non-deterministic
/// </summary>
/// <returns>The create and fire.</returns>
/// <param name="curProj">Current proj.</param>
/// <param name="projCode">Proj code.</param>
/// <param name="position">Position.</param>
/// <param name="direction">Direction.</param>
/// <param name="gravity">If set to <c>true</c> gravity.</param>
public static LSProjectile NDCreateAndFire(string projCode, Vector3d position, Vector3d direction, bool gravity = false)
{
var curProj = RawCreate(projCode);
int id = NDProjectileBucket.Add(curProj);
curProj.Prepare(id, position, (a) => false, (a) => false, (a) => { }, false);
curProj.InitializeFree(direction, (a) => false, gravity);
ProjectileManager.Fire(curProj);
return curProj;
}
public static void EndProjectile(LSProjectile projectile)
{
if (projectile.Deterministic)
{
int id = projectile.ID;
if (!ProjectileBucket.SafeRemoveAt(id, projectile))
{
Debug.Log("BOO! This is a terrible bug.");
}
}
else
{
if (!NDProjectileBucket.SafeRemoveAt(projectile.ID, projectile))
{
Debug.Log("BOO! This is a terrible bug.");
}
}
CacheProjectile(projectile);
projectile.Deactivate();
}
#region ID and allocation management
private static readonly Dictionary<string, FastStack<LSProjectile>> ProjectilePool = new Dictionary<string, FastStack<LSProjectile>>();
private static FastBucket<LSProjectile> ProjectileBucket = new FastBucket<LSProjectile>();
private static void CacheProjectile(LSProjectile projectile)
{
ProjectilePool[projectile.MyProjCode].Add(projectile);
/*if (projectile.ID == PeakCount - 1)
{
PeakCount--;
for (int i = projectile.ID - 1; i >= 0; i--)
{
if (ProjectileActive[i] == false)
{
PeakCount--;
}
else {
break;
}
}
}*/
}
#endregion
}
} | 26.655738 | 183 | 0.665283 | [
"MIT"
] | AlCaTrAzzALZ/LockstepFramework | Core/Game/Projectiles/ProjectileManager.cs | 6,506 | C# |
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace aim
{
public class ValueContainerAIPropertyAIDrawer : APropertyAIDrawer<AValueContainerAI>
{
public override AValueContainerAI Draw(AValueContainerAI instance, Type instanceType, string label, AIAgent aiAgent)
{
instance.ValueAsObject = PropertyAISerializer.DrawInstance(instance.ValueAsObject, instance.GetValueType(), "", aiAgent);
return instance;
}
}
} | 32.5625 | 133 | 0.735125 | [
"MIT"
] | Dawnfall/Coik-the-piggybank | LD-44/Assets/Scripts/ExternalScripts/AIMaker/Editorial/PropertyDrawers/AiM/ValueContainerAIPropertyAIDrawer.cs | 523 | C# |
using Android.Hardware.Camera2;
using Java.Lang;
namespace ShopLens.Droid.Listeners
{
public class CaptureListener : CameraCaptureSession.CaptureCallback
{
private readonly Camera2Fragment owner;
public CaptureListener(Camera2Fragment owner)
{
this.owner = owner ?? throw new System.ArgumentNullException("owner");
}
public override void OnCaptureCompleted(CameraCaptureSession session, CaptureRequest request, TotalCaptureResult result)
{
Process(result);
}
public override void OnCaptureProgressed(CameraCaptureSession session, CaptureRequest request, CaptureResult partialResult)
{
Process(partialResult);
}
private void Process(CaptureResult result)
{
switch (owner.mState)
{
case Camera2Fragment.STATE_WAITING_LOCK:
{
Integer afState = (Integer)result.Get(CaptureResult.ControlAfState);
if (afState == null)
{
owner.CaptureStillPicture();
}
else if ((((int)ControlAFState.FocusedLocked) == afState.IntValue()) ||
(((int)ControlAFState.NotFocusedLocked) == afState.IntValue()))
{
// ControlAeState can be null on some devices
Integer aeState = (Integer)result.Get(CaptureResult.ControlAeState);
if (aeState == null ||
aeState.IntValue() == ((int)ControlAEState.Converged))
{
owner.mState = Camera2Fragment.STATE_PICTURE_TAKEN;
owner.CaptureStillPicture();
}
else
{
owner.RunPrecaptureSequence();
}
}
break;
}
case Camera2Fragment.STATE_WAITING_PRECAPTURE:
{
// ControlAeState can be null on some devices
Integer aeState = (Integer)result.Get(CaptureResult.ControlAeState);
if (aeState == null ||
aeState.IntValue() == ((int)ControlAEState.Precapture) ||
aeState.IntValue() == ((int)ControlAEState.FlashRequired))
{
owner.mState = Camera2Fragment.STATE_WAITING_NON_PRECAPTURE;
}
break;
}
case Camera2Fragment.STATE_WAITING_NON_PRECAPTURE:
{
// ControlAeState can be null on some devices
Integer aeState = (Integer)result.Get(CaptureResult.ControlAeState);
if (aeState == null || aeState.IntValue() != ((int)ControlAEState.Precapture))
{
owner.mState = Camera2Fragment.STATE_PICTURE_TAKEN;
owner.CaptureStillPicture();
}
break;
}
}
}
}
} | 42.580247 | 131 | 0.467672 | [
"MIT"
] | mrjslau/TOP2018 | Mobile/ShopLens/Droid/Listeners/CaptureListener.cs | 3,451 | C# |
// Copyright (C) 2014 dot42
//
// Original filename: Junit.Runner.cs
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#pragma warning disable 1717
namespace Junit.Runner
{
/// <summary>
/// <para>An interface to define how a test suite should be loaded. </para>
/// </summary>
/// <java-name>
/// junit/runner/TestSuiteLoader
/// </java-name>
[Dot42.DexImport("junit/runner/TestSuiteLoader", AccessFlags = 1537)]
public partial interface ITestSuiteLoader
/* scope: __dot42__ */
{
/// <java-name>
/// load
/// </java-name>
[Dot42.DexImport("load", "(Ljava/lang/String;)Ljava/lang/Class;", AccessFlags = 1025)]
global::System.Type Load(string suiteClassName) /* MethodBuilder.Create */ ;
/// <java-name>
/// reload
/// </java-name>
[Dot42.DexImport("reload", "(Ljava/lang/Class;)Ljava/lang/Class;", AccessFlags = 1025)]
global::System.Type Reload(global::System.Type aClass) /* MethodBuilder.Create */ ;
}
/// <summary>
/// <para>Base class for all test runners. This class was born live on stage in Sardinia during XP2000. </para>
/// </summary>
/// <java-name>
/// junit/runner/BaseTestRunner
/// </java-name>
[Dot42.DexImport("junit/runner/BaseTestRunner", AccessFlags = 1057)]
public abstract partial class BaseTestRunner : global::Junit.Framework.ITestListener
/* scope: __dot42__ */
{
/// <java-name>
/// SUITE_METHODNAME
/// </java-name>
[Dot42.DexImport("SUITE_METHODNAME", "Ljava/lang/String;", AccessFlags = 25)]
public const string SUITE_METHODNAME = "suite";
[Dot42.DexImport("<init>", "()V", AccessFlags = 1)]
public BaseTestRunner() /* MethodBuilder.Create */
{
}
/// <summary>
/// <para>A test started. </para>
/// </summary>
/// <java-name>
/// startTest
/// </java-name>
[Dot42.DexImport("startTest", "(Ljunit/framework/Test;)V", AccessFlags = 33)]
public virtual void StartTest(global::Junit.Framework.ITest test) /* MethodBuilder.Create */
{
}
/// <java-name>
/// setPreferences
/// </java-name>
[Dot42.DexImport("setPreferences", "(Ljava/util/Properties;)V", AccessFlags = 12)]
protected internal static void SetPreferences(global::Java.Util.Properties preferences) /* MethodBuilder.Create */
{
}
/// <java-name>
/// getPreferences
/// </java-name>
[Dot42.DexImport("getPreferences", "()Ljava/util/Properties;", AccessFlags = 12)]
protected internal static global::Java.Util.Properties GetPreferences() /* MethodBuilder.Create */
{
return default(global::Java.Util.Properties);
}
/// <java-name>
/// savePreferences
/// </java-name>
[Dot42.DexImport("savePreferences", "()V", AccessFlags = 9)]
public static void SavePreferences() /* MethodBuilder.Create */
{
}
/// <java-name>
/// setPreference
/// </java-name>
[Dot42.DexImport("setPreference", "(Ljava/lang/String;Ljava/lang/String;)V", AccessFlags = 1)]
public virtual void SetPreference(string key, string value) /* MethodBuilder.Create */
{
}
/// <summary>
/// <para>A test ended. </para>
/// </summary>
/// <java-name>
/// endTest
/// </java-name>
[Dot42.DexImport("endTest", "(Ljunit/framework/Test;)V", AccessFlags = 33)]
public virtual void EndTest(global::Junit.Framework.ITest test) /* MethodBuilder.Create */
{
}
/// <java-name>
/// addError
/// </java-name>
[Dot42.DexImport("addError", "(Ljunit/framework/Test;Ljava/lang/Throwable;)V", AccessFlags = 33)]
public virtual void AddError(global::Junit.Framework.ITest test, global::System.Exception t) /* MethodBuilder.Create */
{
}
/// <java-name>
/// addFailure
/// </java-name>
[Dot42.DexImport("addFailure", "(Ljunit/framework/Test;Ljunit/framework/AssertionFailedError;)V", AccessFlags = 33)]
public virtual void AddFailure(global::Junit.Framework.ITest test, global::Junit.Framework.AssertionFailedError t) /* MethodBuilder.Create */
{
}
/// <java-name>
/// testStarted
/// </java-name>
[Dot42.DexImport("testStarted", "(Ljava/lang/String;)V", AccessFlags = 1025)]
public abstract void TestStarted(string testName) /* MethodBuilder.Create */ ;
/// <java-name>
/// testEnded
/// </java-name>
[Dot42.DexImport("testEnded", "(Ljava/lang/String;)V", AccessFlags = 1025)]
public abstract void TestEnded(string testName) /* MethodBuilder.Create */ ;
/// <java-name>
/// testFailed
/// </java-name>
[Dot42.DexImport("testFailed", "(ILjunit/framework/Test;Ljava/lang/Throwable;)V", AccessFlags = 1025)]
public abstract void TestFailed(int status, global::Junit.Framework.ITest test, global::System.Exception t) /* MethodBuilder.Create */ ;
/// <summary>
/// <para>Returns the Test corresponding to the given suite. This is a template method, subclasses override runFailed(), clearStatus(). </para>
/// </summary>
/// <java-name>
/// getTest
/// </java-name>
[Dot42.DexImport("getTest", "(Ljava/lang/String;)Ljunit/framework/Test;", AccessFlags = 1)]
public virtual global::Junit.Framework.ITest GetTest(string suiteClassName) /* MethodBuilder.Create */
{
return default(global::Junit.Framework.ITest);
}
/// <summary>
/// <para>Returns the formatted string of the elapsed time. </para>
/// </summary>
/// <java-name>
/// elapsedTimeAsString
/// </java-name>
[Dot42.DexImport("elapsedTimeAsString", "(J)Ljava/lang/String;", AccessFlags = 1)]
public virtual string ElapsedTimeAsString(long runTime) /* MethodBuilder.Create */
{
return default(string);
}
/// <summary>
/// <para>Processes the command line arguments and returns the name of the suite class to run or null </para>
/// </summary>
/// <java-name>
/// processArguments
/// </java-name>
[Dot42.DexImport("processArguments", "([Ljava/lang/String;)Ljava/lang/String;", AccessFlags = 4)]
protected internal virtual string ProcessArguments(string[] args) /* MethodBuilder.Create */
{
return default(string);
}
/// <summary>
/// <para>Sets the loading behaviour of the test runner </para>
/// </summary>
/// <java-name>
/// setLoading
/// </java-name>
[Dot42.DexImport("setLoading", "(Z)V", AccessFlags = 1)]
public virtual void SetLoading(bool enable) /* MethodBuilder.Create */
{
}
/// <summary>
/// <para>Extract the class name from a String in VA/Java style </para>
/// </summary>
/// <java-name>
/// extractClassName
/// </java-name>
[Dot42.DexImport("extractClassName", "(Ljava/lang/String;)Ljava/lang/String;", AccessFlags = 1)]
public virtual string ExtractClassName(string className) /* MethodBuilder.Create */
{
return default(string);
}
/// <summary>
/// <para>Truncates a String to the maximum length. </para>
/// </summary>
/// <java-name>
/// truncate
/// </java-name>
[Dot42.DexImport("truncate", "(Ljava/lang/String;)Ljava/lang/String;", AccessFlags = 9)]
public static string Truncate(string s) /* MethodBuilder.Create */
{
return default(string);
}
/// <summary>
/// <para>Override to define how to handle a failed loading of a test suite. </para>
/// </summary>
/// <java-name>
/// runFailed
/// </java-name>
[Dot42.DexImport("runFailed", "(Ljava/lang/String;)V", AccessFlags = 1028)]
protected internal abstract void RunFailed(string message) /* MethodBuilder.Create */ ;
/// <summary>
/// <para>Returns the loaded Class for a suite name. </para>
/// </summary>
/// <java-name>
/// loadSuiteClass
/// </java-name>
[Dot42.DexImport("loadSuiteClass", "(Ljava/lang/String;)Ljava/lang/Class;", AccessFlags = 4)]
protected internal virtual global::System.Type LoadSuiteClass(string suiteClassName) /* MethodBuilder.Create */
{
return default(global::System.Type);
}
/// <summary>
/// <para>Clears the status message. </para>
/// </summary>
/// <java-name>
/// clearStatus
/// </java-name>
[Dot42.DexImport("clearStatus", "()V", AccessFlags = 4)]
protected internal virtual void ClearStatus() /* MethodBuilder.Create */
{
}
/// <summary>
/// <para>Returns the loader to be used.</para><para><xrefsect><xreftitle>Deprecated</xreftitle><xrefdescription><para>not present in JUnit4.10 </para></xrefdescription></xrefsect></para>
/// </summary>
/// <java-name>
/// getLoader
/// </java-name>
[Dot42.DexImport("getLoader", "()Ljunit/runner/TestSuiteLoader;", AccessFlags = 1)]
public virtual global::Junit.Runner.ITestSuiteLoader GetLoader() /* MethodBuilder.Create */
{
return default(global::Junit.Runner.ITestSuiteLoader);
}
/// <java-name>
/// useReloadingTestSuiteLoader
/// </java-name>
[Dot42.DexImport("useReloadingTestSuiteLoader", "()Z", AccessFlags = 4)]
protected internal virtual bool UseReloadingTestSuiteLoader() /* MethodBuilder.Create */
{
return default(bool);
}
/// <java-name>
/// getPreference
/// </java-name>
[Dot42.DexImport("getPreference", "(Ljava/lang/String;)Ljava/lang/String;", AccessFlags = 9)]
public static string GetPreference(string key) /* MethodBuilder.Create */
{
return default(string);
}
/// <java-name>
/// getPreference
/// </java-name>
[Dot42.DexImport("getPreference", "(Ljava/lang/String;I)I", AccessFlags = 9)]
public static int GetPreference(string key, int dflt) /* MethodBuilder.Create */
{
return default(int);
}
/// <summary>
/// <para><xrefsect><xreftitle>Deprecated</xreftitle><xrefdescription><para>not present in JUnit4.10 </para></xrefdescription></xrefsect></para>
/// </summary>
/// <java-name>
/// inVAJava
/// </java-name>
[Dot42.DexImport("inVAJava", "()Z", AccessFlags = 9)]
public static bool InVAJava() /* MethodBuilder.Create */
{
return default(bool);
}
/// <java-name>
/// getFilteredTrace
/// </java-name>
[Dot42.DexImport("getFilteredTrace", "(Ljava/lang/Throwable;)Ljava/lang/String;", AccessFlags = 9)]
public static string GetFilteredTrace(global::System.Exception exception) /* MethodBuilder.Create */
{
return default(string);
}
/// <java-name>
/// getFilteredTrace
/// </java-name>
[Dot42.DexImport("getFilteredTrace", "(Ljava/lang/String;)Ljava/lang/String;", AccessFlags = 9)]
public static string GetFilteredTrace(string @string) /* MethodBuilder.Create */
{
return default(string);
}
/// <java-name>
/// showStackRaw
/// </java-name>
[Dot42.DexImport("showStackRaw", "()Z", AccessFlags = 12)]
protected internal static bool ShowStackRaw() /* MethodBuilder.Create */
{
return default(bool);
}
/// <java-name>
/// getPreferences
/// </java-name>
protected internal static global::Java.Util.Properties Preferences
{
[Dot42.DexImport("getPreferences", "()Ljava/util/Properties;", AccessFlags = 12)]
get{ return GetPreferences(); }
[Dot42.DexImport("setPreferences", "(Ljava/util/Properties;)V", AccessFlags = 12)]
set{ SetPreferences(value); }
}
/// <summary>
/// <para>Returns the loader to be used.</para><para><xrefsect><xreftitle>Deprecated</xreftitle><xrefdescription><para>not present in JUnit4.10 </para></xrefdescription></xrefsect></para>
/// </summary>
/// <java-name>
/// getLoader
/// </java-name>
public global::Junit.Runner.ITestSuiteLoader Loader
{
[Dot42.DexImport("getLoader", "()Ljunit/runner/TestSuiteLoader;", AccessFlags = 1)]
get{ return GetLoader(); }
}
}
/// <summary>
/// <para>This class defines the current version of JUnit </para>
/// </summary>
/// <java-name>
/// junit/runner/Version
/// </java-name>
[Dot42.DexImport("junit/runner/Version", AccessFlags = 33)]
public partial class Version
/* scope: __dot42__ */
{
[Dot42.DexImport("<init>", "()V", AccessFlags = 0)]
internal Version() /* MethodBuilder.Create */
{
}
/// <java-name>
/// id
/// </java-name>
[Dot42.DexImport("id", "()Ljava/lang/String;", AccessFlags = 9)]
public static string Id() /* MethodBuilder.Create */
{
return default(string);
}
}
}
| 34.067183 | 199 | 0.626517 | [
"Apache-2.0"
] | Dot42Xna/master | Generated/v3.1/Junit.Runner.cs | 13,184 | C# |
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Autofac.Integration.Wcf {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class ServiceHostExtensionsResources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal ServiceHostExtensionsResources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Autofac.Integration.Wcf.ServiceHostExtensionsResources", typeof(ServiceHostExtensionsResources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to The service contract type '{0}' has not been registered in the container..
/// </summary>
internal static string ContractTypeNotRegistered {
get {
return ResourceManager.GetString("ContractTypeNotRegistered", resourceCulture);
}
}
}
}
| 44.657534 | 220 | 0.619939 | [
"MIT"
] | CaioProiete/Autofac.Wcf | src/Autofac.Integration.Wcf/ServiceHostExtensionsResources.Designer.cs | 3,262 | C# |
using System;
namespace NQuery.Symbols.Aggregation
{
public abstract class MinMaxAggregateDefinition : AggregateDefinition
{
private readonly bool _isMin;
protected MinMaxAggregateDefinition(bool isMin)
{
_isMin = isMin;
}
public override string Name
{
get { return _isMin ? @"MIN" : @"MAX"; }
}
public override IAggregatable CreateAggregatable(Type argumentType)
{
return typeof(IComparable).IsAssignableFrom(argumentType)
? new MinMaxAggregatable(argumentType, _isMin)
: null;
}
private sealed class MinMaxAggregatable : IAggregatable
{
private readonly bool _isMin;
public MinMaxAggregatable(Type argumentType, bool isMin)
{
ReturnType = argumentType;
_isMin = isMin;
}
public Type ReturnType { get; }
public IAggregator CreateAggregator()
{
return new MinMaxAggregator(_isMin);
}
}
private sealed class MinMaxAggregator : IAggregator
{
private readonly bool _isMin;
private IComparable _result;
public MinMaxAggregator(bool isMin)
{
_isMin = isMin;
}
public void Initialize()
{
_result = null;
}
public void Accumulate(object value)
{
var comparable = value as IComparable;
if (comparable == null)
return;
if (_result == null)
{
_result = comparable;
}
else
{
var comparison = _result.CompareTo(comparable);
if (_isMin)
{
if (comparison > 0)
_result = comparable;
}
else
{
if (comparison < 0)
_result = comparable;
}
}
}
public object GetResult()
{
return _result;
}
}
}
} | 25.505376 | 75 | 0.44688 | [
"MIT"
] | dallmair/nquery-vnext | src/NQuery/Symbols/Aggregation/MinMaxAggregateDefinition.cs | 2,372 | C# |
/* License
* --------------------------------------------------------------------------------------------------------------------
* This file is part of the AI4E distribution.
* (https://github.com/AI4E/AI4E.Utils)
* Copyright (c) 2018-2019 Andreas Truetschel and contributors.
*
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
* --------------------------------------------------------------------------------------------------------------------
*/
#nullable disable
using System;
using System.ComponentModel;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
namespace AI4E.Utils.Proxying
{
/// <summary>
/// A base type for transparent proxies. This type is not meant to be used directly.
/// </summary>
/// <typeparam name="T">The type of dynamic proxy instance.</typeparam>
#pragma warning disable CA1063
[EditorBrowsable(EditorBrowsableState.Never)]
public class TransparentProxy<T> : DispatchProxy, IProxyInternal
#pragma warning restore CA1063
where T : class
{
internal IProxyInternal Proxy { get; private set; }
#region IProxyInternal
object IProxyInternal.LocalInstance => Proxy.LocalInstance;
Type IProxyInternal.RemoteType => Proxy.RemoteType;
int IProxyInternal.Id => Proxy.Id;
ActivationMode IProxyInternal.ActivationMode => Proxy.ActivationMode;
object[] IProxyInternal.ActivationParamers => Proxy.ActivationParamers;
bool IProxyInternal.IsActivated => Proxy.IsActivated;
void IProxyInternal.Activate(Type objectType)
{
Proxy.Activate(objectType);
}
ValueTask<Type> IProxyInternal.GetObjectTypeAsync(CancellationToken cancellation)
{
return Proxy.GetObjectTypeAsync(cancellation);
}
void IProxyInternal.Register(ProxyHost host, int proxyId, Action unregisterAction)
{
Proxy.Register(host, proxyId, unregisterAction);
}
Task<object> IProxyInternal.ExecuteAsync(MethodInfo method, object[] args)
{
return Proxy.ExecuteAsync(method, args);
}
#pragma warning disable CA1063, CA1033, CA1816
void IDisposable.Dispose()
#pragma warning restore CA1063, CA1033, CA1816
{
Proxy.Dispose();
}
#pragma warning disable CA1063, CA1033, CA1816
ValueTask IAsyncDisposable.DisposeAsync()
#pragma warning restore CA1063, CA1033, CA1816
{
return Proxy.DisposeAsync();
}
#endregion
/// <inheritdoc />
protected override object Invoke(MethodInfo targetMethod, object[] args)
{
if (targetMethod == null)
throw new ArgumentNullException(nameof(targetMethod));
var task = Proxy.ExecuteAsync(targetMethod, args);
if (targetMethod.ReturnType.IsTaskType(out var resultType))
{
// Convert the task to the correct type.
return task.Convert(resultType);
}
else if (typeof(void).IsAssignableFrom(targetMethod.ReturnType))
{
// There is no result => Fire and forget
return null;
}
else
{
// We have to wait for the task's result.
return task.GetResultOrDefault();
}
}
private void Configure(IProxyInternal proxy)
{
Proxy = proxy;
}
internal static T Create(IProxyInternal proxy)
{
object transparentProxy = Create<T, TransparentProxy<T>>();
((TransparentProxy<T>)transparentProxy).Configure(proxy);
return (T)transparentProxy;
}
}
}
#nullable enable
| 35.07971 | 119 | 0.625284 | [
"MIT"
] | AI4E/AI4E.Utils | src/AI4E.Utils.Proxying/TransparentProxy.cs | 4,841 | C# |
/*
* Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the ec2-2016-11-15.normal.json service model.
*/
using System;
using System.Runtime.ExceptionServices;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Net;
using Amazon.EC2.Model;
using Amazon.EC2.Model.Internal.MarshallTransformations;
using Amazon.EC2.Internal;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Auth;
using Amazon.Runtime.Internal.Transform;
namespace Amazon.EC2
{
/// <summary>
/// Implementation for accessing EC2
///
/// Amazon Elastic Compute Cloud
/// <para>
/// Amazon Elastic Compute Cloud (Amazon EC2) provides secure and resizable computing
/// capacity in the AWS cloud. Using Amazon EC2 eliminates the need to invest in hardware
/// up front, so you can develop and deploy applications faster.
/// </para>
///
/// <para>
/// To learn more, see the following resources:
/// </para>
/// <ul> <li>
/// <para>
/// Amazon EC2: <a href="http://aws.amazon.com/ec2">AmazonEC2 product page</a>, <a href="http://aws.amazon.com/documentation/ec2">Amazon
/// EC2 documentation</a>
/// </para>
/// </li> <li>
/// <para>
/// Amazon EBS: <a href="http://aws.amazon.com/ebs">Amazon EBS product page</a>, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonEBS.html">Amazon
/// EBS documentation</a>
/// </para>
/// </li> <li>
/// <para>
/// Amazon VPC: <a href="http://aws.amazon.com/vpc">Amazon VPC product page</a>, <a href="http://aws.amazon.com/documentation/vpc">Amazon
/// VPC documentation</a>
/// </para>
/// </li> <li>
/// <para>
/// AWS VPN: <a href="http://aws.amazon.com/vpn">AWS VPN product page</a>, <a href="http://aws.amazon.com/documentation/vpn">AWS
/// VPN documentation</a>
/// </para>
/// </li> </ul>
/// </summary>
public partial class AmazonEC2Client : AmazonServiceClient, IAmazonEC2
{
private static IServiceMetadata serviceMetadata = new AmazonEC2Metadata();
#region Constructors
#if NETSTANDARD
/// <summary>
/// Constructs AmazonEC2Client with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
/// <code>
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
/// </code>
///
/// </summary>
public AmazonEC2Client()
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonEC2Config()) { }
/// <summary>
/// Constructs AmazonEC2Client with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
/// <code>
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
/// </code>
///
/// </summary>
/// <param name="region">The region to connect.</param>
public AmazonEC2Client(RegionEndpoint region)
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonEC2Config{RegionEndpoint = region}) { }
/// <summary>
/// Constructs AmazonEC2Client with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
/// <code>
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
/// </code>
///
/// </summary>
/// <param name="config">The AmazonEC2Client Configuration Object</param>
public AmazonEC2Client(AmazonEC2Config config)
: base(FallbackCredentialsFactory.GetCredentials(), config) { }
#endif
/// <summary>
/// Constructs AmazonEC2Client with AWS Credentials
/// </summary>
/// <param name="credentials">AWS Credentials</param>
public AmazonEC2Client(AWSCredentials credentials)
: this(credentials, new AmazonEC2Config())
{
}
/// <summary>
/// Constructs AmazonEC2Client with AWS Credentials
/// </summary>
/// <param name="credentials">AWS Credentials</param>
/// <param name="region">The region to connect.</param>
public AmazonEC2Client(AWSCredentials credentials, RegionEndpoint region)
: this(credentials, new AmazonEC2Config{RegionEndpoint = region})
{
}
/// <summary>
/// Constructs AmazonEC2Client with AWS Credentials and an
/// AmazonEC2Client Configuration object.
/// </summary>
/// <param name="credentials">AWS Credentials</param>
/// <param name="clientConfig">The AmazonEC2Client Configuration Object</param>
public AmazonEC2Client(AWSCredentials credentials, AmazonEC2Config clientConfig)
: base(credentials, clientConfig)
{
}
/// <summary>
/// Constructs AmazonEC2Client with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
public AmazonEC2Client(string awsAccessKeyId, string awsSecretAccessKey)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonEC2Config())
{
}
/// <summary>
/// Constructs AmazonEC2Client with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="region">The region to connect.</param>
public AmazonEC2Client(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonEC2Config() {RegionEndpoint=region})
{
}
/// <summary>
/// Constructs AmazonEC2Client with AWS Access Key ID, AWS Secret Key and an
/// AmazonEC2Client Configuration object.
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="clientConfig">The AmazonEC2Client Configuration Object</param>
public AmazonEC2Client(string awsAccessKeyId, string awsSecretAccessKey, AmazonEC2Config clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, clientConfig)
{
}
/// <summary>
/// Constructs AmazonEC2Client with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
public AmazonEC2Client(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonEC2Config())
{
}
/// <summary>
/// Constructs AmazonEC2Client with AWS Access Key ID and AWS Secret Key
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
/// <param name="region">The region to connect.</param>
public AmazonEC2Client(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonEC2Config{RegionEndpoint = region})
{
}
/// <summary>
/// Constructs AmazonEC2Client with AWS Access Key ID, AWS Secret Key and an
/// AmazonEC2Client Configuration object.
/// </summary>
/// <param name="awsAccessKeyId">AWS Access Key ID</param>
/// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
/// <param name="awsSessionToken">AWS Session Token</param>
/// <param name="clientConfig">The AmazonEC2Client Configuration Object</param>
public AmazonEC2Client(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonEC2Config clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig)
{
}
#endregion
#region Overrides
/// <summary>
/// Creates the signer for the service.
/// </summary>
protected override AbstractAWSSigner CreateSigner()
{
return new AWS4Signer();
}
/// <summary>
/// Customizes the runtime pipeline.
/// </summary>
/// <param name="pipeline">Runtime pipeline for the current client.</param>
protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
{
pipeline.AddHandlerBefore<Amazon.Runtime.Internal.Marshaller>(new Amazon.EC2.Internal.AmazonEC2PreMarshallHandler(this.Credentials));
pipeline.AddHandlerAfter<Amazon.Runtime.Internal.Marshaller>(new Amazon.EC2.Internal.AmazonEC2PostMarshallHandler());
pipeline.AddHandlerBefore<Amazon.Runtime.Internal.Unmarshaller>(new Amazon.EC2.Internal.AmazonEC2ResponseHandler());
if(this.Config.RetryMode == RequestRetryMode.Legacy)
{
pipeline.ReplaceHandler<Amazon.Runtime.Internal.RetryHandler>(new Amazon.Runtime.Internal.RetryHandler(new Amazon.EC2.Internal.EC2RetryPolicy(this.Config)));
}
if(this.Config.RetryMode == RequestRetryMode.Standard)
{
pipeline.ReplaceHandler<Amazon.Runtime.Internal.RetryHandler>(new Amazon.Runtime.Internal.RetryHandler(new Amazon.EC2.Internal.EC2StandardRetryPolicy(this.Config)));
}
if(this.Config.RetryMode == RequestRetryMode.Adaptive)
{
pipeline.ReplaceHandler<Amazon.Runtime.Internal.RetryHandler>(new Amazon.Runtime.Internal.RetryHandler(new Amazon.EC2.Internal.EC2AdaptiveRetryPolicy(this.Config)));
}
}
/// <summary>
/// Capture metadata for the service.
/// </summary>
protected override IServiceMetadata ServiceMetadata
{
get
{
return serviceMetadata;
}
}
#endregion
#region Dispose
/// <summary>
/// Disposes the service client.
/// </summary>
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
}
#endregion
#region AcceptReservedInstancesExchangeQuote
internal virtual AcceptReservedInstancesExchangeQuoteResponse AcceptReservedInstancesExchangeQuote(AcceptReservedInstancesExchangeQuoteRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AcceptReservedInstancesExchangeQuoteRequestMarshaller.Instance;
options.ResponseUnmarshaller = AcceptReservedInstancesExchangeQuoteResponseUnmarshaller.Instance;
return Invoke<AcceptReservedInstancesExchangeQuoteResponse>(request, options);
}
/// <summary>
/// Accepts the Convertible Reserved Instance exchange quote described in the <a>GetReservedInstancesExchangeQuote</a>
/// call.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AcceptReservedInstancesExchangeQuote service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AcceptReservedInstancesExchangeQuote service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptReservedInstancesExchangeQuote">REST API Reference for AcceptReservedInstancesExchangeQuote Operation</seealso>
public virtual Task<AcceptReservedInstancesExchangeQuoteResponse> AcceptReservedInstancesExchangeQuoteAsync(AcceptReservedInstancesExchangeQuoteRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AcceptReservedInstancesExchangeQuoteRequestMarshaller.Instance;
options.ResponseUnmarshaller = AcceptReservedInstancesExchangeQuoteResponseUnmarshaller.Instance;
return InvokeAsync<AcceptReservedInstancesExchangeQuoteResponse>(request, options, cancellationToken);
}
#endregion
#region AcceptTransitGatewayPeeringAttachment
internal virtual AcceptTransitGatewayPeeringAttachmentResponse AcceptTransitGatewayPeeringAttachment(AcceptTransitGatewayPeeringAttachmentRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AcceptTransitGatewayPeeringAttachmentRequestMarshaller.Instance;
options.ResponseUnmarshaller = AcceptTransitGatewayPeeringAttachmentResponseUnmarshaller.Instance;
return Invoke<AcceptTransitGatewayPeeringAttachmentResponse>(request, options);
}
/// <summary>
/// Accepts a transit gateway peering attachment request. The peering attachment must
/// be in the <code>pendingAcceptance</code> state.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AcceptTransitGatewayPeeringAttachment service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AcceptTransitGatewayPeeringAttachment service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptTransitGatewayPeeringAttachment">REST API Reference for AcceptTransitGatewayPeeringAttachment Operation</seealso>
public virtual Task<AcceptTransitGatewayPeeringAttachmentResponse> AcceptTransitGatewayPeeringAttachmentAsync(AcceptTransitGatewayPeeringAttachmentRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AcceptTransitGatewayPeeringAttachmentRequestMarshaller.Instance;
options.ResponseUnmarshaller = AcceptTransitGatewayPeeringAttachmentResponseUnmarshaller.Instance;
return InvokeAsync<AcceptTransitGatewayPeeringAttachmentResponse>(request, options, cancellationToken);
}
#endregion
#region AcceptTransitGatewayVpcAttachment
internal virtual AcceptTransitGatewayVpcAttachmentResponse AcceptTransitGatewayVpcAttachment(AcceptTransitGatewayVpcAttachmentRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AcceptTransitGatewayVpcAttachmentRequestMarshaller.Instance;
options.ResponseUnmarshaller = AcceptTransitGatewayVpcAttachmentResponseUnmarshaller.Instance;
return Invoke<AcceptTransitGatewayVpcAttachmentResponse>(request, options);
}
/// <summary>
/// Accepts a request to attach a VPC to a transit gateway.
///
///
/// <para>
/// The VPC attachment must be in the <code>pendingAcceptance</code> state. Use <a>DescribeTransitGatewayVpcAttachments</a>
/// to view your pending VPC attachment requests. Use <a>RejectTransitGatewayVpcAttachment</a>
/// to reject a VPC attachment request.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AcceptTransitGatewayVpcAttachment service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AcceptTransitGatewayVpcAttachment service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptTransitGatewayVpcAttachment">REST API Reference for AcceptTransitGatewayVpcAttachment Operation</seealso>
public virtual Task<AcceptTransitGatewayVpcAttachmentResponse> AcceptTransitGatewayVpcAttachmentAsync(AcceptTransitGatewayVpcAttachmentRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AcceptTransitGatewayVpcAttachmentRequestMarshaller.Instance;
options.ResponseUnmarshaller = AcceptTransitGatewayVpcAttachmentResponseUnmarshaller.Instance;
return InvokeAsync<AcceptTransitGatewayVpcAttachmentResponse>(request, options, cancellationToken);
}
#endregion
#region AcceptVpcEndpointConnections
internal virtual AcceptVpcEndpointConnectionsResponse AcceptVpcEndpointConnections(AcceptVpcEndpointConnectionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AcceptVpcEndpointConnectionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = AcceptVpcEndpointConnectionsResponseUnmarshaller.Instance;
return Invoke<AcceptVpcEndpointConnectionsResponse>(request, options);
}
/// <summary>
/// Accepts one or more interface VPC endpoint connection requests to your VPC endpoint
/// service.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AcceptVpcEndpointConnections service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AcceptVpcEndpointConnections service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptVpcEndpointConnections">REST API Reference for AcceptVpcEndpointConnections Operation</seealso>
public virtual Task<AcceptVpcEndpointConnectionsResponse> AcceptVpcEndpointConnectionsAsync(AcceptVpcEndpointConnectionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AcceptVpcEndpointConnectionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = AcceptVpcEndpointConnectionsResponseUnmarshaller.Instance;
return InvokeAsync<AcceptVpcEndpointConnectionsResponse>(request, options, cancellationToken);
}
#endregion
#region AcceptVpcPeeringConnection
internal virtual AcceptVpcPeeringConnectionResponse AcceptVpcPeeringConnection(AcceptVpcPeeringConnectionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AcceptVpcPeeringConnectionRequestMarshaller.Instance;
options.ResponseUnmarshaller = AcceptVpcPeeringConnectionResponseUnmarshaller.Instance;
return Invoke<AcceptVpcPeeringConnectionResponse>(request, options);
}
/// <summary>
/// Accept a VPC peering connection request. To accept a request, the VPC peering connection
/// must be in the <code>pending-acceptance</code> state, and you must be the owner of
/// the peer VPC. Use <a>DescribeVpcPeeringConnections</a> to view your outstanding VPC
/// peering connection requests.
///
///
/// <para>
/// For an inter-Region VPC peering connection request, you must accept the VPC peering
/// connection in the Region of the accepter VPC.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AcceptVpcPeeringConnection service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AcceptVpcPeeringConnection service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptVpcPeeringConnection">REST API Reference for AcceptVpcPeeringConnection Operation</seealso>
public virtual Task<AcceptVpcPeeringConnectionResponse> AcceptVpcPeeringConnectionAsync(AcceptVpcPeeringConnectionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AcceptVpcPeeringConnectionRequestMarshaller.Instance;
options.ResponseUnmarshaller = AcceptVpcPeeringConnectionResponseUnmarshaller.Instance;
return InvokeAsync<AcceptVpcPeeringConnectionResponse>(request, options, cancellationToken);
}
#endregion
#region AdvertiseByoipCidr
internal virtual AdvertiseByoipCidrResponse AdvertiseByoipCidr(AdvertiseByoipCidrRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AdvertiseByoipCidrRequestMarshaller.Instance;
options.ResponseUnmarshaller = AdvertiseByoipCidrResponseUnmarshaller.Instance;
return Invoke<AdvertiseByoipCidrResponse>(request, options);
}
/// <summary>
/// Advertises an IPv4 or IPv6 address range that is provisioned for use with your AWS
/// resources through bring your own IP addresses (BYOIP).
///
///
/// <para>
/// You can perform this operation at most once every 10 seconds, even if you specify
/// different address ranges each time.
/// </para>
///
/// <para>
/// We recommend that you stop advertising the BYOIP CIDR from other locations when you
/// advertise it from AWS. To minimize down time, you can configure your AWS resources
/// to use an address from a BYOIP CIDR before it is advertised, and then simultaneously
/// stop advertising it from the current location and start advertising it through AWS.
/// </para>
///
/// <para>
/// It can take a few minutes before traffic to the specified addresses starts routing
/// to AWS because of BGP propagation delays.
/// </para>
///
/// <para>
/// To stop advertising the BYOIP CIDR, use <a>WithdrawByoipCidr</a>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AdvertiseByoipCidr service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AdvertiseByoipCidr service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AdvertiseByoipCidr">REST API Reference for AdvertiseByoipCidr Operation</seealso>
public virtual Task<AdvertiseByoipCidrResponse> AdvertiseByoipCidrAsync(AdvertiseByoipCidrRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AdvertiseByoipCidrRequestMarshaller.Instance;
options.ResponseUnmarshaller = AdvertiseByoipCidrResponseUnmarshaller.Instance;
return InvokeAsync<AdvertiseByoipCidrResponse>(request, options, cancellationToken);
}
#endregion
#region AllocateAddress
internal virtual AllocateAddressResponse AllocateAddress()
{
return AllocateAddress(new AllocateAddressRequest());
}
internal virtual AllocateAddressResponse AllocateAddress(AllocateAddressRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AllocateAddressRequestMarshaller.Instance;
options.ResponseUnmarshaller = AllocateAddressResponseUnmarshaller.Instance;
return Invoke<AllocateAddressResponse>(request, options);
}
/// <summary>
/// Allocates an Elastic IP address to your AWS account. After you allocate the Elastic
/// IP address you can associate it with an instance or network interface. After you release
/// an Elastic IP address, it is released to the IP address pool and can be allocated
/// to a different AWS account.
///
///
/// <para>
/// You can allocate an Elastic IP address from an address pool owned by AWS or from an
/// address pool created from a public IPv4 address range that you have brought to AWS
/// for use with your AWS resources using bring your own IP addresses (BYOIP). For more
/// information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html">Bring
/// Your Own IP Addresses (BYOIP)</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
///
/// <para>
/// [EC2-VPC] If you release an Elastic IP address, you might be able to recover it. You
/// cannot recover an Elastic IP address that you released after it is allocated to another
/// AWS account. You cannot recover an Elastic IP address for EC2-Classic. To attempt
/// to recover an Elastic IP address that you released, specify it in this operation.
/// </para>
///
/// <para>
/// An Elastic IP address is for use either in the EC2-Classic platform or in a VPC. By
/// default, you can allocate 5 Elastic IP addresses for EC2-Classic per Region and 5
/// Elastic IP addresses for EC2-VPC per Region.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html">Elastic
/// IP Addresses</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AllocateAddress service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateAddress">REST API Reference for AllocateAddress Operation</seealso>
public virtual Task<AllocateAddressResponse> AllocateAddressAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return AllocateAddressAsync(new AllocateAddressRequest(), cancellationToken);
}
/// <summary>
/// Allocates an Elastic IP address to your AWS account. After you allocate the Elastic
/// IP address you can associate it with an instance or network interface. After you release
/// an Elastic IP address, it is released to the IP address pool and can be allocated
/// to a different AWS account.
///
///
/// <para>
/// You can allocate an Elastic IP address from an address pool owned by AWS or from an
/// address pool created from a public IPv4 address range that you have brought to AWS
/// for use with your AWS resources using bring your own IP addresses (BYOIP). For more
/// information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html">Bring
/// Your Own IP Addresses (BYOIP)</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
///
/// <para>
/// [EC2-VPC] If you release an Elastic IP address, you might be able to recover it. You
/// cannot recover an Elastic IP address that you released after it is allocated to another
/// AWS account. You cannot recover an Elastic IP address for EC2-Classic. To attempt
/// to recover an Elastic IP address that you released, specify it in this operation.
/// </para>
///
/// <para>
/// An Elastic IP address is for use either in the EC2-Classic platform or in a VPC. By
/// default, you can allocate 5 Elastic IP addresses for EC2-Classic per Region and 5
/// Elastic IP addresses for EC2-VPC per Region.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html">Elastic
/// IP Addresses</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AllocateAddress service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AllocateAddress service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateAddress">REST API Reference for AllocateAddress Operation</seealso>
public virtual Task<AllocateAddressResponse> AllocateAddressAsync(AllocateAddressRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AllocateAddressRequestMarshaller.Instance;
options.ResponseUnmarshaller = AllocateAddressResponseUnmarshaller.Instance;
return InvokeAsync<AllocateAddressResponse>(request, options, cancellationToken);
}
#endregion
#region AllocateHosts
internal virtual AllocateHostsResponse AllocateHosts(AllocateHostsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AllocateHostsRequestMarshaller.Instance;
options.ResponseUnmarshaller = AllocateHostsResponseUnmarshaller.Instance;
return Invoke<AllocateHostsResponse>(request, options);
}
/// <summary>
/// Allocates a Dedicated Host to your account. At a minimum, specify the supported instance
/// type or instance family, the Availability Zone in which to allocate the host, and
/// the number of hosts to allocate.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AllocateHosts service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AllocateHosts service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateHosts">REST API Reference for AllocateHosts Operation</seealso>
public virtual Task<AllocateHostsResponse> AllocateHostsAsync(AllocateHostsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AllocateHostsRequestMarshaller.Instance;
options.ResponseUnmarshaller = AllocateHostsResponseUnmarshaller.Instance;
return InvokeAsync<AllocateHostsResponse>(request, options, cancellationToken);
}
#endregion
#region ApplySecurityGroupsToClientVpnTargetNetwork
internal virtual ApplySecurityGroupsToClientVpnTargetNetworkResponse ApplySecurityGroupsToClientVpnTargetNetwork(ApplySecurityGroupsToClientVpnTargetNetworkRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ApplySecurityGroupsToClientVpnTargetNetworkRequestMarshaller.Instance;
options.ResponseUnmarshaller = ApplySecurityGroupsToClientVpnTargetNetworkResponseUnmarshaller.Instance;
return Invoke<ApplySecurityGroupsToClientVpnTargetNetworkResponse>(request, options);
}
/// <summary>
/// Applies a security group to the association between the target network and the Client
/// VPN endpoint. This action replaces the existing security groups with the specified
/// security groups.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ApplySecurityGroupsToClientVpnTargetNetwork service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ApplySecurityGroupsToClientVpnTargetNetwork service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ApplySecurityGroupsToClientVpnTargetNetwork">REST API Reference for ApplySecurityGroupsToClientVpnTargetNetwork Operation</seealso>
public virtual Task<ApplySecurityGroupsToClientVpnTargetNetworkResponse> ApplySecurityGroupsToClientVpnTargetNetworkAsync(ApplySecurityGroupsToClientVpnTargetNetworkRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ApplySecurityGroupsToClientVpnTargetNetworkRequestMarshaller.Instance;
options.ResponseUnmarshaller = ApplySecurityGroupsToClientVpnTargetNetworkResponseUnmarshaller.Instance;
return InvokeAsync<ApplySecurityGroupsToClientVpnTargetNetworkResponse>(request, options, cancellationToken);
}
#endregion
#region AssignIpv6Addresses
internal virtual AssignIpv6AddressesResponse AssignIpv6Addresses(AssignIpv6AddressesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AssignIpv6AddressesRequestMarshaller.Instance;
options.ResponseUnmarshaller = AssignIpv6AddressesResponseUnmarshaller.Instance;
return Invoke<AssignIpv6AddressesResponse>(request, options);
}
/// <summary>
/// Assigns one or more IPv6 addresses to the specified network interface. You can specify
/// one or more specific IPv6 addresses, or you can specify the number of IPv6 addresses
/// to be automatically assigned from within the subnet's IPv6 CIDR block range. You can
/// assign as many IPv6 addresses to a network interface as you can assign private IPv4
/// addresses, and the limit varies per instance type. For information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI">IP
/// Addresses Per Network Interface Per Instance Type</a> in the <i>Amazon Elastic Compute
/// Cloud User Guide</i>.
///
///
/// <para>
/// You must specify either the IPv6 addresses or the IPv6 address count in the request.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AssignIpv6Addresses service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AssignIpv6Addresses service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignIpv6Addresses">REST API Reference for AssignIpv6Addresses Operation</seealso>
public virtual Task<AssignIpv6AddressesResponse> AssignIpv6AddressesAsync(AssignIpv6AddressesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AssignIpv6AddressesRequestMarshaller.Instance;
options.ResponseUnmarshaller = AssignIpv6AddressesResponseUnmarshaller.Instance;
return InvokeAsync<AssignIpv6AddressesResponse>(request, options, cancellationToken);
}
#endregion
#region AssignPrivateIpAddresses
internal virtual AssignPrivateIpAddressesResponse AssignPrivateIpAddresses(AssignPrivateIpAddressesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AssignPrivateIpAddressesRequestMarshaller.Instance;
options.ResponseUnmarshaller = AssignPrivateIpAddressesResponseUnmarshaller.Instance;
return Invoke<AssignPrivateIpAddressesResponse>(request, options);
}
/// <summary>
/// Assigns one or more secondary private IP addresses to the specified network interface.
///
///
/// <para>
/// You can specify one or more specific secondary IP addresses, or you can specify the
/// number of secondary IP addresses to be automatically assigned within the subnet's
/// CIDR block range. The number of secondary IP addresses that you can assign to an instance
/// varies by instance type. For information about instance types, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance
/// Types</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. For more information
/// about Elastic IP addresses, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html">Elastic
/// IP Addresses</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
///
/// <para>
/// When you move a secondary private IP address to another network interface, any Elastic
/// IP address that is associated with the IP address is also moved.
/// </para>
///
/// <para>
/// Remapping an IP address is an asynchronous operation. When you move an IP address
/// from one network interface to another, check <code>network/interfaces/macs/mac/local-ipv4s</code>
/// in the instance metadata to confirm that the remapping is complete.
/// </para>
///
/// <para>
/// You must specify either the IP addresses or the IP address count in the request.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AssignPrivateIpAddresses service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AssignPrivateIpAddresses service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignPrivateIpAddresses">REST API Reference for AssignPrivateIpAddresses Operation</seealso>
public virtual Task<AssignPrivateIpAddressesResponse> AssignPrivateIpAddressesAsync(AssignPrivateIpAddressesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AssignPrivateIpAddressesRequestMarshaller.Instance;
options.ResponseUnmarshaller = AssignPrivateIpAddressesResponseUnmarshaller.Instance;
return InvokeAsync<AssignPrivateIpAddressesResponse>(request, options, cancellationToken);
}
#endregion
#region AssociateAddress
internal virtual AssociateAddressResponse AssociateAddress(AssociateAddressRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AssociateAddressRequestMarshaller.Instance;
options.ResponseUnmarshaller = AssociateAddressResponseUnmarshaller.Instance;
return Invoke<AssociateAddressResponse>(request, options);
}
/// <summary>
/// Associates an Elastic IP address with an instance or a network interface. Before you
/// can use an Elastic IP address, you must allocate it to your account.
///
///
/// <para>
/// An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For
/// more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html">Elastic
/// IP Addresses</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
///
/// <para>
/// [EC2-Classic, VPC in an EC2-VPC-only account] If the Elastic IP address is already
/// associated with a different instance, it is disassociated from that instance and associated
/// with the specified instance. If you associate an Elastic IP address with an instance
/// that has an existing Elastic IP address, the existing address is disassociated from
/// the instance, but remains allocated to your account.
/// </para>
///
/// <para>
/// [VPC in an EC2-Classic account] If you don't specify a private IP address, the Elastic
/// IP address is associated with the primary IP address. If the Elastic IP address is
/// already associated with a different instance or a network interface, you get an error
/// unless you allow reassociation. You cannot associate an Elastic IP address with an
/// instance or network interface that has an existing Elastic IP address.
/// </para>
///
/// <para>
/// You cannot associate an Elastic IP address with an interface in a different network
/// border group.
/// </para>
/// <important>
/// <para>
/// This is an idempotent operation. If you perform the operation more than once, Amazon
/// EC2 doesn't return an error, and you may be charged for each time the Elastic IP address
/// is remapped to the same instance. For more information, see the <i>Elastic IP Addresses</i>
/// section of <a href="http://aws.amazon.com/ec2/pricing/">Amazon EC2 Pricing</a>.
/// </para>
/// </important>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AssociateAddress service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AssociateAddress service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateAddress">REST API Reference for AssociateAddress Operation</seealso>
public virtual Task<AssociateAddressResponse> AssociateAddressAsync(AssociateAddressRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AssociateAddressRequestMarshaller.Instance;
options.ResponseUnmarshaller = AssociateAddressResponseUnmarshaller.Instance;
return InvokeAsync<AssociateAddressResponse>(request, options, cancellationToken);
}
#endregion
#region AssociateClientVpnTargetNetwork
internal virtual AssociateClientVpnTargetNetworkResponse AssociateClientVpnTargetNetwork(AssociateClientVpnTargetNetworkRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AssociateClientVpnTargetNetworkRequestMarshaller.Instance;
options.ResponseUnmarshaller = AssociateClientVpnTargetNetworkResponseUnmarshaller.Instance;
return Invoke<AssociateClientVpnTargetNetworkResponse>(request, options);
}
/// <summary>
/// Associates a target network with a Client VPN endpoint. A target network is a subnet
/// in a VPC. You can associate multiple subnets from the same VPC with a Client VPN endpoint.
/// You can associate only one subnet in each Availability Zone. We recommend that you
/// associate at least two subnets to provide Availability Zone redundancy.
///
///
/// <para>
/// If you specified a VPC when you created the Client VPN endpoint or if you have previous
/// subnet associations, the specified subnet must be in the same VPC. To specify a subnet
/// that's in a different VPC, you must first modify the Client VPN endpoint (<a>ModifyClientVpnEndpoint</a>)
/// and change the VPC that's associated with it.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AssociateClientVpnTargetNetwork service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AssociateClientVpnTargetNetwork service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateClientVpnTargetNetwork">REST API Reference for AssociateClientVpnTargetNetwork Operation</seealso>
public virtual Task<AssociateClientVpnTargetNetworkResponse> AssociateClientVpnTargetNetworkAsync(AssociateClientVpnTargetNetworkRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AssociateClientVpnTargetNetworkRequestMarshaller.Instance;
options.ResponseUnmarshaller = AssociateClientVpnTargetNetworkResponseUnmarshaller.Instance;
return InvokeAsync<AssociateClientVpnTargetNetworkResponse>(request, options, cancellationToken);
}
#endregion
#region AssociateDhcpOptions
internal virtual AssociateDhcpOptionsResponse AssociateDhcpOptions(AssociateDhcpOptionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AssociateDhcpOptionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = AssociateDhcpOptionsResponseUnmarshaller.Instance;
return Invoke<AssociateDhcpOptionsResponse>(request, options);
}
/// <summary>
/// Associates a set of DHCP options (that you've previously created) with the specified
/// VPC, or associates no DHCP options with the VPC.
///
///
/// <para>
/// After you associate the options with the VPC, any existing instances and all new instances
/// that you launch in that VPC use the options. You don't need to restart or relaunch
/// the instances. They automatically pick up the changes within a few hours, depending
/// on how frequently the instance renews its DHCP lease. You can explicitly renew the
/// lease using the operating system on the instance.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html">DHCP
/// Options Sets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AssociateDhcpOptions service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AssociateDhcpOptions service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateDhcpOptions">REST API Reference for AssociateDhcpOptions Operation</seealso>
public virtual Task<AssociateDhcpOptionsResponse> AssociateDhcpOptionsAsync(AssociateDhcpOptionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AssociateDhcpOptionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = AssociateDhcpOptionsResponseUnmarshaller.Instance;
return InvokeAsync<AssociateDhcpOptionsResponse>(request, options, cancellationToken);
}
#endregion
#region AssociateIamInstanceProfile
internal virtual AssociateIamInstanceProfileResponse AssociateIamInstanceProfile(AssociateIamInstanceProfileRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AssociateIamInstanceProfileRequestMarshaller.Instance;
options.ResponseUnmarshaller = AssociateIamInstanceProfileResponseUnmarshaller.Instance;
return Invoke<AssociateIamInstanceProfileResponse>(request, options);
}
/// <summary>
/// Associates an IAM instance profile with a running or stopped instance. You cannot
/// associate more than one IAM instance profile with an instance.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AssociateIamInstanceProfile service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AssociateIamInstanceProfile service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateIamInstanceProfile">REST API Reference for AssociateIamInstanceProfile Operation</seealso>
public virtual Task<AssociateIamInstanceProfileResponse> AssociateIamInstanceProfileAsync(AssociateIamInstanceProfileRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AssociateIamInstanceProfileRequestMarshaller.Instance;
options.ResponseUnmarshaller = AssociateIamInstanceProfileResponseUnmarshaller.Instance;
return InvokeAsync<AssociateIamInstanceProfileResponse>(request, options, cancellationToken);
}
#endregion
#region AssociateRouteTable
internal virtual AssociateRouteTableResponse AssociateRouteTable(AssociateRouteTableRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AssociateRouteTableRequestMarshaller.Instance;
options.ResponseUnmarshaller = AssociateRouteTableResponseUnmarshaller.Instance;
return Invoke<AssociateRouteTableResponse>(request, options);
}
/// <summary>
/// Associates a subnet in your VPC or an internet gateway or virtual private gateway
/// attached to your VPC with a route table in your VPC. This association causes traffic
/// from the subnet or gateway to be routed according to the routes in the route table.
/// The action returns an association ID, which you need in order to disassociate the
/// route table later. A route table can be associated with multiple subnets.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html">Route
/// Tables</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AssociateRouteTable service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AssociateRouteTable service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateRouteTable">REST API Reference for AssociateRouteTable Operation</seealso>
public virtual Task<AssociateRouteTableResponse> AssociateRouteTableAsync(AssociateRouteTableRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AssociateRouteTableRequestMarshaller.Instance;
options.ResponseUnmarshaller = AssociateRouteTableResponseUnmarshaller.Instance;
return InvokeAsync<AssociateRouteTableResponse>(request, options, cancellationToken);
}
#endregion
#region AssociateSubnetCidrBlock
internal virtual AssociateSubnetCidrBlockResponse AssociateSubnetCidrBlock(AssociateSubnetCidrBlockRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AssociateSubnetCidrBlockRequestMarshaller.Instance;
options.ResponseUnmarshaller = AssociateSubnetCidrBlockResponseUnmarshaller.Instance;
return Invoke<AssociateSubnetCidrBlockResponse>(request, options);
}
/// <summary>
/// Associates a CIDR block with your subnet. You can only associate a single IPv6 CIDR
/// block with your subnet. An IPv6 CIDR block must have a prefix length of /64.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AssociateSubnetCidrBlock service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AssociateSubnetCidrBlock service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateSubnetCidrBlock">REST API Reference for AssociateSubnetCidrBlock Operation</seealso>
public virtual Task<AssociateSubnetCidrBlockResponse> AssociateSubnetCidrBlockAsync(AssociateSubnetCidrBlockRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AssociateSubnetCidrBlockRequestMarshaller.Instance;
options.ResponseUnmarshaller = AssociateSubnetCidrBlockResponseUnmarshaller.Instance;
return InvokeAsync<AssociateSubnetCidrBlockResponse>(request, options, cancellationToken);
}
#endregion
#region AssociateTransitGatewayMulticastDomain
internal virtual AssociateTransitGatewayMulticastDomainResponse AssociateTransitGatewayMulticastDomain(AssociateTransitGatewayMulticastDomainRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AssociateTransitGatewayMulticastDomainRequestMarshaller.Instance;
options.ResponseUnmarshaller = AssociateTransitGatewayMulticastDomainResponseUnmarshaller.Instance;
return Invoke<AssociateTransitGatewayMulticastDomainResponse>(request, options);
}
/// <summary>
/// Associates the specified subnets and transit gateway attachments with the specified
/// transit gateway multicast domain.
///
///
/// <para>
/// The transit gateway attachment must be in the available state before you can add a
/// resource. Use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeTransitGatewayAttachments.html">DescribeTransitGatewayAttachments</a>
/// to see the state of the attachment.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AssociateTransitGatewayMulticastDomain service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AssociateTransitGatewayMulticastDomain service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateTransitGatewayMulticastDomain">REST API Reference for AssociateTransitGatewayMulticastDomain Operation</seealso>
public virtual Task<AssociateTransitGatewayMulticastDomainResponse> AssociateTransitGatewayMulticastDomainAsync(AssociateTransitGatewayMulticastDomainRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AssociateTransitGatewayMulticastDomainRequestMarshaller.Instance;
options.ResponseUnmarshaller = AssociateTransitGatewayMulticastDomainResponseUnmarshaller.Instance;
return InvokeAsync<AssociateTransitGatewayMulticastDomainResponse>(request, options, cancellationToken);
}
#endregion
#region AssociateTransitGatewayRouteTable
internal virtual AssociateTransitGatewayRouteTableResponse AssociateTransitGatewayRouteTable(AssociateTransitGatewayRouteTableRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AssociateTransitGatewayRouteTableRequestMarshaller.Instance;
options.ResponseUnmarshaller = AssociateTransitGatewayRouteTableResponseUnmarshaller.Instance;
return Invoke<AssociateTransitGatewayRouteTableResponse>(request, options);
}
/// <summary>
/// Associates the specified attachment with the specified transit gateway route table.
/// You can associate only one route table with an attachment.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AssociateTransitGatewayRouteTable service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AssociateTransitGatewayRouteTable service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateTransitGatewayRouteTable">REST API Reference for AssociateTransitGatewayRouteTable Operation</seealso>
public virtual Task<AssociateTransitGatewayRouteTableResponse> AssociateTransitGatewayRouteTableAsync(AssociateTransitGatewayRouteTableRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AssociateTransitGatewayRouteTableRequestMarshaller.Instance;
options.ResponseUnmarshaller = AssociateTransitGatewayRouteTableResponseUnmarshaller.Instance;
return InvokeAsync<AssociateTransitGatewayRouteTableResponse>(request, options, cancellationToken);
}
#endregion
#region AssociateVpcCidrBlock
internal virtual AssociateVpcCidrBlockResponse AssociateVpcCidrBlock(AssociateVpcCidrBlockRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AssociateVpcCidrBlockRequestMarshaller.Instance;
options.ResponseUnmarshaller = AssociateVpcCidrBlockResponseUnmarshaller.Instance;
return Invoke<AssociateVpcCidrBlockResponse>(request, options);
}
/// <summary>
/// Associates a CIDR block with your VPC. You can associate a secondary IPv4 CIDR block,
/// an Amazon-provided IPv6 CIDR block, or an IPv6 CIDR block from an IPv6 address pool
/// that you provisioned through bring your own IP addresses (<a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html">BYOIP</a>).
/// The IPv6 CIDR block size is fixed at /56.
///
///
/// <para>
/// You must specify one of the following in the request: an IPv4 CIDR block, an IPv6
/// pool, or an Amazon-provided IPv6 CIDR block.
/// </para>
///
/// <para>
/// For more information about associating CIDR blocks with your VPC and applicable restrictions,
/// see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html#VPC_Sizing">VPC
/// and Subnet Sizing</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AssociateVpcCidrBlock service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AssociateVpcCidrBlock service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateVpcCidrBlock">REST API Reference for AssociateVpcCidrBlock Operation</seealso>
public virtual Task<AssociateVpcCidrBlockResponse> AssociateVpcCidrBlockAsync(AssociateVpcCidrBlockRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AssociateVpcCidrBlockRequestMarshaller.Instance;
options.ResponseUnmarshaller = AssociateVpcCidrBlockResponseUnmarshaller.Instance;
return InvokeAsync<AssociateVpcCidrBlockResponse>(request, options, cancellationToken);
}
#endregion
#region AttachClassicLinkVpc
internal virtual AttachClassicLinkVpcResponse AttachClassicLinkVpc(AttachClassicLinkVpcRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AttachClassicLinkVpcRequestMarshaller.Instance;
options.ResponseUnmarshaller = AttachClassicLinkVpcResponseUnmarshaller.Instance;
return Invoke<AttachClassicLinkVpcResponse>(request, options);
}
/// <summary>
/// Links an EC2-Classic instance to a ClassicLink-enabled VPC through one or more of
/// the VPC's security groups. You cannot link an EC2-Classic instance to more than one
/// VPC at a time. You can only link an instance that's in the <code>running</code> state.
/// An instance is automatically unlinked from a VPC when it's stopped - you can link
/// it to the VPC again when you restart it.
///
///
/// <para>
/// After you've linked an instance, you cannot change the VPC security groups that are
/// associated with it. To change the security groups, you must first unlink the instance,
/// and then link it again.
/// </para>
///
/// <para>
/// Linking your instance to a VPC is sometimes referred to as <i>attaching</i> your instance.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AttachClassicLinkVpc service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AttachClassicLinkVpc service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachClassicLinkVpc">REST API Reference for AttachClassicLinkVpc Operation</seealso>
public virtual Task<AttachClassicLinkVpcResponse> AttachClassicLinkVpcAsync(AttachClassicLinkVpcRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AttachClassicLinkVpcRequestMarshaller.Instance;
options.ResponseUnmarshaller = AttachClassicLinkVpcResponseUnmarshaller.Instance;
return InvokeAsync<AttachClassicLinkVpcResponse>(request, options, cancellationToken);
}
#endregion
#region AttachInternetGateway
internal virtual AttachInternetGatewayResponse AttachInternetGateway(AttachInternetGatewayRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AttachInternetGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = AttachInternetGatewayResponseUnmarshaller.Instance;
return Invoke<AttachInternetGatewayResponse>(request, options);
}
/// <summary>
/// Attaches an internet gateway or a virtual private gateway to a VPC, enabling connectivity
/// between the internet and the VPC. For more information about your VPC and internet
/// gateway, see the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/">Amazon
/// Virtual Private Cloud User Guide</a>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AttachInternetGateway service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AttachInternetGateway service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachInternetGateway">REST API Reference for AttachInternetGateway Operation</seealso>
public virtual Task<AttachInternetGatewayResponse> AttachInternetGatewayAsync(AttachInternetGatewayRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AttachInternetGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = AttachInternetGatewayResponseUnmarshaller.Instance;
return InvokeAsync<AttachInternetGatewayResponse>(request, options, cancellationToken);
}
#endregion
#region AttachNetworkInterface
internal virtual AttachNetworkInterfaceResponse AttachNetworkInterface(AttachNetworkInterfaceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AttachNetworkInterfaceRequestMarshaller.Instance;
options.ResponseUnmarshaller = AttachNetworkInterfaceResponseUnmarshaller.Instance;
return Invoke<AttachNetworkInterfaceResponse>(request, options);
}
/// <summary>
/// Attaches a network interface to an instance.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AttachNetworkInterface service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AttachNetworkInterface service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachNetworkInterface">REST API Reference for AttachNetworkInterface Operation</seealso>
public virtual Task<AttachNetworkInterfaceResponse> AttachNetworkInterfaceAsync(AttachNetworkInterfaceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AttachNetworkInterfaceRequestMarshaller.Instance;
options.ResponseUnmarshaller = AttachNetworkInterfaceResponseUnmarshaller.Instance;
return InvokeAsync<AttachNetworkInterfaceResponse>(request, options, cancellationToken);
}
#endregion
#region AttachVolume
internal virtual AttachVolumeResponse AttachVolume(AttachVolumeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AttachVolumeRequestMarshaller.Instance;
options.ResponseUnmarshaller = AttachVolumeResponseUnmarshaller.Instance;
return Invoke<AttachVolumeResponse>(request, options);
}
/// <summary>
/// Attaches an EBS volume to a running or stopped instance and exposes it to the instance
/// with the specified device name.
///
///
/// <para>
/// Encrypted EBS volumes must be attached to instances that support Amazon EBS encryption.
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon
/// EBS Encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
///
/// <para>
/// After you attach an EBS volume, you must make it available. For more information,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html">Making
/// an EBS Volume Available For Use</a>.
/// </para>
///
/// <para>
/// If a volume has an AWS Marketplace product code:
/// </para>
/// <ul> <li>
/// <para>
/// The volume can be attached only to a stopped instance.
/// </para>
/// </li> <li>
/// <para>
/// AWS Marketplace product codes are copied from the volume to the instance.
/// </para>
/// </li> <li>
/// <para>
/// You must be subscribed to the product.
/// </para>
/// </li> <li>
/// <para>
/// The instance type and operating system of the instance must support the product. For
/// example, you can't detach a volume from a Windows instance and attach it to a Linux
/// instance.
/// </para>
/// </li> </ul>
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html">Attaching
/// Amazon EBS Volumes</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AttachVolume service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AttachVolume service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVolume">REST API Reference for AttachVolume Operation</seealso>
public virtual Task<AttachVolumeResponse> AttachVolumeAsync(AttachVolumeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AttachVolumeRequestMarshaller.Instance;
options.ResponseUnmarshaller = AttachVolumeResponseUnmarshaller.Instance;
return InvokeAsync<AttachVolumeResponse>(request, options, cancellationToken);
}
#endregion
#region AttachVpnGateway
internal virtual AttachVpnGatewayResponse AttachVpnGateway(AttachVpnGatewayRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AttachVpnGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = AttachVpnGatewayResponseUnmarshaller.Instance;
return Invoke<AttachVpnGatewayResponse>(request, options);
}
/// <summary>
/// Attaches a virtual private gateway to a VPC. You can attach one virtual private gateway
/// to one VPC at a time.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html">AWS
/// Site-to-Site VPN</a> in the <i>AWS Site-to-Site VPN User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AttachVpnGateway service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AttachVpnGateway service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVpnGateway">REST API Reference for AttachVpnGateway Operation</seealso>
public virtual Task<AttachVpnGatewayResponse> AttachVpnGatewayAsync(AttachVpnGatewayRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AttachVpnGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = AttachVpnGatewayResponseUnmarshaller.Instance;
return InvokeAsync<AttachVpnGatewayResponse>(request, options, cancellationToken);
}
#endregion
#region AuthorizeClientVpnIngress
internal virtual AuthorizeClientVpnIngressResponse AuthorizeClientVpnIngress(AuthorizeClientVpnIngressRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AuthorizeClientVpnIngressRequestMarshaller.Instance;
options.ResponseUnmarshaller = AuthorizeClientVpnIngressResponseUnmarshaller.Instance;
return Invoke<AuthorizeClientVpnIngressResponse>(request, options);
}
/// <summary>
/// Adds an ingress authorization rule to a Client VPN endpoint. Ingress authorization
/// rules act as firewall rules that grant access to networks. You must configure ingress
/// authorization rules to enable clients to access resources in AWS or on-premises networks.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AuthorizeClientVpnIngress service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AuthorizeClientVpnIngress service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeClientVpnIngress">REST API Reference for AuthorizeClientVpnIngress Operation</seealso>
public virtual Task<AuthorizeClientVpnIngressResponse> AuthorizeClientVpnIngressAsync(AuthorizeClientVpnIngressRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AuthorizeClientVpnIngressRequestMarshaller.Instance;
options.ResponseUnmarshaller = AuthorizeClientVpnIngressResponseUnmarshaller.Instance;
return InvokeAsync<AuthorizeClientVpnIngressResponse>(request, options, cancellationToken);
}
#endregion
#region AuthorizeSecurityGroupEgress
internal virtual AuthorizeSecurityGroupEgressResponse AuthorizeSecurityGroupEgress(AuthorizeSecurityGroupEgressRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AuthorizeSecurityGroupEgressRequestMarshaller.Instance;
options.ResponseUnmarshaller = AuthorizeSecurityGroupEgressResponseUnmarshaller.Instance;
return Invoke<AuthorizeSecurityGroupEgressResponse>(request, options);
}
/// <summary>
/// [VPC only] Adds the specified egress rules to a security group for use with a VPC.
///
///
/// <para>
/// An outbound rule permits instances to send traffic to the specified IPv4 or IPv6 CIDR
/// address ranges, or to the instances associated with the specified destination security
/// groups.
/// </para>
///
/// <para>
/// You specify a protocol for each rule (for example, TCP). For the TCP and UDP protocols,
/// you must also specify the destination port or port range. For the ICMP protocol, you
/// must also specify the ICMP type and code. You can use -1 for the type or code to mean
/// all types or all codes.
/// </para>
///
/// <para>
/// Rule changes are propagated to affected instances as quickly as possible. However,
/// a small delay might occur.
/// </para>
///
/// <para>
/// For more information about VPC security group limits, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html">Amazon
/// VPC Limits</a>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AuthorizeSecurityGroupEgress service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AuthorizeSecurityGroupEgress service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupEgress">REST API Reference for AuthorizeSecurityGroupEgress Operation</seealso>
public virtual Task<AuthorizeSecurityGroupEgressResponse> AuthorizeSecurityGroupEgressAsync(AuthorizeSecurityGroupEgressRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AuthorizeSecurityGroupEgressRequestMarshaller.Instance;
options.ResponseUnmarshaller = AuthorizeSecurityGroupEgressResponseUnmarshaller.Instance;
return InvokeAsync<AuthorizeSecurityGroupEgressResponse>(request, options, cancellationToken);
}
#endregion
#region AuthorizeSecurityGroupIngress
internal virtual AuthorizeSecurityGroupIngressResponse AuthorizeSecurityGroupIngress(AuthorizeSecurityGroupIngressRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = AuthorizeSecurityGroupIngressRequestMarshaller.Instance;
options.ResponseUnmarshaller = AuthorizeSecurityGroupIngressResponseUnmarshaller.Instance;
return Invoke<AuthorizeSecurityGroupIngressResponse>(request, options);
}
/// <summary>
/// Adds the specified ingress rules to a security group.
///
///
/// <para>
/// An inbound rule permits instances to receive traffic from the specified IPv4 or IPv6
/// CIDR address ranges, or from the instances associated with the specified destination
/// security groups.
/// </para>
///
/// <para>
/// You specify a protocol for each rule (for example, TCP). For TCP and UDP, you must
/// also specify the destination port or port range. For ICMP/ICMPv6, you must also specify
/// the ICMP/ICMPv6 type and code. You can use -1 to mean all types or all codes.
/// </para>
///
/// <para>
/// Rule changes are propagated to instances within the security group as quickly as possible.
/// However, a small delay might occur.
/// </para>
///
/// <para>
/// For more information about VPC security group limits, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html">Amazon
/// VPC Limits</a>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the AuthorizeSecurityGroupIngress service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the AuthorizeSecurityGroupIngress service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupIngress">REST API Reference for AuthorizeSecurityGroupIngress Operation</seealso>
public virtual Task<AuthorizeSecurityGroupIngressResponse> AuthorizeSecurityGroupIngressAsync(AuthorizeSecurityGroupIngressRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = AuthorizeSecurityGroupIngressRequestMarshaller.Instance;
options.ResponseUnmarshaller = AuthorizeSecurityGroupIngressResponseUnmarshaller.Instance;
return InvokeAsync<AuthorizeSecurityGroupIngressResponse>(request, options, cancellationToken);
}
#endregion
#region BundleInstance
internal virtual BundleInstanceResponse BundleInstance(BundleInstanceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = BundleInstanceRequestMarshaller.Instance;
options.ResponseUnmarshaller = BundleInstanceResponseUnmarshaller.Instance;
return Invoke<BundleInstanceResponse>(request, options);
}
/// <summary>
/// Bundles an Amazon instance store-backed Windows instance.
///
///
/// <para>
/// During bundling, only the root device volume (C:\) is bundled. Data on other instance
/// store volumes is not preserved.
/// </para>
/// <note>
/// <para>
/// This action is not applicable for Linux/Unix instances or Windows instances that are
/// backed by Amazon EBS.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the BundleInstance service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the BundleInstance service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/BundleInstance">REST API Reference for BundleInstance Operation</seealso>
public virtual Task<BundleInstanceResponse> BundleInstanceAsync(BundleInstanceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = BundleInstanceRequestMarshaller.Instance;
options.ResponseUnmarshaller = BundleInstanceResponseUnmarshaller.Instance;
return InvokeAsync<BundleInstanceResponse>(request, options, cancellationToken);
}
#endregion
#region CancelBundleTask
internal virtual CancelBundleTaskResponse CancelBundleTask(CancelBundleTaskRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CancelBundleTaskRequestMarshaller.Instance;
options.ResponseUnmarshaller = CancelBundleTaskResponseUnmarshaller.Instance;
return Invoke<CancelBundleTaskResponse>(request, options);
}
/// <summary>
/// Cancels a bundling operation for an instance store-backed Windows instance.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CancelBundleTask service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CancelBundleTask service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelBundleTask">REST API Reference for CancelBundleTask Operation</seealso>
public virtual Task<CancelBundleTaskResponse> CancelBundleTaskAsync(CancelBundleTaskRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CancelBundleTaskRequestMarshaller.Instance;
options.ResponseUnmarshaller = CancelBundleTaskResponseUnmarshaller.Instance;
return InvokeAsync<CancelBundleTaskResponse>(request, options, cancellationToken);
}
#endregion
#region CancelCapacityReservation
internal virtual CancelCapacityReservationResponse CancelCapacityReservation(CancelCapacityReservationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CancelCapacityReservationRequestMarshaller.Instance;
options.ResponseUnmarshaller = CancelCapacityReservationResponseUnmarshaller.Instance;
return Invoke<CancelCapacityReservationResponse>(request, options);
}
/// <summary>
/// Cancels the specified Capacity Reservation, releases the reserved capacity, and changes
/// the Capacity Reservation's state to <code>cancelled</code>.
///
///
/// <para>
/// Instances running in the reserved capacity continue running until you stop them. Stopped
/// instances that target the Capacity Reservation can no longer launch. Modify these
/// instances to either target a different Capacity Reservation, launch On-Demand Instance
/// capacity, or run in any open Capacity Reservation that has matching attributes and
/// sufficient capacity.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CancelCapacityReservation service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CancelCapacityReservation service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelCapacityReservation">REST API Reference for CancelCapacityReservation Operation</seealso>
public virtual Task<CancelCapacityReservationResponse> CancelCapacityReservationAsync(CancelCapacityReservationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CancelCapacityReservationRequestMarshaller.Instance;
options.ResponseUnmarshaller = CancelCapacityReservationResponseUnmarshaller.Instance;
return InvokeAsync<CancelCapacityReservationResponse>(request, options, cancellationToken);
}
#endregion
#region CancelConversionTask
internal virtual CancelConversionTaskResponse CancelConversionTask(CancelConversionTaskRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CancelConversionTaskRequestMarshaller.Instance;
options.ResponseUnmarshaller = CancelConversionTaskResponseUnmarshaller.Instance;
return Invoke<CancelConversionTaskResponse>(request, options);
}
/// <summary>
/// Cancels an active conversion task. The task can be the import of an instance or volume.
/// The action removes all artifacts of the conversion, including a partially uploaded
/// volume or instance. If the conversion is complete or is in the process of transferring
/// the final disk image, the command fails and returns an exception.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ec2-cli-vmimport-export.html">Importing
/// a Virtual Machine Using the Amazon EC2 CLI</a>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CancelConversionTask service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CancelConversionTask service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelConversionTask">REST API Reference for CancelConversionTask Operation</seealso>
public virtual Task<CancelConversionTaskResponse> CancelConversionTaskAsync(CancelConversionTaskRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CancelConversionTaskRequestMarshaller.Instance;
options.ResponseUnmarshaller = CancelConversionTaskResponseUnmarshaller.Instance;
return InvokeAsync<CancelConversionTaskResponse>(request, options, cancellationToken);
}
#endregion
#region CancelExportTask
internal virtual CancelExportTaskResponse CancelExportTask(CancelExportTaskRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CancelExportTaskRequestMarshaller.Instance;
options.ResponseUnmarshaller = CancelExportTaskResponseUnmarshaller.Instance;
return Invoke<CancelExportTaskResponse>(request, options);
}
/// <summary>
/// Cancels an active export task. The request removes all artifacts of the export, including
/// any partially-created Amazon S3 objects. If the export task is complete or is in the
/// process of transferring the final disk image, the command fails and returns an error.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CancelExportTask service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CancelExportTask service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelExportTask">REST API Reference for CancelExportTask Operation</seealso>
public virtual Task<CancelExportTaskResponse> CancelExportTaskAsync(CancelExportTaskRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CancelExportTaskRequestMarshaller.Instance;
options.ResponseUnmarshaller = CancelExportTaskResponseUnmarshaller.Instance;
return InvokeAsync<CancelExportTaskResponse>(request, options, cancellationToken);
}
#endregion
#region CancelImportTask
internal virtual CancelImportTaskResponse CancelImportTask(CancelImportTaskRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CancelImportTaskRequestMarshaller.Instance;
options.ResponseUnmarshaller = CancelImportTaskResponseUnmarshaller.Instance;
return Invoke<CancelImportTaskResponse>(request, options);
}
/// <summary>
/// Cancels an in-process import virtual machine or import snapshot task.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CancelImportTask service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CancelImportTask service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelImportTask">REST API Reference for CancelImportTask Operation</seealso>
public virtual Task<CancelImportTaskResponse> CancelImportTaskAsync(CancelImportTaskRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CancelImportTaskRequestMarshaller.Instance;
options.ResponseUnmarshaller = CancelImportTaskResponseUnmarshaller.Instance;
return InvokeAsync<CancelImportTaskResponse>(request, options, cancellationToken);
}
#endregion
#region CancelReservedInstancesListing
internal virtual CancelReservedInstancesListingResponse CancelReservedInstancesListing(CancelReservedInstancesListingRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CancelReservedInstancesListingRequestMarshaller.Instance;
options.ResponseUnmarshaller = CancelReservedInstancesListingResponseUnmarshaller.Instance;
return Invoke<CancelReservedInstancesListingResponse>(request, options);
}
/// <summary>
/// Cancels the specified Reserved Instance listing in the Reserved Instance Marketplace.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html">Reserved
/// Instance Marketplace</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CancelReservedInstancesListing service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CancelReservedInstancesListing service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelReservedInstancesListing">REST API Reference for CancelReservedInstancesListing Operation</seealso>
public virtual Task<CancelReservedInstancesListingResponse> CancelReservedInstancesListingAsync(CancelReservedInstancesListingRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CancelReservedInstancesListingRequestMarshaller.Instance;
options.ResponseUnmarshaller = CancelReservedInstancesListingResponseUnmarshaller.Instance;
return InvokeAsync<CancelReservedInstancesListingResponse>(request, options, cancellationToken);
}
#endregion
#region CancelSpotFleetRequests
internal virtual CancelSpotFleetRequestsResponse CancelSpotFleetRequests(CancelSpotFleetRequestsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CancelSpotFleetRequestsRequestMarshaller.Instance;
options.ResponseUnmarshaller = CancelSpotFleetRequestsResponseUnmarshaller.Instance;
return Invoke<CancelSpotFleetRequestsResponse>(request, options);
}
/// <summary>
/// Cancels the specified Spot Fleet requests.
///
///
/// <para>
/// After you cancel a Spot Fleet request, the Spot Fleet launches no new Spot Instances.
/// You must specify whether the Spot Fleet should also terminate its Spot Instances.
/// If you terminate the instances, the Spot Fleet request enters the <code>cancelled_terminating</code>
/// state. Otherwise, the Spot Fleet request enters the <code>cancelled_running</code>
/// state and the instances continue to run until they are interrupted or you terminate
/// them manually.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CancelSpotFleetRequests service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CancelSpotFleetRequests service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotFleetRequests">REST API Reference for CancelSpotFleetRequests Operation</seealso>
public virtual Task<CancelSpotFleetRequestsResponse> CancelSpotFleetRequestsAsync(CancelSpotFleetRequestsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CancelSpotFleetRequestsRequestMarshaller.Instance;
options.ResponseUnmarshaller = CancelSpotFleetRequestsResponseUnmarshaller.Instance;
return InvokeAsync<CancelSpotFleetRequestsResponse>(request, options, cancellationToken);
}
#endregion
#region CancelSpotInstanceRequests
internal virtual CancelSpotInstanceRequestsResponse CancelSpotInstanceRequests(CancelSpotInstanceRequestsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CancelSpotInstanceRequestsRequestMarshaller.Instance;
options.ResponseUnmarshaller = CancelSpotInstanceRequestsResponseUnmarshaller.Instance;
return Invoke<CancelSpotInstanceRequestsResponse>(request, options);
}
/// <summary>
/// Cancels one or more Spot Instance requests.
///
/// <important>
/// <para>
/// Canceling a Spot Instance request does not terminate running Spot Instances associated
/// with the request.
/// </para>
/// </important>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CancelSpotInstanceRequests service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CancelSpotInstanceRequests service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotInstanceRequests">REST API Reference for CancelSpotInstanceRequests Operation</seealso>
public virtual Task<CancelSpotInstanceRequestsResponse> CancelSpotInstanceRequestsAsync(CancelSpotInstanceRequestsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CancelSpotInstanceRequestsRequestMarshaller.Instance;
options.ResponseUnmarshaller = CancelSpotInstanceRequestsResponseUnmarshaller.Instance;
return InvokeAsync<CancelSpotInstanceRequestsResponse>(request, options, cancellationToken);
}
#endregion
#region ConfirmProductInstance
internal virtual ConfirmProductInstanceResponse ConfirmProductInstance(ConfirmProductInstanceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ConfirmProductInstanceRequestMarshaller.Instance;
options.ResponseUnmarshaller = ConfirmProductInstanceResponseUnmarshaller.Instance;
return Invoke<ConfirmProductInstanceResponse>(request, options);
}
/// <summary>
/// Determines whether a product code is associated with an instance. This action can
/// only be used by the owner of the product code. It is useful when a product code owner
/// must verify whether another user's instance is eligible for support.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ConfirmProductInstance service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ConfirmProductInstance service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ConfirmProductInstance">REST API Reference for ConfirmProductInstance Operation</seealso>
public virtual Task<ConfirmProductInstanceResponse> ConfirmProductInstanceAsync(ConfirmProductInstanceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ConfirmProductInstanceRequestMarshaller.Instance;
options.ResponseUnmarshaller = ConfirmProductInstanceResponseUnmarshaller.Instance;
return InvokeAsync<ConfirmProductInstanceResponse>(request, options, cancellationToken);
}
#endregion
#region CopyFpgaImage
internal virtual CopyFpgaImageResponse CopyFpgaImage(CopyFpgaImageRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CopyFpgaImageRequestMarshaller.Instance;
options.ResponseUnmarshaller = CopyFpgaImageResponseUnmarshaller.Instance;
return Invoke<CopyFpgaImageResponse>(request, options);
}
/// <summary>
/// Copies the specified Amazon FPGA Image (AFI) to the current Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CopyFpgaImage service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CopyFpgaImage service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopyFpgaImage">REST API Reference for CopyFpgaImage Operation</seealso>
public virtual Task<CopyFpgaImageResponse> CopyFpgaImageAsync(CopyFpgaImageRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CopyFpgaImageRequestMarshaller.Instance;
options.ResponseUnmarshaller = CopyFpgaImageResponseUnmarshaller.Instance;
return InvokeAsync<CopyFpgaImageResponse>(request, options, cancellationToken);
}
#endregion
#region CopyImage
internal virtual CopyImageResponse CopyImage(CopyImageRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CopyImageRequestMarshaller.Instance;
options.ResponseUnmarshaller = CopyImageResponseUnmarshaller.Instance;
return Invoke<CopyImageResponse>(request, options);
}
/// <summary>
/// Initiates the copy of an AMI from the specified source Region to the current Region.
/// You specify the destination Region by using its endpoint when making the request.
///
///
/// <para>
/// Copies of encrypted backing snapshots for the AMI are encrypted. Copies of unencrypted
/// backing snapshots remain unencrypted, unless you set <code>Encrypted</code> during
/// the copy operation. You cannot create an unencrypted copy of an encrypted backing
/// snapshot.
/// </para>
///
/// <para>
/// For more information about the prerequisites and limits when copying an AMI, see <a
/// href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/CopyingAMIs.html">Copying
/// an AMI</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CopyImage service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CopyImage service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopyImage">REST API Reference for CopyImage Operation</seealso>
public virtual Task<CopyImageResponse> CopyImageAsync(CopyImageRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CopyImageRequestMarshaller.Instance;
options.ResponseUnmarshaller = CopyImageResponseUnmarshaller.Instance;
return InvokeAsync<CopyImageResponse>(request, options, cancellationToken);
}
#endregion
#region CopySnapshot
internal virtual CopySnapshotResponse CopySnapshot(CopySnapshotRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CopySnapshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = CopySnapshotResponseUnmarshaller.Instance;
return Invoke<CopySnapshotResponse>(request, options);
}
/// <summary>
/// Copies a point-in-time snapshot of an EBS volume and stores it in Amazon S3. You can
/// copy the snapshot within the same Region or from one Region to another. You can use
/// the snapshot to create EBS volumes or Amazon Machine Images (AMIs).
///
///
/// <para>
/// Copies of encrypted EBS snapshots remain encrypted. Copies of unencrypted snapshots
/// remain unencrypted, unless you enable encryption for the snapshot copy operation.
/// By default, encrypted snapshot copies use the default AWS Key Management Service (AWS
/// KMS) customer master key (CMK); however, you can specify a different CMK.
/// </para>
///
/// <para>
/// To copy an encrypted snapshot that has been shared from another account, you must
/// have permissions for the CMK used to encrypt the snapshot.
/// </para>
///
/// <para>
/// Snapshots created by copying another snapshot have an arbitrary volume ID that should
/// not be used for any purpose.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-copy-snapshot.html">Copying
/// an Amazon EBS Snapshot</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CopySnapshot service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CopySnapshot service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopySnapshot">REST API Reference for CopySnapshot Operation</seealso>
public virtual Task<CopySnapshotResponse> CopySnapshotAsync(CopySnapshotRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CopySnapshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = CopySnapshotResponseUnmarshaller.Instance;
return InvokeAsync<CopySnapshotResponse>(request, options, cancellationToken);
}
#endregion
#region CreateCapacityReservation
internal virtual CreateCapacityReservationResponse CreateCapacityReservation(CreateCapacityReservationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateCapacityReservationRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateCapacityReservationResponseUnmarshaller.Instance;
return Invoke<CreateCapacityReservationResponse>(request, options);
}
/// <summary>
/// Creates a new Capacity Reservation with the specified attributes.
///
///
/// <para>
/// Capacity Reservations enable you to reserve capacity for your Amazon EC2 instances
/// in a specific Availability Zone for any duration. This gives you the flexibility to
/// selectively add capacity reservations and still get the Regional RI discounts for
/// that usage. By creating Capacity Reservations, you ensure that you always have access
/// to Amazon EC2 capacity when you need it, for as long as you need it. For more information,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-capacity-reservations.html">Capacity
/// Reservations</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
///
/// <para>
/// Your request to create a Capacity Reservation could fail if Amazon EC2 does not have
/// sufficient capacity to fulfill the request. If your request fails due to Amazon EC2
/// capacity constraints, either try again at a later time, try in a different Availability
/// Zone, or request a smaller capacity reservation. If your application is flexible across
/// instance types and sizes, try to create a Capacity Reservation with different instance
/// attributes.
/// </para>
///
/// <para>
/// Your request could also fail if the requested quantity exceeds your On-Demand Instance
/// limit for the selected instance type. If your request fails due to limit constraints,
/// increase your On-Demand Instance limit for the required instance type and try again.
/// For more information about increasing your instance limits, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-resource-limits.html">Amazon
/// EC2 Service Limits</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateCapacityReservation service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateCapacityReservation service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateCapacityReservation">REST API Reference for CreateCapacityReservation Operation</seealso>
public virtual Task<CreateCapacityReservationResponse> CreateCapacityReservationAsync(CreateCapacityReservationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateCapacityReservationRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateCapacityReservationResponseUnmarshaller.Instance;
return InvokeAsync<CreateCapacityReservationResponse>(request, options, cancellationToken);
}
#endregion
#region CreateClientVpnEndpoint
internal virtual CreateClientVpnEndpointResponse CreateClientVpnEndpoint(CreateClientVpnEndpointRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateClientVpnEndpointRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateClientVpnEndpointResponseUnmarshaller.Instance;
return Invoke<CreateClientVpnEndpointResponse>(request, options);
}
/// <summary>
/// Creates a Client VPN endpoint. A Client VPN endpoint is the resource you create and
/// configure to enable and manage client VPN sessions. It is the destination endpoint
/// at which all client VPN sessions are terminated.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateClientVpnEndpoint service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateClientVpnEndpoint service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateClientVpnEndpoint">REST API Reference for CreateClientVpnEndpoint Operation</seealso>
public virtual Task<CreateClientVpnEndpointResponse> CreateClientVpnEndpointAsync(CreateClientVpnEndpointRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateClientVpnEndpointRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateClientVpnEndpointResponseUnmarshaller.Instance;
return InvokeAsync<CreateClientVpnEndpointResponse>(request, options, cancellationToken);
}
#endregion
#region CreateClientVpnRoute
internal virtual CreateClientVpnRouteResponse CreateClientVpnRoute(CreateClientVpnRouteRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateClientVpnRouteRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateClientVpnRouteResponseUnmarshaller.Instance;
return Invoke<CreateClientVpnRouteResponse>(request, options);
}
/// <summary>
/// Adds a route to a network to a Client VPN endpoint. Each Client VPN endpoint has a
/// route table that describes the available destination network routes. Each route in
/// the route table specifies the path for traffic to specific resources or networks.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateClientVpnRoute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateClientVpnRoute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateClientVpnRoute">REST API Reference for CreateClientVpnRoute Operation</seealso>
public virtual Task<CreateClientVpnRouteResponse> CreateClientVpnRouteAsync(CreateClientVpnRouteRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateClientVpnRouteRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateClientVpnRouteResponseUnmarshaller.Instance;
return InvokeAsync<CreateClientVpnRouteResponse>(request, options, cancellationToken);
}
#endregion
#region CreateCustomerGateway
internal virtual CreateCustomerGatewayResponse CreateCustomerGateway(CreateCustomerGatewayRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateCustomerGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateCustomerGatewayResponseUnmarshaller.Instance;
return Invoke<CreateCustomerGatewayResponse>(request, options);
}
/// <summary>
/// Provides information to AWS about your VPN customer gateway device. The customer gateway
/// is the appliance at your end of the VPN connection. (The device on the AWS side of
/// the VPN connection is the virtual private gateway.) You must provide the Internet-routable
/// IP address of the customer gateway's external interface. The IP address must be static
/// and can be behind a device performing network address translation (NAT).
///
///
/// <para>
/// For devices that use Border Gateway Protocol (BGP), you can also provide the device's
/// BGP Autonomous System Number (ASN). You can use an existing ASN assigned to your network.
/// If you don't have an ASN already, you can use a private ASN (in the 64512 - 65534
/// range).
/// </para>
/// <note>
/// <para>
/// Amazon EC2 supports all 2-byte ASN numbers in the range of 1 - 65534, with the exception
/// of 7224, which is reserved in the <code>us-east-1</code> Region, and 9059, which is
/// reserved in the <code>eu-west-1</code> Region.
/// </para>
/// </note>
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html">AWS
/// Site-to-Site VPN</a> in the <i>AWS Site-to-Site VPN User Guide</i>.
/// </para>
/// <important>
/// <para>
/// To create more than one customer gateway with the same VPN type, IP address, and BGP
/// ASN, specify a unique device name for each customer gateway. Identical requests return
/// information about the existing customer gateway and do not create new customer gateways.
/// </para>
/// </important>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateCustomerGateway service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateCustomerGateway service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateCustomerGateway">REST API Reference for CreateCustomerGateway Operation</seealso>
public virtual Task<CreateCustomerGatewayResponse> CreateCustomerGatewayAsync(CreateCustomerGatewayRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateCustomerGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateCustomerGatewayResponseUnmarshaller.Instance;
return InvokeAsync<CreateCustomerGatewayResponse>(request, options, cancellationToken);
}
#endregion
#region CreateDefaultSubnet
internal virtual CreateDefaultSubnetResponse CreateDefaultSubnet(CreateDefaultSubnetRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDefaultSubnetRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDefaultSubnetResponseUnmarshaller.Instance;
return Invoke<CreateDefaultSubnetResponse>(request, options);
}
/// <summary>
/// Creates a default subnet with a size <code>/20</code> IPv4 CIDR block in the specified
/// Availability Zone in your default VPC. You can have only one default subnet per Availability
/// Zone. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/default-vpc.html#create-default-subnet">Creating
/// a Default Subnet</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateDefaultSubnet service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateDefaultSubnet service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultSubnet">REST API Reference for CreateDefaultSubnet Operation</seealso>
public virtual Task<CreateDefaultSubnetResponse> CreateDefaultSubnetAsync(CreateDefaultSubnetRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDefaultSubnetRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDefaultSubnetResponseUnmarshaller.Instance;
return InvokeAsync<CreateDefaultSubnetResponse>(request, options, cancellationToken);
}
#endregion
#region CreateDefaultVpc
internal virtual CreateDefaultVpcResponse CreateDefaultVpc(CreateDefaultVpcRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDefaultVpcRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDefaultVpcResponseUnmarshaller.Instance;
return Invoke<CreateDefaultVpcResponse>(request, options);
}
/// <summary>
/// Creates a default VPC with a size <code>/16</code> IPv4 CIDR block and a default subnet
/// in each Availability Zone. For more information about the components of a default
/// VPC, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/default-vpc.html">Default
/// VPC and Default Subnets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// You cannot specify the components of the default VPC yourself.
///
///
/// <para>
/// If you deleted your previous default VPC, you can create a default VPC. You cannot
/// have more than one default VPC per Region.
/// </para>
///
/// <para>
/// If your account supports EC2-Classic, you cannot use this action to create a default
/// VPC in a Region that supports EC2-Classic. If you want a default VPC in a Region that
/// supports EC2-Classic, see "I really want a default VPC for my existing EC2 account.
/// Is that possible?" in the <a href="http://aws.amazon.com/vpc/faqs/#Default_VPCs">Default
/// VPCs FAQ</a>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateDefaultVpc service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateDefaultVpc service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultVpc">REST API Reference for CreateDefaultVpc Operation</seealso>
public virtual Task<CreateDefaultVpcResponse> CreateDefaultVpcAsync(CreateDefaultVpcRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDefaultVpcRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDefaultVpcResponseUnmarshaller.Instance;
return InvokeAsync<CreateDefaultVpcResponse>(request, options, cancellationToken);
}
#endregion
#region CreateDhcpOptions
internal virtual CreateDhcpOptionsResponse CreateDhcpOptions(CreateDhcpOptionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDhcpOptionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDhcpOptionsResponseUnmarshaller.Instance;
return Invoke<CreateDhcpOptionsResponse>(request, options);
}
/// <summary>
/// Creates a set of DHCP options for your VPC. After creating the set, you must associate
/// it with the VPC, causing all existing and new instances that you launch in the VPC
/// to use this set of DHCP options. The following are the individual DHCP options you
/// can specify. For more information about the options, see <a href="http://www.ietf.org/rfc/rfc2132.txt">RFC
/// 2132</a>.
///
/// <ul> <li>
/// <para>
/// <code>domain-name-servers</code> - The IP addresses of up to four domain name servers,
/// or AmazonProvidedDNS. The default DHCP option set specifies AmazonProvidedDNS. If
/// specifying more than one domain name server, specify the IP addresses in a single
/// parameter, separated by commas. To have your instance receive a custom DNS hostname
/// as specified in <code>domain-name</code>, you must set <code>domain-name-servers</code>
/// to a custom DNS server.
/// </para>
/// </li> <li>
/// <para>
/// <code>domain-name</code> - If you're using AmazonProvidedDNS in <code>us-east-1</code>,
/// specify <code>ec2.internal</code>. If you're using AmazonProvidedDNS in another Region,
/// specify <code>region.compute.internal</code> (for example, <code>ap-northeast-1.compute.internal</code>).
/// Otherwise, specify a domain name (for example, <code>MyCompany.com</code>). This value
/// is used to complete unqualified DNS hostnames. <b>Important</b>: Some Linux operating
/// systems accept multiple domain names separated by spaces. However, Windows and other
/// Linux operating systems treat the value as a single domain, which results in unexpected
/// behavior. If your DHCP options set is associated with a VPC that has instances with
/// multiple operating systems, specify only one domain name.
/// </para>
/// </li> <li>
/// <para>
/// <code>ntp-servers</code> - The IP addresses of up to four Network Time Protocol (NTP)
/// servers.
/// </para>
/// </li> <li>
/// <para>
/// <code>netbios-name-servers</code> - The IP addresses of up to four NetBIOS name servers.
/// </para>
/// </li> <li>
/// <para>
/// <code>netbios-node-type</code> - The NetBIOS node type (1, 2, 4, or 8). We recommend
/// that you specify 2 (broadcast and multicast are not currently supported). For more
/// information about these node types, see <a href="http://www.ietf.org/rfc/rfc2132.txt">RFC
/// 2132</a>.
/// </para>
/// </li> </ul>
/// <para>
/// Your VPC automatically starts out with a set of DHCP options that includes only a
/// DNS server that we provide (AmazonProvidedDNS). If you create a set of options, and
/// if your VPC has an internet gateway, make sure to set the <code>domain-name-servers</code>
/// option either to <code>AmazonProvidedDNS</code> or to a domain name server of your
/// choice. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html">DHCP
/// Options Sets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateDhcpOptions service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateDhcpOptions service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDhcpOptions">REST API Reference for CreateDhcpOptions Operation</seealso>
public virtual Task<CreateDhcpOptionsResponse> CreateDhcpOptionsAsync(CreateDhcpOptionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateDhcpOptionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateDhcpOptionsResponseUnmarshaller.Instance;
return InvokeAsync<CreateDhcpOptionsResponse>(request, options, cancellationToken);
}
#endregion
#region CreateEgressOnlyInternetGateway
internal virtual CreateEgressOnlyInternetGatewayResponse CreateEgressOnlyInternetGateway(CreateEgressOnlyInternetGatewayRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateEgressOnlyInternetGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateEgressOnlyInternetGatewayResponseUnmarshaller.Instance;
return Invoke<CreateEgressOnlyInternetGatewayResponse>(request, options);
}
/// <summary>
/// [IPv6 only] Creates an egress-only internet gateway for your VPC. An egress-only internet
/// gateway is used to enable outbound communication over IPv6 from instances in your
/// VPC to the internet, and prevents hosts outside of your VPC from initiating an IPv6
/// connection with your instance.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateEgressOnlyInternetGateway service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateEgressOnlyInternetGateway service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateEgressOnlyInternetGateway">REST API Reference for CreateEgressOnlyInternetGateway Operation</seealso>
public virtual Task<CreateEgressOnlyInternetGatewayResponse> CreateEgressOnlyInternetGatewayAsync(CreateEgressOnlyInternetGatewayRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateEgressOnlyInternetGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateEgressOnlyInternetGatewayResponseUnmarshaller.Instance;
return InvokeAsync<CreateEgressOnlyInternetGatewayResponse>(request, options, cancellationToken);
}
#endregion
#region CreateFleet
internal virtual CreateFleetResponse CreateFleet(CreateFleetRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateFleetRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateFleetResponseUnmarshaller.Instance;
return Invoke<CreateFleetResponse>(request, options);
}
/// <summary>
/// Launches an EC2 Fleet.
///
///
/// <para>
/// You can create a single EC2 Fleet that includes multiple launch specifications that
/// vary by instance type, AMI, Availability Zone, or subnet.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet.html">Launching
/// an EC2 Fleet</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateFleet service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateFleet service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFleet">REST API Reference for CreateFleet Operation</seealso>
public virtual Task<CreateFleetResponse> CreateFleetAsync(CreateFleetRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateFleetRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateFleetResponseUnmarshaller.Instance;
return InvokeAsync<CreateFleetResponse>(request, options, cancellationToken);
}
#endregion
#region CreateFlowLogs
internal virtual CreateFlowLogsResponse CreateFlowLogs(CreateFlowLogsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateFlowLogsRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateFlowLogsResponseUnmarshaller.Instance;
return Invoke<CreateFlowLogsResponse>(request, options);
}
/// <summary>
/// Creates one or more flow logs to capture information about IP traffic for a specific
/// network interface, subnet, or VPC.
///
///
/// <para>
/// Flow log data for a monitored network interface is recorded as flow log records, which
/// are log events consisting of fields that describe the traffic flow. For more information,
/// see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html#flow-log-records">Flow
/// Log Records</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </para>
///
/// <para>
/// When publishing to CloudWatch Logs, flow log records are published to a log group,
/// and each network interface has a unique log stream in the log group. When publishing
/// to Amazon S3, flow log records for all of the monitored network interfaces are published
/// to a single log file object that is stored in the specified bucket.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html">VPC
/// Flow Logs</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateFlowLogs service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateFlowLogs service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFlowLogs">REST API Reference for CreateFlowLogs Operation</seealso>
public virtual Task<CreateFlowLogsResponse> CreateFlowLogsAsync(CreateFlowLogsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateFlowLogsRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateFlowLogsResponseUnmarshaller.Instance;
return InvokeAsync<CreateFlowLogsResponse>(request, options, cancellationToken);
}
#endregion
#region CreateFpgaImage
internal virtual CreateFpgaImageResponse CreateFpgaImage(CreateFpgaImageRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateFpgaImageRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateFpgaImageResponseUnmarshaller.Instance;
return Invoke<CreateFpgaImageResponse>(request, options);
}
/// <summary>
/// Creates an Amazon FPGA Image (AFI) from the specified design checkpoint (DCP).
///
///
/// <para>
/// The create operation is asynchronous. To verify that the AFI is ready for use, check
/// the output logs.
/// </para>
///
/// <para>
/// An AFI contains the FPGA bitstream that is ready to download to an FPGA. You can securely
/// deploy an AFI on multiple FPGA-accelerated instances. For more information, see the
/// <a href="https://github.com/aws/aws-fpga/">AWS FPGA Hardware Development Kit</a>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateFpgaImage service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateFpgaImage service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFpgaImage">REST API Reference for CreateFpgaImage Operation</seealso>
public virtual Task<CreateFpgaImageResponse> CreateFpgaImageAsync(CreateFpgaImageRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateFpgaImageRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateFpgaImageResponseUnmarshaller.Instance;
return InvokeAsync<CreateFpgaImageResponse>(request, options, cancellationToken);
}
#endregion
#region CreateImage
internal virtual CreateImageResponse CreateImage(CreateImageRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateImageRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateImageResponseUnmarshaller.Instance;
return Invoke<CreateImageResponse>(request, options);
}
/// <summary>
/// Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance that is either
/// running or stopped.
///
///
/// <para>
/// If you customized your instance with instance store volumes or EBS volumes in addition
/// to the root device volume, the new AMI contains block device mapping information for
/// those volumes. When you launch an instance from this new AMI, the instance automatically
/// launches with those additional volumes.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html">Creating
/// Amazon EBS-Backed Linux AMIs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateImage service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateImage service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateImage">REST API Reference for CreateImage Operation</seealso>
public virtual Task<CreateImageResponse> CreateImageAsync(CreateImageRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateImageRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateImageResponseUnmarshaller.Instance;
return InvokeAsync<CreateImageResponse>(request, options, cancellationToken);
}
#endregion
#region CreateInstanceExportTask
internal virtual CreateInstanceExportTaskResponse CreateInstanceExportTask(CreateInstanceExportTaskRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateInstanceExportTaskRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateInstanceExportTaskResponseUnmarshaller.Instance;
return Invoke<CreateInstanceExportTaskResponse>(request, options);
}
/// <summary>
/// Exports a running or stopped instance to an S3 bucket.
///
///
/// <para>
/// For information about the supported operating systems, image formats, and known limitations
/// for the types of instances you can export, see <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport.html">Exporting
/// an Instance as a VM Using VM Import/Export</a> in the <i>VM Import/Export User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateInstanceExportTask service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateInstanceExportTask service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInstanceExportTask">REST API Reference for CreateInstanceExportTask Operation</seealso>
public virtual Task<CreateInstanceExportTaskResponse> CreateInstanceExportTaskAsync(CreateInstanceExportTaskRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateInstanceExportTaskRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateInstanceExportTaskResponseUnmarshaller.Instance;
return InvokeAsync<CreateInstanceExportTaskResponse>(request, options, cancellationToken);
}
#endregion
#region CreateInternetGateway
internal virtual CreateInternetGatewayResponse CreateInternetGateway()
{
return CreateInternetGateway(new CreateInternetGatewayRequest());
}
internal virtual CreateInternetGatewayResponse CreateInternetGateway(CreateInternetGatewayRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateInternetGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateInternetGatewayResponseUnmarshaller.Instance;
return Invoke<CreateInternetGatewayResponse>(request, options);
}
/// <summary>
/// Creates an internet gateway for use with a VPC. After creating the internet gateway,
/// you attach it to a VPC using <a>AttachInternetGateway</a>.
///
///
/// <para>
/// For more information about your VPC and internet gateway, see the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/">Amazon
/// Virtual Private Cloud User Guide</a>.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateInternetGateway service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInternetGateway">REST API Reference for CreateInternetGateway Operation</seealso>
public virtual Task<CreateInternetGatewayResponse> CreateInternetGatewayAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return CreateInternetGatewayAsync(new CreateInternetGatewayRequest(), cancellationToken);
}
/// <summary>
/// Creates an internet gateway for use with a VPC. After creating the internet gateway,
/// you attach it to a VPC using <a>AttachInternetGateway</a>.
///
///
/// <para>
/// For more information about your VPC and internet gateway, see the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/">Amazon
/// Virtual Private Cloud User Guide</a>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateInternetGateway service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateInternetGateway service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInternetGateway">REST API Reference for CreateInternetGateway Operation</seealso>
public virtual Task<CreateInternetGatewayResponse> CreateInternetGatewayAsync(CreateInternetGatewayRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateInternetGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateInternetGatewayResponseUnmarshaller.Instance;
return InvokeAsync<CreateInternetGatewayResponse>(request, options, cancellationToken);
}
#endregion
#region CreateKeyPair
internal virtual CreateKeyPairResponse CreateKeyPair(CreateKeyPairRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateKeyPairRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateKeyPairResponseUnmarshaller.Instance;
return Invoke<CreateKeyPairResponse>(request, options);
}
/// <summary>
/// Creates a 2048-bit RSA key pair with the specified name. Amazon EC2 stores the public
/// key and displays the private key for you to save to a file. The private key is returned
/// as an unencrypted PEM encoded PKCS#1 private key. If a key with the specified name
/// already exists, Amazon EC2 returns an error.
///
///
/// <para>
/// You can have up to five thousand key pairs per Region.
/// </para>
///
/// <para>
/// The key pair returned to you is available only in the Region in which you create it.
/// If you prefer, you can create your own key pair using a third-party tool and upload
/// it to any Region using <a>ImportKeyPair</a>.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html">Key
/// Pairs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateKeyPair service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateKeyPair service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateKeyPair">REST API Reference for CreateKeyPair Operation</seealso>
public virtual Task<CreateKeyPairResponse> CreateKeyPairAsync(CreateKeyPairRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateKeyPairRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateKeyPairResponseUnmarshaller.Instance;
return InvokeAsync<CreateKeyPairResponse>(request, options, cancellationToken);
}
#endregion
#region CreateLaunchTemplate
internal virtual CreateLaunchTemplateResponse CreateLaunchTemplate(CreateLaunchTemplateRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateLaunchTemplateRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateLaunchTemplateResponseUnmarshaller.Instance;
return Invoke<CreateLaunchTemplateResponse>(request, options);
}
/// <summary>
/// Creates a launch template. A launch template contains the parameters to launch an
/// instance. When you launch an instance using <a>RunInstances</a>, you can specify a
/// launch template instead of providing the launch parameters in the request. For more
/// information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html">Launching
/// an instance from a launch template</a>in the <i>Amazon Elastic Compute Cloud User
/// Guide</i>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateLaunchTemplate service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateLaunchTemplate service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateLaunchTemplate">REST API Reference for CreateLaunchTemplate Operation</seealso>
public virtual Task<CreateLaunchTemplateResponse> CreateLaunchTemplateAsync(CreateLaunchTemplateRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateLaunchTemplateRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateLaunchTemplateResponseUnmarshaller.Instance;
return InvokeAsync<CreateLaunchTemplateResponse>(request, options, cancellationToken);
}
#endregion
#region CreateLaunchTemplateVersion
internal virtual CreateLaunchTemplateVersionResponse CreateLaunchTemplateVersion(CreateLaunchTemplateVersionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateLaunchTemplateVersionRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateLaunchTemplateVersionResponseUnmarshaller.Instance;
return Invoke<CreateLaunchTemplateVersionResponse>(request, options);
}
/// <summary>
/// Creates a new version for a launch template. You can specify an existing version of
/// launch template from which to base the new version.
///
///
/// <para>
/// Launch template versions are numbered in the order in which they are created. You
/// cannot specify, change, or replace the numbering of launch template versions.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#manage-launch-template-versions">Managing
/// launch template versions</a>in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateLaunchTemplateVersion service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateLaunchTemplateVersion service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateLaunchTemplateVersion">REST API Reference for CreateLaunchTemplateVersion Operation</seealso>
public virtual Task<CreateLaunchTemplateVersionResponse> CreateLaunchTemplateVersionAsync(CreateLaunchTemplateVersionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateLaunchTemplateVersionRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateLaunchTemplateVersionResponseUnmarshaller.Instance;
return InvokeAsync<CreateLaunchTemplateVersionResponse>(request, options, cancellationToken);
}
#endregion
#region CreateLocalGatewayRoute
internal virtual CreateLocalGatewayRouteResponse CreateLocalGatewayRoute(CreateLocalGatewayRouteRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateLocalGatewayRouteRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateLocalGatewayRouteResponseUnmarshaller.Instance;
return Invoke<CreateLocalGatewayRouteResponse>(request, options);
}
/// <summary>
/// Creates a static route for the specified local gateway route table.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateLocalGatewayRoute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateLocalGatewayRoute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateLocalGatewayRoute">REST API Reference for CreateLocalGatewayRoute Operation</seealso>
public virtual Task<CreateLocalGatewayRouteResponse> CreateLocalGatewayRouteAsync(CreateLocalGatewayRouteRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateLocalGatewayRouteRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateLocalGatewayRouteResponseUnmarshaller.Instance;
return InvokeAsync<CreateLocalGatewayRouteResponse>(request, options, cancellationToken);
}
#endregion
#region CreateLocalGatewayRouteTableVpcAssociation
internal virtual CreateLocalGatewayRouteTableVpcAssociationResponse CreateLocalGatewayRouteTableVpcAssociation(CreateLocalGatewayRouteTableVpcAssociationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateLocalGatewayRouteTableVpcAssociationRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateLocalGatewayRouteTableVpcAssociationResponseUnmarshaller.Instance;
return Invoke<CreateLocalGatewayRouteTableVpcAssociationResponse>(request, options);
}
/// <summary>
/// Associates the specified VPC with the specified local gateway route table.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateLocalGatewayRouteTableVpcAssociation service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateLocalGatewayRouteTableVpcAssociation service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateLocalGatewayRouteTableVpcAssociation">REST API Reference for CreateLocalGatewayRouteTableVpcAssociation Operation</seealso>
public virtual Task<CreateLocalGatewayRouteTableVpcAssociationResponse> CreateLocalGatewayRouteTableVpcAssociationAsync(CreateLocalGatewayRouteTableVpcAssociationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateLocalGatewayRouteTableVpcAssociationRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateLocalGatewayRouteTableVpcAssociationResponseUnmarshaller.Instance;
return InvokeAsync<CreateLocalGatewayRouteTableVpcAssociationResponse>(request, options, cancellationToken);
}
#endregion
#region CreateNatGateway
internal virtual CreateNatGatewayResponse CreateNatGateway(CreateNatGatewayRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateNatGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateNatGatewayResponseUnmarshaller.Instance;
return Invoke<CreateNatGatewayResponse>(request, options);
}
/// <summary>
/// Creates a NAT gateway in the specified public subnet. This action creates a network
/// interface in the specified subnet with a private IP address from the IP address range
/// of the subnet. Internet-bound traffic from a private subnet can be routed to the NAT
/// gateway, therefore enabling instances in the private subnet to connect to the internet.
/// For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html">NAT
/// Gateways</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateNatGateway service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateNatGateway service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNatGateway">REST API Reference for CreateNatGateway Operation</seealso>
public virtual Task<CreateNatGatewayResponse> CreateNatGatewayAsync(CreateNatGatewayRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateNatGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateNatGatewayResponseUnmarshaller.Instance;
return InvokeAsync<CreateNatGatewayResponse>(request, options, cancellationToken);
}
#endregion
#region CreateNetworkAcl
internal virtual CreateNetworkAclResponse CreateNetworkAcl(CreateNetworkAclRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateNetworkAclRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateNetworkAclResponseUnmarshaller.Instance;
return Invoke<CreateNetworkAclResponse>(request, options);
}
/// <summary>
/// Creates a network ACL in a VPC. Network ACLs provide an optional layer of security
/// (in addition to security groups) for the instances in your VPC.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_ACLs.html">Network
/// ACLs</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateNetworkAcl service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateNetworkAcl service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAcl">REST API Reference for CreateNetworkAcl Operation</seealso>
public virtual Task<CreateNetworkAclResponse> CreateNetworkAclAsync(CreateNetworkAclRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateNetworkAclRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateNetworkAclResponseUnmarshaller.Instance;
return InvokeAsync<CreateNetworkAclResponse>(request, options, cancellationToken);
}
#endregion
#region CreateNetworkAclEntry
internal virtual CreateNetworkAclEntryResponse CreateNetworkAclEntry(CreateNetworkAclEntryRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateNetworkAclEntryRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateNetworkAclEntryResponseUnmarshaller.Instance;
return Invoke<CreateNetworkAclEntryResponse>(request, options);
}
/// <summary>
/// Creates an entry (a rule) in a network ACL with the specified rule number. Each network
/// ACL has a set of numbered ingress rules and a separate set of numbered egress rules.
/// When determining whether a packet should be allowed in or out of a subnet associated
/// with the ACL, we process the entries in the ACL according to the rule numbers, in
/// ascending order. Each network ACL has a set of ingress rules and a separate set of
/// egress rules.
///
///
/// <para>
/// We recommend that you leave room between the rule numbers (for example, 100, 110,
/// 120, ...), and not number them one right after the other (for example, 101, 102, 103,
/// ...). This makes it easier to add a rule between existing ones without having to renumber
/// the rules.
/// </para>
///
/// <para>
/// After you add an entry, you can't modify it; you must either replace it, or create
/// an entry and delete the old one.
/// </para>
///
/// <para>
/// For more information about network ACLs, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_ACLs.html">Network
/// ACLs</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateNetworkAclEntry service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateNetworkAclEntry service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAclEntry">REST API Reference for CreateNetworkAclEntry Operation</seealso>
public virtual Task<CreateNetworkAclEntryResponse> CreateNetworkAclEntryAsync(CreateNetworkAclEntryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateNetworkAclEntryRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateNetworkAclEntryResponseUnmarshaller.Instance;
return InvokeAsync<CreateNetworkAclEntryResponse>(request, options, cancellationToken);
}
#endregion
#region CreateNetworkInterface
internal virtual CreateNetworkInterfaceResponse CreateNetworkInterface(CreateNetworkInterfaceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateNetworkInterfaceRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateNetworkInterfaceResponseUnmarshaller.Instance;
return Invoke<CreateNetworkInterfaceResponse>(request, options);
}
/// <summary>
/// Creates a network interface in the specified subnet.
///
///
/// <para>
/// For more information about network interfaces, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html">Elastic
/// Network Interfaces</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateNetworkInterface service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateNetworkInterface service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterface">REST API Reference for CreateNetworkInterface Operation</seealso>
public virtual Task<CreateNetworkInterfaceResponse> CreateNetworkInterfaceAsync(CreateNetworkInterfaceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateNetworkInterfaceRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateNetworkInterfaceResponseUnmarshaller.Instance;
return InvokeAsync<CreateNetworkInterfaceResponse>(request, options, cancellationToken);
}
#endregion
#region CreateNetworkInterfacePermission
internal virtual CreateNetworkInterfacePermissionResponse CreateNetworkInterfacePermission(CreateNetworkInterfacePermissionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateNetworkInterfacePermissionRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateNetworkInterfacePermissionResponseUnmarshaller.Instance;
return Invoke<CreateNetworkInterfacePermissionResponse>(request, options);
}
/// <summary>
/// Grants an AWS-authorized account permission to attach the specified network interface
/// to an instance in their account.
///
///
/// <para>
/// You can grant permission to a single AWS account only, and only one account at a time.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateNetworkInterfacePermission service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateNetworkInterfacePermission service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterfacePermission">REST API Reference for CreateNetworkInterfacePermission Operation</seealso>
public virtual Task<CreateNetworkInterfacePermissionResponse> CreateNetworkInterfacePermissionAsync(CreateNetworkInterfacePermissionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateNetworkInterfacePermissionRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateNetworkInterfacePermissionResponseUnmarshaller.Instance;
return InvokeAsync<CreateNetworkInterfacePermissionResponse>(request, options, cancellationToken);
}
#endregion
#region CreatePlacementGroup
internal virtual CreatePlacementGroupResponse CreatePlacementGroup(CreatePlacementGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreatePlacementGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreatePlacementGroupResponseUnmarshaller.Instance;
return Invoke<CreatePlacementGroupResponse>(request, options);
}
/// <summary>
/// Creates a placement group in which to launch instances. The strategy of the placement
/// group determines how the instances are organized within the group.
///
///
/// <para>
/// A <code>cluster</code> placement group is a logical grouping of instances within a
/// single Availability Zone that benefit from low network latency, high network throughput.
/// A <code>spread</code> placement group places instances on distinct hardware. A <code>partition</code>
/// placement group places groups of instances in different partitions, where instances
/// in one partition do not share the same hardware with instances in another partition.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html">Placement
/// Groups</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreatePlacementGroup service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreatePlacementGroup service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreatePlacementGroup">REST API Reference for CreatePlacementGroup Operation</seealso>
public virtual Task<CreatePlacementGroupResponse> CreatePlacementGroupAsync(CreatePlacementGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreatePlacementGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreatePlacementGroupResponseUnmarshaller.Instance;
return InvokeAsync<CreatePlacementGroupResponse>(request, options, cancellationToken);
}
#endregion
#region CreateReservedInstancesListing
internal virtual CreateReservedInstancesListingResponse CreateReservedInstancesListing(CreateReservedInstancesListingRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateReservedInstancesListingRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateReservedInstancesListingResponseUnmarshaller.Instance;
return Invoke<CreateReservedInstancesListingResponse>(request, options);
}
/// <summary>
/// Creates a listing for Amazon EC2 Standard Reserved Instances to be sold in the Reserved
/// Instance Marketplace. You can submit one Standard Reserved Instance listing at a time.
/// To get a list of your Standard Reserved Instances, you can use the <a>DescribeReservedInstances</a>
/// operation.
///
/// <note>
/// <para>
/// Only Standard Reserved Instances can be sold in the Reserved Instance Marketplace.
/// Convertible Reserved Instances cannot be sold.
/// </para>
/// </note>
/// <para>
/// The Reserved Instance Marketplace matches sellers who want to resell Standard Reserved
/// Instance capacity that they no longer need with buyers who want to purchase additional
/// capacity. Reserved Instances bought and sold through the Reserved Instance Marketplace
/// work like any other Reserved Instances.
/// </para>
///
/// <para>
/// To sell your Standard Reserved Instances, you must first register as a seller in the
/// Reserved Instance Marketplace. After completing the registration process, you can
/// create a Reserved Instance Marketplace listing of some or all of your Standard Reserved
/// Instances, and specify the upfront price to receive for them. Your Standard Reserved
/// Instance listings then become available for purchase. To view the details of your
/// Standard Reserved Instance listing, you can use the <a>DescribeReservedInstancesListings</a>
/// operation.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html">Reserved
/// Instance Marketplace</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateReservedInstancesListing service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateReservedInstancesListing service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateReservedInstancesListing">REST API Reference for CreateReservedInstancesListing Operation</seealso>
public virtual Task<CreateReservedInstancesListingResponse> CreateReservedInstancesListingAsync(CreateReservedInstancesListingRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateReservedInstancesListingRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateReservedInstancesListingResponseUnmarshaller.Instance;
return InvokeAsync<CreateReservedInstancesListingResponse>(request, options, cancellationToken);
}
#endregion
#region CreateRoute
internal virtual CreateRouteResponse CreateRoute(CreateRouteRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateRouteRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateRouteResponseUnmarshaller.Instance;
return Invoke<CreateRouteResponse>(request, options);
}
/// <summary>
/// Creates a route in a route table within a VPC.
///
///
/// <para>
/// You must specify one of the following targets: internet gateway or virtual private
/// gateway, NAT instance, NAT gateway, VPC peering connection, network interface, egress-only
/// internet gateway, or transit gateway.
/// </para>
///
/// <para>
/// When determining how to route traffic, we use the route with the most specific match.
/// For example, traffic is destined for the IPv4 address <code>192.0.2.3</code>, and
/// the route table includes the following two IPv4 routes:
/// </para>
/// <ul> <li>
/// <para>
/// <code>192.0.2.0/24</code> (goes to some target A)
/// </para>
/// </li> <li>
/// <para>
/// <code>192.0.2.0/28</code> (goes to some target B)
/// </para>
/// </li> </ul>
/// <para>
/// Both routes apply to the traffic destined for <code>192.0.2.3</code>. However, the
/// second route in the list covers a smaller number of IP addresses and is therefore
/// more specific, so we use that route to determine where to target the traffic.
/// </para>
///
/// <para>
/// For more information about route tables, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html">Route
/// Tables</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateRoute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateRoute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRoute">REST API Reference for CreateRoute Operation</seealso>
public virtual Task<CreateRouteResponse> CreateRouteAsync(CreateRouteRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateRouteRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateRouteResponseUnmarshaller.Instance;
return InvokeAsync<CreateRouteResponse>(request, options, cancellationToken);
}
#endregion
#region CreateRouteTable
internal virtual CreateRouteTableResponse CreateRouteTable(CreateRouteTableRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateRouteTableRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateRouteTableResponseUnmarshaller.Instance;
return Invoke<CreateRouteTableResponse>(request, options);
}
/// <summary>
/// Creates a route table for the specified VPC. After you create a route table, you can
/// add routes and associate the table with a subnet.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html">Route
/// Tables</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateRouteTable service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateRouteTable service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRouteTable">REST API Reference for CreateRouteTable Operation</seealso>
public virtual Task<CreateRouteTableResponse> CreateRouteTableAsync(CreateRouteTableRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateRouteTableRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateRouteTableResponseUnmarshaller.Instance;
return InvokeAsync<CreateRouteTableResponse>(request, options, cancellationToken);
}
#endregion
#region CreateSecurityGroup
internal virtual CreateSecurityGroupResponse CreateSecurityGroup(CreateSecurityGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateSecurityGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateSecurityGroupResponseUnmarshaller.Instance;
return Invoke<CreateSecurityGroupResponse>(request, options);
}
/// <summary>
/// Creates a security group.
///
///
/// <para>
/// A security group acts as a virtual firewall for your instance to control inbound and
/// outbound traffic. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html">Amazon
/// EC2 Security Groups</a> in the <i>Amazon Elastic Compute Cloud User Guide</i> and
/// <a href="https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html">Security
/// Groups for Your VPC</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </para>
///
/// <para>
/// When you create a security group, you specify a friendly name of your choice. You
/// can have a security group for use in EC2-Classic with the same name as a security
/// group for use in a VPC. However, you can't have two security groups for use in EC2-Classic
/// with the same name or two security groups for use in a VPC with the same name.
/// </para>
///
/// <para>
/// You have a default security group for use in EC2-Classic and a default security group
/// for use in your VPC. If you don't specify a security group when you launch an instance,
/// the instance is launched into the appropriate default security group. A default security
/// group includes a default rule that grants instances unrestricted network access to
/// each other.
/// </para>
///
/// <para>
/// You can add or remove rules from your security groups using <a>AuthorizeSecurityGroupIngress</a>,
/// <a>AuthorizeSecurityGroupEgress</a>, <a>RevokeSecurityGroupIngress</a>, and <a>RevokeSecurityGroupEgress</a>.
/// </para>
///
/// <para>
/// For more information about VPC security group limits, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html">Amazon
/// VPC Limits</a>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateSecurityGroup service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateSecurityGroup service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSecurityGroup">REST API Reference for CreateSecurityGroup Operation</seealso>
public virtual Task<CreateSecurityGroupResponse> CreateSecurityGroupAsync(CreateSecurityGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateSecurityGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateSecurityGroupResponseUnmarshaller.Instance;
return InvokeAsync<CreateSecurityGroupResponse>(request, options, cancellationToken);
}
#endregion
#region CreateSnapshot
internal virtual CreateSnapshotResponse CreateSnapshot(CreateSnapshotRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateSnapshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateSnapshotResponseUnmarshaller.Instance;
return Invoke<CreateSnapshotResponse>(request, options);
}
/// <summary>
/// Creates a snapshot of an EBS volume and stores it in Amazon S3. You can use snapshots
/// for backups, to make copies of EBS volumes, and to save data before shutting down
/// an instance.
///
///
/// <para>
/// When a snapshot is created, any AWS Marketplace product codes that are associated
/// with the source volume are propagated to the snapshot.
/// </para>
///
/// <para>
/// You can take a snapshot of an attached volume that is in use. However, snapshots only
/// capture data that has been written to your EBS volume at the time the snapshot command
/// is issued; this may exclude any data that has been cached by any applications or the
/// operating system. If you can pause any file systems on the volume long enough to take
/// a snapshot, your snapshot should be complete. However, if you cannot pause all file
/// writes to the volume, you should unmount the volume from within the instance, issue
/// the snapshot command, and then remount the volume to ensure a consistent and complete
/// snapshot. You may remount and use your volume while the snapshot status is <code>pending</code>.
/// </para>
///
/// <para>
/// To create a snapshot for EBS volumes that serve as root devices, you should stop the
/// instance before taking the snapshot.
/// </para>
///
/// <para>
/// Snapshots that are taken from encrypted volumes are automatically encrypted. Volumes
/// that are created from encrypted snapshots are also automatically encrypted. Your encrypted
/// volumes and any associated snapshots always remain protected.
/// </para>
///
/// <para>
/// You can tag your snapshots during creation. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html">Tagging
/// Your Amazon EC2 Resources</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonEBS.html">Amazon
/// Elastic Block Store</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon
/// EBS Encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateSnapshot service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateSnapshot service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSnapshot">REST API Reference for CreateSnapshot Operation</seealso>
public virtual Task<CreateSnapshotResponse> CreateSnapshotAsync(CreateSnapshotRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateSnapshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateSnapshotResponseUnmarshaller.Instance;
return InvokeAsync<CreateSnapshotResponse>(request, options, cancellationToken);
}
#endregion
#region CreateSnapshots
internal virtual CreateSnapshotsResponse CreateSnapshots(CreateSnapshotsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateSnapshotsRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateSnapshotsResponseUnmarshaller.Instance;
return Invoke<CreateSnapshotsResponse>(request, options);
}
/// <summary>
/// Creates crash-consistent snapshots of multiple EBS volumes and stores the data in
/// S3. Volumes are chosen by specifying an instance. Any attached volumes will produce
/// one snapshot each that is crash-consistent across the instance. Boot volumes can be
/// excluded by changing the parameters.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateSnapshots service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateSnapshots service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSnapshots">REST API Reference for CreateSnapshots Operation</seealso>
public virtual Task<CreateSnapshotsResponse> CreateSnapshotsAsync(CreateSnapshotsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateSnapshotsRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateSnapshotsResponseUnmarshaller.Instance;
return InvokeAsync<CreateSnapshotsResponse>(request, options, cancellationToken);
}
#endregion
#region CreateSpotDatafeedSubscription
internal virtual CreateSpotDatafeedSubscriptionResponse CreateSpotDatafeedSubscription(CreateSpotDatafeedSubscriptionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateSpotDatafeedSubscriptionRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateSpotDatafeedSubscriptionResponseUnmarshaller.Instance;
return Invoke<CreateSpotDatafeedSubscriptionResponse>(request, options);
}
/// <summary>
/// Creates a data feed for Spot Instances, enabling you to view Spot Instance usage logs.
/// You can create one data feed per AWS account. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html">Spot
/// Instance Data Feed</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateSpotDatafeedSubscription service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateSpotDatafeedSubscription service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSpotDatafeedSubscription">REST API Reference for CreateSpotDatafeedSubscription Operation</seealso>
public virtual Task<CreateSpotDatafeedSubscriptionResponse> CreateSpotDatafeedSubscriptionAsync(CreateSpotDatafeedSubscriptionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateSpotDatafeedSubscriptionRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateSpotDatafeedSubscriptionResponseUnmarshaller.Instance;
return InvokeAsync<CreateSpotDatafeedSubscriptionResponse>(request, options, cancellationToken);
}
#endregion
#region CreateSubnet
internal virtual CreateSubnetResponse CreateSubnet(CreateSubnetRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateSubnetRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateSubnetResponseUnmarshaller.Instance;
return Invoke<CreateSubnetResponse>(request, options);
}
/// <summary>
/// Creates a subnet in an existing VPC.
///
///
/// <para>
/// When you create each subnet, you provide the VPC ID and IPv4 CIDR block for the subnet.
/// After you create a subnet, you can't change its CIDR block. The size of the subnet's
/// IPv4 CIDR block can be the same as a VPC's IPv4 CIDR block, or a subset of a VPC's
/// IPv4 CIDR block. If you create more than one subnet in a VPC, the subnets' CIDR blocks
/// must not overlap. The smallest IPv4 subnet (and VPC) you can create uses a /28 netmask
/// (16 IPv4 addresses), and the largest uses a /16 netmask (65,536 IPv4 addresses).
/// </para>
///
/// <para>
/// If you've associated an IPv6 CIDR block with your VPC, you can create a subnet with
/// an IPv6 CIDR block that uses a /64 prefix length.
/// </para>
/// <important>
/// <para>
/// AWS reserves both the first four and the last IPv4 address in each subnet's CIDR block.
/// They're not available for use.
/// </para>
/// </important>
/// <para>
/// If you add more than one subnet to a VPC, they're set up in a star topology with a
/// logical router in the middle.
/// </para>
///
/// <para>
/// If you launch an instance in a VPC using an Amazon EBS-backed AMI, the IP address
/// doesn't change if you stop and restart the instance (unlike a similar instance launched
/// outside a VPC, which gets a new IP address when restarted). It's therefore possible
/// to have a subnet with no running instances (they're all stopped), but no remaining
/// IP addresses available.
/// </para>
///
/// <para>
/// For more information about subnets, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html">Your
/// VPC and Subnets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateSubnet service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateSubnet service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSubnet">REST API Reference for CreateSubnet Operation</seealso>
public virtual Task<CreateSubnetResponse> CreateSubnetAsync(CreateSubnetRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateSubnetRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateSubnetResponseUnmarshaller.Instance;
return InvokeAsync<CreateSubnetResponse>(request, options, cancellationToken);
}
#endregion
#region CreateTags
internal virtual CreateTagsResponse CreateTags(CreateTagsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateTagsResponseUnmarshaller.Instance;
return Invoke<CreateTagsResponse>(request, options);
}
/// <summary>
/// Adds or overwrites only the specified tags for the specified Amazon EC2 resource or
/// resources. When you specify an existing tag key, the value is overwritten with the
/// new value. Each resource can have a maximum of 50 tags. Each tag consists of a key
/// and optional value. Tag keys must be unique per resource.
///
///
/// <para>
/// For more information about tags, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html">Tagging
/// Your Resources</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>. For more
/// information about creating IAM policies that control users' access to resources based
/// on tags, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-iam-actions-resources.html">Supported
/// Resource-Level Permissions for Amazon EC2 API Actions</a> in the <i>Amazon Elastic
/// Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateTags service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateTags service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTags">REST API Reference for CreateTags Operation</seealso>
public virtual Task<CreateTagsResponse> CreateTagsAsync(CreateTagsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateTagsResponseUnmarshaller.Instance;
return InvokeAsync<CreateTagsResponse>(request, options, cancellationToken);
}
#endregion
#region CreateTrafficMirrorFilter
internal virtual CreateTrafficMirrorFilterResponse CreateTrafficMirrorFilter(CreateTrafficMirrorFilterRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateTrafficMirrorFilterRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateTrafficMirrorFilterResponseUnmarshaller.Instance;
return Invoke<CreateTrafficMirrorFilterResponse>(request, options);
}
/// <summary>
/// Creates a Traffic Mirror filter.
///
///
/// <para>
/// A Traffic Mirror filter is a set of rules that defines the traffic to mirror.
/// </para>
///
/// <para>
/// By default, no traffic is mirrored. To mirror traffic, use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTrafficMirrorFilterRule.htm">CreateTrafficMirrorFilterRule</a>
/// to add Traffic Mirror rules to the filter. The rules you add define what traffic gets
/// mirrored. You can also use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyTrafficMirrorFilterNetworkServices.html">ModifyTrafficMirrorFilterNetworkServices</a>
/// to mirror supported network services.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateTrafficMirrorFilter service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateTrafficMirrorFilter service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTrafficMirrorFilter">REST API Reference for CreateTrafficMirrorFilter Operation</seealso>
public virtual Task<CreateTrafficMirrorFilterResponse> CreateTrafficMirrorFilterAsync(CreateTrafficMirrorFilterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateTrafficMirrorFilterRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateTrafficMirrorFilterResponseUnmarshaller.Instance;
return InvokeAsync<CreateTrafficMirrorFilterResponse>(request, options, cancellationToken);
}
#endregion
#region CreateTrafficMirrorFilterRule
internal virtual CreateTrafficMirrorFilterRuleResponse CreateTrafficMirrorFilterRule(CreateTrafficMirrorFilterRuleRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateTrafficMirrorFilterRuleRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateTrafficMirrorFilterRuleResponseUnmarshaller.Instance;
return Invoke<CreateTrafficMirrorFilterRuleResponse>(request, options);
}
/// <summary>
/// Creates a Traffic Mirror filter rule.
///
///
/// <para>
/// A Traffic Mirror rule defines the Traffic Mirror source traffic to mirror.
/// </para>
///
/// <para>
/// You need the Traffic Mirror filter ID when you create the rule.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateTrafficMirrorFilterRule service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateTrafficMirrorFilterRule service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTrafficMirrorFilterRule">REST API Reference for CreateTrafficMirrorFilterRule Operation</seealso>
public virtual Task<CreateTrafficMirrorFilterRuleResponse> CreateTrafficMirrorFilterRuleAsync(CreateTrafficMirrorFilterRuleRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateTrafficMirrorFilterRuleRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateTrafficMirrorFilterRuleResponseUnmarshaller.Instance;
return InvokeAsync<CreateTrafficMirrorFilterRuleResponse>(request, options, cancellationToken);
}
#endregion
#region CreateTrafficMirrorSession
internal virtual CreateTrafficMirrorSessionResponse CreateTrafficMirrorSession(CreateTrafficMirrorSessionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateTrafficMirrorSessionRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateTrafficMirrorSessionResponseUnmarshaller.Instance;
return Invoke<CreateTrafficMirrorSessionResponse>(request, options);
}
/// <summary>
/// Creates a Traffic Mirror session.
///
///
/// <para>
/// A Traffic Mirror session actively copies packets from a Traffic Mirror source to a
/// Traffic Mirror target. Create a filter, and then assign it to the session to define
/// a subset of the traffic to mirror, for example all TCP traffic.
/// </para>
///
/// <para>
/// The Traffic Mirror source and the Traffic Mirror target (monitoring appliances) can
/// be in the same VPC, or in a different VPC connected via VPC peering or a transit gateway.
///
/// </para>
///
/// <para>
/// By default, no traffic is mirrored. Use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTrafficMirrorFilter.htm">CreateTrafficMirrorFilter</a>
/// to create filter rules that specify the traffic to mirror.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateTrafficMirrorSession service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateTrafficMirrorSession service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTrafficMirrorSession">REST API Reference for CreateTrafficMirrorSession Operation</seealso>
public virtual Task<CreateTrafficMirrorSessionResponse> CreateTrafficMirrorSessionAsync(CreateTrafficMirrorSessionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateTrafficMirrorSessionRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateTrafficMirrorSessionResponseUnmarshaller.Instance;
return InvokeAsync<CreateTrafficMirrorSessionResponse>(request, options, cancellationToken);
}
#endregion
#region CreateTrafficMirrorTarget
internal virtual CreateTrafficMirrorTargetResponse CreateTrafficMirrorTarget(CreateTrafficMirrorTargetRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateTrafficMirrorTargetRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateTrafficMirrorTargetResponseUnmarshaller.Instance;
return Invoke<CreateTrafficMirrorTargetResponse>(request, options);
}
/// <summary>
/// Creates a target for your Traffic Mirror session.
///
///
/// <para>
/// A Traffic Mirror target is the destination for mirrored traffic. The Traffic Mirror
/// source and the Traffic Mirror target (monitoring appliances) can be in the same VPC,
/// or in different VPCs connected via VPC peering or a transit gateway.
/// </para>
///
/// <para>
/// A Traffic Mirror target can be a network interface, or a Network Load Balancer.
/// </para>
///
/// <para>
/// To use the target in a Traffic Mirror session, use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTrafficMirrorSession.htm">CreateTrafficMirrorSession</a>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateTrafficMirrorTarget service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateTrafficMirrorTarget service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTrafficMirrorTarget">REST API Reference for CreateTrafficMirrorTarget Operation</seealso>
public virtual Task<CreateTrafficMirrorTargetResponse> CreateTrafficMirrorTargetAsync(CreateTrafficMirrorTargetRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateTrafficMirrorTargetRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateTrafficMirrorTargetResponseUnmarshaller.Instance;
return InvokeAsync<CreateTrafficMirrorTargetResponse>(request, options, cancellationToken);
}
#endregion
#region CreateTransitGateway
internal virtual CreateTransitGatewayResponse CreateTransitGateway(CreateTransitGatewayRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateTransitGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateTransitGatewayResponseUnmarshaller.Instance;
return Invoke<CreateTransitGatewayResponse>(request, options);
}
/// <summary>
/// Creates a transit gateway.
///
///
/// <para>
/// You can use a transit gateway to interconnect your virtual private clouds (VPC) and
/// on-premises networks. After the transit gateway enters the <code>available</code>
/// state, you can attach your VPCs and VPN connections to the transit gateway.
/// </para>
///
/// <para>
/// To attach your VPCs, use <a>CreateTransitGatewayVpcAttachment</a>.
/// </para>
///
/// <para>
/// To attach a VPN connection, use <a>CreateCustomerGateway</a> to create a customer
/// gateway and specify the ID of the customer gateway and the ID of the transit gateway
/// in a call to <a>CreateVpnConnection</a>.
/// </para>
///
/// <para>
/// When you create a transit gateway, we create a default transit gateway route table
/// and use it as the default association route table and the default propagation route
/// table. You can use <a>CreateTransitGatewayRouteTable</a> to create additional transit
/// gateway route tables. If you disable automatic route propagation, we do not create
/// a default transit gateway route table. You can use <a>EnableTransitGatewayRouteTablePropagation</a>
/// to propagate routes from a resource attachment to a transit gateway route table. If
/// you disable automatic associations, you can use <a>AssociateTransitGatewayRouteTable</a>
/// to associate a resource attachment with a transit gateway route table.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateTransitGateway service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateTransitGateway service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTransitGateway">REST API Reference for CreateTransitGateway Operation</seealso>
public virtual Task<CreateTransitGatewayResponse> CreateTransitGatewayAsync(CreateTransitGatewayRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateTransitGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateTransitGatewayResponseUnmarshaller.Instance;
return InvokeAsync<CreateTransitGatewayResponse>(request, options, cancellationToken);
}
#endregion
#region CreateTransitGatewayMulticastDomain
internal virtual CreateTransitGatewayMulticastDomainResponse CreateTransitGatewayMulticastDomain(CreateTransitGatewayMulticastDomainRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateTransitGatewayMulticastDomainRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateTransitGatewayMulticastDomainResponseUnmarshaller.Instance;
return Invoke<CreateTransitGatewayMulticastDomainResponse>(request, options);
}
/// <summary>
/// Creates a multicast domain using the specified transit gateway.
///
///
/// <para>
/// The transit gateway must be in the available state before you create a domain. Use
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeTransitGateways.html">DescribeTransitGateways</a>
/// to see the state of transit gateway.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateTransitGatewayMulticastDomain service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateTransitGatewayMulticastDomain service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTransitGatewayMulticastDomain">REST API Reference for CreateTransitGatewayMulticastDomain Operation</seealso>
public virtual Task<CreateTransitGatewayMulticastDomainResponse> CreateTransitGatewayMulticastDomainAsync(CreateTransitGatewayMulticastDomainRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateTransitGatewayMulticastDomainRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateTransitGatewayMulticastDomainResponseUnmarshaller.Instance;
return InvokeAsync<CreateTransitGatewayMulticastDomainResponse>(request, options, cancellationToken);
}
#endregion
#region CreateTransitGatewayPeeringAttachment
internal virtual CreateTransitGatewayPeeringAttachmentResponse CreateTransitGatewayPeeringAttachment(CreateTransitGatewayPeeringAttachmentRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateTransitGatewayPeeringAttachmentRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateTransitGatewayPeeringAttachmentResponseUnmarshaller.Instance;
return Invoke<CreateTransitGatewayPeeringAttachmentResponse>(request, options);
}
/// <summary>
/// Requests a transit gateway peering attachment between the specified transit gateway
/// (requester) and a peer transit gateway (accepter). The transit gateways must be in
/// different Regions. The peer transit gateway can be in your account or a different
/// AWS account.
///
///
/// <para>
/// After you create the peering attachment, the owner of the accepter transit gateway
/// must accept the attachment request.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateTransitGatewayPeeringAttachment service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateTransitGatewayPeeringAttachment service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTransitGatewayPeeringAttachment">REST API Reference for CreateTransitGatewayPeeringAttachment Operation</seealso>
public virtual Task<CreateTransitGatewayPeeringAttachmentResponse> CreateTransitGatewayPeeringAttachmentAsync(CreateTransitGatewayPeeringAttachmentRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateTransitGatewayPeeringAttachmentRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateTransitGatewayPeeringAttachmentResponseUnmarshaller.Instance;
return InvokeAsync<CreateTransitGatewayPeeringAttachmentResponse>(request, options, cancellationToken);
}
#endregion
#region CreateTransitGatewayRoute
internal virtual CreateTransitGatewayRouteResponse CreateTransitGatewayRoute(CreateTransitGatewayRouteRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateTransitGatewayRouteRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateTransitGatewayRouteResponseUnmarshaller.Instance;
return Invoke<CreateTransitGatewayRouteResponse>(request, options);
}
/// <summary>
/// Creates a static route for the specified transit gateway route table.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateTransitGatewayRoute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateTransitGatewayRoute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTransitGatewayRoute">REST API Reference for CreateTransitGatewayRoute Operation</seealso>
public virtual Task<CreateTransitGatewayRouteResponse> CreateTransitGatewayRouteAsync(CreateTransitGatewayRouteRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateTransitGatewayRouteRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateTransitGatewayRouteResponseUnmarshaller.Instance;
return InvokeAsync<CreateTransitGatewayRouteResponse>(request, options, cancellationToken);
}
#endregion
#region CreateTransitGatewayRouteTable
internal virtual CreateTransitGatewayRouteTableResponse CreateTransitGatewayRouteTable(CreateTransitGatewayRouteTableRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateTransitGatewayRouteTableRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateTransitGatewayRouteTableResponseUnmarshaller.Instance;
return Invoke<CreateTransitGatewayRouteTableResponse>(request, options);
}
/// <summary>
/// Creates a route table for the specified transit gateway.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateTransitGatewayRouteTable service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateTransitGatewayRouteTable service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTransitGatewayRouteTable">REST API Reference for CreateTransitGatewayRouteTable Operation</seealso>
public virtual Task<CreateTransitGatewayRouteTableResponse> CreateTransitGatewayRouteTableAsync(CreateTransitGatewayRouteTableRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateTransitGatewayRouteTableRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateTransitGatewayRouteTableResponseUnmarshaller.Instance;
return InvokeAsync<CreateTransitGatewayRouteTableResponse>(request, options, cancellationToken);
}
#endregion
#region CreateTransitGatewayVpcAttachment
internal virtual CreateTransitGatewayVpcAttachmentResponse CreateTransitGatewayVpcAttachment(CreateTransitGatewayVpcAttachmentRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateTransitGatewayVpcAttachmentRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateTransitGatewayVpcAttachmentResponseUnmarshaller.Instance;
return Invoke<CreateTransitGatewayVpcAttachmentResponse>(request, options);
}
/// <summary>
/// Attaches the specified VPC to the specified transit gateway.
///
///
/// <para>
/// If you attach a VPC with a CIDR range that overlaps the CIDR range of a VPC that is
/// already attached, the new VPC CIDR range is not propagated to the default propagation
/// route table.
/// </para>
///
/// <para>
/// To send VPC traffic to an attached transit gateway, add a route to the VPC route table
/// using <a>CreateRoute</a>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateTransitGatewayVpcAttachment service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateTransitGatewayVpcAttachment service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTransitGatewayVpcAttachment">REST API Reference for CreateTransitGatewayVpcAttachment Operation</seealso>
public virtual Task<CreateTransitGatewayVpcAttachmentResponse> CreateTransitGatewayVpcAttachmentAsync(CreateTransitGatewayVpcAttachmentRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateTransitGatewayVpcAttachmentRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateTransitGatewayVpcAttachmentResponseUnmarshaller.Instance;
return InvokeAsync<CreateTransitGatewayVpcAttachmentResponse>(request, options, cancellationToken);
}
#endregion
#region CreateVolume
internal virtual CreateVolumeResponse CreateVolume(CreateVolumeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateVolumeRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateVolumeResponseUnmarshaller.Instance;
return Invoke<CreateVolumeResponse>(request, options);
}
/// <summary>
/// Creates an EBS volume that can be attached to an instance in the same Availability
/// Zone. The volume is created in the regional endpoint that you send the HTTP request
/// to. For more information see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html">Regions
/// and Endpoints</a>.
///
///
/// <para>
/// You can create a new empty volume or restore a volume from an EBS snapshot. Any AWS
/// Marketplace product codes from the snapshot are propagated to the volume.
/// </para>
///
/// <para>
/// You can create encrypted volumes. Encrypted volumes must be attached to instances
/// that support Amazon EBS encryption. Volumes that are created from encrypted snapshots
/// are also automatically encrypted. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon
/// EBS Encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
///
/// <para>
/// You can tag your volumes during creation. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html">Tagging
/// Your Amazon EC2 Resources</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-volume.html">Creating
/// an Amazon EBS Volume</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateVolume service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateVolume service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVolume">REST API Reference for CreateVolume Operation</seealso>
public virtual Task<CreateVolumeResponse> CreateVolumeAsync(CreateVolumeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateVolumeRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateVolumeResponseUnmarshaller.Instance;
return InvokeAsync<CreateVolumeResponse>(request, options, cancellationToken);
}
#endregion
#region CreateVpc
internal virtual CreateVpcResponse CreateVpc(CreateVpcRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateVpcRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateVpcResponseUnmarshaller.Instance;
return Invoke<CreateVpcResponse>(request, options);
}
/// <summary>
/// Creates a VPC with the specified IPv4 CIDR block. The smallest VPC you can create
/// uses a /28 netmask (16 IPv4 addresses), and the largest uses a /16 netmask (65,536
/// IPv4 addresses). For more information about how large to make your VPC, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html">Your
/// VPC and Subnets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
///
///
/// <para>
/// You can optionally request an IPv6 CIDR block for the VPC. You can request an Amazon-provided
/// IPv6 CIDR block from Amazon's pool of IPv6 addresses, or an IPv6 CIDR block from an
/// IPv6 address pool that you provisioned through bring your own IP addresses (<a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html">BYOIP</a>).
/// </para>
///
/// <para>
/// By default, each instance you launch in the VPC has the default DHCP options, which
/// include only a default DNS server that we provide (AmazonProvidedDNS). For more information,
/// see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html">DHCP
/// Options Sets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </para>
///
/// <para>
/// You can specify the instance tenancy value for the VPC when you create it. You can't
/// change this value for the VPC after you create it. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html">Dedicated
/// Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateVpc service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateVpc service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpc">REST API Reference for CreateVpc Operation</seealso>
public virtual Task<CreateVpcResponse> CreateVpcAsync(CreateVpcRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateVpcRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateVpcResponseUnmarshaller.Instance;
return InvokeAsync<CreateVpcResponse>(request, options, cancellationToken);
}
#endregion
#region CreateVpcEndpoint
internal virtual CreateVpcEndpointResponse CreateVpcEndpoint(CreateVpcEndpointRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateVpcEndpointRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateVpcEndpointResponseUnmarshaller.Instance;
return Invoke<CreateVpcEndpointResponse>(request, options);
}
/// <summary>
/// Creates a VPC endpoint for a specified service. An endpoint enables you to create
/// a private connection between your VPC and the service. The service may be provided
/// by AWS, an AWS Marketplace Partner, or another AWS account. For more information,
/// see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints.html">VPC
/// Endpoints</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
///
///
/// <para>
/// A <code>gateway</code> endpoint serves as a target for a route in your route table
/// for traffic destined for the AWS service. You can specify an endpoint policy to attach
/// to the endpoint, which will control access to the service from your VPC. You can also
/// specify the VPC route tables that use the endpoint.
/// </para>
///
/// <para>
/// An <code>interface</code> endpoint is a network interface in your subnet that serves
/// as an endpoint for communicating with the specified service. You can specify the subnets
/// in which to create an endpoint, and the security groups to associate with the endpoint
/// network interface.
/// </para>
///
/// <para>
/// Use <a>DescribeVpcEndpointServices</a> to get a list of supported services.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateVpcEndpoint service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateVpcEndpoint service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpoint">REST API Reference for CreateVpcEndpoint Operation</seealso>
public virtual Task<CreateVpcEndpointResponse> CreateVpcEndpointAsync(CreateVpcEndpointRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateVpcEndpointRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateVpcEndpointResponseUnmarshaller.Instance;
return InvokeAsync<CreateVpcEndpointResponse>(request, options, cancellationToken);
}
#endregion
#region CreateVpcEndpointConnectionNotification
internal virtual CreateVpcEndpointConnectionNotificationResponse CreateVpcEndpointConnectionNotification(CreateVpcEndpointConnectionNotificationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateVpcEndpointConnectionNotificationRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateVpcEndpointConnectionNotificationResponseUnmarshaller.Instance;
return Invoke<CreateVpcEndpointConnectionNotificationResponse>(request, options);
}
/// <summary>
/// Creates a connection notification for a specified VPC endpoint or VPC endpoint service.
/// A connection notification notifies you of specific endpoint events. You must create
/// an SNS topic to receive notifications. For more information, see <a href="https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html">Create
/// a Topic</a> in the <i>Amazon Simple Notification Service Developer Guide</i>.
///
///
/// <para>
/// You can create a connection notification for interface endpoints only.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateVpcEndpointConnectionNotification service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateVpcEndpointConnectionNotification service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpointConnectionNotification">REST API Reference for CreateVpcEndpointConnectionNotification Operation</seealso>
public virtual Task<CreateVpcEndpointConnectionNotificationResponse> CreateVpcEndpointConnectionNotificationAsync(CreateVpcEndpointConnectionNotificationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateVpcEndpointConnectionNotificationRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateVpcEndpointConnectionNotificationResponseUnmarshaller.Instance;
return InvokeAsync<CreateVpcEndpointConnectionNotificationResponse>(request, options, cancellationToken);
}
#endregion
#region CreateVpcEndpointServiceConfiguration
internal virtual CreateVpcEndpointServiceConfigurationResponse CreateVpcEndpointServiceConfiguration(CreateVpcEndpointServiceConfigurationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateVpcEndpointServiceConfigurationRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateVpcEndpointServiceConfigurationResponseUnmarshaller.Instance;
return Invoke<CreateVpcEndpointServiceConfigurationResponse>(request, options);
}
/// <summary>
/// Creates a VPC endpoint service configuration to which service consumers (AWS accounts,
/// IAM users, and IAM roles) can connect. Service consumers can create an interface VPC
/// endpoint to connect to your service.
///
///
/// <para>
/// To create an endpoint service configuration, you must first create a Network Load
/// Balancer for your service. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-service.html">VPC
/// Endpoint Services</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </para>
///
/// <para>
/// If you set the private DNS name, you must prove that you own the private DNS domain
/// name. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-services-dns-validation.html">VPC
/// Endpoint Service Private DNS Name Verification</a> in the <i>Amazon Virtual Private
/// Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateVpcEndpointServiceConfiguration service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateVpcEndpointServiceConfiguration service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpointServiceConfiguration">REST API Reference for CreateVpcEndpointServiceConfiguration Operation</seealso>
public virtual Task<CreateVpcEndpointServiceConfigurationResponse> CreateVpcEndpointServiceConfigurationAsync(CreateVpcEndpointServiceConfigurationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateVpcEndpointServiceConfigurationRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateVpcEndpointServiceConfigurationResponseUnmarshaller.Instance;
return InvokeAsync<CreateVpcEndpointServiceConfigurationResponse>(request, options, cancellationToken);
}
#endregion
#region CreateVpcPeeringConnection
internal virtual CreateVpcPeeringConnectionResponse CreateVpcPeeringConnection(CreateVpcPeeringConnectionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateVpcPeeringConnectionRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateVpcPeeringConnectionResponseUnmarshaller.Instance;
return Invoke<CreateVpcPeeringConnectionResponse>(request, options);
}
/// <summary>
/// Requests a VPC peering connection between two VPCs: a requester VPC that you own and
/// an accepter VPC with which to create the connection. The accepter VPC can belong to
/// another AWS account and can be in a different Region to the requester VPC. The requester
/// VPC and accepter VPC cannot have overlapping CIDR blocks.
///
/// <note>
/// <para>
/// Limitations and rules apply to a VPC peering connection. For more information, see
/// the <a href="https://docs.aws.amazon.com/vpc/latest/peering/vpc-peering-basics.html#vpc-peering-limitations">limitations</a>
/// section in the <i>VPC Peering Guide</i>.
/// </para>
/// </note>
/// <para>
/// The owner of the accepter VPC must accept the peering request to activate the peering
/// connection. The VPC peering connection request expires after 7 days, after which it
/// cannot be accepted or rejected.
/// </para>
///
/// <para>
/// If you create a VPC peering connection request between VPCs with overlapping CIDR
/// blocks, the VPC peering connection has a status of <code>failed</code>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateVpcPeeringConnection service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateVpcPeeringConnection service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcPeeringConnection">REST API Reference for CreateVpcPeeringConnection Operation</seealso>
public virtual Task<CreateVpcPeeringConnectionResponse> CreateVpcPeeringConnectionAsync(CreateVpcPeeringConnectionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateVpcPeeringConnectionRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateVpcPeeringConnectionResponseUnmarshaller.Instance;
return InvokeAsync<CreateVpcPeeringConnectionResponse>(request, options, cancellationToken);
}
#endregion
#region CreateVpnConnection
internal virtual CreateVpnConnectionResponse CreateVpnConnection(CreateVpnConnectionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateVpnConnectionRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateVpnConnectionResponseUnmarshaller.Instance;
return Invoke<CreateVpnConnectionResponse>(request, options);
}
/// <summary>
/// Creates a VPN connection between an existing virtual private gateway and a VPN customer
/// gateway. The supported connection type is <code>ipsec.1</code>.
///
///
/// <para>
/// The response includes information that you need to give to your network administrator
/// to configure your customer gateway.
/// </para>
/// <important>
/// <para>
/// We strongly recommend that you use HTTPS when calling this operation because the response
/// contains sensitive cryptographic information for configuring your customer gateway.
/// </para>
/// </important>
/// <para>
/// If you decide to shut down your VPN connection for any reason and later create a new
/// VPN connection, you must reconfigure your customer gateway with the new information
/// returned from this call.
/// </para>
///
/// <para>
/// This is an idempotent operation. If you perform the operation more than once, Amazon
/// EC2 doesn't return an error.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html">AWS
/// Site-to-Site VPN</a> in the <i>AWS Site-to-Site VPN User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateVpnConnection service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateVpnConnection service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnConnection">REST API Reference for CreateVpnConnection Operation</seealso>
public virtual Task<CreateVpnConnectionResponse> CreateVpnConnectionAsync(CreateVpnConnectionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateVpnConnectionRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateVpnConnectionResponseUnmarshaller.Instance;
return InvokeAsync<CreateVpnConnectionResponse>(request, options, cancellationToken);
}
#endregion
#region CreateVpnConnectionRoute
internal virtual CreateVpnConnectionRouteResponse CreateVpnConnectionRoute(CreateVpnConnectionRouteRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateVpnConnectionRouteRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateVpnConnectionRouteResponseUnmarshaller.Instance;
return Invoke<CreateVpnConnectionRouteResponse>(request, options);
}
/// <summary>
/// Creates a static route associated with a VPN connection between an existing virtual
/// private gateway and a VPN customer gateway. The static route allows traffic to be
/// routed from the virtual private gateway to the VPN customer gateway.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html">AWS
/// Site-to-Site VPN</a> in the <i>AWS Site-to-Site VPN User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateVpnConnectionRoute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateVpnConnectionRoute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnConnectionRoute">REST API Reference for CreateVpnConnectionRoute Operation</seealso>
public virtual Task<CreateVpnConnectionRouteResponse> CreateVpnConnectionRouteAsync(CreateVpnConnectionRouteRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateVpnConnectionRouteRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateVpnConnectionRouteResponseUnmarshaller.Instance;
return InvokeAsync<CreateVpnConnectionRouteResponse>(request, options, cancellationToken);
}
#endregion
#region CreateVpnGateway
internal virtual CreateVpnGatewayResponse CreateVpnGateway(CreateVpnGatewayRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateVpnGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateVpnGatewayResponseUnmarshaller.Instance;
return Invoke<CreateVpnGatewayResponse>(request, options);
}
/// <summary>
/// Creates a virtual private gateway. A virtual private gateway is the endpoint on the
/// VPC side of your VPN connection. You can create a virtual private gateway before creating
/// the VPC itself.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html">AWS
/// Site-to-Site VPN</a> in the <i>AWS Site-to-Site VPN User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the CreateVpnGateway service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the CreateVpnGateway service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnGateway">REST API Reference for CreateVpnGateway Operation</seealso>
public virtual Task<CreateVpnGatewayResponse> CreateVpnGatewayAsync(CreateVpnGatewayRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateVpnGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateVpnGatewayResponseUnmarshaller.Instance;
return InvokeAsync<CreateVpnGatewayResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteClientVpnEndpoint
internal virtual DeleteClientVpnEndpointResponse DeleteClientVpnEndpoint(DeleteClientVpnEndpointRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteClientVpnEndpointRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteClientVpnEndpointResponseUnmarshaller.Instance;
return Invoke<DeleteClientVpnEndpointResponse>(request, options);
}
/// <summary>
/// Deletes the specified Client VPN endpoint. You must disassociate all target networks
/// before you can delete a Client VPN endpoint.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteClientVpnEndpoint service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteClientVpnEndpoint service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteClientVpnEndpoint">REST API Reference for DeleteClientVpnEndpoint Operation</seealso>
public virtual Task<DeleteClientVpnEndpointResponse> DeleteClientVpnEndpointAsync(DeleteClientVpnEndpointRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteClientVpnEndpointRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteClientVpnEndpointResponseUnmarshaller.Instance;
return InvokeAsync<DeleteClientVpnEndpointResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteClientVpnRoute
internal virtual DeleteClientVpnRouteResponse DeleteClientVpnRoute(DeleteClientVpnRouteRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteClientVpnRouteRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteClientVpnRouteResponseUnmarshaller.Instance;
return Invoke<DeleteClientVpnRouteResponse>(request, options);
}
/// <summary>
/// Deletes a route from a Client VPN endpoint. You can only delete routes that you manually
/// added using the <b>CreateClientVpnRoute</b> action. You cannot delete routes that
/// were automatically added when associating a subnet. To remove routes that have been
/// automatically added, disassociate the target subnet from the Client VPN endpoint.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteClientVpnRoute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteClientVpnRoute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteClientVpnRoute">REST API Reference for DeleteClientVpnRoute Operation</seealso>
public virtual Task<DeleteClientVpnRouteResponse> DeleteClientVpnRouteAsync(DeleteClientVpnRouteRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteClientVpnRouteRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteClientVpnRouteResponseUnmarshaller.Instance;
return InvokeAsync<DeleteClientVpnRouteResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteCustomerGateway
internal virtual DeleteCustomerGatewayResponse DeleteCustomerGateway(DeleteCustomerGatewayRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteCustomerGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteCustomerGatewayResponseUnmarshaller.Instance;
return Invoke<DeleteCustomerGatewayResponse>(request, options);
}
/// <summary>
/// Deletes the specified customer gateway. You must delete the VPN connection before
/// you can delete the customer gateway.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteCustomerGateway service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteCustomerGateway service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteCustomerGateway">REST API Reference for DeleteCustomerGateway Operation</seealso>
public virtual Task<DeleteCustomerGatewayResponse> DeleteCustomerGatewayAsync(DeleteCustomerGatewayRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteCustomerGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteCustomerGatewayResponseUnmarshaller.Instance;
return InvokeAsync<DeleteCustomerGatewayResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteDhcpOptions
internal virtual DeleteDhcpOptionsResponse DeleteDhcpOptions(DeleteDhcpOptionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteDhcpOptionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteDhcpOptionsResponseUnmarshaller.Instance;
return Invoke<DeleteDhcpOptionsResponse>(request, options);
}
/// <summary>
/// Deletes the specified set of DHCP options. You must disassociate the set of DHCP options
/// before you can delete it. You can disassociate the set of DHCP options by associating
/// either a new set of options or the default set of options with the VPC.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteDhcpOptions service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteDhcpOptions service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteDhcpOptions">REST API Reference for DeleteDhcpOptions Operation</seealso>
public virtual Task<DeleteDhcpOptionsResponse> DeleteDhcpOptionsAsync(DeleteDhcpOptionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteDhcpOptionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteDhcpOptionsResponseUnmarshaller.Instance;
return InvokeAsync<DeleteDhcpOptionsResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteEgressOnlyInternetGateway
internal virtual DeleteEgressOnlyInternetGatewayResponse DeleteEgressOnlyInternetGateway(DeleteEgressOnlyInternetGatewayRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteEgressOnlyInternetGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteEgressOnlyInternetGatewayResponseUnmarshaller.Instance;
return Invoke<DeleteEgressOnlyInternetGatewayResponse>(request, options);
}
/// <summary>
/// Deletes an egress-only internet gateway.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteEgressOnlyInternetGateway service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteEgressOnlyInternetGateway service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteEgressOnlyInternetGateway">REST API Reference for DeleteEgressOnlyInternetGateway Operation</seealso>
public virtual Task<DeleteEgressOnlyInternetGatewayResponse> DeleteEgressOnlyInternetGatewayAsync(DeleteEgressOnlyInternetGatewayRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteEgressOnlyInternetGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteEgressOnlyInternetGatewayResponseUnmarshaller.Instance;
return InvokeAsync<DeleteEgressOnlyInternetGatewayResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteFleets
internal virtual DeleteFleetsResponse DeleteFleets(DeleteFleetsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteFleetsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteFleetsResponseUnmarshaller.Instance;
return Invoke<DeleteFleetsResponse>(request, options);
}
/// <summary>
/// Deletes the specified EC2 Fleet.
///
///
/// <para>
/// After you delete an EC2 Fleet, it launches no new instances. You must specify whether
/// an EC2 Fleet should also terminate its instances. If you terminate the instances,
/// the EC2 Fleet enters the <code>deleted_terminating</code> state. Otherwise, the EC2
/// Fleet enters the <code>deleted_running</code> state, and the instances continue to
/// run until they are interrupted or you terminate them manually.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteFleets service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteFleets service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFleets">REST API Reference for DeleteFleets Operation</seealso>
public virtual Task<DeleteFleetsResponse> DeleteFleetsAsync(DeleteFleetsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteFleetsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteFleetsResponseUnmarshaller.Instance;
return InvokeAsync<DeleteFleetsResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteFlowLogs
internal virtual DeleteFlowLogsResponse DeleteFlowLogs(DeleteFlowLogsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteFlowLogsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteFlowLogsResponseUnmarshaller.Instance;
return Invoke<DeleteFlowLogsResponse>(request, options);
}
/// <summary>
/// Deletes one or more flow logs.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteFlowLogs service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteFlowLogs service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFlowLogs">REST API Reference for DeleteFlowLogs Operation</seealso>
public virtual Task<DeleteFlowLogsResponse> DeleteFlowLogsAsync(DeleteFlowLogsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteFlowLogsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteFlowLogsResponseUnmarshaller.Instance;
return InvokeAsync<DeleteFlowLogsResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteFpgaImage
internal virtual DeleteFpgaImageResponse DeleteFpgaImage(DeleteFpgaImageRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteFpgaImageRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteFpgaImageResponseUnmarshaller.Instance;
return Invoke<DeleteFpgaImageResponse>(request, options);
}
/// <summary>
/// Deletes the specified Amazon FPGA Image (AFI).
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteFpgaImage service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteFpgaImage service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFpgaImage">REST API Reference for DeleteFpgaImage Operation</seealso>
public virtual Task<DeleteFpgaImageResponse> DeleteFpgaImageAsync(DeleteFpgaImageRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteFpgaImageRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteFpgaImageResponseUnmarshaller.Instance;
return InvokeAsync<DeleteFpgaImageResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteInternetGateway
internal virtual DeleteInternetGatewayResponse DeleteInternetGateway(DeleteInternetGatewayRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteInternetGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteInternetGatewayResponseUnmarshaller.Instance;
return Invoke<DeleteInternetGatewayResponse>(request, options);
}
/// <summary>
/// Deletes the specified internet gateway. You must detach the internet gateway from
/// the VPC before you can delete it.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteInternetGateway service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteInternetGateway service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteInternetGateway">REST API Reference for DeleteInternetGateway Operation</seealso>
public virtual Task<DeleteInternetGatewayResponse> DeleteInternetGatewayAsync(DeleteInternetGatewayRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteInternetGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteInternetGatewayResponseUnmarshaller.Instance;
return InvokeAsync<DeleteInternetGatewayResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteKeyPair
internal virtual DeleteKeyPairResponse DeleteKeyPair(DeleteKeyPairRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteKeyPairRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteKeyPairResponseUnmarshaller.Instance;
return Invoke<DeleteKeyPairResponse>(request, options);
}
/// <summary>
/// Deletes the specified key pair, by removing the public key from Amazon EC2.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteKeyPair service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteKeyPair service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteKeyPair">REST API Reference for DeleteKeyPair Operation</seealso>
public virtual Task<DeleteKeyPairResponse> DeleteKeyPairAsync(DeleteKeyPairRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteKeyPairRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteKeyPairResponseUnmarshaller.Instance;
return InvokeAsync<DeleteKeyPairResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteLaunchTemplate
internal virtual DeleteLaunchTemplateResponse DeleteLaunchTemplate(DeleteLaunchTemplateRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteLaunchTemplateRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteLaunchTemplateResponseUnmarshaller.Instance;
return Invoke<DeleteLaunchTemplateResponse>(request, options);
}
/// <summary>
/// Deletes a launch template. Deleting a launch template deletes all of its versions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteLaunchTemplate service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteLaunchTemplate service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteLaunchTemplate">REST API Reference for DeleteLaunchTemplate Operation</seealso>
public virtual Task<DeleteLaunchTemplateResponse> DeleteLaunchTemplateAsync(DeleteLaunchTemplateRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteLaunchTemplateRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteLaunchTemplateResponseUnmarshaller.Instance;
return InvokeAsync<DeleteLaunchTemplateResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteLaunchTemplateVersions
internal virtual DeleteLaunchTemplateVersionsResponse DeleteLaunchTemplateVersions(DeleteLaunchTemplateVersionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteLaunchTemplateVersionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteLaunchTemplateVersionsResponseUnmarshaller.Instance;
return Invoke<DeleteLaunchTemplateVersionsResponse>(request, options);
}
/// <summary>
/// Deletes one or more versions of a launch template. You cannot delete the default version
/// of a launch template; you must first assign a different version as the default. If
/// the default version is the only version for the launch template, you must delete the
/// entire launch template using <a>DeleteLaunchTemplate</a>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteLaunchTemplateVersions service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteLaunchTemplateVersions service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteLaunchTemplateVersions">REST API Reference for DeleteLaunchTemplateVersions Operation</seealso>
public virtual Task<DeleteLaunchTemplateVersionsResponse> DeleteLaunchTemplateVersionsAsync(DeleteLaunchTemplateVersionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteLaunchTemplateVersionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteLaunchTemplateVersionsResponseUnmarshaller.Instance;
return InvokeAsync<DeleteLaunchTemplateVersionsResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteLocalGatewayRoute
internal virtual DeleteLocalGatewayRouteResponse DeleteLocalGatewayRoute(DeleteLocalGatewayRouteRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteLocalGatewayRouteRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteLocalGatewayRouteResponseUnmarshaller.Instance;
return Invoke<DeleteLocalGatewayRouteResponse>(request, options);
}
/// <summary>
/// Deletes the specified route from the specified local gateway route table.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteLocalGatewayRoute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteLocalGatewayRoute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteLocalGatewayRoute">REST API Reference for DeleteLocalGatewayRoute Operation</seealso>
public virtual Task<DeleteLocalGatewayRouteResponse> DeleteLocalGatewayRouteAsync(DeleteLocalGatewayRouteRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteLocalGatewayRouteRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteLocalGatewayRouteResponseUnmarshaller.Instance;
return InvokeAsync<DeleteLocalGatewayRouteResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteLocalGatewayRouteTableVpcAssociation
internal virtual DeleteLocalGatewayRouteTableVpcAssociationResponse DeleteLocalGatewayRouteTableVpcAssociation(DeleteLocalGatewayRouteTableVpcAssociationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteLocalGatewayRouteTableVpcAssociationRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteLocalGatewayRouteTableVpcAssociationResponseUnmarshaller.Instance;
return Invoke<DeleteLocalGatewayRouteTableVpcAssociationResponse>(request, options);
}
/// <summary>
/// Deletes the specified association between a VPC and local gateway route table.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteLocalGatewayRouteTableVpcAssociation service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteLocalGatewayRouteTableVpcAssociation service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteLocalGatewayRouteTableVpcAssociation">REST API Reference for DeleteLocalGatewayRouteTableVpcAssociation Operation</seealso>
public virtual Task<DeleteLocalGatewayRouteTableVpcAssociationResponse> DeleteLocalGatewayRouteTableVpcAssociationAsync(DeleteLocalGatewayRouteTableVpcAssociationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteLocalGatewayRouteTableVpcAssociationRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteLocalGatewayRouteTableVpcAssociationResponseUnmarshaller.Instance;
return InvokeAsync<DeleteLocalGatewayRouteTableVpcAssociationResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteNatGateway
internal virtual DeleteNatGatewayResponse DeleteNatGateway(DeleteNatGatewayRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteNatGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteNatGatewayResponseUnmarshaller.Instance;
return Invoke<DeleteNatGatewayResponse>(request, options);
}
/// <summary>
/// Deletes the specified NAT gateway. Deleting a NAT gateway disassociates its Elastic
/// IP address, but does not release the address from your account. Deleting a NAT gateway
/// does not delete any NAT gateway routes in your route tables.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteNatGateway service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteNatGateway service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNatGateway">REST API Reference for DeleteNatGateway Operation</seealso>
public virtual Task<DeleteNatGatewayResponse> DeleteNatGatewayAsync(DeleteNatGatewayRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteNatGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteNatGatewayResponseUnmarshaller.Instance;
return InvokeAsync<DeleteNatGatewayResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteNetworkAcl
internal virtual DeleteNetworkAclResponse DeleteNetworkAcl(DeleteNetworkAclRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteNetworkAclRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteNetworkAclResponseUnmarshaller.Instance;
return Invoke<DeleteNetworkAclResponse>(request, options);
}
/// <summary>
/// Deletes the specified network ACL. You can't delete the ACL if it's associated with
/// any subnets. You can't delete the default network ACL.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteNetworkAcl service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteNetworkAcl service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAcl">REST API Reference for DeleteNetworkAcl Operation</seealso>
public virtual Task<DeleteNetworkAclResponse> DeleteNetworkAclAsync(DeleteNetworkAclRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteNetworkAclRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteNetworkAclResponseUnmarshaller.Instance;
return InvokeAsync<DeleteNetworkAclResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteNetworkAclEntry
internal virtual DeleteNetworkAclEntryResponse DeleteNetworkAclEntry(DeleteNetworkAclEntryRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteNetworkAclEntryRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteNetworkAclEntryResponseUnmarshaller.Instance;
return Invoke<DeleteNetworkAclEntryResponse>(request, options);
}
/// <summary>
/// Deletes the specified ingress or egress entry (rule) from the specified network ACL.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteNetworkAclEntry service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteNetworkAclEntry service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAclEntry">REST API Reference for DeleteNetworkAclEntry Operation</seealso>
public virtual Task<DeleteNetworkAclEntryResponse> DeleteNetworkAclEntryAsync(DeleteNetworkAclEntryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteNetworkAclEntryRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteNetworkAclEntryResponseUnmarshaller.Instance;
return InvokeAsync<DeleteNetworkAclEntryResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteNetworkInterface
internal virtual DeleteNetworkInterfaceResponse DeleteNetworkInterface(DeleteNetworkInterfaceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteNetworkInterfaceRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteNetworkInterfaceResponseUnmarshaller.Instance;
return Invoke<DeleteNetworkInterfaceResponse>(request, options);
}
/// <summary>
/// Deletes the specified network interface. You must detach the network interface before
/// you can delete it.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteNetworkInterface service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteNetworkInterface service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterface">REST API Reference for DeleteNetworkInterface Operation</seealso>
public virtual Task<DeleteNetworkInterfaceResponse> DeleteNetworkInterfaceAsync(DeleteNetworkInterfaceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteNetworkInterfaceRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteNetworkInterfaceResponseUnmarshaller.Instance;
return InvokeAsync<DeleteNetworkInterfaceResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteNetworkInterfacePermission
internal virtual DeleteNetworkInterfacePermissionResponse DeleteNetworkInterfacePermission(DeleteNetworkInterfacePermissionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteNetworkInterfacePermissionRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteNetworkInterfacePermissionResponseUnmarshaller.Instance;
return Invoke<DeleteNetworkInterfacePermissionResponse>(request, options);
}
/// <summary>
/// Deletes a permission for a network interface. By default, you cannot delete the permission
/// if the account for which you're removing the permission has attached the network interface
/// to an instance. However, you can force delete the permission, regardless of any attachment.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteNetworkInterfacePermission service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteNetworkInterfacePermission service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterfacePermission">REST API Reference for DeleteNetworkInterfacePermission Operation</seealso>
public virtual Task<DeleteNetworkInterfacePermissionResponse> DeleteNetworkInterfacePermissionAsync(DeleteNetworkInterfacePermissionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteNetworkInterfacePermissionRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteNetworkInterfacePermissionResponseUnmarshaller.Instance;
return InvokeAsync<DeleteNetworkInterfacePermissionResponse>(request, options, cancellationToken);
}
#endregion
#region DeletePlacementGroup
internal virtual DeletePlacementGroupResponse DeletePlacementGroup(DeletePlacementGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeletePlacementGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeletePlacementGroupResponseUnmarshaller.Instance;
return Invoke<DeletePlacementGroupResponse>(request, options);
}
/// <summary>
/// Deletes the specified placement group. You must terminate all instances in the placement
/// group before you can delete the placement group. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html">Placement
/// Groups</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeletePlacementGroup service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeletePlacementGroup service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeletePlacementGroup">REST API Reference for DeletePlacementGroup Operation</seealso>
public virtual Task<DeletePlacementGroupResponse> DeletePlacementGroupAsync(DeletePlacementGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeletePlacementGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeletePlacementGroupResponseUnmarshaller.Instance;
return InvokeAsync<DeletePlacementGroupResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteQueuedReservedInstances
internal virtual DeleteQueuedReservedInstancesResponse DeleteQueuedReservedInstances(DeleteQueuedReservedInstancesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteQueuedReservedInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteQueuedReservedInstancesResponseUnmarshaller.Instance;
return Invoke<DeleteQueuedReservedInstancesResponse>(request, options);
}
/// <summary>
/// Deletes the queued purchases for the specified Reserved Instances.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteQueuedReservedInstances service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteQueuedReservedInstances service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteQueuedReservedInstances">REST API Reference for DeleteQueuedReservedInstances Operation</seealso>
public virtual Task<DeleteQueuedReservedInstancesResponse> DeleteQueuedReservedInstancesAsync(DeleteQueuedReservedInstancesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteQueuedReservedInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteQueuedReservedInstancesResponseUnmarshaller.Instance;
return InvokeAsync<DeleteQueuedReservedInstancesResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteRoute
internal virtual DeleteRouteResponse DeleteRoute(DeleteRouteRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteRouteRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteRouteResponseUnmarshaller.Instance;
return Invoke<DeleteRouteResponse>(request, options);
}
/// <summary>
/// Deletes the specified route from the specified route table.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteRoute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteRoute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRoute">REST API Reference for DeleteRoute Operation</seealso>
public virtual Task<DeleteRouteResponse> DeleteRouteAsync(DeleteRouteRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteRouteRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteRouteResponseUnmarshaller.Instance;
return InvokeAsync<DeleteRouteResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteRouteTable
internal virtual DeleteRouteTableResponse DeleteRouteTable(DeleteRouteTableRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteRouteTableRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteRouteTableResponseUnmarshaller.Instance;
return Invoke<DeleteRouteTableResponse>(request, options);
}
/// <summary>
/// Deletes the specified route table. You must disassociate the route table from any
/// subnets before you can delete it. You can't delete the main route table.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteRouteTable service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteRouteTable service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRouteTable">REST API Reference for DeleteRouteTable Operation</seealso>
public virtual Task<DeleteRouteTableResponse> DeleteRouteTableAsync(DeleteRouteTableRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteRouteTableRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteRouteTableResponseUnmarshaller.Instance;
return InvokeAsync<DeleteRouteTableResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteSecurityGroup
internal virtual DeleteSecurityGroupResponse DeleteSecurityGroup(DeleteSecurityGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteSecurityGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteSecurityGroupResponseUnmarshaller.Instance;
return Invoke<DeleteSecurityGroupResponse>(request, options);
}
/// <summary>
/// Deletes a security group.
///
///
/// <para>
/// If you attempt to delete a security group that is associated with an instance, or
/// is referenced by another security group, the operation fails with <code>InvalidGroup.InUse</code>
/// in EC2-Classic or <code>DependencyViolation</code> in EC2-VPC.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteSecurityGroup service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteSecurityGroup service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSecurityGroup">REST API Reference for DeleteSecurityGroup Operation</seealso>
public virtual Task<DeleteSecurityGroupResponse> DeleteSecurityGroupAsync(DeleteSecurityGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteSecurityGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteSecurityGroupResponseUnmarshaller.Instance;
return InvokeAsync<DeleteSecurityGroupResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteSnapshot
internal virtual DeleteSnapshotResponse DeleteSnapshot(DeleteSnapshotRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteSnapshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteSnapshotResponseUnmarshaller.Instance;
return Invoke<DeleteSnapshotResponse>(request, options);
}
/// <summary>
/// Deletes the specified snapshot.
///
///
/// <para>
/// When you make periodic snapshots of a volume, the snapshots are incremental, and only
/// the blocks on the device that have changed since your last snapshot are saved in the
/// new snapshot. When you delete a snapshot, only the data not needed for any other snapshot
/// is removed. So regardless of which prior snapshots have been deleted, all active snapshots
/// will have access to all the information needed to restore the volume.
/// </para>
///
/// <para>
/// You cannot delete a snapshot of the root device of an EBS volume used by a registered
/// AMI. You must first de-register the AMI before you can delete the snapshot.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-snapshot.html">Deleting
/// an Amazon EBS Snapshot</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteSnapshot service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteSnapshot service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSnapshot">REST API Reference for DeleteSnapshot Operation</seealso>
public virtual Task<DeleteSnapshotResponse> DeleteSnapshotAsync(DeleteSnapshotRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteSnapshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteSnapshotResponseUnmarshaller.Instance;
return InvokeAsync<DeleteSnapshotResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteSpotDatafeedSubscription
internal virtual DeleteSpotDatafeedSubscriptionResponse DeleteSpotDatafeedSubscription()
{
return DeleteSpotDatafeedSubscription(new DeleteSpotDatafeedSubscriptionRequest());
}
internal virtual DeleteSpotDatafeedSubscriptionResponse DeleteSpotDatafeedSubscription(DeleteSpotDatafeedSubscriptionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteSpotDatafeedSubscriptionRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteSpotDatafeedSubscriptionResponseUnmarshaller.Instance;
return Invoke<DeleteSpotDatafeedSubscriptionResponse>(request, options);
}
/// <summary>
/// Deletes the data feed for Spot Instances.
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteSpotDatafeedSubscription service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSpotDatafeedSubscription">REST API Reference for DeleteSpotDatafeedSubscription Operation</seealso>
public virtual Task<DeleteSpotDatafeedSubscriptionResponse> DeleteSpotDatafeedSubscriptionAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DeleteSpotDatafeedSubscriptionAsync(new DeleteSpotDatafeedSubscriptionRequest(), cancellationToken);
}
/// <summary>
/// Deletes the data feed for Spot Instances.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteSpotDatafeedSubscription service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteSpotDatafeedSubscription service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSpotDatafeedSubscription">REST API Reference for DeleteSpotDatafeedSubscription Operation</seealso>
public virtual Task<DeleteSpotDatafeedSubscriptionResponse> DeleteSpotDatafeedSubscriptionAsync(DeleteSpotDatafeedSubscriptionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteSpotDatafeedSubscriptionRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteSpotDatafeedSubscriptionResponseUnmarshaller.Instance;
return InvokeAsync<DeleteSpotDatafeedSubscriptionResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteSubnet
internal virtual DeleteSubnetResponse DeleteSubnet(DeleteSubnetRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteSubnetRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteSubnetResponseUnmarshaller.Instance;
return Invoke<DeleteSubnetResponse>(request, options);
}
/// <summary>
/// Deletes the specified subnet. You must terminate all running instances in the subnet
/// before you can delete the subnet.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteSubnet service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteSubnet service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSubnet">REST API Reference for DeleteSubnet Operation</seealso>
public virtual Task<DeleteSubnetResponse> DeleteSubnetAsync(DeleteSubnetRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteSubnetRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteSubnetResponseUnmarshaller.Instance;
return InvokeAsync<DeleteSubnetResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteTags
internal virtual DeleteTagsResponse DeleteTags(DeleteTagsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteTagsResponseUnmarshaller.Instance;
return Invoke<DeleteTagsResponse>(request, options);
}
/// <summary>
/// Deletes the specified set of tags from the specified set of resources.
///
///
/// <para>
/// To list the current tags, use <a>DescribeTags</a>. For more information about tags,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html">Tagging
/// Your Resources</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteTags service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteTags service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTags">REST API Reference for DeleteTags Operation</seealso>
public virtual Task<DeleteTagsResponse> DeleteTagsAsync(DeleteTagsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteTagsResponseUnmarshaller.Instance;
return InvokeAsync<DeleteTagsResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteTrafficMirrorFilter
internal virtual DeleteTrafficMirrorFilterResponse DeleteTrafficMirrorFilter(DeleteTrafficMirrorFilterRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteTrafficMirrorFilterRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteTrafficMirrorFilterResponseUnmarshaller.Instance;
return Invoke<DeleteTrafficMirrorFilterResponse>(request, options);
}
/// <summary>
/// Deletes the specified Traffic Mirror filter.
///
///
/// <para>
/// You cannot delete a Traffic Mirror filter that is in use by a Traffic Mirror session.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteTrafficMirrorFilter service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteTrafficMirrorFilter service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTrafficMirrorFilter">REST API Reference for DeleteTrafficMirrorFilter Operation</seealso>
public virtual Task<DeleteTrafficMirrorFilterResponse> DeleteTrafficMirrorFilterAsync(DeleteTrafficMirrorFilterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteTrafficMirrorFilterRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteTrafficMirrorFilterResponseUnmarshaller.Instance;
return InvokeAsync<DeleteTrafficMirrorFilterResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteTrafficMirrorFilterRule
internal virtual DeleteTrafficMirrorFilterRuleResponse DeleteTrafficMirrorFilterRule(DeleteTrafficMirrorFilterRuleRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteTrafficMirrorFilterRuleRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteTrafficMirrorFilterRuleResponseUnmarshaller.Instance;
return Invoke<DeleteTrafficMirrorFilterRuleResponse>(request, options);
}
/// <summary>
/// Deletes the specified Traffic Mirror rule.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteTrafficMirrorFilterRule service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteTrafficMirrorFilterRule service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTrafficMirrorFilterRule">REST API Reference for DeleteTrafficMirrorFilterRule Operation</seealso>
public virtual Task<DeleteTrafficMirrorFilterRuleResponse> DeleteTrafficMirrorFilterRuleAsync(DeleteTrafficMirrorFilterRuleRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteTrafficMirrorFilterRuleRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteTrafficMirrorFilterRuleResponseUnmarshaller.Instance;
return InvokeAsync<DeleteTrafficMirrorFilterRuleResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteTrafficMirrorSession
internal virtual DeleteTrafficMirrorSessionResponse DeleteTrafficMirrorSession(DeleteTrafficMirrorSessionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteTrafficMirrorSessionRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteTrafficMirrorSessionResponseUnmarshaller.Instance;
return Invoke<DeleteTrafficMirrorSessionResponse>(request, options);
}
/// <summary>
/// Deletes the specified Traffic Mirror session.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteTrafficMirrorSession service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteTrafficMirrorSession service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTrafficMirrorSession">REST API Reference for DeleteTrafficMirrorSession Operation</seealso>
public virtual Task<DeleteTrafficMirrorSessionResponse> DeleteTrafficMirrorSessionAsync(DeleteTrafficMirrorSessionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteTrafficMirrorSessionRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteTrafficMirrorSessionResponseUnmarshaller.Instance;
return InvokeAsync<DeleteTrafficMirrorSessionResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteTrafficMirrorTarget
internal virtual DeleteTrafficMirrorTargetResponse DeleteTrafficMirrorTarget(DeleteTrafficMirrorTargetRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteTrafficMirrorTargetRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteTrafficMirrorTargetResponseUnmarshaller.Instance;
return Invoke<DeleteTrafficMirrorTargetResponse>(request, options);
}
/// <summary>
/// Deletes the specified Traffic Mirror target.
///
///
/// <para>
/// You cannot delete a Traffic Mirror target that is in use by a Traffic Mirror session.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteTrafficMirrorTarget service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteTrafficMirrorTarget service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTrafficMirrorTarget">REST API Reference for DeleteTrafficMirrorTarget Operation</seealso>
public virtual Task<DeleteTrafficMirrorTargetResponse> DeleteTrafficMirrorTargetAsync(DeleteTrafficMirrorTargetRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteTrafficMirrorTargetRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteTrafficMirrorTargetResponseUnmarshaller.Instance;
return InvokeAsync<DeleteTrafficMirrorTargetResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteTransitGateway
internal virtual DeleteTransitGatewayResponse DeleteTransitGateway(DeleteTransitGatewayRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteTransitGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteTransitGatewayResponseUnmarshaller.Instance;
return Invoke<DeleteTransitGatewayResponse>(request, options);
}
/// <summary>
/// Deletes the specified transit gateway.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteTransitGateway service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteTransitGateway service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTransitGateway">REST API Reference for DeleteTransitGateway Operation</seealso>
public virtual Task<DeleteTransitGatewayResponse> DeleteTransitGatewayAsync(DeleteTransitGatewayRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteTransitGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteTransitGatewayResponseUnmarshaller.Instance;
return InvokeAsync<DeleteTransitGatewayResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteTransitGatewayMulticastDomain
internal virtual DeleteTransitGatewayMulticastDomainResponse DeleteTransitGatewayMulticastDomain(DeleteTransitGatewayMulticastDomainRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteTransitGatewayMulticastDomainRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteTransitGatewayMulticastDomainResponseUnmarshaller.Instance;
return Invoke<DeleteTransitGatewayMulticastDomainResponse>(request, options);
}
/// <summary>
/// Deletes the specified transit gateway multicast domain.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteTransitGatewayMulticastDomain service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteTransitGatewayMulticastDomain service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTransitGatewayMulticastDomain">REST API Reference for DeleteTransitGatewayMulticastDomain Operation</seealso>
public virtual Task<DeleteTransitGatewayMulticastDomainResponse> DeleteTransitGatewayMulticastDomainAsync(DeleteTransitGatewayMulticastDomainRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteTransitGatewayMulticastDomainRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteTransitGatewayMulticastDomainResponseUnmarshaller.Instance;
return InvokeAsync<DeleteTransitGatewayMulticastDomainResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteTransitGatewayPeeringAttachment
internal virtual DeleteTransitGatewayPeeringAttachmentResponse DeleteTransitGatewayPeeringAttachment(DeleteTransitGatewayPeeringAttachmentRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteTransitGatewayPeeringAttachmentRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteTransitGatewayPeeringAttachmentResponseUnmarshaller.Instance;
return Invoke<DeleteTransitGatewayPeeringAttachmentResponse>(request, options);
}
/// <summary>
/// Deletes a transit gateway peering attachment.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteTransitGatewayPeeringAttachment service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteTransitGatewayPeeringAttachment service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTransitGatewayPeeringAttachment">REST API Reference for DeleteTransitGatewayPeeringAttachment Operation</seealso>
public virtual Task<DeleteTransitGatewayPeeringAttachmentResponse> DeleteTransitGatewayPeeringAttachmentAsync(DeleteTransitGatewayPeeringAttachmentRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteTransitGatewayPeeringAttachmentRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteTransitGatewayPeeringAttachmentResponseUnmarshaller.Instance;
return InvokeAsync<DeleteTransitGatewayPeeringAttachmentResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteTransitGatewayRoute
internal virtual DeleteTransitGatewayRouteResponse DeleteTransitGatewayRoute(DeleteTransitGatewayRouteRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteTransitGatewayRouteRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteTransitGatewayRouteResponseUnmarshaller.Instance;
return Invoke<DeleteTransitGatewayRouteResponse>(request, options);
}
/// <summary>
/// Deletes the specified route from the specified transit gateway route table.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteTransitGatewayRoute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteTransitGatewayRoute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTransitGatewayRoute">REST API Reference for DeleteTransitGatewayRoute Operation</seealso>
public virtual Task<DeleteTransitGatewayRouteResponse> DeleteTransitGatewayRouteAsync(DeleteTransitGatewayRouteRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteTransitGatewayRouteRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteTransitGatewayRouteResponseUnmarshaller.Instance;
return InvokeAsync<DeleteTransitGatewayRouteResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteTransitGatewayRouteTable
internal virtual DeleteTransitGatewayRouteTableResponse DeleteTransitGatewayRouteTable(DeleteTransitGatewayRouteTableRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteTransitGatewayRouteTableRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteTransitGatewayRouteTableResponseUnmarshaller.Instance;
return Invoke<DeleteTransitGatewayRouteTableResponse>(request, options);
}
/// <summary>
/// Deletes the specified transit gateway route table. You must disassociate the route
/// table from any transit gateway route tables before you can delete it.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteTransitGatewayRouteTable service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteTransitGatewayRouteTable service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTransitGatewayRouteTable">REST API Reference for DeleteTransitGatewayRouteTable Operation</seealso>
public virtual Task<DeleteTransitGatewayRouteTableResponse> DeleteTransitGatewayRouteTableAsync(DeleteTransitGatewayRouteTableRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteTransitGatewayRouteTableRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteTransitGatewayRouteTableResponseUnmarshaller.Instance;
return InvokeAsync<DeleteTransitGatewayRouteTableResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteTransitGatewayVpcAttachment
internal virtual DeleteTransitGatewayVpcAttachmentResponse DeleteTransitGatewayVpcAttachment(DeleteTransitGatewayVpcAttachmentRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteTransitGatewayVpcAttachmentRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteTransitGatewayVpcAttachmentResponseUnmarshaller.Instance;
return Invoke<DeleteTransitGatewayVpcAttachmentResponse>(request, options);
}
/// <summary>
/// Deletes the specified VPC attachment.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteTransitGatewayVpcAttachment service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteTransitGatewayVpcAttachment service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTransitGatewayVpcAttachment">REST API Reference for DeleteTransitGatewayVpcAttachment Operation</seealso>
public virtual Task<DeleteTransitGatewayVpcAttachmentResponse> DeleteTransitGatewayVpcAttachmentAsync(DeleteTransitGatewayVpcAttachmentRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteTransitGatewayVpcAttachmentRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteTransitGatewayVpcAttachmentResponseUnmarshaller.Instance;
return InvokeAsync<DeleteTransitGatewayVpcAttachmentResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteVolume
internal virtual DeleteVolumeResponse DeleteVolume(DeleteVolumeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteVolumeRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteVolumeResponseUnmarshaller.Instance;
return Invoke<DeleteVolumeResponse>(request, options);
}
/// <summary>
/// Deletes the specified EBS volume. The volume must be in the <code>available</code>
/// state (not attached to an instance).
///
///
/// <para>
/// The volume can remain in the <code>deleting</code> state for several minutes.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-volume.html">Deleting
/// an Amazon EBS Volume</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteVolume service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteVolume service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVolume">REST API Reference for DeleteVolume Operation</seealso>
public virtual Task<DeleteVolumeResponse> DeleteVolumeAsync(DeleteVolumeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteVolumeRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteVolumeResponseUnmarshaller.Instance;
return InvokeAsync<DeleteVolumeResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteVpc
internal virtual DeleteVpcResponse DeleteVpc(DeleteVpcRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteVpcRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteVpcResponseUnmarshaller.Instance;
return Invoke<DeleteVpcResponse>(request, options);
}
/// <summary>
/// Deletes the specified VPC. You must detach or delete all gateways and resources that
/// are associated with the VPC before you can delete it. For example, you must terminate
/// all instances running in the VPC, delete all security groups associated with the VPC
/// (except the default one), delete all route tables associated with the VPC (except
/// the default one), and so on.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteVpc service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteVpc service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpc">REST API Reference for DeleteVpc Operation</seealso>
public virtual Task<DeleteVpcResponse> DeleteVpcAsync(DeleteVpcRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteVpcRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteVpcResponseUnmarshaller.Instance;
return InvokeAsync<DeleteVpcResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteVpcEndpointConnectionNotifications
internal virtual DeleteVpcEndpointConnectionNotificationsResponse DeleteVpcEndpointConnectionNotifications(DeleteVpcEndpointConnectionNotificationsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteVpcEndpointConnectionNotificationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteVpcEndpointConnectionNotificationsResponseUnmarshaller.Instance;
return Invoke<DeleteVpcEndpointConnectionNotificationsResponse>(request, options);
}
/// <summary>
/// Deletes one or more VPC endpoint connection notifications.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteVpcEndpointConnectionNotifications service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteVpcEndpointConnectionNotifications service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcEndpointConnectionNotifications">REST API Reference for DeleteVpcEndpointConnectionNotifications Operation</seealso>
public virtual Task<DeleteVpcEndpointConnectionNotificationsResponse> DeleteVpcEndpointConnectionNotificationsAsync(DeleteVpcEndpointConnectionNotificationsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteVpcEndpointConnectionNotificationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteVpcEndpointConnectionNotificationsResponseUnmarshaller.Instance;
return InvokeAsync<DeleteVpcEndpointConnectionNotificationsResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteVpcEndpoints
internal virtual DeleteVpcEndpointsResponse DeleteVpcEndpoints(DeleteVpcEndpointsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteVpcEndpointsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteVpcEndpointsResponseUnmarshaller.Instance;
return Invoke<DeleteVpcEndpointsResponse>(request, options);
}
/// <summary>
/// Deletes one or more specified VPC endpoints. Deleting a gateway endpoint also deletes
/// the endpoint routes in the route tables that were associated with the endpoint. Deleting
/// an interface endpoint deletes the endpoint network interfaces.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteVpcEndpoints service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteVpcEndpoints service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcEndpoints">REST API Reference for DeleteVpcEndpoints Operation</seealso>
public virtual Task<DeleteVpcEndpointsResponse> DeleteVpcEndpointsAsync(DeleteVpcEndpointsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteVpcEndpointsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteVpcEndpointsResponseUnmarshaller.Instance;
return InvokeAsync<DeleteVpcEndpointsResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteVpcEndpointServiceConfigurations
internal virtual DeleteVpcEndpointServiceConfigurationsResponse DeleteVpcEndpointServiceConfigurations(DeleteVpcEndpointServiceConfigurationsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteVpcEndpointServiceConfigurationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteVpcEndpointServiceConfigurationsResponseUnmarshaller.Instance;
return Invoke<DeleteVpcEndpointServiceConfigurationsResponse>(request, options);
}
/// <summary>
/// Deletes one or more VPC endpoint service configurations in your account. Before you
/// delete the endpoint service configuration, you must reject any <code>Available</code>
/// or <code>PendingAcceptance</code> interface endpoint connections that are attached
/// to the service.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteVpcEndpointServiceConfigurations service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteVpcEndpointServiceConfigurations service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcEndpointServiceConfigurations">REST API Reference for DeleteVpcEndpointServiceConfigurations Operation</seealso>
public virtual Task<DeleteVpcEndpointServiceConfigurationsResponse> DeleteVpcEndpointServiceConfigurationsAsync(DeleteVpcEndpointServiceConfigurationsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteVpcEndpointServiceConfigurationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteVpcEndpointServiceConfigurationsResponseUnmarshaller.Instance;
return InvokeAsync<DeleteVpcEndpointServiceConfigurationsResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteVpcPeeringConnection
internal virtual DeleteVpcPeeringConnectionResponse DeleteVpcPeeringConnection(DeleteVpcPeeringConnectionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteVpcPeeringConnectionRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteVpcPeeringConnectionResponseUnmarshaller.Instance;
return Invoke<DeleteVpcPeeringConnectionResponse>(request, options);
}
/// <summary>
/// Deletes a VPC peering connection. Either the owner of the requester VPC or the owner
/// of the accepter VPC can delete the VPC peering connection if it's in the <code>active</code>
/// state. The owner of the requester VPC can delete a VPC peering connection in the <code>pending-acceptance</code>
/// state. You cannot delete a VPC peering connection that's in the <code>failed</code>
/// state.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteVpcPeeringConnection service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteVpcPeeringConnection service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcPeeringConnection">REST API Reference for DeleteVpcPeeringConnection Operation</seealso>
public virtual Task<DeleteVpcPeeringConnectionResponse> DeleteVpcPeeringConnectionAsync(DeleteVpcPeeringConnectionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteVpcPeeringConnectionRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteVpcPeeringConnectionResponseUnmarshaller.Instance;
return InvokeAsync<DeleteVpcPeeringConnectionResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteVpnConnection
internal virtual DeleteVpnConnectionResponse DeleteVpnConnection(DeleteVpnConnectionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteVpnConnectionRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteVpnConnectionResponseUnmarshaller.Instance;
return Invoke<DeleteVpnConnectionResponse>(request, options);
}
/// <summary>
/// Deletes the specified VPN connection.
///
///
/// <para>
/// If you're deleting the VPC and its associated components, we recommend that you detach
/// the virtual private gateway from the VPC and delete the VPC before deleting the VPN
/// connection. If you believe that the tunnel credentials for your VPN connection have
/// been compromised, you can delete the VPN connection and create a new one that has
/// new keys, without needing to delete the VPC or virtual private gateway. If you create
/// a new VPN connection, you must reconfigure the customer gateway device using the new
/// configuration information returned with the new VPN connection ID.
/// </para>
///
/// <para>
/// For certificate-based authentication, delete all AWS Certificate Manager (ACM) private
/// certificates used for the AWS-side tunnel endpoints for the VPN connection before
/// deleting the VPN connection.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteVpnConnection service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteVpnConnection service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnConnection">REST API Reference for DeleteVpnConnection Operation</seealso>
public virtual Task<DeleteVpnConnectionResponse> DeleteVpnConnectionAsync(DeleteVpnConnectionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteVpnConnectionRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteVpnConnectionResponseUnmarshaller.Instance;
return InvokeAsync<DeleteVpnConnectionResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteVpnConnectionRoute
internal virtual DeleteVpnConnectionRouteResponse DeleteVpnConnectionRoute(DeleteVpnConnectionRouteRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteVpnConnectionRouteRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteVpnConnectionRouteResponseUnmarshaller.Instance;
return Invoke<DeleteVpnConnectionRouteResponse>(request, options);
}
/// <summary>
/// Deletes the specified static route associated with a VPN connection between an existing
/// virtual private gateway and a VPN customer gateway. The static route allows traffic
/// to be routed from the virtual private gateway to the VPN customer gateway.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteVpnConnectionRoute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteVpnConnectionRoute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnConnectionRoute">REST API Reference for DeleteVpnConnectionRoute Operation</seealso>
public virtual Task<DeleteVpnConnectionRouteResponse> DeleteVpnConnectionRouteAsync(DeleteVpnConnectionRouteRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteVpnConnectionRouteRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteVpnConnectionRouteResponseUnmarshaller.Instance;
return InvokeAsync<DeleteVpnConnectionRouteResponse>(request, options, cancellationToken);
}
#endregion
#region DeleteVpnGateway
internal virtual DeleteVpnGatewayResponse DeleteVpnGateway(DeleteVpnGatewayRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteVpnGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteVpnGatewayResponseUnmarshaller.Instance;
return Invoke<DeleteVpnGatewayResponse>(request, options);
}
/// <summary>
/// Deletes the specified virtual private gateway. You must first detach the virtual private
/// gateway from the VPC. Note that you don't need to delete the virtual private gateway
/// if you plan to delete and recreate the VPN connection between your VPC and your network.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeleteVpnGateway service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeleteVpnGateway service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnGateway">REST API Reference for DeleteVpnGateway Operation</seealso>
public virtual Task<DeleteVpnGatewayResponse> DeleteVpnGatewayAsync(DeleteVpnGatewayRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteVpnGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteVpnGatewayResponseUnmarshaller.Instance;
return InvokeAsync<DeleteVpnGatewayResponse>(request, options, cancellationToken);
}
#endregion
#region DeprovisionByoipCidr
internal virtual DeprovisionByoipCidrResponse DeprovisionByoipCidr(DeprovisionByoipCidrRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeprovisionByoipCidrRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeprovisionByoipCidrResponseUnmarshaller.Instance;
return Invoke<DeprovisionByoipCidrResponse>(request, options);
}
/// <summary>
/// Releases the specified address range that you provisioned for use with your AWS resources
/// through bring your own IP addresses (BYOIP) and deletes the corresponding address
/// pool.
///
///
/// <para>
/// Before you can release an address range, you must stop advertising it using <a>WithdrawByoipCidr</a>
/// and you must not have any IP addresses allocated from its address range.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeprovisionByoipCidr service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeprovisionByoipCidr service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeprovisionByoipCidr">REST API Reference for DeprovisionByoipCidr Operation</seealso>
public virtual Task<DeprovisionByoipCidrResponse> DeprovisionByoipCidrAsync(DeprovisionByoipCidrRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeprovisionByoipCidrRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeprovisionByoipCidrResponseUnmarshaller.Instance;
return InvokeAsync<DeprovisionByoipCidrResponse>(request, options, cancellationToken);
}
#endregion
#region DeregisterImage
internal virtual DeregisterImageResponse DeregisterImage(DeregisterImageRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeregisterImageRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeregisterImageResponseUnmarshaller.Instance;
return Invoke<DeregisterImageResponse>(request, options);
}
/// <summary>
/// Deregisters the specified AMI. After you deregister an AMI, it can't be used to launch
/// new instances; however, it doesn't affect any instances that you've already launched
/// from the AMI. You'll continue to incur usage costs for those instances until you terminate
/// them.
///
///
/// <para>
/// When you deregister an Amazon EBS-backed AMI, it doesn't affect the snapshot that
/// was created for the root volume of the instance during the AMI creation process. When
/// you deregister an instance store-backed AMI, it doesn't affect the files that you
/// uploaded to Amazon S3 when you created the AMI.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeregisterImage service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeregisterImage service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeregisterImage">REST API Reference for DeregisterImage Operation</seealso>
public virtual Task<DeregisterImageResponse> DeregisterImageAsync(DeregisterImageRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeregisterImageRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeregisterImageResponseUnmarshaller.Instance;
return InvokeAsync<DeregisterImageResponse>(request, options, cancellationToken);
}
#endregion
#region DeregisterInstanceEventNotificationAttributes
internal virtual DeregisterInstanceEventNotificationAttributesResponse DeregisterInstanceEventNotificationAttributes(DeregisterInstanceEventNotificationAttributesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeregisterInstanceEventNotificationAttributesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeregisterInstanceEventNotificationAttributesResponseUnmarshaller.Instance;
return Invoke<DeregisterInstanceEventNotificationAttributesResponse>(request, options);
}
/// <summary>
/// Deregisters tag keys to prevent tags that have the specified tag keys from being included
/// in scheduled event notifications for resources in the Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeregisterInstanceEventNotificationAttributes service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeregisterInstanceEventNotificationAttributes service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeregisterInstanceEventNotificationAttributes">REST API Reference for DeregisterInstanceEventNotificationAttributes Operation</seealso>
public virtual Task<DeregisterInstanceEventNotificationAttributesResponse> DeregisterInstanceEventNotificationAttributesAsync(DeregisterInstanceEventNotificationAttributesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeregisterInstanceEventNotificationAttributesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeregisterInstanceEventNotificationAttributesResponseUnmarshaller.Instance;
return InvokeAsync<DeregisterInstanceEventNotificationAttributesResponse>(request, options, cancellationToken);
}
#endregion
#region DeregisterTransitGatewayMulticastGroupMembers
internal virtual DeregisterTransitGatewayMulticastGroupMembersResponse DeregisterTransitGatewayMulticastGroupMembers(DeregisterTransitGatewayMulticastGroupMembersRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeregisterTransitGatewayMulticastGroupMembersRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeregisterTransitGatewayMulticastGroupMembersResponseUnmarshaller.Instance;
return Invoke<DeregisterTransitGatewayMulticastGroupMembersResponse>(request, options);
}
/// <summary>
/// Deregisters the specified members (network interfaces) from the transit gateway multicast
/// group.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeregisterTransitGatewayMulticastGroupMembers service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeregisterTransitGatewayMulticastGroupMembers service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeregisterTransitGatewayMulticastGroupMembers">REST API Reference for DeregisterTransitGatewayMulticastGroupMembers Operation</seealso>
public virtual Task<DeregisterTransitGatewayMulticastGroupMembersResponse> DeregisterTransitGatewayMulticastGroupMembersAsync(DeregisterTransitGatewayMulticastGroupMembersRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeregisterTransitGatewayMulticastGroupMembersRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeregisterTransitGatewayMulticastGroupMembersResponseUnmarshaller.Instance;
return InvokeAsync<DeregisterTransitGatewayMulticastGroupMembersResponse>(request, options, cancellationToken);
}
#endregion
#region DeregisterTransitGatewayMulticastGroupSources
internal virtual DeregisterTransitGatewayMulticastGroupSourcesResponse DeregisterTransitGatewayMulticastGroupSources(DeregisterTransitGatewayMulticastGroupSourcesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeregisterTransitGatewayMulticastGroupSourcesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeregisterTransitGatewayMulticastGroupSourcesResponseUnmarshaller.Instance;
return Invoke<DeregisterTransitGatewayMulticastGroupSourcesResponse>(request, options);
}
/// <summary>
/// Deregisters the specified sources (network interfaces) from the transit gateway multicast
/// group.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DeregisterTransitGatewayMulticastGroupSources service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DeregisterTransitGatewayMulticastGroupSources service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeregisterTransitGatewayMulticastGroupSources">REST API Reference for DeregisterTransitGatewayMulticastGroupSources Operation</seealso>
public virtual Task<DeregisterTransitGatewayMulticastGroupSourcesResponse> DeregisterTransitGatewayMulticastGroupSourcesAsync(DeregisterTransitGatewayMulticastGroupSourcesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeregisterTransitGatewayMulticastGroupSourcesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeregisterTransitGatewayMulticastGroupSourcesResponseUnmarshaller.Instance;
return InvokeAsync<DeregisterTransitGatewayMulticastGroupSourcesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeAccountAttributes
internal virtual DescribeAccountAttributesResponse DescribeAccountAttributes()
{
return DescribeAccountAttributes(new DescribeAccountAttributesRequest());
}
internal virtual DescribeAccountAttributesResponse DescribeAccountAttributes(DescribeAccountAttributesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeAccountAttributesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeAccountAttributesResponseUnmarshaller.Instance;
return Invoke<DescribeAccountAttributesResponse>(request, options);
}
/// <summary>
/// Describes attributes of your AWS account. The following are the supported account
/// attributes:
///
/// <ul> <li>
/// <para>
/// <code>supported-platforms</code>: Indicates whether your account can launch instances
/// into EC2-Classic and EC2-VPC, or only into EC2-VPC.
/// </para>
/// </li> <li>
/// <para>
/// <code>default-vpc</code>: The ID of the default VPC for your account, or <code>none</code>.
/// </para>
/// </li> <li>
/// <para>
/// <code>max-instances</code>: This attribute is no longer supported. The returned value
/// does not reflect your actual vCPU limit for running On-Demand Instances. For more
/// information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-on-demand-instances.html#ec2-on-demand-instances-limits">On-Demand
/// Instance Limits</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </li> <li>
/// <para>
/// <code>vpc-max-security-groups-per-interface</code>: The maximum number of security
/// groups that you can assign to a network interface.
/// </para>
/// </li> <li>
/// <para>
/// <code>max-elastic-ips</code>: The maximum number of Elastic IP addresses that you
/// can allocate for use with EC2-Classic.
/// </para>
/// </li> <li>
/// <para>
/// <code>vpc-max-elastic-ips</code>: The maximum number of Elastic IP addresses that
/// you can allocate for use with EC2-VPC.
/// </para>
/// </li> </ul>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeAccountAttributes service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAccountAttributes">REST API Reference for DescribeAccountAttributes Operation</seealso>
public virtual Task<DescribeAccountAttributesResponse> DescribeAccountAttributesAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeAccountAttributesAsync(new DescribeAccountAttributesRequest(), cancellationToken);
}
/// <summary>
/// Describes attributes of your AWS account. The following are the supported account
/// attributes:
///
/// <ul> <li>
/// <para>
/// <code>supported-platforms</code>: Indicates whether your account can launch instances
/// into EC2-Classic and EC2-VPC, or only into EC2-VPC.
/// </para>
/// </li> <li>
/// <para>
/// <code>default-vpc</code>: The ID of the default VPC for your account, or <code>none</code>.
/// </para>
/// </li> <li>
/// <para>
/// <code>max-instances</code>: This attribute is no longer supported. The returned value
/// does not reflect your actual vCPU limit for running On-Demand Instances. For more
/// information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-on-demand-instances.html#ec2-on-demand-instances-limits">On-Demand
/// Instance Limits</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </li> <li>
/// <para>
/// <code>vpc-max-security-groups-per-interface</code>: The maximum number of security
/// groups that you can assign to a network interface.
/// </para>
/// </li> <li>
/// <para>
/// <code>max-elastic-ips</code>: The maximum number of Elastic IP addresses that you
/// can allocate for use with EC2-Classic.
/// </para>
/// </li> <li>
/// <para>
/// <code>vpc-max-elastic-ips</code>: The maximum number of Elastic IP addresses that
/// you can allocate for use with EC2-VPC.
/// </para>
/// </li> </ul>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeAccountAttributes service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeAccountAttributes service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAccountAttributes">REST API Reference for DescribeAccountAttributes Operation</seealso>
public virtual Task<DescribeAccountAttributesResponse> DescribeAccountAttributesAsync(DescribeAccountAttributesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeAccountAttributesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeAccountAttributesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeAccountAttributesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeAddresses
internal virtual DescribeAddressesResponse DescribeAddresses()
{
return DescribeAddresses(new DescribeAddressesRequest());
}
internal virtual DescribeAddressesResponse DescribeAddresses(DescribeAddressesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeAddressesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeAddressesResponseUnmarshaller.Instance;
return Invoke<DescribeAddressesResponse>(request, options);
}
/// <summary>
/// Describes the specified Elastic IP addresses or all of your Elastic IP addresses.
///
///
/// <para>
/// An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For
/// more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html">Elastic
/// IP Addresses</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeAddresses service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddresses">REST API Reference for DescribeAddresses Operation</seealso>
public virtual Task<DescribeAddressesResponse> DescribeAddressesAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeAddressesAsync(new DescribeAddressesRequest(), cancellationToken);
}
/// <summary>
/// Describes the specified Elastic IP addresses or all of your Elastic IP addresses.
///
///
/// <para>
/// An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For
/// more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html">Elastic
/// IP Addresses</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeAddresses service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeAddresses service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddresses">REST API Reference for DescribeAddresses Operation</seealso>
public virtual Task<DescribeAddressesResponse> DescribeAddressesAsync(DescribeAddressesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeAddressesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeAddressesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeAddressesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeAggregateIdFormat
internal virtual DescribeAggregateIdFormatResponse DescribeAggregateIdFormat(DescribeAggregateIdFormatRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeAggregateIdFormatRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeAggregateIdFormatResponseUnmarshaller.Instance;
return Invoke<DescribeAggregateIdFormatResponse>(request, options);
}
/// <summary>
/// Describes the longer ID format settings for all resource types in a specific Region.
/// This request is useful for performing a quick audit to determine whether a specific
/// Region is fully opted in for longer IDs (17-character IDs).
///
///
/// <para>
/// This request only returns information about resource types that support longer IDs.
/// </para>
///
/// <para>
/// The following resource types support longer IDs: <code>bundle</code> | <code>conversion-task</code>
/// | <code>customer-gateway</code> | <code>dhcp-options</code> | <code>elastic-ip-allocation</code>
/// | <code>elastic-ip-association</code> | <code>export-task</code> | <code>flow-log</code>
/// | <code>image</code> | <code>import-task</code> | <code>instance</code> | <code>internet-gateway</code>
/// | <code>network-acl</code> | <code>network-acl-association</code> | <code>network-interface</code>
/// | <code>network-interface-attachment</code> | <code>prefix-list</code> | <code>reservation</code>
/// | <code>route-table</code> | <code>route-table-association</code> | <code>security-group</code>
/// | <code>snapshot</code> | <code>subnet</code> | <code>subnet-cidr-block-association</code>
/// | <code>volume</code> | <code>vpc</code> | <code>vpc-cidr-block-association</code>
/// | <code>vpc-endpoint</code> | <code>vpc-peering-connection</code> | <code>vpn-connection</code>
/// | <code>vpn-gateway</code>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeAggregateIdFormat service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeAggregateIdFormat service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAggregateIdFormat">REST API Reference for DescribeAggregateIdFormat Operation</seealso>
public virtual Task<DescribeAggregateIdFormatResponse> DescribeAggregateIdFormatAsync(DescribeAggregateIdFormatRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeAggregateIdFormatRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeAggregateIdFormatResponseUnmarshaller.Instance;
return InvokeAsync<DescribeAggregateIdFormatResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeAvailabilityZones
internal virtual DescribeAvailabilityZonesResponse DescribeAvailabilityZones()
{
return DescribeAvailabilityZones(new DescribeAvailabilityZonesRequest());
}
internal virtual DescribeAvailabilityZonesResponse DescribeAvailabilityZones(DescribeAvailabilityZonesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeAvailabilityZonesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeAvailabilityZonesResponseUnmarshaller.Instance;
return Invoke<DescribeAvailabilityZonesResponse>(request, options);
}
/// <summary>
/// Describes the Availability Zones and Local Zones that are available to you. If there
/// is an event impacting an Availability Zone or Local Zone, you can use this request
/// to view the state and any provided messages for that Availability Zone or Local Zone.
///
///
/// <para>
/// For more information about Availability Zones and Local Zones, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html">Regions
/// and Availability Zones</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeAvailabilityZones service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAvailabilityZones">REST API Reference for DescribeAvailabilityZones Operation</seealso>
public virtual Task<DescribeAvailabilityZonesResponse> DescribeAvailabilityZonesAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeAvailabilityZonesAsync(new DescribeAvailabilityZonesRequest(), cancellationToken);
}
/// <summary>
/// Describes the Availability Zones and Local Zones that are available to you. If there
/// is an event impacting an Availability Zone or Local Zone, you can use this request
/// to view the state and any provided messages for that Availability Zone or Local Zone.
///
///
/// <para>
/// For more information about Availability Zones and Local Zones, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html">Regions
/// and Availability Zones</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeAvailabilityZones service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeAvailabilityZones service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAvailabilityZones">REST API Reference for DescribeAvailabilityZones Operation</seealso>
public virtual Task<DescribeAvailabilityZonesResponse> DescribeAvailabilityZonesAsync(DescribeAvailabilityZonesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeAvailabilityZonesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeAvailabilityZonesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeAvailabilityZonesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeBundleTasks
internal virtual DescribeBundleTasksResponse DescribeBundleTasks()
{
return DescribeBundleTasks(new DescribeBundleTasksRequest());
}
internal virtual DescribeBundleTasksResponse DescribeBundleTasks(DescribeBundleTasksRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeBundleTasksRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeBundleTasksResponseUnmarshaller.Instance;
return Invoke<DescribeBundleTasksResponse>(request, options);
}
/// <summary>
/// Describes the specified bundle tasks or all of your bundle tasks.
///
/// <note>
/// <para>
/// Completed bundle tasks are listed for only a limited time. If your bundle task is
/// no longer in the list, you can still register an AMI from it. Just use <code>RegisterImage</code>
/// with the Amazon S3 bucket name and image manifest name you provided to the bundle
/// task.
/// </para>
/// </note>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeBundleTasks service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeBundleTasks">REST API Reference for DescribeBundleTasks Operation</seealso>
public virtual Task<DescribeBundleTasksResponse> DescribeBundleTasksAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeBundleTasksAsync(new DescribeBundleTasksRequest(), cancellationToken);
}
/// <summary>
/// Describes the specified bundle tasks or all of your bundle tasks.
///
/// <note>
/// <para>
/// Completed bundle tasks are listed for only a limited time. If your bundle task is
/// no longer in the list, you can still register an AMI from it. Just use <code>RegisterImage</code>
/// with the Amazon S3 bucket name and image manifest name you provided to the bundle
/// task.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeBundleTasks service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeBundleTasks service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeBundleTasks">REST API Reference for DescribeBundleTasks Operation</seealso>
public virtual Task<DescribeBundleTasksResponse> DescribeBundleTasksAsync(DescribeBundleTasksRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeBundleTasksRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeBundleTasksResponseUnmarshaller.Instance;
return InvokeAsync<DescribeBundleTasksResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeByoipCidrs
internal virtual DescribeByoipCidrsResponse DescribeByoipCidrs(DescribeByoipCidrsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeByoipCidrsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeByoipCidrsResponseUnmarshaller.Instance;
return Invoke<DescribeByoipCidrsResponse>(request, options);
}
/// <summary>
/// Describes the IP address ranges that were specified in calls to <a>ProvisionByoipCidr</a>.
///
///
/// <para>
/// To describe the address pools that were created when you provisioned the address ranges,
/// use <a>DescribePublicIpv4Pools</a> or <a>DescribeIpv6Pools</a>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeByoipCidrs service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeByoipCidrs service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeByoipCidrs">REST API Reference for DescribeByoipCidrs Operation</seealso>
public virtual Task<DescribeByoipCidrsResponse> DescribeByoipCidrsAsync(DescribeByoipCidrsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeByoipCidrsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeByoipCidrsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeByoipCidrsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeCapacityReservations
internal virtual DescribeCapacityReservationsResponse DescribeCapacityReservations(DescribeCapacityReservationsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeCapacityReservationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeCapacityReservationsResponseUnmarshaller.Instance;
return Invoke<DescribeCapacityReservationsResponse>(request, options);
}
/// <summary>
/// Describes one or more of your Capacity Reservations. The results describe only the
/// Capacity Reservations in the AWS Region that you're currently using.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeCapacityReservations service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeCapacityReservations service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeCapacityReservations">REST API Reference for DescribeCapacityReservations Operation</seealso>
public virtual Task<DescribeCapacityReservationsResponse> DescribeCapacityReservationsAsync(DescribeCapacityReservationsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeCapacityReservationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeCapacityReservationsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeCapacityReservationsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeClassicLinkInstances
internal virtual DescribeClassicLinkInstancesResponse DescribeClassicLinkInstances(DescribeClassicLinkInstancesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeClassicLinkInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeClassicLinkInstancesResponseUnmarshaller.Instance;
return Invoke<DescribeClassicLinkInstancesResponse>(request, options);
}
/// <summary>
/// Describes one or more of your linked EC2-Classic instances. This request only returns
/// information about EC2-Classic instances linked to a VPC through ClassicLink. You cannot
/// use this request to return information about other instances.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeClassicLinkInstances service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeClassicLinkInstances service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClassicLinkInstances">REST API Reference for DescribeClassicLinkInstances Operation</seealso>
public virtual Task<DescribeClassicLinkInstancesResponse> DescribeClassicLinkInstancesAsync(DescribeClassicLinkInstancesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeClassicLinkInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeClassicLinkInstancesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeClassicLinkInstancesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeClientVpnAuthorizationRules
internal virtual DescribeClientVpnAuthorizationRulesResponse DescribeClientVpnAuthorizationRules(DescribeClientVpnAuthorizationRulesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeClientVpnAuthorizationRulesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeClientVpnAuthorizationRulesResponseUnmarshaller.Instance;
return Invoke<DescribeClientVpnAuthorizationRulesResponse>(request, options);
}
/// <summary>
/// Describes the authorization rules for a specified Client VPN endpoint.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeClientVpnAuthorizationRules service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeClientVpnAuthorizationRules service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnAuthorizationRules">REST API Reference for DescribeClientVpnAuthorizationRules Operation</seealso>
public virtual Task<DescribeClientVpnAuthorizationRulesResponse> DescribeClientVpnAuthorizationRulesAsync(DescribeClientVpnAuthorizationRulesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeClientVpnAuthorizationRulesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeClientVpnAuthorizationRulesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeClientVpnAuthorizationRulesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeClientVpnConnections
internal virtual DescribeClientVpnConnectionsResponse DescribeClientVpnConnections(DescribeClientVpnConnectionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeClientVpnConnectionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeClientVpnConnectionsResponseUnmarshaller.Instance;
return Invoke<DescribeClientVpnConnectionsResponse>(request, options);
}
/// <summary>
/// Describes active client connections and connections that have been terminated within
/// the last 60 minutes for the specified Client VPN endpoint.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeClientVpnConnections service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeClientVpnConnections service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnConnections">REST API Reference for DescribeClientVpnConnections Operation</seealso>
public virtual Task<DescribeClientVpnConnectionsResponse> DescribeClientVpnConnectionsAsync(DescribeClientVpnConnectionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeClientVpnConnectionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeClientVpnConnectionsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeClientVpnConnectionsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeClientVpnEndpoints
internal virtual DescribeClientVpnEndpointsResponse DescribeClientVpnEndpoints(DescribeClientVpnEndpointsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeClientVpnEndpointsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeClientVpnEndpointsResponseUnmarshaller.Instance;
return Invoke<DescribeClientVpnEndpointsResponse>(request, options);
}
/// <summary>
/// Describes one or more Client VPN endpoints in the account.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeClientVpnEndpoints service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeClientVpnEndpoints service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnEndpoints">REST API Reference for DescribeClientVpnEndpoints Operation</seealso>
public virtual Task<DescribeClientVpnEndpointsResponse> DescribeClientVpnEndpointsAsync(DescribeClientVpnEndpointsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeClientVpnEndpointsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeClientVpnEndpointsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeClientVpnEndpointsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeClientVpnRoutes
internal virtual DescribeClientVpnRoutesResponse DescribeClientVpnRoutes(DescribeClientVpnRoutesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeClientVpnRoutesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeClientVpnRoutesResponseUnmarshaller.Instance;
return Invoke<DescribeClientVpnRoutesResponse>(request, options);
}
/// <summary>
/// Describes the routes for the specified Client VPN endpoint.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeClientVpnRoutes service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeClientVpnRoutes service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnRoutes">REST API Reference for DescribeClientVpnRoutes Operation</seealso>
public virtual Task<DescribeClientVpnRoutesResponse> DescribeClientVpnRoutesAsync(DescribeClientVpnRoutesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeClientVpnRoutesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeClientVpnRoutesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeClientVpnRoutesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeClientVpnTargetNetworks
internal virtual DescribeClientVpnTargetNetworksResponse DescribeClientVpnTargetNetworks(DescribeClientVpnTargetNetworksRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeClientVpnTargetNetworksRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeClientVpnTargetNetworksResponseUnmarshaller.Instance;
return Invoke<DescribeClientVpnTargetNetworksResponse>(request, options);
}
/// <summary>
/// Describes the target networks associated with the specified Client VPN endpoint.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeClientVpnTargetNetworks service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeClientVpnTargetNetworks service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnTargetNetworks">REST API Reference for DescribeClientVpnTargetNetworks Operation</seealso>
public virtual Task<DescribeClientVpnTargetNetworksResponse> DescribeClientVpnTargetNetworksAsync(DescribeClientVpnTargetNetworksRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeClientVpnTargetNetworksRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeClientVpnTargetNetworksResponseUnmarshaller.Instance;
return InvokeAsync<DescribeClientVpnTargetNetworksResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeCoipPools
internal virtual DescribeCoipPoolsResponse DescribeCoipPools(DescribeCoipPoolsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeCoipPoolsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeCoipPoolsResponseUnmarshaller.Instance;
return Invoke<DescribeCoipPoolsResponse>(request, options);
}
/// <summary>
/// Describes the specified customer-owned address pools or all of your customer-owned
/// address pools.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeCoipPools service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeCoipPools service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeCoipPools">REST API Reference for DescribeCoipPools Operation</seealso>
public virtual Task<DescribeCoipPoolsResponse> DescribeCoipPoolsAsync(DescribeCoipPoolsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeCoipPoolsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeCoipPoolsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeCoipPoolsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeConversionTasks
internal virtual DescribeConversionTasksResponse DescribeConversionTasks()
{
return DescribeConversionTasks(new DescribeConversionTasksRequest());
}
internal virtual DescribeConversionTasksResponse DescribeConversionTasks(DescribeConversionTasksRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeConversionTasksRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeConversionTasksResponseUnmarshaller.Instance;
return Invoke<DescribeConversionTasksResponse>(request, options);
}
/// <summary>
/// Describes the specified conversion tasks or all your conversion tasks. For more information,
/// see the <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/">VM Import/Export
/// User Guide</a>.
///
///
/// <para>
/// For information about the import manifest referenced by this API action, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html">VM
/// Import Manifest</a>.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeConversionTasks service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeConversionTasks">REST API Reference for DescribeConversionTasks Operation</seealso>
public virtual Task<DescribeConversionTasksResponse> DescribeConversionTasksAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeConversionTasksAsync(new DescribeConversionTasksRequest(), cancellationToken);
}
/// <summary>
/// Describes the specified conversion tasks or all your conversion tasks. For more information,
/// see the <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/">VM Import/Export
/// User Guide</a>.
///
///
/// <para>
/// For information about the import manifest referenced by this API action, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html">VM
/// Import Manifest</a>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeConversionTasks service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeConversionTasks service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeConversionTasks">REST API Reference for DescribeConversionTasks Operation</seealso>
public virtual Task<DescribeConversionTasksResponse> DescribeConversionTasksAsync(DescribeConversionTasksRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeConversionTasksRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeConversionTasksResponseUnmarshaller.Instance;
return InvokeAsync<DescribeConversionTasksResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeCustomerGateways
internal virtual DescribeCustomerGatewaysResponse DescribeCustomerGateways()
{
return DescribeCustomerGateways(new DescribeCustomerGatewaysRequest());
}
internal virtual DescribeCustomerGatewaysResponse DescribeCustomerGateways(DescribeCustomerGatewaysRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeCustomerGatewaysRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeCustomerGatewaysResponseUnmarshaller.Instance;
return Invoke<DescribeCustomerGatewaysResponse>(request, options);
}
/// <summary>
/// Describes one or more of your VPN customer gateways.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html">AWS
/// Site-to-Site VPN</a> in the <i>AWS Site-to-Site VPN User Guide</i>.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeCustomerGateways service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeCustomerGateways">REST API Reference for DescribeCustomerGateways Operation</seealso>
public virtual Task<DescribeCustomerGatewaysResponse> DescribeCustomerGatewaysAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeCustomerGatewaysAsync(new DescribeCustomerGatewaysRequest(), cancellationToken);
}
/// <summary>
/// Describes one or more of your VPN customer gateways.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html">AWS
/// Site-to-Site VPN</a> in the <i>AWS Site-to-Site VPN User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeCustomerGateways service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeCustomerGateways service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeCustomerGateways">REST API Reference for DescribeCustomerGateways Operation</seealso>
public virtual Task<DescribeCustomerGatewaysResponse> DescribeCustomerGatewaysAsync(DescribeCustomerGatewaysRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeCustomerGatewaysRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeCustomerGatewaysResponseUnmarshaller.Instance;
return InvokeAsync<DescribeCustomerGatewaysResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeDhcpOptions
internal virtual DescribeDhcpOptionsResponse DescribeDhcpOptions()
{
return DescribeDhcpOptions(new DescribeDhcpOptionsRequest());
}
internal virtual DescribeDhcpOptionsResponse DescribeDhcpOptions(DescribeDhcpOptionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDhcpOptionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDhcpOptionsResponseUnmarshaller.Instance;
return Invoke<DescribeDhcpOptionsResponse>(request, options);
}
/// <summary>
/// Describes one or more of your DHCP options sets.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html">DHCP
/// Options Sets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDhcpOptions service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeDhcpOptions">REST API Reference for DescribeDhcpOptions Operation</seealso>
public virtual Task<DescribeDhcpOptionsResponse> DescribeDhcpOptionsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeDhcpOptionsAsync(new DescribeDhcpOptionsRequest(), cancellationToken);
}
/// <summary>
/// Describes one or more of your DHCP options sets.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html">DHCP
/// Options Sets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeDhcpOptions service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeDhcpOptions service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeDhcpOptions">REST API Reference for DescribeDhcpOptions Operation</seealso>
public virtual Task<DescribeDhcpOptionsResponse> DescribeDhcpOptionsAsync(DescribeDhcpOptionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDhcpOptionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDhcpOptionsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeDhcpOptionsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeEgressOnlyInternetGateways
internal virtual DescribeEgressOnlyInternetGatewaysResponse DescribeEgressOnlyInternetGateways(DescribeEgressOnlyInternetGatewaysRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeEgressOnlyInternetGatewaysRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeEgressOnlyInternetGatewaysResponseUnmarshaller.Instance;
return Invoke<DescribeEgressOnlyInternetGatewaysResponse>(request, options);
}
/// <summary>
/// Describes one or more of your egress-only internet gateways.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeEgressOnlyInternetGateways service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeEgressOnlyInternetGateways service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeEgressOnlyInternetGateways">REST API Reference for DescribeEgressOnlyInternetGateways Operation</seealso>
public virtual Task<DescribeEgressOnlyInternetGatewaysResponse> DescribeEgressOnlyInternetGatewaysAsync(DescribeEgressOnlyInternetGatewaysRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeEgressOnlyInternetGatewaysRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeEgressOnlyInternetGatewaysResponseUnmarshaller.Instance;
return InvokeAsync<DescribeEgressOnlyInternetGatewaysResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeElasticGpus
internal virtual DescribeElasticGpusResponse DescribeElasticGpus(DescribeElasticGpusRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeElasticGpusRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeElasticGpusResponseUnmarshaller.Instance;
return Invoke<DescribeElasticGpusResponse>(request, options);
}
/// <summary>
/// Describes the Elastic Graphics accelerator associated with your instances. For more
/// information about Elastic Graphics, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html">Amazon
/// Elastic Graphics</a>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeElasticGpus service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeElasticGpus service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeElasticGpus">REST API Reference for DescribeElasticGpus Operation</seealso>
public virtual Task<DescribeElasticGpusResponse> DescribeElasticGpusAsync(DescribeElasticGpusRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeElasticGpusRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeElasticGpusResponseUnmarshaller.Instance;
return InvokeAsync<DescribeElasticGpusResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeExportImageTasks
internal virtual DescribeExportImageTasksResponse DescribeExportImageTasks(DescribeExportImageTasksRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeExportImageTasksRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeExportImageTasksResponseUnmarshaller.Instance;
return Invoke<DescribeExportImageTasksResponse>(request, options);
}
/// <summary>
/// Describes the specified export image tasks or all your export image tasks.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeExportImageTasks service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeExportImageTasks service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeExportImageTasks">REST API Reference for DescribeExportImageTasks Operation</seealso>
public virtual Task<DescribeExportImageTasksResponse> DescribeExportImageTasksAsync(DescribeExportImageTasksRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeExportImageTasksRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeExportImageTasksResponseUnmarshaller.Instance;
return InvokeAsync<DescribeExportImageTasksResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeExportTasks
internal virtual DescribeExportTasksResponse DescribeExportTasks()
{
return DescribeExportTasks(new DescribeExportTasksRequest());
}
internal virtual DescribeExportTasksResponse DescribeExportTasks(DescribeExportTasksRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeExportTasksRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeExportTasksResponseUnmarshaller.Instance;
return Invoke<DescribeExportTasksResponse>(request, options);
}
/// <summary>
/// Describes the specified export instance tasks or all your export instance tasks.
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeExportTasks service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeExportTasks">REST API Reference for DescribeExportTasks Operation</seealso>
public virtual Task<DescribeExportTasksResponse> DescribeExportTasksAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeExportTasksAsync(new DescribeExportTasksRequest(), cancellationToken);
}
/// <summary>
/// Describes the specified export instance tasks or all your export instance tasks.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeExportTasks service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeExportTasks service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeExportTasks">REST API Reference for DescribeExportTasks Operation</seealso>
public virtual Task<DescribeExportTasksResponse> DescribeExportTasksAsync(DescribeExportTasksRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeExportTasksRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeExportTasksResponseUnmarshaller.Instance;
return InvokeAsync<DescribeExportTasksResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeFastSnapshotRestores
internal virtual DescribeFastSnapshotRestoresResponse DescribeFastSnapshotRestores(DescribeFastSnapshotRestoresRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeFastSnapshotRestoresRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeFastSnapshotRestoresResponseUnmarshaller.Instance;
return Invoke<DescribeFastSnapshotRestoresResponse>(request, options);
}
/// <summary>
/// Describes the state of fast snapshot restores for your snapshots.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeFastSnapshotRestores service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeFastSnapshotRestores service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFastSnapshotRestores">REST API Reference for DescribeFastSnapshotRestores Operation</seealso>
public virtual Task<DescribeFastSnapshotRestoresResponse> DescribeFastSnapshotRestoresAsync(DescribeFastSnapshotRestoresRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeFastSnapshotRestoresRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeFastSnapshotRestoresResponseUnmarshaller.Instance;
return InvokeAsync<DescribeFastSnapshotRestoresResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeFleetHistory
internal virtual DescribeFleetHistoryResponse DescribeFleetHistory(DescribeFleetHistoryRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeFleetHistoryRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeFleetHistoryResponseUnmarshaller.Instance;
return Invoke<DescribeFleetHistoryResponse>(request, options);
}
/// <summary>
/// Describes the events for the specified EC2 Fleet during the specified time.
///
///
/// <para>
/// EC2 Fleet events are delayed by up to 30 seconds before they can be described. This
/// ensures that you can query by the last evaluated time and not miss a recorded event.
/// EC2 Fleet events are available for 48 hours.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeFleetHistory service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeFleetHistory service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFleetHistory">REST API Reference for DescribeFleetHistory Operation</seealso>
public virtual Task<DescribeFleetHistoryResponse> DescribeFleetHistoryAsync(DescribeFleetHistoryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeFleetHistoryRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeFleetHistoryResponseUnmarshaller.Instance;
return InvokeAsync<DescribeFleetHistoryResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeFleetInstances
internal virtual DescribeFleetInstancesResponse DescribeFleetInstances(DescribeFleetInstancesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeFleetInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeFleetInstancesResponseUnmarshaller.Instance;
return Invoke<DescribeFleetInstancesResponse>(request, options);
}
/// <summary>
/// Describes the running instances for the specified EC2 Fleet.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeFleetInstances service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeFleetInstances service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFleetInstances">REST API Reference for DescribeFleetInstances Operation</seealso>
public virtual Task<DescribeFleetInstancesResponse> DescribeFleetInstancesAsync(DescribeFleetInstancesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeFleetInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeFleetInstancesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeFleetInstancesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeFleets
internal virtual DescribeFleetsResponse DescribeFleets(DescribeFleetsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeFleetsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeFleetsResponseUnmarshaller.Instance;
return Invoke<DescribeFleetsResponse>(request, options);
}
/// <summary>
/// Describes the specified EC2 Fleets or all of your EC2 Fleets.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeFleets service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeFleets service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFleets">REST API Reference for DescribeFleets Operation</seealso>
public virtual Task<DescribeFleetsResponse> DescribeFleetsAsync(DescribeFleetsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeFleetsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeFleetsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeFleetsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeFlowLogs
internal virtual DescribeFlowLogsResponse DescribeFlowLogs(DescribeFlowLogsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeFlowLogsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeFlowLogsResponseUnmarshaller.Instance;
return Invoke<DescribeFlowLogsResponse>(request, options);
}
/// <summary>
/// Describes one or more flow logs. To view the information in your flow logs (the log
/// streams for the network interfaces), you must use the CloudWatch Logs console or the
/// CloudWatch Logs API.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeFlowLogs service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeFlowLogs service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFlowLogs">REST API Reference for DescribeFlowLogs Operation</seealso>
public virtual Task<DescribeFlowLogsResponse> DescribeFlowLogsAsync(DescribeFlowLogsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeFlowLogsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeFlowLogsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeFlowLogsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeFpgaImageAttribute
internal virtual DescribeFpgaImageAttributeResponse DescribeFpgaImageAttribute(DescribeFpgaImageAttributeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeFpgaImageAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeFpgaImageAttributeResponseUnmarshaller.Instance;
return Invoke<DescribeFpgaImageAttributeResponse>(request, options);
}
/// <summary>
/// Describes the specified attribute of the specified Amazon FPGA Image (AFI).
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeFpgaImageAttribute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeFpgaImageAttribute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImageAttribute">REST API Reference for DescribeFpgaImageAttribute Operation</seealso>
public virtual Task<DescribeFpgaImageAttributeResponse> DescribeFpgaImageAttributeAsync(DescribeFpgaImageAttributeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeFpgaImageAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeFpgaImageAttributeResponseUnmarshaller.Instance;
return InvokeAsync<DescribeFpgaImageAttributeResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeFpgaImages
internal virtual DescribeFpgaImagesResponse DescribeFpgaImages(DescribeFpgaImagesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeFpgaImagesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeFpgaImagesResponseUnmarshaller.Instance;
return Invoke<DescribeFpgaImagesResponse>(request, options);
}
/// <summary>
/// Describes the Amazon FPGA Images (AFIs) available to you. These include public AFIs,
/// private AFIs that you own, and AFIs owned by other AWS accounts for which you have
/// load permissions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeFpgaImages service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeFpgaImages service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImages">REST API Reference for DescribeFpgaImages Operation</seealso>
public virtual Task<DescribeFpgaImagesResponse> DescribeFpgaImagesAsync(DescribeFpgaImagesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeFpgaImagesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeFpgaImagesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeFpgaImagesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeHostReservationOfferings
internal virtual DescribeHostReservationOfferingsResponse DescribeHostReservationOfferings(DescribeHostReservationOfferingsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeHostReservationOfferingsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeHostReservationOfferingsResponseUnmarshaller.Instance;
return Invoke<DescribeHostReservationOfferingsResponse>(request, options);
}
/// <summary>
/// Describes the Dedicated Host reservations that are available to purchase.
///
///
/// <para>
/// The results describe all of the Dedicated Host reservation offerings, including offerings
/// that might not match the instance family and Region of your Dedicated Hosts. When
/// purchasing an offering, ensure that the instance family and Region of the offering
/// matches that of the Dedicated Hosts with which it is to be associated. For more information
/// about supported instance types, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-overview.html">Dedicated
/// Hosts Overview</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeHostReservationOfferings service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeHostReservationOfferings service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservationOfferings">REST API Reference for DescribeHostReservationOfferings Operation</seealso>
public virtual Task<DescribeHostReservationOfferingsResponse> DescribeHostReservationOfferingsAsync(DescribeHostReservationOfferingsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeHostReservationOfferingsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeHostReservationOfferingsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeHostReservationOfferingsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeHostReservations
internal virtual DescribeHostReservationsResponse DescribeHostReservations(DescribeHostReservationsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeHostReservationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeHostReservationsResponseUnmarshaller.Instance;
return Invoke<DescribeHostReservationsResponse>(request, options);
}
/// <summary>
/// Describes reservations that are associated with Dedicated Hosts in your account.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeHostReservations service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeHostReservations service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservations">REST API Reference for DescribeHostReservations Operation</seealso>
public virtual Task<DescribeHostReservationsResponse> DescribeHostReservationsAsync(DescribeHostReservationsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeHostReservationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeHostReservationsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeHostReservationsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeHosts
internal virtual DescribeHostsResponse DescribeHosts(DescribeHostsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeHostsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeHostsResponseUnmarshaller.Instance;
return Invoke<DescribeHostsResponse>(request, options);
}
/// <summary>
/// Describes the specified Dedicated Hosts or all your Dedicated Hosts.
///
///
/// <para>
/// The results describe only the Dedicated Hosts in the Region you're currently using.
/// All listed instances consume capacity on your Dedicated Host. Dedicated Hosts that
/// have recently been released are listed with the state <code>released</code>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeHosts service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeHosts service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHosts">REST API Reference for DescribeHosts Operation</seealso>
public virtual Task<DescribeHostsResponse> DescribeHostsAsync(DescribeHostsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeHostsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeHostsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeHostsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeIamInstanceProfileAssociations
internal virtual DescribeIamInstanceProfileAssociationsResponse DescribeIamInstanceProfileAssociations(DescribeIamInstanceProfileAssociationsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeIamInstanceProfileAssociationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeIamInstanceProfileAssociationsResponseUnmarshaller.Instance;
return Invoke<DescribeIamInstanceProfileAssociationsResponse>(request, options);
}
/// <summary>
/// Describes your IAM instance profile associations.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeIamInstanceProfileAssociations service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeIamInstanceProfileAssociations service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIamInstanceProfileAssociations">REST API Reference for DescribeIamInstanceProfileAssociations Operation</seealso>
public virtual Task<DescribeIamInstanceProfileAssociationsResponse> DescribeIamInstanceProfileAssociationsAsync(DescribeIamInstanceProfileAssociationsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeIamInstanceProfileAssociationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeIamInstanceProfileAssociationsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeIamInstanceProfileAssociationsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeIdentityIdFormat
internal virtual DescribeIdentityIdFormatResponse DescribeIdentityIdFormat(DescribeIdentityIdFormatRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeIdentityIdFormatRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeIdentityIdFormatResponseUnmarshaller.Instance;
return Invoke<DescribeIdentityIdFormatResponse>(request, options);
}
/// <summary>
/// Describes the ID format settings for resources for the specified IAM user, IAM role,
/// or root user. For example, you can view the resource types that are enabled for longer
/// IDs. This request only returns information about resource types whose ID formats can
/// be modified; it does not return information about other resource types. For more information,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html">Resource
/// IDs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
///
///
/// <para>
/// The following resource types support longer IDs: <code>bundle</code> | <code>conversion-task</code>
/// | <code>customer-gateway</code> | <code>dhcp-options</code> | <code>elastic-ip-allocation</code>
/// | <code>elastic-ip-association</code> | <code>export-task</code> | <code>flow-log</code>
/// | <code>image</code> | <code>import-task</code> | <code>instance</code> | <code>internet-gateway</code>
/// | <code>network-acl</code> | <code>network-acl-association</code> | <code>network-interface</code>
/// | <code>network-interface-attachment</code> | <code>prefix-list</code> | <code>reservation</code>
/// | <code>route-table</code> | <code>route-table-association</code> | <code>security-group</code>
/// | <code>snapshot</code> | <code>subnet</code> | <code>subnet-cidr-block-association</code>
/// | <code>volume</code> | <code>vpc</code> | <code>vpc-cidr-block-association</code>
/// | <code>vpc-endpoint</code> | <code>vpc-peering-connection</code> | <code>vpn-connection</code>
/// | <code>vpn-gateway</code>.
/// </para>
///
/// <para>
/// These settings apply to the principal specified in the request. They do not apply
/// to the principal that makes the request.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeIdentityIdFormat service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeIdentityIdFormat service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdentityIdFormat">REST API Reference for DescribeIdentityIdFormat Operation</seealso>
public virtual Task<DescribeIdentityIdFormatResponse> DescribeIdentityIdFormatAsync(DescribeIdentityIdFormatRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeIdentityIdFormatRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeIdentityIdFormatResponseUnmarshaller.Instance;
return InvokeAsync<DescribeIdentityIdFormatResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeIdFormat
internal virtual DescribeIdFormatResponse DescribeIdFormat(DescribeIdFormatRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeIdFormatRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeIdFormatResponseUnmarshaller.Instance;
return Invoke<DescribeIdFormatResponse>(request, options);
}
/// <summary>
/// Describes the ID format settings for your resources on a per-Region basis, for example,
/// to view which resource types are enabled for longer IDs. This request only returns
/// information about resource types whose ID formats can be modified; it does not return
/// information about other resource types.
///
///
/// <para>
/// The following resource types support longer IDs: <code>bundle</code> | <code>conversion-task</code>
/// | <code>customer-gateway</code> | <code>dhcp-options</code> | <code>elastic-ip-allocation</code>
/// | <code>elastic-ip-association</code> | <code>export-task</code> | <code>flow-log</code>
/// | <code>image</code> | <code>import-task</code> | <code>instance</code> | <code>internet-gateway</code>
/// | <code>network-acl</code> | <code>network-acl-association</code> | <code>network-interface</code>
/// | <code>network-interface-attachment</code> | <code>prefix-list</code> | <code>reservation</code>
/// | <code>route-table</code> | <code>route-table-association</code> | <code>security-group</code>
/// | <code>snapshot</code> | <code>subnet</code> | <code>subnet-cidr-block-association</code>
/// | <code>volume</code> | <code>vpc</code> | <code>vpc-cidr-block-association</code>
/// | <code>vpc-endpoint</code> | <code>vpc-peering-connection</code> | <code>vpn-connection</code>
/// | <code>vpn-gateway</code>.
/// </para>
///
/// <para>
/// These settings apply to the IAM user who makes the request; they do not apply to the
/// entire AWS account. By default, an IAM user defaults to the same settings as the root
/// user, unless they explicitly override the settings by running the <a>ModifyIdFormat</a>
/// command. Resources created with longer IDs are visible to all IAM users, regardless
/// of these settings and provided that they have permission to use the relevant <code>Describe</code>
/// command for the resource type.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeIdFormat service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeIdFormat service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdFormat">REST API Reference for DescribeIdFormat Operation</seealso>
public virtual Task<DescribeIdFormatResponse> DescribeIdFormatAsync(DescribeIdFormatRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeIdFormatRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeIdFormatResponseUnmarshaller.Instance;
return InvokeAsync<DescribeIdFormatResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeImageAttribute
internal virtual DescribeImageAttributeResponse DescribeImageAttribute(DescribeImageAttributeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeImageAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeImageAttributeResponseUnmarshaller.Instance;
return Invoke<DescribeImageAttributeResponse>(request, options);
}
/// <summary>
/// Describes the specified attribute of the specified AMI. You can specify only one attribute
/// at a time.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeImageAttribute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeImageAttribute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImageAttribute">REST API Reference for DescribeImageAttribute Operation</seealso>
public virtual Task<DescribeImageAttributeResponse> DescribeImageAttributeAsync(DescribeImageAttributeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeImageAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeImageAttributeResponseUnmarshaller.Instance;
return InvokeAsync<DescribeImageAttributeResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeImages
internal virtual DescribeImagesResponse DescribeImages()
{
return DescribeImages(new DescribeImagesRequest());
}
internal virtual DescribeImagesResponse DescribeImages(DescribeImagesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeImagesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeImagesResponseUnmarshaller.Instance;
return Invoke<DescribeImagesResponse>(request, options);
}
/// <summary>
/// Describes the specified images (AMIs, AKIs, and ARIs) available to you or all of the
/// images available to you.
///
///
/// <para>
/// The images available to you include public images, private images that you own, and
/// private images owned by other AWS accounts for which you have explicit launch permissions.
/// </para>
///
/// <para>
/// Recently deregistered images appear in the returned results for a short interval and
/// then return empty results. After all instances that reference a deregistered AMI are
/// terminated, specifying the ID of the image results in an error indicating that the
/// AMI ID cannot be found.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeImages service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImages">REST API Reference for DescribeImages Operation</seealso>
public virtual Task<DescribeImagesResponse> DescribeImagesAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeImagesAsync(new DescribeImagesRequest(), cancellationToken);
}
/// <summary>
/// Describes the specified images (AMIs, AKIs, and ARIs) available to you or all of the
/// images available to you.
///
///
/// <para>
/// The images available to you include public images, private images that you own, and
/// private images owned by other AWS accounts for which you have explicit launch permissions.
/// </para>
///
/// <para>
/// Recently deregistered images appear in the returned results for a short interval and
/// then return empty results. After all instances that reference a deregistered AMI are
/// terminated, specifying the ID of the image results in an error indicating that the
/// AMI ID cannot be found.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeImages service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeImages service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImages">REST API Reference for DescribeImages Operation</seealso>
public virtual Task<DescribeImagesResponse> DescribeImagesAsync(DescribeImagesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeImagesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeImagesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeImagesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeImportImageTasks
internal virtual DescribeImportImageTasksResponse DescribeImportImageTasks(DescribeImportImageTasksRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeImportImageTasksRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeImportImageTasksResponseUnmarshaller.Instance;
return Invoke<DescribeImportImageTasksResponse>(request, options);
}
/// <summary>
/// Displays details about an import virtual machine or import snapshot tasks that are
/// already created.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeImportImageTasks service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeImportImageTasks service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImportImageTasks">REST API Reference for DescribeImportImageTasks Operation</seealso>
public virtual Task<DescribeImportImageTasksResponse> DescribeImportImageTasksAsync(DescribeImportImageTasksRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeImportImageTasksRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeImportImageTasksResponseUnmarshaller.Instance;
return InvokeAsync<DescribeImportImageTasksResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeImportSnapshotTasks
internal virtual DescribeImportSnapshotTasksResponse DescribeImportSnapshotTasks(DescribeImportSnapshotTasksRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeImportSnapshotTasksRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeImportSnapshotTasksResponseUnmarshaller.Instance;
return Invoke<DescribeImportSnapshotTasksResponse>(request, options);
}
/// <summary>
/// Describes your import snapshot tasks.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeImportSnapshotTasks service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeImportSnapshotTasks service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImportSnapshotTasks">REST API Reference for DescribeImportSnapshotTasks Operation</seealso>
public virtual Task<DescribeImportSnapshotTasksResponse> DescribeImportSnapshotTasksAsync(DescribeImportSnapshotTasksRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeImportSnapshotTasksRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeImportSnapshotTasksResponseUnmarshaller.Instance;
return InvokeAsync<DescribeImportSnapshotTasksResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeInstanceAttribute
internal virtual DescribeInstanceAttributeResponse DescribeInstanceAttribute(DescribeInstanceAttributeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeInstanceAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeInstanceAttributeResponseUnmarshaller.Instance;
return Invoke<DescribeInstanceAttributeResponse>(request, options);
}
/// <summary>
/// Describes the specified attribute of the specified instance. You can specify only
/// one attribute at a time. Valid attribute values are: <code>instanceType</code> | <code>kernel</code>
/// | <code>ramdisk</code> | <code>userData</code> | <code>disableApiTermination</code>
/// | <code>instanceInitiatedShutdownBehavior</code> | <code>rootDeviceName</code> | <code>blockDeviceMapping</code>
/// | <code>productCodes</code> | <code>sourceDestCheck</code> | <code>groupSet</code>
/// | <code>ebsOptimized</code> | <code>sriovNetSupport</code>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeInstanceAttribute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeInstanceAttribute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceAttribute">REST API Reference for DescribeInstanceAttribute Operation</seealso>
public virtual Task<DescribeInstanceAttributeResponse> DescribeInstanceAttributeAsync(DescribeInstanceAttributeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeInstanceAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeInstanceAttributeResponseUnmarshaller.Instance;
return InvokeAsync<DescribeInstanceAttributeResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeInstanceCreditSpecifications
internal virtual DescribeInstanceCreditSpecificationsResponse DescribeInstanceCreditSpecifications(DescribeInstanceCreditSpecificationsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeInstanceCreditSpecificationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeInstanceCreditSpecificationsResponseUnmarshaller.Instance;
return Invoke<DescribeInstanceCreditSpecificationsResponse>(request, options);
}
/// <summary>
/// Describes the credit option for CPU usage of the specified burstable performance instances.
/// The credit options are <code>standard</code> and <code>unlimited</code>.
///
///
/// <para>
/// If you do not specify an instance ID, Amazon EC2 returns burstable performance instances
/// with the <code>unlimited</code> credit option, as well as instances that were previously
/// configured as T2, T3, and T3a with the <code>unlimited</code> credit option. For example,
/// if you resize a T2 instance, while it is configured as <code>unlimited</code>, to
/// an M4 instance, Amazon EC2 returns the M4 instance.
/// </para>
///
/// <para>
/// If you specify one or more instance IDs, Amazon EC2 returns the credit option (<code>standard</code>
/// or <code>unlimited</code>) of those instances. If you specify an instance ID that
/// is not valid, such as an instance that is not a burstable performance instance, an
/// error is returned.
/// </para>
///
/// <para>
/// Recently terminated instances might appear in the returned results. This interval
/// is usually less than one hour.
/// </para>
///
/// <para>
/// If an Availability Zone is experiencing a service disruption and you specify instance
/// IDs in the affected zone, or do not specify any instance IDs at all, the call fails.
/// If you specify only instance IDs in an unaffected zone, the call works normally.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable
/// Performance Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeInstanceCreditSpecifications service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeInstanceCreditSpecifications service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceCreditSpecifications">REST API Reference for DescribeInstanceCreditSpecifications Operation</seealso>
public virtual Task<DescribeInstanceCreditSpecificationsResponse> DescribeInstanceCreditSpecificationsAsync(DescribeInstanceCreditSpecificationsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeInstanceCreditSpecificationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeInstanceCreditSpecificationsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeInstanceCreditSpecificationsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeInstanceEventNotificationAttributes
internal virtual DescribeInstanceEventNotificationAttributesResponse DescribeInstanceEventNotificationAttributes(DescribeInstanceEventNotificationAttributesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeInstanceEventNotificationAttributesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeInstanceEventNotificationAttributesResponseUnmarshaller.Instance;
return Invoke<DescribeInstanceEventNotificationAttributesResponse>(request, options);
}
/// <summary>
/// Describes the tag keys that are registered to appear in scheduled event notifications
/// for resources in the current Region.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeInstanceEventNotificationAttributes service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeInstanceEventNotificationAttributes service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceEventNotificationAttributes">REST API Reference for DescribeInstanceEventNotificationAttributes Operation</seealso>
public virtual Task<DescribeInstanceEventNotificationAttributesResponse> DescribeInstanceEventNotificationAttributesAsync(DescribeInstanceEventNotificationAttributesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeInstanceEventNotificationAttributesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeInstanceEventNotificationAttributesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeInstanceEventNotificationAttributesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeInstances
internal virtual DescribeInstancesResponse DescribeInstances()
{
return DescribeInstances(new DescribeInstancesRequest());
}
internal virtual DescribeInstancesResponse DescribeInstances(DescribeInstancesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeInstancesResponseUnmarshaller.Instance;
return Invoke<DescribeInstancesResponse>(request, options);
}
/// <summary>
/// Describes the specified instances or all of AWS account's instances.
///
///
/// <para>
/// If you specify one or more instance IDs, Amazon EC2 returns information for those
/// instances. If you do not specify instance IDs, Amazon EC2 returns information for
/// all relevant instances. If you specify an instance ID that is not valid, an error
/// is returned. If you specify an instance that you do not own, it is not included in
/// the returned results.
/// </para>
///
/// <para>
/// Recently terminated instances might appear in the returned results. This interval
/// is usually less than one hour.
/// </para>
///
/// <para>
/// If you describe instances in the rare case where an Availability Zone is experiencing
/// a service disruption and you specify instance IDs that are in the affected zone, or
/// do not specify any instance IDs at all, the call fails. If you describe instances
/// and specify only instance IDs that are in an unaffected zone, the call works normally.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeInstances service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances">REST API Reference for DescribeInstances Operation</seealso>
public virtual Task<DescribeInstancesResponse> DescribeInstancesAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeInstancesAsync(new DescribeInstancesRequest(), cancellationToken);
}
/// <summary>
/// Describes the specified instances or all of AWS account's instances.
///
///
/// <para>
/// If you specify one or more instance IDs, Amazon EC2 returns information for those
/// instances. If you do not specify instance IDs, Amazon EC2 returns information for
/// all relevant instances. If you specify an instance ID that is not valid, an error
/// is returned. If you specify an instance that you do not own, it is not included in
/// the returned results.
/// </para>
///
/// <para>
/// Recently terminated instances might appear in the returned results. This interval
/// is usually less than one hour.
/// </para>
///
/// <para>
/// If you describe instances in the rare case where an Availability Zone is experiencing
/// a service disruption and you specify instance IDs that are in the affected zone, or
/// do not specify any instance IDs at all, the call fails. If you describe instances
/// and specify only instance IDs that are in an unaffected zone, the call works normally.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeInstances service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeInstances service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances">REST API Reference for DescribeInstances Operation</seealso>
public virtual Task<DescribeInstancesResponse> DescribeInstancesAsync(DescribeInstancesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeInstancesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeInstancesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeInstanceStatus
internal virtual DescribeInstanceStatusResponse DescribeInstanceStatus()
{
return DescribeInstanceStatus(new DescribeInstanceStatusRequest());
}
internal virtual DescribeInstanceStatusResponse DescribeInstanceStatus(DescribeInstanceStatusRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeInstanceStatusRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeInstanceStatusResponseUnmarshaller.Instance;
return Invoke<DescribeInstanceStatusResponse>(request, options);
}
/// <summary>
/// Describes the status of the specified instances or all of your instances. By default,
/// only running instances are described, unless you specifically indicate to return the
/// status of all instances.
///
///
/// <para>
/// Instance status includes the following components:
/// </para>
/// <ul> <li>
/// <para>
/// <b>Status checks</b> - Amazon EC2 performs status checks on running EC2 instances
/// to identify hardware and software issues. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-system-instance-status-check.html">Status
/// Checks for Your Instances</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstances.html">Troubleshooting
/// Instances with Failed Status Checks</a> in the <i>Amazon Elastic Compute Cloud User
/// Guide</i>.
/// </para>
/// </li> <li>
/// <para>
/// <b>Scheduled events</b> - Amazon EC2 can schedule events (such as reboot, stop, or
/// terminate) for your instances related to hardware issues, software updates, or system
/// maintenance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-instances-status-check_sched.html">Scheduled
/// Events for Your Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </li> <li>
/// <para>
/// <b>Instance state</b> - You can manage your instances from the moment you launch
/// them through their termination. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html">Instance
/// Lifecycle</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </li> </ul>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeInstanceStatus service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceStatus">REST API Reference for DescribeInstanceStatus Operation</seealso>
public virtual Task<DescribeInstanceStatusResponse> DescribeInstanceStatusAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeInstanceStatusAsync(new DescribeInstanceStatusRequest(), cancellationToken);
}
/// <summary>
/// Describes the status of the specified instances or all of your instances. By default,
/// only running instances are described, unless you specifically indicate to return the
/// status of all instances.
///
///
/// <para>
/// Instance status includes the following components:
/// </para>
/// <ul> <li>
/// <para>
/// <b>Status checks</b> - Amazon EC2 performs status checks on running EC2 instances
/// to identify hardware and software issues. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-system-instance-status-check.html">Status
/// Checks for Your Instances</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstances.html">Troubleshooting
/// Instances with Failed Status Checks</a> in the <i>Amazon Elastic Compute Cloud User
/// Guide</i>.
/// </para>
/// </li> <li>
/// <para>
/// <b>Scheduled events</b> - Amazon EC2 can schedule events (such as reboot, stop, or
/// terminate) for your instances related to hardware issues, software updates, or system
/// maintenance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-instances-status-check_sched.html">Scheduled
/// Events for Your Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </li> <li>
/// <para>
/// <b>Instance state</b> - You can manage your instances from the moment you launch
/// them through their termination. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html">Instance
/// Lifecycle</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </li> </ul>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeInstanceStatus service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeInstanceStatus service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceStatus">REST API Reference for DescribeInstanceStatus Operation</seealso>
public virtual Task<DescribeInstanceStatusResponse> DescribeInstanceStatusAsync(DescribeInstanceStatusRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeInstanceStatusRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeInstanceStatusResponseUnmarshaller.Instance;
return InvokeAsync<DescribeInstanceStatusResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeInstanceTypeOfferings
internal virtual DescribeInstanceTypeOfferingsResponse DescribeInstanceTypeOfferings(DescribeInstanceTypeOfferingsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeInstanceTypeOfferingsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeInstanceTypeOfferingsResponseUnmarshaller.Instance;
return Invoke<DescribeInstanceTypeOfferingsResponse>(request, options);
}
/// <summary>
/// Returns a list of all instance types offered. The results can be filtered by location
/// (Region or Availability Zone). If no location is specified, the instance types offered
/// in the current Region are returned.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeInstanceTypeOfferings service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeInstanceTypeOfferings service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceTypeOfferings">REST API Reference for DescribeInstanceTypeOfferings Operation</seealso>
public virtual Task<DescribeInstanceTypeOfferingsResponse> DescribeInstanceTypeOfferingsAsync(DescribeInstanceTypeOfferingsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeInstanceTypeOfferingsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeInstanceTypeOfferingsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeInstanceTypeOfferingsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeInstanceTypes
internal virtual DescribeInstanceTypesResponse DescribeInstanceTypes(DescribeInstanceTypesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeInstanceTypesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeInstanceTypesResponseUnmarshaller.Instance;
return Invoke<DescribeInstanceTypesResponse>(request, options);
}
/// <summary>
/// Returns a list of all instance types offered in your current AWS Region. The results
/// can be filtered by the attributes of the instance types.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeInstanceTypes service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeInstanceTypes service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceTypes">REST API Reference for DescribeInstanceTypes Operation</seealso>
public virtual Task<DescribeInstanceTypesResponse> DescribeInstanceTypesAsync(DescribeInstanceTypesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeInstanceTypesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeInstanceTypesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeInstanceTypesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeInternetGateways
internal virtual DescribeInternetGatewaysResponse DescribeInternetGateways()
{
return DescribeInternetGateways(new DescribeInternetGatewaysRequest());
}
internal virtual DescribeInternetGatewaysResponse DescribeInternetGateways(DescribeInternetGatewaysRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeInternetGatewaysRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeInternetGatewaysResponseUnmarshaller.Instance;
return Invoke<DescribeInternetGatewaysResponse>(request, options);
}
/// <summary>
/// Describes one or more of your internet gateways.
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeInternetGateways service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInternetGateways">REST API Reference for DescribeInternetGateways Operation</seealso>
public virtual Task<DescribeInternetGatewaysResponse> DescribeInternetGatewaysAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeInternetGatewaysAsync(new DescribeInternetGatewaysRequest(), cancellationToken);
}
/// <summary>
/// Describes one or more of your internet gateways.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeInternetGateways service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeInternetGateways service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInternetGateways">REST API Reference for DescribeInternetGateways Operation</seealso>
public virtual Task<DescribeInternetGatewaysResponse> DescribeInternetGatewaysAsync(DescribeInternetGatewaysRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeInternetGatewaysRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeInternetGatewaysResponseUnmarshaller.Instance;
return InvokeAsync<DescribeInternetGatewaysResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeIpv6Pools
internal virtual DescribeIpv6PoolsResponse DescribeIpv6Pools(DescribeIpv6PoolsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeIpv6PoolsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeIpv6PoolsResponseUnmarshaller.Instance;
return Invoke<DescribeIpv6PoolsResponse>(request, options);
}
/// <summary>
/// Describes your IPv6 address pools.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeIpv6Pools service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeIpv6Pools service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIpv6Pools">REST API Reference for DescribeIpv6Pools Operation</seealso>
public virtual Task<DescribeIpv6PoolsResponse> DescribeIpv6PoolsAsync(DescribeIpv6PoolsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeIpv6PoolsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeIpv6PoolsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeIpv6PoolsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeKeyPairs
internal virtual DescribeKeyPairsResponse DescribeKeyPairs()
{
return DescribeKeyPairs(new DescribeKeyPairsRequest());
}
internal virtual DescribeKeyPairsResponse DescribeKeyPairs(DescribeKeyPairsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeKeyPairsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeKeyPairsResponseUnmarshaller.Instance;
return Invoke<DescribeKeyPairsResponse>(request, options);
}
/// <summary>
/// Describes the specified key pairs or all of your key pairs.
///
///
/// <para>
/// For more information about key pairs, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html">Key
/// Pairs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeKeyPairs service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeKeyPairs">REST API Reference for DescribeKeyPairs Operation</seealso>
public virtual Task<DescribeKeyPairsResponse> DescribeKeyPairsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeKeyPairsAsync(new DescribeKeyPairsRequest(), cancellationToken);
}
/// <summary>
/// Describes the specified key pairs or all of your key pairs.
///
///
/// <para>
/// For more information about key pairs, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html">Key
/// Pairs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeKeyPairs service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeKeyPairs service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeKeyPairs">REST API Reference for DescribeKeyPairs Operation</seealso>
public virtual Task<DescribeKeyPairsResponse> DescribeKeyPairsAsync(DescribeKeyPairsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeKeyPairsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeKeyPairsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeKeyPairsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeLaunchTemplates
internal virtual DescribeLaunchTemplatesResponse DescribeLaunchTemplates(DescribeLaunchTemplatesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeLaunchTemplatesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeLaunchTemplatesResponseUnmarshaller.Instance;
return Invoke<DescribeLaunchTemplatesResponse>(request, options);
}
/// <summary>
/// Describes one or more launch templates.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeLaunchTemplates service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeLaunchTemplates service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeLaunchTemplates">REST API Reference for DescribeLaunchTemplates Operation</seealso>
public virtual Task<DescribeLaunchTemplatesResponse> DescribeLaunchTemplatesAsync(DescribeLaunchTemplatesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeLaunchTemplatesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeLaunchTemplatesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeLaunchTemplatesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeLaunchTemplateVersions
internal virtual DescribeLaunchTemplateVersionsResponse DescribeLaunchTemplateVersions(DescribeLaunchTemplateVersionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeLaunchTemplateVersionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeLaunchTemplateVersionsResponseUnmarshaller.Instance;
return Invoke<DescribeLaunchTemplateVersionsResponse>(request, options);
}
/// <summary>
/// Describes one or more versions of a specified launch template. You can describe all
/// versions, individual versions, or a range of versions.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeLaunchTemplateVersions service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeLaunchTemplateVersions service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeLaunchTemplateVersions">REST API Reference for DescribeLaunchTemplateVersions Operation</seealso>
public virtual Task<DescribeLaunchTemplateVersionsResponse> DescribeLaunchTemplateVersionsAsync(DescribeLaunchTemplateVersionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeLaunchTemplateVersionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeLaunchTemplateVersionsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeLaunchTemplateVersionsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeLocalGatewayRouteTables
internal virtual DescribeLocalGatewayRouteTablesResponse DescribeLocalGatewayRouteTables(DescribeLocalGatewayRouteTablesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeLocalGatewayRouteTablesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeLocalGatewayRouteTablesResponseUnmarshaller.Instance;
return Invoke<DescribeLocalGatewayRouteTablesResponse>(request, options);
}
/// <summary>
/// Describes one or more local gateway route tables. By default, all local gateway route
/// tables are described. Alternatively, you can filter the results.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeLocalGatewayRouteTables service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeLocalGatewayRouteTables service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeLocalGatewayRouteTables">REST API Reference for DescribeLocalGatewayRouteTables Operation</seealso>
public virtual Task<DescribeLocalGatewayRouteTablesResponse> DescribeLocalGatewayRouteTablesAsync(DescribeLocalGatewayRouteTablesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeLocalGatewayRouteTablesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeLocalGatewayRouteTablesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeLocalGatewayRouteTablesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations
internal virtual DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsResponse DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations(DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsResponseUnmarshaller.Instance;
return Invoke<DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsResponse>(request, options);
}
/// <summary>
/// Describes the associations between virtual interface groups and local gateway route
/// tables.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations">REST API Reference for DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations Operation</seealso>
public virtual Task<DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsResponse> DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsAsync(DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeLocalGatewayRouteTableVpcAssociations
internal virtual DescribeLocalGatewayRouteTableVpcAssociationsResponse DescribeLocalGatewayRouteTableVpcAssociations(DescribeLocalGatewayRouteTableVpcAssociationsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeLocalGatewayRouteTableVpcAssociationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeLocalGatewayRouteTableVpcAssociationsResponseUnmarshaller.Instance;
return Invoke<DescribeLocalGatewayRouteTableVpcAssociationsResponse>(request, options);
}
/// <summary>
/// Describes the specified associations between VPCs and local gateway route tables.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeLocalGatewayRouteTableVpcAssociations service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeLocalGatewayRouteTableVpcAssociations service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeLocalGatewayRouteTableVpcAssociations">REST API Reference for DescribeLocalGatewayRouteTableVpcAssociations Operation</seealso>
public virtual Task<DescribeLocalGatewayRouteTableVpcAssociationsResponse> DescribeLocalGatewayRouteTableVpcAssociationsAsync(DescribeLocalGatewayRouteTableVpcAssociationsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeLocalGatewayRouteTableVpcAssociationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeLocalGatewayRouteTableVpcAssociationsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeLocalGatewayRouteTableVpcAssociationsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeLocalGateways
internal virtual DescribeLocalGatewaysResponse DescribeLocalGateways(DescribeLocalGatewaysRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeLocalGatewaysRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeLocalGatewaysResponseUnmarshaller.Instance;
return Invoke<DescribeLocalGatewaysResponse>(request, options);
}
/// <summary>
/// Describes one or more local gateways. By default, all local gateways are described.
/// Alternatively, you can filter the results.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeLocalGateways service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeLocalGateways service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeLocalGateways">REST API Reference for DescribeLocalGateways Operation</seealso>
public virtual Task<DescribeLocalGatewaysResponse> DescribeLocalGatewaysAsync(DescribeLocalGatewaysRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeLocalGatewaysRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeLocalGatewaysResponseUnmarshaller.Instance;
return InvokeAsync<DescribeLocalGatewaysResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeLocalGatewayVirtualInterfaceGroups
internal virtual DescribeLocalGatewayVirtualInterfaceGroupsResponse DescribeLocalGatewayVirtualInterfaceGroups(DescribeLocalGatewayVirtualInterfaceGroupsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeLocalGatewayVirtualInterfaceGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeLocalGatewayVirtualInterfaceGroupsResponseUnmarshaller.Instance;
return Invoke<DescribeLocalGatewayVirtualInterfaceGroupsResponse>(request, options);
}
/// <summary>
/// Describes the specified local gateway virtual interface groups.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeLocalGatewayVirtualInterfaceGroups service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeLocalGatewayVirtualInterfaceGroups service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeLocalGatewayVirtualInterfaceGroups">REST API Reference for DescribeLocalGatewayVirtualInterfaceGroups Operation</seealso>
public virtual Task<DescribeLocalGatewayVirtualInterfaceGroupsResponse> DescribeLocalGatewayVirtualInterfaceGroupsAsync(DescribeLocalGatewayVirtualInterfaceGroupsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeLocalGatewayVirtualInterfaceGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeLocalGatewayVirtualInterfaceGroupsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeLocalGatewayVirtualInterfaceGroupsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeLocalGatewayVirtualInterfaces
internal virtual DescribeLocalGatewayVirtualInterfacesResponse DescribeLocalGatewayVirtualInterfaces(DescribeLocalGatewayVirtualInterfacesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeLocalGatewayVirtualInterfacesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeLocalGatewayVirtualInterfacesResponseUnmarshaller.Instance;
return Invoke<DescribeLocalGatewayVirtualInterfacesResponse>(request, options);
}
/// <summary>
/// Describes the specified local gateway virtual interfaces.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeLocalGatewayVirtualInterfaces service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeLocalGatewayVirtualInterfaces service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeLocalGatewayVirtualInterfaces">REST API Reference for DescribeLocalGatewayVirtualInterfaces Operation</seealso>
public virtual Task<DescribeLocalGatewayVirtualInterfacesResponse> DescribeLocalGatewayVirtualInterfacesAsync(DescribeLocalGatewayVirtualInterfacesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeLocalGatewayVirtualInterfacesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeLocalGatewayVirtualInterfacesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeLocalGatewayVirtualInterfacesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeMovingAddresses
internal virtual DescribeMovingAddressesResponse DescribeMovingAddresses(DescribeMovingAddressesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeMovingAddressesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeMovingAddressesResponseUnmarshaller.Instance;
return Invoke<DescribeMovingAddressesResponse>(request, options);
}
/// <summary>
/// Describes your Elastic IP addresses that are being moved to the EC2-VPC platform,
/// or that are being restored to the EC2-Classic platform. This request does not return
/// information about any other Elastic IP addresses in your account.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeMovingAddresses service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeMovingAddresses service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeMovingAddresses">REST API Reference for DescribeMovingAddresses Operation</seealso>
public virtual Task<DescribeMovingAddressesResponse> DescribeMovingAddressesAsync(DescribeMovingAddressesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeMovingAddressesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeMovingAddressesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeMovingAddressesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeNatGateways
internal virtual DescribeNatGatewaysResponse DescribeNatGateways(DescribeNatGatewaysRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeNatGatewaysRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeNatGatewaysResponseUnmarshaller.Instance;
return Invoke<DescribeNatGatewaysResponse>(request, options);
}
/// <summary>
/// Describes one or more of your NAT gateways.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeNatGateways service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeNatGateways service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNatGateways">REST API Reference for DescribeNatGateways Operation</seealso>
public virtual Task<DescribeNatGatewaysResponse> DescribeNatGatewaysAsync(DescribeNatGatewaysRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeNatGatewaysRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeNatGatewaysResponseUnmarshaller.Instance;
return InvokeAsync<DescribeNatGatewaysResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeNetworkAcls
internal virtual DescribeNetworkAclsResponse DescribeNetworkAcls()
{
return DescribeNetworkAcls(new DescribeNetworkAclsRequest());
}
internal virtual DescribeNetworkAclsResponse DescribeNetworkAcls(DescribeNetworkAclsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeNetworkAclsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeNetworkAclsResponseUnmarshaller.Instance;
return Invoke<DescribeNetworkAclsResponse>(request, options);
}
/// <summary>
/// Describes one or more of your network ACLs.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_ACLs.html">Network
/// ACLs</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeNetworkAcls service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkAcls">REST API Reference for DescribeNetworkAcls Operation</seealso>
public virtual Task<DescribeNetworkAclsResponse> DescribeNetworkAclsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeNetworkAclsAsync(new DescribeNetworkAclsRequest(), cancellationToken);
}
/// <summary>
/// Describes one or more of your network ACLs.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_ACLs.html">Network
/// ACLs</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeNetworkAcls service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeNetworkAcls service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkAcls">REST API Reference for DescribeNetworkAcls Operation</seealso>
public virtual Task<DescribeNetworkAclsResponse> DescribeNetworkAclsAsync(DescribeNetworkAclsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeNetworkAclsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeNetworkAclsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeNetworkAclsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeNetworkInterfaceAttribute
internal virtual DescribeNetworkInterfaceAttributeResponse DescribeNetworkInterfaceAttribute(DescribeNetworkInterfaceAttributeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeNetworkInterfaceAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeNetworkInterfaceAttributeResponseUnmarshaller.Instance;
return Invoke<DescribeNetworkInterfaceAttributeResponse>(request, options);
}
/// <summary>
/// Describes a network interface attribute. You can specify only one attribute at a time.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeNetworkInterfaceAttribute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeNetworkInterfaceAttribute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaceAttribute">REST API Reference for DescribeNetworkInterfaceAttribute Operation</seealso>
public virtual Task<DescribeNetworkInterfaceAttributeResponse> DescribeNetworkInterfaceAttributeAsync(DescribeNetworkInterfaceAttributeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeNetworkInterfaceAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeNetworkInterfaceAttributeResponseUnmarshaller.Instance;
return InvokeAsync<DescribeNetworkInterfaceAttributeResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeNetworkInterfacePermissions
internal virtual DescribeNetworkInterfacePermissionsResponse DescribeNetworkInterfacePermissions(DescribeNetworkInterfacePermissionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeNetworkInterfacePermissionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeNetworkInterfacePermissionsResponseUnmarshaller.Instance;
return Invoke<DescribeNetworkInterfacePermissionsResponse>(request, options);
}
/// <summary>
/// Describes the permissions for your network interfaces.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeNetworkInterfacePermissions service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeNetworkInterfacePermissions service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfacePermissions">REST API Reference for DescribeNetworkInterfacePermissions Operation</seealso>
public virtual Task<DescribeNetworkInterfacePermissionsResponse> DescribeNetworkInterfacePermissionsAsync(DescribeNetworkInterfacePermissionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeNetworkInterfacePermissionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeNetworkInterfacePermissionsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeNetworkInterfacePermissionsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeNetworkInterfaces
internal virtual DescribeNetworkInterfacesResponse DescribeNetworkInterfaces()
{
return DescribeNetworkInterfaces(new DescribeNetworkInterfacesRequest());
}
internal virtual DescribeNetworkInterfacesResponse DescribeNetworkInterfaces(DescribeNetworkInterfacesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeNetworkInterfacesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeNetworkInterfacesResponseUnmarshaller.Instance;
return Invoke<DescribeNetworkInterfacesResponse>(request, options);
}
/// <summary>
/// Describes one or more of your network interfaces.
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeNetworkInterfaces service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaces">REST API Reference for DescribeNetworkInterfaces Operation</seealso>
public virtual Task<DescribeNetworkInterfacesResponse> DescribeNetworkInterfacesAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeNetworkInterfacesAsync(new DescribeNetworkInterfacesRequest(), cancellationToken);
}
/// <summary>
/// Describes one or more of your network interfaces.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeNetworkInterfaces service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeNetworkInterfaces service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaces">REST API Reference for DescribeNetworkInterfaces Operation</seealso>
public virtual Task<DescribeNetworkInterfacesResponse> DescribeNetworkInterfacesAsync(DescribeNetworkInterfacesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeNetworkInterfacesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeNetworkInterfacesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeNetworkInterfacesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribePlacementGroups
internal virtual DescribePlacementGroupsResponse DescribePlacementGroups()
{
return DescribePlacementGroups(new DescribePlacementGroupsRequest());
}
internal virtual DescribePlacementGroupsResponse DescribePlacementGroups(DescribePlacementGroupsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribePlacementGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribePlacementGroupsResponseUnmarshaller.Instance;
return Invoke<DescribePlacementGroupsResponse>(request, options);
}
/// <summary>
/// Describes the specified placement groups or all of your placement groups. For more
/// information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html">Placement
/// Groups</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribePlacementGroups service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePlacementGroups">REST API Reference for DescribePlacementGroups Operation</seealso>
public virtual Task<DescribePlacementGroupsResponse> DescribePlacementGroupsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribePlacementGroupsAsync(new DescribePlacementGroupsRequest(), cancellationToken);
}
/// <summary>
/// Describes the specified placement groups or all of your placement groups. For more
/// information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html">Placement
/// Groups</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribePlacementGroups service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribePlacementGroups service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePlacementGroups">REST API Reference for DescribePlacementGroups Operation</seealso>
public virtual Task<DescribePlacementGroupsResponse> DescribePlacementGroupsAsync(DescribePlacementGroupsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribePlacementGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribePlacementGroupsResponseUnmarshaller.Instance;
return InvokeAsync<DescribePlacementGroupsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribePrefixLists
internal virtual DescribePrefixListsResponse DescribePrefixLists(DescribePrefixListsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribePrefixListsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribePrefixListsResponseUnmarshaller.Instance;
return Invoke<DescribePrefixListsResponse>(request, options);
}
/// <summary>
/// Describes available AWS services in a prefix list format, which includes the prefix
/// list name and prefix list ID of the service and the IP address range for the service.
/// A prefix list ID is required for creating an outbound security group rule that allows
/// traffic from a VPC to access an AWS service through a gateway VPC endpoint. Currently,
/// the services that support this action are Amazon S3 and Amazon DynamoDB.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribePrefixLists service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribePrefixLists service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePrefixLists">REST API Reference for DescribePrefixLists Operation</seealso>
public virtual Task<DescribePrefixListsResponse> DescribePrefixListsAsync(DescribePrefixListsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribePrefixListsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribePrefixListsResponseUnmarshaller.Instance;
return InvokeAsync<DescribePrefixListsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribePrincipalIdFormat
internal virtual DescribePrincipalIdFormatResponse DescribePrincipalIdFormat(DescribePrincipalIdFormatRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribePrincipalIdFormatRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribePrincipalIdFormatResponseUnmarshaller.Instance;
return Invoke<DescribePrincipalIdFormatResponse>(request, options);
}
/// <summary>
/// Describes the ID format settings for the root user and all IAM roles and IAM users
/// that have explicitly specified a longer ID (17-character ID) preference.
///
///
/// <para>
/// By default, all IAM roles and IAM users default to the same ID settings as the root
/// user, unless they explicitly override the settings. This request is useful for identifying
/// those IAM users and IAM roles that have overridden the default ID settings.
/// </para>
///
/// <para>
/// The following resource types support longer IDs: <code>bundle</code> | <code>conversion-task</code>
/// | <code>customer-gateway</code> | <code>dhcp-options</code> | <code>elastic-ip-allocation</code>
/// | <code>elastic-ip-association</code> | <code>export-task</code> | <code>flow-log</code>
/// | <code>image</code> | <code>import-task</code> | <code>instance</code> | <code>internet-gateway</code>
/// | <code>network-acl</code> | <code>network-acl-association</code> | <code>network-interface</code>
/// | <code>network-interface-attachment</code> | <code>prefix-list</code> | <code>reservation</code>
/// | <code>route-table</code> | <code>route-table-association</code> | <code>security-group</code>
/// | <code>snapshot</code> | <code>subnet</code> | <code>subnet-cidr-block-association</code>
/// | <code>volume</code> | <code>vpc</code> | <code>vpc-cidr-block-association</code>
/// | <code>vpc-endpoint</code> | <code>vpc-peering-connection</code> | <code>vpn-connection</code>
/// | <code>vpn-gateway</code>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribePrincipalIdFormat service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribePrincipalIdFormat service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePrincipalIdFormat">REST API Reference for DescribePrincipalIdFormat Operation</seealso>
public virtual Task<DescribePrincipalIdFormatResponse> DescribePrincipalIdFormatAsync(DescribePrincipalIdFormatRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribePrincipalIdFormatRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribePrincipalIdFormatResponseUnmarshaller.Instance;
return InvokeAsync<DescribePrincipalIdFormatResponse>(request, options, cancellationToken);
}
#endregion
#region DescribePublicIpv4Pools
internal virtual DescribePublicIpv4PoolsResponse DescribePublicIpv4Pools(DescribePublicIpv4PoolsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribePublicIpv4PoolsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribePublicIpv4PoolsResponseUnmarshaller.Instance;
return Invoke<DescribePublicIpv4PoolsResponse>(request, options);
}
/// <summary>
/// Describes the specified IPv4 address pools.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribePublicIpv4Pools service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribePublicIpv4Pools service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePublicIpv4Pools">REST API Reference for DescribePublicIpv4Pools Operation</seealso>
public virtual Task<DescribePublicIpv4PoolsResponse> DescribePublicIpv4PoolsAsync(DescribePublicIpv4PoolsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribePublicIpv4PoolsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribePublicIpv4PoolsResponseUnmarshaller.Instance;
return InvokeAsync<DescribePublicIpv4PoolsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeRegions
internal virtual DescribeRegionsResponse DescribeRegions()
{
return DescribeRegions(new DescribeRegionsRequest());
}
internal virtual DescribeRegionsResponse DescribeRegions(DescribeRegionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeRegionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeRegionsResponseUnmarshaller.Instance;
return Invoke<DescribeRegionsResponse>(request, options);
}
/// <summary>
/// Describes the Regions that are enabled for your account, or all Regions.
///
///
/// <para>
/// For a list of the Regions supported by Amazon EC2, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region">
/// Regions and Endpoints</a>.
/// </para>
///
/// <para>
/// For information about enabling and disabling Regions for your account, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande-manage.html">Managing
/// AWS Regions</a> in the <i>AWS General Reference</i>.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeRegions service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRegions">REST API Reference for DescribeRegions Operation</seealso>
public virtual Task<DescribeRegionsResponse> DescribeRegionsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeRegionsAsync(new DescribeRegionsRequest(), cancellationToken);
}
/// <summary>
/// Describes the Regions that are enabled for your account, or all Regions.
///
///
/// <para>
/// For a list of the Regions supported by Amazon EC2, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region">
/// Regions and Endpoints</a>.
/// </para>
///
/// <para>
/// For information about enabling and disabling Regions for your account, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande-manage.html">Managing
/// AWS Regions</a> in the <i>AWS General Reference</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeRegions service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeRegions service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRegions">REST API Reference for DescribeRegions Operation</seealso>
public virtual Task<DescribeRegionsResponse> DescribeRegionsAsync(DescribeRegionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeRegionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeRegionsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeRegionsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeReservedInstances
internal virtual DescribeReservedInstancesResponse DescribeReservedInstances()
{
return DescribeReservedInstances(new DescribeReservedInstancesRequest());
}
internal virtual DescribeReservedInstancesResponse DescribeReservedInstances(DescribeReservedInstancesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeReservedInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeReservedInstancesResponseUnmarshaller.Instance;
return Invoke<DescribeReservedInstancesResponse>(request, options);
}
/// <summary>
/// Describes one or more of the Reserved Instances that you purchased.
///
///
/// <para>
/// For more information about Reserved Instances, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-on-demand-reserved-instances.html">Reserved
/// Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeReservedInstances service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstances">REST API Reference for DescribeReservedInstances Operation</seealso>
public virtual Task<DescribeReservedInstancesResponse> DescribeReservedInstancesAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeReservedInstancesAsync(new DescribeReservedInstancesRequest(), cancellationToken);
}
/// <summary>
/// Describes one or more of the Reserved Instances that you purchased.
///
///
/// <para>
/// For more information about Reserved Instances, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-on-demand-reserved-instances.html">Reserved
/// Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeReservedInstances service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeReservedInstances service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstances">REST API Reference for DescribeReservedInstances Operation</seealso>
public virtual Task<DescribeReservedInstancesResponse> DescribeReservedInstancesAsync(DescribeReservedInstancesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeReservedInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeReservedInstancesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeReservedInstancesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeReservedInstancesListings
internal virtual DescribeReservedInstancesListingsResponse DescribeReservedInstancesListings()
{
return DescribeReservedInstancesListings(new DescribeReservedInstancesListingsRequest());
}
internal virtual DescribeReservedInstancesListingsResponse DescribeReservedInstancesListings(DescribeReservedInstancesListingsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeReservedInstancesListingsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeReservedInstancesListingsResponseUnmarshaller.Instance;
return Invoke<DescribeReservedInstancesListingsResponse>(request, options);
}
/// <summary>
/// Describes your account's Reserved Instance listings in the Reserved Instance Marketplace.
///
///
/// <para>
/// The Reserved Instance Marketplace matches sellers who want to resell Reserved Instance
/// capacity that they no longer need with buyers who want to purchase additional capacity.
/// Reserved Instances bought and sold through the Reserved Instance Marketplace work
/// like any other Reserved Instances.
/// </para>
///
/// <para>
/// As a seller, you choose to list some or all of your Reserved Instances, and you specify
/// the upfront price to receive for them. Your Reserved Instances are then listed in
/// the Reserved Instance Marketplace and are available for purchase.
/// </para>
///
/// <para>
/// As a buyer, you specify the configuration of the Reserved Instance to purchase, and
/// the Marketplace matches what you're searching for with what's available. The Marketplace
/// first sells the lowest priced Reserved Instances to you, and continues to sell available
/// Reserved Instance listings to you until your demand is met. You are charged based
/// on the total price of all of the listings that you purchase.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html">Reserved
/// Instance Marketplace</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeReservedInstancesListings service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesListings">REST API Reference for DescribeReservedInstancesListings Operation</seealso>
public virtual Task<DescribeReservedInstancesListingsResponse> DescribeReservedInstancesListingsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeReservedInstancesListingsAsync(new DescribeReservedInstancesListingsRequest(), cancellationToken);
}
/// <summary>
/// Describes your account's Reserved Instance listings in the Reserved Instance Marketplace.
///
///
/// <para>
/// The Reserved Instance Marketplace matches sellers who want to resell Reserved Instance
/// capacity that they no longer need with buyers who want to purchase additional capacity.
/// Reserved Instances bought and sold through the Reserved Instance Marketplace work
/// like any other Reserved Instances.
/// </para>
///
/// <para>
/// As a seller, you choose to list some or all of your Reserved Instances, and you specify
/// the upfront price to receive for them. Your Reserved Instances are then listed in
/// the Reserved Instance Marketplace and are available for purchase.
/// </para>
///
/// <para>
/// As a buyer, you specify the configuration of the Reserved Instance to purchase, and
/// the Marketplace matches what you're searching for with what's available. The Marketplace
/// first sells the lowest priced Reserved Instances to you, and continues to sell available
/// Reserved Instance listings to you until your demand is met. You are charged based
/// on the total price of all of the listings that you purchase.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html">Reserved
/// Instance Marketplace</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeReservedInstancesListings service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeReservedInstancesListings service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesListings">REST API Reference for DescribeReservedInstancesListings Operation</seealso>
public virtual Task<DescribeReservedInstancesListingsResponse> DescribeReservedInstancesListingsAsync(DescribeReservedInstancesListingsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeReservedInstancesListingsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeReservedInstancesListingsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeReservedInstancesListingsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeReservedInstancesModifications
internal virtual DescribeReservedInstancesModificationsResponse DescribeReservedInstancesModifications()
{
return DescribeReservedInstancesModifications(new DescribeReservedInstancesModificationsRequest());
}
internal virtual DescribeReservedInstancesModificationsResponse DescribeReservedInstancesModifications(DescribeReservedInstancesModificationsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeReservedInstancesModificationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeReservedInstancesModificationsResponseUnmarshaller.Instance;
return Invoke<DescribeReservedInstancesModificationsResponse>(request, options);
}
/// <summary>
/// Describes the modifications made to your Reserved Instances. If no parameter is specified,
/// information about all your Reserved Instances modification requests is returned. If
/// a modification ID is specified, only information about the specific modification is
/// returned.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html">Modifying
/// Reserved Instances</a> in the Amazon Elastic Compute Cloud User Guide.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeReservedInstancesModifications service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesModifications">REST API Reference for DescribeReservedInstancesModifications Operation</seealso>
public virtual Task<DescribeReservedInstancesModificationsResponse> DescribeReservedInstancesModificationsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeReservedInstancesModificationsAsync(new DescribeReservedInstancesModificationsRequest(), cancellationToken);
}
/// <summary>
/// Describes the modifications made to your Reserved Instances. If no parameter is specified,
/// information about all your Reserved Instances modification requests is returned. If
/// a modification ID is specified, only information about the specific modification is
/// returned.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html">Modifying
/// Reserved Instances</a> in the Amazon Elastic Compute Cloud User Guide.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeReservedInstancesModifications service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeReservedInstancesModifications service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesModifications">REST API Reference for DescribeReservedInstancesModifications Operation</seealso>
public virtual Task<DescribeReservedInstancesModificationsResponse> DescribeReservedInstancesModificationsAsync(DescribeReservedInstancesModificationsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeReservedInstancesModificationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeReservedInstancesModificationsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeReservedInstancesModificationsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeReservedInstancesOfferings
internal virtual DescribeReservedInstancesOfferingsResponse DescribeReservedInstancesOfferings()
{
return DescribeReservedInstancesOfferings(new DescribeReservedInstancesOfferingsRequest());
}
internal virtual DescribeReservedInstancesOfferingsResponse DescribeReservedInstancesOfferings(DescribeReservedInstancesOfferingsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeReservedInstancesOfferingsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeReservedInstancesOfferingsResponseUnmarshaller.Instance;
return Invoke<DescribeReservedInstancesOfferingsResponse>(request, options);
}
/// <summary>
/// Describes Reserved Instance offerings that are available for purchase. With Reserved
/// Instances, you purchase the right to launch instances for a period of time. During
/// that time period, you do not receive insufficient capacity errors, and you pay a lower
/// usage rate than the rate charged for On-Demand instances for the actual time used.
///
///
/// <para>
/// If you have listed your own Reserved Instances for sale in the Reserved Instance Marketplace,
/// they will be excluded from these results. This is to ensure that you do not purchase
/// your own Reserved Instances.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html">Reserved
/// Instance Marketplace</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeReservedInstancesOfferings service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesOfferings">REST API Reference for DescribeReservedInstancesOfferings Operation</seealso>
public virtual Task<DescribeReservedInstancesOfferingsResponse> DescribeReservedInstancesOfferingsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeReservedInstancesOfferingsAsync(new DescribeReservedInstancesOfferingsRequest(), cancellationToken);
}
/// <summary>
/// Describes Reserved Instance offerings that are available for purchase. With Reserved
/// Instances, you purchase the right to launch instances for a period of time. During
/// that time period, you do not receive insufficient capacity errors, and you pay a lower
/// usage rate than the rate charged for On-Demand instances for the actual time used.
///
///
/// <para>
/// If you have listed your own Reserved Instances for sale in the Reserved Instance Marketplace,
/// they will be excluded from these results. This is to ensure that you do not purchase
/// your own Reserved Instances.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html">Reserved
/// Instance Marketplace</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeReservedInstancesOfferings service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeReservedInstancesOfferings service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesOfferings">REST API Reference for DescribeReservedInstancesOfferings Operation</seealso>
public virtual Task<DescribeReservedInstancesOfferingsResponse> DescribeReservedInstancesOfferingsAsync(DescribeReservedInstancesOfferingsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeReservedInstancesOfferingsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeReservedInstancesOfferingsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeReservedInstancesOfferingsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeRouteTables
internal virtual DescribeRouteTablesResponse DescribeRouteTables()
{
return DescribeRouteTables(new DescribeRouteTablesRequest());
}
internal virtual DescribeRouteTablesResponse DescribeRouteTables(DescribeRouteTablesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeRouteTablesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeRouteTablesResponseUnmarshaller.Instance;
return Invoke<DescribeRouteTablesResponse>(request, options);
}
/// <summary>
/// Describes one or more of your route tables.
///
///
/// <para>
/// Each subnet in your VPC must be associated with a route table. If a subnet is not
/// explicitly associated with any route table, it is implicitly associated with the main
/// route table. This command does not return the subnet ID for implicit associations.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html">Route
/// Tables</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeRouteTables service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRouteTables">REST API Reference for DescribeRouteTables Operation</seealso>
public virtual Task<DescribeRouteTablesResponse> DescribeRouteTablesAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeRouteTablesAsync(new DescribeRouteTablesRequest(), cancellationToken);
}
/// <summary>
/// Describes one or more of your route tables.
///
///
/// <para>
/// Each subnet in your VPC must be associated with a route table. If a subnet is not
/// explicitly associated with any route table, it is implicitly associated with the main
/// route table. This command does not return the subnet ID for implicit associations.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html">Route
/// Tables</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeRouteTables service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeRouteTables service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRouteTables">REST API Reference for DescribeRouteTables Operation</seealso>
public virtual Task<DescribeRouteTablesResponse> DescribeRouteTablesAsync(DescribeRouteTablesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeRouteTablesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeRouteTablesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeRouteTablesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeScheduledInstanceAvailability
internal virtual DescribeScheduledInstanceAvailabilityResponse DescribeScheduledInstanceAvailability(DescribeScheduledInstanceAvailabilityRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeScheduledInstanceAvailabilityRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeScheduledInstanceAvailabilityResponseUnmarshaller.Instance;
return Invoke<DescribeScheduledInstanceAvailabilityResponse>(request, options);
}
/// <summary>
/// Finds available schedules that meet the specified criteria.
///
///
/// <para>
/// You can search for an available schedule no more than 3 months in advance. You must
/// meet the minimum required duration of 1,200 hours per year. For example, the minimum
/// daily schedule is 4 hours, the minimum weekly schedule is 24 hours, and the minimum
/// monthly schedule is 100 hours.
/// </para>
///
/// <para>
/// After you find a schedule that meets your needs, call <a>PurchaseScheduledInstances</a>
/// to purchase Scheduled Instances with that schedule.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeScheduledInstanceAvailability service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeScheduledInstanceAvailability service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeScheduledInstanceAvailability">REST API Reference for DescribeScheduledInstanceAvailability Operation</seealso>
public virtual Task<DescribeScheduledInstanceAvailabilityResponse> DescribeScheduledInstanceAvailabilityAsync(DescribeScheduledInstanceAvailabilityRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeScheduledInstanceAvailabilityRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeScheduledInstanceAvailabilityResponseUnmarshaller.Instance;
return InvokeAsync<DescribeScheduledInstanceAvailabilityResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeScheduledInstances
internal virtual DescribeScheduledInstancesResponse DescribeScheduledInstances(DescribeScheduledInstancesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeScheduledInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeScheduledInstancesResponseUnmarshaller.Instance;
return Invoke<DescribeScheduledInstancesResponse>(request, options);
}
/// <summary>
/// Describes the specified Scheduled Instances or all your Scheduled Instances.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeScheduledInstances service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeScheduledInstances service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeScheduledInstances">REST API Reference for DescribeScheduledInstances Operation</seealso>
public virtual Task<DescribeScheduledInstancesResponse> DescribeScheduledInstancesAsync(DescribeScheduledInstancesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeScheduledInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeScheduledInstancesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeScheduledInstancesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeSecurityGroupReferences
internal virtual DescribeSecurityGroupReferencesResponse DescribeSecurityGroupReferences(DescribeSecurityGroupReferencesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSecurityGroupReferencesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSecurityGroupReferencesResponseUnmarshaller.Instance;
return Invoke<DescribeSecurityGroupReferencesResponse>(request, options);
}
/// <summary>
/// [VPC only] Describes the VPCs on the other side of a VPC peering connection that are
/// referencing the security groups you've specified in this request.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeSecurityGroupReferences service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeSecurityGroupReferences service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroupReferences">REST API Reference for DescribeSecurityGroupReferences Operation</seealso>
public virtual Task<DescribeSecurityGroupReferencesResponse> DescribeSecurityGroupReferencesAsync(DescribeSecurityGroupReferencesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSecurityGroupReferencesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSecurityGroupReferencesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeSecurityGroupReferencesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeSecurityGroups
internal virtual DescribeSecurityGroupsResponse DescribeSecurityGroups()
{
return DescribeSecurityGroups(new DescribeSecurityGroupsRequest());
}
internal virtual DescribeSecurityGroupsResponse DescribeSecurityGroups(DescribeSecurityGroupsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSecurityGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSecurityGroupsResponseUnmarshaller.Instance;
return Invoke<DescribeSecurityGroupsResponse>(request, options);
}
/// <summary>
/// Describes the specified security groups or all of your security groups.
///
///
/// <para>
/// A security group is for use with instances either in the EC2-Classic platform or in
/// a specific VPC. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html">Amazon
/// EC2 Security Groups</a> in the <i>Amazon Elastic Compute Cloud User Guide</i> and
/// <a href="https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html">Security
/// Groups for Your VPC</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeSecurityGroups service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroups">REST API Reference for DescribeSecurityGroups Operation</seealso>
public virtual Task<DescribeSecurityGroupsResponse> DescribeSecurityGroupsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeSecurityGroupsAsync(new DescribeSecurityGroupsRequest(), cancellationToken);
}
/// <summary>
/// Describes the specified security groups or all of your security groups.
///
///
/// <para>
/// A security group is for use with instances either in the EC2-Classic platform or in
/// a specific VPC. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html">Amazon
/// EC2 Security Groups</a> in the <i>Amazon Elastic Compute Cloud User Guide</i> and
/// <a href="https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html">Security
/// Groups for Your VPC</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeSecurityGroups service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeSecurityGroups service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroups">REST API Reference for DescribeSecurityGroups Operation</seealso>
public virtual Task<DescribeSecurityGroupsResponse> DescribeSecurityGroupsAsync(DescribeSecurityGroupsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSecurityGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSecurityGroupsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeSecurityGroupsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeSnapshotAttribute
internal virtual DescribeSnapshotAttributeResponse DescribeSnapshotAttribute(DescribeSnapshotAttributeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSnapshotAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSnapshotAttributeResponseUnmarshaller.Instance;
return Invoke<DescribeSnapshotAttributeResponse>(request, options);
}
/// <summary>
/// Describes the specified attribute of the specified snapshot. You can specify only
/// one attribute at a time.
///
///
/// <para>
/// For more information about EBS snapshots, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSSnapshots.html">Amazon
/// EBS Snapshots</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeSnapshotAttribute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeSnapshotAttribute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshotAttribute">REST API Reference for DescribeSnapshotAttribute Operation</seealso>
public virtual Task<DescribeSnapshotAttributeResponse> DescribeSnapshotAttributeAsync(DescribeSnapshotAttributeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSnapshotAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSnapshotAttributeResponseUnmarshaller.Instance;
return InvokeAsync<DescribeSnapshotAttributeResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeSnapshots
internal virtual DescribeSnapshotsResponse DescribeSnapshots()
{
return DescribeSnapshots(new DescribeSnapshotsRequest());
}
internal virtual DescribeSnapshotsResponse DescribeSnapshots(DescribeSnapshotsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSnapshotsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSnapshotsResponseUnmarshaller.Instance;
return Invoke<DescribeSnapshotsResponse>(request, options);
}
/// <summary>
/// Describes the specified EBS snapshots available to you or all of the EBS snapshots
/// available to you.
///
///
/// <para>
/// The snapshots available to you include public snapshots, private snapshots that you
/// own, and private snapshots owned by other AWS accounts for which you have explicit
/// create volume permissions.
/// </para>
///
/// <para>
/// The create volume permissions fall into the following categories:
/// </para>
/// <ul> <li>
/// <para>
/// <i>public</i>: The owner of the snapshot granted create volume permissions for the
/// snapshot to the <code>all</code> group. All AWS accounts have create volume permissions
/// for these snapshots.
/// </para>
/// </li> <li>
/// <para>
/// <i>explicit</i>: The owner of the snapshot granted create volume permissions to a
/// specific AWS account.
/// </para>
/// </li> <li>
/// <para>
/// <i>implicit</i>: An AWS account has implicit create volume permissions for all snapshots
/// it owns.
/// </para>
/// </li> </ul>
/// <para>
/// The list of snapshots returned can be filtered by specifying snapshot IDs, snapshot
/// owners, or AWS accounts with create volume permissions. If no options are specified,
/// Amazon EC2 returns all snapshots for which you have create volume permissions.
/// </para>
///
/// <para>
/// If you specify one or more snapshot IDs, only snapshots that have the specified IDs
/// are returned. If you specify an invalid snapshot ID, an error is returned. If you
/// specify a snapshot ID for which you do not have access, it is not included in the
/// returned results.
/// </para>
///
/// <para>
/// If you specify one or more snapshot owners using the <code>OwnerIds</code> option,
/// only snapshots from the specified owners and for which you have access are returned.
/// The results can include the AWS account IDs of the specified owners, <code>amazon</code>
/// for snapshots owned by Amazon, or <code>self</code> for snapshots that you own.
/// </para>
///
/// <para>
/// If you specify a list of restorable users, only snapshots with create snapshot permissions
/// for those users are returned. You can specify AWS account IDs (if you own the snapshots),
/// <code>self</code> for snapshots for which you own or have explicit permissions, or
/// <code>all</code> for public snapshots.
/// </para>
///
/// <para>
/// If you are describing a long list of snapshots, you can paginate the output to make
/// the list more manageable. The <code>MaxResults</code> parameter sets the maximum number
/// of results returned in a single page. If the list of results exceeds your <code>MaxResults</code>
/// value, then that number of results is returned along with a <code>NextToken</code>
/// value that can be passed to a subsequent <code>DescribeSnapshots</code> request to
/// retrieve the remaining results.
/// </para>
///
/// <para>
/// To get the state of fast snapshot restores for a snapshot, use <a>DescribeFastSnapshotRestores</a>.
/// </para>
///
/// <para>
/// For more information about EBS snapshots, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSSnapshots.html">Amazon
/// EBS Snapshots</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeSnapshots service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshots">REST API Reference for DescribeSnapshots Operation</seealso>
public virtual Task<DescribeSnapshotsResponse> DescribeSnapshotsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeSnapshotsAsync(new DescribeSnapshotsRequest(), cancellationToken);
}
/// <summary>
/// Describes the specified EBS snapshots available to you or all of the EBS snapshots
/// available to you.
///
///
/// <para>
/// The snapshots available to you include public snapshots, private snapshots that you
/// own, and private snapshots owned by other AWS accounts for which you have explicit
/// create volume permissions.
/// </para>
///
/// <para>
/// The create volume permissions fall into the following categories:
/// </para>
/// <ul> <li>
/// <para>
/// <i>public</i>: The owner of the snapshot granted create volume permissions for the
/// snapshot to the <code>all</code> group. All AWS accounts have create volume permissions
/// for these snapshots.
/// </para>
/// </li> <li>
/// <para>
/// <i>explicit</i>: The owner of the snapshot granted create volume permissions to a
/// specific AWS account.
/// </para>
/// </li> <li>
/// <para>
/// <i>implicit</i>: An AWS account has implicit create volume permissions for all snapshots
/// it owns.
/// </para>
/// </li> </ul>
/// <para>
/// The list of snapshots returned can be filtered by specifying snapshot IDs, snapshot
/// owners, or AWS accounts with create volume permissions. If no options are specified,
/// Amazon EC2 returns all snapshots for which you have create volume permissions.
/// </para>
///
/// <para>
/// If you specify one or more snapshot IDs, only snapshots that have the specified IDs
/// are returned. If you specify an invalid snapshot ID, an error is returned. If you
/// specify a snapshot ID for which you do not have access, it is not included in the
/// returned results.
/// </para>
///
/// <para>
/// If you specify one or more snapshot owners using the <code>OwnerIds</code> option,
/// only snapshots from the specified owners and for which you have access are returned.
/// The results can include the AWS account IDs of the specified owners, <code>amazon</code>
/// for snapshots owned by Amazon, or <code>self</code> for snapshots that you own.
/// </para>
///
/// <para>
/// If you specify a list of restorable users, only snapshots with create snapshot permissions
/// for those users are returned. You can specify AWS account IDs (if you own the snapshots),
/// <code>self</code> for snapshots for which you own or have explicit permissions, or
/// <code>all</code> for public snapshots.
/// </para>
///
/// <para>
/// If you are describing a long list of snapshots, you can paginate the output to make
/// the list more manageable. The <code>MaxResults</code> parameter sets the maximum number
/// of results returned in a single page. If the list of results exceeds your <code>MaxResults</code>
/// value, then that number of results is returned along with a <code>NextToken</code>
/// value that can be passed to a subsequent <code>DescribeSnapshots</code> request to
/// retrieve the remaining results.
/// </para>
///
/// <para>
/// To get the state of fast snapshot restores for a snapshot, use <a>DescribeFastSnapshotRestores</a>.
/// </para>
///
/// <para>
/// For more information about EBS snapshots, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSSnapshots.html">Amazon
/// EBS Snapshots</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeSnapshots service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeSnapshots service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshots">REST API Reference for DescribeSnapshots Operation</seealso>
public virtual Task<DescribeSnapshotsResponse> DescribeSnapshotsAsync(DescribeSnapshotsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSnapshotsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSnapshotsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeSnapshotsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeSpotDatafeedSubscription
internal virtual DescribeSpotDatafeedSubscriptionResponse DescribeSpotDatafeedSubscription()
{
return DescribeSpotDatafeedSubscription(new DescribeSpotDatafeedSubscriptionRequest());
}
internal virtual DescribeSpotDatafeedSubscriptionResponse DescribeSpotDatafeedSubscription(DescribeSpotDatafeedSubscriptionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSpotDatafeedSubscriptionRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSpotDatafeedSubscriptionResponseUnmarshaller.Instance;
return Invoke<DescribeSpotDatafeedSubscriptionResponse>(request, options);
}
/// <summary>
/// Describes the data feed for Spot Instances. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html">Spot
/// Instance Data Feed</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeSpotDatafeedSubscription service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotDatafeedSubscription">REST API Reference for DescribeSpotDatafeedSubscription Operation</seealso>
public virtual Task<DescribeSpotDatafeedSubscriptionResponse> DescribeSpotDatafeedSubscriptionAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeSpotDatafeedSubscriptionAsync(new DescribeSpotDatafeedSubscriptionRequest(), cancellationToken);
}
/// <summary>
/// Describes the data feed for Spot Instances. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html">Spot
/// Instance Data Feed</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeSpotDatafeedSubscription service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeSpotDatafeedSubscription service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotDatafeedSubscription">REST API Reference for DescribeSpotDatafeedSubscription Operation</seealso>
public virtual Task<DescribeSpotDatafeedSubscriptionResponse> DescribeSpotDatafeedSubscriptionAsync(DescribeSpotDatafeedSubscriptionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSpotDatafeedSubscriptionRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSpotDatafeedSubscriptionResponseUnmarshaller.Instance;
return InvokeAsync<DescribeSpotDatafeedSubscriptionResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeSpotFleetInstances
internal virtual DescribeSpotFleetInstancesResponse DescribeSpotFleetInstances(DescribeSpotFleetInstancesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSpotFleetInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSpotFleetInstancesResponseUnmarshaller.Instance;
return Invoke<DescribeSpotFleetInstancesResponse>(request, options);
}
/// <summary>
/// Describes the running instances for the specified Spot Fleet.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeSpotFleetInstances service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeSpotFleetInstances service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetInstances">REST API Reference for DescribeSpotFleetInstances Operation</seealso>
public virtual Task<DescribeSpotFleetInstancesResponse> DescribeSpotFleetInstancesAsync(DescribeSpotFleetInstancesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSpotFleetInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSpotFleetInstancesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeSpotFleetInstancesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeSpotFleetRequestHistory
internal virtual DescribeSpotFleetRequestHistoryResponse DescribeSpotFleetRequestHistory(DescribeSpotFleetRequestHistoryRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSpotFleetRequestHistoryRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSpotFleetRequestHistoryResponseUnmarshaller.Instance;
return Invoke<DescribeSpotFleetRequestHistoryResponse>(request, options);
}
/// <summary>
/// Describes the events for the specified Spot Fleet request during the specified time.
///
///
/// <para>
/// Spot Fleet events are delayed by up to 30 seconds before they can be described. This
/// ensures that you can query by the last evaluated time and not miss a recorded event.
/// Spot Fleet events are available for 48 hours.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeSpotFleetRequestHistory service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeSpotFleetRequestHistory service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequestHistory">REST API Reference for DescribeSpotFleetRequestHistory Operation</seealso>
public virtual Task<DescribeSpotFleetRequestHistoryResponse> DescribeSpotFleetRequestHistoryAsync(DescribeSpotFleetRequestHistoryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSpotFleetRequestHistoryRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSpotFleetRequestHistoryResponseUnmarshaller.Instance;
return InvokeAsync<DescribeSpotFleetRequestHistoryResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeSpotFleetRequests
internal virtual DescribeSpotFleetRequestsResponse DescribeSpotFleetRequests(DescribeSpotFleetRequestsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSpotFleetRequestsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSpotFleetRequestsResponseUnmarshaller.Instance;
return Invoke<DescribeSpotFleetRequestsResponse>(request, options);
}
/// <summary>
/// Describes your Spot Fleet requests.
///
///
/// <para>
/// Spot Fleet requests are deleted 48 hours after they are canceled and their instances
/// are terminated.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeSpotFleetRequests service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeSpotFleetRequests service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequests">REST API Reference for DescribeSpotFleetRequests Operation</seealso>
public virtual Task<DescribeSpotFleetRequestsResponse> DescribeSpotFleetRequestsAsync(DescribeSpotFleetRequestsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSpotFleetRequestsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSpotFleetRequestsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeSpotFleetRequestsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeSpotInstanceRequests
internal virtual DescribeSpotInstanceRequestsResponse DescribeSpotInstanceRequests()
{
return DescribeSpotInstanceRequests(new DescribeSpotInstanceRequestsRequest());
}
internal virtual DescribeSpotInstanceRequestsResponse DescribeSpotInstanceRequests(DescribeSpotInstanceRequestsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSpotInstanceRequestsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSpotInstanceRequestsResponseUnmarshaller.Instance;
return Invoke<DescribeSpotInstanceRequestsResponse>(request, options);
}
/// <summary>
/// Describes the specified Spot Instance requests.
///
///
/// <para>
/// You can use <code>DescribeSpotInstanceRequests</code> to find a running Spot Instance
/// by examining the response. If the status of the Spot Instance is <code>fulfilled</code>,
/// the instance ID appears in the response and contains the identifier of the instance.
/// Alternatively, you can use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances">DescribeInstances</a>
/// with a filter to look for instances where the instance lifecycle is <code>spot</code>.
/// </para>
///
/// <para>
/// We recommend that you set <code>MaxResults</code> to a value between 5 and 1000 to
/// limit the number of results returned. This paginates the output, which makes the list
/// more manageable and returns the results faster. If the list of results exceeds your
/// <code>MaxResults</code> value, then that number of results is returned along with
/// a <code>NextToken</code> value that can be passed to a subsequent <code>DescribeSpotInstanceRequests</code>
/// request to retrieve the remaining results.
/// </para>
///
/// <para>
/// Spot Instance requests are deleted four hours after they are canceled and their instances
/// are terminated.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeSpotInstanceRequests service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotInstanceRequests">REST API Reference for DescribeSpotInstanceRequests Operation</seealso>
public virtual Task<DescribeSpotInstanceRequestsResponse> DescribeSpotInstanceRequestsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeSpotInstanceRequestsAsync(new DescribeSpotInstanceRequestsRequest(), cancellationToken);
}
/// <summary>
/// Describes the specified Spot Instance requests.
///
///
/// <para>
/// You can use <code>DescribeSpotInstanceRequests</code> to find a running Spot Instance
/// by examining the response. If the status of the Spot Instance is <code>fulfilled</code>,
/// the instance ID appears in the response and contains the identifier of the instance.
/// Alternatively, you can use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances">DescribeInstances</a>
/// with a filter to look for instances where the instance lifecycle is <code>spot</code>.
/// </para>
///
/// <para>
/// We recommend that you set <code>MaxResults</code> to a value between 5 and 1000 to
/// limit the number of results returned. This paginates the output, which makes the list
/// more manageable and returns the results faster. If the list of results exceeds your
/// <code>MaxResults</code> value, then that number of results is returned along with
/// a <code>NextToken</code> value that can be passed to a subsequent <code>DescribeSpotInstanceRequests</code>
/// request to retrieve the remaining results.
/// </para>
///
/// <para>
/// Spot Instance requests are deleted four hours after they are canceled and their instances
/// are terminated.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeSpotInstanceRequests service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeSpotInstanceRequests service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotInstanceRequests">REST API Reference for DescribeSpotInstanceRequests Operation</seealso>
public virtual Task<DescribeSpotInstanceRequestsResponse> DescribeSpotInstanceRequestsAsync(DescribeSpotInstanceRequestsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSpotInstanceRequestsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSpotInstanceRequestsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeSpotInstanceRequestsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeSpotPriceHistory
internal virtual DescribeSpotPriceHistoryResponse DescribeSpotPriceHistory()
{
return DescribeSpotPriceHistory(new DescribeSpotPriceHistoryRequest());
}
internal virtual DescribeSpotPriceHistoryResponse DescribeSpotPriceHistory(DescribeSpotPriceHistoryRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSpotPriceHistoryRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSpotPriceHistoryResponseUnmarshaller.Instance;
return Invoke<DescribeSpotPriceHistoryResponse>(request, options);
}
/// <summary>
/// Describes the Spot price history. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances-history.html">Spot
/// Instance Pricing History</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.
///
///
/// <para>
/// When you specify a start and end time, this operation returns the prices of the instance
/// types within the time range that you specified and the time when the price changed.
/// The price is valid within the time period that you specified; the response merely
/// indicates the last time that the price changed.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeSpotPriceHistory service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotPriceHistory">REST API Reference for DescribeSpotPriceHistory Operation</seealso>
public virtual Task<DescribeSpotPriceHistoryResponse> DescribeSpotPriceHistoryAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeSpotPriceHistoryAsync(new DescribeSpotPriceHistoryRequest(), cancellationToken);
}
/// <summary>
/// Describes the Spot price history. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances-history.html">Spot
/// Instance Pricing History</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.
///
///
/// <para>
/// When you specify a start and end time, this operation returns the prices of the instance
/// types within the time range that you specified and the time when the price changed.
/// The price is valid within the time period that you specified; the response merely
/// indicates the last time that the price changed.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeSpotPriceHistory service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeSpotPriceHistory service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotPriceHistory">REST API Reference for DescribeSpotPriceHistory Operation</seealso>
public virtual Task<DescribeSpotPriceHistoryResponse> DescribeSpotPriceHistoryAsync(DescribeSpotPriceHistoryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSpotPriceHistoryRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSpotPriceHistoryResponseUnmarshaller.Instance;
return InvokeAsync<DescribeSpotPriceHistoryResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeStaleSecurityGroups
internal virtual DescribeStaleSecurityGroupsResponse DescribeStaleSecurityGroups(DescribeStaleSecurityGroupsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeStaleSecurityGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeStaleSecurityGroupsResponseUnmarshaller.Instance;
return Invoke<DescribeStaleSecurityGroupsResponse>(request, options);
}
/// <summary>
/// [VPC only] Describes the stale security group rules for security groups in a specified
/// VPC. Rules are stale when they reference a deleted security group in a peer VPC, or
/// a security group in a peer VPC for which the VPC peering connection has been deleted.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeStaleSecurityGroups service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeStaleSecurityGroups service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeStaleSecurityGroups">REST API Reference for DescribeStaleSecurityGroups Operation</seealso>
public virtual Task<DescribeStaleSecurityGroupsResponse> DescribeStaleSecurityGroupsAsync(DescribeStaleSecurityGroupsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeStaleSecurityGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeStaleSecurityGroupsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeStaleSecurityGroupsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeSubnets
internal virtual DescribeSubnetsResponse DescribeSubnets()
{
return DescribeSubnets(new DescribeSubnetsRequest());
}
internal virtual DescribeSubnetsResponse DescribeSubnets(DescribeSubnetsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSubnetsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSubnetsResponseUnmarshaller.Instance;
return Invoke<DescribeSubnetsResponse>(request, options);
}
/// <summary>
/// Describes one or more of your subnets.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html">Your
/// VPC and Subnets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeSubnets service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSubnets">REST API Reference for DescribeSubnets Operation</seealso>
public virtual Task<DescribeSubnetsResponse> DescribeSubnetsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeSubnetsAsync(new DescribeSubnetsRequest(), cancellationToken);
}
/// <summary>
/// Describes one or more of your subnets.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html">Your
/// VPC and Subnets</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeSubnets service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeSubnets service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSubnets">REST API Reference for DescribeSubnets Operation</seealso>
public virtual Task<DescribeSubnetsResponse> DescribeSubnetsAsync(DescribeSubnetsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeSubnetsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeSubnetsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeSubnetsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeTags
internal virtual DescribeTagsResponse DescribeTags()
{
return DescribeTags(new DescribeTagsRequest());
}
internal virtual DescribeTagsResponse DescribeTags(DescribeTagsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeTagsResponseUnmarshaller.Instance;
return Invoke<DescribeTagsResponse>(request, options);
}
/// <summary>
/// Describes the specified tags for your EC2 resources.
///
///
/// <para>
/// For more information about tags, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html">Tagging
/// Your Resources</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeTags service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTags">REST API Reference for DescribeTags Operation</seealso>
public virtual Task<DescribeTagsResponse> DescribeTagsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeTagsAsync(new DescribeTagsRequest(), cancellationToken);
}
/// <summary>
/// Describes the specified tags for your EC2 resources.
///
///
/// <para>
/// For more information about tags, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html">Tagging
/// Your Resources</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeTags service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeTags service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTags">REST API Reference for DescribeTags Operation</seealso>
public virtual Task<DescribeTagsResponse> DescribeTagsAsync(DescribeTagsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeTagsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeTagsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeTagsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeTrafficMirrorFilters
internal virtual DescribeTrafficMirrorFiltersResponse DescribeTrafficMirrorFilters(DescribeTrafficMirrorFiltersRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeTrafficMirrorFiltersRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeTrafficMirrorFiltersResponseUnmarshaller.Instance;
return Invoke<DescribeTrafficMirrorFiltersResponse>(request, options);
}
/// <summary>
/// Describes one or more Traffic Mirror filters.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeTrafficMirrorFilters service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeTrafficMirrorFilters service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTrafficMirrorFilters">REST API Reference for DescribeTrafficMirrorFilters Operation</seealso>
public virtual Task<DescribeTrafficMirrorFiltersResponse> DescribeTrafficMirrorFiltersAsync(DescribeTrafficMirrorFiltersRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeTrafficMirrorFiltersRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeTrafficMirrorFiltersResponseUnmarshaller.Instance;
return InvokeAsync<DescribeTrafficMirrorFiltersResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeTrafficMirrorSessions
internal virtual DescribeTrafficMirrorSessionsResponse DescribeTrafficMirrorSessions(DescribeTrafficMirrorSessionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeTrafficMirrorSessionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeTrafficMirrorSessionsResponseUnmarshaller.Instance;
return Invoke<DescribeTrafficMirrorSessionsResponse>(request, options);
}
/// <summary>
/// Describes one or more Traffic Mirror sessions. By default, all Traffic Mirror sessions
/// are described. Alternatively, you can filter the results.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeTrafficMirrorSessions service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeTrafficMirrorSessions service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTrafficMirrorSessions">REST API Reference for DescribeTrafficMirrorSessions Operation</seealso>
public virtual Task<DescribeTrafficMirrorSessionsResponse> DescribeTrafficMirrorSessionsAsync(DescribeTrafficMirrorSessionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeTrafficMirrorSessionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeTrafficMirrorSessionsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeTrafficMirrorSessionsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeTrafficMirrorTargets
internal virtual DescribeTrafficMirrorTargetsResponse DescribeTrafficMirrorTargets(DescribeTrafficMirrorTargetsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeTrafficMirrorTargetsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeTrafficMirrorTargetsResponseUnmarshaller.Instance;
return Invoke<DescribeTrafficMirrorTargetsResponse>(request, options);
}
/// <summary>
/// Information about one or more Traffic Mirror targets.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeTrafficMirrorTargets service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeTrafficMirrorTargets service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTrafficMirrorTargets">REST API Reference for DescribeTrafficMirrorTargets Operation</seealso>
public virtual Task<DescribeTrafficMirrorTargetsResponse> DescribeTrafficMirrorTargetsAsync(DescribeTrafficMirrorTargetsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeTrafficMirrorTargetsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeTrafficMirrorTargetsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeTrafficMirrorTargetsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeTransitGatewayAttachments
internal virtual DescribeTransitGatewayAttachmentsResponse DescribeTransitGatewayAttachments(DescribeTransitGatewayAttachmentsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeTransitGatewayAttachmentsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeTransitGatewayAttachmentsResponseUnmarshaller.Instance;
return Invoke<DescribeTransitGatewayAttachmentsResponse>(request, options);
}
/// <summary>
/// Describes one or more attachments between resources and transit gateways. By default,
/// all attachments are described. Alternatively, you can filter the results by attachment
/// ID, attachment state, resource ID, or resource owner.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeTransitGatewayAttachments service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeTransitGatewayAttachments service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTransitGatewayAttachments">REST API Reference for DescribeTransitGatewayAttachments Operation</seealso>
public virtual Task<DescribeTransitGatewayAttachmentsResponse> DescribeTransitGatewayAttachmentsAsync(DescribeTransitGatewayAttachmentsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeTransitGatewayAttachmentsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeTransitGatewayAttachmentsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeTransitGatewayAttachmentsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeTransitGatewayMulticastDomains
internal virtual DescribeTransitGatewayMulticastDomainsResponse DescribeTransitGatewayMulticastDomains(DescribeTransitGatewayMulticastDomainsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeTransitGatewayMulticastDomainsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeTransitGatewayMulticastDomainsResponseUnmarshaller.Instance;
return Invoke<DescribeTransitGatewayMulticastDomainsResponse>(request, options);
}
/// <summary>
/// Describes one or more transit gateway multicast domains.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeTransitGatewayMulticastDomains service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeTransitGatewayMulticastDomains service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTransitGatewayMulticastDomains">REST API Reference for DescribeTransitGatewayMulticastDomains Operation</seealso>
public virtual Task<DescribeTransitGatewayMulticastDomainsResponse> DescribeTransitGatewayMulticastDomainsAsync(DescribeTransitGatewayMulticastDomainsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeTransitGatewayMulticastDomainsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeTransitGatewayMulticastDomainsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeTransitGatewayMulticastDomainsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeTransitGatewayPeeringAttachments
internal virtual DescribeTransitGatewayPeeringAttachmentsResponse DescribeTransitGatewayPeeringAttachments(DescribeTransitGatewayPeeringAttachmentsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeTransitGatewayPeeringAttachmentsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeTransitGatewayPeeringAttachmentsResponseUnmarshaller.Instance;
return Invoke<DescribeTransitGatewayPeeringAttachmentsResponse>(request, options);
}
/// <summary>
/// Describes your transit gateway peering attachments.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeTransitGatewayPeeringAttachments service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeTransitGatewayPeeringAttachments service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTransitGatewayPeeringAttachments">REST API Reference for DescribeTransitGatewayPeeringAttachments Operation</seealso>
public virtual Task<DescribeTransitGatewayPeeringAttachmentsResponse> DescribeTransitGatewayPeeringAttachmentsAsync(DescribeTransitGatewayPeeringAttachmentsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeTransitGatewayPeeringAttachmentsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeTransitGatewayPeeringAttachmentsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeTransitGatewayPeeringAttachmentsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeTransitGatewayRouteTables
internal virtual DescribeTransitGatewayRouteTablesResponse DescribeTransitGatewayRouteTables(DescribeTransitGatewayRouteTablesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeTransitGatewayRouteTablesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeTransitGatewayRouteTablesResponseUnmarshaller.Instance;
return Invoke<DescribeTransitGatewayRouteTablesResponse>(request, options);
}
/// <summary>
/// Describes one or more transit gateway route tables. By default, all transit gateway
/// route tables are described. Alternatively, you can filter the results.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeTransitGatewayRouteTables service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeTransitGatewayRouteTables service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTransitGatewayRouteTables">REST API Reference for DescribeTransitGatewayRouteTables Operation</seealso>
public virtual Task<DescribeTransitGatewayRouteTablesResponse> DescribeTransitGatewayRouteTablesAsync(DescribeTransitGatewayRouteTablesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeTransitGatewayRouteTablesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeTransitGatewayRouteTablesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeTransitGatewayRouteTablesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeTransitGateways
internal virtual DescribeTransitGatewaysResponse DescribeTransitGateways(DescribeTransitGatewaysRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeTransitGatewaysRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeTransitGatewaysResponseUnmarshaller.Instance;
return Invoke<DescribeTransitGatewaysResponse>(request, options);
}
/// <summary>
/// Describes one or more transit gateways. By default, all transit gateways are described.
/// Alternatively, you can filter the results.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeTransitGateways service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeTransitGateways service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTransitGateways">REST API Reference for DescribeTransitGateways Operation</seealso>
public virtual Task<DescribeTransitGatewaysResponse> DescribeTransitGatewaysAsync(DescribeTransitGatewaysRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeTransitGatewaysRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeTransitGatewaysResponseUnmarshaller.Instance;
return InvokeAsync<DescribeTransitGatewaysResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeTransitGatewayVpcAttachments
internal virtual DescribeTransitGatewayVpcAttachmentsResponse DescribeTransitGatewayVpcAttachments(DescribeTransitGatewayVpcAttachmentsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeTransitGatewayVpcAttachmentsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeTransitGatewayVpcAttachmentsResponseUnmarshaller.Instance;
return Invoke<DescribeTransitGatewayVpcAttachmentsResponse>(request, options);
}
/// <summary>
/// Describes one or more VPC attachments. By default, all VPC attachments are described.
/// Alternatively, you can filter the results.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeTransitGatewayVpcAttachments service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeTransitGatewayVpcAttachments service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTransitGatewayVpcAttachments">REST API Reference for DescribeTransitGatewayVpcAttachments Operation</seealso>
public virtual Task<DescribeTransitGatewayVpcAttachmentsResponse> DescribeTransitGatewayVpcAttachmentsAsync(DescribeTransitGatewayVpcAttachmentsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeTransitGatewayVpcAttachmentsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeTransitGatewayVpcAttachmentsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeTransitGatewayVpcAttachmentsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeVolumeAttribute
internal virtual DescribeVolumeAttributeResponse DescribeVolumeAttribute(DescribeVolumeAttributeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVolumeAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVolumeAttributeResponseUnmarshaller.Instance;
return Invoke<DescribeVolumeAttributeResponse>(request, options);
}
/// <summary>
/// Describes the specified attribute of the specified volume. You can specify only one
/// attribute at a time.
///
///
/// <para>
/// For more information about EBS volumes, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumes.html">Amazon
/// EBS Volumes</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeVolumeAttribute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeVolumeAttribute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeAttribute">REST API Reference for DescribeVolumeAttribute Operation</seealso>
public virtual Task<DescribeVolumeAttributeResponse> DescribeVolumeAttributeAsync(DescribeVolumeAttributeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVolumeAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVolumeAttributeResponseUnmarshaller.Instance;
return InvokeAsync<DescribeVolumeAttributeResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeVolumes
internal virtual DescribeVolumesResponse DescribeVolumes()
{
return DescribeVolumes(new DescribeVolumesRequest());
}
internal virtual DescribeVolumesResponse DescribeVolumes(DescribeVolumesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVolumesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVolumesResponseUnmarshaller.Instance;
return Invoke<DescribeVolumesResponse>(request, options);
}
/// <summary>
/// Describes the specified EBS volumes or all of your EBS volumes.
///
///
/// <para>
/// If you are describing a long list of volumes, you can paginate the output to make
/// the list more manageable. The <code>MaxResults</code> parameter sets the maximum number
/// of results returned in a single page. If the list of results exceeds your <code>MaxResults</code>
/// value, then that number of results is returned along with a <code>NextToken</code>
/// value that can be passed to a subsequent <code>DescribeVolumes</code> request to retrieve
/// the remaining results.
/// </para>
///
/// <para>
/// For more information about EBS volumes, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumes.html">Amazon
/// EBS Volumes</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeVolumes service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumes">REST API Reference for DescribeVolumes Operation</seealso>
public virtual Task<DescribeVolumesResponse> DescribeVolumesAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeVolumesAsync(new DescribeVolumesRequest(), cancellationToken);
}
/// <summary>
/// Describes the specified EBS volumes or all of your EBS volumes.
///
///
/// <para>
/// If you are describing a long list of volumes, you can paginate the output to make
/// the list more manageable. The <code>MaxResults</code> parameter sets the maximum number
/// of results returned in a single page. If the list of results exceeds your <code>MaxResults</code>
/// value, then that number of results is returned along with a <code>NextToken</code>
/// value that can be passed to a subsequent <code>DescribeVolumes</code> request to retrieve
/// the remaining results.
/// </para>
///
/// <para>
/// For more information about EBS volumes, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumes.html">Amazon
/// EBS Volumes</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeVolumes service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeVolumes service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumes">REST API Reference for DescribeVolumes Operation</seealso>
public virtual Task<DescribeVolumesResponse> DescribeVolumesAsync(DescribeVolumesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVolumesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVolumesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeVolumesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeVolumesModifications
internal virtual DescribeVolumesModificationsResponse DescribeVolumesModifications(DescribeVolumesModificationsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVolumesModificationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVolumesModificationsResponseUnmarshaller.Instance;
return Invoke<DescribeVolumesModificationsResponse>(request, options);
}
/// <summary>
/// Reports the current modification status of EBS volumes.
///
///
/// <para>
/// Current-generation EBS volumes support modification of attributes including type,
/// size, and (for <code>io1</code> volumes) IOPS provisioning while either attached to
/// or detached from an instance. Following an action from the API or the console to modify
/// a volume, the status of the modification may be <code>modifying</code>, <code>optimizing</code>,
/// <code>completed</code>, or <code>failed</code>. If a volume has never been modified,
/// then certain elements of the returned <code>VolumeModification</code> objects are
/// null.
/// </para>
///
/// <para>
/// You can also use CloudWatch Events to check the status of a modification to an EBS
/// volume. For information about CloudWatch Events, see the <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/">Amazon
/// CloudWatch Events User Guide</a>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#monitoring_mods">Monitoring
/// Volume Modifications"</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeVolumesModifications service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeVolumesModifications service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumesModifications">REST API Reference for DescribeVolumesModifications Operation</seealso>
public virtual Task<DescribeVolumesModificationsResponse> DescribeVolumesModificationsAsync(DescribeVolumesModificationsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVolumesModificationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVolumesModificationsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeVolumesModificationsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeVolumeStatus
internal virtual DescribeVolumeStatusResponse DescribeVolumeStatus()
{
return DescribeVolumeStatus(new DescribeVolumeStatusRequest());
}
internal virtual DescribeVolumeStatusResponse DescribeVolumeStatus(DescribeVolumeStatusRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVolumeStatusRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVolumeStatusResponseUnmarshaller.Instance;
return Invoke<DescribeVolumeStatusResponse>(request, options);
}
/// <summary>
/// Describes the status of the specified volumes. Volume status provides the result of
/// the checks performed on your volumes to determine events that can impair the performance
/// of your volumes. The performance of a volume can be affected if an issue occurs on
/// the volume's underlying host. If the volume's underlying host experiences a power
/// outage or system issue, after the system is restored, there could be data inconsistencies
/// on the volume. Volume events notify you if this occurs. Volume actions notify you
/// if any action needs to be taken in response to the event.
///
///
/// <para>
/// The <code>DescribeVolumeStatus</code> operation provides the following information
/// about the specified volumes:
/// </para>
///
/// <para>
/// <i>Status</i>: Reflects the current status of the volume. The possible values are
/// <code>ok</code>, <code>impaired</code> , <code>warning</code>, or <code>insufficient-data</code>.
/// If all checks pass, the overall status of the volume is <code>ok</code>. If the check
/// fails, the overall status is <code>impaired</code>. If the status is <code>insufficient-data</code>,
/// then the checks may still be taking place on your volume at the time. We recommend
/// that you retry the request. For more information about volume status, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-volume-status.html">Monitoring
/// the Status of Your Volumes</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
///
/// <para>
/// <i>Events</i>: Reflect the cause of a volume status and may require you to take action.
/// For example, if your volume returns an <code>impaired</code> status, then the volume
/// event might be <code>potential-data-inconsistency</code>. This means that your volume
/// has been affected by an issue with the underlying host, has all I/O operations disabled,
/// and may have inconsistent data.
/// </para>
///
/// <para>
/// <i>Actions</i>: Reflect the actions you may have to take in response to an event.
/// For example, if the status of the volume is <code>impaired</code> and the volume event
/// shows <code>potential-data-inconsistency</code>, then the action shows <code>enable-volume-io</code>.
/// This means that you may want to enable the I/O operations for the volume by calling
/// the <a>EnableVolumeIO</a> action and then check the volume for data consistency.
/// </para>
///
/// <para>
/// Volume status is based on the volume status checks, and does not reflect the volume
/// state. Therefore, volume status does not indicate volumes in the <code>error</code>
/// state (for example, when a volume is incapable of accepting I/O.)
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeVolumeStatus service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeStatus">REST API Reference for DescribeVolumeStatus Operation</seealso>
public virtual Task<DescribeVolumeStatusResponse> DescribeVolumeStatusAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeVolumeStatusAsync(new DescribeVolumeStatusRequest(), cancellationToken);
}
/// <summary>
/// Describes the status of the specified volumes. Volume status provides the result of
/// the checks performed on your volumes to determine events that can impair the performance
/// of your volumes. The performance of a volume can be affected if an issue occurs on
/// the volume's underlying host. If the volume's underlying host experiences a power
/// outage or system issue, after the system is restored, there could be data inconsistencies
/// on the volume. Volume events notify you if this occurs. Volume actions notify you
/// if any action needs to be taken in response to the event.
///
///
/// <para>
/// The <code>DescribeVolumeStatus</code> operation provides the following information
/// about the specified volumes:
/// </para>
///
/// <para>
/// <i>Status</i>: Reflects the current status of the volume. The possible values are
/// <code>ok</code>, <code>impaired</code> , <code>warning</code>, or <code>insufficient-data</code>.
/// If all checks pass, the overall status of the volume is <code>ok</code>. If the check
/// fails, the overall status is <code>impaired</code>. If the status is <code>insufficient-data</code>,
/// then the checks may still be taking place on your volume at the time. We recommend
/// that you retry the request. For more information about volume status, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-volume-status.html">Monitoring
/// the Status of Your Volumes</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
///
/// <para>
/// <i>Events</i>: Reflect the cause of a volume status and may require you to take action.
/// For example, if your volume returns an <code>impaired</code> status, then the volume
/// event might be <code>potential-data-inconsistency</code>. This means that your volume
/// has been affected by an issue with the underlying host, has all I/O operations disabled,
/// and may have inconsistent data.
/// </para>
///
/// <para>
/// <i>Actions</i>: Reflect the actions you may have to take in response to an event.
/// For example, if the status of the volume is <code>impaired</code> and the volume event
/// shows <code>potential-data-inconsistency</code>, then the action shows <code>enable-volume-io</code>.
/// This means that you may want to enable the I/O operations for the volume by calling
/// the <a>EnableVolumeIO</a> action and then check the volume for data consistency.
/// </para>
///
/// <para>
/// Volume status is based on the volume status checks, and does not reflect the volume
/// state. Therefore, volume status does not indicate volumes in the <code>error</code>
/// state (for example, when a volume is incapable of accepting I/O.)
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeVolumeStatus service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeVolumeStatus service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeStatus">REST API Reference for DescribeVolumeStatus Operation</seealso>
public virtual Task<DescribeVolumeStatusResponse> DescribeVolumeStatusAsync(DescribeVolumeStatusRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVolumeStatusRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVolumeStatusResponseUnmarshaller.Instance;
return InvokeAsync<DescribeVolumeStatusResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeVpcAttribute
internal virtual DescribeVpcAttributeResponse DescribeVpcAttribute(DescribeVpcAttributeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVpcAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVpcAttributeResponseUnmarshaller.Instance;
return Invoke<DescribeVpcAttributeResponse>(request, options);
}
/// <summary>
/// Describes the specified attribute of the specified VPC. You can specify only one attribute
/// at a time.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeVpcAttribute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeVpcAttribute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcAttribute">REST API Reference for DescribeVpcAttribute Operation</seealso>
public virtual Task<DescribeVpcAttributeResponse> DescribeVpcAttributeAsync(DescribeVpcAttributeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVpcAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVpcAttributeResponseUnmarshaller.Instance;
return InvokeAsync<DescribeVpcAttributeResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeVpcClassicLink
internal virtual DescribeVpcClassicLinkResponse DescribeVpcClassicLink(DescribeVpcClassicLinkRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVpcClassicLinkRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVpcClassicLinkResponseUnmarshaller.Instance;
return Invoke<DescribeVpcClassicLinkResponse>(request, options);
}
/// <summary>
/// Describes the ClassicLink status of one or more VPCs.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeVpcClassicLink service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeVpcClassicLink service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcClassicLink">REST API Reference for DescribeVpcClassicLink Operation</seealso>
public virtual Task<DescribeVpcClassicLinkResponse> DescribeVpcClassicLinkAsync(DescribeVpcClassicLinkRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVpcClassicLinkRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVpcClassicLinkResponseUnmarshaller.Instance;
return InvokeAsync<DescribeVpcClassicLinkResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeVpcClassicLinkDnsSupport
internal virtual DescribeVpcClassicLinkDnsSupportResponse DescribeVpcClassicLinkDnsSupport(DescribeVpcClassicLinkDnsSupportRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVpcClassicLinkDnsSupportRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVpcClassicLinkDnsSupportResponseUnmarshaller.Instance;
return Invoke<DescribeVpcClassicLinkDnsSupportResponse>(request, options);
}
/// <summary>
/// Describes the ClassicLink DNS support status of one or more VPCs. If enabled, the
/// DNS hostname of a linked EC2-Classic instance resolves to its private IP address when
/// addressed from an instance in the VPC to which it's linked. Similarly, the DNS hostname
/// of an instance in a VPC resolves to its private IP address when addressed from a linked
/// EC2-Classic instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html">ClassicLink</a>
/// in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeVpcClassicLinkDnsSupport service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeVpcClassicLinkDnsSupport service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcClassicLinkDnsSupport">REST API Reference for DescribeVpcClassicLinkDnsSupport Operation</seealso>
public virtual Task<DescribeVpcClassicLinkDnsSupportResponse> DescribeVpcClassicLinkDnsSupportAsync(DescribeVpcClassicLinkDnsSupportRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVpcClassicLinkDnsSupportRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVpcClassicLinkDnsSupportResponseUnmarshaller.Instance;
return InvokeAsync<DescribeVpcClassicLinkDnsSupportResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeVpcEndpointConnectionNotifications
internal virtual DescribeVpcEndpointConnectionNotificationsResponse DescribeVpcEndpointConnectionNotifications(DescribeVpcEndpointConnectionNotificationsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVpcEndpointConnectionNotificationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVpcEndpointConnectionNotificationsResponseUnmarshaller.Instance;
return Invoke<DescribeVpcEndpointConnectionNotificationsResponse>(request, options);
}
/// <summary>
/// Describes the connection notifications for VPC endpoints and VPC endpoint services.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeVpcEndpointConnectionNotifications service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeVpcEndpointConnectionNotifications service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointConnectionNotifications">REST API Reference for DescribeVpcEndpointConnectionNotifications Operation</seealso>
public virtual Task<DescribeVpcEndpointConnectionNotificationsResponse> DescribeVpcEndpointConnectionNotificationsAsync(DescribeVpcEndpointConnectionNotificationsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVpcEndpointConnectionNotificationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVpcEndpointConnectionNotificationsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeVpcEndpointConnectionNotificationsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeVpcEndpointConnections
internal virtual DescribeVpcEndpointConnectionsResponse DescribeVpcEndpointConnections(DescribeVpcEndpointConnectionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVpcEndpointConnectionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVpcEndpointConnectionsResponseUnmarshaller.Instance;
return Invoke<DescribeVpcEndpointConnectionsResponse>(request, options);
}
/// <summary>
/// Describes the VPC endpoint connections to your VPC endpoint services, including any
/// endpoints that are pending your acceptance.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeVpcEndpointConnections service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeVpcEndpointConnections service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointConnections">REST API Reference for DescribeVpcEndpointConnections Operation</seealso>
public virtual Task<DescribeVpcEndpointConnectionsResponse> DescribeVpcEndpointConnectionsAsync(DescribeVpcEndpointConnectionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVpcEndpointConnectionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVpcEndpointConnectionsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeVpcEndpointConnectionsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeVpcEndpoints
internal virtual DescribeVpcEndpointsResponse DescribeVpcEndpoints(DescribeVpcEndpointsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVpcEndpointsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVpcEndpointsResponseUnmarshaller.Instance;
return Invoke<DescribeVpcEndpointsResponse>(request, options);
}
/// <summary>
/// Describes one or more of your VPC endpoints.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeVpcEndpoints service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeVpcEndpoints service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpoints">REST API Reference for DescribeVpcEndpoints Operation</seealso>
public virtual Task<DescribeVpcEndpointsResponse> DescribeVpcEndpointsAsync(DescribeVpcEndpointsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVpcEndpointsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVpcEndpointsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeVpcEndpointsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeVpcEndpointServiceConfigurations
internal virtual DescribeVpcEndpointServiceConfigurationsResponse DescribeVpcEndpointServiceConfigurations(DescribeVpcEndpointServiceConfigurationsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVpcEndpointServiceConfigurationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVpcEndpointServiceConfigurationsResponseUnmarshaller.Instance;
return Invoke<DescribeVpcEndpointServiceConfigurationsResponse>(request, options);
}
/// <summary>
/// Describes the VPC endpoint service configurations in your account (your services).
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeVpcEndpointServiceConfigurations service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeVpcEndpointServiceConfigurations service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServiceConfigurations">REST API Reference for DescribeVpcEndpointServiceConfigurations Operation</seealso>
public virtual Task<DescribeVpcEndpointServiceConfigurationsResponse> DescribeVpcEndpointServiceConfigurationsAsync(DescribeVpcEndpointServiceConfigurationsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVpcEndpointServiceConfigurationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVpcEndpointServiceConfigurationsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeVpcEndpointServiceConfigurationsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeVpcEndpointServicePermissions
internal virtual DescribeVpcEndpointServicePermissionsResponse DescribeVpcEndpointServicePermissions(DescribeVpcEndpointServicePermissionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVpcEndpointServicePermissionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVpcEndpointServicePermissionsResponseUnmarshaller.Instance;
return Invoke<DescribeVpcEndpointServicePermissionsResponse>(request, options);
}
/// <summary>
/// Describes the principals (service consumers) that are permitted to discover your VPC
/// endpoint service.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeVpcEndpointServicePermissions service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeVpcEndpointServicePermissions service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServicePermissions">REST API Reference for DescribeVpcEndpointServicePermissions Operation</seealso>
public virtual Task<DescribeVpcEndpointServicePermissionsResponse> DescribeVpcEndpointServicePermissionsAsync(DescribeVpcEndpointServicePermissionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVpcEndpointServicePermissionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVpcEndpointServicePermissionsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeVpcEndpointServicePermissionsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeVpcEndpointServices
internal virtual DescribeVpcEndpointServicesResponse DescribeVpcEndpointServices(DescribeVpcEndpointServicesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVpcEndpointServicesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVpcEndpointServicesResponseUnmarshaller.Instance;
return Invoke<DescribeVpcEndpointServicesResponse>(request, options);
}
/// <summary>
/// Describes available services to which you can create a VPC endpoint.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeVpcEndpointServices service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeVpcEndpointServices service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServices">REST API Reference for DescribeVpcEndpointServices Operation</seealso>
public virtual Task<DescribeVpcEndpointServicesResponse> DescribeVpcEndpointServicesAsync(DescribeVpcEndpointServicesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVpcEndpointServicesRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVpcEndpointServicesResponseUnmarshaller.Instance;
return InvokeAsync<DescribeVpcEndpointServicesResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeVpcPeeringConnections
internal virtual DescribeVpcPeeringConnectionsResponse DescribeVpcPeeringConnections()
{
return DescribeVpcPeeringConnections(new DescribeVpcPeeringConnectionsRequest());
}
internal virtual DescribeVpcPeeringConnectionsResponse DescribeVpcPeeringConnections(DescribeVpcPeeringConnectionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVpcPeeringConnectionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVpcPeeringConnectionsResponseUnmarshaller.Instance;
return Invoke<DescribeVpcPeeringConnectionsResponse>(request, options);
}
/// <summary>
/// Describes one or more of your VPC peering connections.
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeVpcPeeringConnections service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnections">REST API Reference for DescribeVpcPeeringConnections Operation</seealso>
public virtual Task<DescribeVpcPeeringConnectionsResponse> DescribeVpcPeeringConnectionsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeVpcPeeringConnectionsAsync(new DescribeVpcPeeringConnectionsRequest(), cancellationToken);
}
/// <summary>
/// Describes one or more of your VPC peering connections.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeVpcPeeringConnections service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeVpcPeeringConnections service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnections">REST API Reference for DescribeVpcPeeringConnections Operation</seealso>
public virtual Task<DescribeVpcPeeringConnectionsResponse> DescribeVpcPeeringConnectionsAsync(DescribeVpcPeeringConnectionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVpcPeeringConnectionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVpcPeeringConnectionsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeVpcPeeringConnectionsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeVpcs
internal virtual DescribeVpcsResponse DescribeVpcs()
{
return DescribeVpcs(new DescribeVpcsRequest());
}
internal virtual DescribeVpcsResponse DescribeVpcs(DescribeVpcsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVpcsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVpcsResponseUnmarshaller.Instance;
return Invoke<DescribeVpcsResponse>(request, options);
}
/// <summary>
/// Describes one or more of your VPCs.
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeVpcs service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcs">REST API Reference for DescribeVpcs Operation</seealso>
public virtual Task<DescribeVpcsResponse> DescribeVpcsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeVpcsAsync(new DescribeVpcsRequest(), cancellationToken);
}
/// <summary>
/// Describes one or more of your VPCs.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeVpcs service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeVpcs service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcs">REST API Reference for DescribeVpcs Operation</seealso>
public virtual Task<DescribeVpcsResponse> DescribeVpcsAsync(DescribeVpcsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVpcsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVpcsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeVpcsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeVpnConnections
internal virtual DescribeVpnConnectionsResponse DescribeVpnConnections()
{
return DescribeVpnConnections(new DescribeVpnConnectionsRequest());
}
internal virtual DescribeVpnConnectionsResponse DescribeVpnConnections(DescribeVpnConnectionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVpnConnectionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVpnConnectionsResponseUnmarshaller.Instance;
return Invoke<DescribeVpnConnectionsResponse>(request, options);
}
/// <summary>
/// Describes one or more of your VPN connections.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html">AWS
/// Site-to-Site VPN</a> in the <i>AWS Site-to-Site VPN User Guide</i>.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeVpnConnections service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnConnections">REST API Reference for DescribeVpnConnections Operation</seealso>
public virtual Task<DescribeVpnConnectionsResponse> DescribeVpnConnectionsAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeVpnConnectionsAsync(new DescribeVpnConnectionsRequest(), cancellationToken);
}
/// <summary>
/// Describes one or more of your VPN connections.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html">AWS
/// Site-to-Site VPN</a> in the <i>AWS Site-to-Site VPN User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeVpnConnections service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeVpnConnections service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnConnections">REST API Reference for DescribeVpnConnections Operation</seealso>
public virtual Task<DescribeVpnConnectionsResponse> DescribeVpnConnectionsAsync(DescribeVpnConnectionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVpnConnectionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVpnConnectionsResponseUnmarshaller.Instance;
return InvokeAsync<DescribeVpnConnectionsResponse>(request, options, cancellationToken);
}
#endregion
#region DescribeVpnGateways
internal virtual DescribeVpnGatewaysResponse DescribeVpnGateways()
{
return DescribeVpnGateways(new DescribeVpnGatewaysRequest());
}
internal virtual DescribeVpnGatewaysResponse DescribeVpnGateways(DescribeVpnGatewaysRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVpnGatewaysRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVpnGatewaysResponseUnmarshaller.Instance;
return Invoke<DescribeVpnGatewaysResponse>(request, options);
}
/// <summary>
/// Describes one or more of your virtual private gateways.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html">AWS
/// Site-to-Site VPN</a> in the <i>AWS Site-to-Site VPN User Guide</i>.
/// </para>
/// </summary>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeVpnGateways service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnGateways">REST API Reference for DescribeVpnGateways Operation</seealso>
public virtual Task<DescribeVpnGatewaysResponse> DescribeVpnGatewaysAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
return DescribeVpnGatewaysAsync(new DescribeVpnGatewaysRequest(), cancellationToken);
}
/// <summary>
/// Describes one or more of your virtual private gateways.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html">AWS
/// Site-to-Site VPN</a> in the <i>AWS Site-to-Site VPN User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DescribeVpnGateways service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DescribeVpnGateways service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnGateways">REST API Reference for DescribeVpnGateways Operation</seealso>
public virtual Task<DescribeVpnGatewaysResponse> DescribeVpnGatewaysAsync(DescribeVpnGatewaysRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeVpnGatewaysRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeVpnGatewaysResponseUnmarshaller.Instance;
return InvokeAsync<DescribeVpnGatewaysResponse>(request, options, cancellationToken);
}
#endregion
#region DetachClassicLinkVpc
internal virtual DetachClassicLinkVpcResponse DetachClassicLinkVpc(DetachClassicLinkVpcRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DetachClassicLinkVpcRequestMarshaller.Instance;
options.ResponseUnmarshaller = DetachClassicLinkVpcResponseUnmarshaller.Instance;
return Invoke<DetachClassicLinkVpcResponse>(request, options);
}
/// <summary>
/// Unlinks (detaches) a linked EC2-Classic instance from a VPC. After the instance has
/// been unlinked, the VPC security groups are no longer associated with it. An instance
/// is automatically unlinked from a VPC when it's stopped.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DetachClassicLinkVpc service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DetachClassicLinkVpc service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachClassicLinkVpc">REST API Reference for DetachClassicLinkVpc Operation</seealso>
public virtual Task<DetachClassicLinkVpcResponse> DetachClassicLinkVpcAsync(DetachClassicLinkVpcRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DetachClassicLinkVpcRequestMarshaller.Instance;
options.ResponseUnmarshaller = DetachClassicLinkVpcResponseUnmarshaller.Instance;
return InvokeAsync<DetachClassicLinkVpcResponse>(request, options, cancellationToken);
}
#endregion
#region DetachInternetGateway
internal virtual DetachInternetGatewayResponse DetachInternetGateway(DetachInternetGatewayRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DetachInternetGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = DetachInternetGatewayResponseUnmarshaller.Instance;
return Invoke<DetachInternetGatewayResponse>(request, options);
}
/// <summary>
/// Detaches an internet gateway from a VPC, disabling connectivity between the internet
/// and the VPC. The VPC must not contain any running instances with Elastic IP addresses
/// or public IPv4 addresses.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DetachInternetGateway service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DetachInternetGateway service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachInternetGateway">REST API Reference for DetachInternetGateway Operation</seealso>
public virtual Task<DetachInternetGatewayResponse> DetachInternetGatewayAsync(DetachInternetGatewayRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DetachInternetGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = DetachInternetGatewayResponseUnmarshaller.Instance;
return InvokeAsync<DetachInternetGatewayResponse>(request, options, cancellationToken);
}
#endregion
#region DetachNetworkInterface
internal virtual DetachNetworkInterfaceResponse DetachNetworkInterface(DetachNetworkInterfaceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DetachNetworkInterfaceRequestMarshaller.Instance;
options.ResponseUnmarshaller = DetachNetworkInterfaceResponseUnmarshaller.Instance;
return Invoke<DetachNetworkInterfaceResponse>(request, options);
}
/// <summary>
/// Detaches a network interface from an instance.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DetachNetworkInterface service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DetachNetworkInterface service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachNetworkInterface">REST API Reference for DetachNetworkInterface Operation</seealso>
public virtual Task<DetachNetworkInterfaceResponse> DetachNetworkInterfaceAsync(DetachNetworkInterfaceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DetachNetworkInterfaceRequestMarshaller.Instance;
options.ResponseUnmarshaller = DetachNetworkInterfaceResponseUnmarshaller.Instance;
return InvokeAsync<DetachNetworkInterfaceResponse>(request, options, cancellationToken);
}
#endregion
#region DetachVolume
internal virtual DetachVolumeResponse DetachVolume(DetachVolumeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DetachVolumeRequestMarshaller.Instance;
options.ResponseUnmarshaller = DetachVolumeResponseUnmarshaller.Instance;
return Invoke<DetachVolumeResponse>(request, options);
}
/// <summary>
/// Detaches an EBS volume from an instance. Make sure to unmount any file systems on
/// the device within your operating system before detaching the volume. Failure to do
/// so can result in the volume becoming stuck in the <code>busy</code> state while detaching.
/// If this happens, detachment can be delayed indefinitely until you unmount the volume,
/// force detachment, reboot the instance, or all three. If an EBS volume is the root
/// device of an instance, it can't be detached while the instance is running. To detach
/// the root volume, stop the instance first.
///
///
/// <para>
/// When a volume with an AWS Marketplace product code is detached from an instance, the
/// product code is no longer associated with the instance.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-detaching-volume.html">Detaching
/// an Amazon EBS Volume</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DetachVolume service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DetachVolume service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachVolume">REST API Reference for DetachVolume Operation</seealso>
public virtual Task<DetachVolumeResponse> DetachVolumeAsync(DetachVolumeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DetachVolumeRequestMarshaller.Instance;
options.ResponseUnmarshaller = DetachVolumeResponseUnmarshaller.Instance;
return InvokeAsync<DetachVolumeResponse>(request, options, cancellationToken);
}
#endregion
#region DetachVpnGateway
internal virtual DetachVpnGatewayResponse DetachVpnGateway(DetachVpnGatewayRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DetachVpnGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = DetachVpnGatewayResponseUnmarshaller.Instance;
return Invoke<DetachVpnGatewayResponse>(request, options);
}
/// <summary>
/// Detaches a virtual private gateway from a VPC. You do this if you're planning to turn
/// off the VPC and not use it anymore. You can confirm a virtual private gateway has
/// been completely detached from a VPC by describing the virtual private gateway (any
/// attachments to the virtual private gateway are also described).
///
///
/// <para>
/// You must wait for the attachment's state to switch to <code>detached</code> before
/// you can delete the VPC or attach a different VPC to the virtual private gateway.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DetachVpnGateway service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DetachVpnGateway service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachVpnGateway">REST API Reference for DetachVpnGateway Operation</seealso>
public virtual Task<DetachVpnGatewayResponse> DetachVpnGatewayAsync(DetachVpnGatewayRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DetachVpnGatewayRequestMarshaller.Instance;
options.ResponseUnmarshaller = DetachVpnGatewayResponseUnmarshaller.Instance;
return InvokeAsync<DetachVpnGatewayResponse>(request, options, cancellationToken);
}
#endregion
#region DisableEbsEncryptionByDefault
internal virtual DisableEbsEncryptionByDefaultResponse DisableEbsEncryptionByDefault(DisableEbsEncryptionByDefaultRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DisableEbsEncryptionByDefaultRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisableEbsEncryptionByDefaultResponseUnmarshaller.Instance;
return Invoke<DisableEbsEncryptionByDefaultResponse>(request, options);
}
/// <summary>
/// Disables EBS encryption by default for your account in the current Region.
///
///
/// <para>
/// After you disable encryption by default, you can still create encrypted volumes by
/// enabling encryption when you create each volume.
/// </para>
///
/// <para>
/// Disabling encryption by default does not change the encryption status of your existing
/// volumes.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon
/// EBS Encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DisableEbsEncryptionByDefault service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DisableEbsEncryptionByDefault service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableEbsEncryptionByDefault">REST API Reference for DisableEbsEncryptionByDefault Operation</seealso>
public virtual Task<DisableEbsEncryptionByDefaultResponse> DisableEbsEncryptionByDefaultAsync(DisableEbsEncryptionByDefaultRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DisableEbsEncryptionByDefaultRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisableEbsEncryptionByDefaultResponseUnmarshaller.Instance;
return InvokeAsync<DisableEbsEncryptionByDefaultResponse>(request, options, cancellationToken);
}
#endregion
#region DisableFastSnapshotRestores
internal virtual DisableFastSnapshotRestoresResponse DisableFastSnapshotRestores(DisableFastSnapshotRestoresRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DisableFastSnapshotRestoresRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisableFastSnapshotRestoresResponseUnmarshaller.Instance;
return Invoke<DisableFastSnapshotRestoresResponse>(request, options);
}
/// <summary>
/// Disables fast snapshot restores for the specified snapshots in the specified Availability
/// Zones.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DisableFastSnapshotRestores service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DisableFastSnapshotRestores service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableFastSnapshotRestores">REST API Reference for DisableFastSnapshotRestores Operation</seealso>
public virtual Task<DisableFastSnapshotRestoresResponse> DisableFastSnapshotRestoresAsync(DisableFastSnapshotRestoresRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DisableFastSnapshotRestoresRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisableFastSnapshotRestoresResponseUnmarshaller.Instance;
return InvokeAsync<DisableFastSnapshotRestoresResponse>(request, options, cancellationToken);
}
#endregion
#region DisableTransitGatewayRouteTablePropagation
internal virtual DisableTransitGatewayRouteTablePropagationResponse DisableTransitGatewayRouteTablePropagation(DisableTransitGatewayRouteTablePropagationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DisableTransitGatewayRouteTablePropagationRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisableTransitGatewayRouteTablePropagationResponseUnmarshaller.Instance;
return Invoke<DisableTransitGatewayRouteTablePropagationResponse>(request, options);
}
/// <summary>
/// Disables the specified resource attachment from propagating routes to the specified
/// propagation route table.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DisableTransitGatewayRouteTablePropagation service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DisableTransitGatewayRouteTablePropagation service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableTransitGatewayRouteTablePropagation">REST API Reference for DisableTransitGatewayRouteTablePropagation Operation</seealso>
public virtual Task<DisableTransitGatewayRouteTablePropagationResponse> DisableTransitGatewayRouteTablePropagationAsync(DisableTransitGatewayRouteTablePropagationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DisableTransitGatewayRouteTablePropagationRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisableTransitGatewayRouteTablePropagationResponseUnmarshaller.Instance;
return InvokeAsync<DisableTransitGatewayRouteTablePropagationResponse>(request, options, cancellationToken);
}
#endregion
#region DisableVgwRoutePropagation
internal virtual DisableVgwRoutePropagationResponse DisableVgwRoutePropagation(DisableVgwRoutePropagationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DisableVgwRoutePropagationRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisableVgwRoutePropagationResponseUnmarshaller.Instance;
return Invoke<DisableVgwRoutePropagationResponse>(request, options);
}
/// <summary>
/// Disables a virtual private gateway (VGW) from propagating routes to a specified route
/// table of a VPC.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DisableVgwRoutePropagation service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DisableVgwRoutePropagation service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVgwRoutePropagation">REST API Reference for DisableVgwRoutePropagation Operation</seealso>
public virtual Task<DisableVgwRoutePropagationResponse> DisableVgwRoutePropagationAsync(DisableVgwRoutePropagationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DisableVgwRoutePropagationRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisableVgwRoutePropagationResponseUnmarshaller.Instance;
return InvokeAsync<DisableVgwRoutePropagationResponse>(request, options, cancellationToken);
}
#endregion
#region DisableVpcClassicLink
internal virtual DisableVpcClassicLinkResponse DisableVpcClassicLink(DisableVpcClassicLinkRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DisableVpcClassicLinkRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisableVpcClassicLinkResponseUnmarshaller.Instance;
return Invoke<DisableVpcClassicLinkResponse>(request, options);
}
/// <summary>
/// Disables ClassicLink for a VPC. You cannot disable ClassicLink for a VPC that has
/// EC2-Classic instances linked to it.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DisableVpcClassicLink service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DisableVpcClassicLink service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLink">REST API Reference for DisableVpcClassicLink Operation</seealso>
public virtual Task<DisableVpcClassicLinkResponse> DisableVpcClassicLinkAsync(DisableVpcClassicLinkRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DisableVpcClassicLinkRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisableVpcClassicLinkResponseUnmarshaller.Instance;
return InvokeAsync<DisableVpcClassicLinkResponse>(request, options, cancellationToken);
}
#endregion
#region DisableVpcClassicLinkDnsSupport
internal virtual DisableVpcClassicLinkDnsSupportResponse DisableVpcClassicLinkDnsSupport(DisableVpcClassicLinkDnsSupportRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DisableVpcClassicLinkDnsSupportRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisableVpcClassicLinkDnsSupportResponseUnmarshaller.Instance;
return Invoke<DisableVpcClassicLinkDnsSupportResponse>(request, options);
}
/// <summary>
/// Disables ClassicLink DNS support for a VPC. If disabled, DNS hostnames resolve to
/// public IP addresses when addressed between a linked EC2-Classic instance and instances
/// in the VPC to which it's linked. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html">ClassicLink</a>
/// in the <i>Amazon Elastic Compute Cloud User Guide</i>.
///
///
/// <para>
/// You must specify a VPC ID in the request.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DisableVpcClassicLinkDnsSupport service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DisableVpcClassicLinkDnsSupport service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLinkDnsSupport">REST API Reference for DisableVpcClassicLinkDnsSupport Operation</seealso>
public virtual Task<DisableVpcClassicLinkDnsSupportResponse> DisableVpcClassicLinkDnsSupportAsync(DisableVpcClassicLinkDnsSupportRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DisableVpcClassicLinkDnsSupportRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisableVpcClassicLinkDnsSupportResponseUnmarshaller.Instance;
return InvokeAsync<DisableVpcClassicLinkDnsSupportResponse>(request, options, cancellationToken);
}
#endregion
#region DisassociateAddress
internal virtual DisassociateAddressResponse DisassociateAddress(DisassociateAddressRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DisassociateAddressRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisassociateAddressResponseUnmarshaller.Instance;
return Invoke<DisassociateAddressResponse>(request, options);
}
/// <summary>
/// Disassociates an Elastic IP address from the instance or network interface it's associated
/// with.
///
///
/// <para>
/// An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For
/// more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html">Elastic
/// IP Addresses</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
///
/// <para>
/// This is an idempotent operation. If you perform the operation more than once, Amazon
/// EC2 doesn't return an error.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DisassociateAddress service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DisassociateAddress service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateAddress">REST API Reference for DisassociateAddress Operation</seealso>
public virtual Task<DisassociateAddressResponse> DisassociateAddressAsync(DisassociateAddressRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DisassociateAddressRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisassociateAddressResponseUnmarshaller.Instance;
return InvokeAsync<DisassociateAddressResponse>(request, options, cancellationToken);
}
#endregion
#region DisassociateClientVpnTargetNetwork
internal virtual DisassociateClientVpnTargetNetworkResponse DisassociateClientVpnTargetNetwork(DisassociateClientVpnTargetNetworkRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DisassociateClientVpnTargetNetworkRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisassociateClientVpnTargetNetworkResponseUnmarshaller.Instance;
return Invoke<DisassociateClientVpnTargetNetworkResponse>(request, options);
}
/// <summary>
/// Disassociates a target network from the specified Client VPN endpoint. When you disassociate
/// the last target network from a Client VPN, the following happens:
///
/// <ul> <li>
/// <para>
/// The route that was automatically added for the VPC is deleted
/// </para>
/// </li> <li>
/// <para>
/// All active client connections are terminated
/// </para>
/// </li> <li>
/// <para>
/// New client connections are disallowed
/// </para>
/// </li> <li>
/// <para>
/// The Client VPN endpoint's status changes to <code>pending-associate</code>
/// </para>
/// </li> </ul>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DisassociateClientVpnTargetNetwork service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DisassociateClientVpnTargetNetwork service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateClientVpnTargetNetwork">REST API Reference for DisassociateClientVpnTargetNetwork Operation</seealso>
public virtual Task<DisassociateClientVpnTargetNetworkResponse> DisassociateClientVpnTargetNetworkAsync(DisassociateClientVpnTargetNetworkRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DisassociateClientVpnTargetNetworkRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisassociateClientVpnTargetNetworkResponseUnmarshaller.Instance;
return InvokeAsync<DisassociateClientVpnTargetNetworkResponse>(request, options, cancellationToken);
}
#endregion
#region DisassociateIamInstanceProfile
internal virtual DisassociateIamInstanceProfileResponse DisassociateIamInstanceProfile(DisassociateIamInstanceProfileRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DisassociateIamInstanceProfileRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisassociateIamInstanceProfileResponseUnmarshaller.Instance;
return Invoke<DisassociateIamInstanceProfileResponse>(request, options);
}
/// <summary>
/// Disassociates an IAM instance profile from a running or stopped instance.
///
///
/// <para>
/// Use <a>DescribeIamInstanceProfileAssociations</a> to get the association ID.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DisassociateIamInstanceProfile service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DisassociateIamInstanceProfile service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateIamInstanceProfile">REST API Reference for DisassociateIamInstanceProfile Operation</seealso>
public virtual Task<DisassociateIamInstanceProfileResponse> DisassociateIamInstanceProfileAsync(DisassociateIamInstanceProfileRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DisassociateIamInstanceProfileRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisassociateIamInstanceProfileResponseUnmarshaller.Instance;
return InvokeAsync<DisassociateIamInstanceProfileResponse>(request, options, cancellationToken);
}
#endregion
#region DisassociateRouteTable
internal virtual DisassociateRouteTableResponse DisassociateRouteTable(DisassociateRouteTableRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DisassociateRouteTableRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisassociateRouteTableResponseUnmarshaller.Instance;
return Invoke<DisassociateRouteTableResponse>(request, options);
}
/// <summary>
/// Disassociates a subnet or gateway from a route table.
///
///
/// <para>
/// After you perform this action, the subnet no longer uses the routes in the route table.
/// Instead, it uses the routes in the VPC's main route table. For more information about
/// route tables, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html">Route
/// Tables</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DisassociateRouteTable service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DisassociateRouteTable service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateRouteTable">REST API Reference for DisassociateRouteTable Operation</seealso>
public virtual Task<DisassociateRouteTableResponse> DisassociateRouteTableAsync(DisassociateRouteTableRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DisassociateRouteTableRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisassociateRouteTableResponseUnmarshaller.Instance;
return InvokeAsync<DisassociateRouteTableResponse>(request, options, cancellationToken);
}
#endregion
#region DisassociateSubnetCidrBlock
internal virtual DisassociateSubnetCidrBlockResponse DisassociateSubnetCidrBlock(DisassociateSubnetCidrBlockRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DisassociateSubnetCidrBlockRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisassociateSubnetCidrBlockResponseUnmarshaller.Instance;
return Invoke<DisassociateSubnetCidrBlockResponse>(request, options);
}
/// <summary>
/// Disassociates a CIDR block from a subnet. Currently, you can disassociate an IPv6
/// CIDR block only. You must detach or delete all gateways and resources that are associated
/// with the CIDR block before you can disassociate it.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DisassociateSubnetCidrBlock service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DisassociateSubnetCidrBlock service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateSubnetCidrBlock">REST API Reference for DisassociateSubnetCidrBlock Operation</seealso>
public virtual Task<DisassociateSubnetCidrBlockResponse> DisassociateSubnetCidrBlockAsync(DisassociateSubnetCidrBlockRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DisassociateSubnetCidrBlockRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisassociateSubnetCidrBlockResponseUnmarshaller.Instance;
return InvokeAsync<DisassociateSubnetCidrBlockResponse>(request, options, cancellationToken);
}
#endregion
#region DisassociateTransitGatewayMulticastDomain
internal virtual DisassociateTransitGatewayMulticastDomainResponse DisassociateTransitGatewayMulticastDomain(DisassociateTransitGatewayMulticastDomainRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DisassociateTransitGatewayMulticastDomainRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisassociateTransitGatewayMulticastDomainResponseUnmarshaller.Instance;
return Invoke<DisassociateTransitGatewayMulticastDomainResponse>(request, options);
}
/// <summary>
/// Disassociates the specified subnets from the transit gateway multicast domain.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DisassociateTransitGatewayMulticastDomain service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DisassociateTransitGatewayMulticastDomain service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateTransitGatewayMulticastDomain">REST API Reference for DisassociateTransitGatewayMulticastDomain Operation</seealso>
public virtual Task<DisassociateTransitGatewayMulticastDomainResponse> DisassociateTransitGatewayMulticastDomainAsync(DisassociateTransitGatewayMulticastDomainRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DisassociateTransitGatewayMulticastDomainRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisassociateTransitGatewayMulticastDomainResponseUnmarshaller.Instance;
return InvokeAsync<DisassociateTransitGatewayMulticastDomainResponse>(request, options, cancellationToken);
}
#endregion
#region DisassociateTransitGatewayRouteTable
internal virtual DisassociateTransitGatewayRouteTableResponse DisassociateTransitGatewayRouteTable(DisassociateTransitGatewayRouteTableRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DisassociateTransitGatewayRouteTableRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisassociateTransitGatewayRouteTableResponseUnmarshaller.Instance;
return Invoke<DisassociateTransitGatewayRouteTableResponse>(request, options);
}
/// <summary>
/// Disassociates a resource attachment from a transit gateway route table.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DisassociateTransitGatewayRouteTable service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DisassociateTransitGatewayRouteTable service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateTransitGatewayRouteTable">REST API Reference for DisassociateTransitGatewayRouteTable Operation</seealso>
public virtual Task<DisassociateTransitGatewayRouteTableResponse> DisassociateTransitGatewayRouteTableAsync(DisassociateTransitGatewayRouteTableRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DisassociateTransitGatewayRouteTableRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisassociateTransitGatewayRouteTableResponseUnmarshaller.Instance;
return InvokeAsync<DisassociateTransitGatewayRouteTableResponse>(request, options, cancellationToken);
}
#endregion
#region DisassociateVpcCidrBlock
internal virtual DisassociateVpcCidrBlockResponse DisassociateVpcCidrBlock(DisassociateVpcCidrBlockRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DisassociateVpcCidrBlockRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisassociateVpcCidrBlockResponseUnmarshaller.Instance;
return Invoke<DisassociateVpcCidrBlockResponse>(request, options);
}
/// <summary>
/// Disassociates a CIDR block from a VPC. To disassociate the CIDR block, you must specify
/// its association ID. You can get the association ID by using <a>DescribeVpcs</a>. You
/// must detach or delete all gateways and resources that are associated with the CIDR
/// block before you can disassociate it.
///
///
/// <para>
/// You cannot disassociate the CIDR block with which you originally created the VPC (the
/// primary CIDR block).
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the DisassociateVpcCidrBlock service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the DisassociateVpcCidrBlock service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateVpcCidrBlock">REST API Reference for DisassociateVpcCidrBlock Operation</seealso>
public virtual Task<DisassociateVpcCidrBlockResponse> DisassociateVpcCidrBlockAsync(DisassociateVpcCidrBlockRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DisassociateVpcCidrBlockRequestMarshaller.Instance;
options.ResponseUnmarshaller = DisassociateVpcCidrBlockResponseUnmarshaller.Instance;
return InvokeAsync<DisassociateVpcCidrBlockResponse>(request, options, cancellationToken);
}
#endregion
#region EnableEbsEncryptionByDefault
internal virtual EnableEbsEncryptionByDefaultResponse EnableEbsEncryptionByDefault(EnableEbsEncryptionByDefaultRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = EnableEbsEncryptionByDefaultRequestMarshaller.Instance;
options.ResponseUnmarshaller = EnableEbsEncryptionByDefaultResponseUnmarshaller.Instance;
return Invoke<EnableEbsEncryptionByDefaultResponse>(request, options);
}
/// <summary>
/// Enables EBS encryption by default for your account in the current Region.
///
///
/// <para>
/// After you enable encryption by default, the EBS volumes that you create are are always
/// encrypted, either using the default CMK or the CMK that you specified when you created
/// each volume. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon
/// EBS Encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
///
/// <para>
/// You can specify the default CMK for encryption by default using <a>ModifyEbsDefaultKmsKeyId</a>
/// or <a>ResetEbsDefaultKmsKeyId</a>.
/// </para>
///
/// <para>
/// Enabling encryption by default has no effect on the encryption status of your existing
/// volumes.
/// </para>
///
/// <para>
/// After you enable encryption by default, you can no longer launch instances using instance
/// types that do not support encryption. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#EBSEncryption_supported_instances">Supported
/// Instance Types</a>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the EnableEbsEncryptionByDefault service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the EnableEbsEncryptionByDefault service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableEbsEncryptionByDefault">REST API Reference for EnableEbsEncryptionByDefault Operation</seealso>
public virtual Task<EnableEbsEncryptionByDefaultResponse> EnableEbsEncryptionByDefaultAsync(EnableEbsEncryptionByDefaultRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = EnableEbsEncryptionByDefaultRequestMarshaller.Instance;
options.ResponseUnmarshaller = EnableEbsEncryptionByDefaultResponseUnmarshaller.Instance;
return InvokeAsync<EnableEbsEncryptionByDefaultResponse>(request, options, cancellationToken);
}
#endregion
#region EnableFastSnapshotRestores
internal virtual EnableFastSnapshotRestoresResponse EnableFastSnapshotRestores(EnableFastSnapshotRestoresRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = EnableFastSnapshotRestoresRequestMarshaller.Instance;
options.ResponseUnmarshaller = EnableFastSnapshotRestoresResponseUnmarshaller.Instance;
return Invoke<EnableFastSnapshotRestoresResponse>(request, options);
}
/// <summary>
/// Enables fast snapshot restores for the specified snapshots in the specified Availability
/// Zones.
///
///
/// <para>
/// You get the full benefit of fast snapshot restores after they enter the <code>enabled</code>
/// state. To get the current state of fast snapshot restores, use <a>DescribeFastSnapshotRestores</a>.
/// To disable fast snapshot restores, use <a>DisableFastSnapshotRestores</a>.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-fast-snapshot-restore.html">Amazon
/// EBS Fast Snapshot Restore</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the EnableFastSnapshotRestores service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the EnableFastSnapshotRestores service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableFastSnapshotRestores">REST API Reference for EnableFastSnapshotRestores Operation</seealso>
public virtual Task<EnableFastSnapshotRestoresResponse> EnableFastSnapshotRestoresAsync(EnableFastSnapshotRestoresRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = EnableFastSnapshotRestoresRequestMarshaller.Instance;
options.ResponseUnmarshaller = EnableFastSnapshotRestoresResponseUnmarshaller.Instance;
return InvokeAsync<EnableFastSnapshotRestoresResponse>(request, options, cancellationToken);
}
#endregion
#region EnableTransitGatewayRouteTablePropagation
internal virtual EnableTransitGatewayRouteTablePropagationResponse EnableTransitGatewayRouteTablePropagation(EnableTransitGatewayRouteTablePropagationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = EnableTransitGatewayRouteTablePropagationRequestMarshaller.Instance;
options.ResponseUnmarshaller = EnableTransitGatewayRouteTablePropagationResponseUnmarshaller.Instance;
return Invoke<EnableTransitGatewayRouteTablePropagationResponse>(request, options);
}
/// <summary>
/// Enables the specified attachment to propagate routes to the specified propagation
/// route table.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the EnableTransitGatewayRouteTablePropagation service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the EnableTransitGatewayRouteTablePropagation service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableTransitGatewayRouteTablePropagation">REST API Reference for EnableTransitGatewayRouteTablePropagation Operation</seealso>
public virtual Task<EnableTransitGatewayRouteTablePropagationResponse> EnableTransitGatewayRouteTablePropagationAsync(EnableTransitGatewayRouteTablePropagationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = EnableTransitGatewayRouteTablePropagationRequestMarshaller.Instance;
options.ResponseUnmarshaller = EnableTransitGatewayRouteTablePropagationResponseUnmarshaller.Instance;
return InvokeAsync<EnableTransitGatewayRouteTablePropagationResponse>(request, options, cancellationToken);
}
#endregion
#region EnableVgwRoutePropagation
internal virtual EnableVgwRoutePropagationResponse EnableVgwRoutePropagation(EnableVgwRoutePropagationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = EnableVgwRoutePropagationRequestMarshaller.Instance;
options.ResponseUnmarshaller = EnableVgwRoutePropagationResponseUnmarshaller.Instance;
return Invoke<EnableVgwRoutePropagationResponse>(request, options);
}
/// <summary>
/// Enables a virtual private gateway (VGW) to propagate routes to the specified route
/// table of a VPC.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the EnableVgwRoutePropagation service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the EnableVgwRoutePropagation service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVgwRoutePropagation">REST API Reference for EnableVgwRoutePropagation Operation</seealso>
public virtual Task<EnableVgwRoutePropagationResponse> EnableVgwRoutePropagationAsync(EnableVgwRoutePropagationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = EnableVgwRoutePropagationRequestMarshaller.Instance;
options.ResponseUnmarshaller = EnableVgwRoutePropagationResponseUnmarshaller.Instance;
return InvokeAsync<EnableVgwRoutePropagationResponse>(request, options, cancellationToken);
}
#endregion
#region EnableVolumeIO
internal virtual EnableVolumeIOResponse EnableVolumeIO(EnableVolumeIORequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = EnableVolumeIORequestMarshaller.Instance;
options.ResponseUnmarshaller = EnableVolumeIOResponseUnmarshaller.Instance;
return Invoke<EnableVolumeIOResponse>(request, options);
}
/// <summary>
/// Enables I/O operations for a volume that had I/O operations disabled because the data
/// on the volume was potentially inconsistent.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the EnableVolumeIO service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the EnableVolumeIO service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVolumeIO">REST API Reference for EnableVolumeIO Operation</seealso>
public virtual Task<EnableVolumeIOResponse> EnableVolumeIOAsync(EnableVolumeIORequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = EnableVolumeIORequestMarshaller.Instance;
options.ResponseUnmarshaller = EnableVolumeIOResponseUnmarshaller.Instance;
return InvokeAsync<EnableVolumeIOResponse>(request, options, cancellationToken);
}
#endregion
#region EnableVpcClassicLink
internal virtual EnableVpcClassicLinkResponse EnableVpcClassicLink(EnableVpcClassicLinkRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = EnableVpcClassicLinkRequestMarshaller.Instance;
options.ResponseUnmarshaller = EnableVpcClassicLinkResponseUnmarshaller.Instance;
return Invoke<EnableVpcClassicLinkResponse>(request, options);
}
/// <summary>
/// Enables a VPC for ClassicLink. You can then link EC2-Classic instances to your ClassicLink-enabled
/// VPC to allow communication over private IP addresses. You cannot enable your VPC for
/// ClassicLink if any of your VPC route tables have existing routes for address ranges
/// within the <code>10.0.0.0/8</code> IP address range, excluding local routes for VPCs
/// in the <code>10.0.0.0/16</code> and <code>10.1.0.0/16</code> IP address ranges. For
/// more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html">ClassicLink</a>
/// in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the EnableVpcClassicLink service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the EnableVpcClassicLink service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLink">REST API Reference for EnableVpcClassicLink Operation</seealso>
public virtual Task<EnableVpcClassicLinkResponse> EnableVpcClassicLinkAsync(EnableVpcClassicLinkRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = EnableVpcClassicLinkRequestMarshaller.Instance;
options.ResponseUnmarshaller = EnableVpcClassicLinkResponseUnmarshaller.Instance;
return InvokeAsync<EnableVpcClassicLinkResponse>(request, options, cancellationToken);
}
#endregion
#region EnableVpcClassicLinkDnsSupport
internal virtual EnableVpcClassicLinkDnsSupportResponse EnableVpcClassicLinkDnsSupport(EnableVpcClassicLinkDnsSupportRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = EnableVpcClassicLinkDnsSupportRequestMarshaller.Instance;
options.ResponseUnmarshaller = EnableVpcClassicLinkDnsSupportResponseUnmarshaller.Instance;
return Invoke<EnableVpcClassicLinkDnsSupportResponse>(request, options);
}
/// <summary>
/// Enables a VPC to support DNS hostname resolution for ClassicLink. If enabled, the
/// DNS hostname of a linked EC2-Classic instance resolves to its private IP address when
/// addressed from an instance in the VPC to which it's linked. Similarly, the DNS hostname
/// of an instance in a VPC resolves to its private IP address when addressed from a linked
/// EC2-Classic instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html">ClassicLink</a>
/// in the <i>Amazon Elastic Compute Cloud User Guide</i>.
///
///
/// <para>
/// You must specify a VPC ID in the request.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the EnableVpcClassicLinkDnsSupport service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the EnableVpcClassicLinkDnsSupport service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLinkDnsSupport">REST API Reference for EnableVpcClassicLinkDnsSupport Operation</seealso>
public virtual Task<EnableVpcClassicLinkDnsSupportResponse> EnableVpcClassicLinkDnsSupportAsync(EnableVpcClassicLinkDnsSupportRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = EnableVpcClassicLinkDnsSupportRequestMarshaller.Instance;
options.ResponseUnmarshaller = EnableVpcClassicLinkDnsSupportResponseUnmarshaller.Instance;
return InvokeAsync<EnableVpcClassicLinkDnsSupportResponse>(request, options, cancellationToken);
}
#endregion
#region ExportClientVpnClientCertificateRevocationList
internal virtual ExportClientVpnClientCertificateRevocationListResponse ExportClientVpnClientCertificateRevocationList(ExportClientVpnClientCertificateRevocationListRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ExportClientVpnClientCertificateRevocationListRequestMarshaller.Instance;
options.ResponseUnmarshaller = ExportClientVpnClientCertificateRevocationListResponseUnmarshaller.Instance;
return Invoke<ExportClientVpnClientCertificateRevocationListResponse>(request, options);
}
/// <summary>
/// Downloads the client certificate revocation list for the specified Client VPN endpoint.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ExportClientVpnClientCertificateRevocationList service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ExportClientVpnClientCertificateRevocationList service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ExportClientVpnClientCertificateRevocationList">REST API Reference for ExportClientVpnClientCertificateRevocationList Operation</seealso>
public virtual Task<ExportClientVpnClientCertificateRevocationListResponse> ExportClientVpnClientCertificateRevocationListAsync(ExportClientVpnClientCertificateRevocationListRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ExportClientVpnClientCertificateRevocationListRequestMarshaller.Instance;
options.ResponseUnmarshaller = ExportClientVpnClientCertificateRevocationListResponseUnmarshaller.Instance;
return InvokeAsync<ExportClientVpnClientCertificateRevocationListResponse>(request, options, cancellationToken);
}
#endregion
#region ExportClientVpnClientConfiguration
internal virtual ExportClientVpnClientConfigurationResponse ExportClientVpnClientConfiguration(ExportClientVpnClientConfigurationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ExportClientVpnClientConfigurationRequestMarshaller.Instance;
options.ResponseUnmarshaller = ExportClientVpnClientConfigurationResponseUnmarshaller.Instance;
return Invoke<ExportClientVpnClientConfigurationResponse>(request, options);
}
/// <summary>
/// Downloads the contents of the Client VPN endpoint configuration file for the specified
/// Client VPN endpoint. The Client VPN endpoint configuration file includes the Client
/// VPN endpoint and certificate information clients need to establish a connection with
/// the Client VPN endpoint.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ExportClientVpnClientConfiguration service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ExportClientVpnClientConfiguration service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ExportClientVpnClientConfiguration">REST API Reference for ExportClientVpnClientConfiguration Operation</seealso>
public virtual Task<ExportClientVpnClientConfigurationResponse> ExportClientVpnClientConfigurationAsync(ExportClientVpnClientConfigurationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ExportClientVpnClientConfigurationRequestMarshaller.Instance;
options.ResponseUnmarshaller = ExportClientVpnClientConfigurationResponseUnmarshaller.Instance;
return InvokeAsync<ExportClientVpnClientConfigurationResponse>(request, options, cancellationToken);
}
#endregion
#region ExportImage
internal virtual ExportImageResponse ExportImage(ExportImageRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ExportImageRequestMarshaller.Instance;
options.ResponseUnmarshaller = ExportImageResponseUnmarshaller.Instance;
return Invoke<ExportImageResponse>(request, options);
}
/// <summary>
/// Exports an Amazon Machine Image (AMI) to a VM file. For more information, see <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport_image.html">Exporting
/// a VM Directory from an Amazon Machine Image (AMI)</a> in the <i>VM Import/Export User
/// Guide</i>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ExportImage service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ExportImage service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ExportImage">REST API Reference for ExportImage Operation</seealso>
public virtual Task<ExportImageResponse> ExportImageAsync(ExportImageRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ExportImageRequestMarshaller.Instance;
options.ResponseUnmarshaller = ExportImageResponseUnmarshaller.Instance;
return InvokeAsync<ExportImageResponse>(request, options, cancellationToken);
}
#endregion
#region ExportTransitGatewayRoutes
internal virtual ExportTransitGatewayRoutesResponse ExportTransitGatewayRoutes(ExportTransitGatewayRoutesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ExportTransitGatewayRoutesRequestMarshaller.Instance;
options.ResponseUnmarshaller = ExportTransitGatewayRoutesResponseUnmarshaller.Instance;
return Invoke<ExportTransitGatewayRoutesResponse>(request, options);
}
/// <summary>
/// Exports routes from the specified transit gateway route table to the specified S3
/// bucket. By default, all routes are exported. Alternatively, you can filter by CIDR
/// range.
///
///
/// <para>
/// The routes are saved to the specified bucket in a JSON file. For more information,
/// see <a href="https://docs.aws.amazon.com/vpc/latest/tgw/tgw-route-tables.html#tgw-export-route-tables">Export
/// Route Tables to Amazon S3</a> in <i>Transit Gateways</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ExportTransitGatewayRoutes service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ExportTransitGatewayRoutes service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ExportTransitGatewayRoutes">REST API Reference for ExportTransitGatewayRoutes Operation</seealso>
public virtual Task<ExportTransitGatewayRoutesResponse> ExportTransitGatewayRoutesAsync(ExportTransitGatewayRoutesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ExportTransitGatewayRoutesRequestMarshaller.Instance;
options.ResponseUnmarshaller = ExportTransitGatewayRoutesResponseUnmarshaller.Instance;
return InvokeAsync<ExportTransitGatewayRoutesResponse>(request, options, cancellationToken);
}
#endregion
#region GetAssociatedIpv6PoolCidrs
internal virtual GetAssociatedIpv6PoolCidrsResponse GetAssociatedIpv6PoolCidrs(GetAssociatedIpv6PoolCidrsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetAssociatedIpv6PoolCidrsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetAssociatedIpv6PoolCidrsResponseUnmarshaller.Instance;
return Invoke<GetAssociatedIpv6PoolCidrsResponse>(request, options);
}
/// <summary>
/// Gets information about the IPv6 CIDR block associations for a specified IPv6 address
/// pool.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetAssociatedIpv6PoolCidrs service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetAssociatedIpv6PoolCidrs service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetAssociatedIpv6PoolCidrs">REST API Reference for GetAssociatedIpv6PoolCidrs Operation</seealso>
public virtual Task<GetAssociatedIpv6PoolCidrsResponse> GetAssociatedIpv6PoolCidrsAsync(GetAssociatedIpv6PoolCidrsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetAssociatedIpv6PoolCidrsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetAssociatedIpv6PoolCidrsResponseUnmarshaller.Instance;
return InvokeAsync<GetAssociatedIpv6PoolCidrsResponse>(request, options, cancellationToken);
}
#endregion
#region GetCapacityReservationUsage
internal virtual GetCapacityReservationUsageResponse GetCapacityReservationUsage(GetCapacityReservationUsageRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetCapacityReservationUsageRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetCapacityReservationUsageResponseUnmarshaller.Instance;
return Invoke<GetCapacityReservationUsageResponse>(request, options);
}
/// <summary>
/// Gets usage information about a Capacity Reservation. If the Capacity Reservation is
/// shared, it shows usage information for the Capacity Reservation owner and each AWS
/// account that is currently using the shared capacity. If the Capacity Reservation is
/// not shared, it shows only the Capacity Reservation owner's usage.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetCapacityReservationUsage service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetCapacityReservationUsage service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetCapacityReservationUsage">REST API Reference for GetCapacityReservationUsage Operation</seealso>
public virtual Task<GetCapacityReservationUsageResponse> GetCapacityReservationUsageAsync(GetCapacityReservationUsageRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetCapacityReservationUsageRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetCapacityReservationUsageResponseUnmarshaller.Instance;
return InvokeAsync<GetCapacityReservationUsageResponse>(request, options, cancellationToken);
}
#endregion
#region GetCoipPoolUsage
internal virtual GetCoipPoolUsageResponse GetCoipPoolUsage(GetCoipPoolUsageRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetCoipPoolUsageRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetCoipPoolUsageResponseUnmarshaller.Instance;
return Invoke<GetCoipPoolUsageResponse>(request, options);
}
/// <summary>
/// Describes the allocations from the specified customer-owned address pool.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetCoipPoolUsage service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetCoipPoolUsage service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetCoipPoolUsage">REST API Reference for GetCoipPoolUsage Operation</seealso>
public virtual Task<GetCoipPoolUsageResponse> GetCoipPoolUsageAsync(GetCoipPoolUsageRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetCoipPoolUsageRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetCoipPoolUsageResponseUnmarshaller.Instance;
return InvokeAsync<GetCoipPoolUsageResponse>(request, options, cancellationToken);
}
#endregion
#region GetConsoleOutput
internal virtual GetConsoleOutputResponse GetConsoleOutput(GetConsoleOutputRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetConsoleOutputRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetConsoleOutputResponseUnmarshaller.Instance;
return Invoke<GetConsoleOutputResponse>(request, options);
}
/// <summary>
/// Gets the console output for the specified instance. For Linux instances, the instance
/// console output displays the exact console output that would normally be displayed
/// on a physical monitor attached to a computer. For Windows instances, the instance
/// console output includes the last three system event log errors.
///
///
/// <para>
/// By default, the console output returns buffered information that was posted shortly
/// after an instance transition state (start, stop, reboot, or terminate). This information
/// is available for at least one hour after the most recent post. Only the most recent
/// 64 KB of console output is available.
/// </para>
///
/// <para>
/// You can optionally retrieve the latest serial console output at any time during the
/// instance lifecycle. This option is supported on instance types that use the Nitro
/// hypervisor.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html#instance-console-console-output">Instance
/// Console Output</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetConsoleOutput service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetConsoleOutput service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleOutput">REST API Reference for GetConsoleOutput Operation</seealso>
public virtual Task<GetConsoleOutputResponse> GetConsoleOutputAsync(GetConsoleOutputRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetConsoleOutputRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetConsoleOutputResponseUnmarshaller.Instance;
return InvokeAsync<GetConsoleOutputResponse>(request, options, cancellationToken);
}
#endregion
#region GetConsoleScreenshot
internal virtual GetConsoleScreenshotResponse GetConsoleScreenshot(GetConsoleScreenshotRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetConsoleScreenshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetConsoleScreenshotResponseUnmarshaller.Instance;
return Invoke<GetConsoleScreenshotResponse>(request, options);
}
/// <summary>
/// Retrieve a JPG-format screenshot of a running instance to help with troubleshooting.
///
///
/// <para>
/// The returned content is Base64-encoded.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetConsoleScreenshot service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetConsoleScreenshot service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleScreenshot">REST API Reference for GetConsoleScreenshot Operation</seealso>
public virtual Task<GetConsoleScreenshotResponse> GetConsoleScreenshotAsync(GetConsoleScreenshotRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetConsoleScreenshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetConsoleScreenshotResponseUnmarshaller.Instance;
return InvokeAsync<GetConsoleScreenshotResponse>(request, options, cancellationToken);
}
#endregion
#region GetDefaultCreditSpecification
internal virtual GetDefaultCreditSpecificationResponse GetDefaultCreditSpecification(GetDefaultCreditSpecificationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetDefaultCreditSpecificationRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetDefaultCreditSpecificationResponseUnmarshaller.Instance;
return Invoke<GetDefaultCreditSpecificationResponse>(request, options);
}
/// <summary>
/// Describes the default credit option for CPU usage of a burstable performance instance
/// family.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable
/// Performance Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetDefaultCreditSpecification service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetDefaultCreditSpecification service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetDefaultCreditSpecification">REST API Reference for GetDefaultCreditSpecification Operation</seealso>
public virtual Task<GetDefaultCreditSpecificationResponse> GetDefaultCreditSpecificationAsync(GetDefaultCreditSpecificationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetDefaultCreditSpecificationRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetDefaultCreditSpecificationResponseUnmarshaller.Instance;
return InvokeAsync<GetDefaultCreditSpecificationResponse>(request, options, cancellationToken);
}
#endregion
#region GetEbsDefaultKmsKeyId
internal virtual GetEbsDefaultKmsKeyIdResponse GetEbsDefaultKmsKeyId(GetEbsDefaultKmsKeyIdRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetEbsDefaultKmsKeyIdRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetEbsDefaultKmsKeyIdResponseUnmarshaller.Instance;
return Invoke<GetEbsDefaultKmsKeyIdResponse>(request, options);
}
/// <summary>
/// Describes the default customer master key (CMK) for EBS encryption by default for
/// your account in this Region. You can change the default CMK for encryption by default
/// using <a>ModifyEbsDefaultKmsKeyId</a> or <a>ResetEbsDefaultKmsKeyId</a>.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon
/// EBS Encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetEbsDefaultKmsKeyId service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetEbsDefaultKmsKeyId service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetEbsDefaultKmsKeyId">REST API Reference for GetEbsDefaultKmsKeyId Operation</seealso>
public virtual Task<GetEbsDefaultKmsKeyIdResponse> GetEbsDefaultKmsKeyIdAsync(GetEbsDefaultKmsKeyIdRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetEbsDefaultKmsKeyIdRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetEbsDefaultKmsKeyIdResponseUnmarshaller.Instance;
return InvokeAsync<GetEbsDefaultKmsKeyIdResponse>(request, options, cancellationToken);
}
#endregion
#region GetEbsEncryptionByDefault
internal virtual GetEbsEncryptionByDefaultResponse GetEbsEncryptionByDefault(GetEbsEncryptionByDefaultRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetEbsEncryptionByDefaultRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetEbsEncryptionByDefaultResponseUnmarshaller.Instance;
return Invoke<GetEbsEncryptionByDefaultResponse>(request, options);
}
/// <summary>
/// Describes whether EBS encryption by default is enabled for your account in the current
/// Region.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon
/// EBS Encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetEbsEncryptionByDefault service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetEbsEncryptionByDefault service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetEbsEncryptionByDefault">REST API Reference for GetEbsEncryptionByDefault Operation</seealso>
public virtual Task<GetEbsEncryptionByDefaultResponse> GetEbsEncryptionByDefaultAsync(GetEbsEncryptionByDefaultRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetEbsEncryptionByDefaultRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetEbsEncryptionByDefaultResponseUnmarshaller.Instance;
return InvokeAsync<GetEbsEncryptionByDefaultResponse>(request, options, cancellationToken);
}
#endregion
#region GetHostReservationPurchasePreview
internal virtual GetHostReservationPurchasePreviewResponse GetHostReservationPurchasePreview(GetHostReservationPurchasePreviewRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetHostReservationPurchasePreviewRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetHostReservationPurchasePreviewResponseUnmarshaller.Instance;
return Invoke<GetHostReservationPurchasePreviewResponse>(request, options);
}
/// <summary>
/// Preview a reservation purchase with configurations that match those of your Dedicated
/// Host. You must have active Dedicated Hosts in your account before you purchase a reservation.
///
///
/// <para>
/// This is a preview of the <a>PurchaseHostReservation</a> action and does not result
/// in the offering being purchased.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetHostReservationPurchasePreview service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetHostReservationPurchasePreview service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetHostReservationPurchasePreview">REST API Reference for GetHostReservationPurchasePreview Operation</seealso>
public virtual Task<GetHostReservationPurchasePreviewResponse> GetHostReservationPurchasePreviewAsync(GetHostReservationPurchasePreviewRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetHostReservationPurchasePreviewRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetHostReservationPurchasePreviewResponseUnmarshaller.Instance;
return InvokeAsync<GetHostReservationPurchasePreviewResponse>(request, options, cancellationToken);
}
#endregion
#region GetLaunchTemplateData
internal virtual GetLaunchTemplateDataResponse GetLaunchTemplateData(GetLaunchTemplateDataRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetLaunchTemplateDataRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetLaunchTemplateDataResponseUnmarshaller.Instance;
return Invoke<GetLaunchTemplateDataResponse>(request, options);
}
/// <summary>
/// Retrieves the configuration data of the specified instance. You can use this data
/// to create a launch template.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetLaunchTemplateData service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetLaunchTemplateData service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetLaunchTemplateData">REST API Reference for GetLaunchTemplateData Operation</seealso>
public virtual Task<GetLaunchTemplateDataResponse> GetLaunchTemplateDataAsync(GetLaunchTemplateDataRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetLaunchTemplateDataRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetLaunchTemplateDataResponseUnmarshaller.Instance;
return InvokeAsync<GetLaunchTemplateDataResponse>(request, options, cancellationToken);
}
#endregion
#region GetPasswordData
internal virtual GetPasswordDataResponse GetPasswordData(GetPasswordDataRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetPasswordDataRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetPasswordDataResponseUnmarshaller.Instance;
return Invoke<GetPasswordDataResponse>(request, options);
}
/// <summary>
/// Retrieves the encrypted administrator password for a running Windows instance.
///
///
/// <para>
/// The Windows password is generated at boot by the <code>EC2Config</code> service or
/// <code>EC2Launch</code> scripts (Windows Server 2016 and later). This usually only
/// happens the first time an instance is launched. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/UsingConfig_WinAMI.html">EC2Config</a>
/// and <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2launch.html">EC2Launch</a>
/// in the Amazon Elastic Compute Cloud User Guide.
/// </para>
///
/// <para>
/// For the <code>EC2Config</code> service, the password is not generated for rebundled
/// AMIs unless <code>Ec2SetPassword</code> is enabled before bundling.
/// </para>
///
/// <para>
/// The password is encrypted using the key pair that you specified when you launched
/// the instance. You must provide the corresponding key pair file.
/// </para>
///
/// <para>
/// When you launch an instance, password generation and encryption may take a few minutes.
/// If you try to retrieve the password before it's available, the output returns an empty
/// string. We recommend that you wait up to 15 minutes after launching an instance before
/// trying to retrieve the generated password.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetPasswordData service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetPasswordData service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetPasswordData">REST API Reference for GetPasswordData Operation</seealso>
public virtual Task<GetPasswordDataResponse> GetPasswordDataAsync(GetPasswordDataRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetPasswordDataRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetPasswordDataResponseUnmarshaller.Instance;
return InvokeAsync<GetPasswordDataResponse>(request, options, cancellationToken);
}
#endregion
#region GetReservedInstancesExchangeQuote
internal virtual GetReservedInstancesExchangeQuoteResponse GetReservedInstancesExchangeQuote(GetReservedInstancesExchangeQuoteRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetReservedInstancesExchangeQuoteRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetReservedInstancesExchangeQuoteResponseUnmarshaller.Instance;
return Invoke<GetReservedInstancesExchangeQuoteResponse>(request, options);
}
/// <summary>
/// Returns a quote and exchange information for exchanging one or more specified Convertible
/// Reserved Instances for a new Convertible Reserved Instance. If the exchange cannot
/// be performed, the reason is returned in the response. Use <a>AcceptReservedInstancesExchangeQuote</a>
/// to perform the exchange.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetReservedInstancesExchangeQuote service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetReservedInstancesExchangeQuote service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetReservedInstancesExchangeQuote">REST API Reference for GetReservedInstancesExchangeQuote Operation</seealso>
public virtual Task<GetReservedInstancesExchangeQuoteResponse> GetReservedInstancesExchangeQuoteAsync(GetReservedInstancesExchangeQuoteRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetReservedInstancesExchangeQuoteRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetReservedInstancesExchangeQuoteResponseUnmarshaller.Instance;
return InvokeAsync<GetReservedInstancesExchangeQuoteResponse>(request, options, cancellationToken);
}
#endregion
#region GetTransitGatewayAttachmentPropagations
internal virtual GetTransitGatewayAttachmentPropagationsResponse GetTransitGatewayAttachmentPropagations(GetTransitGatewayAttachmentPropagationsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetTransitGatewayAttachmentPropagationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetTransitGatewayAttachmentPropagationsResponseUnmarshaller.Instance;
return Invoke<GetTransitGatewayAttachmentPropagationsResponse>(request, options);
}
/// <summary>
/// Lists the route tables to which the specified resource attachment propagates routes.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetTransitGatewayAttachmentPropagations service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetTransitGatewayAttachmentPropagations service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetTransitGatewayAttachmentPropagations">REST API Reference for GetTransitGatewayAttachmentPropagations Operation</seealso>
public virtual Task<GetTransitGatewayAttachmentPropagationsResponse> GetTransitGatewayAttachmentPropagationsAsync(GetTransitGatewayAttachmentPropagationsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetTransitGatewayAttachmentPropagationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetTransitGatewayAttachmentPropagationsResponseUnmarshaller.Instance;
return InvokeAsync<GetTransitGatewayAttachmentPropagationsResponse>(request, options, cancellationToken);
}
#endregion
#region GetTransitGatewayMulticastDomainAssociations
internal virtual GetTransitGatewayMulticastDomainAssociationsResponse GetTransitGatewayMulticastDomainAssociations(GetTransitGatewayMulticastDomainAssociationsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetTransitGatewayMulticastDomainAssociationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetTransitGatewayMulticastDomainAssociationsResponseUnmarshaller.Instance;
return Invoke<GetTransitGatewayMulticastDomainAssociationsResponse>(request, options);
}
/// <summary>
/// Gets information about the associations for the transit gateway multicast domain.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetTransitGatewayMulticastDomainAssociations service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetTransitGatewayMulticastDomainAssociations service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetTransitGatewayMulticastDomainAssociations">REST API Reference for GetTransitGatewayMulticastDomainAssociations Operation</seealso>
public virtual Task<GetTransitGatewayMulticastDomainAssociationsResponse> GetTransitGatewayMulticastDomainAssociationsAsync(GetTransitGatewayMulticastDomainAssociationsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetTransitGatewayMulticastDomainAssociationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetTransitGatewayMulticastDomainAssociationsResponseUnmarshaller.Instance;
return InvokeAsync<GetTransitGatewayMulticastDomainAssociationsResponse>(request, options, cancellationToken);
}
#endregion
#region GetTransitGatewayRouteTableAssociations
internal virtual GetTransitGatewayRouteTableAssociationsResponse GetTransitGatewayRouteTableAssociations(GetTransitGatewayRouteTableAssociationsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetTransitGatewayRouteTableAssociationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetTransitGatewayRouteTableAssociationsResponseUnmarshaller.Instance;
return Invoke<GetTransitGatewayRouteTableAssociationsResponse>(request, options);
}
/// <summary>
/// Gets information about the associations for the specified transit gateway route table.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetTransitGatewayRouteTableAssociations service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetTransitGatewayRouteTableAssociations service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetTransitGatewayRouteTableAssociations">REST API Reference for GetTransitGatewayRouteTableAssociations Operation</seealso>
public virtual Task<GetTransitGatewayRouteTableAssociationsResponse> GetTransitGatewayRouteTableAssociationsAsync(GetTransitGatewayRouteTableAssociationsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetTransitGatewayRouteTableAssociationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetTransitGatewayRouteTableAssociationsResponseUnmarshaller.Instance;
return InvokeAsync<GetTransitGatewayRouteTableAssociationsResponse>(request, options, cancellationToken);
}
#endregion
#region GetTransitGatewayRouteTablePropagations
internal virtual GetTransitGatewayRouteTablePropagationsResponse GetTransitGatewayRouteTablePropagations(GetTransitGatewayRouteTablePropagationsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetTransitGatewayRouteTablePropagationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetTransitGatewayRouteTablePropagationsResponseUnmarshaller.Instance;
return Invoke<GetTransitGatewayRouteTablePropagationsResponse>(request, options);
}
/// <summary>
/// Gets information about the route table propagations for the specified transit gateway
/// route table.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the GetTransitGatewayRouteTablePropagations service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the GetTransitGatewayRouteTablePropagations service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetTransitGatewayRouteTablePropagations">REST API Reference for GetTransitGatewayRouteTablePropagations Operation</seealso>
public virtual Task<GetTransitGatewayRouteTablePropagationsResponse> GetTransitGatewayRouteTablePropagationsAsync(GetTransitGatewayRouteTablePropagationsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetTransitGatewayRouteTablePropagationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetTransitGatewayRouteTablePropagationsResponseUnmarshaller.Instance;
return InvokeAsync<GetTransitGatewayRouteTablePropagationsResponse>(request, options, cancellationToken);
}
#endregion
#region ImportClientVpnClientCertificateRevocationList
internal virtual ImportClientVpnClientCertificateRevocationListResponse ImportClientVpnClientCertificateRevocationList(ImportClientVpnClientCertificateRevocationListRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ImportClientVpnClientCertificateRevocationListRequestMarshaller.Instance;
options.ResponseUnmarshaller = ImportClientVpnClientCertificateRevocationListResponseUnmarshaller.Instance;
return Invoke<ImportClientVpnClientCertificateRevocationListResponse>(request, options);
}
/// <summary>
/// Uploads a client certificate revocation list to the specified Client VPN endpoint.
/// Uploading a client certificate revocation list overwrites the existing client certificate
/// revocation list.
///
///
/// <para>
/// Uploading a client certificate revocation list resets existing client connections.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ImportClientVpnClientCertificateRevocationList service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ImportClientVpnClientCertificateRevocationList service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportClientVpnClientCertificateRevocationList">REST API Reference for ImportClientVpnClientCertificateRevocationList Operation</seealso>
public virtual Task<ImportClientVpnClientCertificateRevocationListResponse> ImportClientVpnClientCertificateRevocationListAsync(ImportClientVpnClientCertificateRevocationListRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ImportClientVpnClientCertificateRevocationListRequestMarshaller.Instance;
options.ResponseUnmarshaller = ImportClientVpnClientCertificateRevocationListResponseUnmarshaller.Instance;
return InvokeAsync<ImportClientVpnClientCertificateRevocationListResponse>(request, options, cancellationToken);
}
#endregion
#region ImportImage
internal virtual ImportImageResponse ImportImage(ImportImageRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ImportImageRequestMarshaller.Instance;
options.ResponseUnmarshaller = ImportImageResponseUnmarshaller.Instance;
return Invoke<ImportImageResponse>(request, options);
}
/// <summary>
/// Import single or multi-volume disk images or EBS snapshots into an Amazon Machine
/// Image (AMI). For more information, see <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html">Importing
/// a VM as an Image Using VM Import/Export</a> in the <i>VM Import/Export User Guide</i>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ImportImage service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ImportImage service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportImage">REST API Reference for ImportImage Operation</seealso>
public virtual Task<ImportImageResponse> ImportImageAsync(ImportImageRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ImportImageRequestMarshaller.Instance;
options.ResponseUnmarshaller = ImportImageResponseUnmarshaller.Instance;
return InvokeAsync<ImportImageResponse>(request, options, cancellationToken);
}
#endregion
#region ImportInstance
internal virtual ImportInstanceResponse ImportInstance(ImportInstanceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ImportInstanceRequestMarshaller.Instance;
options.ResponseUnmarshaller = ImportInstanceResponseUnmarshaller.Instance;
return Invoke<ImportInstanceResponse>(request, options);
}
/// <summary>
/// Creates an import instance task using metadata from the specified disk image. <code>ImportInstance</code>
/// only supports single-volume VMs. To import multi-volume VMs, use <a>ImportImage</a>.
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ec2-cli-vmimport-export.html">Importing
/// a Virtual Machine Using the Amazon EC2 CLI</a>.
///
///
/// <para>
/// For information about the import manifest referenced by this API action, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html">VM
/// Import Manifest</a>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ImportInstance service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ImportInstance service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportInstance">REST API Reference for ImportInstance Operation</seealso>
public virtual Task<ImportInstanceResponse> ImportInstanceAsync(ImportInstanceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ImportInstanceRequestMarshaller.Instance;
options.ResponseUnmarshaller = ImportInstanceResponseUnmarshaller.Instance;
return InvokeAsync<ImportInstanceResponse>(request, options, cancellationToken);
}
#endregion
#region ImportKeyPair
internal virtual ImportKeyPairResponse ImportKeyPair(ImportKeyPairRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ImportKeyPairRequestMarshaller.Instance;
options.ResponseUnmarshaller = ImportKeyPairResponseUnmarshaller.Instance;
return Invoke<ImportKeyPairResponse>(request, options);
}
/// <summary>
/// Imports the public key from an RSA key pair that you created with a third-party tool.
/// Compare this with <a>CreateKeyPair</a>, in which AWS creates the key pair and gives
/// the keys to you (AWS keeps a copy of the public key). With ImportKeyPair, you create
/// the key pair and give AWS just the public key. The private key is never transferred
/// between you and AWS.
///
///
/// <para>
/// For more information about key pairs, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html">Key
/// Pairs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ImportKeyPair service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ImportKeyPair service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportKeyPair">REST API Reference for ImportKeyPair Operation</seealso>
public virtual Task<ImportKeyPairResponse> ImportKeyPairAsync(ImportKeyPairRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ImportKeyPairRequestMarshaller.Instance;
options.ResponseUnmarshaller = ImportKeyPairResponseUnmarshaller.Instance;
return InvokeAsync<ImportKeyPairResponse>(request, options, cancellationToken);
}
#endregion
#region ImportSnapshot
internal virtual ImportSnapshotResponse ImportSnapshot(ImportSnapshotRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ImportSnapshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = ImportSnapshotResponseUnmarshaller.Instance;
return Invoke<ImportSnapshotResponse>(request, options);
}
/// <summary>
/// Imports a disk into an EBS snapshot.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ImportSnapshot service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ImportSnapshot service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportSnapshot">REST API Reference for ImportSnapshot Operation</seealso>
public virtual Task<ImportSnapshotResponse> ImportSnapshotAsync(ImportSnapshotRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ImportSnapshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = ImportSnapshotResponseUnmarshaller.Instance;
return InvokeAsync<ImportSnapshotResponse>(request, options, cancellationToken);
}
#endregion
#region ImportVolume
internal virtual ImportVolumeResponse ImportVolume(ImportVolumeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ImportVolumeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ImportVolumeResponseUnmarshaller.Instance;
return Invoke<ImportVolumeResponse>(request, options);
}
/// <summary>
/// Creates an import volume task using metadata from the specified disk image.For more
/// information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/importing-your-volumes-into-amazon-ebs.html">Importing
/// Disks to Amazon EBS</a>.
///
///
/// <para>
/// For information about the import manifest referenced by this API action, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html">VM
/// Import Manifest</a>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ImportVolume service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ImportVolume service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportVolume">REST API Reference for ImportVolume Operation</seealso>
public virtual Task<ImportVolumeResponse> ImportVolumeAsync(ImportVolumeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ImportVolumeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ImportVolumeResponseUnmarshaller.Instance;
return InvokeAsync<ImportVolumeResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyAvailabilityZoneGroup
internal virtual ModifyAvailabilityZoneGroupResponse ModifyAvailabilityZoneGroup(ModifyAvailabilityZoneGroupRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyAvailabilityZoneGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyAvailabilityZoneGroupResponseUnmarshaller.Instance;
return Invoke<ModifyAvailabilityZoneGroupResponse>(request, options);
}
/// <summary>
/// Enables or disables an Availability Zone group for your account.
///
///
/// <para>
/// Use <a href="https://docs.aws.amazon.com/AWSEC2ApiDocReef/build/server-root/AWSEC2/latest/APIReference/API_DescribeAvailabilityZones.html">describe-availability-zones</a>
/// to view the value for <code>GroupName</code>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyAvailabilityZoneGroup service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyAvailabilityZoneGroup service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyAvailabilityZoneGroup">REST API Reference for ModifyAvailabilityZoneGroup Operation</seealso>
public virtual Task<ModifyAvailabilityZoneGroupResponse> ModifyAvailabilityZoneGroupAsync(ModifyAvailabilityZoneGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyAvailabilityZoneGroupRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyAvailabilityZoneGroupResponseUnmarshaller.Instance;
return InvokeAsync<ModifyAvailabilityZoneGroupResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyCapacityReservation
internal virtual ModifyCapacityReservationResponse ModifyCapacityReservation(ModifyCapacityReservationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyCapacityReservationRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyCapacityReservationResponseUnmarshaller.Instance;
return Invoke<ModifyCapacityReservationResponse>(request, options);
}
/// <summary>
/// Modifies a Capacity Reservation's capacity and the conditions under which it is to
/// be released. You cannot change a Capacity Reservation's instance type, EBS optimization,
/// instance store settings, platform, Availability Zone, or instance eligibility. If
/// you need to modify any of these attributes, we recommend that you cancel the Capacity
/// Reservation, and then create a new one with the required attributes.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyCapacityReservation service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyCapacityReservation service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyCapacityReservation">REST API Reference for ModifyCapacityReservation Operation</seealso>
public virtual Task<ModifyCapacityReservationResponse> ModifyCapacityReservationAsync(ModifyCapacityReservationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyCapacityReservationRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyCapacityReservationResponseUnmarshaller.Instance;
return InvokeAsync<ModifyCapacityReservationResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyClientVpnEndpoint
internal virtual ModifyClientVpnEndpointResponse ModifyClientVpnEndpoint(ModifyClientVpnEndpointRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyClientVpnEndpointRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyClientVpnEndpointResponseUnmarshaller.Instance;
return Invoke<ModifyClientVpnEndpointResponse>(request, options);
}
/// <summary>
/// Modifies the specified Client VPN endpoint. Modifying the DNS server resets existing
/// client connections.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyClientVpnEndpoint service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyClientVpnEndpoint service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyClientVpnEndpoint">REST API Reference for ModifyClientVpnEndpoint Operation</seealso>
public virtual Task<ModifyClientVpnEndpointResponse> ModifyClientVpnEndpointAsync(ModifyClientVpnEndpointRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyClientVpnEndpointRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyClientVpnEndpointResponseUnmarshaller.Instance;
return InvokeAsync<ModifyClientVpnEndpointResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyDefaultCreditSpecification
internal virtual ModifyDefaultCreditSpecificationResponse ModifyDefaultCreditSpecification(ModifyDefaultCreditSpecificationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyDefaultCreditSpecificationRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyDefaultCreditSpecificationResponseUnmarshaller.Instance;
return Invoke<ModifyDefaultCreditSpecificationResponse>(request, options);
}
/// <summary>
/// Modifies the default credit option for CPU usage of burstable performance instances.
/// The default credit option is set at the account level per AWS Region, and is specified
/// per instance family. All new burstable performance instances in the account launch
/// using the default credit option.
///
///
/// <para>
/// <code>ModifyDefaultCreditSpecification</code> is an asynchronous operation, which
/// works at an AWS Region level and modifies the credit option for each Availability
/// Zone. All zones in a Region are updated within five minutes. But if instances are
/// launched during this operation, they might not get the new credit option until the
/// zone is updated. To verify whether the update has occurred, you can call <code>GetDefaultCreditSpecification</code>
/// and check <code>DefaultCreditSpecification</code> for updates.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable
/// Performance Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyDefaultCreditSpecification service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyDefaultCreditSpecification service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyDefaultCreditSpecification">REST API Reference for ModifyDefaultCreditSpecification Operation</seealso>
public virtual Task<ModifyDefaultCreditSpecificationResponse> ModifyDefaultCreditSpecificationAsync(ModifyDefaultCreditSpecificationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyDefaultCreditSpecificationRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyDefaultCreditSpecificationResponseUnmarshaller.Instance;
return InvokeAsync<ModifyDefaultCreditSpecificationResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyEbsDefaultKmsKeyId
internal virtual ModifyEbsDefaultKmsKeyIdResponse ModifyEbsDefaultKmsKeyId(ModifyEbsDefaultKmsKeyIdRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyEbsDefaultKmsKeyIdRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyEbsDefaultKmsKeyIdResponseUnmarshaller.Instance;
return Invoke<ModifyEbsDefaultKmsKeyIdResponse>(request, options);
}
/// <summary>
/// Changes the default customer master key (CMK) for EBS encryption by default for your
/// account in this Region.
///
///
/// <para>
/// AWS creates a unique AWS managed CMK in each Region for use with encryption by default.
/// If you change the default CMK to a symmetric customer managed CMK, it is used instead
/// of the AWS managed CMK. To reset the default CMK to the AWS managed CMK for EBS, use
/// <a>ResetEbsDefaultKmsKeyId</a>. Amazon EBS does not support asymmetric CMKs.
/// </para>
///
/// <para>
/// If you delete or disable the customer managed CMK that you specified for use with
/// encryption by default, your instances will fail to launch.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon
/// EBS Encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyEbsDefaultKmsKeyId service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyEbsDefaultKmsKeyId service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyEbsDefaultKmsKeyId">REST API Reference for ModifyEbsDefaultKmsKeyId Operation</seealso>
public virtual Task<ModifyEbsDefaultKmsKeyIdResponse> ModifyEbsDefaultKmsKeyIdAsync(ModifyEbsDefaultKmsKeyIdRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyEbsDefaultKmsKeyIdRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyEbsDefaultKmsKeyIdResponseUnmarshaller.Instance;
return InvokeAsync<ModifyEbsDefaultKmsKeyIdResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyFleet
internal virtual ModifyFleetResponse ModifyFleet(ModifyFleetRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyFleetRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyFleetResponseUnmarshaller.Instance;
return Invoke<ModifyFleetResponse>(request, options);
}
/// <summary>
/// Modifies the specified EC2 Fleet.
///
///
/// <para>
/// You can only modify an EC2 Fleet request of type <code>maintain</code>.
/// </para>
///
/// <para>
/// While the EC2 Fleet is being modified, it is in the <code>modifying</code> state.
/// </para>
///
/// <para>
/// To scale up your EC2 Fleet, increase its target capacity. The EC2 Fleet launches the
/// additional Spot Instances according to the allocation strategy for the EC2 Fleet request.
/// If the allocation strategy is <code>lowest-price</code>, the EC2 Fleet launches instances
/// using the Spot Instance pool with the lowest price. If the allocation strategy is
/// <code>diversified</code>, the EC2 Fleet distributes the instances across the Spot
/// Instance pools. If the allocation strategy is <code>capacity-optimized</code>, EC2
/// Fleet launches instances from Spot Instance pools with optimal capacity for the number
/// of instances that are launching.
/// </para>
///
/// <para>
/// To scale down your EC2 Fleet, decrease its target capacity. First, the EC2 Fleet cancels
/// any open requests that exceed the new target capacity. You can request that the EC2
/// Fleet terminate Spot Instances until the size of the fleet no longer exceeds the new
/// target capacity. If the allocation strategy is <code>lowest-price</code>, the EC2
/// Fleet terminates the instances with the highest price per unit. If the allocation
/// strategy is <code>capacity-optimized</code>, the EC2 Fleet terminates the instances
/// in the Spot Instance pools that have the least available Spot Instance capacity. If
/// the allocation strategy is <code>diversified</code>, the EC2 Fleet terminates instances
/// across the Spot Instance pools. Alternatively, you can request that the EC2 Fleet
/// keep the fleet at its current size, but not replace any Spot Instances that are interrupted
/// or that you terminate manually.
/// </para>
///
/// <para>
/// If you are finished with your EC2 Fleet for now, but will use it again later, you
/// can set the target capacity to 0.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyFleet service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyFleet service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyFleet">REST API Reference for ModifyFleet Operation</seealso>
public virtual Task<ModifyFleetResponse> ModifyFleetAsync(ModifyFleetRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyFleetRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyFleetResponseUnmarshaller.Instance;
return InvokeAsync<ModifyFleetResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyFpgaImageAttribute
internal virtual ModifyFpgaImageAttributeResponse ModifyFpgaImageAttribute(ModifyFpgaImageAttributeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyFpgaImageAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyFpgaImageAttributeResponseUnmarshaller.Instance;
return Invoke<ModifyFpgaImageAttributeResponse>(request, options);
}
/// <summary>
/// Modifies the specified attribute of the specified Amazon FPGA Image (AFI).
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyFpgaImageAttribute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyFpgaImageAttribute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyFpgaImageAttribute">REST API Reference for ModifyFpgaImageAttribute Operation</seealso>
public virtual Task<ModifyFpgaImageAttributeResponse> ModifyFpgaImageAttributeAsync(ModifyFpgaImageAttributeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyFpgaImageAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyFpgaImageAttributeResponseUnmarshaller.Instance;
return InvokeAsync<ModifyFpgaImageAttributeResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyHosts
internal virtual ModifyHostsResponse ModifyHosts(ModifyHostsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyHostsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyHostsResponseUnmarshaller.Instance;
return Invoke<ModifyHostsResponse>(request, options);
}
/// <summary>
/// Modify the auto-placement setting of a Dedicated Host. When auto-placement is enabled,
/// any instances that you launch with a tenancy of <code>host</code> but without a specific
/// host ID are placed onto any available Dedicated Host in your account that has auto-placement
/// enabled. When auto-placement is disabled, you need to provide a host ID to have the
/// instance launch onto a specific host. If no host ID is provided, the instance is launched
/// onto a suitable host with auto-placement enabled.
///
///
/// <para>
/// You can also use this API action to modify a Dedicated Host to support either multiple
/// instance types in an instance family, or to support a specific instance type only.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyHosts service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyHosts service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyHosts">REST API Reference for ModifyHosts Operation</seealso>
public virtual Task<ModifyHostsResponse> ModifyHostsAsync(ModifyHostsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyHostsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyHostsResponseUnmarshaller.Instance;
return InvokeAsync<ModifyHostsResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyIdentityIdFormat
internal virtual ModifyIdentityIdFormatResponse ModifyIdentityIdFormat(ModifyIdentityIdFormatRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyIdentityIdFormatRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyIdentityIdFormatResponseUnmarshaller.Instance;
return Invoke<ModifyIdentityIdFormatResponse>(request, options);
}
/// <summary>
/// Modifies the ID format of a resource for a specified IAM user, IAM role, or the root
/// user for an account; or all IAM users, IAM roles, and the root user for an account.
/// You can specify that resources should receive longer IDs (17-character IDs) when they
/// are created.
///
///
/// <para>
/// This request can only be used to modify longer ID settings for resource types that
/// are within the opt-in period. Resources currently in their opt-in period include:
/// <code>bundle</code> | <code>conversion-task</code> | <code>customer-gateway</code>
/// | <code>dhcp-options</code> | <code>elastic-ip-allocation</code> | <code>elastic-ip-association</code>
/// | <code>export-task</code> | <code>flow-log</code> | <code>image</code> | <code>import-task</code>
/// | <code>internet-gateway</code> | <code>network-acl</code> | <code>network-acl-association</code>
/// | <code>network-interface</code> | <code>network-interface-attachment</code> | <code>prefix-list</code>
/// | <code>route-table</code> | <code>route-table-association</code> | <code>security-group</code>
/// | <code>subnet</code> | <code>subnet-cidr-block-association</code> | <code>vpc</code>
/// | <code>vpc-cidr-block-association</code> | <code>vpc-endpoint</code> | <code>vpc-peering-connection</code>
/// | <code>vpn-connection</code> | <code>vpn-gateway</code>.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html">Resource
/// IDs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
///
/// <para>
/// This setting applies to the principal specified in the request; it does not apply
/// to the principal that makes the request.
/// </para>
///
/// <para>
/// Resources created with longer IDs are visible to all IAM roles and users, regardless
/// of these settings and provided that they have permission to use the relevant <code>Describe</code>
/// command for the resource type.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyIdentityIdFormat service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyIdentityIdFormat service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyIdentityIdFormat">REST API Reference for ModifyIdentityIdFormat Operation</seealso>
public virtual Task<ModifyIdentityIdFormatResponse> ModifyIdentityIdFormatAsync(ModifyIdentityIdFormatRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyIdentityIdFormatRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyIdentityIdFormatResponseUnmarshaller.Instance;
return InvokeAsync<ModifyIdentityIdFormatResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyIdFormat
internal virtual ModifyIdFormatResponse ModifyIdFormat(ModifyIdFormatRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyIdFormatRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyIdFormatResponseUnmarshaller.Instance;
return Invoke<ModifyIdFormatResponse>(request, options);
}
/// <summary>
/// Modifies the ID format for the specified resource on a per-Region basis. You can specify
/// that resources should receive longer IDs (17-character IDs) when they are created.
///
///
/// <para>
/// This request can only be used to modify longer ID settings for resource types that
/// are within the opt-in period. Resources currently in their opt-in period include:
/// <code>bundle</code> | <code>conversion-task</code> | <code>customer-gateway</code>
/// | <code>dhcp-options</code> | <code>elastic-ip-allocation</code> | <code>elastic-ip-association</code>
/// | <code>export-task</code> | <code>flow-log</code> | <code>image</code> | <code>import-task</code>
/// | <code>internet-gateway</code> | <code>network-acl</code> | <code>network-acl-association</code>
/// | <code>network-interface</code> | <code>network-interface-attachment</code> | <code>prefix-list</code>
/// | <code>route-table</code> | <code>route-table-association</code> | <code>security-group</code>
/// | <code>subnet</code> | <code>subnet-cidr-block-association</code> | <code>vpc</code>
/// | <code>vpc-cidr-block-association</code> | <code>vpc-endpoint</code> | <code>vpc-peering-connection</code>
/// | <code>vpn-connection</code> | <code>vpn-gateway</code>.
/// </para>
///
/// <para>
/// This setting applies to the IAM user who makes the request; it does not apply to the
/// entire AWS account. By default, an IAM user defaults to the same settings as the root
/// user. If you're using this action as the root user, then these settings apply to the
/// entire account, unless an IAM user explicitly overrides these settings for themselves.
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html">Resource
/// IDs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
///
/// <para>
/// Resources created with longer IDs are visible to all IAM roles and users, regardless
/// of these settings and provided that they have permission to use the relevant <code>Describe</code>
/// command for the resource type.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyIdFormat service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyIdFormat service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyIdFormat">REST API Reference for ModifyIdFormat Operation</seealso>
public virtual Task<ModifyIdFormatResponse> ModifyIdFormatAsync(ModifyIdFormatRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyIdFormatRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyIdFormatResponseUnmarshaller.Instance;
return InvokeAsync<ModifyIdFormatResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyImageAttribute
internal virtual ModifyImageAttributeResponse ModifyImageAttribute(ModifyImageAttributeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyImageAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyImageAttributeResponseUnmarshaller.Instance;
return Invoke<ModifyImageAttributeResponse>(request, options);
}
/// <summary>
/// Modifies the specified attribute of the specified AMI. You can specify only one attribute
/// at a time. You can use the <code>Attribute</code> parameter to specify the attribute
/// or one of the following parameters: <code>Description</code>, <code>LaunchPermission</code>,
/// or <code>ProductCode</code>.
///
///
/// <para>
/// AWS Marketplace product codes cannot be modified. Images with an AWS Marketplace product
/// code cannot be made public.
/// </para>
///
/// <para>
/// To enable the SriovNetSupport enhanced networking attribute of an image, enable SriovNetSupport
/// on an instance and create an AMI from the instance.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyImageAttribute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyImageAttribute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyImageAttribute">REST API Reference for ModifyImageAttribute Operation</seealso>
public virtual Task<ModifyImageAttributeResponse> ModifyImageAttributeAsync(ModifyImageAttributeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyImageAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyImageAttributeResponseUnmarshaller.Instance;
return InvokeAsync<ModifyImageAttributeResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyInstanceAttribute
internal virtual ModifyInstanceAttributeResponse ModifyInstanceAttribute(ModifyInstanceAttributeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyInstanceAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyInstanceAttributeResponseUnmarshaller.Instance;
return Invoke<ModifyInstanceAttributeResponse>(request, options);
}
/// <summary>
/// Modifies the specified attribute of the specified instance. You can specify only one
/// attribute at a time.
///
///
/// <para>
/// <b>Note: </b>Using this action to change the security groups associated with an elastic
/// network interface (ENI) attached to an instance in a VPC can result in an error if
/// the instance has more than one ENI. To change the security groups associated with
/// an ENI attached to an instance that has multiple ENIs, we recommend that you use the
/// <a>ModifyNetworkInterfaceAttribute</a> action.
/// </para>
///
/// <para>
/// To modify some attributes, the instance must be stopped. For more information, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_ChangingAttributesWhileInstanceStopped.html">Modifying
/// Attributes of a Stopped Instance</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyInstanceAttribute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyInstanceAttribute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceAttribute">REST API Reference for ModifyInstanceAttribute Operation</seealso>
public virtual Task<ModifyInstanceAttributeResponse> ModifyInstanceAttributeAsync(ModifyInstanceAttributeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyInstanceAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyInstanceAttributeResponseUnmarshaller.Instance;
return InvokeAsync<ModifyInstanceAttributeResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyInstanceCapacityReservationAttributes
internal virtual ModifyInstanceCapacityReservationAttributesResponse ModifyInstanceCapacityReservationAttributes(ModifyInstanceCapacityReservationAttributesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyInstanceCapacityReservationAttributesRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyInstanceCapacityReservationAttributesResponseUnmarshaller.Instance;
return Invoke<ModifyInstanceCapacityReservationAttributesResponse>(request, options);
}
/// <summary>
/// Modifies the Capacity Reservation settings for a stopped instance. Use this action
/// to configure an instance to target a specific Capacity Reservation, run in any <code>open</code>
/// Capacity Reservation with matching attributes, or run On-Demand Instance capacity.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyInstanceCapacityReservationAttributes service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyInstanceCapacityReservationAttributes service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceCapacityReservationAttributes">REST API Reference for ModifyInstanceCapacityReservationAttributes Operation</seealso>
public virtual Task<ModifyInstanceCapacityReservationAttributesResponse> ModifyInstanceCapacityReservationAttributesAsync(ModifyInstanceCapacityReservationAttributesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyInstanceCapacityReservationAttributesRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyInstanceCapacityReservationAttributesResponseUnmarshaller.Instance;
return InvokeAsync<ModifyInstanceCapacityReservationAttributesResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyInstanceCreditSpecification
internal virtual ModifyInstanceCreditSpecificationResponse ModifyInstanceCreditSpecification(ModifyInstanceCreditSpecificationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyInstanceCreditSpecificationRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyInstanceCreditSpecificationResponseUnmarshaller.Instance;
return Invoke<ModifyInstanceCreditSpecificationResponse>(request, options);
}
/// <summary>
/// Modifies the credit option for CPU usage on a running or stopped burstable performance
/// instance. The credit options are <code>standard</code> and <code>unlimited</code>.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable
/// Performance Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyInstanceCreditSpecification service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyInstanceCreditSpecification service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceCreditSpecification">REST API Reference for ModifyInstanceCreditSpecification Operation</seealso>
public virtual Task<ModifyInstanceCreditSpecificationResponse> ModifyInstanceCreditSpecificationAsync(ModifyInstanceCreditSpecificationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyInstanceCreditSpecificationRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyInstanceCreditSpecificationResponseUnmarshaller.Instance;
return InvokeAsync<ModifyInstanceCreditSpecificationResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyInstanceEventStartTime
internal virtual ModifyInstanceEventStartTimeResponse ModifyInstanceEventStartTime(ModifyInstanceEventStartTimeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyInstanceEventStartTimeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyInstanceEventStartTimeResponseUnmarshaller.Instance;
return Invoke<ModifyInstanceEventStartTimeResponse>(request, options);
}
/// <summary>
/// Modifies the start time for a scheduled Amazon EC2 instance event.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyInstanceEventStartTime service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyInstanceEventStartTime service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceEventStartTime">REST API Reference for ModifyInstanceEventStartTime Operation</seealso>
public virtual Task<ModifyInstanceEventStartTimeResponse> ModifyInstanceEventStartTimeAsync(ModifyInstanceEventStartTimeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyInstanceEventStartTimeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyInstanceEventStartTimeResponseUnmarshaller.Instance;
return InvokeAsync<ModifyInstanceEventStartTimeResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyInstanceMetadataOptions
internal virtual ModifyInstanceMetadataOptionsResponse ModifyInstanceMetadataOptions(ModifyInstanceMetadataOptionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyInstanceMetadataOptionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyInstanceMetadataOptionsResponseUnmarshaller.Instance;
return Invoke<ModifyInstanceMetadataOptionsResponse>(request, options);
}
/// <summary>
/// Modify the instance metadata parameters on a running or stopped instance. When you
/// modify the parameters on a stopped instance, they are applied when the instance is
/// started. When you modify the parameters on a running instance, the API responds with
/// a state of “pending”. After the parameter modifications are successfully applied to
/// the instance, the state of the modifications changes from “pending” to “applied” in
/// subsequent describe-instances API calls. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">Instance
/// Metadata and User Data</a>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyInstanceMetadataOptions service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyInstanceMetadataOptions service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceMetadataOptions">REST API Reference for ModifyInstanceMetadataOptions Operation</seealso>
public virtual Task<ModifyInstanceMetadataOptionsResponse> ModifyInstanceMetadataOptionsAsync(ModifyInstanceMetadataOptionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyInstanceMetadataOptionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyInstanceMetadataOptionsResponseUnmarshaller.Instance;
return InvokeAsync<ModifyInstanceMetadataOptionsResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyInstancePlacement
internal virtual ModifyInstancePlacementResponse ModifyInstancePlacement(ModifyInstancePlacementRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyInstancePlacementRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyInstancePlacementResponseUnmarshaller.Instance;
return Invoke<ModifyInstancePlacementResponse>(request, options);
}
/// <summary>
/// Modifies the placement attributes for a specified instance. You can do the following:
///
/// <ul> <li>
/// <para>
/// Modify the affinity between an instance and a <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-overview.html">Dedicated
/// Host</a>. When affinity is set to <code>host</code> and the instance is not associated
/// with a specific Dedicated Host, the next time the instance is launched, it is automatically
/// associated with the host on which it lands. If the instance is restarted or rebooted,
/// this relationship persists.
/// </para>
/// </li> <li>
/// <para>
/// Change the Dedicated Host with which an instance is associated.
/// </para>
/// </li> <li>
/// <para>
/// Change the instance tenancy of an instance from <code>host</code> to <code>dedicated</code>,
/// or from <code>dedicated</code> to <code>host</code>.
/// </para>
/// </li> <li>
/// <para>
/// Move an instance to or from a <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html">placement
/// group</a>.
/// </para>
/// </li> </ul>
/// <para>
/// At least one attribute for affinity, host ID, tenancy, or placement group name must
/// be specified in the request. Affinity and tenancy can be modified in the same request.
/// </para>
///
/// <para>
/// To modify the host ID, tenancy, placement group, or partition for an instance, the
/// instance must be in the <code>stopped</code> state.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyInstancePlacement service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyInstancePlacement service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstancePlacement">REST API Reference for ModifyInstancePlacement Operation</seealso>
public virtual Task<ModifyInstancePlacementResponse> ModifyInstancePlacementAsync(ModifyInstancePlacementRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyInstancePlacementRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyInstancePlacementResponseUnmarshaller.Instance;
return InvokeAsync<ModifyInstancePlacementResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyLaunchTemplate
internal virtual ModifyLaunchTemplateResponse ModifyLaunchTemplate(ModifyLaunchTemplateRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyLaunchTemplateRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyLaunchTemplateResponseUnmarshaller.Instance;
return Invoke<ModifyLaunchTemplateResponse>(request, options);
}
/// <summary>
/// Modifies a launch template. You can specify which version of the launch template to
/// set as the default version. When launching an instance, the default version applies
/// when a launch template version is not specified.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyLaunchTemplate service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyLaunchTemplate service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyLaunchTemplate">REST API Reference for ModifyLaunchTemplate Operation</seealso>
public virtual Task<ModifyLaunchTemplateResponse> ModifyLaunchTemplateAsync(ModifyLaunchTemplateRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyLaunchTemplateRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyLaunchTemplateResponseUnmarshaller.Instance;
return InvokeAsync<ModifyLaunchTemplateResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyNetworkInterfaceAttribute
internal virtual ModifyNetworkInterfaceAttributeResponse ModifyNetworkInterfaceAttribute(ModifyNetworkInterfaceAttributeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyNetworkInterfaceAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyNetworkInterfaceAttributeResponseUnmarshaller.Instance;
return Invoke<ModifyNetworkInterfaceAttributeResponse>(request, options);
}
/// <summary>
/// Modifies the specified network interface attribute. You can specify only one attribute
/// at a time. You can use this action to attach and detach security groups from an existing
/// EC2 instance.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyNetworkInterfaceAttribute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyNetworkInterfaceAttribute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyNetworkInterfaceAttribute">REST API Reference for ModifyNetworkInterfaceAttribute Operation</seealso>
public virtual Task<ModifyNetworkInterfaceAttributeResponse> ModifyNetworkInterfaceAttributeAsync(ModifyNetworkInterfaceAttributeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyNetworkInterfaceAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyNetworkInterfaceAttributeResponseUnmarshaller.Instance;
return InvokeAsync<ModifyNetworkInterfaceAttributeResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyReservedInstances
internal virtual ModifyReservedInstancesResponse ModifyReservedInstances(ModifyReservedInstancesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyReservedInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyReservedInstancesResponseUnmarshaller.Instance;
return Invoke<ModifyReservedInstancesResponse>(request, options);
}
/// <summary>
/// Modifies the Availability Zone, instance count, instance type, or network platform
/// (EC2-Classic or EC2-VPC) of your Reserved Instances. The Reserved Instances to be
/// modified must be identical, except for Availability Zone, network platform, and instance
/// type.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html">Modifying
/// Reserved Instances</a> in the Amazon Elastic Compute Cloud User Guide.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyReservedInstances service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyReservedInstances service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyReservedInstances">REST API Reference for ModifyReservedInstances Operation</seealso>
public virtual Task<ModifyReservedInstancesResponse> ModifyReservedInstancesAsync(ModifyReservedInstancesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyReservedInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyReservedInstancesResponseUnmarshaller.Instance;
return InvokeAsync<ModifyReservedInstancesResponse>(request, options, cancellationToken);
}
#endregion
#region ModifySnapshotAttribute
internal virtual ModifySnapshotAttributeResponse ModifySnapshotAttribute(ModifySnapshotAttributeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifySnapshotAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifySnapshotAttributeResponseUnmarshaller.Instance;
return Invoke<ModifySnapshotAttributeResponse>(request, options);
}
/// <summary>
/// Adds or removes permission settings for the specified snapshot. You may add or remove
/// specified AWS account IDs from a snapshot's list of create volume permissions, but
/// you cannot do both in a single operation. If you need to both add and remove account
/// IDs for a snapshot, you must use multiple operations. You can make up to 500 modifications
/// to a snapshot in a single operation.
///
///
/// <para>
/// Encrypted snapshots and snapshots with AWS Marketplace product codes cannot be made
/// public. Snapshots encrypted with your default CMK cannot be shared with other accounts.
/// </para>
///
/// <para>
/// For more information about modifying snapshot permissions, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html">Sharing
/// Snapshots</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifySnapshotAttribute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifySnapshotAttribute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySnapshotAttribute">REST API Reference for ModifySnapshotAttribute Operation</seealso>
public virtual Task<ModifySnapshotAttributeResponse> ModifySnapshotAttributeAsync(ModifySnapshotAttributeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifySnapshotAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifySnapshotAttributeResponseUnmarshaller.Instance;
return InvokeAsync<ModifySnapshotAttributeResponse>(request, options, cancellationToken);
}
#endregion
#region ModifySpotFleetRequest
internal virtual ModifySpotFleetRequestResponse ModifySpotFleetRequest(ModifySpotFleetRequestRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifySpotFleetRequestRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifySpotFleetRequestResponseUnmarshaller.Instance;
return Invoke<ModifySpotFleetRequestResponse>(request, options);
}
/// <summary>
/// Modifies the specified Spot Fleet request.
///
///
/// <para>
/// You can only modify a Spot Fleet request of type <code>maintain</code>.
/// </para>
///
/// <para>
/// While the Spot Fleet request is being modified, it is in the <code>modifying</code>
/// state.
/// </para>
///
/// <para>
/// To scale up your Spot Fleet, increase its target capacity. The Spot Fleet launches
/// the additional Spot Instances according to the allocation strategy for the Spot Fleet
/// request. If the allocation strategy is <code>lowestPrice</code>, the Spot Fleet launches
/// instances using the Spot Instance pool with the lowest price. If the allocation strategy
/// is <code>diversified</code>, the Spot Fleet distributes the instances across the Spot
/// Instance pools. If the allocation strategy is <code>capacityOptimized</code>, Spot
/// Fleet launches instances from Spot Instance pools with optimal capacity for the number
/// of instances that are launching.
/// </para>
///
/// <para>
/// To scale down your Spot Fleet, decrease its target capacity. First, the Spot Fleet
/// cancels any open requests that exceed the new target capacity. You can request that
/// the Spot Fleet terminate Spot Instances until the size of the fleet no longer exceeds
/// the new target capacity. If the allocation strategy is <code>lowestPrice</code>, the
/// Spot Fleet terminates the instances with the highest price per unit. If the allocation
/// strategy is <code>capacityOptimized</code>, the Spot Fleet terminates the instances
/// in the Spot Instance pools that have the least available Spot Instance capacity. If
/// the allocation strategy is <code>diversified</code>, the Spot Fleet terminates instances
/// across the Spot Instance pools. Alternatively, you can request that the Spot Fleet
/// keep the fleet at its current size, but not replace any Spot Instances that are interrupted
/// or that you terminate manually.
/// </para>
///
/// <para>
/// If you are finished with your Spot Fleet for now, but will use it again later, you
/// can set the target capacity to 0.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifySpotFleetRequest service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifySpotFleetRequest service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySpotFleetRequest">REST API Reference for ModifySpotFleetRequest Operation</seealso>
public virtual Task<ModifySpotFleetRequestResponse> ModifySpotFleetRequestAsync(ModifySpotFleetRequestRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifySpotFleetRequestRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifySpotFleetRequestResponseUnmarshaller.Instance;
return InvokeAsync<ModifySpotFleetRequestResponse>(request, options, cancellationToken);
}
#endregion
#region ModifySubnetAttribute
internal virtual ModifySubnetAttributeResponse ModifySubnetAttribute(ModifySubnetAttributeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifySubnetAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifySubnetAttributeResponseUnmarshaller.Instance;
return Invoke<ModifySubnetAttributeResponse>(request, options);
}
/// <summary>
/// Modifies a subnet attribute. You can only modify one attribute at a time.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifySubnetAttribute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifySubnetAttribute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySubnetAttribute">REST API Reference for ModifySubnetAttribute Operation</seealso>
public virtual Task<ModifySubnetAttributeResponse> ModifySubnetAttributeAsync(ModifySubnetAttributeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifySubnetAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifySubnetAttributeResponseUnmarshaller.Instance;
return InvokeAsync<ModifySubnetAttributeResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyTrafficMirrorFilterNetworkServices
internal virtual ModifyTrafficMirrorFilterNetworkServicesResponse ModifyTrafficMirrorFilterNetworkServices(ModifyTrafficMirrorFilterNetworkServicesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyTrafficMirrorFilterNetworkServicesRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyTrafficMirrorFilterNetworkServicesResponseUnmarshaller.Instance;
return Invoke<ModifyTrafficMirrorFilterNetworkServicesResponse>(request, options);
}
/// <summary>
/// Allows or restricts mirroring network services.
///
///
/// <para>
/// By default, Amazon DNS network services are not eligible for Traffic Mirror. Use
/// <code>AddNetworkServices</code> to add network services to a Traffic Mirror filter.
/// When a network service is added to the Traffic Mirror filter, all traffic related
/// to that network service will be mirrored. When you no longer want to mirror network
/// services, use <code>RemoveNetworkServices</code> to remove the network services from
/// the Traffic Mirror filter.
/// </para>
///
/// <para>
/// For information about filter rule properties, see <a href="https://docs.aws.amazon.com/vpc/latest/mirroring/traffic-mirroring-considerations.html">Network
/// Services</a> in the <i>Traffic Mirroring User Guide </i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyTrafficMirrorFilterNetworkServices service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyTrafficMirrorFilterNetworkServices service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyTrafficMirrorFilterNetworkServices">REST API Reference for ModifyTrafficMirrorFilterNetworkServices Operation</seealso>
public virtual Task<ModifyTrafficMirrorFilterNetworkServicesResponse> ModifyTrafficMirrorFilterNetworkServicesAsync(ModifyTrafficMirrorFilterNetworkServicesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyTrafficMirrorFilterNetworkServicesRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyTrafficMirrorFilterNetworkServicesResponseUnmarshaller.Instance;
return InvokeAsync<ModifyTrafficMirrorFilterNetworkServicesResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyTrafficMirrorFilterRule
internal virtual ModifyTrafficMirrorFilterRuleResponse ModifyTrafficMirrorFilterRule(ModifyTrafficMirrorFilterRuleRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyTrafficMirrorFilterRuleRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyTrafficMirrorFilterRuleResponseUnmarshaller.Instance;
return Invoke<ModifyTrafficMirrorFilterRuleResponse>(request, options);
}
/// <summary>
/// Modifies the specified Traffic Mirror rule.
///
///
/// <para>
/// <code>DestinationCidrBlock</code> and <code>SourceCidrBlock</code> must both be an
/// IPv4 range or an IPv6 range.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyTrafficMirrorFilterRule service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyTrafficMirrorFilterRule service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyTrafficMirrorFilterRule">REST API Reference for ModifyTrafficMirrorFilterRule Operation</seealso>
public virtual Task<ModifyTrafficMirrorFilterRuleResponse> ModifyTrafficMirrorFilterRuleAsync(ModifyTrafficMirrorFilterRuleRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyTrafficMirrorFilterRuleRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyTrafficMirrorFilterRuleResponseUnmarshaller.Instance;
return InvokeAsync<ModifyTrafficMirrorFilterRuleResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyTrafficMirrorSession
internal virtual ModifyTrafficMirrorSessionResponse ModifyTrafficMirrorSession(ModifyTrafficMirrorSessionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyTrafficMirrorSessionRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyTrafficMirrorSessionResponseUnmarshaller.Instance;
return Invoke<ModifyTrafficMirrorSessionResponse>(request, options);
}
/// <summary>
/// Modifies a Traffic Mirror session.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyTrafficMirrorSession service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyTrafficMirrorSession service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyTrafficMirrorSession">REST API Reference for ModifyTrafficMirrorSession Operation</seealso>
public virtual Task<ModifyTrafficMirrorSessionResponse> ModifyTrafficMirrorSessionAsync(ModifyTrafficMirrorSessionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyTrafficMirrorSessionRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyTrafficMirrorSessionResponseUnmarshaller.Instance;
return InvokeAsync<ModifyTrafficMirrorSessionResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyTransitGatewayVpcAttachment
internal virtual ModifyTransitGatewayVpcAttachmentResponse ModifyTransitGatewayVpcAttachment(ModifyTransitGatewayVpcAttachmentRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyTransitGatewayVpcAttachmentRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyTransitGatewayVpcAttachmentResponseUnmarshaller.Instance;
return Invoke<ModifyTransitGatewayVpcAttachmentResponse>(request, options);
}
/// <summary>
/// Modifies the specified VPC attachment.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyTransitGatewayVpcAttachment service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyTransitGatewayVpcAttachment service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyTransitGatewayVpcAttachment">REST API Reference for ModifyTransitGatewayVpcAttachment Operation</seealso>
public virtual Task<ModifyTransitGatewayVpcAttachmentResponse> ModifyTransitGatewayVpcAttachmentAsync(ModifyTransitGatewayVpcAttachmentRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyTransitGatewayVpcAttachmentRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyTransitGatewayVpcAttachmentResponseUnmarshaller.Instance;
return InvokeAsync<ModifyTransitGatewayVpcAttachmentResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyVolume
internal virtual ModifyVolumeResponse ModifyVolume(ModifyVolumeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyVolumeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyVolumeResponseUnmarshaller.Instance;
return Invoke<ModifyVolumeResponse>(request, options);
}
/// <summary>
/// You can modify several parameters of an existing EBS volume, including volume size,
/// volume type, and IOPS capacity. If your EBS volume is attached to a current-generation
/// EC2 instance type, you may be able to apply these changes without stopping the instance
/// or detaching the volume from it. For more information about modifying an EBS volume
/// running Linux, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html">Modifying
/// the Size, IOPS, or Type of an EBS Volume on Linux</a>. For more information about
/// modifying an EBS volume running Windows, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-expand-volume.html">Modifying
/// the Size, IOPS, or Type of an EBS Volume on Windows</a>.
///
///
/// <para>
/// When you complete a resize operation on your volume, you need to extend the volume's
/// file-system size to take advantage of the new storage capacity. For information about
/// extending a Linux file system, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#recognize-expanded-volume-linux">Extending
/// a Linux File System</a>. For information about extending a Windows file system, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-expand-volume.html#recognize-expanded-volume-windows">Extending
/// a Windows File System</a>.
/// </para>
///
/// <para>
/// You can use CloudWatch Events to check the status of a modification to an EBS volume.
/// For information about CloudWatch Events, see the <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/">Amazon
/// CloudWatch Events User Guide</a>. You can also track the status of a modification
/// using <a>DescribeVolumesModifications</a>. For information about tracking status changes
/// using either method, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#monitoring_mods">Monitoring
/// Volume Modifications</a>.
/// </para>
///
/// <para>
/// With previous-generation instance types, resizing an EBS volume may require detaching
/// and reattaching the volume or stopping and restarting the instance. For more information,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html">Modifying
/// the Size, IOPS, or Type of an EBS Volume on Linux</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-expand-volume.html">Modifying
/// the Size, IOPS, or Type of an EBS Volume on Windows</a>.
/// </para>
///
/// <para>
/// If you reach the maximum volume modification rate per volume limit, you will need
/// to wait at least six hours before applying further modifications to the affected EBS
/// volume.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyVolume service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyVolume service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolume">REST API Reference for ModifyVolume Operation</seealso>
public virtual Task<ModifyVolumeResponse> ModifyVolumeAsync(ModifyVolumeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyVolumeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyVolumeResponseUnmarshaller.Instance;
return InvokeAsync<ModifyVolumeResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyVolumeAttribute
internal virtual ModifyVolumeAttributeResponse ModifyVolumeAttribute(ModifyVolumeAttributeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyVolumeAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyVolumeAttributeResponseUnmarshaller.Instance;
return Invoke<ModifyVolumeAttributeResponse>(request, options);
}
/// <summary>
/// Modifies a volume attribute.
///
///
/// <para>
/// By default, all I/O operations for the volume are suspended when the data on the volume
/// is determined to be potentially inconsistent, to prevent undetectable, latent data
/// corruption. The I/O access to the volume can be resumed by first enabling I/O access
/// and then checking the data consistency on your volume.
/// </para>
///
/// <para>
/// You can change the default behavior to resume I/O operations. We recommend that you
/// change this only for boot volumes or for volumes that are stateless or disposable.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyVolumeAttribute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyVolumeAttribute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolumeAttribute">REST API Reference for ModifyVolumeAttribute Operation</seealso>
public virtual Task<ModifyVolumeAttributeResponse> ModifyVolumeAttributeAsync(ModifyVolumeAttributeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyVolumeAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyVolumeAttributeResponseUnmarshaller.Instance;
return InvokeAsync<ModifyVolumeAttributeResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyVpcAttribute
internal virtual ModifyVpcAttributeResponse ModifyVpcAttribute(ModifyVpcAttributeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyVpcAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyVpcAttributeResponseUnmarshaller.Instance;
return Invoke<ModifyVpcAttributeResponse>(request, options);
}
/// <summary>
/// Modifies the specified attribute of the specified VPC.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyVpcAttribute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyVpcAttribute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcAttribute">REST API Reference for ModifyVpcAttribute Operation</seealso>
public virtual Task<ModifyVpcAttributeResponse> ModifyVpcAttributeAsync(ModifyVpcAttributeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyVpcAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyVpcAttributeResponseUnmarshaller.Instance;
return InvokeAsync<ModifyVpcAttributeResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyVpcEndpoint
internal virtual ModifyVpcEndpointResponse ModifyVpcEndpoint(ModifyVpcEndpointRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyVpcEndpointRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyVpcEndpointResponseUnmarshaller.Instance;
return Invoke<ModifyVpcEndpointResponse>(request, options);
}
/// <summary>
/// Modifies attributes of a specified VPC endpoint. The attributes that you can modify
/// depend on the type of VPC endpoint (interface or gateway). For more information, see
/// <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints.html">VPC
/// Endpoints</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyVpcEndpoint service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyVpcEndpoint service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpoint">REST API Reference for ModifyVpcEndpoint Operation</seealso>
public virtual Task<ModifyVpcEndpointResponse> ModifyVpcEndpointAsync(ModifyVpcEndpointRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyVpcEndpointRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyVpcEndpointResponseUnmarshaller.Instance;
return InvokeAsync<ModifyVpcEndpointResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyVpcEndpointConnectionNotification
internal virtual ModifyVpcEndpointConnectionNotificationResponse ModifyVpcEndpointConnectionNotification(ModifyVpcEndpointConnectionNotificationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyVpcEndpointConnectionNotificationRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyVpcEndpointConnectionNotificationResponseUnmarshaller.Instance;
return Invoke<ModifyVpcEndpointConnectionNotificationResponse>(request, options);
}
/// <summary>
/// Modifies a connection notification for VPC endpoint or VPC endpoint service. You can
/// change the SNS topic for the notification, or the events for which to be notified.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyVpcEndpointConnectionNotification service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyVpcEndpointConnectionNotification service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpointConnectionNotification">REST API Reference for ModifyVpcEndpointConnectionNotification Operation</seealso>
public virtual Task<ModifyVpcEndpointConnectionNotificationResponse> ModifyVpcEndpointConnectionNotificationAsync(ModifyVpcEndpointConnectionNotificationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyVpcEndpointConnectionNotificationRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyVpcEndpointConnectionNotificationResponseUnmarshaller.Instance;
return InvokeAsync<ModifyVpcEndpointConnectionNotificationResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyVpcEndpointServiceConfiguration
internal virtual ModifyVpcEndpointServiceConfigurationResponse ModifyVpcEndpointServiceConfiguration(ModifyVpcEndpointServiceConfigurationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyVpcEndpointServiceConfigurationRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyVpcEndpointServiceConfigurationResponseUnmarshaller.Instance;
return Invoke<ModifyVpcEndpointServiceConfigurationResponse>(request, options);
}
/// <summary>
/// Modifies the attributes of your VPC endpoint service configuration. You can change
/// the Network Load Balancers for your service, and you can specify whether acceptance
/// is required for requests to connect to your endpoint service through an interface
/// VPC endpoint.
///
///
/// <para>
/// If you set or modify the private DNS name, you must prove that you own the private
/// DNS domain name. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-services-dns-validation.html">VPC
/// Endpoint Service Private DNS Name Verification</a> in the <i>Amazon Virtual Private
/// Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyVpcEndpointServiceConfiguration service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyVpcEndpointServiceConfiguration service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpointServiceConfiguration">REST API Reference for ModifyVpcEndpointServiceConfiguration Operation</seealso>
public virtual Task<ModifyVpcEndpointServiceConfigurationResponse> ModifyVpcEndpointServiceConfigurationAsync(ModifyVpcEndpointServiceConfigurationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyVpcEndpointServiceConfigurationRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyVpcEndpointServiceConfigurationResponseUnmarshaller.Instance;
return InvokeAsync<ModifyVpcEndpointServiceConfigurationResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyVpcEndpointServicePermissions
internal virtual ModifyVpcEndpointServicePermissionsResponse ModifyVpcEndpointServicePermissions(ModifyVpcEndpointServicePermissionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyVpcEndpointServicePermissionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyVpcEndpointServicePermissionsResponseUnmarshaller.Instance;
return Invoke<ModifyVpcEndpointServicePermissionsResponse>(request, options);
}
/// <summary>
/// Modifies the permissions for your <a href="https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-service.html">VPC
/// endpoint service</a>. You can add or remove permissions for service consumers (IAM
/// users, IAM roles, and AWS accounts) to connect to your endpoint service.
///
///
/// <para>
/// If you grant permissions to all principals, the service is public. Any users who know
/// the name of a public service can send a request to attach an endpoint. If the service
/// does not require manual approval, attachments are automatically approved.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyVpcEndpointServicePermissions service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyVpcEndpointServicePermissions service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpointServicePermissions">REST API Reference for ModifyVpcEndpointServicePermissions Operation</seealso>
public virtual Task<ModifyVpcEndpointServicePermissionsResponse> ModifyVpcEndpointServicePermissionsAsync(ModifyVpcEndpointServicePermissionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyVpcEndpointServicePermissionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyVpcEndpointServicePermissionsResponseUnmarshaller.Instance;
return InvokeAsync<ModifyVpcEndpointServicePermissionsResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyVpcPeeringConnectionOptions
internal virtual ModifyVpcPeeringConnectionOptionsResponse ModifyVpcPeeringConnectionOptions(ModifyVpcPeeringConnectionOptionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyVpcPeeringConnectionOptionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyVpcPeeringConnectionOptionsResponseUnmarshaller.Instance;
return Invoke<ModifyVpcPeeringConnectionOptionsResponse>(request, options);
}
/// <summary>
/// Modifies the VPC peering connection options on one side of a VPC peering connection.
/// You can do the following:
///
/// <ul> <li>
/// <para>
/// Enable/disable communication over the peering connection between an EC2-Classic instance
/// that's linked to your VPC (using ClassicLink) and instances in the peer VPC.
/// </para>
/// </li> <li>
/// <para>
/// Enable/disable communication over the peering connection between instances in your
/// VPC and an EC2-Classic instance that's linked to the peer VPC.
/// </para>
/// </li> <li>
/// <para>
/// Enable/disable the ability to resolve public DNS hostnames to private IP addresses
/// when queried from instances in the peer VPC.
/// </para>
/// </li> </ul>
/// <para>
/// If the peered VPCs are in the same AWS account, you can enable DNS resolution for
/// queries from the local VPC. This ensures that queries from the local VPC resolve to
/// private IP addresses in the peer VPC. This option is not available if the peered VPCs
/// are in different AWS accounts or different Regions. For peered VPCs in different AWS
/// accounts, each AWS account owner must initiate a separate request to modify the peering
/// connection options. For inter-region peering connections, you must use the Region
/// for the requester VPC to modify the requester VPC peering options and the Region for
/// the accepter VPC to modify the accepter VPC peering options. To verify which VPCs
/// are the accepter and the requester for a VPC peering connection, use the <a>DescribeVpcPeeringConnections</a>
/// command.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyVpcPeeringConnectionOptions service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyVpcPeeringConnectionOptions service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcPeeringConnectionOptions">REST API Reference for ModifyVpcPeeringConnectionOptions Operation</seealso>
public virtual Task<ModifyVpcPeeringConnectionOptionsResponse> ModifyVpcPeeringConnectionOptionsAsync(ModifyVpcPeeringConnectionOptionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyVpcPeeringConnectionOptionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyVpcPeeringConnectionOptionsResponseUnmarshaller.Instance;
return InvokeAsync<ModifyVpcPeeringConnectionOptionsResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyVpcTenancy
internal virtual ModifyVpcTenancyResponse ModifyVpcTenancy(ModifyVpcTenancyRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyVpcTenancyRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyVpcTenancyResponseUnmarshaller.Instance;
return Invoke<ModifyVpcTenancyResponse>(request, options);
}
/// <summary>
/// Modifies the instance tenancy attribute of the specified VPC. You can change the instance
/// tenancy attribute of a VPC to <code>default</code> only. You cannot change the instance
/// tenancy attribute to <code>dedicated</code>.
///
///
/// <para>
/// After you modify the tenancy of the VPC, any new instances that you launch into the
/// VPC have a tenancy of <code>default</code>, unless you specify otherwise during launch.
/// The tenancy of any existing instances in the VPC is not affected.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html">Dedicated
/// Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyVpcTenancy service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyVpcTenancy service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcTenancy">REST API Reference for ModifyVpcTenancy Operation</seealso>
public virtual Task<ModifyVpcTenancyResponse> ModifyVpcTenancyAsync(ModifyVpcTenancyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyVpcTenancyRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyVpcTenancyResponseUnmarshaller.Instance;
return InvokeAsync<ModifyVpcTenancyResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyVpnConnection
internal virtual ModifyVpnConnectionResponse ModifyVpnConnection(ModifyVpnConnectionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyVpnConnectionRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyVpnConnectionResponseUnmarshaller.Instance;
return Invoke<ModifyVpnConnectionResponse>(request, options);
}
/// <summary>
/// Modifies the customer gateway or the target gateway of an AWS Site-to-Site VPN connection.
/// To modify the target gateway, the following migration options are available:
///
/// <ul> <li>
/// <para>
/// An existing virtual private gateway to a new virtual private gateway
/// </para>
/// </li> <li>
/// <para>
/// An existing virtual private gateway to a transit gateway
/// </para>
/// </li> <li>
/// <para>
/// An existing transit gateway to a new transit gateway
/// </para>
/// </li> <li>
/// <para>
/// An existing transit gateway to a virtual private gateway
/// </para>
/// </li> </ul>
/// <para>
/// Before you perform the migration to the new gateway, you must configure the new gateway.
/// Use <a>CreateVpnGateway</a> to create a virtual private gateway, or <a>CreateTransitGateway</a>
/// to create a transit gateway.
/// </para>
///
/// <para>
/// This step is required when you migrate from a virtual private gateway with static
/// routes to a transit gateway.
/// </para>
///
/// <para>
/// You must delete the static routes before you migrate to the new gateway.
/// </para>
///
/// <para>
/// Keep a copy of the static route before you delete it. You will need to add back these
/// routes to the transit gateway after the VPN connection migration is complete.
/// </para>
///
/// <para>
/// After you migrate to the new gateway, you might need to modify your VPC route table.
/// Use <a>CreateRoute</a> and <a>DeleteRoute</a> to make the changes described in <a
/// href="https://docs.aws.amazon.com/vpn/latest/s2svpn/modify-vpn-target.html#step-update-routing">VPN
/// Gateway Target Modification Required VPC Route Table Updates</a> in the <i>AWS Site-to-Site
/// VPN User Guide</i>.
/// </para>
///
/// <para>
/// When the new gateway is a transit gateway, modify the transit gateway route table
/// to allow traffic between the VPC and the AWS Site-to-Site VPN connection. Use <a>CreateTransitGatewayRoute</a>
/// to add the routes.
/// </para>
///
/// <para>
/// If you deleted VPN static routes, you must add the static routes to the transit gateway
/// route table.
/// </para>
///
/// <para>
/// After you perform this operation, the AWS VPN endpoint's IP addresses on the AWS side
/// and the tunnel options remain intact. Your AWS Site-to-Site VPN connection will be
/// temporarily unavailable for a brief period while we provision the new endpoints.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyVpnConnection service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyVpnConnection service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpnConnection">REST API Reference for ModifyVpnConnection Operation</seealso>
public virtual Task<ModifyVpnConnectionResponse> ModifyVpnConnectionAsync(ModifyVpnConnectionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyVpnConnectionRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyVpnConnectionResponseUnmarshaller.Instance;
return InvokeAsync<ModifyVpnConnectionResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyVpnTunnelCertificate
internal virtual ModifyVpnTunnelCertificateResponse ModifyVpnTunnelCertificate(ModifyVpnTunnelCertificateRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyVpnTunnelCertificateRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyVpnTunnelCertificateResponseUnmarshaller.Instance;
return Invoke<ModifyVpnTunnelCertificateResponse>(request, options);
}
/// <summary>
/// Modifies the VPN tunnel endpoint certificate.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyVpnTunnelCertificate service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyVpnTunnelCertificate service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpnTunnelCertificate">REST API Reference for ModifyVpnTunnelCertificate Operation</seealso>
public virtual Task<ModifyVpnTunnelCertificateResponse> ModifyVpnTunnelCertificateAsync(ModifyVpnTunnelCertificateRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyVpnTunnelCertificateRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyVpnTunnelCertificateResponseUnmarshaller.Instance;
return InvokeAsync<ModifyVpnTunnelCertificateResponse>(request, options, cancellationToken);
}
#endregion
#region ModifyVpnTunnelOptions
internal virtual ModifyVpnTunnelOptionsResponse ModifyVpnTunnelOptions(ModifyVpnTunnelOptionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyVpnTunnelOptionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyVpnTunnelOptionsResponseUnmarshaller.Instance;
return Invoke<ModifyVpnTunnelOptionsResponse>(request, options);
}
/// <summary>
/// Modifies the options for a VPN tunnel in an AWS Site-to-Site VPN connection. You can
/// modify multiple options for a tunnel in a single request, but you can only modify
/// one tunnel at a time. For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/s2svpn/VPNTunnels.html">Site-to-Site
/// VPN Tunnel Options for Your Site-to-Site VPN Connection</a> in the <i>AWS Site-to-Site
/// VPN User Guide</i>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ModifyVpnTunnelOptions service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ModifyVpnTunnelOptions service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpnTunnelOptions">REST API Reference for ModifyVpnTunnelOptions Operation</seealso>
public virtual Task<ModifyVpnTunnelOptionsResponse> ModifyVpnTunnelOptionsAsync(ModifyVpnTunnelOptionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ModifyVpnTunnelOptionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ModifyVpnTunnelOptionsResponseUnmarshaller.Instance;
return InvokeAsync<ModifyVpnTunnelOptionsResponse>(request, options, cancellationToken);
}
#endregion
#region MonitorInstances
internal virtual MonitorInstancesResponse MonitorInstances(MonitorInstancesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = MonitorInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = MonitorInstancesResponseUnmarshaller.Instance;
return Invoke<MonitorInstancesResponse>(request, options);
}
/// <summary>
/// Enables detailed monitoring for a running instance. Otherwise, basic monitoring is
/// enabled. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html">Monitoring
/// Your Instances and Volumes</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
///
///
/// <para>
/// To disable detailed monitoring, see .
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the MonitorInstances service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the MonitorInstances service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MonitorInstances">REST API Reference for MonitorInstances Operation</seealso>
public virtual Task<MonitorInstancesResponse> MonitorInstancesAsync(MonitorInstancesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = MonitorInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = MonitorInstancesResponseUnmarshaller.Instance;
return InvokeAsync<MonitorInstancesResponse>(request, options, cancellationToken);
}
#endregion
#region MoveAddressToVpc
internal virtual MoveAddressToVpcResponse MoveAddressToVpc(MoveAddressToVpcRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = MoveAddressToVpcRequestMarshaller.Instance;
options.ResponseUnmarshaller = MoveAddressToVpcResponseUnmarshaller.Instance;
return Invoke<MoveAddressToVpcResponse>(request, options);
}
/// <summary>
/// Moves an Elastic IP address from the EC2-Classic platform to the EC2-VPC platform.
/// The Elastic IP address must be allocated to your account for more than 24 hours, and
/// it must not be associated with an instance. After the Elastic IP address is moved,
/// it is no longer available for use in the EC2-Classic platform, unless you move it
/// back using the <a>RestoreAddressToClassic</a> request. You cannot move an Elastic
/// IP address that was originally allocated for use in the EC2-VPC platform to the EC2-Classic
/// platform.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the MoveAddressToVpc service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the MoveAddressToVpc service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MoveAddressToVpc">REST API Reference for MoveAddressToVpc Operation</seealso>
public virtual Task<MoveAddressToVpcResponse> MoveAddressToVpcAsync(MoveAddressToVpcRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = MoveAddressToVpcRequestMarshaller.Instance;
options.ResponseUnmarshaller = MoveAddressToVpcResponseUnmarshaller.Instance;
return InvokeAsync<MoveAddressToVpcResponse>(request, options, cancellationToken);
}
#endregion
#region ProvisionByoipCidr
internal virtual ProvisionByoipCidrResponse ProvisionByoipCidr(ProvisionByoipCidrRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ProvisionByoipCidrRequestMarshaller.Instance;
options.ResponseUnmarshaller = ProvisionByoipCidrResponseUnmarshaller.Instance;
return Invoke<ProvisionByoipCidrResponse>(request, options);
}
/// <summary>
/// Provisions an IPv4 or IPv6 address range for use with your AWS resources through bring
/// your own IP addresses (BYOIP) and creates a corresponding address pool. After the
/// address range is provisioned, it is ready to be advertised using <a>AdvertiseByoipCidr</a>.
///
///
/// <para>
/// AWS verifies that you own the address range and are authorized to advertise it. You
/// must ensure that the address range is registered to you and that you created an RPKI
/// ROA to authorize Amazon ASNs 16509 and 14618 to advertise the address range. For more
/// information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html">Bring
/// Your Own IP Addresses (BYOIP)</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
///
/// <para>
/// Provisioning an address range is an asynchronous operation, so the call returns immediately,
/// but the address range is not ready to use until its status changes from <code>pending-provision</code>
/// to <code>provisioned</code>. To monitor the status of an address range, use <a>DescribeByoipCidrs</a>.
/// To allocate an Elastic IP address from your IPv4 address pool, use <a>AllocateAddress</a>
/// with either the specific address from the address pool or the ID of the address pool.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ProvisionByoipCidr service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ProvisionByoipCidr service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ProvisionByoipCidr">REST API Reference for ProvisionByoipCidr Operation</seealso>
public virtual Task<ProvisionByoipCidrResponse> ProvisionByoipCidrAsync(ProvisionByoipCidrRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ProvisionByoipCidrRequestMarshaller.Instance;
options.ResponseUnmarshaller = ProvisionByoipCidrResponseUnmarshaller.Instance;
return InvokeAsync<ProvisionByoipCidrResponse>(request, options, cancellationToken);
}
#endregion
#region PurchaseHostReservation
internal virtual PurchaseHostReservationResponse PurchaseHostReservation(PurchaseHostReservationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PurchaseHostReservationRequestMarshaller.Instance;
options.ResponseUnmarshaller = PurchaseHostReservationResponseUnmarshaller.Instance;
return Invoke<PurchaseHostReservationResponse>(request, options);
}
/// <summary>
/// Purchase a reservation with configurations that match those of your Dedicated Host.
/// You must have active Dedicated Hosts in your account before you purchase a reservation.
/// This action results in the specified reservation being purchased and charged to your
/// account.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PurchaseHostReservation service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the PurchaseHostReservation service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseHostReservation">REST API Reference for PurchaseHostReservation Operation</seealso>
public virtual Task<PurchaseHostReservationResponse> PurchaseHostReservationAsync(PurchaseHostReservationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = PurchaseHostReservationRequestMarshaller.Instance;
options.ResponseUnmarshaller = PurchaseHostReservationResponseUnmarshaller.Instance;
return InvokeAsync<PurchaseHostReservationResponse>(request, options, cancellationToken);
}
#endregion
#region PurchaseReservedInstancesOffering
internal virtual PurchaseReservedInstancesOfferingResponse PurchaseReservedInstancesOffering(PurchaseReservedInstancesOfferingRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PurchaseReservedInstancesOfferingRequestMarshaller.Instance;
options.ResponseUnmarshaller = PurchaseReservedInstancesOfferingResponseUnmarshaller.Instance;
return Invoke<PurchaseReservedInstancesOfferingResponse>(request, options);
}
/// <summary>
/// Purchases a Reserved Instance for use with your account. With Reserved Instances,
/// you pay a lower hourly rate compared to On-Demand instance pricing.
///
///
/// <para>
/// Use <a>DescribeReservedInstancesOfferings</a> to get a list of Reserved Instance offerings
/// that match your specifications. After you've purchased a Reserved Instance, you can
/// check for your new Reserved Instance with <a>DescribeReservedInstances</a>.
/// </para>
///
/// <para>
/// To queue a purchase for a future date and time, specify a purchase time. If you do
/// not specify a purchase time, the default is the current time.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-on-demand-reserved-instances.html">Reserved
/// Instances</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html">Reserved
/// Instance Marketplace</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PurchaseReservedInstancesOffering service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the PurchaseReservedInstancesOffering service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseReservedInstancesOffering">REST API Reference for PurchaseReservedInstancesOffering Operation</seealso>
public virtual Task<PurchaseReservedInstancesOfferingResponse> PurchaseReservedInstancesOfferingAsync(PurchaseReservedInstancesOfferingRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = PurchaseReservedInstancesOfferingRequestMarshaller.Instance;
options.ResponseUnmarshaller = PurchaseReservedInstancesOfferingResponseUnmarshaller.Instance;
return InvokeAsync<PurchaseReservedInstancesOfferingResponse>(request, options, cancellationToken);
}
#endregion
#region PurchaseScheduledInstances
internal virtual PurchaseScheduledInstancesResponse PurchaseScheduledInstances(PurchaseScheduledInstancesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PurchaseScheduledInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = PurchaseScheduledInstancesResponseUnmarshaller.Instance;
return Invoke<PurchaseScheduledInstancesResponse>(request, options);
}
/// <summary>
/// Purchases the Scheduled Instances with the specified schedule.
///
///
/// <para>
/// Scheduled Instances enable you to purchase Amazon EC2 compute capacity by the hour
/// for a one-year term. Before you can purchase a Scheduled Instance, you must call <a>DescribeScheduledInstanceAvailability</a>
/// to check for available schedules and obtain a purchase token. After you purchase a
/// Scheduled Instance, you must call <a>RunScheduledInstances</a> during each scheduled
/// time period.
/// </para>
///
/// <para>
/// After you purchase a Scheduled Instance, you can't cancel, modify, or resell your
/// purchase.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the PurchaseScheduledInstances service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the PurchaseScheduledInstances service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseScheduledInstances">REST API Reference for PurchaseScheduledInstances Operation</seealso>
public virtual Task<PurchaseScheduledInstancesResponse> PurchaseScheduledInstancesAsync(PurchaseScheduledInstancesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = PurchaseScheduledInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = PurchaseScheduledInstancesResponseUnmarshaller.Instance;
return InvokeAsync<PurchaseScheduledInstancesResponse>(request, options, cancellationToken);
}
#endregion
#region RebootInstances
internal virtual RebootInstancesResponse RebootInstances(RebootInstancesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RebootInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = RebootInstancesResponseUnmarshaller.Instance;
return Invoke<RebootInstancesResponse>(request, options);
}
/// <summary>
/// Requests a reboot of the specified instances. This operation is asynchronous; it only
/// queues a request to reboot the specified instances. The operation succeeds if the
/// instances are valid and belong to you. Requests to reboot terminated instances are
/// ignored.
///
///
/// <para>
/// If an instance does not cleanly shut down within four minutes, Amazon EC2 performs
/// a hard reboot.
/// </para>
///
/// <para>
/// For more information about troubleshooting, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html">Getting
/// Console Output and Rebooting Instances</a> in the <i>Amazon Elastic Compute Cloud
/// User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RebootInstances service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RebootInstances service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RebootInstances">REST API Reference for RebootInstances Operation</seealso>
public virtual Task<RebootInstancesResponse> RebootInstancesAsync(RebootInstancesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RebootInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = RebootInstancesResponseUnmarshaller.Instance;
return InvokeAsync<RebootInstancesResponse>(request, options, cancellationToken);
}
#endregion
#region RegisterImage
internal virtual RegisterImageResponse RegisterImage(RegisterImageRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RegisterImageRequestMarshaller.Instance;
options.ResponseUnmarshaller = RegisterImageResponseUnmarshaller.Instance;
return Invoke<RegisterImageResponse>(request, options);
}
/// <summary>
/// Registers an AMI. When you're creating an AMI, this is the final step you must complete
/// before you can launch an instance from the AMI. For more information about creating
/// AMIs, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami.html">Creating
/// Your Own AMIs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
///
/// <note>
/// <para>
/// For Amazon EBS-backed instances, <a>CreateImage</a> creates and registers the AMI
/// in a single request, so you don't have to register the AMI yourself.
/// </para>
/// </note>
/// <para>
/// You can also use <code>RegisterImage</code> to create an Amazon EBS-backed Linux AMI
/// from a snapshot of a root device volume. You specify the snapshot using the block
/// device mapping. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-launch-snapshot.html">Launching
/// a Linux Instance from a Backup</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
///
/// <para>
/// You can't register an image where a secondary (non-root) snapshot has AWS Marketplace
/// product codes.
/// </para>
///
/// <para>
/// Windows and some Linux distributions, such as Red Hat Enterprise Linux (RHEL) and
/// SUSE Linux Enterprise Server (SLES), use the EC2 billing product code associated with
/// an AMI to verify the subscription status for package updates. To create a new AMI
/// for operating systems that require a billing product code, instead of registering
/// the AMI, do the following to preserve the billing product code association:
/// </para>
/// <ol> <li>
/// <para>
/// Launch an instance from an existing AMI with that billing product code.
/// </para>
/// </li> <li>
/// <para>
/// Customize the instance.
/// </para>
/// </li> <li>
/// <para>
/// Create an AMI from the instance using <a>CreateImage</a>.
/// </para>
/// </li> </ol>
/// <para>
/// If you purchase a Reserved Instance to apply to an On-Demand Instance that was launched
/// from an AMI with a billing product code, make sure that the Reserved Instance has
/// the matching billing product code. If you purchase a Reserved Instance without the
/// matching billing product code, the Reserved Instance will not be applied to the On-Demand
/// Instance. For information about how to obtain the platform details and billing information
/// of an AMI, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-billing-info.html">Obtaining
/// Billing Information</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
///
/// <para>
/// If needed, you can deregister an AMI at any time. Any modifications you make to an
/// AMI backed by an instance store volume invalidates its registration. If you make changes
/// to an image, deregister the previous image and register the new image.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RegisterImage service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RegisterImage service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RegisterImage">REST API Reference for RegisterImage Operation</seealso>
public virtual Task<RegisterImageResponse> RegisterImageAsync(RegisterImageRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RegisterImageRequestMarshaller.Instance;
options.ResponseUnmarshaller = RegisterImageResponseUnmarshaller.Instance;
return InvokeAsync<RegisterImageResponse>(request, options, cancellationToken);
}
#endregion
#region RegisterInstanceEventNotificationAttributes
internal virtual RegisterInstanceEventNotificationAttributesResponse RegisterInstanceEventNotificationAttributes(RegisterInstanceEventNotificationAttributesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RegisterInstanceEventNotificationAttributesRequestMarshaller.Instance;
options.ResponseUnmarshaller = RegisterInstanceEventNotificationAttributesResponseUnmarshaller.Instance;
return Invoke<RegisterInstanceEventNotificationAttributesResponse>(request, options);
}
/// <summary>
/// Registers a set of tag keys to include in scheduled event notifications for your resources.
///
///
///
/// <para>
/// To remove tags, use .
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RegisterInstanceEventNotificationAttributes service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RegisterInstanceEventNotificationAttributes service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RegisterInstanceEventNotificationAttributes">REST API Reference for RegisterInstanceEventNotificationAttributes Operation</seealso>
public virtual Task<RegisterInstanceEventNotificationAttributesResponse> RegisterInstanceEventNotificationAttributesAsync(RegisterInstanceEventNotificationAttributesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RegisterInstanceEventNotificationAttributesRequestMarshaller.Instance;
options.ResponseUnmarshaller = RegisterInstanceEventNotificationAttributesResponseUnmarshaller.Instance;
return InvokeAsync<RegisterInstanceEventNotificationAttributesResponse>(request, options, cancellationToken);
}
#endregion
#region RegisterTransitGatewayMulticastGroupMembers
internal virtual RegisterTransitGatewayMulticastGroupMembersResponse RegisterTransitGatewayMulticastGroupMembers(RegisterTransitGatewayMulticastGroupMembersRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RegisterTransitGatewayMulticastGroupMembersRequestMarshaller.Instance;
options.ResponseUnmarshaller = RegisterTransitGatewayMulticastGroupMembersResponseUnmarshaller.Instance;
return Invoke<RegisterTransitGatewayMulticastGroupMembersResponse>(request, options);
}
/// <summary>
/// Registers members (network interfaces) with the transit gateway multicast group. A
/// member is a network interface associated with a supported EC2 instance that receives
/// multicast traffic. For information about supported instances, see <a href="https://docs.aws.amazon.com/vpc/latest/tgw/transit-gateway-limits.html#multicast-limits">Multicast
/// Consideration</a> in <i>Amazon VPC Transit Gateways</i>.
///
///
/// <para>
/// After you add the members, use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SearchTransitGatewayMulticastGroups.html">SearchTransitGatewayMulticastGroups</a>
/// to verify that the members were added to the transit gateway multicast group.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RegisterTransitGatewayMulticastGroupMembers service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RegisterTransitGatewayMulticastGroupMembers service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RegisterTransitGatewayMulticastGroupMembers">REST API Reference for RegisterTransitGatewayMulticastGroupMembers Operation</seealso>
public virtual Task<RegisterTransitGatewayMulticastGroupMembersResponse> RegisterTransitGatewayMulticastGroupMembersAsync(RegisterTransitGatewayMulticastGroupMembersRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RegisterTransitGatewayMulticastGroupMembersRequestMarshaller.Instance;
options.ResponseUnmarshaller = RegisterTransitGatewayMulticastGroupMembersResponseUnmarshaller.Instance;
return InvokeAsync<RegisterTransitGatewayMulticastGroupMembersResponse>(request, options, cancellationToken);
}
#endregion
#region RegisterTransitGatewayMulticastGroupSources
internal virtual RegisterTransitGatewayMulticastGroupSourcesResponse RegisterTransitGatewayMulticastGroupSources(RegisterTransitGatewayMulticastGroupSourcesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RegisterTransitGatewayMulticastGroupSourcesRequestMarshaller.Instance;
options.ResponseUnmarshaller = RegisterTransitGatewayMulticastGroupSourcesResponseUnmarshaller.Instance;
return Invoke<RegisterTransitGatewayMulticastGroupSourcesResponse>(request, options);
}
/// <summary>
/// Registers sources (network interfaces) with the specified transit gateway multicast
/// group.
///
///
/// <para>
/// A multicast source is a network interface attached to a supported instance that sends
/// multicast traffic. For information about supported instances, see <a href="https://docs.aws.amazon.com/vpc/latest/tgw/transit-gateway-limits.html#multicast-limits">Multicast
/// Considerations</a> in <i>Amazon VPC Transit Gateways</i>.
/// </para>
///
/// <para>
/// After you add the source, use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SearchTransitGatewayMulticastGroups.html">SearchTransitGatewayMulticastGroups</a>
/// to verify that the source was added to the multicast group.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RegisterTransitGatewayMulticastGroupSources service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RegisterTransitGatewayMulticastGroupSources service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RegisterTransitGatewayMulticastGroupSources">REST API Reference for RegisterTransitGatewayMulticastGroupSources Operation</seealso>
public virtual Task<RegisterTransitGatewayMulticastGroupSourcesResponse> RegisterTransitGatewayMulticastGroupSourcesAsync(RegisterTransitGatewayMulticastGroupSourcesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RegisterTransitGatewayMulticastGroupSourcesRequestMarshaller.Instance;
options.ResponseUnmarshaller = RegisterTransitGatewayMulticastGroupSourcesResponseUnmarshaller.Instance;
return InvokeAsync<RegisterTransitGatewayMulticastGroupSourcesResponse>(request, options, cancellationToken);
}
#endregion
#region RejectTransitGatewayPeeringAttachment
internal virtual RejectTransitGatewayPeeringAttachmentResponse RejectTransitGatewayPeeringAttachment(RejectTransitGatewayPeeringAttachmentRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RejectTransitGatewayPeeringAttachmentRequestMarshaller.Instance;
options.ResponseUnmarshaller = RejectTransitGatewayPeeringAttachmentResponseUnmarshaller.Instance;
return Invoke<RejectTransitGatewayPeeringAttachmentResponse>(request, options);
}
/// <summary>
/// Rejects a transit gateway peering attachment request.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RejectTransitGatewayPeeringAttachment service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RejectTransitGatewayPeeringAttachment service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectTransitGatewayPeeringAttachment">REST API Reference for RejectTransitGatewayPeeringAttachment Operation</seealso>
public virtual Task<RejectTransitGatewayPeeringAttachmentResponse> RejectTransitGatewayPeeringAttachmentAsync(RejectTransitGatewayPeeringAttachmentRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RejectTransitGatewayPeeringAttachmentRequestMarshaller.Instance;
options.ResponseUnmarshaller = RejectTransitGatewayPeeringAttachmentResponseUnmarshaller.Instance;
return InvokeAsync<RejectTransitGatewayPeeringAttachmentResponse>(request, options, cancellationToken);
}
#endregion
#region RejectTransitGatewayVpcAttachment
internal virtual RejectTransitGatewayVpcAttachmentResponse RejectTransitGatewayVpcAttachment(RejectTransitGatewayVpcAttachmentRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RejectTransitGatewayVpcAttachmentRequestMarshaller.Instance;
options.ResponseUnmarshaller = RejectTransitGatewayVpcAttachmentResponseUnmarshaller.Instance;
return Invoke<RejectTransitGatewayVpcAttachmentResponse>(request, options);
}
/// <summary>
/// Rejects a request to attach a VPC to a transit gateway.
///
///
/// <para>
/// The VPC attachment must be in the <code>pendingAcceptance</code> state. Use <a>DescribeTransitGatewayVpcAttachments</a>
/// to view your pending VPC attachment requests. Use <a>AcceptTransitGatewayVpcAttachment</a>
/// to accept a VPC attachment request.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RejectTransitGatewayVpcAttachment service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RejectTransitGatewayVpcAttachment service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectTransitGatewayVpcAttachment">REST API Reference for RejectTransitGatewayVpcAttachment Operation</seealso>
public virtual Task<RejectTransitGatewayVpcAttachmentResponse> RejectTransitGatewayVpcAttachmentAsync(RejectTransitGatewayVpcAttachmentRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RejectTransitGatewayVpcAttachmentRequestMarshaller.Instance;
options.ResponseUnmarshaller = RejectTransitGatewayVpcAttachmentResponseUnmarshaller.Instance;
return InvokeAsync<RejectTransitGatewayVpcAttachmentResponse>(request, options, cancellationToken);
}
#endregion
#region RejectVpcEndpointConnections
internal virtual RejectVpcEndpointConnectionsResponse RejectVpcEndpointConnections(RejectVpcEndpointConnectionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RejectVpcEndpointConnectionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = RejectVpcEndpointConnectionsResponseUnmarshaller.Instance;
return Invoke<RejectVpcEndpointConnectionsResponse>(request, options);
}
/// <summary>
/// Rejects one or more VPC endpoint connection requests to your VPC endpoint service.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RejectVpcEndpointConnections service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RejectVpcEndpointConnections service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectVpcEndpointConnections">REST API Reference for RejectVpcEndpointConnections Operation</seealso>
public virtual Task<RejectVpcEndpointConnectionsResponse> RejectVpcEndpointConnectionsAsync(RejectVpcEndpointConnectionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RejectVpcEndpointConnectionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = RejectVpcEndpointConnectionsResponseUnmarshaller.Instance;
return InvokeAsync<RejectVpcEndpointConnectionsResponse>(request, options, cancellationToken);
}
#endregion
#region RejectVpcPeeringConnection
internal virtual RejectVpcPeeringConnectionResponse RejectVpcPeeringConnection(RejectVpcPeeringConnectionRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RejectVpcPeeringConnectionRequestMarshaller.Instance;
options.ResponseUnmarshaller = RejectVpcPeeringConnectionResponseUnmarshaller.Instance;
return Invoke<RejectVpcPeeringConnectionResponse>(request, options);
}
/// <summary>
/// Rejects a VPC peering connection request. The VPC peering connection must be in the
/// <code>pending-acceptance</code> state. Use the <a>DescribeVpcPeeringConnections</a>
/// request to view your outstanding VPC peering connection requests. To delete an active
/// VPC peering connection, or to delete a VPC peering connection request that you initiated,
/// use <a>DeleteVpcPeeringConnection</a>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RejectVpcPeeringConnection service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RejectVpcPeeringConnection service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectVpcPeeringConnection">REST API Reference for RejectVpcPeeringConnection Operation</seealso>
public virtual Task<RejectVpcPeeringConnectionResponse> RejectVpcPeeringConnectionAsync(RejectVpcPeeringConnectionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RejectVpcPeeringConnectionRequestMarshaller.Instance;
options.ResponseUnmarshaller = RejectVpcPeeringConnectionResponseUnmarshaller.Instance;
return InvokeAsync<RejectVpcPeeringConnectionResponse>(request, options, cancellationToken);
}
#endregion
#region ReleaseAddress
internal virtual ReleaseAddressResponse ReleaseAddress(ReleaseAddressRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ReleaseAddressRequestMarshaller.Instance;
options.ResponseUnmarshaller = ReleaseAddressResponseUnmarshaller.Instance;
return Invoke<ReleaseAddressResponse>(request, options);
}
/// <summary>
/// Releases the specified Elastic IP address.
///
///
/// <para>
/// [EC2-Classic, default VPC] Releasing an Elastic IP address automatically disassociates
/// it from any instance that it's associated with. To disassociate an Elastic IP address
/// without releasing it, use <a>DisassociateAddress</a>.
/// </para>
///
/// <para>
/// [Nondefault VPC] You must use <a>DisassociateAddress</a> to disassociate the Elastic
/// IP address before you can release it. Otherwise, Amazon EC2 returns an error (<code>InvalidIPAddress.InUse</code>).
/// </para>
///
/// <para>
/// After releasing an Elastic IP address, it is released to the IP address pool. Be sure
/// to update your DNS records and any servers or devices that communicate with the address.
/// If you attempt to release an Elastic IP address that you already released, you'll
/// get an <code>AuthFailure</code> error if the address is already allocated to another
/// AWS account.
/// </para>
///
/// <para>
/// [EC2-VPC] After you release an Elastic IP address for use in a VPC, you might be able
/// to recover it. For more information, see <a>AllocateAddress</a>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ReleaseAddress service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ReleaseAddress service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseAddress">REST API Reference for ReleaseAddress Operation</seealso>
public virtual Task<ReleaseAddressResponse> ReleaseAddressAsync(ReleaseAddressRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ReleaseAddressRequestMarshaller.Instance;
options.ResponseUnmarshaller = ReleaseAddressResponseUnmarshaller.Instance;
return InvokeAsync<ReleaseAddressResponse>(request, options, cancellationToken);
}
#endregion
#region ReleaseHosts
internal virtual ReleaseHostsResponse ReleaseHosts(ReleaseHostsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ReleaseHostsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ReleaseHostsResponseUnmarshaller.Instance;
return Invoke<ReleaseHostsResponse>(request, options);
}
/// <summary>
/// When you no longer want to use an On-Demand Dedicated Host it can be released. On-Demand
/// billing is stopped and the host goes into <code>released</code> state. The host ID
/// of Dedicated Hosts that have been released can no longer be specified in another request,
/// for example, to modify the host. You must stop or terminate all instances on a host
/// before it can be released.
///
///
/// <para>
/// When Dedicated Hosts are released, it may take some time for them to stop counting
/// toward your limit and you may receive capacity errors when trying to allocate new
/// Dedicated Hosts. Wait a few minutes and then try again.
/// </para>
///
/// <para>
/// Released hosts still appear in a <a>DescribeHosts</a> response.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ReleaseHosts service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ReleaseHosts service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseHosts">REST API Reference for ReleaseHosts Operation</seealso>
public virtual Task<ReleaseHostsResponse> ReleaseHostsAsync(ReleaseHostsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ReleaseHostsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ReleaseHostsResponseUnmarshaller.Instance;
return InvokeAsync<ReleaseHostsResponse>(request, options, cancellationToken);
}
#endregion
#region ReplaceIamInstanceProfileAssociation
internal virtual ReplaceIamInstanceProfileAssociationResponse ReplaceIamInstanceProfileAssociation(ReplaceIamInstanceProfileAssociationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ReplaceIamInstanceProfileAssociationRequestMarshaller.Instance;
options.ResponseUnmarshaller = ReplaceIamInstanceProfileAssociationResponseUnmarshaller.Instance;
return Invoke<ReplaceIamInstanceProfileAssociationResponse>(request, options);
}
/// <summary>
/// Replaces an IAM instance profile for the specified running instance. You can use this
/// action to change the IAM instance profile that's associated with an instance without
/// having to disassociate the existing IAM instance profile first.
///
///
/// <para>
/// Use <a>DescribeIamInstanceProfileAssociations</a> to get the association ID.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ReplaceIamInstanceProfileAssociation service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ReplaceIamInstanceProfileAssociation service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceIamInstanceProfileAssociation">REST API Reference for ReplaceIamInstanceProfileAssociation Operation</seealso>
public virtual Task<ReplaceIamInstanceProfileAssociationResponse> ReplaceIamInstanceProfileAssociationAsync(ReplaceIamInstanceProfileAssociationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ReplaceIamInstanceProfileAssociationRequestMarshaller.Instance;
options.ResponseUnmarshaller = ReplaceIamInstanceProfileAssociationResponseUnmarshaller.Instance;
return InvokeAsync<ReplaceIamInstanceProfileAssociationResponse>(request, options, cancellationToken);
}
#endregion
#region ReplaceNetworkAclAssociation
internal virtual ReplaceNetworkAclAssociationResponse ReplaceNetworkAclAssociation(ReplaceNetworkAclAssociationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ReplaceNetworkAclAssociationRequestMarshaller.Instance;
options.ResponseUnmarshaller = ReplaceNetworkAclAssociationResponseUnmarshaller.Instance;
return Invoke<ReplaceNetworkAclAssociationResponse>(request, options);
}
/// <summary>
/// Changes which network ACL a subnet is associated with. By default when you create
/// a subnet, it's automatically associated with the default network ACL. For more information,
/// see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_ACLs.html">Network
/// ACLs</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
///
///
/// <para>
/// This is an idempotent operation.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ReplaceNetworkAclAssociation service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ReplaceNetworkAclAssociation service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclAssociation">REST API Reference for ReplaceNetworkAclAssociation Operation</seealso>
public virtual Task<ReplaceNetworkAclAssociationResponse> ReplaceNetworkAclAssociationAsync(ReplaceNetworkAclAssociationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ReplaceNetworkAclAssociationRequestMarshaller.Instance;
options.ResponseUnmarshaller = ReplaceNetworkAclAssociationResponseUnmarshaller.Instance;
return InvokeAsync<ReplaceNetworkAclAssociationResponse>(request, options, cancellationToken);
}
#endregion
#region ReplaceNetworkAclEntry
internal virtual ReplaceNetworkAclEntryResponse ReplaceNetworkAclEntry(ReplaceNetworkAclEntryRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ReplaceNetworkAclEntryRequestMarshaller.Instance;
options.ResponseUnmarshaller = ReplaceNetworkAclEntryResponseUnmarshaller.Instance;
return Invoke<ReplaceNetworkAclEntryResponse>(request, options);
}
/// <summary>
/// Replaces an entry (rule) in a network ACL. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_ACLs.html">Network
/// ACLs</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ReplaceNetworkAclEntry service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ReplaceNetworkAclEntry service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclEntry">REST API Reference for ReplaceNetworkAclEntry Operation</seealso>
public virtual Task<ReplaceNetworkAclEntryResponse> ReplaceNetworkAclEntryAsync(ReplaceNetworkAclEntryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ReplaceNetworkAclEntryRequestMarshaller.Instance;
options.ResponseUnmarshaller = ReplaceNetworkAclEntryResponseUnmarshaller.Instance;
return InvokeAsync<ReplaceNetworkAclEntryResponse>(request, options, cancellationToken);
}
#endregion
#region ReplaceRoute
internal virtual ReplaceRouteResponse ReplaceRoute(ReplaceRouteRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ReplaceRouteRequestMarshaller.Instance;
options.ResponseUnmarshaller = ReplaceRouteResponseUnmarshaller.Instance;
return Invoke<ReplaceRouteResponse>(request, options);
}
/// <summary>
/// Replaces an existing route within a route table in a VPC. You must provide only one
/// of the following: internet gateway, virtual private gateway, NAT instance, NAT gateway,
/// VPC peering connection, network interface, egress-only internet gateway, or transit
/// gateway.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html">Route
/// Tables</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ReplaceRoute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ReplaceRoute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRoute">REST API Reference for ReplaceRoute Operation</seealso>
public virtual Task<ReplaceRouteResponse> ReplaceRouteAsync(ReplaceRouteRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ReplaceRouteRequestMarshaller.Instance;
options.ResponseUnmarshaller = ReplaceRouteResponseUnmarshaller.Instance;
return InvokeAsync<ReplaceRouteResponse>(request, options, cancellationToken);
}
#endregion
#region ReplaceRouteTableAssociation
internal virtual ReplaceRouteTableAssociationResponse ReplaceRouteTableAssociation(ReplaceRouteTableAssociationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ReplaceRouteTableAssociationRequestMarshaller.Instance;
options.ResponseUnmarshaller = ReplaceRouteTableAssociationResponseUnmarshaller.Instance;
return Invoke<ReplaceRouteTableAssociationResponse>(request, options);
}
/// <summary>
/// Changes the route table associated with a given subnet, internet gateway, or virtual
/// private gateway in a VPC. After the operation completes, the subnet or gateway uses
/// the routes in the new route table. For more information about route tables, see <a
/// href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html">Route
/// Tables</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
///
///
/// <para>
/// You can also use this operation to change which table is the main route table in the
/// VPC. Specify the main route table's association ID and the route table ID of the new
/// main route table.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ReplaceRouteTableAssociation service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ReplaceRouteTableAssociation service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRouteTableAssociation">REST API Reference for ReplaceRouteTableAssociation Operation</seealso>
public virtual Task<ReplaceRouteTableAssociationResponse> ReplaceRouteTableAssociationAsync(ReplaceRouteTableAssociationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ReplaceRouteTableAssociationRequestMarshaller.Instance;
options.ResponseUnmarshaller = ReplaceRouteTableAssociationResponseUnmarshaller.Instance;
return InvokeAsync<ReplaceRouteTableAssociationResponse>(request, options, cancellationToken);
}
#endregion
#region ReplaceTransitGatewayRoute
internal virtual ReplaceTransitGatewayRouteResponse ReplaceTransitGatewayRoute(ReplaceTransitGatewayRouteRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ReplaceTransitGatewayRouteRequestMarshaller.Instance;
options.ResponseUnmarshaller = ReplaceTransitGatewayRouteResponseUnmarshaller.Instance;
return Invoke<ReplaceTransitGatewayRouteResponse>(request, options);
}
/// <summary>
/// Replaces the specified route in the specified transit gateway route table.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ReplaceTransitGatewayRoute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ReplaceTransitGatewayRoute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceTransitGatewayRoute">REST API Reference for ReplaceTransitGatewayRoute Operation</seealso>
public virtual Task<ReplaceTransitGatewayRouteResponse> ReplaceTransitGatewayRouteAsync(ReplaceTransitGatewayRouteRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ReplaceTransitGatewayRouteRequestMarshaller.Instance;
options.ResponseUnmarshaller = ReplaceTransitGatewayRouteResponseUnmarshaller.Instance;
return InvokeAsync<ReplaceTransitGatewayRouteResponse>(request, options, cancellationToken);
}
#endregion
#region ReportInstanceStatus
internal virtual ReportInstanceStatusResponse ReportInstanceStatus(ReportInstanceStatusRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ReportInstanceStatusRequestMarshaller.Instance;
options.ResponseUnmarshaller = ReportInstanceStatusResponseUnmarshaller.Instance;
return Invoke<ReportInstanceStatusResponse>(request, options);
}
/// <summary>
/// Submits feedback about the status of an instance. The instance must be in the <code>running</code>
/// state. If your experience with the instance differs from the instance status returned
/// by <a>DescribeInstanceStatus</a>, use <a>ReportInstanceStatus</a> to report your experience
/// with the instance. Amazon EC2 collects this information to improve the accuracy of
/// status checks.
///
///
/// <para>
/// Use of this action does not change the value returned by <a>DescribeInstanceStatus</a>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ReportInstanceStatus service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ReportInstanceStatus service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReportInstanceStatus">REST API Reference for ReportInstanceStatus Operation</seealso>
public virtual Task<ReportInstanceStatusResponse> ReportInstanceStatusAsync(ReportInstanceStatusRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ReportInstanceStatusRequestMarshaller.Instance;
options.ResponseUnmarshaller = ReportInstanceStatusResponseUnmarshaller.Instance;
return InvokeAsync<ReportInstanceStatusResponse>(request, options, cancellationToken);
}
#endregion
#region RequestSpotFleet
internal virtual RequestSpotFleetResponse RequestSpotFleet(RequestSpotFleetRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RequestSpotFleetRequestMarshaller.Instance;
options.ResponseUnmarshaller = RequestSpotFleetResponseUnmarshaller.Instance;
return Invoke<RequestSpotFleetResponse>(request, options);
}
/// <summary>
/// Creates a Spot Fleet request.
///
///
/// <para>
/// The Spot Fleet request specifies the total target capacity and the On-Demand target
/// capacity. Amazon EC2 calculates the difference between the total capacity and On-Demand
/// capacity, and launches the difference as Spot capacity.
/// </para>
///
/// <para>
/// You can submit a single request that includes multiple launch specifications that
/// vary by instance type, AMI, Availability Zone, or subnet.
/// </para>
///
/// <para>
/// By default, the Spot Fleet requests Spot Instances in the Spot Instance pool where
/// the price per unit is the lowest. Each launch specification can include its own instance
/// weighting that reflects the value of the instance type to your application workload.
/// </para>
///
/// <para>
/// Alternatively, you can specify that the Spot Fleet distribute the target capacity
/// across the Spot pools included in its launch specifications. By ensuring that the
/// Spot Instances in your Spot Fleet are in different Spot pools, you can improve the
/// availability of your fleet.
/// </para>
///
/// <para>
/// You can specify tags for the Spot Fleet request and instances launched by the fleet.
/// You cannot tag other resource types in a Spot Fleet request because only the <code>spot-fleet-request</code>
/// and <code>instance</code> resource types are supported.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-requests.html">Spot
/// Fleet Requests</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RequestSpotFleet service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RequestSpotFleet service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotFleet">REST API Reference for RequestSpotFleet Operation</seealso>
public virtual Task<RequestSpotFleetResponse> RequestSpotFleetAsync(RequestSpotFleetRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RequestSpotFleetRequestMarshaller.Instance;
options.ResponseUnmarshaller = RequestSpotFleetResponseUnmarshaller.Instance;
return InvokeAsync<RequestSpotFleetResponse>(request, options, cancellationToken);
}
#endregion
#region RequestSpotInstances
internal virtual RequestSpotInstancesResponse RequestSpotInstances(RequestSpotInstancesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RequestSpotInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = RequestSpotInstancesResponseUnmarshaller.Instance;
return Invoke<RequestSpotInstancesResponse>(request, options);
}
/// <summary>
/// Creates a Spot Instance request.
///
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html">Spot
/// Instance Requests</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RequestSpotInstances service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RequestSpotInstances service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotInstances">REST API Reference for RequestSpotInstances Operation</seealso>
public virtual Task<RequestSpotInstancesResponse> RequestSpotInstancesAsync(RequestSpotInstancesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RequestSpotInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = RequestSpotInstancesResponseUnmarshaller.Instance;
return InvokeAsync<RequestSpotInstancesResponse>(request, options, cancellationToken);
}
#endregion
#region ResetEbsDefaultKmsKeyId
internal virtual ResetEbsDefaultKmsKeyIdResponse ResetEbsDefaultKmsKeyId(ResetEbsDefaultKmsKeyIdRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ResetEbsDefaultKmsKeyIdRequestMarshaller.Instance;
options.ResponseUnmarshaller = ResetEbsDefaultKmsKeyIdResponseUnmarshaller.Instance;
return Invoke<ResetEbsDefaultKmsKeyIdResponse>(request, options);
}
/// <summary>
/// Resets the default customer master key (CMK) for EBS encryption for your account in
/// this Region to the AWS managed CMK for EBS.
///
///
/// <para>
/// After resetting the default CMK to the AWS managed CMK, you can continue to encrypt
/// by a customer managed CMK by specifying it when you create the volume. For more information,
/// see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon
/// EBS Encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ResetEbsDefaultKmsKeyId service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ResetEbsDefaultKmsKeyId service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetEbsDefaultKmsKeyId">REST API Reference for ResetEbsDefaultKmsKeyId Operation</seealso>
public virtual Task<ResetEbsDefaultKmsKeyIdResponse> ResetEbsDefaultKmsKeyIdAsync(ResetEbsDefaultKmsKeyIdRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ResetEbsDefaultKmsKeyIdRequestMarshaller.Instance;
options.ResponseUnmarshaller = ResetEbsDefaultKmsKeyIdResponseUnmarshaller.Instance;
return InvokeAsync<ResetEbsDefaultKmsKeyIdResponse>(request, options, cancellationToken);
}
#endregion
#region ResetFpgaImageAttribute
internal virtual ResetFpgaImageAttributeResponse ResetFpgaImageAttribute(ResetFpgaImageAttributeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ResetFpgaImageAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ResetFpgaImageAttributeResponseUnmarshaller.Instance;
return Invoke<ResetFpgaImageAttributeResponse>(request, options);
}
/// <summary>
/// Resets the specified attribute of the specified Amazon FPGA Image (AFI) to its default
/// value. You can only reset the load permission attribute.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ResetFpgaImageAttribute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ResetFpgaImageAttribute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetFpgaImageAttribute">REST API Reference for ResetFpgaImageAttribute Operation</seealso>
public virtual Task<ResetFpgaImageAttributeResponse> ResetFpgaImageAttributeAsync(ResetFpgaImageAttributeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ResetFpgaImageAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ResetFpgaImageAttributeResponseUnmarshaller.Instance;
return InvokeAsync<ResetFpgaImageAttributeResponse>(request, options, cancellationToken);
}
#endregion
#region ResetImageAttribute
internal virtual ResetImageAttributeResponse ResetImageAttribute(ResetImageAttributeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ResetImageAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ResetImageAttributeResponseUnmarshaller.Instance;
return Invoke<ResetImageAttributeResponse>(request, options);
}
/// <summary>
/// Resets an attribute of an AMI to its default value.
///
/// <note>
/// <para>
/// The productCodes attribute can't be reset.
/// </para>
/// </note>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ResetImageAttribute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ResetImageAttribute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetImageAttribute">REST API Reference for ResetImageAttribute Operation</seealso>
public virtual Task<ResetImageAttributeResponse> ResetImageAttributeAsync(ResetImageAttributeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ResetImageAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ResetImageAttributeResponseUnmarshaller.Instance;
return InvokeAsync<ResetImageAttributeResponse>(request, options, cancellationToken);
}
#endregion
#region ResetInstanceAttribute
internal virtual ResetInstanceAttributeResponse ResetInstanceAttribute(ResetInstanceAttributeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ResetInstanceAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ResetInstanceAttributeResponseUnmarshaller.Instance;
return Invoke<ResetInstanceAttributeResponse>(request, options);
}
/// <summary>
/// Resets an attribute of an instance to its default value. To reset the <code>kernel</code>
/// or <code>ramdisk</code>, the instance must be in a stopped state. To reset the <code>sourceDestCheck</code>,
/// the instance can be either running or stopped.
///
///
/// <para>
/// The <code>sourceDestCheck</code> attribute controls whether source/destination checking
/// is enabled. The default value is <code>true</code>, which means checking is enabled.
/// This value must be <code>false</code> for a NAT instance to perform NAT. For more
/// information, see <a href="https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html">NAT
/// Instances</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ResetInstanceAttribute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ResetInstanceAttribute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetInstanceAttribute">REST API Reference for ResetInstanceAttribute Operation</seealso>
public virtual Task<ResetInstanceAttributeResponse> ResetInstanceAttributeAsync(ResetInstanceAttributeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ResetInstanceAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ResetInstanceAttributeResponseUnmarshaller.Instance;
return InvokeAsync<ResetInstanceAttributeResponse>(request, options, cancellationToken);
}
#endregion
#region ResetNetworkInterfaceAttribute
internal virtual ResetNetworkInterfaceAttributeResponse ResetNetworkInterfaceAttribute(ResetNetworkInterfaceAttributeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ResetNetworkInterfaceAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ResetNetworkInterfaceAttributeResponseUnmarshaller.Instance;
return Invoke<ResetNetworkInterfaceAttributeResponse>(request, options);
}
/// <summary>
/// Resets a network interface attribute. You can specify only one attribute at a time.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ResetNetworkInterfaceAttribute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ResetNetworkInterfaceAttribute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetNetworkInterfaceAttribute">REST API Reference for ResetNetworkInterfaceAttribute Operation</seealso>
public virtual Task<ResetNetworkInterfaceAttributeResponse> ResetNetworkInterfaceAttributeAsync(ResetNetworkInterfaceAttributeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ResetNetworkInterfaceAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ResetNetworkInterfaceAttributeResponseUnmarshaller.Instance;
return InvokeAsync<ResetNetworkInterfaceAttributeResponse>(request, options, cancellationToken);
}
#endregion
#region ResetSnapshotAttribute
internal virtual ResetSnapshotAttributeResponse ResetSnapshotAttribute(ResetSnapshotAttributeRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ResetSnapshotAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ResetSnapshotAttributeResponseUnmarshaller.Instance;
return Invoke<ResetSnapshotAttributeResponse>(request, options);
}
/// <summary>
/// Resets permission settings for the specified snapshot.
///
///
/// <para>
/// For more information about modifying snapshot permissions, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html">Sharing
/// Snapshots</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the ResetSnapshotAttribute service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the ResetSnapshotAttribute service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetSnapshotAttribute">REST API Reference for ResetSnapshotAttribute Operation</seealso>
public virtual Task<ResetSnapshotAttributeResponse> ResetSnapshotAttributeAsync(ResetSnapshotAttributeRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ResetSnapshotAttributeRequestMarshaller.Instance;
options.ResponseUnmarshaller = ResetSnapshotAttributeResponseUnmarshaller.Instance;
return InvokeAsync<ResetSnapshotAttributeResponse>(request, options, cancellationToken);
}
#endregion
#region RestoreAddressToClassic
internal virtual RestoreAddressToClassicResponse RestoreAddressToClassic(RestoreAddressToClassicRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RestoreAddressToClassicRequestMarshaller.Instance;
options.ResponseUnmarshaller = RestoreAddressToClassicResponseUnmarshaller.Instance;
return Invoke<RestoreAddressToClassicResponse>(request, options);
}
/// <summary>
/// Restores an Elastic IP address that was previously moved to the EC2-VPC platform back
/// to the EC2-Classic platform. You cannot move an Elastic IP address that was originally
/// allocated for use in EC2-VPC. The Elastic IP address must not be associated with an
/// instance or network interface.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RestoreAddressToClassic service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RestoreAddressToClassic service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RestoreAddressToClassic">REST API Reference for RestoreAddressToClassic Operation</seealso>
public virtual Task<RestoreAddressToClassicResponse> RestoreAddressToClassicAsync(RestoreAddressToClassicRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RestoreAddressToClassicRequestMarshaller.Instance;
options.ResponseUnmarshaller = RestoreAddressToClassicResponseUnmarshaller.Instance;
return InvokeAsync<RestoreAddressToClassicResponse>(request, options, cancellationToken);
}
#endregion
#region RevokeClientVpnIngress
internal virtual RevokeClientVpnIngressResponse RevokeClientVpnIngress(RevokeClientVpnIngressRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RevokeClientVpnIngressRequestMarshaller.Instance;
options.ResponseUnmarshaller = RevokeClientVpnIngressResponseUnmarshaller.Instance;
return Invoke<RevokeClientVpnIngressResponse>(request, options);
}
/// <summary>
/// Removes an ingress authorization rule from a Client VPN endpoint.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RevokeClientVpnIngress service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RevokeClientVpnIngress service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeClientVpnIngress">REST API Reference for RevokeClientVpnIngress Operation</seealso>
public virtual Task<RevokeClientVpnIngressResponse> RevokeClientVpnIngressAsync(RevokeClientVpnIngressRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RevokeClientVpnIngressRequestMarshaller.Instance;
options.ResponseUnmarshaller = RevokeClientVpnIngressResponseUnmarshaller.Instance;
return InvokeAsync<RevokeClientVpnIngressResponse>(request, options, cancellationToken);
}
#endregion
#region RevokeSecurityGroupEgress
internal virtual RevokeSecurityGroupEgressResponse RevokeSecurityGroupEgress(RevokeSecurityGroupEgressRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RevokeSecurityGroupEgressRequestMarshaller.Instance;
options.ResponseUnmarshaller = RevokeSecurityGroupEgressResponseUnmarshaller.Instance;
return Invoke<RevokeSecurityGroupEgressResponse>(request, options);
}
/// <summary>
/// [VPC only] Removes the specified egress rules from a security group for EC2-VPC. This
/// action doesn't apply to security groups for use in EC2-Classic. To remove a rule,
/// the values that you specify (for example, ports) must match the existing rule's values
/// exactly.
///
///
/// <para>
/// Each rule consists of the protocol and the IPv4 or IPv6 CIDR range or source security
/// group. For the TCP and UDP protocols, you must also specify the destination port or
/// range of ports. For the ICMP protocol, you must also specify the ICMP type and code.
/// If the security group rule has a description, you do not have to specify the description
/// to revoke the rule.
/// </para>
///
/// <para>
/// Rule changes are propagated to instances within the security group as quickly as possible.
/// However, a small delay might occur.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RevokeSecurityGroupEgress service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RevokeSecurityGroupEgress service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupEgress">REST API Reference for RevokeSecurityGroupEgress Operation</seealso>
public virtual Task<RevokeSecurityGroupEgressResponse> RevokeSecurityGroupEgressAsync(RevokeSecurityGroupEgressRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RevokeSecurityGroupEgressRequestMarshaller.Instance;
options.ResponseUnmarshaller = RevokeSecurityGroupEgressResponseUnmarshaller.Instance;
return InvokeAsync<RevokeSecurityGroupEgressResponse>(request, options, cancellationToken);
}
#endregion
#region RevokeSecurityGroupIngress
internal virtual RevokeSecurityGroupIngressResponse RevokeSecurityGroupIngress(RevokeSecurityGroupIngressRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RevokeSecurityGroupIngressRequestMarshaller.Instance;
options.ResponseUnmarshaller = RevokeSecurityGroupIngressResponseUnmarshaller.Instance;
return Invoke<RevokeSecurityGroupIngressResponse>(request, options);
}
/// <summary>
/// Removes the specified ingress rules from a security group. To remove a rule, the values
/// that you specify (for example, ports) must match the existing rule's values exactly.
///
/// <note>
/// <para>
/// [EC2-Classic only] If the values you specify do not match the existing rule's values,
/// no error is returned. Use <a>DescribeSecurityGroups</a> to verify that the rule has
/// been removed.
/// </para>
/// </note>
/// <para>
/// Each rule consists of the protocol and the CIDR range or source security group. For
/// the TCP and UDP protocols, you must also specify the destination port or range of
/// ports. For the ICMP protocol, you must also specify the ICMP type and code. If the
/// security group rule has a description, you do not have to specify the description
/// to revoke the rule.
/// </para>
///
/// <para>
/// Rule changes are propagated to instances within the security group as quickly as possible.
/// However, a small delay might occur.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RevokeSecurityGroupIngress service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RevokeSecurityGroupIngress service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupIngress">REST API Reference for RevokeSecurityGroupIngress Operation</seealso>
public virtual Task<RevokeSecurityGroupIngressResponse> RevokeSecurityGroupIngressAsync(RevokeSecurityGroupIngressRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RevokeSecurityGroupIngressRequestMarshaller.Instance;
options.ResponseUnmarshaller = RevokeSecurityGroupIngressResponseUnmarshaller.Instance;
return InvokeAsync<RevokeSecurityGroupIngressResponse>(request, options, cancellationToken);
}
#endregion
#region RunInstances
internal virtual RunInstancesResponse RunInstances(RunInstancesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RunInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = RunInstancesResponseUnmarshaller.Instance;
return Invoke<RunInstancesResponse>(request, options);
}
/// <summary>
/// Launches the specified number of instances using an AMI for which you have permissions.
///
///
/// <para>
/// You can specify a number of options, or leave the default options. The following rules
/// apply:
/// </para>
/// <ul> <li>
/// <para>
/// [EC2-VPC] If you don't specify a subnet ID, we choose a default subnet from your default
/// VPC for you. If you don't have a default VPC, you must specify a subnet ID in the
/// request.
/// </para>
/// </li> <li>
/// <para>
/// [EC2-Classic] If don't specify an Availability Zone, we choose one for you.
/// </para>
/// </li> <li>
/// <para>
/// Some instance types must be launched into a VPC. If you do not have a default VPC,
/// or if you do not specify a subnet ID, the request fails. For more information, see
/// <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-vpc.html#vpc-only-instance-types">Instance
/// Types Available Only in a VPC</a>.
/// </para>
/// </li> <li>
/// <para>
/// [EC2-VPC] All instances have a network interface with a primary private IPv4 address.
/// If you don't specify this address, we choose one from the IPv4 range of your subnet.
/// </para>
/// </li> <li>
/// <para>
/// Not all instance types support IPv6 addresses. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance
/// Types</a>.
/// </para>
/// </li> <li>
/// <para>
/// If you don't specify a security group ID, we use the default security group. For more
/// information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html">Security
/// Groups</a>.
/// </para>
/// </li> <li>
/// <para>
/// If any of the AMIs have a product code attached for which the user has not subscribed,
/// the request fails.
/// </para>
/// </li> </ul>
/// <para>
/// You can create a <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html">launch
/// template</a>, which is a resource that contains the parameters to launch an instance.
/// When you launch an instance using <a>RunInstances</a>, you can specify the launch
/// template instead of specifying the launch parameters.
/// </para>
///
/// <para>
/// To ensure faster instance launches, break up large requests into smaller batches.
/// For example, create five separate launch requests for 100 instances each instead of
/// one launch request for 500 instances.
/// </para>
///
/// <para>
/// An instance is ready for you to use when it's in the <code>running</code> state. You
/// can check the state of your instance using <a>DescribeInstances</a>. You can tag instances
/// and EBS volumes during launch, after launch, or both. For more information, see <a>CreateTags</a>
/// and <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html">Tagging
/// Your Amazon EC2 Resources</a>.
/// </para>
///
/// <para>
/// Linux instances have access to the public key of the key pair at boot. You can use
/// this key to provide secure access to the instance. Amazon EC2 public images use this
/// feature to provide secure access without passwords. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html">Key
/// Pairs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
///
/// <para>
/// For troubleshooting, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_InstanceStraightToTerminated.html">What
/// To Do If An Instance Immediately Terminates</a>, and <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html">Troubleshooting
/// Connecting to Your Instance</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RunInstances service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RunInstances service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunInstances">REST API Reference for RunInstances Operation</seealso>
public virtual Task<RunInstancesResponse> RunInstancesAsync(RunInstancesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RunInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = RunInstancesResponseUnmarshaller.Instance;
return InvokeAsync<RunInstancesResponse>(request, options, cancellationToken);
}
#endregion
#region RunScheduledInstances
internal virtual RunScheduledInstancesResponse RunScheduledInstances(RunScheduledInstancesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = RunScheduledInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = RunScheduledInstancesResponseUnmarshaller.Instance;
return Invoke<RunScheduledInstancesResponse>(request, options);
}
/// <summary>
/// Launches the specified Scheduled Instances.
///
///
/// <para>
/// Before you can launch a Scheduled Instance, you must purchase it and obtain an identifier
/// using <a>PurchaseScheduledInstances</a>.
/// </para>
///
/// <para>
/// You must launch a Scheduled Instance during its scheduled time period. You can't stop
/// or reboot a Scheduled Instance, but you can terminate it as needed. If you terminate
/// a Scheduled Instance before the current scheduled time period ends, you can launch
/// it again after a few minutes. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-scheduled-instances.html">Scheduled
/// Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the RunScheduledInstances service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the RunScheduledInstances service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunScheduledInstances">REST API Reference for RunScheduledInstances Operation</seealso>
public virtual Task<RunScheduledInstancesResponse> RunScheduledInstancesAsync(RunScheduledInstancesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = RunScheduledInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = RunScheduledInstancesResponseUnmarshaller.Instance;
return InvokeAsync<RunScheduledInstancesResponse>(request, options, cancellationToken);
}
#endregion
#region SearchLocalGatewayRoutes
internal virtual SearchLocalGatewayRoutesResponse SearchLocalGatewayRoutes(SearchLocalGatewayRoutesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = SearchLocalGatewayRoutesRequestMarshaller.Instance;
options.ResponseUnmarshaller = SearchLocalGatewayRoutesResponseUnmarshaller.Instance;
return Invoke<SearchLocalGatewayRoutesResponse>(request, options);
}
/// <summary>
/// Searches for routes in the specified local gateway route table.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the SearchLocalGatewayRoutes service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the SearchLocalGatewayRoutes service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SearchLocalGatewayRoutes">REST API Reference for SearchLocalGatewayRoutes Operation</seealso>
public virtual Task<SearchLocalGatewayRoutesResponse> SearchLocalGatewayRoutesAsync(SearchLocalGatewayRoutesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = SearchLocalGatewayRoutesRequestMarshaller.Instance;
options.ResponseUnmarshaller = SearchLocalGatewayRoutesResponseUnmarshaller.Instance;
return InvokeAsync<SearchLocalGatewayRoutesResponse>(request, options, cancellationToken);
}
#endregion
#region SearchTransitGatewayMulticastGroups
internal virtual SearchTransitGatewayMulticastGroupsResponse SearchTransitGatewayMulticastGroups(SearchTransitGatewayMulticastGroupsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = SearchTransitGatewayMulticastGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = SearchTransitGatewayMulticastGroupsResponseUnmarshaller.Instance;
return Invoke<SearchTransitGatewayMulticastGroupsResponse>(request, options);
}
/// <summary>
/// Searches one or more transit gateway multicast groups and returns the group membership
/// information.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the SearchTransitGatewayMulticastGroups service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the SearchTransitGatewayMulticastGroups service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SearchTransitGatewayMulticastGroups">REST API Reference for SearchTransitGatewayMulticastGroups Operation</seealso>
public virtual Task<SearchTransitGatewayMulticastGroupsResponse> SearchTransitGatewayMulticastGroupsAsync(SearchTransitGatewayMulticastGroupsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = SearchTransitGatewayMulticastGroupsRequestMarshaller.Instance;
options.ResponseUnmarshaller = SearchTransitGatewayMulticastGroupsResponseUnmarshaller.Instance;
return InvokeAsync<SearchTransitGatewayMulticastGroupsResponse>(request, options, cancellationToken);
}
#endregion
#region SearchTransitGatewayRoutes
internal virtual SearchTransitGatewayRoutesResponse SearchTransitGatewayRoutes(SearchTransitGatewayRoutesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = SearchTransitGatewayRoutesRequestMarshaller.Instance;
options.ResponseUnmarshaller = SearchTransitGatewayRoutesResponseUnmarshaller.Instance;
return Invoke<SearchTransitGatewayRoutesResponse>(request, options);
}
/// <summary>
/// Searches for routes in the specified transit gateway route table.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the SearchTransitGatewayRoutes service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the SearchTransitGatewayRoutes service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SearchTransitGatewayRoutes">REST API Reference for SearchTransitGatewayRoutes Operation</seealso>
public virtual Task<SearchTransitGatewayRoutesResponse> SearchTransitGatewayRoutesAsync(SearchTransitGatewayRoutesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = SearchTransitGatewayRoutesRequestMarshaller.Instance;
options.ResponseUnmarshaller = SearchTransitGatewayRoutesResponseUnmarshaller.Instance;
return InvokeAsync<SearchTransitGatewayRoutesResponse>(request, options, cancellationToken);
}
#endregion
#region SendDiagnosticInterrupt
internal virtual SendDiagnosticInterruptResponse SendDiagnosticInterrupt(SendDiagnosticInterruptRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = SendDiagnosticInterruptRequestMarshaller.Instance;
options.ResponseUnmarshaller = SendDiagnosticInterruptResponseUnmarshaller.Instance;
return Invoke<SendDiagnosticInterruptResponse>(request, options);
}
/// <summary>
/// Sends a diagnostic interrupt to the specified Amazon EC2 instance to trigger a <i>kernel
/// panic</i> (on Linux instances), or a <i>blue screen</i>/<i>stop error</i> (on Windows
/// instances). For instances based on Intel and AMD processors, the interrupt is received
/// as a <i>non-maskable interrupt</i> (NMI).
///
///
/// <para>
/// In general, the operating system crashes and reboots when a kernel panic or stop error
/// is triggered. The operating system can also be configured to perform diagnostic tasks,
/// such as generating a memory dump file, loading a secondary kernel, or obtaining a
/// call trace.
/// </para>
///
/// <para>
/// Before sending a diagnostic interrupt to your instance, ensure that its operating
/// system is configured to perform the required diagnostic tasks.
/// </para>
///
/// <para>
/// For more information about configuring your operating system to generate a crash dump
/// when a kernel panic or stop error occurs, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/diagnostic-interrupt.html">Send
/// a Diagnostic Interrupt</a> (Linux instances) or <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/diagnostic-interrupt.html">Send
/// a Diagnostic Interrupt</a> (Windows instances).
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the SendDiagnosticInterrupt service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the SendDiagnosticInterrupt service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SendDiagnosticInterrupt">REST API Reference for SendDiagnosticInterrupt Operation</seealso>
public virtual Task<SendDiagnosticInterruptResponse> SendDiagnosticInterruptAsync(SendDiagnosticInterruptRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = SendDiagnosticInterruptRequestMarshaller.Instance;
options.ResponseUnmarshaller = SendDiagnosticInterruptResponseUnmarshaller.Instance;
return InvokeAsync<SendDiagnosticInterruptResponse>(request, options, cancellationToken);
}
#endregion
#region StartInstances
internal virtual StartInstancesResponse StartInstances(StartInstancesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StartInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartInstancesResponseUnmarshaller.Instance;
return Invoke<StartInstancesResponse>(request, options);
}
/// <summary>
/// Starts an Amazon EBS-backed instance that you've previously stopped.
///
///
/// <para>
/// Instances that use Amazon EBS volumes as their root devices can be quickly stopped
/// and started. When an instance is stopped, the compute resources are released and you
/// are not billed for instance usage. However, your root partition Amazon EBS volume
/// remains and continues to persist your data, and you are charged for Amazon EBS volume
/// usage. You can restart your instance at any time. Every time you start your Windows
/// instance, Amazon EC2 charges you for a full instance hour. If you stop and restart
/// your Windows instance, a new instance hour begins and Amazon EC2 charges you for another
/// full instance hour even if you are still within the same 60-minute period when it
/// was stopped. Every time you start your Linux instance, Amazon EC2 charges a one-minute
/// minimum for instance usage, and thereafter charges per second for instance usage.
/// </para>
///
/// <para>
/// Before stopping an instance, make sure it is in a state from which it can be restarted.
/// Stopping an instance does not preserve data stored in RAM.
/// </para>
///
/// <para>
/// Performing this operation on an instance that uses an instance store as its root device
/// returns an error.
/// </para>
///
/// <para>
/// For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html">Stopping
/// Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartInstances service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StartInstances service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StartInstances">REST API Reference for StartInstances Operation</seealso>
public virtual Task<StartInstancesResponse> StartInstancesAsync(StartInstancesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StartInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartInstancesResponseUnmarshaller.Instance;
return InvokeAsync<StartInstancesResponse>(request, options, cancellationToken);
}
#endregion
#region StartVpcEndpointServicePrivateDnsVerification
internal virtual StartVpcEndpointServicePrivateDnsVerificationResponse StartVpcEndpointServicePrivateDnsVerification(StartVpcEndpointServicePrivateDnsVerificationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StartVpcEndpointServicePrivateDnsVerificationRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartVpcEndpointServicePrivateDnsVerificationResponseUnmarshaller.Instance;
return Invoke<StartVpcEndpointServicePrivateDnsVerificationResponse>(request, options);
}
/// <summary>
/// Initiates the verification process to prove that the service provider owns the private
/// DNS name domain for the endpoint service.
///
///
/// <para>
/// The service provider must successfully perform the verification before the consumer
/// can use the name to access the service.
/// </para>
///
/// <para>
/// Before the service provider runs this command, they must add a record to the DNS server.
/// For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/ndpoint-services-dns-validation.html#add-dns-txt-record">Adding
/// a TXT Record to Your Domain's DNS Server </a> in the <i>Amazon VPC User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StartVpcEndpointServicePrivateDnsVerification service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StartVpcEndpointServicePrivateDnsVerification service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StartVpcEndpointServicePrivateDnsVerification">REST API Reference for StartVpcEndpointServicePrivateDnsVerification Operation</seealso>
public virtual Task<StartVpcEndpointServicePrivateDnsVerificationResponse> StartVpcEndpointServicePrivateDnsVerificationAsync(StartVpcEndpointServicePrivateDnsVerificationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StartVpcEndpointServicePrivateDnsVerificationRequestMarshaller.Instance;
options.ResponseUnmarshaller = StartVpcEndpointServicePrivateDnsVerificationResponseUnmarshaller.Instance;
return InvokeAsync<StartVpcEndpointServicePrivateDnsVerificationResponse>(request, options, cancellationToken);
}
#endregion
#region StopInstances
internal virtual StopInstancesResponse StopInstances(StopInstancesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = StopInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopInstancesResponseUnmarshaller.Instance;
return Invoke<StopInstancesResponse>(request, options);
}
/// <summary>
/// Stops an Amazon EBS-backed instance.
///
///
/// <para>
/// You can use the Stop action to hibernate an instance if the instance is <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#enabling-hibernation">enabled
/// for hibernation</a> and it meets the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#hibernating-prerequisites">hibernation
/// prerequisites</a>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html">Hibernate
/// Your Instance</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
///
/// <para>
/// We don't charge usage for a stopped instance, or data transfer fees; however, your
/// root partition Amazon EBS volume remains and continues to persist your data, and you
/// are charged for Amazon EBS volume usage. Every time you start your Windows instance,
/// Amazon EC2 charges you for a full instance hour. If you stop and restart your Windows
/// instance, a new instance hour begins and Amazon EC2 charges you for another full instance
/// hour even if you are still within the same 60-minute period when it was stopped. Every
/// time you start your Linux instance, Amazon EC2 charges a one-minute minimum for instance
/// usage, and thereafter charges per second for instance usage.
/// </para>
///
/// <para>
/// You can't stop or hibernate instance store-backed instances. You can't use the Stop
/// action to hibernate Spot Instances, but you can specify that Amazon EC2 should hibernate
/// Spot Instances when they are interrupted. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-interruptions.html#hibernate-spot-instances">Hibernating
/// Interrupted Spot Instances</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
///
/// <para>
/// When you stop or hibernate an instance, we shut it down. You can restart your instance
/// at any time. Before stopping or hibernating an instance, make sure it is in a state
/// from which it can be restarted. Stopping an instance does not preserve data stored
/// in RAM, but hibernating an instance does preserve data stored in RAM. If an instance
/// cannot hibernate successfully, a normal shutdown occurs.
/// </para>
///
/// <para>
/// Stopping and hibernating an instance is different to rebooting or terminating it.
/// For example, when you stop or hibernate an instance, the root device and any other
/// devices attached to the instance persist. When you terminate an instance, the root
/// device and any other devices attached during the instance launch are automatically
/// deleted. For more information about the differences between rebooting, stopping, hibernating,
/// and terminating instances, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html">Instance
/// Lifecycle</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
///
/// <para>
/// When you stop an instance, we attempt to shut it down forcibly after a short while.
/// If your instance appears stuck in the stopping state after a period of time, there
/// may be an issue with the underlying host computer. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesStopping.html">Troubleshooting
/// Stopping Your Instance</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the StopInstances service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the StopInstances service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StopInstances">REST API Reference for StopInstances Operation</seealso>
public virtual Task<StopInstancesResponse> StopInstancesAsync(StopInstancesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = StopInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = StopInstancesResponseUnmarshaller.Instance;
return InvokeAsync<StopInstancesResponse>(request, options, cancellationToken);
}
#endregion
#region TerminateClientVpnConnections
internal virtual TerminateClientVpnConnectionsResponse TerminateClientVpnConnections(TerminateClientVpnConnectionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = TerminateClientVpnConnectionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = TerminateClientVpnConnectionsResponseUnmarshaller.Instance;
return Invoke<TerminateClientVpnConnectionsResponse>(request, options);
}
/// <summary>
/// Terminates active Client VPN endpoint connections. This action can be used to terminate
/// a specific client connection, or up to five connections established by a specific
/// user.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the TerminateClientVpnConnections service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the TerminateClientVpnConnections service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TerminateClientVpnConnections">REST API Reference for TerminateClientVpnConnections Operation</seealso>
public virtual Task<TerminateClientVpnConnectionsResponse> TerminateClientVpnConnectionsAsync(TerminateClientVpnConnectionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = TerminateClientVpnConnectionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = TerminateClientVpnConnectionsResponseUnmarshaller.Instance;
return InvokeAsync<TerminateClientVpnConnectionsResponse>(request, options, cancellationToken);
}
#endregion
#region TerminateInstances
internal virtual TerminateInstancesResponse TerminateInstances(TerminateInstancesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = TerminateInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = TerminateInstancesResponseUnmarshaller.Instance;
return Invoke<TerminateInstancesResponse>(request, options);
}
/// <summary>
/// Shuts down the specified instances. This operation is idempotent; if you terminate
/// an instance more than once, each call succeeds.
///
///
/// <para>
/// If you specify multiple instances and the request fails (for example, because of a
/// single incorrect instance ID), none of the instances are terminated.
/// </para>
///
/// <para>
/// Terminated instances remain visible after termination (for approximately one hour).
/// </para>
///
/// <para>
/// By default, Amazon EC2 deletes all EBS volumes that were attached when the instance
/// launched. Volumes attached after instance launch continue running.
/// </para>
///
/// <para>
/// You can stop, start, and terminate EBS-backed instances. You can only terminate instance
/// store-backed instances. What happens to an instance differs if you stop it or terminate
/// it. For example, when you stop an instance, the root device and any other devices
/// attached to the instance persist. When you terminate an instance, any attached EBS
/// volumes with the <code>DeleteOnTermination</code> block device mapping parameter set
/// to <code>true</code> are automatically deleted. For more information about the differences
/// between stopping and terminating instances, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html">Instance
/// Lifecycle</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
///
/// <para>
/// For more information about troubleshooting, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesShuttingDown.html">Troubleshooting
/// Terminating Your Instance</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the TerminateInstances service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the TerminateInstances service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TerminateInstances">REST API Reference for TerminateInstances Operation</seealso>
public virtual Task<TerminateInstancesResponse> TerminateInstancesAsync(TerminateInstancesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = TerminateInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = TerminateInstancesResponseUnmarshaller.Instance;
return InvokeAsync<TerminateInstancesResponse>(request, options, cancellationToken);
}
#endregion
#region UnassignIpv6Addresses
internal virtual UnassignIpv6AddressesResponse UnassignIpv6Addresses(UnassignIpv6AddressesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UnassignIpv6AddressesRequestMarshaller.Instance;
options.ResponseUnmarshaller = UnassignIpv6AddressesResponseUnmarshaller.Instance;
return Invoke<UnassignIpv6AddressesResponse>(request, options);
}
/// <summary>
/// Unassigns one or more IPv6 addresses from a network interface.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UnassignIpv6Addresses service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the UnassignIpv6Addresses service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignIpv6Addresses">REST API Reference for UnassignIpv6Addresses Operation</seealso>
public virtual Task<UnassignIpv6AddressesResponse> UnassignIpv6AddressesAsync(UnassignIpv6AddressesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = UnassignIpv6AddressesRequestMarshaller.Instance;
options.ResponseUnmarshaller = UnassignIpv6AddressesResponseUnmarshaller.Instance;
return InvokeAsync<UnassignIpv6AddressesResponse>(request, options, cancellationToken);
}
#endregion
#region UnassignPrivateIpAddresses
internal virtual UnassignPrivateIpAddressesResponse UnassignPrivateIpAddresses(UnassignPrivateIpAddressesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UnassignPrivateIpAddressesRequestMarshaller.Instance;
options.ResponseUnmarshaller = UnassignPrivateIpAddressesResponseUnmarshaller.Instance;
return Invoke<UnassignPrivateIpAddressesResponse>(request, options);
}
/// <summary>
/// Unassigns one or more secondary private IP addresses from a network interface.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UnassignPrivateIpAddresses service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the UnassignPrivateIpAddresses service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignPrivateIpAddresses">REST API Reference for UnassignPrivateIpAddresses Operation</seealso>
public virtual Task<UnassignPrivateIpAddressesResponse> UnassignPrivateIpAddressesAsync(UnassignPrivateIpAddressesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = UnassignPrivateIpAddressesRequestMarshaller.Instance;
options.ResponseUnmarshaller = UnassignPrivateIpAddressesResponseUnmarshaller.Instance;
return InvokeAsync<UnassignPrivateIpAddressesResponse>(request, options, cancellationToken);
}
#endregion
#region UnmonitorInstances
internal virtual UnmonitorInstancesResponse UnmonitorInstances(UnmonitorInstancesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UnmonitorInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = UnmonitorInstancesResponseUnmarshaller.Instance;
return Invoke<UnmonitorInstancesResponse>(request, options);
}
/// <summary>
/// Disables detailed monitoring for a running instance. For more information, see <a
/// href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html">Monitoring
/// Your Instances and Volumes</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UnmonitorInstances service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the UnmonitorInstances service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnmonitorInstances">REST API Reference for UnmonitorInstances Operation</seealso>
public virtual Task<UnmonitorInstancesResponse> UnmonitorInstancesAsync(UnmonitorInstancesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = UnmonitorInstancesRequestMarshaller.Instance;
options.ResponseUnmarshaller = UnmonitorInstancesResponseUnmarshaller.Instance;
return InvokeAsync<UnmonitorInstancesResponse>(request, options, cancellationToken);
}
#endregion
#region UpdateSecurityGroupRuleDescriptionsEgress
internal virtual UpdateSecurityGroupRuleDescriptionsEgressResponse UpdateSecurityGroupRuleDescriptionsEgress(UpdateSecurityGroupRuleDescriptionsEgressRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateSecurityGroupRuleDescriptionsEgressRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateSecurityGroupRuleDescriptionsEgressResponseUnmarshaller.Instance;
return Invoke<UpdateSecurityGroupRuleDescriptionsEgressResponse>(request, options);
}
/// <summary>
/// [VPC only] Updates the description of an egress (outbound) security group rule. You
/// can replace an existing description, or add a description to a rule that did not have
/// one previously.
///
///
/// <para>
/// You specify the description as part of the IP permissions structure. You can remove
/// a description for a security group rule by omitting the description parameter in the
/// request.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateSecurityGroupRuleDescriptionsEgress service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the UpdateSecurityGroupRuleDescriptionsEgress service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UpdateSecurityGroupRuleDescriptionsEgress">REST API Reference for UpdateSecurityGroupRuleDescriptionsEgress Operation</seealso>
public virtual Task<UpdateSecurityGroupRuleDescriptionsEgressResponse> UpdateSecurityGroupRuleDescriptionsEgressAsync(UpdateSecurityGroupRuleDescriptionsEgressRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateSecurityGroupRuleDescriptionsEgressRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateSecurityGroupRuleDescriptionsEgressResponseUnmarshaller.Instance;
return InvokeAsync<UpdateSecurityGroupRuleDescriptionsEgressResponse>(request, options, cancellationToken);
}
#endregion
#region UpdateSecurityGroupRuleDescriptionsIngress
internal virtual UpdateSecurityGroupRuleDescriptionsIngressResponse UpdateSecurityGroupRuleDescriptionsIngress(UpdateSecurityGroupRuleDescriptionsIngressRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateSecurityGroupRuleDescriptionsIngressRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateSecurityGroupRuleDescriptionsIngressResponseUnmarshaller.Instance;
return Invoke<UpdateSecurityGroupRuleDescriptionsIngressResponse>(request, options);
}
/// <summary>
/// Updates the description of an ingress (inbound) security group rule. You can replace
/// an existing description, or add a description to a rule that did not have one previously.
///
///
/// <para>
/// You specify the description as part of the IP permissions structure. You can remove
/// a description for a security group rule by omitting the description parameter in the
/// request.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the UpdateSecurityGroupRuleDescriptionsIngress service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the UpdateSecurityGroupRuleDescriptionsIngress service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UpdateSecurityGroupRuleDescriptionsIngress">REST API Reference for UpdateSecurityGroupRuleDescriptionsIngress Operation</seealso>
public virtual Task<UpdateSecurityGroupRuleDescriptionsIngressResponse> UpdateSecurityGroupRuleDescriptionsIngressAsync(UpdateSecurityGroupRuleDescriptionsIngressRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateSecurityGroupRuleDescriptionsIngressRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateSecurityGroupRuleDescriptionsIngressResponseUnmarshaller.Instance;
return InvokeAsync<UpdateSecurityGroupRuleDescriptionsIngressResponse>(request, options, cancellationToken);
}
#endregion
#region WithdrawByoipCidr
internal virtual WithdrawByoipCidrResponse WithdrawByoipCidr(WithdrawByoipCidrRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = WithdrawByoipCidrRequestMarshaller.Instance;
options.ResponseUnmarshaller = WithdrawByoipCidrResponseUnmarshaller.Instance;
return Invoke<WithdrawByoipCidrResponse>(request, options);
}
/// <summary>
/// Stops advertising an address range that is provisioned as an address pool.
///
///
/// <para>
/// You can perform this operation at most once every 10 seconds, even if you specify
/// different address ranges each time.
/// </para>
///
/// <para>
/// It can take a few minutes before traffic to the specified addresses stops routing
/// to AWS because of BGP propagation delays.
/// </para>
/// </summary>
/// <param name="request">Container for the necessary parameters to execute the WithdrawByoipCidr service method.</param>
/// <param name="cancellationToken">
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// </param>
///
/// <returns>The response from the WithdrawByoipCidr service method, as returned by EC2.</returns>
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/WithdrawByoipCidr">REST API Reference for WithdrawByoipCidr Operation</seealso>
public virtual Task<WithdrawByoipCidrResponse> WithdrawByoipCidrAsync(WithdrawByoipCidrRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = WithdrawByoipCidrRequestMarshaller.Instance;
options.ResponseUnmarshaller = WithdrawByoipCidrResponseUnmarshaller.Instance;
return InvokeAsync<WithdrawByoipCidrResponse>(request, options, cancellationToken);
}
#endregion
}
} | 55.424947 | 332 | 0.695128 | [
"Apache-2.0"
] | SVemulapalli/aws-sdk-net | sdk/src/Services/EC2/Generated/_mobile/AmazonEC2Client.cs | 1,037,571 | C# |
namespace CommonApp.Service
{
public static class RegionNames
{
public const string WorkName = "WorkRegion";
}
}
| 15 | 52 | 0.651852 | [
"MIT"
] | huangjia2107/CommonApp | src/CommonApp.Service/RegionNames.cs | 137 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CitizenFX.Core;
using Newtonsoft.Json;
namespace Magicallity.Shared.Models
{
public class GarageModel
{
public string Name;
public string AlternateDisplayName;
[JsonIgnore]
public string DisplayName => string.IsNullOrEmpty(AlternateDisplayName) ? Name : AlternateDisplayName;
public Vector3 Location;
public int MaxVehicles = -1;
public MarkerOptions MarkerOptions;
public BlipOptions BlipOptions = new BlipOptions
{
#if CLIENT
Sprite = BlipSprite.Garage2
#elif SERVER
Sprite = 50
#endif
};
public bool Equals(GarageModel garage)
{
return !ReferenceEquals(garage, null) && Name == garage.Name;
}
public override bool Equals(object obj)
{
return !ReferenceEquals(obj, null) && obj.GetType() == GetType() && Equals((GarageModel)obj);
}
public static bool operator ==(GarageModel left, GarageModel right)
{
return ReferenceEquals(left, null) ? ReferenceEquals(right, null) : left.Equals(right);
}
public static bool operator !=(GarageModel left, GarageModel right)
{
return !(left == right);
}
}
}
| 28.204082 | 110 | 0.628799 | [
"MIT"
] | Jazzuh/Magicallity-public-source | src/Magicallity.Shared/Models/GarageModel.cs | 1,384 | C# |
namespace Paseto.Cryptography.Internal.Ed25519Ref10
{
internal static partial class GroupOperations
{
/*
r = p
*/
internal static void ge_p3_to_cached(out GroupElementCached r, ref GroupElementP3 p)
{
FieldOperations.fe_add(out r.YplusX, ref p.Y, ref p.X);
FieldOperations.fe_sub(out r.YminusX, ref p.Y, ref p.X);
r.Z = p.Z;
FieldOperations.fe_mul(out r.T2d, ref p.T, ref LookupTables.d2);
}
}
} | 27.1875 | 92 | 0.689655 | [
"MIT"
] | daviddesmet/paseto-dotnet | src/Paseto.Cryptography/Internal/Ed25519Ref10/ge_p3_to_cached.cs | 437 | C# |
using System;
using System.Collections.Generic;
using PizzaBox.Storing.Entities;
using Xunit;
namespace PizzaBox.Testing.Tests
{
public class SizeTests
{
//[Fact]
//public void TestGetSizes()
//{
// var sut = SizeController.GetSizes();
// bool isNull = sut == null;
// Assert.False(isNull);
//}
//[Fact]
//public void TestGetSizesById()
//{
// var sut = SizeController.GetSizeById(1);
// bool isNull = sut == null;
// Assert.False(isNull);
//}
}
} | 19.833333 | 54 | 0.522689 | [
"MIT"
] | 210329-UTA-SH-UiPath/P1_Sean_Spring | PizzaBox.Api/PizzaBox.Testing/Tests/SizeTests.cs | 595 | C# |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
using System.Collections.Generic;
using Aliyun.Acs.Core;
using Aliyun.Acs.Core.Http;
using Aliyun.Acs.Core.Transform;
using Aliyun.Acs.Core.Utils;
using Aliyun.Acs.elasticsearch.Transform;
using Aliyun.Acs.elasticsearch.Transform.V20170613;
namespace Aliyun.Acs.elasticsearch.Model.V20170613
{
public class ListLogstashRequest : RoaAcsRequest<ListLogstashResponse>
{
public ListLogstashRequest()
: base("elasticsearch", "2017-06-13", "ListLogstash", "elasticsearch", "openAPI")
{
if (this.GetType().GetProperty("ProductEndpointMap") != null && this.GetType().GetProperty("ProductEndpointType") != null)
{
this.GetType().GetProperty("ProductEndpointMap").SetValue(this, Aliyun.Acs.elasticsearch.Endpoint.endpointMap, null);
this.GetType().GetProperty("ProductEndpointType").SetValue(this, Aliyun.Acs.elasticsearch.Endpoint.endpointRegionalType, null);
}
UriPattern = "/openapi/logstashes";
Method = MethodType.GET;
}
private string resourceGroupId;
private string instanceId;
private int? size;
private string description;
private int? page;
private string ownerId;
private string version;
public string ResourceGroupId
{
get
{
return resourceGroupId;
}
set
{
resourceGroupId = value;
DictionaryUtil.Add(QueryParameters, "resourceGroupId", value);
}
}
public string InstanceId
{
get
{
return instanceId;
}
set
{
instanceId = value;
DictionaryUtil.Add(QueryParameters, "instanceId", value);
}
}
public int? Size
{
get
{
return size;
}
set
{
size = value;
DictionaryUtil.Add(QueryParameters, "size", value.ToString());
}
}
public string Description
{
get
{
return description;
}
set
{
description = value;
DictionaryUtil.Add(QueryParameters, "description", value);
}
}
public int? Page
{
get
{
return page;
}
set
{
page = value;
DictionaryUtil.Add(QueryParameters, "page", value.ToString());
}
}
public string OwnerId
{
get
{
return ownerId;
}
set
{
ownerId = value;
DictionaryUtil.Add(QueryParameters, "ownerId", value);
}
}
public string Version
{
get
{
return version;
}
set
{
version = value;
DictionaryUtil.Add(QueryParameters, "version", value);
}
}
public override bool CheckShowJsonItemName()
{
return false;
}
public override ListLogstashResponse GetResponse(UnmarshallerContext unmarshallerContext)
{
return ListLogstashResponseUnmarshaller.Unmarshall(unmarshallerContext);
}
}
}
| 22.91875 | 143 | 0.650395 | [
"Apache-2.0"
] | AxiosCros/aliyun-openapi-net-sdk | aliyun-net-sdk-elasticsearch/Elasticsearch/Model/V20170613/ListLogstashRequest.cs | 3,667 | C# |
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using War3Api.Object.Abilities;
using War3Api.Object.Enums;
using War3Net.Build.Object;
using War3Net.Common.Extensions;
namespace War3Api.Object.Abilities
{
public sealed class ScrollOfLifeRegen : Ability
{
private readonly Lazy<ObjectProperty<float>> _dataLifeRegenerated;
private readonly Lazy<ReadOnlyObjectProperty<bool>> _isDataLifeRegeneratedModified;
private readonly Lazy<ObjectProperty<float>> _dataManaRegenerated;
private readonly Lazy<ReadOnlyObjectProperty<bool>> _isDataManaRegeneratedModified;
private readonly Lazy<ObjectProperty<int>> _dataAllowWhenFullRaw;
private readonly Lazy<ReadOnlyObjectProperty<bool>> _isDataAllowWhenFullModified;
private readonly Lazy<ObjectProperty<FullFlags>> _dataAllowWhenFull;
private readonly Lazy<ObjectProperty<int>> _dataNoTargetRequiredRaw;
private readonly Lazy<ReadOnlyObjectProperty<bool>> _isDataNoTargetRequiredModified;
private readonly Lazy<ObjectProperty<bool>> _dataNoTargetRequired;
private readonly Lazy<ObjectProperty<int>> _dataDispelOnAttackRaw;
private readonly Lazy<ReadOnlyObjectProperty<bool>> _isDataDispelOnAttackModified;
private readonly Lazy<ObjectProperty<bool>> _dataDispelOnAttack;
public ScrollOfLifeRegen(): base(1819494721)
{
_dataLifeRegenerated = new Lazy<ObjectProperty<float>>(() => new ObjectProperty<float>(GetDataLifeRegenerated, SetDataLifeRegenerated));
_isDataLifeRegeneratedModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataLifeRegeneratedModified));
_dataManaRegenerated = new Lazy<ObjectProperty<float>>(() => new ObjectProperty<float>(GetDataManaRegenerated, SetDataManaRegenerated));
_isDataManaRegeneratedModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataManaRegeneratedModified));
_dataAllowWhenFullRaw = new Lazy<ObjectProperty<int>>(() => new ObjectProperty<int>(GetDataAllowWhenFullRaw, SetDataAllowWhenFullRaw));
_isDataAllowWhenFullModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataAllowWhenFullModified));
_dataAllowWhenFull = new Lazy<ObjectProperty<FullFlags>>(() => new ObjectProperty<FullFlags>(GetDataAllowWhenFull, SetDataAllowWhenFull));
_dataNoTargetRequiredRaw = new Lazy<ObjectProperty<int>>(() => new ObjectProperty<int>(GetDataNoTargetRequiredRaw, SetDataNoTargetRequiredRaw));
_isDataNoTargetRequiredModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataNoTargetRequiredModified));
_dataNoTargetRequired = new Lazy<ObjectProperty<bool>>(() => new ObjectProperty<bool>(GetDataNoTargetRequired, SetDataNoTargetRequired));
_dataDispelOnAttackRaw = new Lazy<ObjectProperty<int>>(() => new ObjectProperty<int>(GetDataDispelOnAttackRaw, SetDataDispelOnAttackRaw));
_isDataDispelOnAttackModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataDispelOnAttackModified));
_dataDispelOnAttack = new Lazy<ObjectProperty<bool>>(() => new ObjectProperty<bool>(GetDataDispelOnAttack, SetDataDispelOnAttack));
}
public ScrollOfLifeRegen(int newId): base(1819494721, newId)
{
_dataLifeRegenerated = new Lazy<ObjectProperty<float>>(() => new ObjectProperty<float>(GetDataLifeRegenerated, SetDataLifeRegenerated));
_isDataLifeRegeneratedModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataLifeRegeneratedModified));
_dataManaRegenerated = new Lazy<ObjectProperty<float>>(() => new ObjectProperty<float>(GetDataManaRegenerated, SetDataManaRegenerated));
_isDataManaRegeneratedModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataManaRegeneratedModified));
_dataAllowWhenFullRaw = new Lazy<ObjectProperty<int>>(() => new ObjectProperty<int>(GetDataAllowWhenFullRaw, SetDataAllowWhenFullRaw));
_isDataAllowWhenFullModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataAllowWhenFullModified));
_dataAllowWhenFull = new Lazy<ObjectProperty<FullFlags>>(() => new ObjectProperty<FullFlags>(GetDataAllowWhenFull, SetDataAllowWhenFull));
_dataNoTargetRequiredRaw = new Lazy<ObjectProperty<int>>(() => new ObjectProperty<int>(GetDataNoTargetRequiredRaw, SetDataNoTargetRequiredRaw));
_isDataNoTargetRequiredModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataNoTargetRequiredModified));
_dataNoTargetRequired = new Lazy<ObjectProperty<bool>>(() => new ObjectProperty<bool>(GetDataNoTargetRequired, SetDataNoTargetRequired));
_dataDispelOnAttackRaw = new Lazy<ObjectProperty<int>>(() => new ObjectProperty<int>(GetDataDispelOnAttackRaw, SetDataDispelOnAttackRaw));
_isDataDispelOnAttackModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataDispelOnAttackModified));
_dataDispelOnAttack = new Lazy<ObjectProperty<bool>>(() => new ObjectProperty<bool>(GetDataDispelOnAttack, SetDataDispelOnAttack));
}
public ScrollOfLifeRegen(string newRawcode): base(1819494721, newRawcode)
{
_dataLifeRegenerated = new Lazy<ObjectProperty<float>>(() => new ObjectProperty<float>(GetDataLifeRegenerated, SetDataLifeRegenerated));
_isDataLifeRegeneratedModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataLifeRegeneratedModified));
_dataManaRegenerated = new Lazy<ObjectProperty<float>>(() => new ObjectProperty<float>(GetDataManaRegenerated, SetDataManaRegenerated));
_isDataManaRegeneratedModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataManaRegeneratedModified));
_dataAllowWhenFullRaw = new Lazy<ObjectProperty<int>>(() => new ObjectProperty<int>(GetDataAllowWhenFullRaw, SetDataAllowWhenFullRaw));
_isDataAllowWhenFullModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataAllowWhenFullModified));
_dataAllowWhenFull = new Lazy<ObjectProperty<FullFlags>>(() => new ObjectProperty<FullFlags>(GetDataAllowWhenFull, SetDataAllowWhenFull));
_dataNoTargetRequiredRaw = new Lazy<ObjectProperty<int>>(() => new ObjectProperty<int>(GetDataNoTargetRequiredRaw, SetDataNoTargetRequiredRaw));
_isDataNoTargetRequiredModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataNoTargetRequiredModified));
_dataNoTargetRequired = new Lazy<ObjectProperty<bool>>(() => new ObjectProperty<bool>(GetDataNoTargetRequired, SetDataNoTargetRequired));
_dataDispelOnAttackRaw = new Lazy<ObjectProperty<int>>(() => new ObjectProperty<int>(GetDataDispelOnAttackRaw, SetDataDispelOnAttackRaw));
_isDataDispelOnAttackModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataDispelOnAttackModified));
_dataDispelOnAttack = new Lazy<ObjectProperty<bool>>(() => new ObjectProperty<bool>(GetDataDispelOnAttack, SetDataDispelOnAttack));
}
public ScrollOfLifeRegen(ObjectDatabaseBase db): base(1819494721, db)
{
_dataLifeRegenerated = new Lazy<ObjectProperty<float>>(() => new ObjectProperty<float>(GetDataLifeRegenerated, SetDataLifeRegenerated));
_isDataLifeRegeneratedModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataLifeRegeneratedModified));
_dataManaRegenerated = new Lazy<ObjectProperty<float>>(() => new ObjectProperty<float>(GetDataManaRegenerated, SetDataManaRegenerated));
_isDataManaRegeneratedModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataManaRegeneratedModified));
_dataAllowWhenFullRaw = new Lazy<ObjectProperty<int>>(() => new ObjectProperty<int>(GetDataAllowWhenFullRaw, SetDataAllowWhenFullRaw));
_isDataAllowWhenFullModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataAllowWhenFullModified));
_dataAllowWhenFull = new Lazy<ObjectProperty<FullFlags>>(() => new ObjectProperty<FullFlags>(GetDataAllowWhenFull, SetDataAllowWhenFull));
_dataNoTargetRequiredRaw = new Lazy<ObjectProperty<int>>(() => new ObjectProperty<int>(GetDataNoTargetRequiredRaw, SetDataNoTargetRequiredRaw));
_isDataNoTargetRequiredModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataNoTargetRequiredModified));
_dataNoTargetRequired = new Lazy<ObjectProperty<bool>>(() => new ObjectProperty<bool>(GetDataNoTargetRequired, SetDataNoTargetRequired));
_dataDispelOnAttackRaw = new Lazy<ObjectProperty<int>>(() => new ObjectProperty<int>(GetDataDispelOnAttackRaw, SetDataDispelOnAttackRaw));
_isDataDispelOnAttackModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataDispelOnAttackModified));
_dataDispelOnAttack = new Lazy<ObjectProperty<bool>>(() => new ObjectProperty<bool>(GetDataDispelOnAttack, SetDataDispelOnAttack));
}
public ScrollOfLifeRegen(int newId, ObjectDatabaseBase db): base(1819494721, newId, db)
{
_dataLifeRegenerated = new Lazy<ObjectProperty<float>>(() => new ObjectProperty<float>(GetDataLifeRegenerated, SetDataLifeRegenerated));
_isDataLifeRegeneratedModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataLifeRegeneratedModified));
_dataManaRegenerated = new Lazy<ObjectProperty<float>>(() => new ObjectProperty<float>(GetDataManaRegenerated, SetDataManaRegenerated));
_isDataManaRegeneratedModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataManaRegeneratedModified));
_dataAllowWhenFullRaw = new Lazy<ObjectProperty<int>>(() => new ObjectProperty<int>(GetDataAllowWhenFullRaw, SetDataAllowWhenFullRaw));
_isDataAllowWhenFullModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataAllowWhenFullModified));
_dataAllowWhenFull = new Lazy<ObjectProperty<FullFlags>>(() => new ObjectProperty<FullFlags>(GetDataAllowWhenFull, SetDataAllowWhenFull));
_dataNoTargetRequiredRaw = new Lazy<ObjectProperty<int>>(() => new ObjectProperty<int>(GetDataNoTargetRequiredRaw, SetDataNoTargetRequiredRaw));
_isDataNoTargetRequiredModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataNoTargetRequiredModified));
_dataNoTargetRequired = new Lazy<ObjectProperty<bool>>(() => new ObjectProperty<bool>(GetDataNoTargetRequired, SetDataNoTargetRequired));
_dataDispelOnAttackRaw = new Lazy<ObjectProperty<int>>(() => new ObjectProperty<int>(GetDataDispelOnAttackRaw, SetDataDispelOnAttackRaw));
_isDataDispelOnAttackModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataDispelOnAttackModified));
_dataDispelOnAttack = new Lazy<ObjectProperty<bool>>(() => new ObjectProperty<bool>(GetDataDispelOnAttack, SetDataDispelOnAttack));
}
public ScrollOfLifeRegen(string newRawcode, ObjectDatabaseBase db): base(1819494721, newRawcode, db)
{
_dataLifeRegenerated = new Lazy<ObjectProperty<float>>(() => new ObjectProperty<float>(GetDataLifeRegenerated, SetDataLifeRegenerated));
_isDataLifeRegeneratedModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataLifeRegeneratedModified));
_dataManaRegenerated = new Lazy<ObjectProperty<float>>(() => new ObjectProperty<float>(GetDataManaRegenerated, SetDataManaRegenerated));
_isDataManaRegeneratedModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataManaRegeneratedModified));
_dataAllowWhenFullRaw = new Lazy<ObjectProperty<int>>(() => new ObjectProperty<int>(GetDataAllowWhenFullRaw, SetDataAllowWhenFullRaw));
_isDataAllowWhenFullModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataAllowWhenFullModified));
_dataAllowWhenFull = new Lazy<ObjectProperty<FullFlags>>(() => new ObjectProperty<FullFlags>(GetDataAllowWhenFull, SetDataAllowWhenFull));
_dataNoTargetRequiredRaw = new Lazy<ObjectProperty<int>>(() => new ObjectProperty<int>(GetDataNoTargetRequiredRaw, SetDataNoTargetRequiredRaw));
_isDataNoTargetRequiredModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataNoTargetRequiredModified));
_dataNoTargetRequired = new Lazy<ObjectProperty<bool>>(() => new ObjectProperty<bool>(GetDataNoTargetRequired, SetDataNoTargetRequired));
_dataDispelOnAttackRaw = new Lazy<ObjectProperty<int>>(() => new ObjectProperty<int>(GetDataDispelOnAttackRaw, SetDataDispelOnAttackRaw));
_isDataDispelOnAttackModified = new Lazy<ReadOnlyObjectProperty<bool>>(() => new ReadOnlyObjectProperty<bool>(GetIsDataDispelOnAttackModified));
_dataDispelOnAttack = new Lazy<ObjectProperty<bool>>(() => new ObjectProperty<bool>(GetDataDispelOnAttack, SetDataDispelOnAttack));
}
public ObjectProperty<float> DataLifeRegenerated => _dataLifeRegenerated.Value;
public ReadOnlyObjectProperty<bool> IsDataLifeRegeneratedModified => _isDataLifeRegeneratedModified.Value;
public ObjectProperty<float> DataManaRegenerated => _dataManaRegenerated.Value;
public ReadOnlyObjectProperty<bool> IsDataManaRegeneratedModified => _isDataManaRegeneratedModified.Value;
public ObjectProperty<int> DataAllowWhenFullRaw => _dataAllowWhenFullRaw.Value;
public ReadOnlyObjectProperty<bool> IsDataAllowWhenFullModified => _isDataAllowWhenFullModified.Value;
public ObjectProperty<FullFlags> DataAllowWhenFull => _dataAllowWhenFull.Value;
public ObjectProperty<int> DataNoTargetRequiredRaw => _dataNoTargetRequiredRaw.Value;
public ReadOnlyObjectProperty<bool> IsDataNoTargetRequiredModified => _isDataNoTargetRequiredModified.Value;
public ObjectProperty<bool> DataNoTargetRequired => _dataNoTargetRequired.Value;
public ObjectProperty<int> DataDispelOnAttackRaw => _dataDispelOnAttackRaw.Value;
public ReadOnlyObjectProperty<bool> IsDataDispelOnAttackModified => _isDataDispelOnAttackModified.Value;
public ObjectProperty<bool> DataDispelOnAttack => _dataDispelOnAttack.Value;
private float GetDataLifeRegenerated(int level)
{
return _modifications.GetModification(829190761, level).ValueAsFloat;
}
private void SetDataLifeRegenerated(int level, float value)
{
_modifications[829190761, level] = new LevelObjectDataModification{Id = 829190761, Type = ObjectDataType.Unreal, Value = value, Level = level, Pointer = 1};
}
private bool GetIsDataLifeRegeneratedModified(int level)
{
return _modifications.ContainsKey(829190761, level);
}
private float GetDataManaRegenerated(int level)
{
return _modifications.GetModification(845967977, level).ValueAsFloat;
}
private void SetDataManaRegenerated(int level, float value)
{
_modifications[845967977, level] = new LevelObjectDataModification{Id = 845967977, Type = ObjectDataType.Unreal, Value = value, Level = level, Pointer = 2};
}
private bool GetIsDataManaRegeneratedModified(int level)
{
return _modifications.ContainsKey(845967977, level);
}
private int GetDataAllowWhenFullRaw(int level)
{
return _modifications.GetModification(862745193, level).ValueAsInt;
}
private void SetDataAllowWhenFullRaw(int level, int value)
{
_modifications[862745193, level] = new LevelObjectDataModification{Id = 862745193, Type = ObjectDataType.Int, Value = value, Level = level, Pointer = 3};
}
private bool GetIsDataAllowWhenFullModified(int level)
{
return _modifications.ContainsKey(862745193, level);
}
private FullFlags GetDataAllowWhenFull(int level)
{
return GetDataAllowWhenFullRaw(level).ToFullFlags(this);
}
private void SetDataAllowWhenFull(int level, FullFlags value)
{
SetDataAllowWhenFullRaw(level, value.ToRaw(null, null));
}
private int GetDataNoTargetRequiredRaw(int level)
{
return _modifications.GetModification(879522409, level).ValueAsInt;
}
private void SetDataNoTargetRequiredRaw(int level, int value)
{
_modifications[879522409, level] = new LevelObjectDataModification{Id = 879522409, Type = ObjectDataType.Int, Value = value, Level = level, Pointer = 4};
}
private bool GetIsDataNoTargetRequiredModified(int level)
{
return _modifications.ContainsKey(879522409, level);
}
private bool GetDataNoTargetRequired(int level)
{
return GetDataNoTargetRequiredRaw(level).ToBool(this);
}
private void SetDataNoTargetRequired(int level, bool value)
{
SetDataNoTargetRequiredRaw(level, value.ToRaw(null, null));
}
private int GetDataDispelOnAttackRaw(int level)
{
return _modifications.GetModification(896299625, level).ValueAsInt;
}
private void SetDataDispelOnAttackRaw(int level, int value)
{
_modifications[896299625, level] = new LevelObjectDataModification{Id = 896299625, Type = ObjectDataType.Int, Value = value, Level = level, Pointer = 5};
}
private bool GetIsDataDispelOnAttackModified(int level)
{
return _modifications.ContainsKey(896299625, level);
}
private bool GetDataDispelOnAttack(int level)
{
return GetDataDispelOnAttackRaw(level).ToBool(this);
}
private void SetDataDispelOnAttack(int level, bool value)
{
SetDataDispelOnAttackRaw(level, value.ToRaw(null, null));
}
}
} | 76.748988 | 168 | 0.739357 | [
"MIT"
] | YakaryBovine/AzerothWarsCSharp | src/War3Api.Object/Generated/1.32.10.17734/Abilities/ScrollOfLifeRegen.cs | 18,957 | C# |
namespace Pea.Core
{
public interface INeighborhoodCostDetector
{
double GetCost(int first, int second);
}
}
| 16.25 | 46 | 0.661538 | [
"Apache-2.0"
] | bewaretech/PEA.NET | src/PEA/PEA/Core/INeighborhoodCostDetector.cs | 132 | C# |
namespace Windows.UI.Xaml.Media.Animation;
public enum SlideNavigationTransitionEffect
{
FromBottom,
FromLeft,
FromRight
}
| 14.111111 | 43 | 0.818898 | [
"MIT"
] | ljcollins25/Codeground | src/UnoApp/UnoDecompile/Uno.UI/Windows.UI.Xaml.Media.Animatio/SlideNavigationTransitionEffec.cs | 127 | C# |
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace DigitalRuby.PyroParticles
{
public class SingleLineAttribute : PropertyAttribute
{
public SingleLineAttribute(string tooltip) { Tooltip = tooltip; }
public string Tooltip { get; private set; }
}
#if UNITY_EDITOR
[CustomPropertyDrawer(typeof(SingleLineAttribute))]
public class SingleLineDrawer : PropertyDrawer
{
private void DrawIntTextField(Rect position, SerializedProperty prop)
{
EditorGUI.BeginChangeCheck();
int value = EditorGUI.IntField(position, string.Empty, prop.intValue);
if (EditorGUI.EndChangeCheck())
{
prop.intValue = value;
}
}
private void DrawFloatTextField(Rect position, SerializedProperty prop)
{
EditorGUI.BeginChangeCheck();
float value = EditorGUI.FloatField(position, string.Empty, prop.floatValue);
if (EditorGUI.EndChangeCheck())
{
prop.floatValue = value;
}
}
private void DrawRangeField(Rect position, float labelWidth, float textFieldWidth, SerializedProperty prop, bool floatingPoint)
{
position.width = labelWidth;
EditorGUI.LabelField(position, new GUIContent("Min", "Minimum value"));
position.x += labelWidth;
position.width = textFieldWidth;
if (floatingPoint)
{
DrawFloatTextField(position, prop.FindPropertyRelative("Minimum"));
}
else
{
DrawIntTextField(position, prop.FindPropertyRelative("Minimum"));
}
position.x += textFieldWidth;
position.width = labelWidth;
EditorGUI.LabelField(position, new GUIContent("Max", "Maximum value"));
position.x += labelWidth;
position.width = textFieldWidth;
if (floatingPoint)
{
DrawFloatTextField(position, prop.FindPropertyRelative("Maximum"));
}
else
{
DrawIntTextField(position, prop.FindPropertyRelative("Maximum"));
}
}
public override void OnGUI(Rect position, SerializedProperty prop, GUIContent label)
{
EditorGUI.BeginProperty(position, label, prop);
int indent = EditorGUI.indentLevel;
EditorGUI.indentLevel = 0;
position = EditorGUI.PrefixLabel(position, GUIUtility.GetControlID(FocusType.Passive), new GUIContent(label.text, (attribute as SingleLineAttribute).Tooltip));
const float labelWidth = 32.0f;
float widthAvailable = position.width - (labelWidth * 2.0f);
float textFieldWidth = widthAvailable * 0.5f;
switch (prop.type)
{
case "RangeOfIntegers":
DrawRangeField(position, labelWidth, textFieldWidth, prop, false);
break;
case "RangeOfFloats":
DrawRangeField(position, labelWidth, textFieldWidth, prop, true);
break;
default:
EditorGUI.HelpBox(position, "[Compact] doesn't work with type '" + prop.type + "'", MessageType.Error);
break;
}
EditorGUI.indentLevel = indent;
EditorGUI.EndProperty();
}
}
#endif
}
| 34.590476 | 172 | 0.561674 | [
"MIT"
] | Lanboost/GameJam2018-07-13 | Assets/store/PyroParticles/Prefab/Script/SingleLineAttribute.cs | 3,634 | C# |
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace Org.OpenAPITools.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class InlineResponse20030Result {
/// <summary>
/// Gets or Sets Success
/// </summary>
[DataMember(Name="success", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "success")]
public bool? Success { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
var sb = new StringBuilder();
sb.Append("class InlineResponse20030Result {\n");
sb.Append(" Success: ").Append(Success).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}
| 25.911111 | 68 | 0.649228 | [
"MIT"
] | LightVolk/Dtf-Client-API | src/main/CsharpDotNet2/Org/OpenAPITools/Model/InlineResponse20030Result.cs | 1,166 | C# |
#region License
/*
* HttpListenerResponse.cs
*
* This code is derived from HttpListenerResponse.cs (System.Net) of Mono
* (http://www.mono-project.com).
*
* The MIT License
*
* Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
* Copyright (c) 2012-2021 sta.blockhead
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#endregion
#region Authors
/*
* Authors:
* - Gonzalo Paniagua Javier <gonzalo@novell.com>
*/
#endregion
#region Contributors
/*
* Contributors:
* - Nicholas Devenish
*/
#endregion
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
namespace WebSocketSharp.Net
{
/// <summary>
/// Represents an HTTP response to an HTTP request received by
/// a <see cref="HttpListener"/> instance.
/// </summary>
/// <remarks>
/// This class cannot be inherited.
/// </remarks>
public sealed class HttpListenerResponse : IDisposable
{
#region Private Fields
private bool _closeConnection;
private Encoding _contentEncoding;
private long _contentLength;
private string _contentType;
private HttpListenerContext _context;
private CookieCollection _cookies;
private bool _disposed;
private WebHeaderCollection _headers;
private bool _headersSent;
private bool _keepAlive;
private ResponseStream _outputStream;
private Uri _redirectLocation;
private bool _sendChunked;
private int _statusCode;
private string _statusDescription;
private Version _version;
#endregion
#region Internal Constructors
internal HttpListenerResponse (HttpListenerContext context)
{
_context = context;
_keepAlive = true;
_statusCode = 200;
_statusDescription = "OK";
_version = HttpVersion.Version11;
}
#endregion
#region Internal Properties
internal bool CloseConnection {
get {
return _closeConnection;
}
set {
_closeConnection = value;
}
}
internal WebHeaderCollection FullHeaders {
get {
var headers = new WebHeaderCollection (HttpHeaderType.Response, true);
if (_headers != null)
headers.Add (_headers);
if (_contentType != null) {
headers.InternalSet (
"Content-Type",
createContentTypeHeaderText (_contentType, _contentEncoding),
true
);
}
if (headers["Server"] == null)
headers.InternalSet ("Server", "websocket-sharp/1.0", true);
if (headers["Date"] == null) {
headers.InternalSet (
"Date",
DateTime.UtcNow.ToString ("r", CultureInfo.InvariantCulture),
true
);
}
if (_sendChunked) {
headers.InternalSet ("Transfer-Encoding", "chunked", true);
}
else {
headers.InternalSet (
"Content-Length",
_contentLength.ToString (CultureInfo.InvariantCulture),
true
);
}
/*
* Apache forces closing the connection for these status codes:
* - 400 Bad Request
* - 408 Request Timeout
* - 411 Length Required
* - 413 Request Entity Too Large
* - 414 Request-Uri Too Long
* - 500 Internal Server Error
* - 503 Service Unavailable
*/
var closeConn = !_context.Request.KeepAlive
|| !_keepAlive
|| _statusCode == 400
|| _statusCode == 408
|| _statusCode == 411
|| _statusCode == 413
|| _statusCode == 414
|| _statusCode == 500
|| _statusCode == 503;
var reuses = _context.Connection.Reuses;
if (closeConn || reuses >= 100) {
headers.InternalSet ("Connection", "close", true);
}
else {
headers.InternalSet (
"Keep-Alive",
String.Format ("timeout=15,max={0}", 100 - reuses),
true
);
if (_context.Request.ProtocolVersion < HttpVersion.Version11)
headers.InternalSet ("Connection", "keep-alive", true);
}
if (_redirectLocation != null)
headers.InternalSet ("Location", _redirectLocation.AbsoluteUri, true);
if (_cookies != null) {
foreach (var cookie in _cookies) {
headers.InternalSet (
"Set-Cookie",
cookie.ToResponseString (),
true
);
}
}
return headers;
}
}
internal bool HeadersSent {
get {
return _headersSent;
}
set {
_headersSent = value;
}
}
internal string StatusLine {
get {
return String.Format (
"HTTP/{0} {1} {2}\r\n",
_version,
_statusCode,
_statusDescription
);
}
}
#endregion
#region Public Properties
/// <summary>
/// Gets or sets the encoding for the entity body data included in
/// the response.
/// </summary>
/// <value>
/// <para>
/// A <see cref="Encoding"/> that represents the encoding for
/// the entity body data.
/// </para>
/// <para>
/// <see langword="null"/> if no encoding is specified.
/// </para>
/// <para>
/// The default value is <see langword="null"/>.
/// </para>
/// </value>
/// <exception cref="InvalidOperationException">
/// The response is already being sent.
/// </exception>
/// <exception cref="ObjectDisposedException">
/// This instance is closed.
/// </exception>
public Encoding ContentEncoding {
get {
return _contentEncoding;
}
set {
if (_disposed) {
var name = GetType ().ToString ();
throw new ObjectDisposedException (name);
}
if (_headersSent) {
var msg = "The response is already being sent.";
throw new InvalidOperationException (msg);
}
_contentEncoding = value;
}
}
/// <summary>
/// Gets or sets the number of bytes in the entity body data included in
/// the response.
/// </summary>
/// <value>
/// <para>
/// A <see cref="long"/> that represents the number of bytes in
/// the entity body data.
/// </para>
/// <para>
/// It is used for the value of the Content-Length header.
/// </para>
/// <para>
/// The default value is zero.
/// </para>
/// </value>
/// <exception cref="ArgumentOutOfRangeException">
/// The value specified for a set operation is less than zero.
/// </exception>
/// <exception cref="InvalidOperationException">
/// The response is already being sent.
/// </exception>
/// <exception cref="ObjectDisposedException">
/// This instance is closed.
/// </exception>
public long ContentLength64 {
get {
return _contentLength;
}
set {
if (_disposed) {
var name = GetType ().ToString ();
throw new ObjectDisposedException (name);
}
if (_headersSent) {
var msg = "The response is already being sent.";
throw new InvalidOperationException (msg);
}
if (value < 0) {
var msg = "Less than zero.";
throw new ArgumentOutOfRangeException (msg, "value");
}
_contentLength = value;
}
}
/// <summary>
/// Gets or sets the media type of the entity body included in
/// the response.
/// </summary>
/// <value>
/// <para>
/// A <see cref="string"/> that represents the media type of
/// the entity body.
/// </para>
/// <para>
/// It is used for the value of the Content-Type header.
/// </para>
/// <para>
/// <see langword="null"/> if no media type is specified.
/// </para>
/// <para>
/// The default value is <see langword="null"/>.
/// </para>
/// </value>
/// <exception cref="ArgumentException">
/// <para>
/// The value specified for a set operation is an empty string.
/// </para>
/// <para>
/// -or-
/// </para>
/// <para>
/// The value specified for a set operation contains
/// an invalid character.
/// </para>
/// </exception>
/// <exception cref="InvalidOperationException">
/// The response is already being sent.
/// </exception>
/// <exception cref="ObjectDisposedException">
/// This instance is closed.
/// </exception>
public string ContentType {
get {
return _contentType;
}
set {
if (_disposed) {
var name = GetType ().ToString ();
throw new ObjectDisposedException (name);
}
if (_headersSent) {
var msg = "The response is already being sent.";
throw new InvalidOperationException (msg);
}
if (value == null) {
_contentType = null;
return;
}
if (value.Length == 0) {
var msg = "An empty string.";
throw new ArgumentException (msg, "value");
}
if (!isValidForContentType (value)) {
var msg = "It contains an invalid character.";
throw new ArgumentException (msg, "value");
}
_contentType = value;
}
}
/// <summary>
/// Gets or sets the collection of cookies sent with the response.
/// </summary>
/// <value>
/// A <see cref="CookieCollection"/> that contains the cookies sent with
/// the response.
/// </value>
public CookieCollection Cookies {
get {
if (_cookies == null)
_cookies = new CookieCollection ();
return _cookies;
}
set {
_cookies = value;
}
}
/// <summary>
/// Gets or sets the collection of the HTTP headers sent to the client.
/// </summary>
/// <value>
/// A <see cref="WebHeaderCollection"/> that contains the headers sent to
/// the client.
/// </value>
/// <exception cref="InvalidOperationException">
/// The value specified for a set operation is not valid for a response.
/// </exception>
public WebHeaderCollection Headers {
get {
if (_headers == null)
_headers = new WebHeaderCollection (HttpHeaderType.Response, false);
return _headers;
}
set {
if (value == null) {
_headers = null;
return;
}
if (value.State != HttpHeaderType.Response) {
var msg = "The value is not valid for a response.";
throw new InvalidOperationException (msg);
}
_headers = value;
}
}
/// <summary>
/// Gets or sets a value indicating whether the server requests
/// a persistent connection.
/// </summary>
/// <value>
/// <para>
/// <c>true</c> if the server requests a persistent connection;
/// otherwise, <c>false</c>.
/// </para>
/// <para>
/// The default value is <c>true</c>.
/// </para>
/// </value>
/// <exception cref="InvalidOperationException">
/// The response is already being sent.
/// </exception>
/// <exception cref="ObjectDisposedException">
/// This instance is closed.
/// </exception>
public bool KeepAlive {
get {
return _keepAlive;
}
set {
if (_disposed) {
var name = GetType ().ToString ();
throw new ObjectDisposedException (name);
}
if (_headersSent) {
var msg = "The response is already being sent.";
throw new InvalidOperationException (msg);
}
_keepAlive = value;
}
}
/// <summary>
/// Gets a stream instance to which the entity body data can be written.
/// </summary>
/// <value>
/// A <see cref="Stream"/> instance to which the entity body data can be
/// written.
/// </value>
/// <exception cref="ObjectDisposedException">
/// This instance is closed.
/// </exception>
public Stream OutputStream {
get {
if (_disposed) {
var name = GetType ().ToString ();
throw new ObjectDisposedException (name);
}
if (_outputStream == null)
_outputStream = _context.Connection.GetResponseStream ();
return _outputStream;
}
}
/// <summary>
/// Gets the HTTP version used for the response.
/// </summary>
/// <value>
/// <para>
/// A <see cref="Version"/> that represents the HTTP version used for
/// the response.
/// </para>
/// <para>
/// Always returns same as 1.1.
/// </para>
/// </value>
public Version ProtocolVersion {
get {
return _version;
}
}
/// <summary>
/// Gets or sets the URL to which the client is redirected to locate
/// a requested resource.
/// </summary>
/// <value>
/// <para>
/// A <see cref="string"/> that represents the absolute URL for
/// the redirect location.
/// </para>
/// <para>
/// It is used for the value of the Location header.
/// </para>
/// <para>
/// <see langword="null"/> if no redirect location is specified.
/// </para>
/// <para>
/// The default value is <see langword="null"/>.
/// </para>
/// </value>
/// <exception cref="ArgumentException">
/// <para>
/// The value specified for a set operation is an empty string.
/// </para>
/// <para>
/// -or-
/// </para>
/// <para>
/// The value specified for a set operation is not an absolute URL.
/// </para>
/// </exception>
/// <exception cref="InvalidOperationException">
/// The response is already being sent.
/// </exception>
/// <exception cref="ObjectDisposedException">
/// This instance is closed.
/// </exception>
public string RedirectLocation {
get {
return _redirectLocation != null
? _redirectLocation.OriginalString
: null;
}
set {
if (_disposed) {
var name = GetType ().ToString ();
throw new ObjectDisposedException (name);
}
if (_headersSent) {
var msg = "The response is already being sent.";
throw new InvalidOperationException (msg);
}
if (value == null) {
_redirectLocation = null;
return;
}
if (value.Length == 0) {
var msg = "An empty string.";
throw new ArgumentException (msg, "value");
}
Uri uri;
if (!Uri.TryCreate (value, UriKind.Absolute, out uri)) {
var msg = "Not an absolute URL.";
throw new ArgumentException (msg, "value");
}
_redirectLocation = uri;
}
}
/// <summary>
/// Gets or sets a value indicating whether the response uses the chunked
/// transfer encoding.
/// </summary>
/// <value>
/// <para>
/// <c>true</c> if the response uses the chunked transfer encoding;
/// otherwise, <c>false</c>.
/// </para>
/// <para>
/// The default value is <c>false</c>.
/// </para>
/// </value>
/// <exception cref="InvalidOperationException">
/// The response is already being sent.
/// </exception>
/// <exception cref="ObjectDisposedException">
/// This instance is closed.
/// </exception>
public bool SendChunked {
get {
return _sendChunked;
}
set {
if (_disposed) {
var name = GetType ().ToString ();
throw new ObjectDisposedException (name);
}
if (_headersSent) {
var msg = "The response is already being sent.";
throw new InvalidOperationException (msg);
}
_sendChunked = value;
}
}
/// <summary>
/// Gets or sets the HTTP status code returned to the client.
/// </summary>
/// <value>
/// <para>
/// An <see cref="int"/> that represents the HTTP status code for
/// the response to the request.
/// </para>
/// <para>
/// The default value is 200. It indicates that the request has
/// succeeded.
/// </para>
/// </value>
/// <exception cref="InvalidOperationException">
/// The response is already being sent.
/// </exception>
/// <exception cref="ObjectDisposedException">
/// This instance is closed.
/// </exception>
/// <exception cref="System.Net.ProtocolViolationException">
/// <para>
/// The value specified for a set operation is invalid.
/// </para>
/// <para>
/// Valid values are between 100 and 999 inclusive.
/// </para>
/// </exception>
public int StatusCode {
get {
return _statusCode;
}
set {
if (_disposed) {
var name = GetType ().ToString ();
throw new ObjectDisposedException (name);
}
if (_headersSent) {
var msg = "The response is already being sent.";
throw new InvalidOperationException (msg);
}
if (value < 100 || value > 999) {
var msg = "A value is not between 100 and 999 inclusive.";
throw new System.Net.ProtocolViolationException (msg);
}
_statusCode = value;
_statusDescription = value.GetStatusDescription ();
}
}
/// <summary>
/// Gets or sets the description of the HTTP status code returned to
/// the client.
/// </summary>
/// <value>
/// <para>
/// A <see cref="string"/> that represents the description of
/// the HTTP status code for the response to the request.
/// </para>
/// <para>
/// The default value is
/// the <see href="http://tools.ietf.org/html/rfc2616#section-10">
/// RFC 2616</see> description for the <see cref="StatusCode"/>
/// property value.
/// </para>
/// <para>
/// An empty string if an RFC 2616 description does not exist.
/// </para>
/// </value>
/// <exception cref="ArgumentNullException">
/// The value specified for a set operation is <see langword="null"/>.
/// </exception>
/// <exception cref="ArgumentException">
/// The value specified for a set operation contains an invalid character.
/// </exception>
/// <exception cref="InvalidOperationException">
/// The response is already being sent.
/// </exception>
/// <exception cref="ObjectDisposedException">
/// This instance is closed.
/// </exception>
public string StatusDescription {
get {
return _statusDescription;
}
set {
if (_disposed) {
var name = GetType ().ToString ();
throw new ObjectDisposedException (name);
}
if (_headersSent) {
var msg = "The response is already being sent.";
throw new InvalidOperationException (msg);
}
if (value == null)
throw new ArgumentNullException ("value");
if (value.Length == 0) {
_statusDescription = _statusCode.GetStatusDescription ();
return;
}
if (!isValidForStatusDescription (value)) {
var msg = "It contains an invalid character.";
throw new ArgumentException (msg, "value");
}
_statusDescription = value;
}
}
#endregion
#region Private Methods
private bool canSetCookie (Cookie cookie)
{
var found = findCookie (cookie).ToList ();
if (found.Count == 0)
return true;
var ver = cookie.Version;
foreach (var c in found) {
if (c.Version == ver)
return true;
}
return false;
}
private void close (bool force)
{
_disposed = true;
_context.Connection.Close (force);
}
private void close (byte[] responseEntity, int bufferLength, bool willBlock)
{
var stream = OutputStream;
if (willBlock) {
stream.WriteBytes (responseEntity, bufferLength);
close (false);
return;
}
stream.WriteBytesAsync (
responseEntity,
bufferLength,
() => close (false),
null
);
}
private static string createContentTypeHeaderText (
string value, Encoding encoding
)
{
if (value.IndexOf ("charset=", StringComparison.Ordinal) > -1)
return value;
if (encoding == null)
return value;
return String.Format ("{0}; charset={1}", value, encoding.WebName);
}
private IEnumerable<Cookie> findCookie (Cookie cookie)
{
if (_cookies == null || _cookies.Count == 0)
yield break;
foreach (var c in _cookies) {
if (c.EqualsWithoutValueAndVersion (cookie))
yield return c;
}
}
private static bool isValidForContentType (string value)
{
foreach (var c in value) {
if (c < 0x20)
return false;
if (c > 0x7e)
return false;
if ("()<>@:\\[]?{}".IndexOf (c) > -1)
return false;
}
return true;
}
private static bool isValidForStatusDescription (string value)
{
foreach (var c in value) {
if (c < 0x20)
return false;
if (c > 0x7e)
return false;
}
return true;
}
#endregion
#region Public Methods
/// <summary>
/// Closes the connection to the client without sending a response.
/// </summary>
public void Abort ()
{
if (_disposed)
return;
close (true);
}
/// <summary>
/// Appends the specified cookie to the cookies sent with the response.
/// </summary>
/// <param name="cookie">
/// A <see cref="Cookie"/> to append.
/// </param>
/// <exception cref="ArgumentNullException">
/// <paramref name="cookie"/> is <see langword="null"/>.
/// </exception>
public void AppendCookie (Cookie cookie)
{
Cookies.Add (cookie);
}
/// <summary>
/// Appends an HTTP header with the specified name and value to
/// the headers for the response.
/// </summary>
/// <param name="name">
/// A <see cref="string"/> that specifies the name of the header to
/// append.
/// </param>
/// <param name="value">
/// A <see cref="string"/> that specifies the value of the header to
/// append.
/// </param>
/// <exception cref="ArgumentNullException">
/// <paramref name="name"/> is <see langword="null"/>.
/// </exception>
/// <exception cref="ArgumentException">
/// <para>
/// <paramref name="name"/> is an empty string.
/// </para>
/// <para>
/// -or-
/// </para>
/// <para>
/// <paramref name="name"/> is a string of spaces.
/// </para>
/// <para>
/// -or-
/// </para>
/// <para>
/// <paramref name="name"/> contains an invalid character.
/// </para>
/// <para>
/// -or-
/// </para>
/// <para>
/// <paramref name="value"/> contains an invalid character.
/// </para>
/// <para>
/// -or-
/// </para>
/// <para>
/// <paramref name="name"/> is a restricted header name.
/// </para>
/// </exception>
/// <exception cref="ArgumentOutOfRangeException">
/// The length of <paramref name="value"/> is greater than 65,535
/// characters.
/// </exception>
/// <exception cref="InvalidOperationException">
/// The current headers do not allow the header.
/// </exception>
public void AppendHeader (string name, string value)
{
Headers.Add (name, value);
}
/// <summary>
/// Sends the response to the client and releases the resources used by
/// this instance.
/// </summary>
public void Close ()
{
if (_disposed)
return;
close (false);
}
/// <summary>
/// Sends the response with the specified entity body data to the client
/// and releases the resources used by this instance.
/// </summary>
/// <param name="responseEntity">
/// An array of <see cref="byte"/> that contains the entity body data.
/// </param>
/// <param name="willBlock">
/// A <see cref="bool"/>: <c>true</c> if this method blocks execution while
/// flushing the stream to the client; otherwise, <c>false</c>.
/// </param>
/// <exception cref="ArgumentNullException">
/// <paramref name="responseEntity"/> is <see langword="null"/>.
/// </exception>
/// <exception cref="ObjectDisposedException">
/// This instance is closed.
/// </exception>
public void Close (byte[] responseEntity, bool willBlock)
{
if (_disposed) {
var name = GetType ().ToString ();
throw new ObjectDisposedException (name);
}
if (responseEntity == null)
throw new ArgumentNullException ("responseEntity");
var len = responseEntity.LongLength;
if (len > Int32.MaxValue) {
close (responseEntity, 1024, willBlock);
return;
}
var stream = OutputStream;
if (willBlock) {
stream.Write (responseEntity, 0, (int) len);
close (false);
return;
}
stream.BeginWrite (
responseEntity,
0,
(int) len,
ar => {
stream.EndWrite (ar);
close (false);
},
null
);
}
/// <summary>
/// Copies some properties from the specified response instance to
/// this instance.
/// </summary>
/// <param name="templateResponse">
/// A <see cref="HttpListenerResponse"/> to copy.
/// </param>
/// <exception cref="ArgumentNullException">
/// <paramref name="templateResponse"/> is <see langword="null"/>.
/// </exception>
public void CopyFrom (HttpListenerResponse templateResponse)
{
if (templateResponse == null)
throw new ArgumentNullException ("templateResponse");
var headers = templateResponse._headers;
if (headers != null) {
if (_headers != null)
_headers.Clear ();
Headers.Add (headers);
}
else {
_headers = null;
}
_contentLength = templateResponse._contentLength;
_statusCode = templateResponse._statusCode;
_statusDescription = templateResponse._statusDescription;
_keepAlive = templateResponse._keepAlive;
_version = templateResponse._version;
}
/// <summary>
/// Configures the response to redirect the client's request to
/// the specified URL.
/// </summary>
/// <remarks>
/// This method sets the <see cref="RedirectLocation"/> property to
/// <paramref name="url"/>, the <see cref="StatusCode"/> property to
/// 302, and the <see cref="StatusDescription"/> property to "Found".
/// </remarks>
/// <param name="url">
/// A <see cref="string"/> that specifies the absolute URL to which
/// the client is redirected to locate a requested resource.
/// </param>
/// <exception cref="ArgumentNullException">
/// <paramref name="url"/> is <see langword="null"/>.
/// </exception>
/// <exception cref="ArgumentException">
/// <para>
/// <paramref name="url"/> is an empty string.
/// </para>
/// <para>
/// -or-
/// </para>
/// <para>
/// <paramref name="url"/> is not an absolute URL.
/// </para>
/// </exception>
/// <exception cref="InvalidOperationException">
/// The response is already being sent.
/// </exception>
/// <exception cref="ObjectDisposedException">
/// This instance is closed.
/// </exception>
public void Redirect (string url)
{
if (_disposed) {
var name = GetType ().ToString ();
throw new ObjectDisposedException (name);
}
if (_headersSent) {
var msg = "The response is already being sent.";
throw new InvalidOperationException (msg);
}
if (url == null)
throw new ArgumentNullException ("url");
if (url.Length == 0) {
var msg = "An empty string.";
throw new ArgumentException (msg, "url");
}
Uri uri;
if (!Uri.TryCreate (url, UriKind.Absolute, out uri)) {
var msg = "Not an absolute URL.";
throw new ArgumentException (msg, "url");
}
_redirectLocation = uri;
_statusCode = 302;
_statusDescription = "Found";
}
/// <summary>
/// Adds or updates a cookie in the cookies sent with the response.
/// </summary>
/// <param name="cookie">
/// A <see cref="Cookie"/> to set.
/// </param>
/// <exception cref="ArgumentNullException">
/// <paramref name="cookie"/> is <see langword="null"/>.
/// </exception>
/// <exception cref="ArgumentException">
/// <paramref name="cookie"/> already exists in the cookies but
/// it cannot be updated.
/// </exception>
public void SetCookie (Cookie cookie)
{
if (cookie == null)
throw new ArgumentNullException ("cookie");
if (!canSetCookie (cookie)) {
var msg = "It cannot be updated.";
throw new ArgumentException (msg, "cookie");
}
Cookies.Add (cookie);
}
/// <summary>
/// Adds or updates an HTTP header with the specified name and value in
/// the headers for the response.
/// </summary>
/// <param name="name">
/// A <see cref="string"/> that specifies the name of the header to set.
/// </param>
/// <param name="value">
/// A <see cref="string"/> that specifies the value of the header to set.
/// </param>
/// <exception cref="ArgumentNullException">
/// <paramref name="name"/> is <see langword="null"/>.
/// </exception>
/// <exception cref="ArgumentException">
/// <para>
/// <paramref name="name"/> is an empty string.
/// </para>
/// <para>
/// -or-
/// </para>
/// <para>
/// <paramref name="name"/> is a string of spaces.
/// </para>
/// <para>
/// -or-
/// </para>
/// <para>
/// <paramref name="name"/> contains an invalid character.
/// </para>
/// <para>
/// -or-
/// </para>
/// <para>
/// <paramref name="value"/> contains an invalid character.
/// </para>
/// <para>
/// -or-
/// </para>
/// <para>
/// <paramref name="name"/> is a restricted header name.
/// </para>
/// </exception>
/// <exception cref="ArgumentOutOfRangeException">
/// The length of <paramref name="value"/> is greater than 65,535
/// characters.
/// </exception>
/// <exception cref="InvalidOperationException">
/// The current headers do not allow the header.
/// </exception>
public void SetHeader (string name, string value)
{
Headers.Set (name, value);
}
#endregion
#region Explicit Interface Implementations
/// <summary>
/// Releases all resources used by this instance.
/// </summary>
void IDisposable.Dispose ()
{
if (_disposed)
return;
close (true);
}
#endregion
}
}
| 27.428333 | 80 | 0.5525 | [
"MIT"
] | 4real/websocket-sharp | websocket-sharp/Net/HttpListenerResponse.cs | 32,914 | C# |
using Bogus;
using System;
using System.Linq;
namespace AutoBogus
{
internal sealed class AutoConfigBuilder
: IAutoFakerDefaultConfigBuilder, IAutoGenerateConfigBuilder, IAutoFakerConfigBuilder
{
internal AutoConfigBuilder(AutoConfig config)
{
Config = config;
}
internal AutoConfig Config { get; }
internal object[] Args { get; private set; }
IAutoFakerDefaultConfigBuilder IAutoConfigBuilder<IAutoFakerDefaultConfigBuilder>.WithLocale(string locale) => WithLocale<IAutoFakerDefaultConfigBuilder>(locale, this);
IAutoFakerDefaultConfigBuilder IAutoConfigBuilder<IAutoFakerDefaultConfigBuilder>.WithRepeatCount(int count) => WithRepeatCount<IAutoFakerDefaultConfigBuilder>(context => count, this);
IAutoFakerDefaultConfigBuilder IAutoConfigBuilder<IAutoFakerDefaultConfigBuilder>.WithRepeatCount(Func<AutoGenerateContext, int> count) => WithRepeatCount<IAutoFakerDefaultConfigBuilder>(count, this);
IAutoFakerDefaultConfigBuilder IAutoConfigBuilder<IAutoFakerDefaultConfigBuilder>.WithDataTableRowCount(int count) => WithDataTableRowCount<IAutoFakerDefaultConfigBuilder>(context => count, this);
IAutoFakerDefaultConfigBuilder IAutoConfigBuilder<IAutoFakerDefaultConfigBuilder>.WithDataTableRowCount(Func<AutoGenerateContext, int> count) => WithDataTableRowCount<IAutoFakerDefaultConfigBuilder>(count, this);
IAutoFakerDefaultConfigBuilder IAutoConfigBuilder<IAutoFakerDefaultConfigBuilder>.WithRecursiveDepth(int depth) => WithRecursiveDepth<IAutoFakerDefaultConfigBuilder>(context => depth, this);
IAutoFakerDefaultConfigBuilder IAutoConfigBuilder<IAutoFakerDefaultConfigBuilder>.WithRecursiveDepth(Func<AutoGenerateContext, int> depth) => WithRecursiveDepth<IAutoFakerDefaultConfigBuilder>(depth, this);
IAutoFakerDefaultConfigBuilder IAutoConfigBuilder<IAutoFakerDefaultConfigBuilder>.WithTreeDepth(int? depth) => WithTreeDepth<IAutoFakerDefaultConfigBuilder>(context => depth, this);
IAutoFakerDefaultConfigBuilder IAutoConfigBuilder<IAutoFakerDefaultConfigBuilder>.WithTreeDepth(Func<AutoGenerateContext, int?> depth) => WithTreeDepth<IAutoFakerDefaultConfigBuilder>(depth, this);
IAutoFakerDefaultConfigBuilder IAutoConfigBuilder<IAutoFakerDefaultConfigBuilder>.WithBinder(IAutoBinder binder) => WithBinder<IAutoFakerDefaultConfigBuilder>(binder, this);
IAutoFakerDefaultConfigBuilder IAutoConfigBuilder<IAutoFakerDefaultConfigBuilder>.WithFakerHub(Faker fakerHub) => WithFakerHub<IAutoFakerDefaultConfigBuilder>(fakerHub, this);
IAutoFakerDefaultConfigBuilder IAutoConfigBuilder<IAutoFakerDefaultConfigBuilder>.WithSkip(Type type) => WithSkip<IAutoFakerDefaultConfigBuilder>(type, this);
IAutoFakerDefaultConfigBuilder IAutoConfigBuilder<IAutoFakerDefaultConfigBuilder>.WithSkip(Type type, string memberName) => WithSkip<IAutoFakerDefaultConfigBuilder>(type, memberName, this);
IAutoFakerDefaultConfigBuilder IAutoConfigBuilder<IAutoFakerDefaultConfigBuilder>.WithSkip<TType>(string memberName) => WithSkip<IAutoFakerDefaultConfigBuilder, TType>(memberName, this);
IAutoFakerDefaultConfigBuilder IAutoConfigBuilder<IAutoFakerDefaultConfigBuilder>.WithOverride(AutoGeneratorOverride generatorOverride) => WithOverride<IAutoFakerDefaultConfigBuilder>(generatorOverride, this);
IAutoGenerateConfigBuilder IAutoConfigBuilder<IAutoGenerateConfigBuilder>.WithLocale(string locale) => WithLocale<IAutoGenerateConfigBuilder>(locale, this);
IAutoGenerateConfigBuilder IAutoConfigBuilder<IAutoGenerateConfigBuilder>.WithRepeatCount(int count) => WithRepeatCount<IAutoGenerateConfigBuilder>(context => count, this);
IAutoGenerateConfigBuilder IAutoConfigBuilder<IAutoGenerateConfigBuilder>.WithRepeatCount(Func<AutoGenerateContext, int> count) => WithRepeatCount<IAutoGenerateConfigBuilder>(count, this);
IAutoGenerateConfigBuilder IAutoConfigBuilder<IAutoGenerateConfigBuilder>.WithDataTableRowCount(int count) => WithDataTableRowCount<IAutoGenerateConfigBuilder>(context => count, this);
IAutoGenerateConfigBuilder IAutoConfigBuilder<IAutoGenerateConfigBuilder>.WithDataTableRowCount(Func<AutoGenerateContext, int> count) => WithDataTableRowCount<IAutoGenerateConfigBuilder>(count, this);
IAutoGenerateConfigBuilder IAutoConfigBuilder<IAutoGenerateConfigBuilder>.WithRecursiveDepth(int depth) => WithRecursiveDepth<IAutoGenerateConfigBuilder>(context => depth, this);
IAutoGenerateConfigBuilder IAutoConfigBuilder<IAutoGenerateConfigBuilder>.WithRecursiveDepth(Func<AutoGenerateContext, int> depth) => WithRecursiveDepth<IAutoGenerateConfigBuilder>(depth, this);
IAutoGenerateConfigBuilder IAutoConfigBuilder<IAutoGenerateConfigBuilder>.WithTreeDepth(int? depth) => WithTreeDepth<IAutoGenerateConfigBuilder>(context => depth, this);
IAutoGenerateConfigBuilder IAutoConfigBuilder<IAutoGenerateConfigBuilder>.WithTreeDepth(Func<AutoGenerateContext, int?> depth) => WithTreeDepth<IAutoGenerateConfigBuilder>(depth, this);
IAutoGenerateConfigBuilder IAutoConfigBuilder<IAutoGenerateConfigBuilder>.WithBinder(IAutoBinder binder) => WithBinder<IAutoGenerateConfigBuilder>(binder, this);
IAutoGenerateConfigBuilder IAutoConfigBuilder<IAutoGenerateConfigBuilder>.WithFakerHub(Faker fakerHub) => WithFakerHub<IAutoGenerateConfigBuilder>(fakerHub, this);
IAutoGenerateConfigBuilder IAutoConfigBuilder<IAutoGenerateConfigBuilder>.WithSkip(Type type) => WithSkip<IAutoGenerateConfigBuilder>(type, this);
IAutoGenerateConfigBuilder IAutoConfigBuilder<IAutoGenerateConfigBuilder>.WithSkip(Type type, string memberName) => WithSkip<IAutoGenerateConfigBuilder>(type, memberName, this);
IAutoGenerateConfigBuilder IAutoConfigBuilder<IAutoGenerateConfigBuilder>.WithSkip<TType>(string memberName) => WithSkip<IAutoGenerateConfigBuilder, TType>(memberName, this);
IAutoGenerateConfigBuilder IAutoConfigBuilder<IAutoGenerateConfigBuilder>.WithOverride(AutoGeneratorOverride generatorOverride) => WithOverride<IAutoGenerateConfigBuilder>(generatorOverride, this);
IAutoFakerConfigBuilder IAutoConfigBuilder<IAutoFakerConfigBuilder>.WithLocale(string locale) => WithLocale<IAutoFakerConfigBuilder>(locale, this);
IAutoFakerConfigBuilder IAutoConfigBuilder<IAutoFakerConfigBuilder>.WithRepeatCount(int count) => WithRepeatCount<IAutoFakerConfigBuilder>(context => count, this);
IAutoFakerConfigBuilder IAutoConfigBuilder<IAutoFakerConfigBuilder>.WithRepeatCount(Func<AutoGenerateContext, int> count) => WithRepeatCount<IAutoFakerConfigBuilder>(count, this);
IAutoFakerConfigBuilder IAutoConfigBuilder<IAutoFakerConfigBuilder>.WithDataTableRowCount(int count) => WithDataTableRowCount<IAutoFakerConfigBuilder>(context => count, this);
IAutoFakerConfigBuilder IAutoConfigBuilder<IAutoFakerConfigBuilder>.WithDataTableRowCount(Func<AutoGenerateContext, int> count) => WithDataTableRowCount<IAutoFakerConfigBuilder>(count, this);
IAutoFakerConfigBuilder IAutoConfigBuilder<IAutoFakerConfigBuilder>.WithRecursiveDepth(int depth) => WithRecursiveDepth<IAutoFakerConfigBuilder>(context => depth, this);
IAutoFakerConfigBuilder IAutoConfigBuilder<IAutoFakerConfigBuilder>.WithRecursiveDepth(Func<AutoGenerateContext, int> depth) => WithRecursiveDepth<IAutoFakerConfigBuilder>(depth, this);
IAutoFakerConfigBuilder IAutoConfigBuilder<IAutoFakerConfigBuilder>.WithTreeDepth(int? depth) => WithTreeDepth<IAutoFakerConfigBuilder>(context => depth, this);
IAutoFakerConfigBuilder IAutoConfigBuilder<IAutoFakerConfigBuilder>.WithTreeDepth(Func<AutoGenerateContext, int?> depth) => WithTreeDepth<IAutoFakerConfigBuilder>(depth, this);
IAutoFakerConfigBuilder IAutoConfigBuilder<IAutoFakerConfigBuilder>.WithBinder(IAutoBinder binder) => WithBinder<IAutoFakerConfigBuilder>(binder, this);
IAutoFakerConfigBuilder IAutoConfigBuilder<IAutoFakerConfigBuilder>.WithFakerHub(Faker fakerHub) => WithFakerHub<IAutoFakerConfigBuilder>(fakerHub, this);
IAutoFakerConfigBuilder IAutoConfigBuilder<IAutoFakerConfigBuilder>.WithSkip(Type type) => WithSkip<IAutoFakerConfigBuilder>(type, this);
IAutoFakerConfigBuilder IAutoConfigBuilder<IAutoFakerConfigBuilder>.WithSkip(Type type, string memberName) => WithSkip<IAutoFakerConfigBuilder>(type, memberName, this);
IAutoFakerConfigBuilder IAutoConfigBuilder<IAutoFakerConfigBuilder>.WithSkip<TType>(string memberName) => WithSkip<IAutoFakerConfigBuilder, TType>(memberName, this);
IAutoFakerConfigBuilder IAutoConfigBuilder<IAutoFakerConfigBuilder>.WithOverride(AutoGeneratorOverride generatorOverride) => WithOverride<IAutoFakerConfigBuilder>(generatorOverride, this);
IAutoFakerConfigBuilder IAutoFakerConfigBuilder.WithArgs(params object[] args) => WithArgs<IAutoFakerConfigBuilder>(args, this);
internal TBuilder WithLocale<TBuilder>(string locale, TBuilder builder)
{
Config.Locale = locale ?? AutoConfig.DefaultLocale;
return builder;
}
internal TBuilder WithRepeatCount<TBuilder>(Func<AutoGenerateContext, int> count, TBuilder builder)
{
Config.RepeatCount = count ?? AutoConfig.DefaultRepeatCount;
return builder;
}
internal TBuilder WithDataTableRowCount<TBuilder>(Func<AutoGenerateContext, int> count, TBuilder builder)
{
Config.DataTableRowCount = count ?? AutoConfig.DefaultDataTableRowCount;
return builder;
}
internal TBuilder WithRecursiveDepth<TBuilder>(Func<AutoGenerateContext, int> depth, TBuilder builder)
{
Config.RecursiveDepth = depth ?? AutoConfig.DefaultRecursiveDepth;
return builder;
}
internal TBuilder WithTreeDepth<TBuilder>(Func<AutoGenerateContext, int?> depth, TBuilder builder)
{
Config.TreeDepth = depth ?? AutoConfig.DefaultTreeDepth;
return builder;
}
internal TBuilder WithBinder<TBuilder>(IAutoBinder binder, TBuilder builder)
{
Config.Binder = binder ?? new AutoBinder();
return builder;
}
internal TBuilder WithFakerHub<TBuilder>(Faker fakerHub, TBuilder builder)
{
Config.FakerHub = fakerHub;
return builder;
}
internal TBuilder WithSkip<TBuilder>(Type type, TBuilder builder)
{
var existing = Config.SkipTypes.Any(t => t == type);
if (!existing)
{
Config.SkipTypes.Add(type);
}
return builder;
}
internal TBuilder WithSkip<TBuilder>(Type type, string memberName, TBuilder builder)
{
if (!string.IsNullOrWhiteSpace(memberName))
{
var path = $"{type.FullName}.{memberName}";
var existing = Config.SkipPaths.Any(s => s == path);
if (!existing)
{
Config.SkipPaths.Add(path);
}
}
return builder;
}
internal TBuilder WithSkip<TBuilder, TType>(string memberName, TBuilder builder)
{
return WithSkip(typeof(TType), memberName, builder);
}
internal TBuilder WithOverride<TBuilder>(AutoGeneratorOverride generatorOverride, TBuilder builder)
{
if (generatorOverride != null)
{
var existing = Config.Overrides.Any(o => o == generatorOverride);
if (!existing)
{
Config.Overrides.Add(generatorOverride);
}
}
return builder;
}
internal TBuilder WithArgs<TBuilder>(object[] args, TBuilder builder)
{
Args = args;
return builder;
}
}
}
| 68.690909 | 216 | 0.804747 | [
"MIT"
] | Ian1971/AutoBogus | src/AutoBogus/AutoConfigBuilder.cs | 11,334 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using UFO.Server.Bll.Common;
using UFO.Server.Common;
using UFO.Server.Dal.Common;
using UFO.Server.Domain;
namespace UFO.Server.Web.REST.Controllers
{
public class CategoriesController : ApiController
{
// GET: Category
public List<Category> Get()
{
return new List<Category> { new Category(), new Category(), new Category() };
}
}
} | 23.727273 | 89 | 0.681992 | [
"Apache-2.0"
] | Xpitfire/ufo | UFO.Server/UFO.Server.Web.REST/Controllers/CategoriesController.cs | 524 | C# |
using System.Security.Principal;
using CAESDO.Recruitment.Core.Abstractions;
using CAESDO.Recruitment.Core.DataInterfaces;
using CAESDO.Recruitment.Core.Domain;
using System.Collections.Generic;
using NHibernate;
using NHibernate.Criterion;
using System.ComponentModel;
using System.Web;
using System.Linq;
using System.Web.Security;
namespace CAESDO.Recruitment.Data
{
/// <summary>
/// Exposes access to NHibernate DAO classes. Motivation for this DAO
/// framework can be found at http://www.hibernate.org/328.html.
/// </summary>
public class NHibernateDaoFactory : IDaoFactory
{
#region Dao Retrieval Operations
public IGenericDao<T, IdT> GetGenericDao<T, IdT>()
{
return new GenericDao<T, IdT>();
}
public IApplicationDao GetApplicationDao()
{
return new ApplicationDao();
}
public IPositionDao GetPositionDao()
{
return new PositionDao();
}
public IApplicantDao GetApplicantDao()
{
return new ApplicantDao();
}
public IProfileDao GetProfileDao()
{
return new ProfileDao();
}
public IDepartmentDao GetDepartmentDao()
{
return new DepartmentDao();
}
public ISurveyDao GetSurveyDao()
{
return new SurveyDao();
}
public IRecruitmentSrcDao GetRecruitmentSrcDao()
{
return new RecruitmentSrcDao();
}
public IEthnicityDao GetEthnicityDao()
{
return new EthnicityDao();
}
public IGenderDao GetGenderDao()
{
return new GenderDao();
}
public IFileDao GetFileDao()
{
return new FileDao();
}
public IEducationDao GetEducationDao()
{
return new EducationDao();
}
public ICurrentPositionDao GetCurrentPositionDao()
{
return new CurrentPositionDao();
}
public ICommitteeMemberDao GetCommitteeMemberDao()
{
return new CommitteeMemberDao();
}
public IUserDao GetUserDao()
{
return new UserDao();
}
public IFileTypeDao GetFileTypeDao()
{
return new FileTypeDao();
}
public IMemberTypeDao GetMemberTypeDao()
{
return new MemberTypeDao();
}
public IChangeTrackingDao GetChangeTrackingDao()
{
return new ChangeTrackingDao();
}
public IChangeTypeDao GetChangeTypeDao()
{
return new ChangeTypeDao();
}
public IThemeDao GetThemeDao()
{
return new ThemeDao();
}
public IUnitDao GetUnitDao()
{
return new UnitDao();
}
public IReferenceDao GetReferenceDao()
{
return new ReferenceDao();
}
public ITemplateTypeDao GetTemplateTypeDao()
{
return new TemplateTypeDao();
}
public ITemplateDao GetTemplateDao()
{
return new TemplateDao();
}
public IDepartmentMemberDao GetDepartmentMemberDao()
{
return new DepartmentMemberDao();
}
#endregion
#region Inline DAO implementations
public class GenericDao<T, IdT> : AbstractNHibernateDao<T, IdT>, IGenericDao<T, IdT> { }
/// <summary>
/// Concrete DAO for accessing instances of <see cref="Customer" /> from DB.
/// This should be extracted into its own class-file if it needs to extend the
/// inherited DAO functionality.
/// </summary>
public class PositionDao : AbstractNHibernateDao<Position, int>, IPositionDao {
[DataObjectMethod(DataObjectMethodType.Select, true)]
public List<Position> GetAllPositionsByStatus(bool Closed, bool AdminAccepted, IPrincipal userContext)
{
return GetAllPositionsByStatus(Closed, AdminAccepted, null, userContext);
}
public List<Position> GetAllPositionsByStatus(bool Closed, bool AdminAccepted, bool? AllowApplications, IPrincipal userContext)
{
return GetAllPositionsByStatusAndDepartment(Closed, AdminAccepted, AllowApplications, null, null, userContext);
}
public List<Position> GetAllPositionsByStatusAndDepartment(bool Closed, bool AdminAccepted, bool? AllowApplications, string DepartmentFIS, string SchoolCode, IPrincipal userContext)
{
DetachedCriteria criteria = DetachedCriteria.For(typeof(Position))
.Add(Restrictions.Eq("Closed", Closed))
.CreateAlias("Departments", "Depts")
.CreateAlias("Depts.Unit", "Unit");
//if (AdminAccepted.HasValue)
criteria.Add(Restrictions.Eq("AdminAccepted", AdminAccepted));
if (AllowApplications.HasValue)
criteria.Add(Restrictions.Eq("AllowApps", AllowApplications.Value));
//Add in the department fis restriction if it exists
if (!string.IsNullOrEmpty(DepartmentFIS))
{
criteria.Add(Restrictions.Eq("Unit.id", DepartmentFIS));
}
if (!string.IsNullOrEmpty(SchoolCode))
{
criteria.Add(Restrictions.Eq("Unit.SchoolCode", SchoolCode));
}
if (userContext != null) //only filter logged in users
{
string username = userContext.Identity.Name;
if (userContext.IsInRole("Admin") == false) //Don't filter if the user is an admin
{
//RecruitmentManagers can only see positions associated with their departments
if (userContext.IsInRole("RecruitmentManager"))
{
criteria.Add(Subqueries.PropertyIn("Depts.DepartmentFIS", GetUnitsForUser(username)));
}
}
}
DetachedCriteria projectIds = criteria.SetProjection(Projections.Id());
//Get the positions eager joined with the departments
var posList = NHibernateSessionManager.Instance.GetSession().CreateCriteria(typeof (Position))
.Add(Subqueries.PropertyIn("id", projectIds))
.AddOrder(Order.Desc("DatePosted"))
.SetFetchMode("Departments", FetchMode.Eager)
.List<Position>();
//We only want a unique copy of these positions
var uniquePositions = new HashSet<Position>(posList);
return uniquePositions.ToList();
}
private static DetachedCriteria GetUnitsForUser(string username)
{
//Get the user's unit associations (by fis, which is the Unit class ID)
DetachedCriteria unitCriteria = DetachedCriteria.For(typeof(User))
.CreateAlias("LoginIDs", "Logins")
.Add(Restrictions.Eq("Logins.id", username))
.CreateAlias("Units", "Units")
.SetProjection(Projections.Property("Units.id")); //FIS
return unitCriteria;
}
public List<Position> GetAllPositionsByStatusForCommittee(bool Closed, bool AdminAccepted)
{
//User currentUser = new UserDao().GetUserByLogin(HttpContext.Current.User.Identity.Name);
//Get positions where faculty view is true, and the current user is a faculty member or reviewer in the committee
ICriteria facultyPositions = NHibernateSessionManager.Instance.GetSession().CreateCriteria(typeof(Position))
.Add(Expression.Eq("Closed", Closed))
.Add(Expression.Eq("AdminAccepted", AdminAccepted))
.Add(Expression.Eq("FacultyView", true)) //Faculty Allowed
.CreateCriteria("CommitteeMembers")
.CreateAlias("DepartmentMember", "DepartmentMember")
.CreateAlias("MemberType", "MemberType")
.Add(Expression.Eq("DepartmentMember.LoginID", HttpContext.Current.User.Identity.Name))
.Add(
Expression.Or(
Expression.Eq("MemberType.id", (int)MemberTypes.FacultyMember),
Expression.Eq("MemberType.id", (int)MemberTypes.Reviewer)
)
);
//Get all positions where the user is in the committee
ICriteria committeePositions = NHibernateSessionManager.Instance.GetSession().CreateCriteria(typeof(Position))
.Add(Expression.Eq("Closed", Closed))
.Add(Expression.Eq("AdminAccepted", AdminAccepted))
.CreateCriteria("CommitteeMembers")
.CreateAlias("DepartmentMember", "DepartmentMember")
.Add(Expression.Eq("DepartmentMember.LoginID", HttpContext.Current.User.Identity.Name))
.CreateCriteria("MemberType")
.Add(Expression.Or(Expression.Eq("id", (int)MemberTypes.CommitteeChair), Expression.Eq("id", (int)MemberTypes.CommitteeMember)));
List<Position> positions = new List<Position>();
foreach (Position p in facultyPositions.List<Position>())
{
if (!positions.Contains(p))
positions.Add(p);
}
foreach (Position p in committeePositions.List<Position>())
{
if ( !positions.Contains(p) )
positions.Add(p);
}
return positions;
}
public bool VerifyPositionAccess(Position position)
{
User currentUser = new UserDao().GetUserByLogin(HttpContext.Current.User.Identity.Name);
if (currentUser == null)
return false;
else
{
List<string> deptFIS = new List<string>();
foreach (Unit u in currentUser.Units)
{
deptFIS.Add(u.ID);
}
ICriteria criteria = NHibernateSessionManager.Instance.GetSession().CreateCriteria(typeof(Position))
.Add(Expression.IdEq(position.ID))
.CreateCriteria("Departments")
.Add(Expression.In("DepartmentFIS", deptFIS.ToArray()));
if (criteria.List<Position>().Count == 0)
return false;
else
return true;
}
}
}
[DataObject]
public class ApplicationDao : AbstractNHibernateDao<Application, int>, IApplicationDao {
public List<Application> GetApplicationsByApplicant(Profile applicantProfile)
{
ICriteria criteria = NHibernateSessionManager.Instance.GetSession().CreateCriteria(typeof(Application))
.Add(Expression.Eq("AssociatedProfile", applicantProfile));
return criteria.List<Application>() as List<Application>;
}
public List<Application> GetApplicationsByApplicant(Profile applicantProfile, bool submitted)
{
ICriteria criteria = NHibernateSessionManager.Instance.GetSession().CreateCriteria(typeof(Application))
.Add(Expression.Eq("Submitted", submitted))
.Add(Expression.Eq("AssociatedProfile", applicantProfile));
return criteria.List<Application>() as List<Application>;
}
[DataObjectMethod(DataObjectMethodType.Select)]
public List<Application> GetApplicationsByPosition(Position position)
{
ICriteria criteria = NHibernateSessionManager.Instance.GetSession().CreateCriteria(typeof(Application))
.Add(Expression.Eq("AppliedPosition", position))
.CreateCriteria("AssociatedProfile")
.AddOrder(Order.Desc("LastName"));
return criteria.List<Application>() as List<Application>;
}
[DataObjectMethod(DataObjectMethodType.Select)]
public List<Application> GetApplicationsByPosition(int positionID)
{
Position position = new PositionDao().GetById(positionID, false);
return GetApplicationsByPosition(position);
}
}
public class ApplicantDao : AbstractNHibernateDao<Applicant, int>, IApplicantDao {
public Applicant GetApplicantByEmail(string email)
{
ICriteria criteria = NHibernateSessionManager.Instance.GetSession().CreateCriteria(typeof(Applicant))
.Add(Expression.Eq("Email", email));
return criteria.UniqueResult<Applicant>();
}
}
public class ProfileDao : AbstractNHibernateDao<Profile, int>, IProfileDao { }
public class DepartmentDao : AbstractNHibernateDao<Department, int>, IDepartmentDao { }
public class SurveyDao : AbstractNHibernateDao<Survey, int>, ISurveyDao { }
public class RecruitmentSrcDao : AbstractNHibernateDao<RecruitmentSrc, int>, IRecruitmentSrcDao { }
public class EthnicityDao : AbstractNHibernateDao<Ethnicity, int>, IEthnicityDao { }
public class GenderDao : AbstractNHibernateDao<Gender, int>, IGenderDao { }
public class FileDao : AbstractNHibernateDao<File, int>, IFileDao { }
public class EducationDao : AbstractNHibernateDao<Education, int>, IEducationDao { }
public class CurrentPositionDao : AbstractNHibernateDao<CurrentPosition, int>, ICurrentPositionDao { }
public class CommitteeMemberDao : AbstractNHibernateDao<CommitteeMember, int>, ICommitteeMemberDao {
public List<CommitteeMember> GetAllByMemberType(Position associatedPosition, MemberTypes type)
{
//string queryString = "from CAESDO.Recruitment.Core.Domain.CommitteeMember as CM where PositionID = :PositionID "
// + " and (MemberTypeID = :MemberTypeID or MemberTypeID = :MemberTypeSecondaryID)";
int MemberTypeID, MemberTypeSecondaryID;
//If we want all committee members, we must get the chair an members
if (type == MemberTypes.AllCommittee)
{
MemberTypeID = (int)MemberTypes.CommitteeChair;
MemberTypeSecondaryID = (int)MemberTypes.CommitteeMember;
}
else
{
MemberTypeID = (int)type;
MemberTypeSecondaryID = (int)type;
}
IQuery query = NHibernateSessionManager.Instance.GetSession().CreateQuery(NHQueries.GetAllByMemberType)
.SetInt32("PositionID", associatedPosition.ID)
.SetInt32("MemberTypeID", MemberTypeID)
.SetInt32("MemberTypeSecondaryID", MemberTypeSecondaryID);
return query.List<CommitteeMember>() as List<CommitteeMember>;
}
public List<CommitteeMember> GetMemberAssociationsByPosition(Position associatedPosition, DepartmentMember member)
{
ICriteria criteria = NHibernateSessionManager.Instance.GetSession().CreateCriteria(typeof(CommitteeMember))
.Add(Expression.Eq("AssociatedPosition", associatedPosition))
.Add(Expression.Eq("DepartmentMember", member));
return criteria.List<CommitteeMember>() as List<CommitteeMember>;
}
/// <summary>
/// Queries the database to find if the current user has any memberships of the given type
/// </summary>
public bool IsUserMember(MemberTypes type)
{
int MemberTypeID, MemberTypeSecondaryID;
//If we want all committee members, we must get the chair an members
if (type == MemberTypes.AllCommittee)
{
MemberTypeID = (int)MemberTypes.CommitteeChair;
MemberTypeSecondaryID = (int)MemberTypes.CommitteeMember;
}
else
{
MemberTypeID = (int)type;
MemberTypeSecondaryID = (int)type;
}
ICriteria criteria = NHibernateSessionManager.Instance.GetSession().CreateCriteria(typeof(CommitteeMember))
.CreateAlias("DepartmentMember", "DepartmentMember")
.CreateAlias("MemberType", "MemberType")
.Add(Expression.Eq("DepartmentMember.LoginID", HttpContext.Current.User.Identity.Name))
.Add(
Expression.Or(
Expression.Eq("MemberType.id", MemberTypeID),
Expression.Eq("MemberType.id", MemberTypeSecondaryID)
)
);
if (criteria.List<CommitteeMember>().Count == 0)
return false;
else
return true;
}
}
public class UserDao : AbstractNHibernateDao<User, int>, IUserDao {
public User GetUserByLogin(string LoginID)
{
ICriteria criteria = NHibernateSessionManager.Instance.GetSession().CreateCriteria(typeof(Login))
.Add(Expression.Eq("id", LoginID));
Login login = criteria.UniqueResult<Login>();
if (login == null)
return null;
return login.User;
}
public User GetUserBySID(string SID)
{
ICriteria criteria = NHibernateSessionManager.Instance.GetSession().CreateCriteria(typeof(User))
.Add(Expression.Eq("SID", SID));
return criteria.UniqueResult<User>();
}
}
public class FileTypeDao : AbstractNHibernateDao<FileType, int>, IFileTypeDao {
public FileType GetFileTypeByName(string fileTypeName)
{
ICriteria criteria = NHibernateSessionManager.Instance.GetSession().CreateCriteria(typeof(FileType))
.Add(Expression.Eq("FileTypeName", fileTypeName));
return criteria.UniqueResult<FileType>();
}
public List<FileType> GetAllByApplicationFileType(bool applicationFileType, string propertyName, bool ascending)
{
ICriteria criteria = NHibernateSessionManager.Instance.GetSession().CreateCriteria(typeof(FileType))
.Add(Expression.Eq("ApplicationFile", applicationFileType))
.AddOrder(new Order(propertyName, ascending));
return criteria.List<FileType>() as List<FileType>;
}
}
public class MemberTypeDao : AbstractNHibernateDao<MemberType, int>, IMemberTypeDao { }
public class ChangeTrackingDao : AbstractNHibernateDao<ChangeTracking, int>, IChangeTrackingDao { }
public class ChangeTypeDao : AbstractNHibernateDao<ChangeType, int>, IChangeTypeDao { }
public class ThemeDao : AbstractNHibernateDao<Theme, string>, IThemeDao { }
public class UnitDao : AbstractNHibernateDao<Unit, string>, IUnitDao { }
public class ReferenceDao : AbstractNHibernateDao<Reference, int>, IReferenceDao {
public Reference GetReferenceByUploadID(string UploadID)
{
ICriteria criteria = NHibernateSessionManager.Instance.GetSession().CreateCriteria(typeof(Reference))
.Add(Expression.Eq("UploadID", UploadID));
return criteria.UniqueResult<Reference>();
}
public List<Reference> GetReferencesToBeNotified(int positionId)
{
//Get the reference which have not been sent emails and aren't unsolicited for each applicant who is marked "GetReferences"
var criteria = NHibernateSessionManager.Instance.GetSession().CreateCriteria(typeof (Reference))
.CreateAlias("AssociatedApplication", "AssociatedApplication")
.CreateAlias("AssociatedApplication.AppliedPosition", "AppliedPosition")
.Add(Restrictions.Eq("AssociatedApplication.GetReferences", true))
.Add(Restrictions.Eq("UnsolicitedReference", false))
.Add(Restrictions.Eq("SentEmail", false))
.Add(Restrictions.Eq("AppliedPosition.ID", positionId))
.SetFetchMode("AssociatedApplication", FetchMode.Join);
return criteria.List<Reference>() as List<Reference>;
}
}
public class TemplateTypeDao : AbstractNHibernateDao<TemplateType, int>, ITemplateTypeDao { }
public class TemplateDao : AbstractNHibernateDao<Template, int>, ITemplateDao {
public List<Template> GetTemplatesByType(TemplateType type)
{
ICriteria criteria = NHibernateSessionManager.Instance.GetSession().CreateCriteria(typeof(Template))
.Add(Expression.Eq("TemplateType", type));
return criteria.List<Template>() as List<Template>;
}
}
public class DepartmentMemberDao : AbstractNHibernateDao<DepartmentMember, int>, IDepartmentMemberDao {
public List<DepartmentMember> GetMembersByDepartmentAndType(string[] DepartmentFIS, MemberTypes type)
{
int MemberTypeID, MemberTypeSecondaryID;
//If we want all committee members, we must get the chair an members
if (type == MemberTypes.AllCommittee)
{
MemberTypeID = (int)MemberTypes.CommitteeChair;
MemberTypeSecondaryID = (int)MemberTypes.CommitteeMember;
}
else
{
MemberTypeID = (int)type;
MemberTypeSecondaryID = (int)type;
}
MemberTypeDao mdao = new MemberTypeDao();
ICriteria criteria = NHibernateSessionManager.Instance.GetSession().CreateCriteria(typeof(DepartmentMember))
.Add(Expression.Eq("Inactive", false))
.Add(Expression.In("DepartmentFIS", DepartmentFIS))
.Add(Expression.Or(Expression.Eq("MemberType", mdao.GetById(MemberTypeID,false)), Expression.Eq("MemberType", mdao.GetById(MemberTypeSecondaryID, false))));
return criteria.List<DepartmentMember>() as List<DepartmentMember>;
}
[DataObjectMethod(DataObjectMethodType.Select, true)]
public List<DepartmentMember> GetMembersByDepartmentAndType(string DepartmentFIS, MemberTypes type)
{
List<string> depts = new List<string>();
depts.Add(DepartmentFIS);
return GetMembersByDepartmentAndType(depts.ToArray(), type);
}
[DataObjectMethod(DataObjectMethodType.Select, true)]
public List<DepartmentMember> GetMembersByDepartment(string DepartmentFIS)
{
List<string> depts = new List<string>();
depts.Add(DepartmentFIS);
return GetMembersByDepartment(depts.ToArray());
}
public List<DepartmentMember> GetMembersByDepartment(string[] DepartmentFIS)
{
ICriteria criteria = NHibernateSessionManager.Instance.GetSession().CreateCriteria(typeof(DepartmentMember))
.Add(Expression.Eq("Inactive", false))
.Add(Expression.In("DepartmentFIS", DepartmentFIS));
return criteria.List<DepartmentMember>() as List<DepartmentMember>;
}
}
#endregion
}
}
| 41.99835 | 194 | 0.564025 | [
"MIT"
] | ucdavis/Recruitments | Recruitment.Data/NHibernateDaoFactory.cs | 25,451 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Http.WebHost;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using System.Web.Security;
using System.Web.SessionState;
using All.In.One.Handlers;
using Microsoft.Extensions.DependencyInjection;
using PivotalServices.AspNet.Bootstrap.Extensions;
using Steeltoe.Common.HealthChecks;
using All.In.One.Health;
using All.In.One.Services;
namespace All.In.One
{
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
GlobalConfiguration.Configure(WebApiConfig.Register);
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
AppBuilder.Instance
.PersistSessionToRedis()
.AddCloudFoundryActuators()
.AddCloudFoundryMetricsForwarder()
.AddConsoleSerilogLogging(true)
.AddDynamicHttpHandler<AppInfoApiHandler>()
.AddDynamicHttpHandler<SimpleAuthHandler>()
.ConfigureServices((hostBuilder, services) =>
{
services.AddTransient<IHealthContributor, MyCustomHealthContributor>();
services.AddTransient<ICalcService, CalcService>();
})
.AddDefaultConfigurations(jsonSettingsOptional: true, yamlSettingsOptional: true)
.AddConfigServer()
.Build()
.Start();
}
protected void Application_Stop()
{
AppBuilder.Instance.Stop();
}
}
public class SessionControllerHandler : HttpControllerHandler, IRequiresSessionState
{
public SessionControllerHandler(RouteData routeData)
: base(routeData)
{ }
}
public class SessionHttpControllerRouteHandler : HttpControllerRouteHandler
{
protected override IHttpHandler GetHttpHandler(RequestContext requestContext)
{
return new SessionControllerHandler(requestContext.RouteData);
}
}
}
| 33.695652 | 97 | 0.663226 | [
"MIT"
] | alfusinigoj/pivotal_aspnet_bootstrap_cloudfoundry_extensions | samples/All.In.One/Global.asax.cs | 2,325 | C# |
/*
* Written by Trevor Barnett, <mr.ullet@gmail.com>, 2015, 2016
* Released to the Public Domain. See http://unlicense.org/ or the
* UNLICENSE file accompanying this source code.
*/
using System;
using System.Collections.Generic;
using System.Linq;
namespace Ullet.Strix.Extensions
{
/// <summary>
/// General extension methods for any type.
/// </summary>
public static class GeneralExtensions
{
/// <summary>
/// Execute an action against an instance of an object and return the
/// original instance.
/// </summary>
/// <remarks>
/// <para>Alias for Mutate.</para>
/// /// <para>
/// One advantage of using Execute rather than just calling the action
/// directly is that it returns the original instance so enables chaining
/// calls.
/// </para>
/// </remarks>
public static T Execute<T>(this T t, Action<T> action)
{
return t.Mutate(action);
}
/// <summary>
/// Execute an action against an instance of an object and return the
/// original instance.
/// </summary>
/// <remarks>
/// <para>
/// Since an action has no return value, something must be mutated, or at
/// least must be a side-effect, such as output to a device, in order for
/// this method to do anything useful. The method name "Mutate" is
/// intended to make it clear that this is definately not a pure function.
/// </para>
/// <para>
/// One advantage of using Mutate rather than just calling the action
/// directly is that it returns the original instance so enables chaining
/// calls.
/// </para>
/// </remarks>
public static T Mutate<T>(this T t, Action<T> action)
{
action(t);
return t;
}
/// <summary>
/// Execute an action against an instance of an object with an additional
/// object and then return the original instance.
/// </summary>
public static TInst ExecuteWithObject<TInst, TObj>(
this TInst t, TObj o, Action<TInst, TObj> action)
{
return t.MutateWithObject(o, action);
}
/// <summary>
/// Execute an action against an instance of an object with an additional
/// object and then return the original instance.
/// </summary>
public static TInst MutateWithObject<TInst, TObj>(
this TInst t, TObj o, Action<TInst, TObj> action)
{
action(t, o);
return t;
}
/// <summary>
/// Test if object matches any of the specified predicates.
/// </summary>
/// <param name="t">Object to match.</param>
/// <param name="predicates">
/// <![CDATA[Func<string, bool>]]> predicate functions that perform the
/// match tests.
/// </param>
/// <typeparam name="T">Type of object being matched.</typeparam>
/// <returns>
/// <c>true</c> if object matches using at least one of the predicates;
/// otherwise <c>false</c>.
/// </returns>
public static bool MatchesAny<T>(
this T t, IEnumerable<Func<T, bool>> predicates)
{
return (predicates ?? Enumerable.Empty<Func<T, bool>>())
.Any(p => (p ?? (_ => false))(t));
}
/// <summary>
/// Test if object matches any of the specified predicates.
/// </summary>
/// <param name="t">Object to match.</param>
/// <param name="predicates">
/// <![CDATA[Func<string, bool>]]> predicate functions that perform the
/// match tests.
/// </param>
/// <typeparam name="T">Type of object being matched.</typeparam>
/// <returns>
/// <c>true</c> if object matches using at least one of the predicates;
/// otherwise <c>false</c>.
/// </returns>
public static bool MatchesAny<T>(
this T t, params Func<T, bool>[] predicates)
{
return t.MatchesAny((IEnumerable<Func<T, bool>>)predicates);
}
/// <summary>
/// Test if object matches any of the specified predicates.
/// </summary>
/// <param name="t">Object to match.</param>
/// <param name="predicates">
/// <![CDATA[Func<string, bool>]]> predicate functions that perform the
/// match tests.
/// </param>
/// <typeparam name="T">Type of object being matched.</typeparam>
/// <returns>
/// <c>true</c> if object matches using at least one of the predicates;
/// otherwise <c>false</c>.
/// </returns>
public static bool IsAny<T>(this T t, IEnumerable<Func<T, bool>> predicates)
{
return t.MatchesAny(predicates);
}
/// <summary>
/// Test if object matches any of the specified predicates.
/// </summary>
/// <param name="t">Object to match.</param>
/// <param name="predicates">
/// <![CDATA[Func<string, bool>]]> predicate functions that perform the
/// match tests.
/// </param>
/// <typeparam name="T">Type of object being matched.</typeparam>
/// <returns>
/// <c>true</c> if object matches using at least one of the predicates;
/// otherwise <c>false</c>.
/// </returns>
public static bool IsAny<T>(this T t, params Func<T, bool>[] predicates)
{
return t.MatchesAny((IEnumerable<Func<T, bool>>)predicates);
}
}
}
| 32.987179 | 80 | 0.609405 | [
"Unlicense"
] | ullet/Ullet.Strix.Extensions | Ullet/Strix/Extensions/GeneralExtensions.cs | 5,148 | C# |
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Linq;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using System.Reflection.Metadata;
namespace Microsoft.CodeAnalysis.CSharp.Symbols
{
/// <summary>
/// Represents a Source custom attribute specification
/// </summary>
internal class SourceAttributeData : CSharpAttributeData
{
private readonly NamedTypeSymbol _attributeClass;
private readonly MethodSymbol _attributeConstructor;
private readonly ImmutableArray<TypedConstant> _constructorArguments;
private readonly ImmutableArray<int> _constructorArgumentsSourceIndices;
private readonly ImmutableArray<KeyValuePair<string, TypedConstant>> _namedArguments;
private readonly bool _isConditionallyOmitted;
private readonly bool _hasErrors;
private readonly SyntaxReference _applicationNode;
internal SourceAttributeData(
SyntaxReference applicationNode,
NamedTypeSymbol attributeClass,
MethodSymbol attributeConstructor,
ImmutableArray<TypedConstant> constructorArguments,
ImmutableArray<int> constructorArgumentsSourceIndices,
ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments,
bool hasErrors,
bool isConditionallyOmitted)
{
Debug.Assert(!isConditionallyOmitted || (object)attributeClass != null && attributeClass.IsConditional);
Debug.Assert(!constructorArguments.IsDefault);
Debug.Assert(!namedArguments.IsDefault);
Debug.Assert(constructorArgumentsSourceIndices.IsDefault ||
constructorArgumentsSourceIndices.Any() && constructorArgumentsSourceIndices.Length == constructorArguments.Length);
_attributeClass = attributeClass;
_attributeConstructor = attributeConstructor;
_constructorArguments = constructorArguments;
_constructorArgumentsSourceIndices = constructorArgumentsSourceIndices;
_namedArguments = namedArguments;
_isConditionallyOmitted = isConditionallyOmitted;
_hasErrors = hasErrors;
_applicationNode = applicationNode;
}
internal SourceAttributeData(SyntaxReference applicationNode, NamedTypeSymbol attributeClass, MethodSymbol attributeConstructor, bool hasErrors)
: this(
applicationNode,
attributeClass,
attributeConstructor,
constructorArguments: ImmutableArray<TypedConstant>.Empty,
constructorArgumentsSourceIndices: default(ImmutableArray<int>),
namedArguments: ImmutableArray<KeyValuePair<string, TypedConstant>>.Empty,
hasErrors: hasErrors,
isConditionallyOmitted: false)
{
}
public override NamedTypeSymbol AttributeClass
{
get
{
return _attributeClass;
}
}
public override MethodSymbol AttributeConstructor
{
get
{
return _attributeConstructor;
}
}
public override SyntaxReference ApplicationSyntaxReference
{
get
{
return _applicationNode;
}
}
/// <summary>
/// If the <see cref="CSharpAttributeData.ConstructorArguments"/> contains any named constructor arguments or default value arguments,
/// it returns an array representing each argument's source argument index. A value of -1 indicates default value argument.
/// Otherwise, returns null.
/// </summary>
internal ImmutableArray<int> ConstructorArgumentsSourceIndices
{
get
{
return _constructorArgumentsSourceIndices;
}
}
internal CSharpSyntaxNode GetAttributeArgumentSyntax(int parameterIndex, AttributeSyntax attributeSyntax)
{
// This method is only called when decoding (non-erroneous) well-known attributes.
Debug.Assert(!this.HasErrors);
Debug.Assert((object)this.AttributeConstructor != null);
Debug.Assert(parameterIndex >= 0);
Debug.Assert(parameterIndex < this.AttributeConstructor.ParameterCount);
Debug.Assert(attributeSyntax != null);
if (_constructorArgumentsSourceIndices.IsDefault)
{
// We have no named ctor arguments AND no default arguments.
Debug.Assert(attributeSyntax.ArgumentList != null);
Debug.Assert(this.AttributeConstructor.ParameterCount <= attributeSyntax.ArgumentList.Arguments.Count);
return attributeSyntax.ArgumentList.Arguments[parameterIndex];
}
else
{
int sourceArgIndex = _constructorArgumentsSourceIndices[parameterIndex];
if (sourceArgIndex == -1)
{
// -1 signifies optional parameter whose default argument is used.
Debug.Assert(this.AttributeConstructor.Parameters[parameterIndex].IsOptional);
return attributeSyntax.Name;
}
else
{
Debug.Assert(sourceArgIndex >= 0);
Debug.Assert(sourceArgIndex < attributeSyntax.ArgumentList.Arguments.Count);
return attributeSyntax.ArgumentList.Arguments[sourceArgIndex];
}
}
}
internal override bool IsConditionallyOmitted
{
get
{
return _isConditionallyOmitted;
}
}
internal SourceAttributeData WithOmittedCondition(bool isConditionallyOmitted)
{
if (this.IsConditionallyOmitted == isConditionallyOmitted)
{
return this;
}
else
{
return new SourceAttributeData(this.ApplicationSyntaxReference, this.AttributeClass, this.AttributeConstructor, this.CommonConstructorArguments,
this.ConstructorArgumentsSourceIndices, this.CommonNamedArguments, this.HasErrors, isConditionallyOmitted);
}
}
internal override bool HasErrors
{
get
{
return _hasErrors;
}
}
internal protected sealed override ImmutableArray<TypedConstant> CommonConstructorArguments
{
get { return _constructorArguments; }
}
internal protected sealed override ImmutableArray<KeyValuePair<string, TypedConstant>> CommonNamedArguments
{
get { return _namedArguments; }
}
/// <summary>
/// This method finds an attribute by metadata name and signature. The algorithm for signature matching is similar to the one
/// in Module.GetTargetAttributeSignatureIndex. Note, the signature matching is limited to primitive types
/// and System.Type. It will not match an arbitrary signature but it is sufficient to match the signatures of the current set of
/// well known attributes.
/// </summary>
/// <param name="targetSymbol">The symbol which is the target of the attribute</param>
/// <param name="description">The attribute to match.</param>
internal override int GetTargetAttributeSignatureIndex(Symbol targetSymbol, AttributeDescription description)
{
if (!IsTargetAttribute(description.Namespace, description.Name))
{
return -1;
}
var ctor = this.AttributeConstructor;
// Ensure that the attribute data really has a constructor before comparing the signature.
if ((object)ctor == null)
{
return -1;
}
// Lazily loaded System.Type type symbol
TypeSymbol lazySystemType = null;
ImmutableArray<ParameterSymbol> parameters = ctor.Parameters;
bool foundMatch = false;
for (int i = 0; i < description.Signatures.Length; i++)
{
byte[] targetSignature = description.Signatures[i];
if (targetSignature[0] != (byte)SignatureAttributes.Instance)
{
continue;
}
byte parameterCount = targetSignature[1];
if (parameterCount != parameters.Length)
{
continue;
}
if ((SignatureTypeCode)targetSignature[2] != SignatureTypeCode.Void)
{
continue;
}
foundMatch = (targetSignature.Length == 3);
int k = 0;
for (int j = 3; j < targetSignature.Length; j++)
{
if (k >= parameters.Length)
{
break;
}
TypeSymbol parameterType = parameters[k].Type.TypeSymbol;
SpecialType specType = parameterType.SpecialType;
byte targetType = targetSignature[j];
if (targetType == (byte)SignatureTypeCode.TypeHandle)
{
j++;
if (parameterType.Kind != SymbolKind.NamedType && parameterType.Kind != SymbolKind.ErrorType)
{
foundMatch = false;
break;
}
var namedType = (NamedTypeSymbol)parameterType;
AttributeDescription.TypeHandleTargetInfo targetInfo = AttributeDescription.TypeHandleTargets[targetSignature[j]];
// Compare name and containing symbol name. Uses HasNameQualifier
// extension method to avoid string allocations.
if (!string.Equals(namedType.MetadataName, targetInfo.Name, System.StringComparison.Ordinal) ||
!namedType.HasNameQualifier(targetInfo.Namespace))
{
foundMatch = false;
break;
}
targetType = (byte)targetInfo.Underlying;
if (parameterType.IsEnumType())
{
specType = parameterType.GetEnumUnderlyingType().SpecialType;
}
}
else if (parameterType.IsArray())
{
specType = ((ArrayTypeSymbol)parameterType).ElementType.SpecialType;
}
switch (targetType)
{
case (byte)SignatureTypeCode.Boolean:
foundMatch = specType == SpecialType.System_Boolean;
k += 1;
break;
case (byte)SignatureTypeCode.Char:
foundMatch = specType == SpecialType.System_Char;
k += 1;
break;
case (byte)SignatureTypeCode.SByte:
foundMatch = specType == SpecialType.System_SByte;
k += 1;
break;
case (byte)SignatureTypeCode.Byte:
foundMatch = specType == SpecialType.System_Byte;
k += 1;
break;
case (byte)SignatureTypeCode.Int16:
foundMatch = specType == SpecialType.System_Int16;
k += 1;
break;
case (byte)SignatureTypeCode.UInt16:
foundMatch = specType == SpecialType.System_UInt16;
k += 1;
break;
case (byte)SignatureTypeCode.Int32:
foundMatch = specType == SpecialType.System_Int32;
k += 1;
break;
case (byte)SignatureTypeCode.UInt32:
foundMatch = specType == SpecialType.System_UInt32;
k += 1;
break;
case (byte)SignatureTypeCode.Int64:
foundMatch = specType == SpecialType.System_Int64;
k += 1;
break;
case (byte)SignatureTypeCode.UInt64:
foundMatch = specType == SpecialType.System_UInt64;
k += 1;
break;
case (byte)SignatureTypeCode.Single:
foundMatch = specType == SpecialType.System_Single;
k += 1;
break;
case (byte)SignatureTypeCode.Double:
foundMatch = specType == SpecialType.System_Double;
k += 1;
break;
case (byte)SignatureTypeCode.String:
foundMatch = specType == SpecialType.System_String;
k += 1;
break;
case (byte)SignatureTypeCode.Object:
foundMatch = specType == SpecialType.System_Object;
k += 1;
break;
case (byte)SerializationTypeCode.Type:
if ((object)lazySystemType == null)
{
lazySystemType = GetSystemType(targetSymbol);
}
foundMatch = parameterType == lazySystemType;
k += 1;
break;
case (byte)SignatureTypeCode.SZArray:
// Skip over and check the next byte
foundMatch = parameterType.IsArray();
break;
default:
return -1;
}
if (!foundMatch)
{
break;
}
}
if (foundMatch)
{
return i;
}
}
Debug.Assert(!foundMatch);
return -1;
}
/// <summary>
/// Gets the System.Type type symbol from targetSymbol's containing assembly.
/// </summary>
/// <param name="targetSymbol">Target symbol on which this attribute is applied.</param>
/// <returns>System.Type type symbol.</returns>
internal virtual TypeSymbol GetSystemType(Symbol targetSymbol)
{
return targetSymbol.DeclaringCompilation.GetWellKnownType(WellKnownType.System_Type);
}
}
}
| 40.115385 | 161 | 0.529434 | [
"Apache-2.0"
] | Ashera138/roslyn | src/Compilers/CSharp/Portable/Symbols/Attributes/SourceAttributeData.cs | 15,647 | C# |
using WalletWasabi.Helpers;
using WalletWasabi.Tor.Socks5.Models.Bases;
namespace WalletWasabi.Tor.Socks5.Models.Fields.OctetFields
{
public class AuthStatusField : OctetSerializableBase
{
#region Constructors
public AuthStatusField()
{
}
public AuthStatusField(int value)
{
ByteValue = (byte)Guard.InRangeAndNotNull(nameof(value), value, 0, 255);
}
#endregion Constructors
#region Statics
public static AuthStatusField Success => new AuthStatusField(0);
#endregion Statics
#region PropertiesAndMembers
public int Value => ByteValue;
#endregion PropertiesAndMembers
#region
public bool IsSuccess() => Value == 0;
#endregion
}
}
| 17.025 | 75 | 0.741557 | [
"MIT"
] | Groestlcoin/WalletWasabi | WalletWasabi/Tor/Socks5/Models/Fields/OctetFields/AuthStatusField.cs | 681 | C# |
using Microsoft.AspNetCore.Mvc;
using Shopping.Aggregator.Models;
using Shopping.Aggregator.Services;
using System;
using System.Net;
using System.Threading.Tasks;
namespace Shopping.Aggregator.Controllers
{
[ApiController]
[Route("api/v1/[controller]")]
public class ShoppingController : ControllerBase
{
private readonly ICatalogService _catalogService;
private readonly IBasketService _basketService;
private readonly IOrderService _orderService;
public ShoppingController(ICatalogService catalogService, IBasketService basketService, IOrderService orderService)
{
_catalogService = catalogService ?? throw new ArgumentNullException(nameof(catalogService));
_basketService = basketService ?? throw new ArgumentNullException(nameof(basketService));
_orderService = orderService ?? throw new ArgumentNullException(nameof(orderService));
}
[HttpGet("{userName}", Name = "GetShopping")]
[ProducesResponseType(typeof(ShoppingModel), (int)HttpStatusCode.OK)]
public async Task<ActionResult<ShoppingModel>> GetShopping(string userName)
{
// get basket with username
// iterate basket items and consume products with basket item productId member
// map product related members into basketitem dto with extended columns
// consume ordering microservices in order to retrieve order list
// return root ShoppngModel dto class which including all responses
var basket = await _basketService.GetBasket(userName);
foreach (var item in basket.Items)
{
var product = await _catalogService.GetCatalog(item.ProductId);
// set additional product fields onto basket item
item.ProductName = product.Name;
item.Category = product.Category;
item.Summary = product.Summary;
item.Description = product.Description;
item.ImageFile = product.ImageFile;
}
var orders = await _orderService.GetOrdersByUserName(userName);
var shoppingModel = new ShoppingModel
{
UserName = userName,
BasketWithProducts = basket,
Orders = orders
};
return Ok(shoppingModel);
}
}
} | 39.57377 | 123 | 0.655758 | [
"MIT"
] | umairk83/AspNetServices | src/ApiGateways/Shopping.Aggregator/Shopping.Aggregator/Controllers/ShoppingController.cs | 2,416 | C# |
using System;
namespace Alachisoft.NGroups
{
[Serializable]
internal class ChannelClosedException:ChannelException
{
public ChannelClosedException():base()
{
}
public ChannelClosedException(string msg):base(msg)
{
}
public override string ToString()
{
return "ChannelClosedException";
}
}
} | 18.181818 | 59 | 0.58 | [
"Apache-2.0"
] | Alachisoft/NCache | Src/NCCluster/ChannelClosedException.cs | 400 | C# |
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
using System.ComponentModel;
using JetBrains.Annotations;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata.Internal;
using Microsoft.EntityFrameworkCore.Utilities;
namespace Microsoft.EntityFrameworkCore.Metadata.Builders
{
/// <summary>
/// Base class used for configuring a relationship.
/// </summary>
public abstract class RelationshipBuilderBase : IInfrastructure<InternalRelationshipBuilder>
{
private readonly IReadOnlyList<Property> _foreignKeyProperties;
private readonly IReadOnlyList<Property> _principalKeyProperties;
private readonly bool? _required;
/// <summary>
/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
/// the same compatibility standards as public APIs. It may be changed or removed without notice in
/// any release. You should only use it directly in your code with extreme caution and knowing that
/// doing so can result in application failures when updating to a new Entity Framework Core release.
/// </summary>
[EntityFrameworkInternal]
protected RelationshipBuilderBase(
[NotNull] IMutableEntityType principalEntityType,
[NotNull] IMutableEntityType dependentEntityType,
[NotNull] IMutableForeignKey foreignKey)
: this(((ForeignKey)foreignKey).Builder, null)
{
PrincipalEntityType = principalEntityType;
DependentEntityType = dependentEntityType;
}
/// <summary>
/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
/// the same compatibility standards as public APIs. It may be changed or removed without notice in
/// any release. You should only use it directly in your code with extreme caution and knowing that
/// doing so can result in application failures when updating to a new Entity Framework Core release.
/// </summary>
[EntityFrameworkInternal]
protected RelationshipBuilderBase(
InternalRelationshipBuilder builder,
RelationshipBuilderBase oldBuilder,
bool foreignKeySet = false,
bool principalKeySet = false,
bool requiredSet = false)
{
Check.NotNull(builder, nameof(builder));
Builder = builder;
if (oldBuilder != null)
{
PrincipalEntityType = oldBuilder.PrincipalEntityType;
DependentEntityType = oldBuilder.DependentEntityType;
_foreignKeyProperties = foreignKeySet
? builder.Metadata.Properties
: ((EntityType)oldBuilder.DependentEntityType).Builder.GetActualProperties(oldBuilder._foreignKeyProperties, null);
_principalKeyProperties = principalKeySet
? builder.Metadata.PrincipalKey.Properties
: ((EntityType)oldBuilder.PrincipalEntityType).Builder.GetActualProperties(oldBuilder._principalKeyProperties, null);
_required = requiredSet
? builder.Metadata.IsRequired
: oldBuilder._required;
var foreignKey = builder.Metadata;
ForeignKey.AreCompatible(
(EntityType)oldBuilder.PrincipalEntityType,
(EntityType)oldBuilder.DependentEntityType,
foreignKey.DependentToPrincipal?.GetIdentifyingMemberInfo(),
foreignKey.PrincipalToDependent?.GetIdentifyingMemberInfo(),
_foreignKeyProperties,
_principalKeyProperties,
foreignKey.IsUnique,
shouldThrow: true);
}
}
/// <summary>
/// The principal entity type used to configure this relationship.
/// </summary>
protected virtual IMutableEntityType PrincipalEntityType { get; }
/// <summary>
/// The dependent entity type used to configure this relationship.
/// </summary>
protected virtual IMutableEntityType DependentEntityType { get; }
/// <summary>
/// This is an internal API that supports the Entity Framework Core infrastructure and not subject to
/// the same compatibility standards as public APIs. It may be changed or removed without notice in
/// any release. You should only use it directly in your code with extreme caution and knowing that
/// doing so can result in application failures when updating to a new Entity Framework Core release.
/// </summary>
[EntityFrameworkInternal]
protected virtual InternalRelationshipBuilder Builder { get; [param: NotNull] set; }
/// <summary>
/// The foreign key that represents this relationship.
/// </summary>
public virtual IMutableForeignKey Metadata => Builder.Metadata;
/// <summary>
/// Gets the internal builder being used to configure this relationship.
/// </summary>
InternalRelationshipBuilder IInfrastructure<InternalRelationshipBuilder>.Instance => Builder;
#region Hidden System.Object members
/// <summary>
/// Returns a string that represents the current object.
/// </summary>
/// <returns> A string that represents the current object. </returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public override string ToString() => base.ToString();
/// <summary>
/// Determines whether the specified object is equal to the current object.
/// </summary>
/// <param name="obj"> The object to compare with the current object. </param>
/// <returns> true if the specified object is equal to the current object; otherwise, false. </returns>
[EditorBrowsable(EditorBrowsableState.Never)]
// ReSharper disable once BaseObjectEqualsIsObjectEquals
public override bool Equals(object obj) => base.Equals(obj);
/// <summary>
/// Serves as the default hash function.
/// </summary>
/// <returns> A hash code for the current object. </returns>
[EditorBrowsable(EditorBrowsableState.Never)]
// ReSharper disable once BaseObjectGetHashCodeCallInGetHashCode
public override int GetHashCode() => base.GetHashCode();
#endregion
}
}
| 48.198582 | 137 | 0.652295 | [
"Apache-2.0"
] | CharlieRoseMarie/EntityFrameworkCore | src/EFCore/Metadata/Builders/RelationshipBuilderBase.cs | 6,796 | C# |
/*
* Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the lex-models-2017-04-19.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.LexModelBuildingService.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.LexModelBuildingService.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetBotAliases Request Marshaller
/// </summary>
public class GetBotAliasesRequestMarshaller : IMarshaller<IRequest, GetBotAliasesRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((GetBotAliasesRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetBotAliasesRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.LexModelBuildingService");
request.HttpMethod = "GET";
string uriResourcePath = "/bots/{botName}/aliases/";
if (!publicRequest.IsSetBotName())
throw new AmazonLexModelBuildingServiceException("Request object does not have required field BotName set");
uriResourcePath = uriResourcePath.Replace("{botName}", StringUtils.FromStringWithSlashEncoding(publicRequest.BotName));
if (publicRequest.IsSetMaxResults())
request.Parameters.Add("maxResults", StringUtils.FromInt(publicRequest.MaxResults));
if (publicRequest.IsSetNameContains())
request.Parameters.Add("nameContains", StringUtils.FromString(publicRequest.NameContains));
if (publicRequest.IsSetNextToken())
request.Parameters.Add("nextToken", StringUtils.FromString(publicRequest.NextToken));
request.ResourcePath = uriResourcePath;
request.UseQueryString = true;
return request;
}
private static GetBotAliasesRequestMarshaller _instance = new GetBotAliasesRequestMarshaller();
internal static GetBotAliasesRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetBotAliasesRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 37.051546 | 141 | 0.659989 | [
"Apache-2.0"
] | DalavanCloud/aws-sdk-net | sdk/src/Services/LexModelBuildingService/Generated/Model/Internal/MarshallTransformations/GetBotAliasesRequestMarshaller.cs | 3,594 | C# |
namespace QuizHut.Data.Models
{
using System;
using QuizHut.Data.Common.Models;
public class Result : BaseDeletableModel<string>
{
public Result()
{
this.Id = Guid.NewGuid().ToString();
}
public int Points { get; set; }
public int MaxPoints { get; set; }
public string StudentId { get; set; }
public virtual ApplicationUser Student { get; set; }
public string EventId { get; set; }
public virtual Event Event { get; set; }
public string EventName { get; set; }
public string QuizName { get; set; }
public DateTime EventActivationDateAndTime { get; set; }
}
}
| 21.181818 | 64 | 0.585122 | [
"MIT"
] | miraDask/QuizHut | QuizHut/Data/QuizHut.Data.Models/Result.cs | 701 | C# |
using System;
namespace AnzolinNetDevPack.Helpers
{
public static class DateHelper
{
public enum IntervalType
{
Day,
Month,
Year
}
/// <summary>
/// Retorna entre datas de acordo com o tipo de intervalo escolhido.
/// </summary>
/// <param name="type"></param>
/// <param name="fromDate"></param>
/// <param name="toDate"></param>
/// <returns></returns>
public static int DateDiff(IntervalType type, DateTime fromDate, DateTime toDate)
{
var duration = toDate - fromDate;
switch (type)
{
case IntervalType.Day:
return duration.Days;
case IntervalType.Month:
double floatValue = 12 * (fromDate.Year - toDate.Year) + fromDate.Month - toDate.Month;
return Convert.ToInt32(Math.Abs(floatValue));
case IntervalType.Year:
return Convert.ToInt32(duration.Days / 365);
default:
return 0;
}
}
}
}
| 26.386364 | 107 | 0.497847 | [
"MIT"
] | anzolin/AnzolinNetDevPack | source/AnzolinNetDevPack/Helpers/DateHelper.cs | 1,163 | C# |
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Umbraco.ModelsBuilder v8.1.0
//
// Changes to this file will be lost if the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Web;
using Umbraco.Core.Models;
using Umbraco.Core.Models.PublishedContent;
using Umbraco.Web;
using Umbraco.ModelsBuilder;
using Umbraco.ModelsBuilder.Umbraco;
namespace Umbraco.Web.PublishedModels
{
/// <summary>Feature Component</summary>
[PublishedModel("featureComponent")]
public partial class FeatureComponent : PublishedElementModel
{
// helpers
#pragma warning disable 0109 // new is redundant
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder", "8.1.0")]
public new const string ModelTypeAlias = "featureComponent";
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder", "8.1.0")]
public new const PublishedItemType ModelItemType = PublishedItemType.Content;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder", "8.1.0")]
public new static IPublishedContentType GetModelContentType()
=> PublishedModelUtility.GetModelContentType(ModelItemType, ModelTypeAlias);
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder", "8.1.0")]
public static IPublishedPropertyType GetModelPropertyType<TValue>(Expression<Func<FeatureComponent, TValue>> selector)
=> PublishedModelUtility.GetModelPropertyType(GetModelContentType(), selector);
#pragma warning restore 0109
// ctor
public FeatureComponent(IPublishedElement content)
: base(content)
{ }
// properties
///<summary>
/// Description
///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder", "8.1.0")]
[ImplementPropertyType("description")]
public string Description => this.Value<string>("description");
///<summary>
/// Feature
///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder", "8.1.0")]
[ImplementPropertyType("feature")]
public string Feature => this.Value<string>("feature");
///<summary>
/// Icon
///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder", "8.1.0")]
[ImplementPropertyType("icon")]
public FaLinksPropertyEditor.Models.FaIcon Icon => this.Value<FaLinksPropertyEditor.Models.FaIcon>("icon");
}
}
| 37.442857 | 120 | 0.71385 | [
"MIT"
] | mjbarlow/Umbraco-8-Bulma-Starter-Kit | U8StarterKit.Web/App_Data/Models/FeatureComponent.generated.cs | 2,621 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
namespace Branch_Testbed_Android
{
[Activity(Label = "LogActivity")]
public class LogActivity : Activity
{
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
// Create your application here
SetContentView(Resource.Layout.LogLayout);
TextView logText = FindViewById<TextView>(Resource.Id.logText);
logText.Text = Intent.GetStringExtra("LogString");
}
}
}
| 20.741935 | 66 | 0.768274 | [
"MIT"
] | BranchMetrics/xamarin-branch-deep-linking-attribution | Examples/droid_example/Branch_Testbed_Android/LogActivity.cs | 645 | C# |
//
// Author:
// Aaron Bockover <abock@xamarin.com>
//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
using System.Collections.Immutable;
using System.Linq;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Xamarin.Interactive.Logging;
namespace Xamarin.Interactive.Compilation.Roslyn
{
sealed class InteractiveSyntaxRewriter : CSharpSyntaxRewriter
{
const string TAG = nameof (InteractiveSyntaxRewriter);
readonly SemanticModel semanticModel;
public ImmutableList<LoadDirectiveTriviaSyntax> LoadDirectives { get; private set; }
= ImmutableList<LoadDirectiveTriviaSyntax>.Empty;
public InteractiveSyntaxRewriter (SemanticModel semanticModel)
: base (visitIntoStructuredTrivia: true)
{
this.semanticModel = semanticModel
?? throw new ArgumentNullException (nameof (semanticModel));
}
public override SyntaxNode VisitLoadDirectiveTrivia (LoadDirectiveTriviaSyntax node)
{
LoadDirectives = LoadDirectives.Add (node);
return base.VisitLoadDirectiveTrivia (node);
}
public override SyntaxNode VisitObjectCreationExpression (ObjectCreationExpressionSyntax node)
{
try {
if (node.ArgumentList != null && node.ArgumentList.Arguments.Count == 0) {
var type = semanticModel.GetSymbolInfo (node).Symbol?.ContainingType;
if (type?.Name == "HttpClient" &&
type.ContainingAssembly.Identity.Name == "System.Net.Http" &&
type.ContainingNamespace.ToString () == "System.Net.Http")
node = RewriteDefaultHttpClientObjectCreation (node);
}
} catch (Exception e) {
Log.Error (TAG, e);
}
return base.VisitObjectCreationExpression (node);
}
/// <summary>
/// Rewrites `new HttpClient ()` as
/// `new HttpClient (InteractiveAgent.CreateDefaultHttpMessageHandler (), true)`
/// </summary>
ObjectCreationExpressionSyntax RewriteDefaultHttpClientObjectCreation (
ObjectCreationExpressionSyntax node)
=> node.WithArgumentList (
ArgumentList (
SyntaxFactory.CastExpression (
SyntaxFactory.ParseTypeName ("System.Net.Http.HttpMessageHandler"),
SyntaxFactory.InvocationExpression (
SyntaxFactory.MemberAccessExpression (
SyntaxKind.SimpleMemberAccessExpression,
SyntaxFactory.IdentifierName (
"InteractiveAgent"),
SyntaxFactory.IdentifierName (
"CreateDefaultHttpMessageHandler")))),
SyntaxFactory.LiteralExpression (
SyntaxKind.TrueLiteralExpression)));
static ArgumentListSyntax ArgumentList (params ExpressionSyntax [] argumentExpressions)
=> SyntaxFactory.ArgumentList (
SyntaxFactory.SeparatedList (
argumentExpressions.Select (SyntaxFactory.Argument)));
/// <summary>
/// Rewrite assignments to Thread.Current(UI)Culture and CultureInfo.Current(UI)Culture
/// to InteractiveCulture.Current(UI)Culture, working around a bug in Mono:
/// https://bugzilla.xamarin.com/show_bug.cgi?id=54448
/// <seealso cref="Repl.ReplExecutionContext.RunAsync"/>,
/// <seealso cref="InteractiveCulture"/>
/// </summary>
public override SyntaxNode VisitAssignmentExpression (AssignmentExpressionSyntax node)
{
var memberAccess = node.Left as MemberAccessExpressionSyntax;
var memberAccessExpr = memberAccess?.Expression as MemberAccessExpressionSyntax;
if (memberAccess != null && memberAccessExpr != null && (
IsMemberAccessForSymbolNamed (
memberAccess,
"System.Threading.Thread.CurrentCulture",
"System.Threading.Thread.CurrentUICulture") &&
IsMemberAccessForSymbolNamed (
memberAccessExpr,
"System.Threading.Thread.CurrentThread")) ||
IsMemberAccessForSymbolNamed (
memberAccess,
"System.Globalization.CultureInfo.CurrentCulture",
"System.Globalization.CultureInfo.CurrentUICulture")) {
memberAccess = SyntaxFactory.MemberAccessExpression (
SyntaxKind.SimpleMemberAccessExpression,
SyntaxFactory.ParseName ("Xamarin.Interactive.InteractiveCulture"),
SyntaxFactory.IdentifierName (memberAccess.Name.Identifier));
node = node.WithLeft (memberAccess);
}
return base.VisitAssignmentExpression (node);
}
bool IsMemberAccessForSymbolNamed (MemberAccessExpressionSyntax node, params string [] names)
{
if (node == null)
return false;
var symbol = semanticModel.GetSymbolInfo (node).Symbol?.ToString ();
if (symbol == null)
return false;
for (int i = 0; i < names.Length; i++) {
if (symbol == names [i])
return true;
}
return false;
}
}
} | 41.772059 | 102 | 0.599366 | [
"MIT"
] | mono/workbooks | Clients/Xamarin.Interactive.Client/Compilation/Roslyn/InteractiveSyntaxRewriter.cs | 5,681 | C# |
using System;
using NUnit.Framework;
namespace Atata.KendoUI.Tests
{
public class KendoDateTimePickerTests : UITestFixture
{
private DateTimePickerPage page;
protected override void OnSetUp()
{
page = Go.To<DateTimePickerPage>();
}
[Test]
public void KendoDateTimePicker()
{
var control = page.Regular;
control.Should.BeEnabled();
control.Should.Not.BeReadOnly();
control.Should.BeNull();
DateTime value = new DateTime(2018, 7, 11, 15, 30, 0);
control.Set(value);
control.Should.Equal(value);
control.Set(null);
control.Should.BeNull();
value = new DateTime(1998, 11, 2, 19, 15, 0);
control.Set(value);
control.Should.Equal(value);
control.Clear();
control.Should.BeNull();
}
[Test]
public void KendoDateTimePicker_Disabled()
{
var control = page.Disabled;
control.Should.BeDisabled();
control.Should.Not.BeReadOnly();
control.Should.Equal(new DateTime(2000, 10, 10));
}
[Test]
public void KendoDateTimePicker_ReadOnly()
{
var control = page.ReadOnly;
control.Should.BeEnabled();
control.Should.BeReadOnly();
control.Should.Equal(new DateTime(2005, 7, 20, 17, 45, 0));
}
}
}
| 25.066667 | 71 | 0.539894 | [
"Apache-2.0"
] | Xen0byte/atata-kendoui | src/Atata.KendoUI.Tests/KendoDateTimePickerTests.cs | 1,506 | C# |
using Microsoft.Extensions.Logging;
using RabbitMQ.Client;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace Cybtans.Messaging.RabbitMQ
{
public class RabbitBroadCastService : IBroadcastService
{
private readonly BroadcastServiceOptions options;
private readonly BroadcastSubscriptionManager _subscriptionManager;
private readonly RabbitMessageQueue _queue;
public RabbitBroadCastService(
BroadcastServiceOptions options,
IConnectionFactory connectionFactory,
BroadcastSubscriptionManager subscriptionManager,
ILoggerFactory loggerFactory)
{
this.options = options;
_subscriptionManager = subscriptionManager;
var queueOptions = new RabbitMessageQueueOptions
{
Hostname = options.Hostname,
RetryCount = options.RetryCount,
Exchange = new ExchangeConfig
{
Name = options.Exchange
},
Queue = new QueueConfig
{
Name = null,
Durable = false,
AutoDelete = true,
Exclusive = true
}
};
_queue = new RabbitMessageQueue(connectionFactory,
_subscriptionManager.messageSubscriptionManager,
queueOptions,
loggerFactory.CreateLogger<RabbitMessageQueue>());
}
public IBroadcastSubscriptionManager Subscriptions => _subscriptionManager;
public void Dispose()
{
_queue.Dispose();
}
public Task Publish(byte[] bytes, string channel)
{
return _queue.Publish(bytes, options.Exchange, channel);
}
public Task Publish(object message, string channel = null)
{
return _queue.Publish(message, options.Exchange, channel);
}
public void Start()
{
_queue.Start();
}
}
}
| 30.657143 | 83 | 0.575955 | [
"MIT"
] | ansel86castro/cybtans-sdk | CybtansSDK/Cybtans.Messaging.RabbitMQ/RabbitBroadCastService.cs | 2,148 | C# |
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the kendra-2019-02-03.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.Kendra.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.Kendra.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DataSourceConfiguration Object
/// </summary>
public class DataSourceConfigurationUnmarshaller : IUnmarshaller<DataSourceConfiguration, XmlUnmarshallerContext>, IUnmarshaller<DataSourceConfiguration, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
DataSourceConfiguration IUnmarshaller<DataSourceConfiguration, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public DataSourceConfiguration Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
DataSourceConfiguration unmarshalledObject = new DataSourceConfiguration();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("ConfluenceConfiguration", targetDepth))
{
var unmarshaller = ConfluenceConfigurationUnmarshaller.Instance;
unmarshalledObject.ConfluenceConfiguration = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("DatabaseConfiguration", targetDepth))
{
var unmarshaller = DatabaseConfigurationUnmarshaller.Instance;
unmarshalledObject.DatabaseConfiguration = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("GoogleDriveConfiguration", targetDepth))
{
var unmarshaller = GoogleDriveConfigurationUnmarshaller.Instance;
unmarshalledObject.GoogleDriveConfiguration = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("OneDriveConfiguration", targetDepth))
{
var unmarshaller = OneDriveConfigurationUnmarshaller.Instance;
unmarshalledObject.OneDriveConfiguration = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("S3Configuration", targetDepth))
{
var unmarshaller = S3DataSourceConfigurationUnmarshaller.Instance;
unmarshalledObject.S3Configuration = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SalesforceConfiguration", targetDepth))
{
var unmarshaller = SalesforceConfigurationUnmarshaller.Instance;
unmarshalledObject.SalesforceConfiguration = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ServiceNowConfiguration", targetDepth))
{
var unmarshaller = ServiceNowConfigurationUnmarshaller.Instance;
unmarshalledObject.ServiceNowConfiguration = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SharePointConfiguration", targetDepth))
{
var unmarshaller = SharePointConfigurationUnmarshaller.Instance;
unmarshalledObject.SharePointConfiguration = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static DataSourceConfigurationUnmarshaller _instance = new DataSourceConfigurationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static DataSourceConfigurationUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 41.313433 | 182 | 0.621749 | [
"Apache-2.0"
] | KenHundley/aws-sdk-net | sdk/src/Services/Kendra/Generated/Model/Internal/MarshallTransformations/DataSourceConfigurationUnmarshaller.cs | 5,536 | C# |
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Nether.Data.Identity
{
public static class LoginProvider
{
public const string UserNamePassword = "password";
public const string FacebookUserAccessToken = "Facebook"; // use the same identifier as the implicit flow for facebook
}
}
| 30.705882 | 126 | 0.749042 | [
"MIT"
] | vflorusso/nether | src/Nether.Data/Identity/LoginProvider.cs | 524 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Alivio_UI_Mockup
{
public partial class Default : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
} | 19.117647 | 60 | 0.698462 | [
"MIT"
] | tran-temple/CIS4296-Alivio-UI-Mockup | Alivio UI Mockup/Default.Master.cs | 327 | C# |
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.Routing;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;
using sample_app.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace sample_app.Infrastructure
{
// Custom tag helper that will generate Links
[HtmlTargetElement("div",Attributes ="page-model")]
public class PageLinkTagHelper : TagHelper
{
private readonly IUrlHelperFactory _helperFactory;
// IURLHelperFactory class to generate links
public PageLinkTagHelper(IUrlHelperFactory helperFactory)
{
_helperFactory = helperFactory;
}
// Need to Set ViewContext in order to gain access to Curent Context: That is HttpContext, HttpRequest and HttpResponse
[ViewContext]
public ViewContext ViewContext { get; set; }
// Pagination Information
public PagingInfo PageModel { get; set; }
// Whenever i click on the Links it should go to Some Action
public string PageAction { get; set; }
public bool PageClassesEnabled { get; set; }
public string PageClassNormal { get; set; }
public string PageClass { get; set; }
public string PageClassSelected { get; set; }
// Automatically called and will contain the Logic to Generate Links for us
public override void Process(TagHelperContext context, TagHelperOutput output)
{
// Current ITagHelper Information for the Request associated with context
IUrlHelper urlHelper = _helperFactory.GetUrlHelper(ViewContext);
// Build URLS
TagBuilder result = new TagBuilder("div"); // Adds Div Tag : <div> <a href="pageno"> </a> <ahref="pageno2"> </a> </div>
for (int i = 1; i <= PageModel.TotalPages; i++)
{
// Generate Link
TagBuilder tag = new TagBuilder("a"); // Generate anchor tag :<a href=""/>
tag.Attributes["href"] =urlHelper.Action(PageAction, new { productPage=i}) ;
if (PageClassesEnabled )
{
tag.AddCssClass(PageClass);
tag.AddCssClass(i == PageModel.CurrentPage ? PageClassSelected : PageClassNormal);
}
tag.InnerHtml.Append(i.ToString());
result.InnerHtml.AppendHtml(tag);
}
output.Content.AppendHtml(result.InnerHtml); // Holds the Output of TagHelper
}
}
}
| 38.246377 | 131 | 0.638878 | [
"MIT"
] | swpnlgkwd26/dotnetsampleapp | sample-app/Infrastructure/PageLinkTagHelper.cs | 2,641 | C# |
using System;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.Geometry;
using ESRI.ArcGIS.Display;
using RDotNet;
using ESRI.ArcGIS.esriSystem;
//using Accord.Math;
//spdep, and maptools packages in R are required
namespace VisUncertainty
{
public partial class frmLocalSAM : Form
{
private MainForm m_pForm;
private IActiveView m_pActiveView;
private clsSnippet m_pSnippet;
private IFeatureLayer m_pFLayer;
private IFeatureClass m_pFClass;
private REngine m_pEngine;
//Varaibles for SWM
private bool m_blnCreateSWM = false;
public frmLocalSAM()
{
try
{
InitializeComponent();
m_pForm = System.Windows.Forms.Application.OpenForms["MainForm"] as MainForm;
m_pActiveView = m_pForm.axMapControl1.ActiveView;
m_pEngine = m_pForm.pEngine;
for (int i = 0; i < m_pForm.axMapControl1.LayerCount; i++)
{
//IFeatureLayer pFeatureLayer = (IFeatureLayer)m_pActiveView.FocusMap.get_Layer(i);
//if (pFeatureLayer.FeatureClass.ShapeType == esriGeometryType.esriGeometryPolygon) //Only polygon to make spatial weight matrix 10/9/15 HK
// cboTargetLayer.Items.Add(m_pForm.axMapControl1.get_Layer(i).Name);
cboTargetLayer.Items.Add(m_pForm.axMapControl1.get_Layer(i).Name); //It supports all types, but visualizaiton for point data is under developing. 080317 HK
}
m_pSnippet = new clsSnippet();
m_pEngine.Evaluate("rm(list=ls(all=TRUE))");
m_pEngine.Evaluate("library(spdep); library(maptools)");
}
catch (Exception ex)
{
frmErrorLog pfrmErrorLog = new frmErrorLog();pfrmErrorLog.ex = ex; pfrmErrorLog.ShowDialog();
return;
}
}
private void cboTargetLayer_SelectedIndexChanged(object sender, EventArgs e)
{
try
{
string strLayerName = cboTargetLayer.Text;
int intLIndex = m_pSnippet.GetIndexNumberFromLayerName(m_pActiveView, strLayerName);
ILayer pLayer = m_pForm.axMapControl1.get_Layer(intLIndex);
m_pFLayer = pLayer as IFeatureLayer;
m_pFClass = m_pFLayer.FeatureClass;
//New Spatial Weight matrix function 080317
clsSnippet.SpatialWeightMatrixType pSWMType = new clsSnippet.SpatialWeightMatrixType();
if (m_pFClass.ShapeType == esriGeometryType.esriGeometryPolygon) //Apply Different Spatial weight matrix according to geometry type 07052017 HK
txtSWM.Text = pSWMType.strPolySWM;
else if (m_pFClass.ShapeType == esriGeometryType.esriGeometryPoint)
txtSWM.Text = pSWMType.strPointSWM;
else if (m_pFClass.ShapeType == esriGeometryType.esriGeometryPolyline)
MessageBox.Show("Spatial weight matrix for polyline is not supported.");
//
IFields fields = m_pFClass.Fields;
cboFieldName.Items.Clear();
for (int i = 0; i < fields.FieldCount; i++)
{
if (m_pSnippet.FindNumberFieldType(fields.get_Field(i)))
cboFieldName.Items.Add(fields.get_Field(i).Name);
}
string strPAdjust = cboAdjustment.Text;
string strMethod = cboSAM.Text;
UpdateListview(lvFields, m_pFClass, strMethod);
}
catch (Exception ex)
{
frmErrorLog pfrmErrorLog = new frmErrorLog();pfrmErrorLog.ex = ex; pfrmErrorLog.ShowDialog();
return;
}
}
private void UpdateListview(ListView pListView, IFeatureClass pFeatureClass, string strMethod)
{
try
{
pListView.Items.Clear();
pListView.BeginUpdate();
int intNFlds = 0;
string[] strFldNames = null;
string[] strLvNames = null;
if (strMethod == "Local Moran")
{
intNFlds = 4;
string strStatisticFldNM = "Ii";
string strStatistic = "Statistic";
string strSDFldNM = "Zi";
string strSD = "Standard deviate";
string strPrFldNM = "Pr";
string strPr = "p-Value";
string strFlgFldNM = "flg";
string strFlg = "FLAG";
if (strStatisticFldNM == null || strSDFldNM == null || strPrFldNM == null || strFlgFldNM == null)
return;
strFldNames = new string[intNFlds];
strFldNames[0] = strStatisticFldNM; strFldNames[1] = strSDFldNM;
strFldNames[2] = strPrFldNM; strFldNames[3] = strFlgFldNM;
strLvNames = new string[intNFlds];
strLvNames[0] = strStatistic; strLvNames[1] = strSD;
strLvNames[2] = strPr; strLvNames[3] = strFlg;
}
else if (strMethod == "Gi*")
{
intNFlds = 2;
string strStatisticFldNM = "Gi";
string strStatistic = "Statistic";
string strPrFldNM = "Pr";
string strPr = "p-Value";
if (strStatisticFldNM == null || strPrFldNM == null )
return;
strFldNames = new string[intNFlds];
strFldNames[0] = strStatisticFldNM;
strFldNames[1] = strPrFldNM;
strLvNames = new string[intNFlds];
strLvNames[0] = strStatistic;
strLvNames[1] = strPr;
}
//Update Name Using the UpdateFldNames Function to Update Name with the same number
string[] strNewNames = UpdateFldNames(strFldNames, pFeatureClass);
for (int i = 0; i < intNFlds; i++)
{
ListViewItem lvi = new ListViewItem(strLvNames[i]);
lvi.UseItemStyleForSubItems = false;
lvi.SubItems.Add(new ListViewItem.ListViewSubItem(lvi, strNewNames[i]));
pListView.Items.Add(lvi);
}
pListView.EndUpdate();
}
catch (Exception ex)
{
frmErrorLog pfrmErrorLog = new frmErrorLog();pfrmErrorLog.ex = ex; pfrmErrorLog.ShowDialog();
return;
}
}
private string UpdateFldName(string strFldNM, IFeatureClass pFeatureClass)
{
try
{
string returnNM = strFldNM;
int i = 1;
while (pFeatureClass.FindField(returnNM) != -1)
{
returnNM = strFldNM + "_" + i.ToString();
i++;
}
return returnNM;
}
catch (Exception ex)
{
frmErrorLog pfrmErrorLog = new frmErrorLog();pfrmErrorLog.ex = ex; pfrmErrorLog.ShowDialog();
return null;
}
}
private string[] UpdateFldNames(string[] strFldNMs, IFeatureClass pFeatureClass)
{
try
{
int intMax = 0;
for (int j = 0; j < strFldNMs.Length; j++)
{
string strNM = strFldNMs[j];
int i = 1;
while (pFeatureClass.FindField(strNM) != -1)
{
strNM = strFldNMs[j] +"_" + i.ToString();
i++;
}
if (i > intMax)
intMax = i;
}
string[] strReturnNMs = new string[strFldNMs.Length];
for (int j = 0; j < strFldNMs.Length; j++)
{
if (intMax == 1)
strReturnNMs[j] = strFldNMs[j];
else
strReturnNMs[j] = strFldNMs[j] + "_" + (intMax-1).ToString();
}
return strReturnNMs;
}
catch (Exception ex)
{
frmErrorLog pfrmErrorLog = new frmErrorLog();pfrmErrorLog.ex = ex; pfrmErrorLog.ShowDialog();
return null;
}
}
private void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
}
private void btnRun_Click(object sender, EventArgs e)
{
try
{
//Checking
if (cboFieldName.Text == "")
{
MessageBox.Show("Please select target field");
return;
}
frmProgress pfrmProgress = new frmProgress();
pfrmProgress.lblStatus.Text = "Processing:";
pfrmProgress.pgbProgress.Style = ProgressBarStyle.Marquee;
pfrmProgress.Show();
int nFeature = m_pFClass.FeatureCount(null);
IFeatureCursor pFCursor = m_pFLayer.Search(null, true);
IFeature pFeature = pFCursor.NextFeature();
//Get index for independent and dependent variables
//Get variable index
string strVarNM = (string)cboFieldName.SelectedItem;
int intVarIdx = m_pFClass.FindField(strVarNM);
//Store Variable at Array
double[] arrVar = new double[nFeature];
int i = 0;
while (pFeature != null)
{
arrVar[i] = Convert.ToDouble(pFeature.get_Value(intVarIdx));
i++;
pFeature = pFCursor.NextFeature();
}
//Plot command for R
StringBuilder plotCommmand = new StringBuilder();
if (!m_blnCreateSWM)
{
//Get the file path and name to create spatial weight matrix
string strNameR = m_pSnippet.FilePathinRfromLayer(m_pFLayer);
if (strNameR == null)
return;
//Create spatial weight matrix in R
if (m_pFClass.ShapeType == esriGeometryType.esriGeometryPolygon)
m_pEngine.Evaluate("sample.shp <- readShapePoly('" + strNameR + "')");
else if (m_pFClass.ShapeType == esriGeometryType.esriGeometryPoint)
m_pEngine.Evaluate("sample.shp <- readShapePoints('" + strNameR + "')");
else
{
MessageBox.Show("This geometry type is not supported");
pfrmProgress.Close();
this.Close();
}
int intSuccess = m_pSnippet.CreateSpatialWeightMatrix(m_pEngine, m_pFClass, txtSWM.Text, pfrmProgress);
if (intSuccess == 0)
return;
}
NumericVector vecVar = m_pEngine.CreateNumericVector(arrVar);
m_pEngine.SetSymbol(strVarNM, vecVar);
if (cboSAM.Text == "Local Moran")
{
#region Local Moran
plotCommmand.Append("localmoran(" + strVarNM + ", sample.listw, alternative = 'two.sided', ");
//select multiple correction method (only Bonferroni.. 100915 HK)
if (cboAdjustment.Text == "None")
plotCommmand.Append(", zero.policy=TRUE)");
else if (cboAdjustment.Text == "Bonferroni correction")
plotCommmand.Append("p.adjust.method='bonferroni', zero.policy=TRUE)");
NumericMatrix nmResults = m_pEngine.Evaluate(plotCommmand.ToString()).AsNumericMatrix();
string strFlgFldNam = lvFields.Items[3].SubItems[1].Text;
//Save Output on SHP
//Add Target fields to store results in the shapefile
for (int j = 0; j < 4; j++)
{
IField newField = new FieldClass();
IFieldEdit fieldEdit = (IFieldEdit)newField;
fieldEdit.Name_2 = lvFields.Items[j].SubItems[1].Text;
if (j == 3)
fieldEdit.Type_2 = esriFieldType.esriFieldTypeString;
else
fieldEdit.Type_2 = esriFieldType.esriFieldTypeDouble;
m_pFClass.AddField(newField);
}
//Update Field
pFCursor = m_pFClass.Update(null, false);
pFeature = pFCursor.NextFeature();
int intStatFldIdx = m_pFClass.FindField(lvFields.Items[0].SubItems[1].Text);
int intZFldIdx = m_pFClass.FindField(lvFields.Items[1].SubItems[1].Text);
int intPrFldIdx = m_pFClass.FindField(lvFields.Items[2].SubItems[1].Text);
int intFlgFldIdx = m_pFClass.FindField(strFlgFldNam);
double dblValue = 0, dblPvalue = 0, dblZvalue = 0;
double dblValueMean = arrVar.Average();
double dblPrCri = Convert.ToDouble(nudConfLevel.Value);
int featureIdx = 0;
while (pFeature != null)
{
dblValue = arrVar[featureIdx] - dblValueMean;
dblZvalue = nmResults[featureIdx, 3];
dblPvalue = nmResults[featureIdx, 4];
pFeature.set_Value(intStatFldIdx, (object)nmResults[featureIdx, 0]);
pFeature.set_Value(intZFldIdx, dblZvalue);
pFeature.set_Value(intPrFldIdx, dblPvalue);
if (dblPvalue < dblPrCri)
{
if (dblZvalue > 0)
{
if (dblValue > 0)
pFeature.set_Value(intFlgFldIdx, "HH");
else
pFeature.set_Value(intFlgFldIdx, "LL");
}
else
{
if (dblValue > 0)
pFeature.set_Value(intFlgFldIdx, "HL");
else
pFeature.set_Value(intFlgFldIdx, "LH");
}
}
//else
// pFeature.set_Value(intFlgFldIdx, "");
pFCursor.UpdateFeature(pFeature);
pFeature = pFCursor.NextFeature();
featureIdx++;
}
pfrmProgress.Close();
if (chkMap.Checked)
{
double[,] adblMinMaxForLabel = new double[2, 4];
ITable pTable = (ITable)m_pFClass;
IUniqueValueRenderer pUniqueValueRenderer = new UniqueValueRendererClass();
pUniqueValueRenderer.FieldCount = 1;
pUniqueValueRenderer.set_Field(0, strFlgFldNam);
IDataStatistics pDataStat;
IStatisticsResults pStatResults;
ICursor pCursor;
if(m_pFClass.ShapeType == esriGeometryType.esriGeometryPolygon)
{
ISimpleFillSymbol pSymbol;
IQueryFilter pQFilter = new QueryFilterClass();
pQFilter.WhereClause = strFlgFldNam + " = 'HH'";
int intCnt = pTable.RowCount(pQFilter);
pCursor = pTable.Search(pQFilter, true);
pDataStat = new DataStatisticsClass();
pDataStat.Field = lvFields.Items[1].SubItems[1].Text;
pDataStat.Cursor = pCursor;
pStatResults = pDataStat.Statistics;
adblMinMaxForLabel[0, 0] = pStatResults.Minimum;
adblMinMaxForLabel[1, 0] = pStatResults.Maximum;
pCursor.Flush();
pSymbol = new SimpleFillSymbolClass();
pSymbol.Style = esriSimpleFillStyle.esriSFSSolid;
pSymbol.Color = m_pSnippet.getRGB(255, 80, 80);
pUniqueValueRenderer.AddValue("HH", null, (ISymbol)pSymbol);
if (intCnt == 1)
pUniqueValueRenderer.set_Label("HH", "HH (" + adblMinMaxForLabel[0, 0].ToString("N1") + ")");
else if (intCnt == 0)
pUniqueValueRenderer.set_Label("HH", "HH (no obs)");
else
pUniqueValueRenderer.set_Label("HH", "HH (" + adblMinMaxForLabel[0, 0].ToString("N1") + "-" + adblMinMaxForLabel[1, 0].ToString("N1") + ")");
pQFilter.WhereClause = strFlgFldNam + " = 'LL'";
intCnt = pTable.RowCount(pQFilter);
pCursor = pTable.Search(pQFilter, true);
pDataStat = new DataStatisticsClass();
pDataStat.Field = lvFields.Items[1].SubItems[1].Text;
pDataStat.Cursor = pCursor;
pStatResults = pDataStat.Statistics;
adblMinMaxForLabel[0, 1] = pStatResults.Minimum;
adblMinMaxForLabel[1, 1] = pStatResults.Maximum;
pCursor.Flush();
pSymbol = new SimpleFillSymbolClass();
pSymbol.Style = esriSimpleFillStyle.esriSFSSolid;
pSymbol.Color = m_pSnippet.getRGB(50, 157, 194);
pUniqueValueRenderer.AddValue("LL", null, (ISymbol)pSymbol);
if (intCnt == 1)
pUniqueValueRenderer.set_Label("LL", "LL (" + adblMinMaxForLabel[0, 1].ToString("N1") + ")");
else if (intCnt == 0)
pUniqueValueRenderer.set_Label("LL", "LL (no obs)");
else
pUniqueValueRenderer.set_Label("LL", "LL (" + adblMinMaxForLabel[0, 1].ToString("N1") + "-" + adblMinMaxForLabel[1, 1].ToString("N1") + ")");
pQFilter.WhereClause = strFlgFldNam + " = 'HL'";
intCnt = pTable.RowCount(pQFilter);
pCursor = pTable.Search(pQFilter, true);
pDataStat = new DataStatisticsClass();
pDataStat.Field = lvFields.Items[1].SubItems[1].Text;
pDataStat.Cursor = pCursor;
pStatResults = pDataStat.Statistics;
adblMinMaxForLabel[0, 2] = pStatResults.Minimum;
adblMinMaxForLabel[1, 2] = pStatResults.Maximum;
pCursor.Flush();
pSymbol = new SimpleFillSymbolClass();
pSymbol.Style = esriSimpleFillStyle.esriSFSSolid;
pSymbol.Color = m_pSnippet.getRGB(244, 199, 0);
pUniqueValueRenderer.AddValue("HL", null, (ISymbol)pSymbol);
if (intCnt == 1)
pUniqueValueRenderer.set_Label("HL", "HL (" + adblMinMaxForLabel[0, 2].ToString("N1") + ")");
else if (intCnt == 0)
pUniqueValueRenderer.set_Label("HL", "HL (no obs)");
else
pUniqueValueRenderer.set_Label("HL", "HL (" + adblMinMaxForLabel[0, 2].ToString("N1") + "-" + adblMinMaxForLabel[1, 2].ToString("N1") + ")");
pQFilter.WhereClause = strFlgFldNam + " = 'LH'";
intCnt = pTable.RowCount(pQFilter);
pCursor = pTable.Search(pQFilter, true);
pDataStat = new DataStatisticsClass();
pDataStat.Field = lvFields.Items[1].SubItems[1].Text;
pDataStat.Cursor = pCursor;
pStatResults = pDataStat.Statistics;
adblMinMaxForLabel[0, 3] = pStatResults.Minimum;
adblMinMaxForLabel[1, 3] = pStatResults.Maximum;
pCursor.Flush();
pSymbol = new SimpleFillSymbolClass();
pSymbol.Style = esriSimpleFillStyle.esriSFSSolid;
pSymbol.Color = m_pSnippet.getRGB(173, 255, 179);
pUniqueValueRenderer.AddValue("LH", null, (ISymbol)pSymbol);
if (intCnt == 1)
pUniqueValueRenderer.set_Label("LH", "LH (" + adblMinMaxForLabel[0, 3].ToString("N1") + ")");
else if (intCnt == 0)
pUniqueValueRenderer.set_Label("LH", "LH (no obs)");
else
pUniqueValueRenderer.set_Label("LH", "LH (" + adblMinMaxForLabel[0, 3].ToString("N1") + "-" + adblMinMaxForLabel[1, 3].ToString("N1") + ")");
pSymbol = new SimpleFillSymbolClass();
pSymbol.Style = esriSimpleFillStyle.esriSFSSolid;
pSymbol.Color = m_pSnippet.getRGB(200, 200, 200);
//pUniqueValueRenderer.AddValue("", strFlgFldNam, (ISymbol)pSymbol);
//pUniqueValueRenderer.set_Label("", "Not significant");
pUniqueValueRenderer.DefaultSymbol = (ISymbol)pSymbol;
pUniqueValueRenderer.DefaultLabel = "Not significant";
pUniqueValueRenderer.UseDefaultSymbol = true;
}
else if (m_pFClass.ShapeType == esriGeometryType.esriGeometryPoint)
{
ISimpleMarkerSymbol pSymbol;
IQueryFilter pQFilter = new QueryFilterClass();
pQFilter.WhereClause = strFlgFldNam + " = 'HH'";
int intCnt = pTable.RowCount(pQFilter);
pCursor = pTable.Search(pQFilter, true);
pDataStat = new DataStatisticsClass();
pDataStat.Field = lvFields.Items[1].SubItems[1].Text;
pDataStat.Cursor = pCursor;
pStatResults = pDataStat.Statistics;
adblMinMaxForLabel[0, 0] = pStatResults.Minimum;
adblMinMaxForLabel[1, 0] = pStatResults.Maximum;
pCursor.Flush();
pSymbol = new SimpleMarkerSymbolClass();
pSymbol.Style = esriSimpleMarkerStyle.esriSMSCircle;
pSymbol.Color = m_pSnippet.getRGB(255, 80, 80);
pUniqueValueRenderer.AddValue("HH", null, (ISymbol)pSymbol);
if (intCnt == 1)
pUniqueValueRenderer.set_Label("HH", "HH (" + adblMinMaxForLabel[0, 0].ToString("N1") + ")");
else if (intCnt == 0)
pUniqueValueRenderer.set_Label("HH", "HH (no obs)");
else
pUniqueValueRenderer.set_Label("HH", "HH (" + adblMinMaxForLabel[0, 0].ToString("N1") + "-" + adblMinMaxForLabel[1, 0].ToString("N1") + ")");
pQFilter.WhereClause = strFlgFldNam + " = 'LL'";
intCnt = pTable.RowCount(pQFilter);
pCursor = pTable.Search(pQFilter, true);
pDataStat = new DataStatisticsClass();
pDataStat.Field = lvFields.Items[1].SubItems[1].Text;
pDataStat.Cursor = pCursor;
pStatResults = pDataStat.Statistics;
adblMinMaxForLabel[0, 1] = pStatResults.Minimum;
adblMinMaxForLabel[1, 1] = pStatResults.Maximum;
pCursor.Flush();
pSymbol = new SimpleMarkerSymbolClass();
pSymbol.Style = esriSimpleMarkerStyle.esriSMSCircle;
pSymbol.Color = m_pSnippet.getRGB(50, 157, 194);
pUniqueValueRenderer.AddValue("LL", null, (ISymbol)pSymbol);
if (intCnt == 1)
pUniqueValueRenderer.set_Label("LL", "LL (" + adblMinMaxForLabel[0, 1].ToString("N1") + ")");
else if (intCnt == 0)
pUniqueValueRenderer.set_Label("LL", "LL (no obs)");
else
pUniqueValueRenderer.set_Label("LL", "LL (" + adblMinMaxForLabel[0, 1].ToString("N1") + "-" + adblMinMaxForLabel[1, 1].ToString("N1") + ")");
pQFilter.WhereClause = strFlgFldNam + " = 'HL'";
intCnt = pTable.RowCount(pQFilter);
pCursor = pTable.Search(pQFilter, true);
pDataStat = new DataStatisticsClass();
pDataStat.Field = lvFields.Items[1].SubItems[1].Text;
pDataStat.Cursor = pCursor;
pStatResults = pDataStat.Statistics;
adblMinMaxForLabel[0, 2] = pStatResults.Minimum;
adblMinMaxForLabel[1, 2] = pStatResults.Maximum;
pCursor.Flush();
pSymbol = new SimpleMarkerSymbolClass();
pSymbol.Style = esriSimpleMarkerStyle.esriSMSCircle;
pSymbol.Color = m_pSnippet.getRGB(244, 199, 0);
pUniqueValueRenderer.AddValue("HL", null, (ISymbol)pSymbol);
if (intCnt == 1)
pUniqueValueRenderer.set_Label("HL", "HL (" + adblMinMaxForLabel[0, 2].ToString("N1") + ")");
else if (intCnt == 0)
pUniqueValueRenderer.set_Label("HL", "HL (no obs)");
else
pUniqueValueRenderer.set_Label("HL", "HL (" + adblMinMaxForLabel[0, 2].ToString("N1") + "-" + adblMinMaxForLabel[1, 2].ToString("N1") + ")");
pQFilter.WhereClause = strFlgFldNam + " = 'LH'";
intCnt = pTable.RowCount(pQFilter);
pCursor = pTable.Search(pQFilter, true);
pDataStat = new DataStatisticsClass();
pDataStat.Field = lvFields.Items[1].SubItems[1].Text;
pDataStat.Cursor = pCursor;
pStatResults = pDataStat.Statistics;
adblMinMaxForLabel[0, 3] = pStatResults.Minimum;
adblMinMaxForLabel[1, 3] = pStatResults.Maximum;
pCursor.Flush();
pSymbol = new SimpleMarkerSymbolClass();
pSymbol.Style = esriSimpleMarkerStyle.esriSMSCircle;
pSymbol.Color = m_pSnippet.getRGB(173, 255, 179);
pUniqueValueRenderer.AddValue("LH", null, (ISymbol)pSymbol);
if (intCnt == 1)
pUniqueValueRenderer.set_Label("LH", "LH (" + adblMinMaxForLabel[0, 3].ToString("N1") + ")");
else if (intCnt == 0)
pUniqueValueRenderer.set_Label("LH", "LH (no obs)");
else
pUniqueValueRenderer.set_Label("LH", "LH (" + adblMinMaxForLabel[0, 3].ToString("N1") + "-" + adblMinMaxForLabel[1, 3].ToString("N1") + ")");
pSymbol = new SimpleMarkerSymbolClass();
pSymbol.Style = esriSimpleMarkerStyle.esriSMSCircle ;
pSymbol.Color = m_pSnippet.getRGB(200, 200, 200);
//pUniqueValueRenderer.AddValue("", strFlgFldNam, (ISymbol)pSymbol);
//pUniqueValueRenderer.set_Label("", "Not significant");
pUniqueValueRenderer.DefaultSymbol = (ISymbol)pSymbol;
pUniqueValueRenderer.DefaultLabel = "Not significant";
pUniqueValueRenderer.UseDefaultSymbol = true;
}
IFeatureLayer pNewFLayer = new FeatureLayerClass();
pNewFLayer.FeatureClass = m_pFClass;
pNewFLayer.Name = cboSAM.Text + " of " + m_pFLayer.Name;
IGeoFeatureLayer pGFLayer = (IGeoFeatureLayer)pNewFLayer;
pGFLayer.Renderer = (IFeatureRenderer)pUniqueValueRenderer;
m_pActiveView.FocusMap.AddLayer(pGFLayer);
m_pActiveView.Refresh();
m_pForm.axTOCControl1.Update();
}
else
MessageBox.Show("Complete. The results are stored in the shape file");
#endregion
}
else if (cboSAM.Text == "Gi*")
{
#region Gi*
m_pEngine.Evaluate("sample.lg <- localG(" + strVarNM + ", sample.listw, zero.policy=TRUE)");
m_pEngine.Evaluate("sample.p <- 2*pnorm(-abs(sample.lg))");
if (cboAdjustment.Text == "Bonferroni correction")
m_pEngine.Evaluate("sample.p <- p.adjust(sample.p, method = 'bonferroni', n = length(sample.p))");
double[] dblGValues = m_pEngine.Evaluate("sample.lg").AsNumeric().ToArray();
double[] dblPvalues = m_pEngine.Evaluate("sample.p").AsNumeric().ToArray();
//Save Output on SHP
//Add Target fields to store results in the shapefile
for (int j = 0; j < 2; j++)
{
IField newField = new FieldClass();
IFieldEdit fieldEdit = (IFieldEdit)newField;
fieldEdit.Name_2 = lvFields.Items[j].SubItems[1].Text;
fieldEdit.Type_2 = esriFieldType.esriFieldTypeDouble;
m_pFClass.AddField(newField);
}
//Update Field
pFCursor = m_pFClass.Update(null, false);
pFeature = pFCursor.NextFeature();
int intStatFldIdx = m_pFClass.FindField(lvFields.Items[0].SubItems[1].Text);
int intPrFldIdx = m_pFClass.FindField(lvFields.Items[1].SubItems[1].Text);
int featureIdx = 0;
while (pFeature != null)
{
pFeature.set_Value(intStatFldIdx, dblGValues[featureIdx]);
pFeature.set_Value(intPrFldIdx, dblPvalues[featureIdx]);
pFCursor.UpdateFeature(pFeature);
pFeature = pFCursor.NextFeature();
featureIdx++;
}
pFCursor.Flush();
pfrmProgress.Close();
if (chkMap.Checked)
{
string strStaticFldName = lvFields.Items[0].SubItems[1].Text;
m_pEngine.Evaluate("p.vals <- c(0.1, 0.05, 0.01)");
if (cboAdjustment.Text == "Bonferroni correction")
{
m_pEngine.Evaluate("sample.n <- length(sample.p)");
m_pEngine.Evaluate("p.vals <- p.vals/sample.n");
}
m_pEngine.Evaluate("zc <- qnorm(1 - (p.vals/2))");
double[] dblZBrks = m_pEngine.Evaluate("sort(cbind(zc, -zc))").AsNumeric().ToArray();
pFCursor = m_pFClass.Search(null, false);
IDataStatistics pDataStat = new DataStatisticsClass();
pDataStat.Field = strStaticFldName;
pDataStat.Cursor = (ICursor)pFCursor;
IStatisticsResults pStatResults = pDataStat.Statistics;
double dblMax = pStatResults.Maximum;
double dblMin = pStatResults.Minimum;
int intBreaksCount = dblZBrks.Length + 2;
double[] cb = new double[intBreaksCount];
//Assign Min and Max values for class breaks
if(dblMin < dblZBrks[0])
cb[0] = dblMin;
else
cb[0] = dblZBrks[0] - 1; //Manually Assigned minimum value
if (dblMax > dblZBrks[dblZBrks.Length - 1])
cb[intBreaksCount - 1] = dblMax;
else
cb[intBreaksCount -1] = dblZBrks[dblZBrks.Length - 1] + 1;//Manually Assigned minimum value
for (int k = 0; k < intBreaksCount-2; k++)
cb[k + 1] = dblZBrks[k];
IClassBreaksRenderer pCBRenderer = new ClassBreaksRenderer();
pCBRenderer.Field = strStaticFldName;
pCBRenderer.BreakCount = intBreaksCount -1;
pCBRenderer.MinimumBreak = cb[0];
//' use this interface to set dialog properties
IClassBreaksUIProperties pUIProperties = (IClassBreaksUIProperties)pCBRenderer;
pUIProperties.ColorRamp = "Custom";
if(m_pFClass.ShapeType == esriGeometryType.esriGeometryPolygon)
{
ISimpleFillSymbol pSimpleFillSym;
int[,] arrColors = CreateColorRamp();
//Add Probability Value Manually
string[] strsProbLabels = new string[] { "(0.01)", "(0.05)", "(0.1)", "(0.1)", "(0.05)", "(0.01)" };
//' be careful, indices are different for the diff lists
for (int j = 0; j < intBreaksCount - 1; j++)
{
pCBRenderer.Break[j] = cb[j + 1];
if (j == 0)
pCBRenderer.Label[j] = " <= " + Math.Round(cb[j + 1], 2).ToString() + strsProbLabels[j];
else if (j == intBreaksCount - 2)
pCBRenderer.Label[j] = " > " + Math.Round(cb[j], 2).ToString() + strsProbLabels[j - 1];
else
pCBRenderer.Label[j] = Math.Round(cb[j], 2).ToString() + strsProbLabels[j - 1] + " ~ " + Math.Round(cb[j + 1], 2).ToString() + strsProbLabels[j];
pUIProperties.LowBreak[j] = cb[j];
pSimpleFillSym = new SimpleFillSymbolClass();
IRgbColor pRGBColor = m_pSnippet.getRGB(arrColors[j, 0], arrColors[j, 1], arrColors[j, 2]);
pSimpleFillSym.Color = (IColor)pRGBColor;
pCBRenderer.Symbol[j] = (ISymbol)pSimpleFillSym;
}
}
else if (m_pFClass.ShapeType == esriGeometryType.esriGeometryPoint)
{
ISimpleMarkerSymbol pSimpleMarkerSym;
int[,] arrColors = CreateColorRamp();
//Add Probability Value Manually
string[] strsProbLabels = new string[] { "(0.01)", "(0.05)", "(0.1)", "(0.1)", "(0.05)", "(0.01)" };
//' be careful, indices are different for the diff lists
for (int j = 0; j < intBreaksCount - 1; j++)
{
pCBRenderer.Break[j] = cb[j + 1];
if (j == 0)
pCBRenderer.Label[j] = " <= " + Math.Round(cb[j + 1], 2).ToString() + strsProbLabels[j];
else if (j == intBreaksCount - 2)
pCBRenderer.Label[j] = " > " + Math.Round(cb[j], 2).ToString() + strsProbLabels[j - 1];
else
pCBRenderer.Label[j] = Math.Round(cb[j], 2).ToString() + strsProbLabels[j - 1] + " ~ " + Math.Round(cb[j + 1], 2).ToString() + strsProbLabels[j];
pUIProperties.LowBreak[j] = cb[j];
pSimpleMarkerSym = new SimpleMarkerSymbolClass();
IRgbColor pRGBColor = m_pSnippet.getRGB(arrColors[j, 0], arrColors[j, 1], arrColors[j, 2]);
pSimpleMarkerSym.Color = (IColor)pRGBColor;
pCBRenderer.Symbol[j] = (ISymbol)pSimpleMarkerSym;
}
}
IFeatureLayer pNewFLayer = new FeatureLayerClass();
pNewFLayer.FeatureClass = m_pFClass;
pNewFLayer.Name = cboSAM.Text + " of " + m_pFLayer.Name;
IGeoFeatureLayer pGFLayer = (IGeoFeatureLayer)pNewFLayer;
pGFLayer.Renderer = (IFeatureRenderer)pCBRenderer;
m_pActiveView.FocusMap.AddLayer(pGFLayer);
m_pActiveView.Refresh();
m_pForm.axTOCControl1.Update();
}
else
MessageBox.Show("Complete. The results are stored in the shape file");
#endregion
}
this.Close();
}
catch (Exception ex)
{
frmErrorLog pfrmErrorLog = new frmErrorLog();pfrmErrorLog.ex = ex; pfrmErrorLog.ShowDialog();
return;
}
}
private void btnOpenSWM_Click(object sender, EventArgs e)
{
//Open SWM
if (m_pFClass == null)
{
MessageBox.Show("Please select a target layer");
return;
}
frmAdvSWM pfrmAdvSWM = new frmAdvSWM();
pfrmAdvSWM.m_pFClass = m_pFClass;
pfrmAdvSWM.blnCorrelogram = false;
pfrmAdvSWM.ShowDialog();
m_blnCreateSWM = pfrmAdvSWM.blnSWMCreation;
txtSWM.Text = pfrmAdvSWM.txtSWM.Text;
}
private void cboSAM_SelectedIndexChanged(object sender, EventArgs e)
{
if (m_pFClass == null)
return;
//string strLayerName = cboTargetLayer.Text;
//int intLIndex = m_pSnippet.GetIndexNumberFromLayerName(m_pActiveView, strLayerName);
//ILayer pLayer = m_pForm.axMapControl1.get_Layer(intLIndex);
//IFeatureLayer pFLayer = pLayer as IFeatureLayer;
//ESRI.ArcGIS.Geodatabase.IFeatureClass pFClass = pFLayer.FeatureClass;
string strMethod = cboSAM.Text;
UpdateListview(lvFields, m_pFClass, strMethod);
}
private int[,] CreateColorRamp()
{
int[,] arrColors = new int[7, 3];
arrColors[0, 0] = 33; arrColors[0, 1] = 102; arrColors[0, 2] = 172;
arrColors[1, 0] = 103; arrColors[1, 1] = 169; arrColors[1, 2] = 207;
arrColors[2, 0] = 209; arrColors[2, 1] = 229; arrColors[2, 2] = 240;
arrColors[3, 0] = 247; arrColors[3, 1] = 247; arrColors[3, 2] = 247;
arrColors[4, 0] = 253; arrColors[4, 1] = 219; arrColors[4, 2] = 199;
arrColors[5, 0] = 239; arrColors[5, 1] = 138; arrColors[5, 2] = 98;
arrColors[6, 0] = 178; arrColors[6, 1] = 24; arrColors[6, 2] = 43;
return arrColors;
}
}
}
| 47.93135 | 181 | 0.473002 | [
"MIT"
] | hyeongmokoo/SAAR | VisUncertainty/frmLocalSAM.cs | 41,894 | C# |
namespace Vidly.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class AddedGenreToModelAndMovie : DbMigration
{
public override void Up()
{
CreateTable(
"dbo.Movies",
c => new
{
Id = c.Int(nullable: false, identity: true),
Name = c.String(nullable: false),
ReleaseDate = c.DateTime(nullable: false),
DateAdded = c.DateTime(nullable: false),
NumberInStock = c.Int(nullable: false),
GenreId = c.Int(nullable: false),
})
.PrimaryKey(t => t.Id)
.ForeignKey("dbo.Genres", t => t.GenreId, cascadeDelete: true)
.Index(t => t.GenreId);
CreateTable(
"dbo.Genres",
c => new
{
Id = c.Int(nullable: false),
Name = c.String(nullable: false),
})
.PrimaryKey(t => t.Id);
}
public override void Down()
{
DropForeignKey("dbo.Movies", "GenreId", "dbo.Genres");
DropIndex("dbo.Movies", new[] { "GenreId" });
DropTable("dbo.Genres");
DropTable("dbo.Movies");
}
}
}
| 32.355556 | 78 | 0.423077 | [
"MIT"
] | imranaskem/Vidly | Vidly/Migrations/201701101443282_AddedGenreToModelAndMovie.cs | 1,456 | C# |
using System;
using System.Collections.Generic;
namespace GPS.RandomDataGenerator.Abstractions
{
public interface IGeneratorOptions<TResult>
{
IEnumerable<TResult> Generate(Random random);
}
} | 22.2 | 54 | 0.720721 | [
"MIT"
] | gatewayprogrammingschool/RandomDataGeneration | src/GPS.RandomDataGenerator.Abstractions/IGeneratorOptions.cs | 222 | C# |
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
namespace Microsoft.ServiceFabric.Actors.Remoting.V1
{
using System.Runtime.Serialization;
using Microsoft.ServiceFabric.Actors.Remoting;
/// <summary>
/// Represents the body of the actor messages.
/// </summary>
[DataContract(Name = "msgBody", Namespace = Constants.Namespace)]
internal class ActorMessageBody
{
[DataMember(Name = "val", IsRequired = false, Order = 1)]
public object Value { get; set; }
}
}
| 36.809524 | 99 | 0.557568 | [
"MIT"
] | Bhaskers-Blu-Org2/service-fabric-services-and-actors-dotnet | src/Microsoft.ServiceFabric.Actors/Remoting/V1/ActorMessageBody.cs | 773 | C# |
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using OpenMetaverse;
namespace OpenSim.Framework
{
public class UserClassifiedAdd
{
public UUID ClassifiedId = UUID.Zero;
public UUID CreatorId = UUID.Zero;
public int CreationDate = 0;
public int ExpirationDate = 0;
public int Category = 0;
public string Name = string.Empty;
public string Description = string.Empty;
public UUID ParcelId = UUID.Zero;
public int ParentEstate = 0;
public UUID SnapshotId = UUID.Zero;
public string SimName = string.Empty;
public string GlobalPos = "<0,0,0>";
public string ParcelName = string.Empty;
public byte Flags = 0;
public int Price = 0;
}
public class UserProfileProperties
{
public UUID UserId = UUID.Zero;
public UUID PartnerId = UUID.Zero;
public bool PublishProfile = false;
public bool PublishMature = false;
public string WebUrl = string.Empty;
public int WantToMask = 0;
public string WantToText = string.Empty;
public int SkillsMask = 0;
public string SkillsText = string.Empty;
public string Language = string.Empty;
public UUID ImageId = UUID.Zero;
public string AboutText = string.Empty;
public UUID FirstLifeImageId = UUID.Zero;
public string FirstLifeText = string.Empty;
}
public class UserProfilePick
{
public UUID PickId = UUID.Zero;
public UUID CreatorId = UUID.Zero;
public bool TopPick = false;
public string Name = string.Empty;
public string OriginalName = string.Empty;
public string Desc = string.Empty;
public UUID ParcelId = UUID.Zero;
public UUID SnapshotId = UUID.Zero;
public string User = string.Empty;
public string SimName = string.Empty;
public string GlobalPos = "<0,0,0>";
public int SortOrder = 0;
public bool Enabled = false;
}
public class UserProfileNotes
{
public UUID UserId;
public UUID TargetId;
public string Notes;
}
public class UserPreferences
{
public UUID UserId;
public bool IMViaEmail = false;
public bool Visible = false;
public string EMail = string.Empty;
}
public class UserAccountProperties
{
public string EmailAddress = string.Empty;
public string Firstname = string.Empty;
public string LastName = string.Empty;
public string Password = string.Empty;
public string UserId = string.Empty;
}
public class UserAccountAuth
{
public string UserId = UUID.Zero.ToString();
public string Password = string.Empty;
}
public class UserAppData
{
public string TagId = string.Empty;
public string DataKey = string.Empty;
public string UserId = UUID.Zero.ToString();
public string DataVal = string.Empty;
}
}
| 36.801587 | 80 | 0.66832 | [
"BSD-3-Clause"
] | AlericInglewood/opensimulator | OpenSim/Framework/UserProfiles.cs | 4,637 | C# |
using System;
using Avalonia.Media;
namespace PRUNner.App.Converters.PlanetFinder
{
public abstract class PlanetFinderColorBarConverterBase
{
protected static readonly SolidColorBrush TransparentBrush = new (0);
public SolidColorBrush GetBrush(double greenFactor)
{
var r = Math.Min(255, 2 * 255 * (1 - greenFactor));
var g = Math.Min(255, 2 * 255 * greenFactor);
var color = new Color(255, (byte) r, (byte) g, 0);
var brush = new SolidColorBrush(color);
return brush;
}
}
} | 30.05 | 77 | 0.59401 | [
"MIT"
] | Jacudibu/PRUNner | PRUNner/App/Converters/PlanetFinder/PlanetFinderColorBarConverterBase.cs | 601 | C# |
using System.IO;
using System.Runtime.Serialization;
using WolvenKit.CR2W.Reflection;
using FastMember;
using static WolvenKit.CR2W.Types.Enums;
namespace WolvenKit.CR2W.Types
{
[DataContract(Namespace = "")]
[REDMeta]
public class CBehTreeNodeConditionAmIInInteriorDefinition : IBehTreeNodeConditionIsInInteriorBaseDefinition
{
public CBehTreeNodeConditionAmIInInteriorDefinition(CR2WFile cr2w, CVariable parent, string name) : base(cr2w, parent, name){ }
public static new CVariable Create(CR2WFile cr2w, CVariable parent, string name) => new CBehTreeNodeConditionAmIInInteriorDefinition(cr2w, parent, name);
public override void Read(BinaryReader file, uint size) => base.Read(file, size);
public override void Write(BinaryWriter file) => base.Write(file);
}
} | 34.956522 | 156 | 0.777363 | [
"MIT"
] | DerinHalil/CP77Tools | CP77.CR2W/Types/W3/RTTIConvert/CBehTreeNodeConditionAmIInInteriorDefinition.cs | 782 | C# |
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace DotNetGPSystem
{
internal partial class OpenHRControl : UserControl
{
private OpenHRControl()
{
InitializeComponent();
this.Dock = DockStyle.Fill;
}
public OpenHRControl(OpenHRPatient patient) : this()
{
PopulatePatient(patient);
}
public void PopulatePatient(OpenHRPatient patient)
{
this.textBox1.Text = Utilities.Serialize<OpenHR001OpenHealthRecord>(patient.OpenHealthRecord);
}
}
}
| 22.636364 | 106 | 0.662651 | [
"Apache-2.0"
] | endeavourhealth/GPSystemDemonstrator | DotNetGPSystem/Controls/Patient/OpenHRControl.cs | 749 | C# |
namespace CmnSoftwareBackend.Entities.Dtos.CarDtos
{
public class CarUpdateDto
{
public int Id { get; set; }
public string Name { get; set; }
public string Model { get; set; }
public string Brand { get; set; }
}
} | 23.454545 | 50 | 0.596899 | [
"MIT"
] | YunusOzdemirr/BlogApi | src/v2/CmnSoftwareBackend.Entities/Dtos/CarDtos/CarUpdateDto.cs | 258 | C# |
using UnityEngine;
using System;
using Random = UnityEngine.Random;
namespace DB.SimpleFramework.SimpleAudioManager {
public enum SpatialMode { TwoDimensional, ThreeDimensional }
[Serializable]
public class SimpleAudioSettings {
public AudioClip Clip;
[Space]
[Range(0f, 1f)] public float Volume = 1f;
[Space]
[Range(-3f, 3f)] public float PitchMin = 1f;
[Range(-3f, 3f)] public float PitchMax = 1f;
[Space]
public SpatialMode SpatialMode = SpatialMode.ThreeDimensional;
[Space]
[Min(0f)] public float DistanceMin = 1f;
[Min(0f)] public float DistanceMax = 500f;
public bool IsValid => Clip != null && Volume > 0;
public SimpleAudioSettings(AudioClip clip) {
Clip = clip;
}
public void ApplyToAudioSource(AudioSource source) {
source.clip = Clip;
source.volume = Volume;
source.pitch = PitchMin == PitchMax ? PitchMin : Random.Range(PitchMin, PitchMax);
source.spatialBlend = SpatialMode == SpatialMode.TwoDimensional ? 0f : 1f;
source.minDistance = DistanceMin;
source.maxDistance = DistanceMax;
source.playOnAwake = false;
}
}
}
| 31.195122 | 94 | 0.615324 | [
"MIT"
] | DominikBeens/com.dominikbeens.simpleframework | Runtime/SimpleAudioManager/Scripts/SimpleAudioSettings.cs | 1,281 | C# |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("09. Frequent number")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("09. Frequent number")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("0b06f715-fea5-4235-b5c7-72382fadb93a")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| 38.135135 | 84 | 0.743444 | [
"MIT"
] | jsdelivrbot/Telerik_Academy | CSharp/CSharp Part 2/Homework/Homework 01. Arrays/09. Frequent number/Properties/AssemblyInfo.cs | 1,414 | C# |
namespace BeDbg.Models;
public record DirectoryModel(string Path, IEnumerable<FileModel> Files); | 33.333333 | 72 | 0.81 | [
"MIT"
] | Woodykaixa/BeDbg | BeDbg/Models/DirectoryModel.cs | 102 | C# |
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace Mozart.MicroSite {
public partial class PhotoMe {
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// x 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlInputHidden x;
/// <summary>
/// y 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlInputHidden y;
/// <summary>
/// target 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlImage target;
/// <summary>
/// aSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlAnchor aSave;
}
}
| 26.327869 | 81 | 0.435243 | [
"Apache-2.0"
] | zhenghua75/WeiXinEasy | Mozart/MicroSite/Modules/PhotoWall/PhotoMe.aspx.designer.cs | 2,110 | C# |
// ------------------------------------------------------------------------------
// <auto-generated>
// Generated by Xsd2Code. Version 3.4.0.18239 Microsoft Reciprocal License (Ms-RL)
// <NameSpace>Mim.V4200</NameSpace><Collection>Array</Collection><codeType>CSharp</codeType><EnableDataBinding>False</EnableDataBinding><EnableLazyLoading>False</EnableLazyLoading><TrackingChangesEnable>False</TrackingChangesEnable><GenTrackingClasses>False</GenTrackingClasses><HidePrivateFieldInIDE>False</HidePrivateFieldInIDE><EnableSummaryComment>True</EnableSummaryComment><VirtualProp>False</VirtualProp><IncludeSerializeMethod>True</IncludeSerializeMethod><UseBaseClass>False</UseBaseClass><GenBaseClass>False</GenBaseClass><GenerateCloneMethod>True</GenerateCloneMethod><GenerateDataContracts>False</GenerateDataContracts><CodeBaseTag>Net35</CodeBaseTag><SerializeMethodName>Serialize</SerializeMethodName><DeserializeMethodName>Deserialize</DeserializeMethodName><SaveToFileMethodName>SaveToFile</SaveToFileMethodName><LoadFromFileMethodName>LoadFromFile</LoadFromFileMethodName><GenerateXMLAttributes>True</GenerateXMLAttributes><OrderXMLAttrib>False</OrderXMLAttrib><EnableEncoding>False</EnableEncoding><AutomaticProperties>False</AutomaticProperties><GenerateShouldSerialize>False</GenerateShouldSerialize><DisableDebug>False</DisableDebug><PropNameSpecified>Default</PropNameSpecified><Encoder>UTF8</Encoder><CustomUsings></CustomUsings><ExcludeIncludedTypes>True</ExcludeIncludedTypes><EnableInitializeFields>False</EnableInitializeFields>
// </auto-generated>
// ------------------------------------------------------------------------------
namespace Mim.V4200 {
using System;
using System.Diagnostics;
using System.Xml.Serialization;
using System.Collections;
using System.Xml.Schema;
using System.ComponentModel;
using System.IO;
using System.Text;
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.0.18239")]
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(TypeName="PRPA_MT010101UK06.Subject", Namespace="urn:hl7-org:v3")]
[System.Xml.Serialization.XmlRootAttribute("PRPA_MT010101UK06.Subject", Namespace="urn:hl7-org:v3")]
public partial class PRPA_MT010101UK06Subject {
private PRPA_MT010101UK06Patient patientField;
private string typeField;
private string typeCodeField;
private string[] typeIDField;
private string[] realmCodeField;
private string nullFlavorField;
private static System.Xml.Serialization.XmlSerializer serializer;
public PRPA_MT010101UK06Subject() {
this.typeField = "Participation";
this.typeCodeField = "SBJ";
}
public PRPA_MT010101UK06Patient patient {
get {
return this.patientField;
}
set {
this.patientField = value;
}
}
[System.Xml.Serialization.XmlAttributeAttribute(DataType="token")]
public string type {
get {
return this.typeField;
}
set {
this.typeField = value;
}
}
[System.Xml.Serialization.XmlAttributeAttribute()]
public string typeCode {
get {
return this.typeCodeField;
}
set {
this.typeCodeField = value;
}
}
[System.Xml.Serialization.XmlAttributeAttribute()]
public string[] typeID {
get {
return this.typeIDField;
}
set {
this.typeIDField = value;
}
}
[System.Xml.Serialization.XmlAttributeAttribute(DataType="token")]
public string[] realmCode {
get {
return this.realmCodeField;
}
set {
this.realmCodeField = value;
}
}
[System.Xml.Serialization.XmlAttributeAttribute(DataType="token")]
public string nullFlavor {
get {
return this.nullFlavorField;
}
set {
this.nullFlavorField = value;
}
}
private static System.Xml.Serialization.XmlSerializer Serializer {
get {
if ((serializer == null)) {
serializer = new System.Xml.Serialization.XmlSerializer(typeof(PRPA_MT010101UK06Subject));
}
return serializer;
}
}
#region Serialize/Deserialize
/// <summary>
/// Serializes current PRPA_MT010101UK06Subject object into an XML document
/// </summary>
/// <returns>string XML value</returns>
public virtual string Serialize() {
System.IO.StreamReader streamReader = null;
System.IO.MemoryStream memoryStream = null;
try {
memoryStream = new System.IO.MemoryStream();
Serializer.Serialize(memoryStream, this);
memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
streamReader = new System.IO.StreamReader(memoryStream);
return streamReader.ReadToEnd();
}
finally {
if ((streamReader != null)) {
streamReader.Dispose();
}
if ((memoryStream != null)) {
memoryStream.Dispose();
}
}
}
/// <summary>
/// Deserializes workflow markup into an PRPA_MT010101UK06Subject object
/// </summary>
/// <param name="xml">string workflow markup to deserialize</param>
/// <param name="obj">Output PRPA_MT010101UK06Subject object</param>
/// <param name="exception">output Exception value if deserialize failed</param>
/// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
public static bool Deserialize(string xml, out PRPA_MT010101UK06Subject obj, out System.Exception exception) {
exception = null;
obj = default(PRPA_MT010101UK06Subject);
try {
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out PRPA_MT010101UK06Subject obj) {
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static PRPA_MT010101UK06Subject Deserialize(string xml) {
System.IO.StringReader stringReader = null;
try {
stringReader = new System.IO.StringReader(xml);
return ((PRPA_MT010101UK06Subject)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally {
if ((stringReader != null)) {
stringReader.Dispose();
}
}
}
/// <summary>
/// Serializes current PRPA_MT010101UK06Subject object into file
/// </summary>
/// <param name="fileName">full path of outupt xml file</param>
/// <param name="exception">output Exception value if failed</param>
/// <returns>true if can serialize and save into file; otherwise, false</returns>
public virtual bool SaveToFile(string fileName, out System.Exception exception) {
exception = null;
try {
SaveToFile(fileName);
return true;
}
catch (System.Exception e) {
exception = e;
return false;
}
}
public virtual void SaveToFile(string fileName) {
System.IO.StreamWriter streamWriter = null;
try {
string xmlString = Serialize();
System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
streamWriter = xmlFile.CreateText();
streamWriter.WriteLine(xmlString);
streamWriter.Close();
}
finally {
if ((streamWriter != null)) {
streamWriter.Dispose();
}
}
}
/// <summary>
/// Deserializes xml markup from file into an PRPA_MT010101UK06Subject object
/// </summary>
/// <param name="fileName">string xml file to load and deserialize</param>
/// <param name="obj">Output PRPA_MT010101UK06Subject object</param>
/// <param name="exception">output Exception value if deserialize failed</param>
/// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
public static bool LoadFromFile(string fileName, out PRPA_MT010101UK06Subject obj, out System.Exception exception) {
exception = null;
obj = default(PRPA_MT010101UK06Subject);
try {
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out PRPA_MT010101UK06Subject obj) {
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static PRPA_MT010101UK06Subject LoadFromFile(string fileName) {
System.IO.FileStream file = null;
System.IO.StreamReader sr = null;
try {
file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
sr = new System.IO.StreamReader(file);
string xmlString = sr.ReadToEnd();
sr.Close();
file.Close();
return Deserialize(xmlString);
}
finally {
if ((file != null)) {
file.Dispose();
}
if ((sr != null)) {
sr.Dispose();
}
}
}
#endregion
#region Clone method
/// <summary>
/// Create a clone of this PRPA_MT010101UK06Subject object
/// </summary>
public virtual PRPA_MT010101UK06Subject Clone() {
return ((PRPA_MT010101UK06Subject)(this.MemberwiseClone()));
}
#endregion
}
}
| 41.101504 | 1,358 | 0.571298 | [
"MIT"
] | Kusnaditjung/MimDms | src/Mim.V4200/Generated/PRPA_MT010101UK06Subject.cs | 10,933 | C# |
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Windows.Data;
using Coosu.Shared;
namespace Coosu.Storyboard.Storybrew.Text
{
class DebugConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is IList<char> list)
return string.Join("", list);
return "";
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is string s)
return s.Where(k => k > 31 && k != 127).Distinct().ToArray();
return EmptyArray<char>.Value;
}
}
}
| 28.074074 | 103 | 0.620053 | [
"MIT"
] | Coosu/Coosu | Coosu.Storyboard.Storybrew/Text/DebugConverter.cs | 760 | C# |
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using Google.Apis.CloudResourceManager.v1.Data;
using GoogleCloudExtension;
using GoogleCloudExtension.Accounts;
using GoogleCloudExtension.Deployment;
using GoogleCloudExtension.PublishDialog;
using GoogleCloudExtension.PublishDialogSteps.FlexStep;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using System;
using System.Collections.Generic;
namespace GoogleCloudExtensionUnitTests.PublishDialog
{
[TestClass]
public class PublishDialogStepBaseTests
{
private const string TargetProjectId = "TargetProjectId";
private const string VisualStudioProjectName = "VisualStudioProjectName";
private const string DefaultProjectId = "DefaultProjectId";
private static readonly Project s_targetProject = new Project { ProjectId = TargetProjectId };
private static readonly Project s_defaultProject = new Project { ProjectId = DefaultProjectId };
private PublishDialogStepBase _objectUnderTest;
private Mock<Func<Project>> _pickProjectPromptMock;
private List<string> _changedProperties;
[TestInitialize]
public void BeforeEach()
{
CredentialsStore.Default.UpdateCurrentProject(null);
var mockImpl = new Mock<PublishDialogStepBase> { CallBase = true };
_objectUnderTest = mockImpl.Object;
var mockedProject = Mock.Of<IParsedProject>(p => p.Name == VisualStudioProjectName);
var mockedPublishDialog = Mock.Of<IPublishDialog>(d => d.Project == mockedProject);
_objectUnderTest.OnPushedToDialog(mockedPublishDialog);
_pickProjectPromptMock = new Mock<Func<Project>>();
_objectUnderTest.PickProjectPrompt = _pickProjectPromptMock.Object;
_changedProperties = new List<string>();
_objectUnderTest.PropertyChanged += (sender, args) => _changedProperties.Add(args.PropertyName);
}
[TestMethod]
public void TestSelectProjectCommandCanceled()
{
CredentialsStore.Default.UpdateCurrentProject(s_defaultProject);
_changedProperties.Clear();
_pickProjectPromptMock.Setup(f => f()).Returns((Project)null);
_objectUnderTest.SelectProjectCommand.Execute(null);
CollectionAssert.DoesNotContain(_changedProperties, nameof(FlexStepViewModel.GcpProjectId));
Assert.AreEqual(DefaultProjectId, _objectUnderTest.GcpProjectId);
_pickProjectPromptMock.Verify(f => f(), Times.Once);
}
[TestMethod]
public void TestSelectProjectCommand()
{
_pickProjectPromptMock.Setup(f => f()).Returns(s_targetProject);
_objectUnderTest.SelectProjectCommand.Execute(null);
CollectionAssert.Contains(_changedProperties, nameof(FlexStepViewModel.GcpProjectId));
Assert.AreEqual(TargetProjectId, _objectUnderTest.GcpProjectId);
_pickProjectPromptMock.Verify(f => f(), Times.Once);
}
[TestMethod]
public void TestGcpProjectIdWithProject()
{
CredentialsStore.Default.UpdateCurrentProject(s_targetProject);
Assert.AreEqual(TargetProjectId, _objectUnderTest.GcpProjectId);
}
[TestMethod]
public void TestGcpProjectIdWithNoProject()
{
CredentialsStore.Default.UpdateCurrentProject(null);
Assert.IsNull(_objectUnderTest.GcpProjectId);
}
[TestMethod]
public void TestOnPushedToDialog()
{
var dialogMock = new Mock<IPublishDialog>();
_objectUnderTest.OnPushedToDialog(dialogMock.Object);
Assert.AreEqual(dialogMock.Object, _objectUnderTest.PublishDialog);
}
}
}
| 39.709091 | 108 | 0.701465 | [
"Apache-2.0"
] | iantalarico/google-cloud-visualstudio | GoogleCloudExtension/GoogleCloudExtensionUnitTests/PublishDialog/PublishDialogStepBaseTests.cs | 4,370 | C# |
using System;
using Xunit;
using static LanguageExt.Prelude;
namespace LanguageExt.Tests.Transformer.Traverse.ArrT.Sync
{
public class TryOptionArr
{
[Fact]
public void FailIsSingletonNone()
{
var ma = TryOptionFail<Arr<int>>(new Exception("fail"));
var mb = ma.Sequence();
var mc = Array(TryOptionFail<int>(new Exception("fail")));
Assert.True(mb == mc);
}
[Fact]
public void SuccEmptyIsEmpty()
{
var ma = TryOptionSucc<Arr<int>>(Empty);
var mb = ma.Sequence();
var mc = Array<TryOption<int>>();
Assert.True(mb == mc);
}
[Fact]
public void SuccNonEmptyArrIsArrSuccs()
{
var ma = TryOptionSucc(Array(1, 2, 3));
var mb = ma.Sequence();
var mc = Array(TryOptionSucc(1), TryOptionSucc(2), TryOptionSucc(3));
Assert.True(mb == mc);
}
}
}
| 24.8 | 81 | 0.529234 | [
"MIT"
] | Bagoum/language-ext | LanguageExt.Tests/Transformer/Traverse/Arr/Sync/TryOption.cs | 992 | C# |
using System.Collections.Generic;
using System.Runtime.Serialization;
namespace RiotApi.Net.RestClient.Dto.Champion
{
/// <summary>
/// ChampionListDto - This object contains a collection of champion information.
/// </summary>
[DataContract]
public class ChampionListDto : RiotDto
{
/// <summary>
/// champions List[ChampionDto] The collection of champion information.
/// </summary>
[DataMember(Name = "champions")]
public IEnumerable<ChampionDto> Champions { get; set; }
/// <summary>
/// ChampionDto - This object contains champion information.
/// </summary>
[DataContract]
public class ChampionDto : RiotDto
{
/// <summary>
/// active boolean Indicates if the champion is active.
/// </summary>
[DataMember(Name = "active")]
public bool Active { get; set; }
/// <summary>
/// botEnabled boolean Bot enabled flag (for custom games).
/// </summary>
[DataMember(Name = "botEnabled")]
public bool BotEnabled { get; set; }
/// <summary>
/// botMmEnabled boolean Bot Match Made enabled flag (for Co-op vs. AI games).
/// </summary>
[DataMember(Name = "botMmEnabled")]
public bool BotMmEnabled { get; set; }
/// <summary>
/// freeToPlay boolean Indicates if the champion is free to play.
/// Free to play champions are rotated periodically.
/// </summary>
[DataMember(Name = "freeToPlay")]
public bool FreeToPlay { get; set; }
/// <summary>
/// id long Champion ID.For static information correlating to champion IDs, please refer to the LoL Static Data API.
/// </summary>
[DataMember(Name = "id")]
public long Id { get; set; }
/// <summary>
/// rankedPlayEnabled boolean Ranked play enabled flag.
/// </summary>
[DataMember(Name = "rankedPlayEnabled")]
public bool RankedPlayEnabled { get; set; }
}
}
}
| 35.095238 | 128 | 0.550882 | [
"MIT"
] | Nayls/RiotApi.NET | RiotApi.Net.RestClient/Dto/Champion/ChampionListDto.cs | 2,213 | C# |
using System;
namespace ManagerAPI.Shared.Enums
{
/// <summary>
/// Order Direction
/// </summary>
public enum OrderDirection
{
/// <summary>
/// ASC
/// </summary>
Ascend = 1,
/// <summary>
/// DESC
/// </summary>
Descend = 2,
/// <summary>
/// None
/// </summary>
None = 3
}
/// <summary>
/// Order Direction Convert Service
/// </summary>
public static class OrderDirectionService
{
/// <summary>
/// Get value of direction
/// </summary>
/// <param name="direction">Direction</param>
/// <returns>String value</returns>
public static string GetValue(OrderDirection direction)
{
switch (direction)
{
case OrderDirection.Ascend: return "asc";
case OrderDirection.Descend: return "desc";
case OrderDirection.None: return "none";
default: throw new ArgumentException("Direction does not exist");
}
}
/// <summary>
/// Convert string value to Key
/// </summary>
/// <param name="value">Value</param>
/// <returns>Order Direction key</returns>
public static OrderDirection ValueToKey(string value)
{
switch (value)
{
case "asc": return OrderDirection.Ascend;
case "desc": return OrderDirection.Descend;
case "none": return OrderDirection.None;
default: throw new ArgumentException("Value does not exist");
}
}
}
} | 26.809524 | 81 | 0.50444 | [
"MIT"
] | karcagtamas/ManagerAPI | ManagerAPI.Shared/Enums/OrderDirection.cs | 1,691 | C# |
using System.Collections.Generic;
using System.Reflection;
namespace RegionOrebroLan.Localization.Reflection
{
public interface IAssemblyHelper
{
#region Properties
IAssembly ApplicationAssembly { get; }
IEnumerable<IAssembly> RuntimeAssemblies { get; }
#endregion
#region Methods
IEnumerable<IAssembly> Find(string pattern);
IAssembly Load(string path);
IAssembly LoadByName(string name);
IAssembly LoadSatelliteAssembly(IAssembly mainAssembly, string path);
IAssembly Wrap(Assembly assembly);
IAssembly Wrap(IAssembly mainAssembly, Assembly satelliteAssembly);
#endregion
}
} | 23.5 | 71 | 0.788871 | [
"MIT"
] | RegionOrebroLan/.NET-Localization-Extensions | Source/Project/Reflection/IAssemblyHelper.cs | 613 | C# |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection.Metadata;
using System.Reflection.Metadata.Ecma335;
using System.Reflection.PortableExecutable;
using System.Runtime.InteropServices;
namespace SOS
{
internal class SymbolReader
{
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
internal struct DebugInfo
{
public int lineNumber;
public int ilOffset;
public string fileName;
}
[StructLayout(LayoutKind.Sequential)]
internal struct MethodDebugInfo
{
public IntPtr points;
public int size;
public IntPtr locals;
public int localsSize;
}
/// <summary>
/// Read memory callback
/// </summary>
/// <returns>number of bytes read or 0 for error</returns>
internal unsafe delegate int ReadMemoryDelegate(ulong address, byte* buffer, int count);
private sealed class OpenedReader : IDisposable
{
public readonly MetadataReaderProvider Provider;
public readonly MetadataReader Reader;
public OpenedReader(MetadataReaderProvider provider, MetadataReader reader)
{
Debug.Assert(provider != null);
Debug.Assert(reader != null);
Provider = provider;
Reader = reader;
}
public void Dispose() => Provider.Dispose();
}
/// <summary>
/// Stream implementation to read debugger target memory for in-memory PDBs
/// </summary>
private class TargetStream : Stream
{
readonly ulong _address;
readonly ReadMemoryDelegate _readMemory;
public override long Position { get; set; }
public override long Length { get; }
public override bool CanSeek { get { return true; } }
public override bool CanRead { get { return true; } }
public override bool CanWrite { get { return false; } }
public TargetStream(ulong address, int size, ReadMemoryDelegate readMemory)
: base()
{
_address = address;
_readMemory = readMemory;
Length = size;
Position = 0;
}
public override int Read(byte[] buffer, int offset, int count)
{
if (Position + count > Length)
{
throw new ArgumentOutOfRangeException();
}
unsafe
{
fixed (byte* p = &buffer[offset])
{
int read = _readMemory(_address + (ulong)Position, p, count);
Position += read;
return read;
}
}
}
public override long Seek(long offset, SeekOrigin origin)
{
switch (origin)
{
case SeekOrigin.Begin:
Position = offset;
break;
case SeekOrigin.End:
Position = Length + offset;
break;
case SeekOrigin.Current:
Position += offset;
break;
}
return Position;
}
public override void Flush()
{
}
public override void SetLength(long value)
{
throw new NotImplementedException();
}
public override void Write(byte[] buffer, int offset, int count)
{
throw new NotImplementedException();
}
}
/// <summary>
/// Quick fix for Path.GetFileName which incorrectly handles Windows-style paths on Linux
/// </summary>
/// <param name="pathName"> File path to be processed </param>
/// <returns>Last component of path</returns>
private static string GetFileName(string pathName)
{
int pos = pathName.LastIndexOfAny(new char[] { '/', '\\'});
if (pos < 0)
return pathName;
return pathName.Substring(pos + 1);
}
/// <summary>
/// Checks availability of debugging information for given assembly.
/// </summary>
/// <param name="assemblyPath">
/// File path of the assembly or null if the module is in-memory or dynamic (generated by Reflection.Emit)
/// </param>
/// <param name="isFileLayout">type of in-memory PE layout, if true, file based layout otherwise, loaded layout</param>
/// <param name="loadedPeAddress">
/// Loaded PE image address or zero if the module is dynamic (generated by Reflection.Emit).
/// Dynamic modules have their PDBs (if any) generated to an in-memory stream
/// (pointed to by <paramref name="inMemoryPdbAddress"/> and <paramref name="inMemoryPdbSize"/>).
/// </param>
/// <param name="loadedPeSize">loaded PE image size</param>
/// <param name="inMemoryPdbAddress">in memory PDB address or zero</param>
/// <param name="inMemoryPdbSize">in memory PDB size</param>
/// <returns>Symbol reader handle or zero if error</returns>
internal static IntPtr LoadSymbolsForModule(string assemblyPath, bool isFileLayout, ulong loadedPeAddress, int loadedPeSize,
ulong inMemoryPdbAddress, int inMemoryPdbSize, ReadMemoryDelegate readMemory)
{
try
{
TargetStream peStream = null;
if (assemblyPath == null && loadedPeAddress != 0)
{
peStream = new TargetStream(loadedPeAddress, loadedPeSize, readMemory);
}
TargetStream pdbStream = null;
if (inMemoryPdbAddress != 0)
{
pdbStream = new TargetStream(inMemoryPdbAddress, inMemoryPdbSize, readMemory);
}
OpenedReader openedReader = GetReader(assemblyPath, isFileLayout, peStream, pdbStream);
if (openedReader != null)
{
GCHandle gch = GCHandle.Alloc(openedReader);
return GCHandle.ToIntPtr(gch);
}
}
catch
{
}
return IntPtr.Zero;
}
/// <summary>
/// Cleanup and dispose of symbol reader handle
/// </summary>
/// <param name="symbolReaderHandle">symbol reader handle returned by LoadSymbolsForModule</param>
internal static void Dispose(IntPtr symbolReaderHandle)
{
Debug.Assert(symbolReaderHandle != IntPtr.Zero);
try
{
GCHandle gch = GCHandle.FromIntPtr(symbolReaderHandle);
((OpenedReader)gch.Target).Dispose();
gch.Free();
}
catch
{
}
}
/// <summary>
/// Returns method token and IL offset for given source line number.
/// </summary>
/// <param name="symbolReaderHandle">symbol reader handle returned by LoadSymbolsForModule</param>
/// <param name="filePath">source file name and path</param>
/// <param name="lineNumber">source line number</param>
/// <param name="methodToken">method token return</param>
/// <param name="ilOffset">IL offset return</param>
/// <returns> true if information is available</returns>
internal static bool ResolveSequencePoint(IntPtr symbolReaderHandle, string filePath, int lineNumber, out int methodToken, out int ilOffset)
{
Debug.Assert(symbolReaderHandle != IntPtr.Zero);
methodToken = 0;
ilOffset = 0;
GCHandle gch = GCHandle.FromIntPtr(symbolReaderHandle);
MetadataReader reader = ((OpenedReader)gch.Target).Reader;
try
{
string fileName = GetFileName(filePath);
foreach (MethodDebugInformationHandle methodDebugInformationHandle in reader.MethodDebugInformation)
{
MethodDebugInformation methodDebugInfo = reader.GetMethodDebugInformation(methodDebugInformationHandle);
SequencePointCollection sequencePoints = methodDebugInfo.GetSequencePoints();
foreach (SequencePoint point in sequencePoints)
{
string sourceName = reader.GetString(reader.GetDocument(point.Document).Name);
if (point.StartLine == lineNumber && GetFileName(sourceName) == fileName)
{
methodToken = MetadataTokens.GetToken(methodDebugInformationHandle.ToDefinitionHandle());
ilOffset = point.Offset;
return true;
}
}
}
}
catch
{
}
return false;
}
/// <summary>
/// Returns source line number and source file name for given IL offset and method token.
/// </summary>
/// <param name="symbolReaderHandle">symbol reader handle returned by LoadSymbolsForModule</param>
/// <param name="methodToken">method token</param>
/// <param name="ilOffset">IL offset</param>
/// <param name="lineNumber">source line number return</param>
/// <param name="fileName">source file name return</param>
/// <returns> true if information is available</returns>
internal static bool GetLineByILOffset(IntPtr symbolReaderHandle, int methodToken, long ilOffset, out int lineNumber, out IntPtr fileName)
{
lineNumber = 0;
fileName = IntPtr.Zero;
string sourceFileName = null;
if (!GetSourceLineByILOffset(symbolReaderHandle, methodToken, ilOffset, out lineNumber, out sourceFileName))
{
return false;
}
fileName = Marshal.StringToBSTR(sourceFileName);
sourceFileName = null;
return true;
}
/// <summary>
/// Helper method to return source line number and source file name for given IL offset and method token.
/// </summary>
/// <param name="symbolReaderHandle">symbol reader handle returned by LoadSymbolsForModule</param>
/// <param name="methodToken">method token</param>
/// <param name="ilOffset">IL offset</param>
/// <param name="lineNumber">source line number return</param>
/// <param name="fileName">source file name return</param>
/// <returns> true if information is available</returns>
private static bool GetSourceLineByILOffset(IntPtr symbolReaderHandle, int methodToken, long ilOffset, out int lineNumber, out string fileName)
{
Debug.Assert(symbolReaderHandle != IntPtr.Zero);
lineNumber = 0;
fileName = null;
GCHandle gch = GCHandle.FromIntPtr(symbolReaderHandle);
MetadataReader reader = ((OpenedReader)gch.Target).Reader;
try
{
Handle handle = MetadataTokens.Handle(methodToken);
if (handle.Kind != HandleKind.MethodDefinition)
return false;
MethodDebugInformationHandle methodDebugHandle = ((MethodDefinitionHandle)handle).ToDebugInformationHandle();
MethodDebugInformation methodDebugInfo = reader.GetMethodDebugInformation(methodDebugHandle);
SequencePointCollection sequencePoints = methodDebugInfo.GetSequencePoints();
SequencePoint nearestPoint = sequencePoints.GetEnumerator().Current;
foreach (SequencePoint point in sequencePoints)
{
if (point.Offset < ilOffset)
{
nearestPoint = point;
}
else
{
if (point.Offset == ilOffset)
nearestPoint = point;
if (nearestPoint.StartLine == 0 || nearestPoint.StartLine == SequencePoint.HiddenLine)
return false;
lineNumber = nearestPoint.StartLine;
fileName = reader.GetString(reader.GetDocument(nearestPoint.Document).Name);
return true;
}
}
}
catch
{
}
return false;
}
/// <summary>
/// Returns local variable name for given local index and IL offset.
/// </summary>
/// <param name="symbolReaderHandle">symbol reader handle returned by LoadSymbolsForModule</param>
/// <param name="methodToken">method token</param>
/// <param name="localIndex">local variable index</param>
/// <param name="localVarName">local variable name return</param>
/// <returns>true if name has been found</returns>
internal static bool GetLocalVariableName(IntPtr symbolReaderHandle, int methodToken, int localIndex, out IntPtr localVarName)
{
localVarName = IntPtr.Zero;
string localVar = null;
if (!GetLocalVariableByIndex(symbolReaderHandle, methodToken, localIndex, out localVar))
return false;
localVarName = Marshal.StringToBSTR(localVar);
localVar = null;
return true;
}
/// <summary>
/// Helper method to return local variable name for given local index and IL offset.
/// </summary>
/// <param name="symbolReaderHandle">symbol reader handle returned by LoadSymbolsForModule</param>
/// <param name="methodToken">method token</param>
/// <param name="localIndex">local variable index</param>
/// <param name="localVarName">local variable name return</param>
/// <returns>true if name has been found</returns>
internal static bool GetLocalVariableByIndex(IntPtr symbolReaderHandle, int methodToken, int localIndex, out string localVarName)
{
Debug.Assert(symbolReaderHandle != IntPtr.Zero);
localVarName = null;
GCHandle gch = GCHandle.FromIntPtr(symbolReaderHandle);
MetadataReader reader = ((OpenedReader)gch.Target).Reader;
try
{
Handle handle = MetadataTokens.Handle(methodToken);
if (handle.Kind != HandleKind.MethodDefinition)
return false;
MethodDebugInformationHandle methodDebugHandle = ((MethodDefinitionHandle)handle).ToDebugInformationHandle();
LocalScopeHandleCollection localScopes = reader.GetLocalScopes(methodDebugHandle);
foreach (LocalScopeHandle scopeHandle in localScopes)
{
LocalScope scope = reader.GetLocalScope(scopeHandle);
LocalVariableHandleCollection localVars = scope.GetLocalVariables();
foreach (LocalVariableHandle varHandle in localVars)
{
LocalVariable localVar = reader.GetLocalVariable(varHandle);
if (localVar.Index == localIndex)
{
if (localVar.Attributes == LocalVariableAttributes.DebuggerHidden)
return false;
localVarName = reader.GetString(localVar.Name);
return true;
}
}
}
}
catch
{
}
return false;
}
internal static bool GetLocalsInfoForMethod(string assemblyPath, int methodToken, out List<string> locals)
{
locals = null;
OpenedReader openedReader = GetReader(assemblyPath, isFileLayout: true, peStream: null, pdbStream: null);
if (openedReader == null)
return false;
using (openedReader)
{
try
{
Handle handle = MetadataTokens.Handle(methodToken);
if (handle.Kind != HandleKind.MethodDefinition)
return false;
locals = new List<string>();
MethodDebugInformationHandle methodDebugHandle =
((MethodDefinitionHandle)handle).ToDebugInformationHandle();
LocalScopeHandleCollection localScopes = openedReader.Reader.GetLocalScopes(methodDebugHandle);
foreach (LocalScopeHandle scopeHandle in localScopes)
{
LocalScope scope = openedReader.Reader.GetLocalScope(scopeHandle);
LocalVariableHandleCollection localVars = scope.GetLocalVariables();
foreach (LocalVariableHandle varHandle in localVars)
{
LocalVariable localVar = openedReader.Reader.GetLocalVariable(varHandle);
if (localVar.Attributes == LocalVariableAttributes.DebuggerHidden)
continue;
locals.Add(openedReader.Reader.GetString(localVar.Name));
}
}
}
catch
{
return false;
}
}
return true;
}
/// <summary>
/// Returns source name, line numbers and IL offsets for given method token.
/// </summary>
/// <param name="assemblyPath">file path of the assembly</param>
/// <param name="methodToken">method token</param>
/// <param name="debugInfo">structure with debug information return</param>
/// <returns>true if information is available</returns>
/// <remarks>used by the gdb JIT support (not SOS). Does not support in-memory PEs or PDBs</remarks>
internal static bool GetInfoForMethod(string assemblyPath, int methodToken, ref MethodDebugInfo debugInfo)
{
try
{
List<DebugInfo> points = null;
List<string> locals = null;
if (!GetDebugInfoForMethod(assemblyPath, methodToken, out points))
{
return false;
}
if (!GetLocalsInfoForMethod(assemblyPath, methodToken, out locals))
{
return false;
}
var structSize = Marshal.SizeOf<DebugInfo>();
debugInfo.size = points.Count;
var ptr = debugInfo.points;
foreach (var info in points)
{
Marshal.StructureToPtr(info, ptr, false);
ptr = (IntPtr)(ptr.ToInt64() + structSize);
}
debugInfo.localsSize = locals.Count;
debugInfo.locals = Marshal.AllocHGlobal(debugInfo.localsSize * Marshal.SizeOf<IntPtr>());
IntPtr ptrLocals = debugInfo.locals;
foreach (string s in locals)
{
Marshal.WriteIntPtr(ptrLocals, Marshal.StringToHGlobalUni(s));
ptrLocals += Marshal.SizeOf<IntPtr>();
}
return true;
}
catch
{
}
return false;
}
/// <summary>
/// Helper method to return source name, line numbers and IL offsets for given method token.
/// </summary>
/// <param name="assemblyPath">file path of the assembly</param>
/// <param name="methodToken">method token</param>
/// <param name="points">list of debug information for each sequence point return</param>
/// <returns>true if information is available</returns>
/// <remarks>used by the gdb JIT support (not SOS). Does not support in-memory PEs or PDBs</remarks>
private static bool GetDebugInfoForMethod(string assemblyPath, int methodToken, out List<DebugInfo> points)
{
points = null;
OpenedReader openedReader = GetReader(assemblyPath, isFileLayout: true, peStream: null, pdbStream: null);
if (openedReader == null)
return false;
using (openedReader)
{
try
{
Handle handle = MetadataTokens.Handle(methodToken);
if (handle.Kind != HandleKind.MethodDefinition)
return false;
points = new List<DebugInfo>();
MethodDebugInformationHandle methodDebugHandle = ((MethodDefinitionHandle)handle).ToDebugInformationHandle();
MethodDebugInformation methodDebugInfo = openedReader.Reader.GetMethodDebugInformation(methodDebugHandle);
SequencePointCollection sequencePoints = methodDebugInfo.GetSequencePoints();
foreach (SequencePoint point in sequencePoints)
{
DebugInfo debugInfo = new DebugInfo();
debugInfo.lineNumber = point.StartLine;
debugInfo.fileName = GetFileName(openedReader.Reader.GetString(openedReader.Reader.GetDocument(point.Document).Name));
debugInfo.ilOffset = point.Offset;
points.Add(debugInfo);
}
}
catch
{
return false;
}
}
return true;
}
/// <summary>
/// Returns the portable PDB reader for the assembly path
/// </summary>
/// <param name="assemblyPath">file path of the assembly or null if the module is in-memory or dynamic</param>
/// <param name="isFileLayout">type of in-memory PE layout, if true, file based layout otherwise, loaded layout</param>
/// <param name="peStream">optional in-memory PE stream</param>
/// <param name="pdbStream">optional in-memory PDB stream</param>
/// <returns>reader/provider wrapper instance</returns>
/// <remarks>
/// Assumes that neither PE image nor PDB loaded into memory can be unloaded or moved around.
/// </remarks>
private static OpenedReader GetReader(string assemblyPath, bool isFileLayout, Stream peStream, Stream pdbStream)
{
return (pdbStream != null) ? TryOpenReaderForInMemoryPdb(pdbStream) : TryOpenReaderFromAssembly(assemblyPath, isFileLayout, peStream);
}
private static OpenedReader TryOpenReaderForInMemoryPdb(Stream pdbStream)
{
Debug.Assert(pdbStream != null);
byte[] buffer = new byte[sizeof(uint)];
if (pdbStream.Read(buffer, 0, sizeof(uint)) != sizeof(uint))
{
return null;
}
uint signature = BitConverter.ToUInt32(buffer, 0);
// quick check to avoid throwing exceptions below in common cases:
const uint ManagedMetadataSignature = 0x424A5342;
if (signature != ManagedMetadataSignature)
{
// not a Portable PDB
return null;
}
OpenedReader result = null;
MetadataReaderProvider provider = null;
try
{
pdbStream.Position = 0;
provider = MetadataReaderProvider.FromPortablePdbStream(pdbStream);
result = new OpenedReader(provider, provider.GetMetadataReader());
}
catch (Exception e) when (e is BadImageFormatException || e is IOException)
{
return null;
}
finally
{
if (result == null)
{
provider?.Dispose();
}
}
return result;
}
private static OpenedReader TryOpenReaderFromAssembly(string assemblyPath, bool isFileLayout, Stream peStream)
{
if (assemblyPath == null && peStream == null)
return null;
PEStreamOptions options = isFileLayout ? PEStreamOptions.Default : PEStreamOptions.IsLoadedImage;
if (peStream == null)
{
peStream = TryOpenFile(assemblyPath);
if (peStream == null)
return null;
options = PEStreamOptions.Default;
}
try
{
using (var peReader = new PEReader(peStream, options))
{
DebugDirectoryEntry codeViewEntry, embeddedPdbEntry;
ReadPortableDebugTableEntries(peReader, out codeViewEntry, out embeddedPdbEntry);
// First try .pdb file specified in CodeView data (we prefer .pdb file on disk over embedded PDB
// since embedded PDB needs decompression which is less efficient than memory-mapping the file).
if (codeViewEntry.DataSize != 0)
{
var result = TryOpenReaderFromCodeView(peReader, codeViewEntry, assemblyPath);
if (result != null)
{
return result;
}
}
// if it failed try Embedded Portable PDB (if available):
if (embeddedPdbEntry.DataSize != 0)
{
return TryOpenReaderFromEmbeddedPdb(peReader, embeddedPdbEntry);
}
}
}
catch (Exception e) when (e is BadImageFormatException || e is IOException)
{
// nop
}
return null;
}
private static void ReadPortableDebugTableEntries(PEReader peReader, out DebugDirectoryEntry codeViewEntry, out DebugDirectoryEntry embeddedPdbEntry)
{
// See spec: https://github.com/dotnet/corefx/blob/master/src/System.Reflection.Metadata/specs/PE-COFF.md
codeViewEntry = default(DebugDirectoryEntry);
embeddedPdbEntry = default(DebugDirectoryEntry);
foreach (DebugDirectoryEntry entry in peReader.ReadDebugDirectory())
{
if (entry.Type == DebugDirectoryEntryType.CodeView)
{
const ushort PortableCodeViewVersionMagic = 0x504d;
if (entry.MinorVersion != PortableCodeViewVersionMagic)
{
continue;
}
codeViewEntry = entry;
}
else if (entry.Type == DebugDirectoryEntryType.EmbeddedPortablePdb)
{
embeddedPdbEntry = entry;
}
}
}
private static OpenedReader TryOpenReaderFromCodeView(PEReader peReader, DebugDirectoryEntry codeViewEntry, string assemblyPath)
{
OpenedReader result = null;
MetadataReaderProvider provider = null;
try
{
var data = peReader.ReadCodeViewDebugDirectoryData(codeViewEntry);
string pdbPath = data.Path;
if (assemblyPath != null)
{
try
{
pdbPath = Path.Combine(Path.GetDirectoryName(assemblyPath), GetFileName(pdbPath));
}
catch
{
// invalid characters in CodeView path
return null;
}
}
var pdbStream = TryOpenFile(pdbPath);
if (pdbStream == null)
{
return null;
}
provider = MetadataReaderProvider.FromPortablePdbStream(pdbStream);
var reader = provider.GetMetadataReader();
// Validate that the PDB matches the assembly version
if (data.Age == 1 && new BlobContentId(reader.DebugMetadataHeader.Id) == new BlobContentId(data.Guid, codeViewEntry.Stamp))
{
result = new OpenedReader(provider, reader);
}
}
catch (Exception e) when (e is BadImageFormatException || e is IOException)
{
return null;
}
finally
{
if (result == null)
{
provider?.Dispose();
}
}
return result;
}
private static OpenedReader TryOpenReaderFromEmbeddedPdb(PEReader peReader, DebugDirectoryEntry embeddedPdbEntry)
{
OpenedReader result = null;
MetadataReaderProvider provider = null;
try
{
// TODO: We might want to cache this provider globally (across stack traces),
// since decompressing embedded PDB takes some time.
provider = peReader.ReadEmbeddedPortablePdbDebugDirectoryData(embeddedPdbEntry);
result = new OpenedReader(provider, provider.GetMetadataReader());
}
catch (Exception e) when (e is BadImageFormatException || e is IOException)
{
return null;
}
finally
{
if (result == null)
{
provider?.Dispose();
}
}
return result;
}
private static Stream TryOpenFile(string path)
{
if (!File.Exists(path))
{
return null;
}
try
{
return File.OpenRead(path);
}
catch
{
return null;
}
}
}
}
| 40.431937 | 157 | 0.540142 | [
"MIT"
] | guhuro/coreclr | src/ToolBox/SOS/NETCore/SymbolReader.cs | 30,890 | C# |
using System.Data.Entity.ModelConfiguration;
using Microsoft.AspNet.Identity.EntityFramework;
namespace HBSIS.SpaUserControl.CrossCutting.Identity.EntityConfig
{
public class LoginMap : EntityTypeConfiguration<IdentityUserLogin>
{
public LoginMap()
{
ToTable("UserLogins");
HasKey(l => new { l.UserId, l.LoginProvider, l.ProviderKey });
}
}
}
| 25.375 | 74 | 0.67734 | [
"MIT"
] | manacespereira/spa-user-control-hbsis | server/HBSIS.SpaUserControl/HBSIS.SpaUserControl.CrossCutting.Identity/EntityConfig/LoginMap.cs | 408 | C# |
using System;
using System.Linq;
namespace CronBuilder
{
public interface ICronMonthlyBuilder
{
ICronDailyMinuteTimeBuilder On(params MonthDay[] day);
}
internal class CronMonthlyBuilder : ICronMonthlyBuilder
{
private readonly Cron _cron;
internal CronMonthlyBuilder() : this(new Cron())
{
}
internal CronMonthlyBuilder(Cron cron)
{
_cron = cron;
}
public ICronDailyMinuteTimeBuilder On(params MonthDay[] day)
{
if (day == null || !day.Any())
{
throw new ArgumentNullException(nameof(day));
}
_cron.MonthDayRange = day
.Distinct()
.Select(d => ((int)d).ToString())
.Aggregate((prev, curr) => $"{prev},{curr}");
return new CronDailyMinuteTimeBuilder(_cron);
}
}
}
| 22.925 | 68 | 0.543075 | [
"MIT"
] | rick-moneybox/cron-builder | src/CronBuilder/ICronMonthlyBuilder.cs | 919 | C# |
using UnityEngine;
public class SelfDestroy : Photon.MonoBehaviour
{
public float CountDown = 5f;
private void Update()
{
CountDown -= Time.deltaTime;
if (CountDown > 0)
{
return;
}
if (IN_GAME_MAIN_CAMERA.Gametype == GameType.Singleplayer || base.photonView == null || base.photonView.viewID == 0)
{
Object.Destroy(base.gameObject);
}
else if (base.photonView != null && base.photonView.isMine)
{
PhotonNetwork.Destroy(base.gameObject);
}
}
}
| 23.16 | 124 | 0.568221 | [
"Apache-2.0"
] | alerithe/guardian | Assembly-CSharp/AoTTG/SelfDestroy.cs | 579 | C# |
//
// Copyright 2020 Google LLC
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
//
using Google.Solutions.CloudIap;
using Google.Solutions.Common.Auth;
using Google.Solutions.IapDesktop.Application.ObjectModel;
using Google.Solutions.IapDesktop.Application.Services.Adapters;
using Google.Solutions.IapDesktop.Application.Services.Integration;
using Google.Solutions.IapDesktop.Application.Services.SecureConnect;
using Google.Solutions.IapDesktop.Application.Services.Settings;
using Google.Solutions.IapTunneling.Iap;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
namespace Google.Solutions.IapDesktop.Windows
{
internal class MainFormViewModel : ViewModelBase
{
private readonly DockPanelColorPalette colorPalette;
private readonly AuthSettingsRepository authSettings;
private readonly ApplicationSettingsRepository applicationSettings;
// NB. This list is only access from the UI thread, so no locking required.
private readonly LinkedList<BackgroundJob> backgroundJobs
= new LinkedList<BackgroundJob>();
private bool isBackgroundJobStatusVisible = false;
private string signInState = null;
private string deviceState = null;
private bool isDeviceStateVisible = false;
public MainFormViewModel(
Control view,
DockPanelColorPalette colorPalette,
ApplicationSettingsRepository applicationSettings,
AuthSettingsRepository authSettings)
{
this.View = view;
this.colorPalette = colorPalette;
this.applicationSettings = applicationSettings;
this.authSettings = authSettings;
}
//---------------------------------------------------------------------
// Observable properties.
//---------------------------------------------------------------------
public bool IsLoggingEnabled
{
get => Program.IsLoggingEnabled;
set
{
Program.IsLoggingEnabled = value;
RaisePropertyChange();
RaisePropertyChange((MainFormViewModel m) => m.StatusBarBackColor);
RaisePropertyChange((MainFormViewModel m) => m.StatusText);
}
}
public Color StatusBarBackColor
{
get => this.IsLoggingEnabled
? Color.Red
: this.colorPalette.ToolWindowCaptionActive.Background;
}
public string StatusText
{
get => this.IsLoggingEnabled
? $"Logging to {Program.LogFile}, performance might be degraded while logging is enabled."
: string.Empty;
}
public bool IsBackgroundJobStatusVisible
{
get => this.isBackgroundJobStatusVisible;
private set
{
this.isBackgroundJobStatusVisible = value;
RaisePropertyChange();
RaisePropertyChange((MainFormViewModel m) => m.BackgroundJobStatus);
}
}
public string BackgroundJobStatus
{
get
{
var count = this.backgroundJobs.Count();
if (count == 0)
{
return null;
}
else if (count == 1)
{
return this.backgroundJobs.First().Description.StatusMessage;
}
else
{
return this.backgroundJobs.First().Description.StatusMessage +
$" (+{count - 1} more background jobs)";
}
}
}
public string SignInStateCaption
{
get => this.signInState;
set
{
this.signInState = value;
RaisePropertyChange();
}
}
public string DeviceStateCaption
{
get => this.deviceState;
set
{
this.deviceState = value;
RaisePropertyChange();
}
}
public bool IsDeviceStateVisible
{
get => this.isDeviceStateVisible;
set
{
this.isDeviceStateVisible = value;
RaisePropertyChange();
}
}
//---------------------------------------------------------------------
// Background job actions.
//---------------------------------------------------------------------
public IJobUserFeedback CreateBackgroundJob(
JobDescription jobDescription,
CancellationTokenSource cancellationSource)
{
return new BackgroundJob(this, jobDescription, cancellationSource);
}
public void CancelBackgroundJobs()
{
// NB. Use ToList to create a snapshot of the list because Cancel()
// modifies the list while we are iterating it.
foreach (var job in this.backgroundJobs.ToList())
{
job.Cancel();
}
}
//---------------------------------------------------------------------
// Authorization actions.
//---------------------------------------------------------------------
public IAuthorization Authorization { get; private set; }
public IDeviceEnrollment DeviceEnrollment { get; private set; }
public void Authorize()
{
Debug.Assert(this.Authorization == null);
Debug.Assert(this.DeviceEnrollment == null);
//
// Get the user authorization, either by using stored
// credentials or by initiating an OAuth authorization flow.
//
this.Authorization = AuthorizeDialog.Authorize(
(Control)this.View,
OAuthClient.Secrets,
new[] { IapTunnelingEndpoint.RequiredScope },
this.authSettings);
if (this.Authorization == null)
{
// Aborted.
return;
}
//
// Determine enrollment state of this device.
//
// TODO: Run this asynchronously.
this.DeviceEnrollment = SecureConnectEnrollment.GetEnrollmentAsync(
new CertificateStoreAdapter(),
this.applicationSettings,
this.Authorization.UserInfo.Subject).Result;
this.SignInStateCaption = this.Authorization.Email;
this.DeviceStateCaption = "Endpoint Verification";
this.IsDeviceStateVisible = this.DeviceEnrollment.State != DeviceEnrollmentState.Disabled;
Debug.Assert(this.SignInStateCaption != null);
Debug.Assert(this.DeviceEnrollment != null);
}
public async Task ReauthorizeAsync(CancellationToken token)
{
Debug.Assert(this.Authorization != null);
Debug.Assert(this.DeviceEnrollment != null);
// Reauthorize, this might cause another OAuth code flow.
await this.Authorization.ReauthorizeAsync(token)
.ConfigureAwait(true);
// Refresh enrollment info as the user might have switched identities.
await this.DeviceEnrollment
.RefreshAsync(this.Authorization.UserInfo.Subject)
.ConfigureAwait(true);
this.SignInStateCaption = this.Authorization.Email;
}
public Task RevokeAuthorizationAsync()
{
Debug.Assert(this.Authorization != null);
Debug.Assert(this.DeviceEnrollment != null);
return this.Authorization.RevokeAsync();
}
public bool IsAuthorized =>
this.Authorization != null &&
this.DeviceEnrollment != null;
//---------------------------------------------------------------------
// Helper classes.
//---------------------------------------------------------------------
private class BackgroundJob : IJobUserFeedback
{
private readonly MainFormViewModel viewModel;
private readonly CancellationTokenSource cancellationSource;
public JobDescription Description { get; }
public bool IsShowing => true;
public BackgroundJob(
MainFormViewModel viewModel,
JobDescription jobDescription,
CancellationTokenSource cancellationSource)
{
this.viewModel = viewModel;
this.Description = jobDescription;
this.cancellationSource = cancellationSource;
}
public void Cancel()
{
this.cancellationSource.Cancel();
Finish();
}
public void Finish()
{
this.viewModel.backgroundJobs.Remove(this);
this.viewModel.IsBackgroundJobStatusVisible
= this.viewModel.backgroundJobs.Any();
}
public void Start()
{
this.viewModel.backgroundJobs.AddLast(this);
this.viewModel.IsBackgroundJobStatusVisible = true;
}
}
}
}
| 34.451505 | 106 | 0.552859 | [
"Apache-2.0"
] | Face1174/iap-desktop | sources/Google.Solutions.IapDesktop/Windows/MainFormViewModel.cs | 10,303 | C# |
using Microsoft.IdentityModel.Tokens;
using System;
using System.Collections.Generic;
using System.IdentityModel.Tokens.Jwt;
using System.Linq;
using System.Security.Claims;
using System.Text;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
namespace SampleTest.IdentityModel.Tokens.Jwt {
public class JwtSecurityTokenHandlerTest {
private readonly ITestOutputHelper _output;
public JwtSecurityTokenHandlerTest(ITestOutputHelper output) {
_output = output;
}
[Fact]
public void CanValidateToken_trueを返す() {
// Arrange
var handler = new JwtSecurityTokenHandler();
// Act
// Assert
Assert.True(handler.CanValidateToken);
}
[Fact]
public void CanWriteToken_trueを返す() {
// Arrange
var handler = new JwtSecurityTokenHandler();
// Act
// Assert
Assert.True(handler.CanWriteToken);
}
[Theory]
// null、空文字、空白はfalse
[InlineData(null, false)]
[InlineData("", false)]
[InlineData(" ", false)]
// header.payload.signatureの形式はtrue
[InlineData("0.0.0", true)]
[InlineData("a.a.a", true)]
// 署名はオプション
[InlineData("a.a.", true)]
// ドットは2つ必要
[InlineData("a.a", false)]
public void CanReadToken_トークンの形式を判定する(string token, bool expected) {
// Arrange
var handler = new JwtSecurityTokenHandler();
// Act
// JSON compact serialization formatかどうかを判定する
var actual = handler.CanReadToken(token);
// Assert
Assert.Equal(expected, actual);
}
[Fact]
public void CreateJwtSecurityToken_ペイロードが空の署名なしトークンを生成する() {
// Arrange
var handler = new JwtSecurityTokenHandler {
SetDefaultTimesOnTokenCreation = false,
};
// Act
var token = handler.CreateJwtSecurityToken();
// Assert
Assert.Equal(@"{""alg"":""none"",""typ"":""JWT""}.{}", token.ToString());
}
[Fact]
public void CreateJwtSecurityToken_ペイロードがissとaudだけの署名なしトークンを生成する() {
// Arrange
var handler = new JwtSecurityTokenHandler {
SetDefaultTimesOnTokenCreation = false,
};
// Act
var token = handler.CreateJwtSecurityToken(issuer: "i", audience: "a");
// Assert
Assert.Equal(@"{""alg"":""none"",""typ"":""JWT""}.{""iss"":""i"",""aud"":""a""}", token.ToString());
}
[Fact]
public void CreateJwtSecurityToken_キーが短いとHS256で署名するときに例外が発生する() {
// Arrange
// 文字列ベースでもう1文字いる様子
var secret = Encoding.UTF8.GetBytes("0123456789abcde");
var key = new SymmetricSecurityKey(secret);
_output.WriteLine($"secret.Length: {secret.Length}");
_output.WriteLine($"key.KeySize: {key.KeySize}");
var credentials = new SigningCredentials(key, SecurityAlgorithms.HmacSha256);
var handler = new JwtSecurityTokenHandler {
SetDefaultTimesOnTokenCreation = false,
};
// Act
// Assert
var exception = Assert.Throws<ArgumentOutOfRangeException>(() => {
handler.CreateJwtSecurityToken(issuer: "i", audience: "a", signingCredentials: credentials);
});
_output.WriteLine(exception.Message);
}
private static readonly SymmetricSecurityKey _key1 = new SymmetricSecurityKey(Encoding.UTF8.GetBytes("0123456789abcd-1"));
private static readonly SymmetricSecurityKey _key2 = new SymmetricSecurityKey(Encoding.UTF8.GetBytes("0123456789abcd-2"));
[Fact]
public void ValidateToken_HS256で署名したトークンを検証する() {
// Arrange
var handler = new JwtSecurityTokenHandler {
SetDefaultTimesOnTokenCreation = false,
};
// 署名付きのトークンを生成
var token = handler.CreateJwtSecurityToken(
issuer: "i",
audience: "a",
signingCredentials: new SigningCredentials(_key1, SecurityAlgorithms.HmacSha256));
_output.WriteLine(token.ToString());
var jwt = handler.WriteToken(token);
_output.WriteLine(jwt);
// Act
var parameters = new TokenValidationParameters {
// 証明したキーで検証する
ValidateIssuerSigningKey = true,
IssuerSigningKey = _key1,
ValidateLifetime = false,
ValidIssuer = "i",
ValidAudience = "a"
};
// 署名付きのトークンを検証
var principal = handler.ValidateToken(jwt, parameters, out var _);
// Assert
Assert.Equal(2, principal.Claims.Count());
Assert.Contains(
principal.Claims,
claim =>
string.Equals(claim.Type, "iss", StringComparison.OrdinalIgnoreCase) &&
string.Equals(claim.Value, "i", StringComparison.OrdinalIgnoreCase));
Assert.Contains(
principal.Claims,
claim =>
string.Equals(claim.Type, "aud", StringComparison.OrdinalIgnoreCase) &&
string.Equals(claim.Value, "a", StringComparison.OrdinalIgnoreCase));
}
[Fact]
public void ValidateToken_署名と検証でキーが異なると例外がスローされる() {
// Arrange
var handler = new JwtSecurityTokenHandler {
SetDefaultTimesOnTokenCreation = false,
};
var token = handler.CreateJwtSecurityToken(
issuer: "i",
audience: "a",
signingCredentials: new SigningCredentials(_key1, SecurityAlgorithms.HmacSha256));
var jwt = handler.WriteToken(token);
// Act
var parameters = new TokenValidationParameters {
ValidateIssuerSigningKey = true,
IssuerSigningKey = _key2,
ValidateLifetime = false,
ValidIssuer = "i",
ValidAudience = "a"
};
// トークンの検証に失敗する
var exception = Assert.Throws<SecurityTokenSignatureKeyNotFoundException>(() => {
handler.ValidateToken(jwt, parameters, out var _);
});
_output.WriteLine(exception.Message);
}
[Fact]
public void ValidateToken_署名なしトークンを署名があるものとして検証すると例外がスローされる() {
// Arrange
var handler = new JwtSecurityTokenHandler {
SetDefaultTimesOnTokenCreation = false,
};
// 署名なしトークンを生成
var token = handler.CreateJwtSecurityToken(issuer: "i", audience: "a");
var jwt = handler.WriteToken(token);
// Act
var parameters = new TokenValidationParameters {
ValidateIssuerSigningKey = true,
IssuerSigningKey = _key1,
ValidateLifetime = false,
ValidIssuer = "i",
ValidAudience = "a"
};
// トークンの検証に失敗する
var exception = Assert.Throws<SecurityTokenInvalidSignatureException>(() => {
handler.ValidateToken(jwt, parameters, out var _);
});
_output.WriteLine(exception.Message);
}
}
}
| 28.248869 | 125 | 0.677559 | [
"MIT"
] | ichiroku11/dotnet-sample | src/SampleTest/IdentityModel.Tokens.Jwt/JwtSecurityTokenHandlerTest.cs | 6,789 | C# |
using UnityEngine;
public class IgnoreCollision : MonoBehaviour
{
[SerializeField] Collider[] ownColliders;
[SerializeField] Collider[] otherColliders;
void Start()
{
foreach (var self in ownColliders)
foreach (var other in otherColliders)
Physics.IgnoreCollision(self, other);
}
}
| 22.733333 | 53 | 0.656891 | [
"MIT"
] | Will9371/Character-Template | Assets/Playcraft/Quality of Life/Physics/IgnoreCollision.cs | 343 | C# |
using Orchard.Events;
using Orchard.DependencyInjection;
using System.Threading.Tasks;
namespace Orchard.DisplayManagement.Descriptors
{
public interface IShapeTableManager : ITransientDependency
{
ShapeTable GetShapeTable(string themeName);
}
public interface IShapeTableProvider : IDependency
{
void Discover(ShapeTableBuilder builder);
}
public interface IShapeTableEventHandler : IEventHandler
{
void ShapeTableCreated(ShapeTable shapeTable);
}
} | 24.47619 | 62 | 0.743191 | [
"BSD-3-Clause"
] | PinpointTownes/Orchard2 | src/Orchard.DisplayManagement/Descriptors/Interfaces.cs | 516 | C# |
namespace CaliperTest
{
partial class MainForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.btnDoWork = new System.Windows.Forms.Button();
this.btnStartWorking = new System.Windows.Forms.Button();
this.btnStopWorking = new System.Windows.Forms.Button();
this.btnWorkRepeatedly = new System.Windows.Forms.Button();
this.nudWorkRepeatedly = new System.Windows.Forms.NumericUpDown();
this.cbTwoSeconds = new System.Windows.Forms.CheckBox();
((System.ComponentModel.ISupportInitialize)(this.nudWorkRepeatedly)).BeginInit();
this.SuspendLayout();
//
// btnDoWork
//
this.btnDoWork.Location = new System.Drawing.Point(13, 13);
this.btnDoWork.Name = "btnDoWork";
this.btnDoWork.Size = new System.Drawing.Size(105, 32);
this.btnDoWork.TabIndex = 0;
this.btnDoWork.Text = "Do Work";
this.btnDoWork.UseVisualStyleBackColor = true;
this.btnDoWork.Click += new System.EventHandler(this.btnDoWork_Click);
//
// btnStartWorking
//
this.btnStartWorking.Location = new System.Drawing.Point(13, 71);
this.btnStartWorking.Name = "btnStartWorking";
this.btnStartWorking.Size = new System.Drawing.Size(105, 32);
this.btnStartWorking.TabIndex = 0;
this.btnStartWorking.Text = "Start Working";
this.btnStartWorking.UseVisualStyleBackColor = true;
this.btnStartWorking.Click += new System.EventHandler(this.btnStartWorking_Click);
//
// btnStopWorking
//
this.btnStopWorking.Location = new System.Drawing.Point(13, 109);
this.btnStopWorking.Name = "btnStopWorking";
this.btnStopWorking.Size = new System.Drawing.Size(105, 32);
this.btnStopWorking.TabIndex = 0;
this.btnStopWorking.Text = "Stop Working";
this.btnStopWorking.UseVisualStyleBackColor = true;
this.btnStopWorking.Click += new System.EventHandler(this.btnStopWorking_Click);
//
// btnWorkRepeatedly
//
this.btnWorkRepeatedly.Location = new System.Drawing.Point(13, 167);
this.btnWorkRepeatedly.Name = "btnWorkRepeatedly";
this.btnWorkRepeatedly.Size = new System.Drawing.Size(105, 32);
this.btnWorkRepeatedly.TabIndex = 0;
this.btnWorkRepeatedly.Text = "Work Repeatedly";
this.btnWorkRepeatedly.UseVisualStyleBackColor = true;
this.btnWorkRepeatedly.Click += new System.EventHandler(this.btnWorkRepeatedly_Click);
//
// nudWorkRepeatedly
//
this.nudWorkRepeatedly.Increment = new decimal(new int[] {
10,
0,
0,
0});
this.nudWorkRepeatedly.Location = new System.Drawing.Point(13, 206);
this.nudWorkRepeatedly.Maximum = new decimal(new int[] {
1001,
0,
0,
0});
this.nudWorkRepeatedly.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.nudWorkRepeatedly.Name = "nudWorkRepeatedly";
this.nudWorkRepeatedly.Size = new System.Drawing.Size(105, 20);
this.nudWorkRepeatedly.TabIndex = 1;
this.nudWorkRepeatedly.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
this.nudWorkRepeatedly.Value = new decimal(new int[] {
100,
0,
0,
0});
//
// cbTwoSeconds
//
this.cbTwoSeconds.AutoSize = true;
this.cbTwoSeconds.Checked = true;
this.cbTwoSeconds.CheckState = System.Windows.Forms.CheckState.Checked;
this.cbTwoSeconds.Location = new System.Drawing.Point(13, 246);
this.cbTwoSeconds.Name = "cbTwoSeconds";
this.cbTwoSeconds.Size = new System.Drawing.Size(98, 17);
this.cbTwoSeconds.TabIndex = 2;
this.cbTwoSeconds.Text = "Warn if > 2 sec";
this.cbTwoSeconds.UseVisualStyleBackColor = true;
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(128, 273);
this.Controls.Add(this.cbTwoSeconds);
this.Controls.Add(this.nudWorkRepeatedly);
this.Controls.Add(this.btnWorkRepeatedly);
this.Controls.Add(this.btnStopWorking);
this.Controls.Add(this.btnStartWorking);
this.Controls.Add(this.btnDoWork);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "MainForm";
this.ShowIcon = false;
this.Text = "Caliper Tests";
((System.ComponentModel.ISupportInitialize)(this.nudWorkRepeatedly)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button btnDoWork;
private System.Windows.Forms.Button btnStartWorking;
private System.Windows.Forms.Button btnStopWorking;
private System.Windows.Forms.Button btnWorkRepeatedly;
private System.Windows.Forms.NumericUpDown nudWorkRepeatedly;
private System.Windows.Forms.CheckBox cbTwoSeconds;
}
}
| 42.577922 | 107 | 0.589294 | [
"Apache-2.0"
] | GibraltarSoftware/Loupe.Samples | src/Caliper/MainForm.Designer.cs | 6,559 | C# |
using AutoMapper;
using HouseholdManager.Common.Contracts;
namespace HouseholdManager.Common
{
public class MappingService : IMapingService
{
public T Map<T>(object source)
{
return Mapper.Map<T>(source);
}
public TDestination Map<TSource, TDestination>(TSource source, TDestination destination)
{
return Mapper.Map<TSource, TDestination>(source, destination);
}
}
}
| 23.894737 | 96 | 0.645374 | [
"MIT"
] | GalinStoychev/household-manager | HouseholdManager/HouseholdManager.Common/MappingService.cs | 456 | C# |
// Copyright (c) Microsoft. All rights reserved.
// Copyright (c) Denis Kuzmin <x-3F@outlook.com> github/3F
// Copyright (c) IeXod contributors https://github.com/3F/IeXod/graphs/contributors
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Globalization;
using System.IO;
using System.Runtime.InteropServices;
namespace net.r_eg.IeXod.Tasks.Deployment.ManifestUtilities
{
internal class EmbeddedManifestReader
{
private static readonly IntPtr s_id1 = new IntPtr(1);
private Stream _manifest;
private EmbeddedManifestReader(string path)
{
IntPtr hModule = IntPtr.Zero;
try
{
hModule = NativeMethods.LoadLibraryExW(path, IntPtr.Zero, NativeMethods.LOAD_LIBRARY_AS_DATAFILE);
if (hModule == IntPtr.Zero)
{
return;
}
NativeMethods.EnumResNameProc callback = EnumResNameCallback;
NativeMethods.EnumResourceNames(hModule, NativeMethods.RT_MANIFEST, callback, IntPtr.Zero);
}
finally
{
if (hModule != IntPtr.Zero)
{
NativeMethods.FreeLibrary(hModule);
}
}
}
private bool EnumResNameCallback(IntPtr hModule, IntPtr pType, IntPtr pName, IntPtr param)
{
if (pName != s_id1)
{
return false; // only look for resources with ID=1
}
IntPtr hResInfo = NativeMethods.FindResource(hModule, pName, NativeMethods.RT_MANIFEST);
if (hResInfo == IntPtr.Zero)
{
return false; //continue looking
}
IntPtr hResource = NativeMethods.LoadResource(hModule, hResInfo);
NativeMethods.LockResource(hResource);
uint bufsize = NativeMethods.SizeofResource(hModule, hResInfo);
var buffer = new byte[bufsize];
Marshal.Copy(hResource, buffer, 0, buffer.Length);
_manifest = new MemoryStream(buffer, false);
return false; //found what we are looking for
}
public static Stream Read(string path)
{
if (path == null) throw new ArgumentNullException(nameof(path));
if (!path.EndsWith(".manifest", StringComparison.Ordinal) && !path.EndsWith(".dll", StringComparison.Ordinal))
{
// Everything that does not end with .dll or .manifest is not a valid native assembly (this includes
// EXEs with ID1 manifest)
return null;
}
int t1 = Environment.TickCount;
EmbeddedManifestReader r = new EmbeddedManifestReader(path);
Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "EmbeddedManifestReader.Read t={0}", Environment.TickCount - t1));
return r._manifest;
}
}
}
| 38.329114 | 134 | 0.597094 | [
"MIT"
] | 3F/IeXod | src/Tasks/ManifestUtil/EmbeddedManifestReader.cs | 3,030 | C# |
using Biglab.Remote;
using UnityEngine;
public class SceneTouchHandler : MonoBehaviour
{
private enum SceneInteractionState
{
ReadyState,
DragBackground,
DragCube
}
GameObject cube = null;
float lastX = 0;
float lastY = 0;
private SceneInteractionState state = SceneInteractionState.ReadyState;
private void Awake()
{
RemoteInput.Touched += OnTouch;
}
/*
private void Update()
{
if (RemoteTouch.GetTouchCount(1) > 0)
{
var touches = RemoteTouch.GetTouches(1);
switch (state)
{
case SceneInteractionState.ReadyState:
// determine if touch point is in the cube
var ray = viewer.Viewer.MainCamera.ViewportPointToRay(touches[0].position);
Debug.DrawRay(ray.origin, ray.direction * 10, Color.green, 1);
if (Physics.Raycast(ray, out hit) && hit.transform.gameObject.name == "Cube")
{
cube = hit.transform.gameObject;
state = SceneInteractionState.DragCube;
lastX = viewer.Viewer.MainCamera.ViewportToScreenPoint(touches[0].position).x;
lastY = viewer.Viewer.MainCamera.ViewportToScreenPoint(touches[0].position).y;
}
else
{
state = SceneInteractionState.DragBackground;
}
Debug.Log(touches[0].position);
break;
case SceneInteractionState.DragCube:
var point = viewer.Viewer.MainCamera.ViewportToScreenPoint(touches[0].position);
Debug.Log(new Vector3(point.x - lastX, point.y - lastY, 0));
cube.GetComponent<MeshRenderer>().material.color = new Color(point.x / viewer.Viewer.MainCamera.pixelWidth, point.y / viewer.Viewer.MainCamera.pixelHeight, 0.25f);
lastX = point.x;
lastY = point.y;
if (touches[0].phase == TouchPhase.Ended)
{
state = SceneInteractionState.ReadyState;
}
break;
case SceneInteractionState.DragBackground:
if (touches[0].phase == TouchPhase.Ended)
{
state = SceneInteractionState.ReadyState;
}
break;
}
}
}*/
public void OnTouch(int id, RemoteTouch[] touches)
{
var viewer = RemoteSystem.Instance.GetViewer(id);
RaycastHit hit;
Debug.Log(state);
switch (state)
{
case SceneInteractionState.ReadyState:
// determine if touch point is in the cube
var ray = viewer.LeftOrMonoCamera.ViewportPointToRay(touches[0].Position);
Debug.DrawRay(ray.origin, ray.direction * 10, Color.green, 1);
if (Physics.Raycast(ray, out hit) && hit.transform.gameObject.name == "Cube")
{
cube = hit.transform.gameObject;
state = SceneInteractionState.DragCube;
lastX = viewer.LeftOrMonoCamera.ViewportToScreenPoint(touches[0].Position).x;
lastY = viewer.LeftOrMonoCamera.ViewportToScreenPoint(touches[0].Position).y;
}
else
{
state = SceneInteractionState.DragBackground;
}
Debug.Log(touches[0].Position);
break;
case SceneInteractionState.DragCube:
var point = viewer.LeftOrMonoCamera.ViewportToScreenPoint(touches[0].Position);
Debug.Log(new Vector3(point.x - lastX, point.y - lastY, 0));
cube.GetComponent<MeshRenderer>().material.color = new Color(
point.x / viewer.LeftOrMonoCamera.pixelWidth, point.y / viewer.LeftOrMonoCamera.pixelHeight, 0.25f);
lastX = point.x;
lastY = point.y;
if (touches[0].Phase == TouchPhase.Ended)
{
state = SceneInteractionState.ReadyState;
}
break;
case SceneInteractionState.DragBackground:
if (touches[0].Phase == TouchPhase.Ended)
{
state = SceneInteractionState.ReadyState;
}
break;
}
}
} | 38.214876 | 183 | 0.523789 | [
"MIT"
] | dylanbrodiefafard/virtual-ftvr | VolumetricDisplay/Assets/Biglab/Remote/SceneTouchHandler.cs | 4,624 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Liath.Quest.Tests.ThingsToTest
{
public interface IDataAccess
{
string Save(int value);
void DoSomething(int value);
}
}
| 17.642857 | 40 | 0.700405 | [
"MIT"
] | ardliath/Quest | Liath.Quest.Tests/ThingsToTest/IDataAccess.cs | 249 | C# |
// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------
using Elastic.Transport.Products.Elasticsearch;
using System.Collections.Generic;
using System.Text.Json.Serialization;
#nullable restore
namespace Elastic.Clients.Elasticsearch.Security
{
public sealed partial class SecurityAuthenticateResponse : ElasticsearchResponseBase
{
[JsonInclude]
[JsonPropertyName("api_key")]
public Elastic.Clients.Elasticsearch.Security.ApiKey? ApiKey { get; init; }
[JsonInclude]
[JsonPropertyName("authentication_realm")]
public Elastic.Clients.Elasticsearch.Security.RealmInfo AuthenticationRealm { get; init; }
[JsonInclude]
[JsonPropertyName("authentication_type")]
public string AuthenticationType { get; init; }
[JsonInclude]
[JsonPropertyName("email")]
public string? Email { get; init; }
[JsonInclude]
[JsonPropertyName("enabled")]
public bool Enabled { get; init; }
[JsonInclude]
[JsonPropertyName("full_name")]
public string? FullName { get; init; }
[JsonInclude]
[JsonPropertyName("lookup_realm")]
public Elastic.Clients.Elasticsearch.Security.RealmInfo LookupRealm { get; init; }
[JsonInclude]
[JsonPropertyName("metadata")]
public Dictionary<string, object> Metadata { get; init; }
[JsonInclude]
[JsonPropertyName("roles")]
public IReadOnlyCollection<string> Roles { get; init; }
[JsonInclude]
[JsonPropertyName("token")]
public Elastic.Clients.Elasticsearch.Security.Token? Token { get; init; }
[JsonInclude]
[JsonPropertyName("username")]
public string Username { get; init; }
}
} | 31.15493 | 92 | 0.611212 | [
"Apache-2.0"
] | SimonCropp/elasticsearch-net | src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SecurityAuthenticateResponse.g.cs | 2,658 | C# |
// Copyright (c) 2015, Michael Kunz. All rights reserved.
// http://kunzmi.github.io/managedCuda
//
// This file is part of ManagedCuda.
//
// ManagedCuda is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 2.1 of the
// License, or (at your option) any later version.
//
// ManagedCuda is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
// MA 02110-1301 USA, http://www.gnu.org/licenses/.
using System;
using System.Text;
using System.Diagnostics;
using ManagedCuda.BasicTypes;
namespace ManagedCuda.CudaDNN
{
/// <summary>
/// An opaque structure holding
/// the description of a pooling operation.
/// </summary>
public class PoolingDescriptor : IDisposable
{
private cudnnPoolingDescriptor _desc;
private cudnnStatus res;
private bool disposed;
#region Contructors
/// <summary>
/// </summary>
public PoolingDescriptor()
{
_desc = new cudnnPoolingDescriptor();
res = CudaDNNNativeMethods.cudnnCreatePoolingDescriptor(ref _desc);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnCreatePoolingDescriptor", res));
if (res != cudnnStatus.Success) throw new CudaDNNException(res);
}
/// <summary>
/// For dispose
/// </summary>
~PoolingDescriptor()
{
Dispose(false);
}
#endregion
#region Dispose
/// <summary>
/// Dispose
/// </summary>
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
/// <summary>
/// For IDisposable
/// </summary>
/// <param name="fDisposing"></param>
protected virtual void Dispose(bool fDisposing)
{
if (fDisposing && !disposed)
{
//Ignore if failing
res = CudaDNNNativeMethods.cudnnDestroyPoolingDescriptor(_desc);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnDestroyPoolingDescriptor", res));
disposed = true;
}
if (!fDisposing && !disposed)
Debug.WriteLine(String.Format("ManagedCUDA not-disposed warning: {0}", this.GetType()));
}
#endregion
/// <summary>
/// Returns the inner handle.
/// </summary>
public cudnnPoolingDescriptor Desc
{
get { return _desc; }
}
/// <summary>
/// This function initializes a previously created generic pooling descriptor object into a 2D description.
/// </summary>
/// <param name="mode">Enumerant to specify the pooling mode.</param>
/// <param name="maxpoolingNanOpt">Nan propagation option for max pooling.</param>
/// <param name="windowHeight">Height of the pooling window.</param>
/// <param name="windowWidth">Width of the pooling window.</param>
/// <param name="verticalPadding">Size of vertical padding.</param>
/// <param name="horizontalPadding">Size of horizontal padding</param>
/// <param name="verticalStride">Pooling vertical stride.</param>
/// <param name="horizontalStride">Pooling horizontal stride.</param>
public void SetPooling2dDescriptor(cudnnPoolingMode mode,
cudnnNanPropagation maxpoolingNanOpt,
int windowHeight,
int windowWidth,
int verticalPadding,
int horizontalPadding,
int verticalStride,
int horizontalStride
)
{
res = CudaDNNNativeMethods.cudnnSetPooling2dDescriptor(_desc, mode, maxpoolingNanOpt, windowHeight, windowWidth, verticalPadding, horizontalPadding, verticalStride, horizontalStride);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnSetPooling2dDescriptor", res));
if (res != cudnnStatus.Success) throw new CudaDNNException(res);
}
/// <summary>
/// This function queries a previously created 2D pooling descriptor object.
/// </summary>
/// <param name="mode">Enumerant to specify the pooling mode.</param>
/// <param name="maxpoolingNanOpt">Nan propagation option for max pooling.</param>
/// <param name="windowHeight">Height of the pooling window.</param>
/// <param name="windowWidth">Width of the pooling window.</param>
/// <param name="verticalPadding">Size of vertical padding.</param>
/// <param name="horizontalPadding">Size of horizontal padding.</param>
/// <param name="verticalStride">Pooling vertical stride.</param>
/// <param name="horizontalStride">Pooling horizontal stride.</param>
public void GetPooling2dDescriptor(ref cudnnPoolingMode mode,
ref cudnnNanPropagation maxpoolingNanOpt,
ref int windowHeight,
ref int windowWidth,
ref int verticalPadding,
ref int horizontalPadding,
ref int verticalStride,
ref int horizontalStride
)
{
res = CudaDNNNativeMethods.cudnnGetPooling2dDescriptor(_desc, ref mode, ref maxpoolingNanOpt, ref windowHeight, ref windowWidth, ref verticalPadding, ref horizontalPadding, ref verticalStride, ref horizontalStride);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnGetPooling2dDescriptor", res));
if (res != cudnnStatus.Success) throw new CudaDNNException(res);
}
/// <summary>
/// This function initializes a previously created generic pooling descriptor object.
/// </summary>
/// <param name="mode">Enumerant to specify the pooling mode.</param>
/// <param name="maxpoolingNanOpt">Nan propagation option for max pooling.</param>
/// <param name="nbDims">Dimension of the pooling operation.</param>
/// <param name="windowDimA">Array of dimension nbDims containing the window size for each dimension.</param>
/// <param name="paddingA">Array of dimension nbDims containing the padding size for each dimension.</param>
/// <param name="strideA">Array of dimension nbDims containing the striding size for each dimension.</param>
public void SetPoolingNdDescriptor(cudnnPoolingMode mode,
cudnnNanPropagation maxpoolingNanOpt,
int nbDims,
int[] windowDimA,
int[] paddingA,
int[] strideA
)
{
res = CudaDNNNativeMethods.cudnnSetPoolingNdDescriptor(_desc, mode, maxpoolingNanOpt, nbDims, windowDimA, paddingA, strideA);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnSetPoolingNdDescriptor", res));
if (res != cudnnStatus.Success) throw new CudaDNNException(res);
}
/// <summary>
/// This function queries a previously initialized generic pooling descriptor object.
/// </summary>
/// <param name="nbDimsRequested">Dimension of the expected pooling descriptor. It is also the minimum
/// size of the arrays windowDimA, paddingA and strideA in order to be
/// able to hold the results</param>
/// <param name="mode">Enumerant to specify the pooling mode.</param>
/// <param name="maxpoolingNanOpt">Nan propagation option for max pooling.</param>
/// <param name="nbDims">Actual dimension of the pooling descriptor.</param>
/// <param name="windowDimA">Array of dimension of at least nbDimsRequested that will be filled with
/// the window parameters from the provided pooling descriptor.</param>
/// <param name="paddingA">Array of dimension of at least nbDimsRequested that will be filled with
/// the padding parameters from the provided pooling descriptor.</param>
/// <param name="strideA">Array of dimension at least nbDimsRequested that will be filled with
/// the stride parameters from the provided pooling descriptor.</param>
public void GetPoolingNdDescriptor(int nbDimsRequested,
ref cudnnPoolingMode mode,
ref cudnnNanPropagation maxpoolingNanOpt,
ref int nbDims,
int[] windowDimA,
int[] paddingA,
int[] strideA
)
{
res = CudaDNNNativeMethods.cudnnGetPoolingNdDescriptor(_desc, nbDimsRequested, ref mode, ref maxpoolingNanOpt, ref nbDims, windowDimA, paddingA, strideA);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnGetPoolingNdDescriptor", res));
if (res != cudnnStatus.Success) throw new CudaDNNException(res);
}
/// <summary>
/// This function provides the output dimensions of a tensor after Nd pooling has been applied
/// </summary>
/// <param name="inputTensorDesc">Handle to the previously initialized input tensor descriptor.</param>
/// <param name="nbDims">Number of dimensions in which pooling is to be applied.</param>
/// <param name="outputTensorDimA">Array of nbDims output dimensions</param>
public void GetPoolingNdForwardOutputDim(TensorDescriptor inputTensorDesc,
int nbDims,
int[] outputTensorDimA)
{
res = CudaDNNNativeMethods.cudnnGetPoolingNdForwardOutputDim(_desc, inputTensorDesc.Desc, nbDims, outputTensorDimA);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnGetPoolingNdForwardOutputDim", res));
if (res != cudnnStatus.Success) throw new CudaDNNException(res);
}
/// <summary>
/// This function provides the output dimensions of a tensor after 2d pooling has been applied
/// </summary>
/// <param name="inputTensorDesc">Handle to the previously initialized input tensor descriptor.</param>
/// <param name="n">Number of images in the output</param>
/// <param name="c">Number of channels in the output</param>
/// <param name="h">Height of images in the output</param>
/// <param name="w">Width of images in the output</param>
public void GetPooling2dForwardOutputDim(TensorDescriptor inputTensorDesc,
ref int n,
ref int c,
ref int h,
ref int w)
{
res = CudaDNNNativeMethods.cudnnGetPooling2dForwardOutputDim(_desc, inputTensorDesc.Desc, ref n, ref c, ref h, ref w);
Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnGetPooling2dForwardOutputDim", res));
if (res != cudnnStatus.Success) throw new CudaDNNException(res);
}
}
}
| 46.008511 | 218 | 0.664262 | [
"MIT"
] | SciSharp/SiaNet | Library/ManagedCuda/CudaDNN/PoolingDescriptor.cs | 10,814 | C# |
namespace BookStore.Data.Mappers
{
public static class MapperInventory
{
/// <summary>
/// Turn a entity inventory into a model stock
/// </summary>
/// <param name="inventory"></param>
/// <returns></returns>
public static Domain.Models.Stock Map(Entities.InventoryEntity inventory)
{
return new Domain.Models.Stock
{
Book = MapperBook.Map(inventory.BookIsbnNavigation),
Quantity = (int)inventory.Quantity
};
}
/// <summary>
/// Turn a model stock into an entity inventory
/// </summary>
/// <param name="stock"></param>
/// <returns></returns>
public static Entities.InventoryEntity Map(Domain.Models.Stock stock)
{
return new Entities.InventoryEntity
{
BookIsbnNavigation = MapperBook.Map(stock.Book),
Quantity = stock.Quantity,
BookIsbn = MapperBook.Map(stock.Book).Isbn
};
}
}
}
| 30.8 | 81 | 0.537106 | [
"MIT"
] | 2011-nov02-net/antonio-project1 | BookStore/BookStore.Data/Mappers/MapperInventory.cs | 1,080 | C# |
namespace TestPluralize
{
// https://stackoverflow.com/questions/9468800/determining-thread-safety-in-unit-tests
// Proving that something is thread safe is tricky - probably halting-problem hard.
// You can show that a race condition is easy to produce, or that it is hard to produce.
// But not producing a race condition doesn't mean it isn't there.
public class ThreadSafety
{
private static Pluralize.NET.Core.Pluralizer plu = new Pluralize.NET.Core.Pluralizer();
public static bool IsBad()
{
return false;
}
public static void Test()
{
bool failed = false;
int iterations = 100;
// threads interact with some object - either
System.Threading.Thread thread1 = new System.Threading.Thread(
new System.Threading.ThreadStart(
delegate ()
{
for (int i = 0; i < iterations; i++)
{
ThreadSafetyTest.DoSomething1(); // call unsafe code
// check that object is not out of synch due to other thread
if (IsBad())
{
failed = true;
}
}
})
);
System.Threading.Thread thread2 = new System.Threading.Thread(
new System.Threading.ThreadStart(
delegate ()
{
for (int i = 0; i < iterations; i++)
{
ThreadSafetyTest.DoSomething2(); // call unsafe code
// check that object is not out of synch due to other thread
if (IsBad())
{
failed = true;
}
}
})
);
thread1.Start();
thread2.Start();
thread1.Join();
thread2.Join();
System.Diagnostics.Debug.Assert(failed == false, "The code was thread safe");
}
}
}
| 32.324324 | 96 | 0.426421 | [
"MIT"
] | ststeiger/Pluralize.NET.Core | TestPluralize/ThreadSafety.cs | 2,321 | C# |
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
// <auto-generated/>
// Template Source: EntityType.cs.tt
namespace Microsoft.Graph
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Newtonsoft.Json;
/// <summary>
/// The type Workbook Table Sort.
/// </summary>
[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
public partial class WorkbookTableSort : Entity
{
///<summary>
/// The WorkbookTableSort constructor
///</summary>
public WorkbookTableSort()
{
this.ODataType = "microsoft.graph.workbookTableSort";
}
/// <summary>
/// Gets or sets fields.
/// Represents the current conditions used to last sort the table. Read-only.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "fields", Required = Newtonsoft.Json.Required.Default)]
public IEnumerable<WorkbookSortField> Fields { get; set; }
/// <summary>
/// Gets or sets match case.
/// Represents whether the casing impacted the last sort of the table. Read-only.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "matchCase", Required = Newtonsoft.Json.Required.Default)]
public bool? MatchCase { get; set; }
/// <summary>
/// Gets or sets method.
/// Represents Chinese character ordering method last used to sort the table. The possible values are: PinYin, StrokeCount. Read-only.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "method", Required = Newtonsoft.Json.Required.Default)]
public string Method { get; set; }
}
}
| 38.403509 | 153 | 0.609411 | [
"MIT"
] | Data443/msgraph-sdk-dotnet | src/Microsoft.Graph/Generated/model/WorkbookTableSort.cs | 2,189 | C# |
namespace JobFinder.Web.Areas.Company.Models.JobOfferViewModels
{
using System.ComponentModel.DataAnnotations;
public class CreateOfferViewModel
{
[Required]
public string Title { get; set; }
[Required]
public string Description { get; set; }
[Required]
public int TownId { get; set; }
[Required]
public int BusinessSectorId { get; set; }
[Required]
[Display(Name = "Permanent")]
public bool IsPermanent { get; set; }
[Required]
[Display(Name = "Temporary")]
public bool IsTemporary { get; set; }
[Required]
[Display(Name = "Full Time")]
public bool IsFullTime { get; set; }
[Required]
[Display(Name = "Part Time")]
public bool IsPartTime { get; set; }
}
}
| 23.388889 | 64 | 0.570071 | [
"MIT"
] | delyan-nikolov-1992/JobFinder-System | JobFinder-System/JobFinder.Web/Areas/Company/Models/JobOfferViewModels/CreateOfferViewModel.cs | 844 | C# |
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
namespace Pulumi.AzureNative.Cdn.V20200901.Outputs
{
/// <summary>
/// Defines the UrlFileName condition for the delivery rule.
/// </summary>
[OutputType]
public sealed class DeliveryRuleUrlFileNameConditionResponse
{
/// <summary>
/// The name of the condition for the delivery rule.
/// Expected value is 'UrlFileName'.
/// </summary>
public readonly string Name;
/// <summary>
/// Defines the parameters for the condition.
/// </summary>
public readonly Outputs.UrlFileNameMatchConditionParametersResponse Parameters;
[OutputConstructor]
private DeliveryRuleUrlFileNameConditionResponse(
string name,
Outputs.UrlFileNameMatchConditionParametersResponse parameters)
{
Name = name;
Parameters = parameters;
}
}
}
| 29.925 | 87 | 0.657477 | [
"Apache-2.0"
] | polivbr/pulumi-azure-native | sdk/dotnet/Cdn/V20200901/Outputs/DeliveryRuleUrlFileNameConditionResponse.cs | 1,197 | C# |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.IO;
using System.Reflection.Metadata;
using System.Reflection.Metadata.Ecma335;
using System.Reflection.Metadata.Tests;
using Xunit;
namespace System.Reflection.PortableExecutable.Tests
{
public class PEReaderTests
{
[Fact]
public void Ctor()
{
Assert.Throws<ArgumentNullException>(() => new PEReader(null, PEStreamOptions.Default));
var invalid = new MemoryStream(new byte[] { 1, 2, 3, 4 });
// the stream should not be disposed if the arguments are bad
Assert.Throws<ArgumentOutOfRangeException>(() => new PEReader(invalid, (PEStreamOptions)int.MaxValue));
Assert.True(invalid.CanRead);
// no BadImageFormatException if we're prefetching the entire image:
var peReader0 = new PEReader(invalid, PEStreamOptions.PrefetchEntireImage | PEStreamOptions.LeaveOpen);
Assert.True(invalid.CanRead);
Assert.Throws<BadImageFormatException>(() => peReader0.PEHeaders);
invalid.Position = 0;
// BadImageFormatException if we're prefetching the entire image and metadata:
Assert.Throws<BadImageFormatException>(() => new PEReader(invalid, PEStreamOptions.PrefetchEntireImage | PEStreamOptions.PrefetchMetadata | PEStreamOptions.LeaveOpen));
Assert.True(invalid.CanRead);
invalid.Position = 0;
// the stream should be disposed if the content is bad:
Assert.Throws<BadImageFormatException>(() => new PEReader(invalid, PEStreamOptions.PrefetchMetadata));
Assert.False(invalid.CanRead);
// the stream should not be disposed if we specified LeaveOpen flag:
invalid = new MemoryStream(new byte[] { 1, 2, 3, 4 });
Assert.Throws<BadImageFormatException>(() => new PEReader(invalid, PEStreamOptions.PrefetchMetadata | PEStreamOptions.LeaveOpen));
Assert.True(invalid.CanRead);
// valid metadata:
var valid = new MemoryStream(Misc.Members);
var peReader = new PEReader(valid, PEStreamOptions.Default);
Assert.True(valid.CanRead);
peReader.Dispose();
Assert.False(valid.CanRead);
}
// TODO: Switch to small checked in native image.
/*
[Fact]
public void OpenNativeImage()
{
using (var reader = new PEReader(File.OpenRead(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "kernel32.dll"))))
{
Assert.False(reader.HasMetadata);
Assert.True(reader.PEHeaders.IsDll);
Assert.False(reader.PEHeaders.IsExe);
Assert.Throws<InvalidOperationException>(() => reader.GetMetadataReader());
}
}
*/
[Fact]
public void IL_LazyLoad()
{
var peStream = new MemoryStream(Misc.Members);
using (var reader = new PEReader(peStream, PEStreamOptions.LeaveOpen))
{
var md = reader.GetMetadataReader();
var il = reader.GetMethodBody(md.GetMethodDefinition(MetadataTokens.MethodDefinitionHandle(1)).RelativeVirtualAddress);
Assert.Equal(new byte[] { 0, 42 }, il.GetILBytes());
Assert.Equal(8, il.MaxStack);
}
}
[Fact]
public void IL_EagerLoad()
{
var peStream = new MemoryStream(Misc.Members);
using (var reader = new PEReader(peStream, PEStreamOptions.LeaveOpen | PEStreamOptions.PrefetchMetadata | PEStreamOptions.PrefetchEntireImage))
{
var md = reader.GetMetadataReader();
var il = reader.GetMethodBody(md.GetMethodDefinition(MetadataTokens.MethodDefinitionHandle(1)).RelativeVirtualAddress);
Assert.Equal(new byte[] { 0, 42 }, il.GetILBytes());
Assert.Equal(8, il.MaxStack);
}
}
[Fact]
public void Metadata_LazyLoad()
{
var peStream = new MemoryStream(Misc.Members);
using (var reader = new PEReader(peStream, PEStreamOptions.LeaveOpen))
{
var md = reader.GetMetadataReader();
var method = md.GetMethodDefinition(MetadataTokens.MethodDefinitionHandle(1));
Assert.Equal("MC1", md.GetString(method.Name));
}
}
[Fact]
public void Metadata_EagerLoad()
{
var peStream = new MemoryStream(Misc.Members);
using (var reader = new PEReader(peStream, PEStreamOptions.LeaveOpen | PEStreamOptions.PrefetchMetadata))
{
var md = reader.GetMetadataReader();
var method = md.GetMethodDefinition(MetadataTokens.MethodDefinitionHandle(1));
Assert.Equal("MC1", md.GetString(method.Name));
Assert.Throws<InvalidOperationException>(() => reader.GetEntireImage());
Assert.Throws<InvalidOperationException>(() => reader.GetMethodBody(method.RelativeVirtualAddress));
}
}
[Fact]
public void EntireImage_LazyLoad()
{
var peStream = new MemoryStream(Misc.Members);
using (var reader = new PEReader(peStream, PEStreamOptions.LeaveOpen))
{
Assert.Equal(4608, reader.GetEntireImage().Length);
}
}
[Fact]
public void EntireImage_EagerLoad()
{
var peStream = new MemoryStream(Misc.Members);
using (var reader = new PEReader(peStream, PEStreamOptions.LeaveOpen | PEStreamOptions.PrefetchMetadata | PEStreamOptions.PrefetchEntireImage))
{
Assert.Equal(4608, reader.GetEntireImage().Length);
}
}
}
}
| 41.582192 | 180 | 0.614726 | [
"MIT"
] | benjamin-bader/corefx | src/System.Reflection.Metadata/tests/PortableExecutable/PEReaderTests.cs | 6,071 | C# |
// <auto-generated />
using System;
using AuthDataAccess.SQLImplementation;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace AuthDataAccess.Migrations
{
[DbContext(typeof(AuthManagementDbContext))]
[Migration("20200506174809_UniqueKeyOnTenantName")]
partial class UniqueKeyOnTenantName
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "3.1.3")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("AuthDataAccess.Entities.HRSIdentityUser", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("nvarchar(450)")
.HasDefaultValueSql("NEWID()");
b.Property<int>("AccessFailedCount")
.HasColumnType("int");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("nvarchar(max)");
b.Property<string>("Email")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<bool>("EmailConfirmed")
.HasColumnType("bit");
b.Property<bool>("LockoutEnabled")
.HasColumnType("bit");
b.Property<DateTimeOffset?>("LockoutEnd")
.HasColumnType("datetimeoffset");
b.Property<string>("NormalizedEmail")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("NormalizedUserName")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("PasswordHash")
.HasColumnType("nvarchar(max)");
b.Property<string>("PhoneNumber")
.HasColumnType("nvarchar(max)");
b.Property<bool>("PhoneNumberConfirmed")
.HasColumnType("bit");
b.Property<string>("SecurityStamp")
.HasColumnType("nvarchar(max)");
b.Property<Guid>("TenantId")
.HasColumnType("uniqueidentifier");
b.Property<bool>("TwoFactorEnabled")
.HasColumnType("bit");
b.Property<string>("UserName")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("NormalizedEmail")
.HasName("EmailIndex");
b.HasIndex("NormalizedUserName")
.IsUnique()
.HasName("UserNameIndex")
.HasFilter("[NormalizedUserName] IS NOT NULL");
b.HasIndex("TenantId");
b.ToTable("AspNetUsers");
});
modelBuilder.Entity("AuthDataAccess.Entities.Tenant", b =>
{
b.Property<Guid>("TenantId")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier")
.HasDefaultValueSql("NEWID()");
b.Property<DateTime?>("CreatedOn")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasDefaultValueSql("GETDATE()");
b.Property<Guid>("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property<bool?>("IsDeleted")
.HasColumnType("bit");
b.Property<DateTime?>("ModifiedOn")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
.HasDefaultValueSql("GETDATE()");
b.Property<Guid?>("ModifiedUserId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("ParentTenantId")
.HasColumnType("uniqueidentifier");
b.Property<string>("TenantEmails")
.IsRequired()
.HasColumnType("nvarchar(500)")
.HasMaxLength(500);
b.Property<string>("TenantName")
.IsRequired()
.HasColumnType("nvarchar(100)")
.HasMaxLength(100);
b.Property<string>("TenantPhones")
.IsRequired()
.HasColumnType("nvarchar(500)")
.HasMaxLength(500);
b.HasKey("TenantId");
b.HasIndex("TenantName")
.IsUnique();
b.ToTable("Tenants");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{
b.Property<string>("Id")
.HasColumnType("nvarchar(450)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("nvarchar(max)");
b.Property<string>("Name")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.Property<string>("NormalizedName")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("NormalizedName")
.IsUnique()
.HasName("RoleNameIndex")
.HasFilter("[NormalizedName] IS NOT NULL");
b.ToTable("AspNetRoles");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<string>("ClaimType")
.HasColumnType("nvarchar(max)");
b.Property<string>("ClaimValue")
.HasColumnType("nvarchar(max)");
b.Property<string>("RoleId")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AspNetRoleClaims");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<string>("ClaimType")
.HasColumnType("nvarchar(max)");
b.Property<string>("ClaimValue")
.HasColumnType("nvarchar(max)");
b.Property<string>("UserId")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("AspNetUserClaims");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
{
b.Property<string>("LoginProvider")
.HasColumnType("nvarchar(450)");
b.Property<string>("ProviderKey")
.HasColumnType("nvarchar(450)");
b.Property<string>("ProviderDisplayName")
.HasColumnType("nvarchar(max)");
b.Property<string>("UserId")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.HasKey("LoginProvider", "ProviderKey");
b.HasIndex("UserId");
b.ToTable("AspNetUserLogins");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
{
b.Property<string>("UserId")
.HasColumnType("nvarchar(450)");
b.Property<string>("RoleId")
.HasColumnType("nvarchar(450)");
b.HasKey("UserId", "RoleId");
b.HasIndex("RoleId");
b.ToTable("AspNetUserRoles");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
{
b.Property<string>("UserId")
.HasColumnType("nvarchar(450)");
b.Property<string>("LoginProvider")
.HasColumnType("nvarchar(450)");
b.Property<string>("Name")
.HasColumnType("nvarchar(450)");
b.Property<string>("Value")
.HasColumnType("nvarchar(max)");
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("AspNetUserTokens");
});
modelBuilder.Entity("AuthDataAccess.Entities.HRSIdentityUser", b =>
{
b.HasOne("AuthDataAccess.Entities.Tenant", "Tenant")
.WithMany("Users")
.HasForeignKey("TenantId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
{
b.HasOne("AuthDataAccess.Entities.HRSIdentityUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
{
b.HasOne("AuthDataAccess.Entities.HRSIdentityUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
{
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("AuthDataAccess.Entities.HRSIdentityUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
{
b.HasOne("AuthDataAccess.Entities.HRSIdentityUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
#pragma warning restore 612, 618
}
}
}
| 37.695906 | 125 | 0.463466 | [
"MIT"
] | sanishtj/ASP.NET-Core-REST-API-Auth-Microservice | AuthDataAccess/Migrations/20200506174809_UniqueKeyOnTenantName.Designer.cs | 12,894 | C# |
/*
* Licensed to SharpSoftware under one or more contributor
* license agreements. See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*
* SharpSoftware licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.CompilerServices;
using Itinero.Algorithms;
using Itinero.Algorithms.PriorityQueues;
using Itinero.Algorithms.Weights;
using Itinero.Optimization.Solvers.Tours;
[assembly: InternalsVisibleTo("Itinero.Optimization.Tests")]
[assembly: InternalsVisibleTo("Itinero.Optimization.Tests.Benchmarks")]
namespace Itinero.Optimization.Solvers.Shared.Directed
{
/// <summary>
/// Contains an algorithm to optimize all turns in a directed tour.
/// </summary>
internal static class TurnOptimizationOperation
{
/// <summary>
/// Converts the given undirected tour into a directed tour and minimizes the weight (without changing the sequence).
/// </summary>
/// <param name="undirectedTour">The undirected tour.</param>
/// <param name="weightFunc">The weight function.</param>
/// <param name="turnPenaltyFunc">The turn penalty function.</param>
/// <returns>A directed tour and it's weight.</returns>
internal static (float weight, Tour tour) ConvertToDirectedAndOptimizeTurns(this Tour undirectedTour, Func<int, int, float> weightFunc,
Func<TurnEnum, float> turnPenaltyFunc)
{
// build an initial directed tour.
var directedTour = new Tour(undirectedTour.Select(x => DirectedHelper.BuildVisit(x, TurnEnum.ForwardForward)),
DirectedHelper.BuildVisit(undirectedTour.Last, TurnEnum.ForwardForward));
// optimize turns.
var weight = directedTour.OptimizeTurns(weightFunc, turnPenaltyFunc);
return (weight, directedTour);
}
internal static float OptimizeTurns(this Tour tour, Func<int, int, float> weightFunc,
Func<TurnEnum, float> turnPenaltyFunc)
{
// TODO: this now uses a form of dijkstra but we think there is a better algorithm.
// TODO: this can be way more efficient, we haven't done any performance work on this.
// TODO: check if we can reuse arrays.
// build a small sequence of the original visits.
var capacity = tour.Capacity + 3; // make sure all turns fit.
var nextArray = new int[capacity / 4];
var first = DirectedHelper.ExtractVisit(tour.First);
var previous = -1;
var count = 0;
foreach (var directedVisit in tour)
{
count++;
var visit = DirectedHelper.ExtractVisit(directedVisit);
if (previous != -1)
{
nextArray[previous] = visit;
}
previous = visit;
}
if (count == 1) return 0;
var last = previous;
var settled = new HashSet<int>();
var queue = new BinaryHeap<int>();
var paths = new (int previous, float cost)[capacity];
for (var i = 0; i < paths.Length; i++)
{
paths[i] = (int.MaxValue, float.MaxValue);
}
// enqueue first visits and their paths.
queue.Push(TurnEnum.ForwardForward.DirectedVisit(first), 0);
queue.Push(TurnEnum.ForwardBackward.DirectedVisit(first), 0);
queue.Push(TurnEnum.BackwardForward.DirectedVisit(first), 0);
queue.Push(TurnEnum.BackwardBackward.DirectedVisit(first), 0);
var bestLast = -1;
while (queue.Count > 0)
{
var currentWeight = queue.PeekWeight();
var current = queue.Pop();
// check for last before settling.
var currentVisit = DirectedHelper.ExtractVisit(current);
if (currentVisit == last && currentWeight > 0)
{ // make sure there is weight and not to stop at the first occurence
// of the first visit in a closed tour.
bestLast = current;
break;
}
// check if already settled and settle visit.
if (settled.Contains(current))
{ // was already settled.
continue;
}
settled.Add(current);
var next = nextArray[currentVisit];
var departureWeightId = DirectedHelper.ExtractDepartureWeightId(current);
for (var t = 0; t < 4; t++)
{
var turn = (TurnEnum) t;
var nextDirected = turn.DirectedVisit(next);
if (next != last && settled.Contains(nextDirected))
{
continue;
}
var weight = turnPenaltyFunc(turn);
var arrivalWeightId = turn.Arrival().WeightId(next);
var travelCost = weightFunc(departureWeightId, arrivalWeightId);
if (travelCost >= float.MaxValue)
{ // this connection is impossible.
continue;
}
weight += travelCost;
weight += currentWeight;
//Debug.Assert(nextDirected >= 0 && nextDirected < paths.Length);
if (paths[nextDirected].cost > weight)
{
paths[nextDirected] = (current, weight);
queue.Push(nextDirected, weight);
}
}
}
if (bestLast == -1)
{ // tour is impossible.
return float.MaxValue;
}
var best = bestLast;
var newTour = new List<int>();
while (paths[best].previous > -1)
{
newTour.Add(best);
best = paths[best].previous;
if (DirectedHelper.ExtractVisit(best) == first)
{
break;
}
}
newTour.Add(best);
if (DirectedHelper.ExtractVisit(newTour[0]) ==
DirectedHelper.ExtractVisit(newTour[newTour.Count - 1]))
{ // tour is closed, make one visit with the proper departure/arrival.
var departure = DirectedHelper.ExtractTurn(newTour[newTour.Count - 1]).Departure();
var arrival = DirectedHelper.ExtractTurn(newTour[0]).Arrival();
var turn = TurnEnum.ForwardForward.ApplyArrival(arrival).ApplyDeparture(departure);
var visit = turn.DirectedVisit(DirectedHelper.ExtractVisit(newTour[0]));
newTour[newTour.Count - 1] = visit;
newTour.RemoveAt(0);
}
var tourDebug = tour.Clone();
tour.Clear();
tour.Replace(tour.First, newTour[newTour.Count - 1]);
if (tour.Last.HasValue &&
tour.First != tour.Last)
{
tour.Replace(tour.Last.Value, newTour[0]);
}
for (var i = newTour.Count - 2; i >= 0; i--)
{
tour.InsertAfter(newTour[i + 1], newTour[i]);
}
return paths[bestLast].cost;
}
}
} | 42.46114 | 143 | 0.552776 | [
"Apache-2.0"
] | itinero/logistics | src/Itinero.Optimization/Solvers/Shared/Directed/TurnOptimizationOperation.cs | 8,197 | C# |
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
namespace Evolve.MSBuild
{
/// <summary>
/// Custom MSBuild Task that runs an Evolve command.
/// </summary>
public class EvolveBoot : Task
{
private const string EvolveJsonConfigFileNotFound = "Evolve configuration file not found at {0}.";
private const string MigrationFolderCopyError = "Evolve cannot copy the migration folders to the output directory.";
private const string MigrationFolderCopy = "Migration folder {0} copied to {1}.";
/// <summary>
/// The configuration that you are building, either "Debug" or "Release" or "Staging"...
/// </summary>
[Required]
public string Configuration { get; set; }
/// <summary>
/// True if the project to migrate targets netcoreapp or NETCORE, otherwise false.
/// </summary>
[Required]
public bool IsDotNetCoreProject { get; set; }
/// <summary>
/// The directory of the evolve.exe CLI.
/// </summary>
[Required]
public string EvolveCliDir { get; set; }
/// <summary>
/// The full path of the Windows Evolve CLI.
/// </summary>
public string EvolveCli => Path.Combine(EvolveCliDir, "evolve.exe");
/// <summary>
/// The directory of the project (includes the trailing backslash '\').
/// </summary>
[Required]
public string ProjectDir { get; set; }
/// <summary>
/// The absolute path name of the primary output file for the build.
/// </summary>
[Required]
public string TargetPath { get; set; }
/// <summary>
/// The directory of the primary output file for the build.
/// </summary>
public string TargetDir => Path.GetDirectoryName(TargetPath);
/// <summary>
/// Full path to the app.config or evolve.json
/// </summary>
/// <exception cref="EvolveConfigurationException"> When configuration file is not found. </exception>
public string EvolveConfigurationFile => IsDotNetCoreProject ? FindJsonConfigurationFile() : TargetPath + ".config";
/// <summary>
/// Runs the task.
/// </summary>
[SuppressMessage("Design", "CA1031: Do not catch general exception types")]
public override bool Execute()
{
string originalCurrentDirectory = Directory.GetCurrentDirectory();
try
{
WriteHeader();
Directory.SetCurrentDirectory(TargetDir);
var args = GetCliArgsBuilder();
string cmdLineArgs = args.Build();
if (string.IsNullOrEmpty(cmdLineArgs))
{
return true;
}
CopyMigrationProjectDirToTargetDir(args.Locations);
using var proc = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = EvolveCli,
Arguments = cmdLineArgs,
UseShellExecute = false,
CreateNoWindow = true,
RedirectStandardError = true,
RedirectStandardOutput = true
}
};
LogInfo(EvolveCli + " " + cmdLineArgs);
proc.Start();
proc.WaitForExit();
LogInfo(proc.StandardOutput.ReadToEnd());
string stderr = proc.StandardError.ReadToEnd();
if (!string.IsNullOrEmpty(stderr))
{
Log.LogError(stderr);
return false;
}
return true;
}
catch (Exception ex)
{
LogErrorFromException(ex);
return false;
}
finally
{
Directory.SetCurrentDirectory(originalCurrentDirectory);
}
}
/// <summary>
/// <para>
/// Convienent method to avoid the forgettable user step 'always copy' on each sql migration file.
/// </para>
/// <para>
/// Copy sql migration folders and files to the output directory if the location is under the <see cref="ProjectDir"/> folder.
/// </para>
/// </summary>
/// <param name="locations"> List of the migration folders. </param>
private void CopyMigrationProjectDirToTargetDir(IEnumerable<string> locations)
{
try
{
foreach (var location in locations)
{
if (location.StartsWith(@"\")) continue;
if (location.StartsWith(@"/")) continue;
if (location.StartsWith(@".")) continue;
if (location.Contains(@":")) continue;
string sourcePath = Path.Combine(ProjectDir, location);
if (!Directory.Exists(sourcePath)) continue;
var sourceDirectory = new DirectoryInfo(sourcePath);
var targetDirectory = new DirectoryInfo(Path.Combine(TargetDir, location));
if (targetDirectory.Exists)
{
Directory.Delete(targetDirectory.FullName, true); // clean target folder
}
CopyAll(sourceDirectory, targetDirectory);
LogInfo(string.Format(MigrationFolderCopy, location, targetDirectory.FullName));
}
}
catch (Exception ex)
{
throw new EvolveMSBuildException(MigrationFolderCopyError, ex);
}
}
private void CopyAll(DirectoryInfo source, DirectoryInfo target)
{
Directory.CreateDirectory(target.FullName);
// Copy each file into the new directory.
foreach (FileInfo fi in source.GetFiles())
{
fi.CopyTo(Path.Combine(target.FullName, fi.Name), true);
}
// Copy each subdirectory using recursion.
foreach (DirectoryInfo diSourceSubDir in source.GetDirectories())
{
DirectoryInfo nextTargetSubDir = target.CreateSubdirectory(diSourceSubDir.Name);
CopyAll(diSourceSubDir, nextTargetSubDir);
}
}
/// <summary>
/// Returns the path of the json configuration file or throws ex if not found.
/// </summary>
/// <returns> Evolve.json or evolve.json configuration file. </returns>
/// <exception cref="EvolveMSBuildException"> When configuration file is not found. </exception>
private string FindJsonConfigurationFile()
{
string file = Path.Combine(ProjectDir, "Evolve.json");
if (File.Exists(file))
{
return file;
}
file = Path.Combine(ProjectDir, "evolve.json");
if (File.Exists(file))
{
return file;
}
throw new EvolveMSBuildException(string.Format(EvolveJsonConfigFileNotFound, file));
}
private CliArgsBuilder GetCliArgsBuilder() => Path.GetExtension(EvolveConfigurationFile) == ".json"
? new JsonCliArgsBuilder(EvolveConfigurationFile, Configuration) as CliArgsBuilder
: new AppConfigCliArgsBuilder(EvolveConfigurationFile, Configuration);
private void LogErrorFromException(Exception ex) => Log.LogErrorFromException(ex, true, true, "Evolve");
private void LogInfo(string msg) => Log.LogMessage(MessageImportance.High, msg);
private void WriteHeader()
{
Log.LogMessage(MessageImportance.High, @"__________ ______ ");
Log.LogMessage(MessageImportance.High, @"___ ____/__ __________ /__ ______ ");
Log.LogMessage(MessageImportance.High, @"__ __/ __ | / / __ \_ /__ | / / _ \");
Log.LogMessage(MessageImportance.High, @"_ /___ __ |/ // /_/ / / __ |/ // __/");
Log.LogMessage(MessageImportance.High, @"/_____/ _____/ \____//_/ _____/ \___/ ");
}
}
}
| 38.236607 | 142 | 0.54711 | [
"MIT"
] | Zarun1/Evolve | src/Evolve.MSBuild/EvolveBoot.cs | 8,567 | C# |
// Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace MailPlus.Models
{
using System.Linq;
public partial class CampaignMailingOpenResponse
{
/// <summary>
/// Initializes a new instance of the CampaignMailingOpenResponse
/// class.
/// </summary>
public CampaignMailingOpenResponse() { }
/// <summary>
/// Initializes a new instance of the CampaignMailingOpenResponse
/// class.
/// </summary>
public CampaignMailingOpenResponse(System.Collections.Generic.IList<CampaignMailingOpen> opens = default(System.Collections.Generic.IList<CampaignMailingOpen>), Paging paging = default(Paging))
{
Opens = opens;
Paging = paging;
}
/// <summary>
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "opens")]
public System.Collections.Generic.IList<CampaignMailingOpen> Opens { get; set; }
/// <summary>
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "paging")]
public Paging Paging { get; set; }
}
}
| 31.589744 | 201 | 0.628247 | [
"MIT"
] | panoramastudios/MailPlus.NET | MailPlus/Models/CampaignMailingOpenResponse.cs | 1,232 | C# |
#pragma warning disable 108 // new keyword hiding
#pragma warning disable 114 // new keyword hiding
namespace Windows.Phone.PersonalInformation
{
#if __ANDROID__ || __IOS__ || NET46 || __WASM__
[global::Uno.NotImplemented]
#endif
public partial class ContactChangeRecord
{
#if __ANDROID__ || __IOS__ || NET46 || __WASM__
[global::Uno.NotImplemented]
public global::Windows.Phone.PersonalInformation.ContactChangeType ChangeType
{
get
{
throw new global::System.NotImplementedException("The member ContactChangeType ContactChangeRecord.ChangeType is not implemented in Uno.");
}
}
#endif
#if __ANDROID__ || __IOS__ || NET46 || __WASM__
[global::Uno.NotImplemented]
public string Id
{
get
{
throw new global::System.NotImplementedException("The member string ContactChangeRecord.Id is not implemented in Uno.");
}
}
#endif
#if __ANDROID__ || __IOS__ || NET46 || __WASM__
[global::Uno.NotImplemented]
public string RemoteId
{
get
{
throw new global::System.NotImplementedException("The member string ContactChangeRecord.RemoteId is not implemented in Uno.");
}
}
#endif
#if __ANDROID__ || __IOS__ || NET46 || __WASM__
[global::Uno.NotImplemented]
public ulong RevisionNumber
{
get
{
throw new global::System.NotImplementedException("The member ulong ContactChangeRecord.RevisionNumber is not implemented in Uno.");
}
}
#endif
// Forced skipping of method Windows.Phone.PersonalInformation.ContactChangeRecord.ChangeType.get
// Forced skipping of method Windows.Phone.PersonalInformation.ContactChangeRecord.RevisionNumber.get
// Forced skipping of method Windows.Phone.PersonalInformation.ContactChangeRecord.Id.get
// Forced skipping of method Windows.Phone.PersonalInformation.ContactChangeRecord.RemoteId.get
}
}
| 32.732143 | 143 | 0.747954 | [
"Apache-2.0"
] | nv-ksavaria/Uno | src/Uno.UWP/Generated/3.0.0.0/Windows.Phone.PersonalInformation/ContactChangeRecord.cs | 1,833 | C# |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.