/// <summary> /// Lists the Azure Dev Spaces Controllers in a subscription. /// </summary> /// <remarks> /// Lists all the Azure Dev Spaces Controllers with their properties in the /// subscription. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <Controller> > ListNextAsync(this IControllersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets an Azure Dev Spaces Controller. /// </summary> /// <remarks> /// Gets the properties for an Azure Dev Spaces Controller. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Resource group to which the resource belongs. /// </param> /// <param name='name'> /// Name of the resource. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Controller> GetAsync(this IControllersOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Updates an Azure Dev Spaces Controller. /// </summary> /// <remarks> /// Updates the properties of an existing Azure Dev Spaces Controller with the /// specified update parameters. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Resource group to which the resource belongs. /// </param> /// <param name='name'> /// Name of the resource. /// </param> /// <param name='tags'> /// Tags for the Azure Dev Spaces Controller. /// </param> /// <param name='targetContainerHostCredentialsBase64'> /// Credentials of the target container host (base64). /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Controller> UpdateAsync(this IControllersOperations operations, string resourceGroupName, string name, IDictionary <string, string> tags = default(IDictionary <string, string>), string targetContainerHostCredentialsBase64 = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, name, tags, targetContainerHostCredentialsBase64, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
private static IPage <Controller> ListByNextLink(this IControllersOperations operations, string nextLink, string resourceGroupName) { if (string.IsNullOrEmpty(resourceGroupName)) { return(operations.ListNext(nextLink)); } return(operations.ListByResourceGroupNext(nextLink)); }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { ContainerHostMappings = new ContainerHostMappingsOperations(this); Operations = new Operations(this); Controllers = new ControllersOperations(this); BaseUri = new System.Uri("https://management.azure.com"); ApiVersion = "2019-01-01-preview"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; SerializationSettings = new JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; SerializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings = new JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <OrchestratorSpecificConnectionDetails>("instanceType")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <OrchestratorSpecificConnectionDetails>("instanceType")); CustomInitialize(); DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); }
public static IList <PSController> ListAllPSController(this IControllersOperations operations, string resourceGroupName) { List <PSController> list = new List <PSController>(); var controllers = operations.List(resourceGroupName); foreach (Controller controller in controllers) { list.Add(new PSController(controller)); } while (!string.IsNullOrEmpty(controllers.NextPageLink)) { controllers = operations.ListByNextLink(resourceGroupName, controllers.NextPageLink); foreach (Controller controller in controllers) { list.Add(new PSController(controller)); } } return(list); }
/// <summary> /// Lists the Azure Dev Spaces Controllers in a subscription. /// </summary> /// <remarks> /// Lists all the Azure Dev Spaces Controllers with their properties in the /// subscription. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> public static IPage <Controller> ListNext(this IControllersOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Deletes an Azure Dev Spaces Controller. /// </summary> /// <remarks> /// Deletes an existing Azure Dev Spaces Controller. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Resource group to which the resource belongs. /// </param> /// <param name='name'> /// Name of the resource. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginDeleteAsync(this IControllersOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes an Azure Dev Spaces Controller. /// </summary> /// <remarks> /// Deletes an existing Azure Dev Spaces Controller. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Resource group to which the resource belongs. /// </param> /// <param name='name'> /// Name of the resource. /// </param> public static void BeginDelete(this IControllersOperations operations, string resourceGroupName, string name) { operations.BeginDeleteAsync(resourceGroupName, name).GetAwaiter().GetResult(); }
/// <summary> /// Gets an Azure Dev Spaces Controller. /// </summary> /// <remarks> /// Gets the properties for an Azure Dev Spaces Controller. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Resource group to which the resource belongs. /// </param> /// <param name='name'> /// Name of the resource. /// </param> public static Controller Get(this IControllersOperations operations, string resourceGroupName, string name) { return(operations.GetAsync(resourceGroupName, name).GetAwaiter().GetResult()); }
/// <summary> /// Lists connection details for an Azure Dev Spaces Controller. /// </summary> /// <remarks> /// Lists connection details for the underlying container resources of an Azure /// Dev Spaces Controller. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Resource group to which the resource belongs. /// </param> /// <param name='name'> /// Name of the resource. /// </param> /// <param name='targetContainerHostResourceId'> /// Resource ID of the target container host mapped to the Azure Dev Spaces /// Controller. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ControllerConnectionDetailsList> ListConnectionDetailsAsync(this IControllersOperations operations, string resourceGroupName, string name, string targetContainerHostResourceId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListConnectionDetailsWithHttpMessagesAsync(resourceGroupName, name, targetContainerHostResourceId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists the Azure Dev Spaces Controllers in a subscription. /// </summary> /// <remarks> /// Lists all the Azure Dev Spaces Controllers with their properties in the /// subscription. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IPage <Controller> List(this IControllersOperations operations) { return(operations.ListAsync().GetAwaiter().GetResult()); }
/// <summary> /// Lists the Azure Dev Spaces Controllers in a resource group. /// </summary> /// <remarks> /// Lists all the Azure Dev Spaces Controllers with their properties in the /// specified resource group and subscription. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Resource group to which the resource belongs. /// </param> public static IPage <Controller> ListByResourceGroup(this IControllersOperations operations, string resourceGroupName) { return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult()); }
/// <summary> /// Updates an Azure Dev Spaces Controller. /// </summary> /// <remarks> /// Updates the properties of an existing Azure Dev Spaces Controller with the /// specified update parameters. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Resource group to which the resource belongs. /// </param> /// <param name='name'> /// Name of the resource. /// </param> /// <param name='tags'> /// Tags for the Azure Dev Spaces Controller. /// </param> /// <param name='targetContainerHostCredentialsBase64'> /// Credentials of the target container host (base64). /// </param> public static Controller Update(this IControllersOperations operations, string resourceGroupName, string name, IDictionary <string, string> tags = default(IDictionary <string, string>), string targetContainerHostCredentialsBase64 = default(string)) { return(operations.UpdateAsync(resourceGroupName, name, tags, targetContainerHostCredentialsBase64).GetAwaiter().GetResult()); }
public static PSController GetPSController(this IControllersOperations operations, string resourceGroupName, string name) { var controller = operations.Get(resourceGroupName, name); return(new PSController(controller)); }
/// <summary> /// Lists connection details for an Azure Dev Spaces Controller. /// </summary> /// <remarks> /// Lists connection details for the underlying container resources of an Azure /// Dev Spaces Controller. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Resource group to which the resource belongs. /// </param> /// <param name='name'> /// Name of the resource. /// </param> /// <param name='targetContainerHostResourceId'> /// Resource ID of the target container host mapped to the Azure Dev Spaces /// Controller. /// </param> public static ControllerConnectionDetailsList ListConnectionDetails(this IControllersOperations operations, string resourceGroupName, string name, string targetContainerHostResourceId) { return(operations.ListConnectionDetailsAsync(resourceGroupName, name, targetContainerHostResourceId).GetAwaiter().GetResult()); }
/// <summary> /// Creates an Azure Dev Spaces Controller. /// </summary> /// <remarks> /// Creates an Azure Dev Spaces Controller with the specified create /// parameters. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Resource group to which the resource belongs. /// </param> /// <param name='name'> /// Name of the resource. /// </param> /// <param name='controller'> /// Controller create parameters. /// </param> public static Controller Create(this IControllersOperations operations, string resourceGroupName, string name, Controller controller) { return(operations.CreateAsync(resourceGroupName, name, controller).GetAwaiter().GetResult()); }
/// <summary> /// Updates an Azure Dev Spaces Controller. /// </summary> /// <remarks> /// Updates the properties of an existing Azure Dev Spaces Controller with the /// specified update parameters. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Resource group to which the resource belongs. /// </param> /// <param name='name'> /// Name of the resource. /// </param> /// <param name='tags'> /// Tags for the Azure Dev Spaces Controller. /// </param> public static Controller Update(this IControllersOperations operations, string resourceGroupName, string name, IDictionary <string, string> tags = default(IDictionary <string, string>)) { return(operations.UpdateAsync(resourceGroupName, name, tags).GetAwaiter().GetResult()); }