Skip to content

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 @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "net",
"TagPrefix": "net/containerregistry/Azure.ResourceManager.ContainerRegistry",
"Tag": "net/containerregistry/Azure.ResourceManager.ContainerRegistry_6cf6b7291a"
"Tag": "net/containerregistry/Azure.ResourceManager.ContainerRegistry_fadc2aecf7"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable disable

using System.Collections.Generic;
using System.ComponentModel;

namespace Azure.ResourceManager.ContainerRegistry
{
public partial class ContainerRegistryPrivateLinkResourceData
{
// This is a usage change in api version 2025-11-01, add this property back for compatibility reason.
/// <summary> The private link resource Private link DNS zone name. </summary>
[WirePath("properties.requiredZoneNames")]
[EditorBrowsable(EditorBrowsableState.Never)]
public IReadOnlyList<string> RequiredZoneNames { get => (IReadOnlyList<string>)RequiredZoneNamesList; }
Copy link
Member

Choose a reason for hiding this comment

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

RequiredZoneNamesList is not really a good name - we could make it RequiredPrivateLinkZoneNames according to its description

Copy link
Member Author

Choose a reason for hiding this comment

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

Renamed to RequiredPrivateLinkZoneNames

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable disable

using System;
using System.ComponentModel;
using System.Threading;
using System.Threading.Tasks;
using Azure.Core;
using Azure.ResourceManager.ContainerRegistry.Models;

namespace Azure.ResourceManager.ContainerRegistry
{
// The `ScheduleRun` operation is no longer LRO, add these method back for compatibility reason.
public partial class ContainerRegistryResource
{
/// <summary>
/// Schedules a new run based on the request parameters and add it to the run queue.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scheduleRun</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>Schedules_ScheduleRun</description>
/// </item>
/// <item>
/// <term>Default Api Version</term>
/// <description>2019-06-01-preview</description>
/// </item>
/// </list>
/// </summary>
/// <param name="waitUntil"> <see cref="WaitUntil.Completed"/> if the method should wait to return until the long-running operation has completed on the service; <see cref="WaitUntil.Started"/> if it should return after starting the operation. For more information on long-running operations, please see <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/LongRunningOperations.md"> Azure.Core Long-Running Operation samples</see>. </param>
/// <param name="content"> The parameters of a run that needs to scheduled. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="content"/> is null. </exception>
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual async Task<ArmOperation<ContainerRegistryRunResource>> ScheduleRunAsync(WaitUntil waitUntil, ContainerRegistryRunContent content, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(content, nameof(content));

using var scope = _schedulesClientDiagnostics.CreateScope("ContainerRegistryResource.ScheduleRun");
scope.Start();
try
{
var response = await _schedulesRestClient.ScheduleRunAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false);
var uri = _schedulesRestClient.CreateScheduleRunRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content);
var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Post, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
var operation = new ContainerRegistryArmOperation<ContainerRegistryRunResource>(Response.FromValue(new ContainerRegistryRunResource(Client, response), response.GetRawResponse()), rehydrationToken);
if (waitUntil == WaitUntil.Completed)
await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
return operation;
}
catch (Exception e)
{
scope.Failed(e);
throw;
}
}

/// <summary>
/// Schedules a new run based on the request parameters and add it to the run queue.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scheduleRun</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>Schedules_ScheduleRun</description>
/// </item>
/// <item>
/// <term>Default Api Version</term>
/// <description>2019-06-01-preview</description>
/// </item>
/// </list>
/// </summary>
/// <param name="waitUntil"> <see cref="WaitUntil.Completed"/> if the method should wait to return until the long-running operation has completed on the service; <see cref="WaitUntil.Started"/> if it should return after starting the operation. For more information on long-running operations, please see <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/LongRunningOperations.md"> Azure.Core Long-Running Operation samples</see>. </param>
/// <param name="content"> The parameters of a run that needs to scheduled. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="content"/> is null. </exception>
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual ArmOperation<ContainerRegistryRunResource> ScheduleRun(WaitUntil waitUntil, ContainerRegistryRunContent content, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(content, nameof(content));

using var scope = _schedulesClientDiagnostics.CreateScope("ContainerRegistryResource.ScheduleRun");
scope.Start();
try
{
var response = _schedulesRestClient.ScheduleRun(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken);
var uri = _schedulesRestClient.CreateScheduleRunRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content);
var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Post, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
var operation = new ContainerRegistryArmOperation<ContainerRegistryRunResource>(Response.FromValue(new ContainerRegistryRunResource(Client, response), response.GetRawResponse()), rehydrationToken);
if (waitUntil == WaitUntil.Completed)
operation.WaitForCompletion(cancellationToken);
return operation;
}
catch (Exception e)
{
scope.Failed(e);
throw;
}
}
}
}
Loading
Loading