Skip to content

Commit

Permalink
.NET SDK Resource Provider:'ContainerRegistry'
Browse files Browse the repository at this point in the history
REST Spec PR 'Azure/azure-rest-api-specs#5854'
REST Spec PR Author 'ankurkhemani'
REST Spec PR Last commit
  • Loading branch information
adxsdknet committed May 15, 2019
1 parent 73b5609 commit 6211c6c
Show file tree
Hide file tree
Showing 38 changed files with 1,102 additions and 825 deletions.
2 changes: 1 addition & 1 deletion src/SDKs/ContainerRegistry/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>ContainerRegistry_2017-10-01;ContainerRegistry_2018-09-01;</AzureApiTag>
<AzureApiTag>ContainerRegistry_2019-05-01;ContainerRegistry_2019-04-01;</AzureApiTag>
<PackageTags>$(PackageTags);$(CommonTags);$(AzureApiTag);</PackageTags>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -310,66 +310,6 @@ public partial interface IRegistriesOperations
/// </exception>
System.Threading.Tasks.Task<AzureOperationResponse<RegistryUsageListResult>> ListUsagesWithHttpMessagesAsync(string resourceGroupName, string registryName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Lists the policies for the specified container registry.
/// </summary>
/// <param name='resourceGroupName'>
/// The name of the resource group to which the container registry
/// belongs.
/// </param>
/// <param name='registryName'>
/// The name of the container registry.
/// </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>
System.Threading.Tasks.Task<AzureOperationResponse<RegistryPolicies>> ListPoliciesWithHttpMessagesAsync(string resourceGroupName, string registryName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Updates the policies for the specified container registry.
/// </summary>
/// <param name='resourceGroupName'>
/// The name of the resource group to which the container registry
/// belongs.
/// </param>
/// <param name='registryName'>
/// The name of the container registry.
/// </param>
/// <param name='quarantinePolicy'>
/// An object that represents quarantine policy for a container
/// registry.
/// </param>
/// <param name='trustPolicy'>
/// An object that represents content trust policy for a container
/// registry.
/// </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>
System.Threading.Tasks.Task<AzureOperationResponse<RegistryPolicies>> UpdatePoliciesWithHttpMessagesAsync(string resourceGroupName, string registryName, QuarantinePolicy quarantinePolicy = default(QuarantinePolicy), TrustPolicy trustPolicy = default(TrustPolicy), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Schedules a new run based on the request parameters and add it to
/// the run queue.
/// </summary>
Expand Down Expand Up @@ -536,40 +476,6 @@ public partial interface IRegistriesOperations
/// </exception>
System.Threading.Tasks.Task<AzureOperationResponse<Registry>> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string registryName, RegistryUpdateParameters registryUpdateParameters, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Updates the policies for the specified container registry.
/// </summary>
/// <param name='resourceGroupName'>
/// The name of the resource group to which the container registry
/// belongs.
/// </param>
/// <param name='registryName'>
/// The name of the container registry.
/// </param>
/// <param name='quarantinePolicy'>
/// An object that represents quarantine policy for a container
/// registry.
/// </param>
/// <param name='trustPolicy'>
/// An object that represents content trust policy for a container
/// registry.
/// </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>
System.Threading.Tasks.Task<AzureOperationResponse<RegistryPolicies>> BeginUpdatePoliciesWithHttpMessagesAsync(string resourceGroupName, string registryName, QuarantinePolicy quarantinePolicy = default(QuarantinePolicy), TrustPolicy trustPolicy = default(TrustPolicy), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Schedules a new run based on the request parameters and add it to
/// the run queue.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
// <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.ContainerRegistry.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

/// <summary>
/// The parameters that describes a set of credentials that will be used
/// when a run is invoked.
/// </summary>
public partial class Credentials
{
/// <summary>
/// Initializes a new instance of the Credentials class.
/// </summary>
public Credentials()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the Credentials class.
/// </summary>
/// <param name="sourceRegistry">Describes the credential parameters
/// for accessing the source registry.</param>
/// <param name="customRegistries">Describes the credential parameters
/// for accessing other custom registries. The key
/// for the dictionary item will be the registry login server
/// (myregistry.azurecr.io) and
/// the value of the item will be the registry credentials for
/// accessing the registry.</param>
public Credentials(SourceRegistryCredentials sourceRegistry = default(SourceRegistryCredentials), IDictionary<string, CustomRegistryCredentials> customRegistries = default(IDictionary<string, CustomRegistryCredentials>))
{
SourceRegistry = sourceRegistry;
CustomRegistries = customRegistries;
CustomInit();
}

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

/// <summary>
/// Gets or sets describes the credential parameters for accessing the
/// source registry.
/// </summary>
[JsonProperty(PropertyName = "sourceRegistry")]
public SourceRegistryCredentials SourceRegistry { get; set; }

/// <summary>
/// Gets or sets describes the credential parameters for accessing
/// other custom registries. The key
/// for the dictionary item will be the registry login server
/// (myregistry.azurecr.io) and
/// the value of the item will be the registry credentials for
/// accessing the registry.
/// </summary>
[JsonProperty(PropertyName = "customRegistries")]
public IDictionary<string, CustomRegistryCredentials> CustomRegistries { get; set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
// <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.ContainerRegistry.Models
{
using Newtonsoft.Json;
using System.Linq;

/// <summary>
/// Describes the credentials that will be used to access a custom registry
/// during a run.
/// </summary>
public partial class CustomRegistryCredentials
{
/// <summary>
/// Initializes a new instance of the CustomRegistryCredentials class.
/// </summary>
public CustomRegistryCredentials()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the CustomRegistryCredentials class.
/// </summary>
/// <param name="userName">The username for logging into the custom
/// registry.</param>
/// <param name="password">The password for logging into the custom
/// registry. The password is a secret
/// object that allows multiple ways of providing the value for
/// it.</param>
/// <param name="identity">Indicates the managed identity assigned to
/// the custom credential. If a user-assigned identity
/// this value is the Client ID. If a system-assigned identity, the
/// value will be `system`. In
/// the case of a system-assigned identity, the Client ID will be
/// determined by the runner. This
/// identity may be used to authenticate to key vault to retrieve
/// credentials or it may be the only
/// source of authentication used for accessing the registry.</param>
public CustomRegistryCredentials(SecretObject userName = default(SecretObject), SecretObject password = default(SecretObject), string identity = default(string))
{
UserName = userName;
Password = password;
Identity = identity;
CustomInit();
}

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

/// <summary>
/// Gets or sets the username for logging into the custom registry.
/// </summary>
[JsonProperty(PropertyName = "userName")]
public SecretObject UserName { get; set; }

/// <summary>
/// Gets or sets the password for logging into the custom registry. The
/// password is a secret
/// object that allows multiple ways of providing the value for it.
/// </summary>
[JsonProperty(PropertyName = "password")]
public SecretObject Password { get; set; }

/// <summary>
/// Gets or sets indicates the managed identity assigned to the custom
/// credential. If a user-assigned identity
/// this value is the Client ID. If a system-assigned identity, the
/// value will be `system`. In
/// the case of a system-assigned identity, the Client ID will be
/// determined by the runner. This
/// identity may be used to authenticate to key vault to retrieve
/// credentials or it may be the only
/// source of authentication used for accessing the registry.
/// </summary>
[JsonProperty(PropertyName = "identity")]
public string Identity { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public DockerBuildRequest()
/// not.</param>
/// <param name="noCache">The value of this property indicates whether
/// the image cache is enabled or not.</param>
/// <param name="target">The name of the target build stage for the
/// docker build.</param>
/// <param name="arguments">The collection of override arguments to be
/// used when executing the run.</param>
/// <param name="timeout">Run timeout in seconds.</param>
Expand All @@ -54,18 +56,22 @@ public DockerBuildRequest()
/// source context. It can be an URL to a tar or git repository.
/// If it is relative URL, the relative path should be obtained from
/// calling listBuildSourceUploadUrl API.</param>
public DockerBuildRequest(string dockerFilePath, PlatformProperties platform, bool? isArchiveEnabled = default(bool?), IList<string> imageNames = default(IList<string>), bool? isPushEnabled = default(bool?), bool? noCache = default(bool?), IList<Argument> arguments = default(IList<Argument>), int? timeout = default(int?), AgentProperties agentConfiguration = default(AgentProperties), string sourceLocation = default(string))
/// <param name="credentials">The properties that describes a set of
/// credentials that will be used when this run is invoked.</param>
public DockerBuildRequest(string dockerFilePath, PlatformProperties platform, bool? isArchiveEnabled = default(bool?), IList<string> imageNames = default(IList<string>), bool? isPushEnabled = default(bool?), bool? noCache = default(bool?), string target = default(string), IList<Argument> arguments = default(IList<Argument>), int? timeout = default(int?), AgentProperties agentConfiguration = default(AgentProperties), string sourceLocation = default(string), Credentials credentials = default(Credentials))
: base(isArchiveEnabled)
{
ImageNames = imageNames;
IsPushEnabled = isPushEnabled;
NoCache = noCache;
DockerFilePath = dockerFilePath;
Target = target;
Arguments = arguments;
Timeout = timeout;
Platform = platform;
AgentConfiguration = agentConfiguration;
SourceLocation = sourceLocation;
Credentials = credentials;
CustomInit();
}

Expand Down Expand Up @@ -101,6 +107,13 @@ public DockerBuildRequest()
[JsonProperty(PropertyName = "dockerFilePath")]
public string DockerFilePath { get; set; }

/// <summary>
/// Gets or sets the name of the target build stage for the docker
/// build.
/// </summary>
[JsonProperty(PropertyName = "target")]
public string Target { get; set; }

/// <summary>
/// Gets or sets the collection of override arguments to be used when
/// executing the run.
Expand Down Expand Up @@ -136,6 +149,13 @@ public DockerBuildRequest()
[JsonProperty(PropertyName = "sourceLocation")]
public string SourceLocation { get; set; }

/// <summary>
/// Gets or sets the properties that describes a set of credentials
/// that will be used when this run is invoked.
/// </summary>
[JsonProperty(PropertyName = "credentials")]
public Credentials Credentials { get; set; }

/// <summary>
/// Validate the object.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,18 @@ public DockerBuildStep()
/// not.</param>
/// <param name="noCache">The value of this property indicates whether
/// the image cache is enabled or not.</param>
/// <param name="target">The name of the target build stage for the
/// docker build.</param>
/// <param name="arguments">The collection of override arguments to be
/// used when executing this build step.</param>
public DockerBuildStep(string dockerFilePath, IList<BaseImageDependency> baseImageDependencies = default(IList<BaseImageDependency>), string contextPath = default(string), string contextAccessToken = default(string), IList<string> imageNames = default(IList<string>), bool? isPushEnabled = default(bool?), bool? noCache = default(bool?), IList<Argument> arguments = default(IList<Argument>))
public DockerBuildStep(string dockerFilePath, IList<BaseImageDependency> baseImageDependencies = default(IList<BaseImageDependency>), string contextPath = default(string), string contextAccessToken = default(string), IList<string> imageNames = default(IList<string>), bool? isPushEnabled = default(bool?), bool? noCache = default(bool?), string target = default(string), IList<Argument> arguments = default(IList<Argument>))
: base(baseImageDependencies, contextPath, contextAccessToken)
{
ImageNames = imageNames;
IsPushEnabled = isPushEnabled;
NoCache = noCache;
DockerFilePath = dockerFilePath;
Target = target;
Arguments = arguments;
CustomInit();
}
Expand Down Expand Up @@ -94,6 +97,13 @@ public DockerBuildStep()
[JsonProperty(PropertyName = "dockerFilePath")]
public string DockerFilePath { get; set; }

/// <summary>
/// Gets or sets the name of the target build stage for the docker
/// build.
/// </summary>
[JsonProperty(PropertyName = "target")]
public string Target { get; set; }

/// <summary>
/// Gets or sets the collection of override arguments to be used when
/// executing this build step.
Expand Down
Loading

0 comments on commit 6211c6c

Please sign in to comment.