Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[Container Instance] update api version 2018-04-01 #4207

Merged
merged 3 commits into from
Apr 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/SDKs/ContainerInstance/AzSdk.RP.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--This file and it's contents are updated at build time moving or editing might result in build failure. Take due deligence while editing this file-->
<PropertyGroup>
<AzureApiTag>ContainerInstance_2018-02-01-preview;</AzureApiTag>
<AzureApiTag>ContainerInstance_2018-04-01;</AzureApiTag>
<PackageTags>$(PackageTags);$(CommonTags);$(AzureApiTag);</PackageTags>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PackageId>ContainerInstance.Tests</PackageId>
<Description>ContainerInstance.Tests Class Library</Description>
<AssemblyName>ContainerInstance.Tests</AssemblyName>
<VersionPrefix>1.0.2-preview</VersionPrefix>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not necessary to modify the version number here. Simply set this to 1.0.0 since these won't be published

<VersionPrefix>1.0.0</VersionPrefix>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static ContainerGroup CreateTestContainerGroup(string containerGroupName)
name: containerGroupName,
image: "alpine",
ports: new List<ContainerPort>() { new ContainerPort(80) },
command: new List<string>() { "echo", "hello" },
command: new List<string>() { "/bin/sh", "-c", "while true; do sleep 10; done" },
resources: new ResourceRequirements(requests: new ResourceRequests(memoryInGB: 1.5, cpu: 1.0)))
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("80C5B642-F93C-4E68-9B37-04565D3CF6AB")]
[assembly: AssemblyVersion("1.0.2.0")]
[assembly: AssemblyFileVersion("1.0.2.0")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public static ContainerGroup CreateOrUpdate(this IContainerGroupsOperations oper
/// <param name='resource'>
/// The container group resource with just the tags to be updated.
/// </param>
public static ContainerGroup Update(this IContainerGroupsOperations operations, string resourceGroupName, string containerGroupName, Resource resource = default(Resource))
public static ContainerGroup Update(this IContainerGroupsOperations operations, string resourceGroupName, string containerGroupName, Resource resource)
{
return operations.UpdateAsync(resourceGroupName, containerGroupName, resource).GetAwaiter().GetResult();
}
Expand All @@ -257,7 +257,7 @@ public static ContainerGroup CreateOrUpdate(this IContainerGroupsOperations oper
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<ContainerGroup> UpdateAsync(this IContainerGroupsOperations operations, string resourceGroupName, string containerGroupName, Resource resource = default(Resource), CancellationToken cancellationToken = default(CancellationToken))
public static async Task<ContainerGroup> UpdateAsync(this IContainerGroupsOperations operations, string resourceGroupName, string containerGroupName, Resource resource, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, containerGroupName, resource, null, cancellationToken).ConfigureAwait(false))
{
Expand Down Expand Up @@ -315,6 +315,58 @@ public static ContainerGroup Delete(this IContainerGroupsOperations operations,
}
}

/// <summary>
/// Create or update container groups.
/// </summary>
/// <remarks>
/// Create or update container groups with specified configurations.
/// </remarks>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
/// <param name='containerGroupName'>
/// The name of the container group.
/// </param>
/// <param name='containerGroup'>
/// The properties of the container group to be created or updated.
/// </param>
public static ContainerGroup BeginCreateOrUpdate(this IContainerGroupsOperations operations, string resourceGroupName, string containerGroupName, ContainerGroup containerGroup)
{
return operations.BeginCreateOrUpdateAsync(resourceGroupName, containerGroupName, containerGroup).GetAwaiter().GetResult();
}

/// <summary>
/// Create or update container groups.
/// </summary>
/// <remarks>
/// Create or update container groups with specified configurations.
/// </remarks>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
/// <param name='containerGroupName'>
/// The name of the container group.
/// </param>
/// <param name='containerGroup'>
/// The properties of the container group to be created or updated.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<ContainerGroup> BeginCreateOrUpdateAsync(this IContainerGroupsOperations operations, string resourceGroupName, string containerGroupName, ContainerGroup containerGroup, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, containerGroupName, containerGroup, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

/// <summary>
/// Get a list of container groups in the specified subscription.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ public partial class ContainerInstanceManagementClient : ServiceClient<Container
/// </summary>
public virtual IContainerLogsOperations ContainerLogs { get; private set; }

/// <summary>
/// Gets the IStartContainerOperations.
/// </summary>
public virtual IStartContainerOperations StartContainer { get; private set; }

/// <summary>
/// Initializes a new instance of the ContainerInstanceManagementClient class.
/// </summary>
Expand Down Expand Up @@ -297,8 +302,9 @@ private void Initialize()
Operations = new Operations(this);
ContainerGroupUsage = new ContainerGroupUsageOperations(this);
ContainerLogs = new ContainerLogsOperations(this);
StartContainer = new StartContainerOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
ApiVersion = "2018-02-01-preview";
ApiVersion = "2018-04-01";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
GenerateClientRequestId = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public partial interface IContainerGroupsOperations
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<ContainerGroup>> UpdateWithHttpMessagesAsync(string resourceGroupName, string containerGroupName, Resource resource = default(Resource), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<ContainerGroup>> UpdateWithHttpMessagesAsync(string resourceGroupName, string containerGroupName, Resource resource, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Delete the specified container group.
/// </summary>
Expand Down Expand Up @@ -202,6 +202,37 @@ public partial interface IContainerGroupsOperations
/// </exception>
Task<AzureOperationResponse<ContainerGroup>> DeleteWithHttpMessagesAsync(string resourceGroupName, string containerGroupName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Create or update container groups.
/// </summary>
/// <remarks>
/// Create or update container groups with specified configurations.
/// </remarks>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
/// <param name='containerGroupName'>
/// The name of the container group.
/// </param>
/// <param name='containerGroup'>
/// The properties of the container group to be created or updated.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<ContainerGroup>> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string containerGroupName, ContainerGroup containerGroup, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Get a list of container groups in the specified subscription.
/// </summary>
/// <remarks>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,10 @@ public partial interface IContainerInstanceManagementClient : System.IDisposable
/// </summary>
IContainerLogsOperations ContainerLogs { get; }

/// <summary>
/// Gets the IStartContainerOperations.
/// </summary>
IStartContainerOperations StartContainer { get; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.ContainerInstance
{
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

/// <summary>
/// StartContainerOperations operations.
/// </summary>
public partial interface IStartContainerOperations
{
/// <summary>
/// Starts the exec command for a specific container instance.
/// </summary>
/// <remarks>
/// Starts the exec command for a specified container instance in a
/// specified resource group and container group.
/// </remarks>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
/// <param name='containerGroupName'>
/// The name of the container group.
/// </param>
/// <param name='containerName'>
/// The name of the container instance.
/// </param>
/// <param name='containerExecRequest'>
/// The request for the exec command.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<ContainerExecResponse>> LaunchExecWithHttpMessagesAsync(string resourceGroupName, string containerGroupName, string containerName, ContainerExecRequest containerExecRequest, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.ContainerInstance.Models
{
using Newtonsoft.Json;
using System.Linq;

/// <summary>
/// The start container exec request.
/// </summary>
public partial class ContainerExecRequest
{
/// <summary>
/// Initializes a new instance of the ContainerExecRequest class.
/// </summary>
public ContainerExecRequest()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the ContainerExecRequest class.
/// </summary>
/// <param name="command">The command to be executed.</param>
/// <param name="terminalSize">The size of the terminal.</param>
public ContainerExecRequest(string command = default(string), ContainerExecRequestTerminalSize terminalSize = default(ContainerExecRequestTerminalSize))
{
Command = command;
TerminalSize = terminalSize;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// Gets or sets the command to be executed.
/// </summary>
[JsonProperty(PropertyName = "command")]
public string Command { get; set; }

/// <summary>
/// Gets or sets the size of the terminal.
/// </summary>
[JsonProperty(PropertyName = "terminalSize")]
public ContainerExecRequestTerminalSize TerminalSize { get; set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.ContainerInstance.Models
{
using Newtonsoft.Json;
using System.Linq;

/// <summary>
/// The size of the terminal.
/// </summary>
public partial class ContainerExecRequestTerminalSize
{
/// <summary>
/// Initializes a new instance of the ContainerExecRequestTerminalSize
/// class.
/// </summary>
public ContainerExecRequestTerminalSize()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the ContainerExecRequestTerminalSize
/// class.
/// </summary>
/// <param name="row">The row size of the terminal</param>
/// <param name="column">The column size of the terminal</param>
public ContainerExecRequestTerminalSize(int? row = default(int?), int? column = default(int?))
{
Row = row;
Column = column;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// Gets or sets the row size of the terminal
/// </summary>
[JsonProperty(PropertyName = "row")]
public int? Row { get; set; }

/// <summary>
/// Gets or sets the column size of the terminal
/// </summary>
[JsonProperty(PropertyName = "column")]
public int? Column { get; set; }

}
}
Loading